/* ================================================================
   iPhone Duo — Refero Design System + modern-web-showcase
   ================================================================ */

:root {
  /* Refero palette — Apple iPhone Duo */
  --color-gallery-white: #ffffff;
  --color-studio-mist: #f5f5f7;
  --color-paper-frost: #fafafc;
  --color-hairline-silver: #d6d6d6;
  --color-control-gray: #e6e6e8;
  --color-ink: #1d1d1f;
  --color-slate: #707070;
  --color-steel: #86868b;
  --color-apple-blue: #0066cc;
  --color-pricing-blue: #0071e3;
  --color-launch-orange: #b64400;

  /* Typography — SF Pro fallback stack */
  --font-display: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-body: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* Typography scale — refero exact */
  --text-global-nav: 12px;
  --leading-global-nav: 1;
  --tracking-global-nav: -0.12px;
  --text-body-small: 14px;
  --leading-body-small: 1.29;
  --tracking-body-small: -0.224px;
  --text-body: 17px;
  --leading-body: 1.47;
  --tracking-body: -0.374px;
  --text-product-kicker: 21px;
  --leading-product-kicker: 1;
  --tracking-product-kicker: 0.231px;
  --text-feature-heading: 40px;
  --leading-feature-heading: 1;
  --tracking-feature-heading: 0px;
  --text-hero-display: 80px;
  --leading-hero-display: 1.05;
  --tracking-hero-display: -1.2px;

  /* Spacing — refero */
  --spacing-20: 20px;
  --spacing-28: 28px;
  --spacing-32: 32px;
  --spacing-48: 48px;
  --spacing-64: 64px;
  --spacing-90: 90px;
  --section-gap: 90px;
  --card-padding: 28px;
  --element-gap: 20px;

  /* Border radius — refero */
  --radius-cards: 28px;
  --radius-links: 10px;
  --radius-pills: 36px;
  --radius-images: 28px;
  --radius-buttons: 9999px;
  --radius-navigation: 20px;

  /* Layout */
  --nav-h: 44px;
  --max-w: 1200px;
}

/* ================================================================
   Reset
   ================================================================ */
*, *::before, *::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

body {
  background: var(--color-gallery-white);
  color: var(--color-ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  padding-top: var(--nav-h);
}

img, svg, video { display: block; max-width: 100%; }
button, input { font: inherit; color: inherit; }
button { background: none; border: none; cursor: pointer; }

a {
  color: var(--color-apple-blue);
  text-decoration: none;
  transition: opacity 0.15s ease;
}
a:hover { opacity: 0.7; }
a:focus-visible {
  outline: 2px solid var(--color-apple-blue);
  outline-offset: 2px;
  border-radius: var(--radius-links);
}

.skip-link {
  position: absolute;
  width: 1px;
  height: 1px;
  clip-path: inset(50%);
  overflow: hidden;
}
.skip-link:focus {
  position: fixed;
  top: 12px;
  left: 12px;
  width: auto;
  height: auto;
  clip-path: none;
  padding: 10px 16px;
  background: var(--color-ink);
  color: var(--color-gallery-white);
  border-radius: var(--radius-links);
  z-index: 9999;
}

/* ================================================================
   Navigation
   ================================================================ */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: var(--nav-h);
  background: rgba(29, 29, 31, 0.8);
  backdrop-filter: blur(20px);
  z-index: 1000;
  color: var(--color-paper-frost);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-inner {
  max-width: var(--max-w);
  margin: 0 auto;
  height: 100%;
  padding: 0 22px;
  display: flex;
  align-items: center;
  gap: 32px;
}

.nav-logo svg {
  fill: var(--color-paper-frost);
  display: block;
}

.nav-links {
  display: flex;
  gap: 28px;
  margin-left: auto;
}
.nav-links a {
  font-size: var(--text-global-nav);
  font-weight: 400;
  line-height: var(--leading-global-nav);
  letter-spacing: var(--tracking-global-nav);
  color: var(--color-paper-frost);
}

.nav-actions {
  display: flex;
  gap: 18px;
  align-items: center;
}

.nav-icon {
  color: var(--color-paper-frost);
  padding: 4px;
}

@media (max-width: 768px) {
  .nav-links { display: none; }
}

/* ================================================================
   Promo bar
   ================================================================ */
.promo-bar {
  background: var(--color-studio-mist);
  padding: 12px 22px;
  text-align: center;
}
.promo-bar p {
  font-size: var(--text-body-small);
  line-height: var(--leading-body-small);
  letter-spacing: var(--tracking-body-small);
  color: var(--color-ink);
}
.promo-bar a {
  font-weight: 500;
}

/* ================================================================
   Typography
   ================================================================ */
.display {
  font-family: var(--font-display);
  font-size: var(--text-hero-display);
  font-weight: 600;
  line-height: var(--leading-hero-display);
  letter-spacing: var(--tracking-hero-display);
  color: var(--color-ink);
}

.h1 {
  font-size: 64px;
  font-weight: 600;
  line-height: 1.05;
  letter-spacing: -0.96px;
  color: var(--color-ink);
}

.h1--light {
  color: var(--color-gallery-white);
}

.h2 {
  font-size: var(--text-feature-heading);
  font-weight: 600;
  line-height: var(--leading-feature-heading);
  letter-spacing: var(--tracking-feature-heading);
  color: var(--color-ink);
  margin-bottom: var(--spacing-20);
}

.card-title {
  font-size: 21px;
  font-weight: 600;
  line-height: 1.21;
  letter-spacing: 0.23px;
  color: var(--color-ink);
  margin-bottom: 8px;
}

.body {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  letter-spacing: var(--tracking-body);
  color: var(--color-slate);
  max-width: 600px;
  margin: 0 auto;
}

.body--light {
  color: var(--color-paper-frost);
  max-width: 700px;
}

.body-sm {
  font-size: var(--text-body-small);
  line-height: var(--leading-body-small);
  letter-spacing: var(--tracking-body-small);
  color: var(--color-slate);
}

.kicker {
  font-size: var(--text-product-kicker);
  font-weight: 600;
  line-height: var(--leading-product-kicker);
  letter-spacing: var(--tracking-product-kicker);
  color: var(--color-launch-orange);
  margin-bottom: 8px;
}

.kicker--light {
  color: var(--color-apple-blue);
}

.eyebrow {
  font-size: 19px;
  font-weight: 500;
  letter-spacing: 0.23px;
  color: var(--color-slate);
  margin-bottom: 12px;
}

.tagline {
  font-size: 21px;
  font-weight: 400;
  line-height: 1.38;
  letter-spacing: 0.23px;
  color: var(--color-slate);
  margin-top: 8px;
}

.price {
  font-size: var(--text-body);
  color: var(--color-slate);
  margin-top: 12px;
}

/* ================================================================
   Buttons & Links
   ================================================================ */
.btn {
  display: inline-block;
  padding: 11px 22px;
  font-size: var(--text-global-nav);
  font-weight: 500;
  letter-spacing: var(--tracking-global-nav);
  text-align: center;
  border-radius: var(--radius-buttons);
  transition: all 0.2s ease;
}

.btn--primary {
  background: var(--color-pricing-blue);
  color: var(--color-gallery-white);
}
.btn--primary:hover {
  background: #005bb5;
  opacity: 1;
}

.link--arrow {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  font-weight: 500;
}

/* ================================================================
   Hero
   ================================================================ */
.hero {
  position: relative;
  min-height: 100vh;
  padding: 60px 22px;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  background: var(--color-gallery-white);
  overflow: hidden;
}

.hero-content {
  z-index: 2;
  margin-bottom: 40px;
}

.cta-row {
  display: flex;
  gap: 22px;
  justify-content: center;
  align-items: center;
  margin-top: 20px;
}

.device-render {
  position: relative;
  width: 100%;
  max-width: 720px;
  display: flex;
  justify-content: center;
  perspective: 1600px;
  flex: 1;
}

.device {
  display: flex;
  transform-style: preserve-3d;
  filter: drop-shadow(0 18px 36px rgba(0,0,0,0.12));
}

.device-half {
  width: 150px;
  height: 320px;
  background: linear-gradient(155deg, #4a4a4d 0%, #2a2a2c 45%, #38383a 100%);
  border-radius: var(--radius-cards);
  position: relative;
  transition: transform 1.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.device-half--left {
  transform-origin: center right;
}

.device-half--right {
  transform-origin: center left;
  transform: rotateY(-5deg);
}

.device-hinge {
  width: 8px;
  height: 320px;
  background: linear-gradient(90deg, #555 0%, #777 50%, #555 100%);
  border-radius: 3px;
  position: relative;
  z-index: 5;
}

.screen {
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--radius-cards) - 6px);
  background: linear-gradient(135deg, #0a0a0a 0%, #1a1a1c 100%);
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.screen-glow {
  position: absolute;
  width: 140%;
  height: 140%;
  background: radial-gradient(circle at 35% 35%, rgba(0,102,204,0.38), rgba(0,113,227,0.22), transparent 65%);
  filter: blur(30px);
  animation: glowPulse 5s ease-in-out infinite;
}

.screen-glow--alt {
  background: radial-gradient(circle at 65% 65%, rgba(182,68,0,0.32), rgba(0,102,204,0.18), transparent 65%);
  animation-delay: 1s;
}

@keyframes glowPulse {
  0%, 100% { opacity: 0.65; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.06); }
}

/* ================================================================
   Sections
   ================================================================ */
.section {
  padding: var(--section-gap) 22px;
  text-align: center;
}

.section--white {
  background: var(--color-gallery-white);
}

.section--mist {
  background: var(--color-studio-mist);
}

.section--ink {
  background: var(--color-ink);
  color: var(--color-gallery-white);
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
}

/* ================================================================
   Fold grid
   ================================================================ */
.fold-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: var(--element-gap);
  margin-top: 48px;
}

.card {
  background: var(--color-gallery-white);
  border-radius: var(--radius-cards);
  padding: var(--card-padding);
  text-align: left;
}

.card-visual {
  height: 180px;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: var(--element-gap);
}

.fold-state {
  width: 120px;
  height: 120px;
  background: linear-gradient(135deg, var(--color-steel), var(--color-slate));
  border-radius: 16px;
  position: relative;
  transition: transform 0.5s ease;
}

.fold-state--closed {
  width: 60px;
  border-radius: 10px;
}

.fold-state--half {
  transform: perspective(400px) rotateY(-18deg);
}

.fold-state--open::before {
  content: '';
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 2px;
  background: var(--color-hairline-silver);
}

/* ================================================================
   Stats
   ================================================================ */
.stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: var(--element-gap);
  margin-top: 48px;
}

.stat {
  text-align: center;
}

.stat strong {
  display: block;
  font-size: 56px;
  font-weight: 600;
  line-height: 1;
  color: var(--color-gallery-white);
  margin-bottom: 8px;
}

.stat span {
  font-size: var(--text-body);
  font-weight: 500;
  color: var(--color-paper-frost);
}

/* ================================================================
   Specs
   ================================================================ */
.spec-list {
  margin-top: 48px;
  border-top: 1px solid var(--color-hairline-silver);
}

.spec-row {
  display: flex;
  justify-content: space-between;
  padding: 20px 0;
  border-bottom: 1px solid var(--color-hairline-silver);
}

.spec-row dt {
  font-weight: 600;
  color: var(--color-ink);
}

.spec-row dd {
  text-align: right;
  color: var(--color-slate);
}

/* ================================================================
   Services
   ================================================================ */
.services {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: var(--element-gap);
  padding: var(--section-gap) 22px;
  max-width: var(--max-w);
  margin: 0 auto;
  background: var(--color-gallery-white);
}

.svc-card {
  background: var(--color-studio-mist);
  border-radius: var(--radius-cards);
  padding: var(--card-padding);
}

.svc-card h3 {
  font-size: 24px;
  font-weight: 600;
  line-height: 1.17;
  color: var(--color-ink);
  margin-bottom: 12px;
}

.svc-card p {
  font-size: var(--text-body);
  line-height: var(--leading-body);
  color: var(--color-slate);
  margin-bottom: 16px;
}

/* ================================================================
   Footer
   ================================================================ */
.footer {
  background: var(--color-studio-mist);
  padding: 32px 22px;
  border-top: 1px solid var(--color-hairline-silver);
}

.footer-note {
  font-size: 12px;
  line-height: 1.47;
  letter-spacing: -0.22px;
  color: var(--color-slate);
  margin-bottom: 24px;
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 24px;
  margin-bottom: 32px;
}

.footer-cols h4 {
  font-size: 14px;
  font-weight: 600;
  letter-spacing: -0.12px;
  color: var(--color-ink);
  margin-bottom: 10px;
}

.footer-cols a {
  display: block;
  font-size: 14px;
  line-height: 1.8;
  color: var(--color-slate);
}

.footer-bottom {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-top: 20px;
  border-top: 1px solid var(--color-hairline-silver);
  font-size: 12px;
  color: var(--color-slate);
}

.footer-legal {
  display: flex;
  gap: 12px;
  align-items: center;
}

.footer-legal a {
  color: var(--color-slate);
}

/* ================================================================
   Animations
   ================================================================ */
.fade-in {
  opacity: 0;
  transform: translateY(34px);
}

@media (prefers-reduced-motion: reduce) {
  .fade-in {
    opacity: 1;
    transform: none;
  }
  .device-half {
    transition: none;
  }
  .screen-glow {
    animation: none;
  }
}

/* ================================================================
   Responsive
   ================================================================ */
@media (max-width: 768px) {
  .display { font-size: 48px; letter-spacing: -0.72px; }
  .h1 { font-size: 40px; letter-spacing: -0.6px; }
  .h2 { font-size: 32px; }
  .device-half { width: 130px; height: 280px; }
  .device-hinge { height: 280px; }
  .fold-grid { grid-template-columns: 1fr; }
  .stat strong { font-size: 44px; }
  .spec-row { flex-direction: column; gap: 8px; }
  .spec-row dd { text-align: left; }
  .footer-bottom { flex-direction: column; gap: 12px; align-items: flex-start; }
}
