/* ==========================================================================
   Drifty — Smart Biological Sleep & Wake System
   Design: night-to-sunrise "living sky" — midnight → indigo → purple → amber
   ========================================================================== */

/* ---------- Tokens ---------- */
/* --dawn is registered so calc() can consume it as a real number */
@property --dawn {
  syntax: "<number>";
  inherits: true;
  initial-value: 0;
}

:root {
  --midnight: #020617;
  --predawn: #172554;
  --amber: #FF8C42;
  --gold: #FFD166;
  --navy: #0b1324;
  --royal: #2e5bff;
  --azure: #6ba6ff;
  --sky-blue: #a9c9ff;
  --dawn-blue: #6ba6ff;
  --white: #F8F9FF;
  --muted: #B0B8D0;

  --font-display: "Comfortaa", -apple-system, sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
  --font-mono: "Space Mono", monospace;

  /* Scroll-driven dawn: 0 = midnight (top of page), 1 = full daybreak.
     --dawn-atmo matches --dawn but fades back to night near the page end. */
  --dawn-atmo: 0;

  --ease-out: cubic-bezier(0.22, 1, 0.36, 1);
}

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

html {
  scroll-behavior: smooth;
  background-color: var(--midnight); /* base the atmosphere screen-blends over */
}

body {
  font-family: var(--font-body);
  color: var(--white);
  background: transparent;
  line-height: 1.6;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.mono { font-family: var(--font-mono); letter-spacing: 0.08em; }

.container {
  position: relative;
  z-index: 1; /* content rides above the journey line */
  width: min(1100px, 92%);
  margin-inline: auto;
}
.container--narrow { width: min(680px, 92%); }

section { position: relative; padding: clamp(5rem, 12vh, 9rem) 0; scroll-margin-top: 4.8rem; }

/* White copy stays white at daybreak; a layered dark halo keeps it
   legible while it passes over the bright band */
main, footer {
  text-shadow:
    0 1px 3px rgba(2, 6, 23, 0.55),
    0 2px 26px rgba(2, 6, 23, 0.65);
}

/* ---------- Living sky (fixed layer) ----------
   Architecture: the night→dawn gradient is always painted at full strength;
   JS only drives its OPACITY via --dawn-atmo, screen-blended over the
   midnight base. Stars fade out and clouds fade in from the same number. */
.sky {
  position: fixed;
  inset: 0;
  z-index: -2;
  overflow: hidden;
  pointer-events: none;
}

/* Full-strength dawn gradient, revealed by scroll */
.sky__atmo {
  position: absolute;
  inset: 0;
  background: linear-gradient(
    188deg,
    #020617 0%,
    #172554 14%,
    #1d4ed8 28%,
    #0ea5e9 46%,
    #38bdf8 58%,
    #fcd34d 78%,
    #fef08a 92%,
    #fffbeb 100%
  );
  opacity: calc(var(--dawn-atmo) * 0.78);
  mix-blend-mode: screen;
  will-change: opacity;
}

/* Twinkling canvas stars — fade out as dawn comes, return for the
   midnight footer (driven by --dawn-atmo, which end-fades) */
.sky__stars {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: calc((1 - var(--dawn-atmo)) * 0.92);
}

/* Soft daybreak clouds — fade in with the atmosphere and drift slowly */
.sky__clouds {
  position: absolute;
  inset: 0;
  opacity: calc(var(--dawn-atmo) * 0.7);
}
.cloud {
  position: absolute;
  height: 60px;
  border-radius: 999px;
  background: radial-gradient(ellipse at 50% 55%, rgba(255, 255, 255, 0.85) 0%, rgba(255, 255, 255, 0) 70%);
  filter: blur(10px);
  animation: cloud-drift linear infinite;
}
.cloud--1 { width: 380px; top: 16%; left: -10%; animation-duration: 95s; }
.cloud--2 { width: 260px; top: 34%; left: 30%; animation-duration: 120s; animation-delay: -40s; height: 44px; }
.cloud--3 { width: 460px; top: 56%; left: 55%; animation-duration: 80s; animation-delay: -20s; height: 70px; }
.cloud--4 { width: 220px; top: 72%; left: 10%; animation-duration: 140s; animation-delay: -70s; height: 38px; }

@keyframes cloud-drift {
  from { transform: translateX(0); }
  to { transform: translateX(110vw); }
}

/* ---------- Journey line ----------
   A winding path through the page's key points, drawn progressively as
   you scroll, with a glowing comet riding the tip. Built by JS. */
main { position: relative; }

.journey {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 0;
}

.journey__path {
  fill: none;
  stroke: url(#journeyGrad);
  stroke-width: 2.5;
  stroke-linecap: round;
  opacity: 0.55;
}

/* Faint full-route hint so the eye knows the path continues */
.journey__track {
  fill: none;
  stroke: rgba(169, 201, 255, 0.1);
  stroke-width: 2.5;
  stroke-linecap: round;
  stroke-dasharray: 2 10;
}

.journey__comet {
  fill: #ffffff;
  filter: drop-shadow(0 0 8px rgba(254, 240, 138, 0.9)) drop-shadow(0 0 18px rgba(169, 201, 255, 0.6));
}

@media (max-width: 880px) {
  .journey { display: none; }
}

/* ---------- Cursor glow (dark sections only, JS toggles opacity) ---------- */
.cursor-glow {
  position: fixed;
  z-index: -1;
  width: 480px;
  height: 480px;
  border-radius: 50%;
  pointer-events: none;
  background: radial-gradient(circle, rgba(126, 200, 227, 0.07) 0%, transparent 65%);
  transform: translate(-50%, -50%);
  opacity: 0;
  transition: opacity 0.4s ease;
}
.cursor-glow.is-on { opacity: 1; }

/* ---------- Nav ---------- */
.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.1rem clamp(1.2rem, 4vw, 3rem);
  background: rgba(5, 10, 26, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(248, 249, 255, 0.06);
}

/* ---------- Drifty logo lockup: crescent mark + wordmark + floating z's ---------- */
.nav__logo {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  font-size: 1.45rem;
  text-decoration: none;
}

.logo-mark {
  width: 1.5em;
  height: auto;
  filter: drop-shadow(0 0 8px rgba(107, 138, 240, 0.45));
}

.logo-word {
  font-family: "Comfortaa", var(--font-body);
  font-weight: 700;
  font-size: 1.15em;
  line-height: 1;
  background: linear-gradient(180deg, var(--white) 10%, #A9C9F5 55%, #5B7BE8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}

/* The zzz's rising off the "i", staggered up and to the right */
.logo-zzz {
  position: absolute;
  left: 3.1em;
  top: -0.28em;
  display: flex;
  gap: 0.08em;
  font-family: "Comfortaa", var(--font-body);
  font-weight: 700;
  color: #8FAEF2;
  line-height: 1;
  pointer-events: none;
}
.logo-zzz i {
  font-style: normal;
  animation: zzz-drift 2.8s ease-in-out infinite;
}
.logo-zzz i:nth-child(1) { font-size: 0.42em; animation-delay: 0s; }
.logo-zzz i:nth-child(2) { font-size: 0.52em; transform: translateY(-0.35em); animation-delay: 0.3s; }
.logo-zzz i:nth-child(3) { font-size: 0.62em; transform: translateY(-0.75em); animation-delay: 0.6s; }

@keyframes zzz-drift {
  0%, 100% { opacity: 0.5; }
  50% { opacity: 1; }
}

.nav__links {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2.2rem);
  font-size: 0.92rem;
}
.nav__links a {
  text-decoration: none;
  color: var(--muted);
  transition: color 0.25s ease;
}
.nav__links a:hover { color: var(--white); }

.nav__cta {
  padding: 0.5rem 1.1rem;
  border: 1px solid rgba(255, 209, 102, 0.5);
  border-radius: 999px;
  color: var(--gold) !important;
}
.nav__cta:hover { background: rgba(255, 209, 102, 0.1); }

/* ---------- Shared section headers ---------- */
.section-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.92rem;
  font-weight: 700;
  letter-spacing: 0.22em;
  color: var(--sky-blue);
  margin-bottom: 1.2rem;
}

/* Gradient dash leading each section label */
.section-eyebrow::before {
  content: "";
  width: 2.2rem;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, var(--azure), var(--gold));
  box-shadow: 0 0 8px rgba(107, 166, 255, 0.6);
}

.section-title {
  font-family: var(--font-display);
  font-size: clamp(1.9rem, 4.5vw, 3rem);
  font-weight: 600;
  line-height: 1.2;
  max-width: 22ch;
  margin-bottom: 2.5rem;
}
.section-title em { color: var(--amber); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  padding: 0.95rem 2rem;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  border: none;
  cursor: pointer;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease, background 0.3s ease;
  will-change: transform;
}

.btn--primary {
  background: linear-gradient(120deg, var(--amber), var(--gold));
  color: #2A1500;
  box-shadow: 0 8px 30px rgba(255, 140, 66, 0.3);
}
.btn--primary:hover { box-shadow: 0 10px 40px rgba(255, 140, 66, 0.5); }

.btn--ghost {
  background: transparent;
  color: var(--white);
  border: 1px solid rgba(248, 249, 255, 0.3);
}
.btn--ghost:hover { border-color: var(--dawn-blue); color: var(--dawn-blue); }

/* ---------- App Store badge ----------
   Official-style download badge. Pre-launch it shows a "Coming soon"
   label; remove the data-soon attribute in the markup to switch it to
   the live "Download on the App Store" state. */
.appstore-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.7rem 1.3rem 0.7rem 1.1rem;
  border-radius: 14px;
  background: #000;
  border: 1px solid rgba(248, 249, 255, 0.45);
  color: var(--white);
  text-decoration: none;
  line-height: 1;
  transition: transform 0.2s var(--ease-out), box-shadow 0.3s ease, border-color 0.3s ease;
  will-change: transform;
}
.appstore-btn:hover {
  border-color: var(--white);
  box-shadow: 0 8px 30px rgba(0, 0, 0, 0.45);
}

.appstore-btn__apple {
  width: 26px;
  height: 26px;
  flex: none;
  color: var(--white);
}

.appstore-btn__text {
  display: flex;
  flex-direction: column;
  gap: 0.12rem;
  text-align: left;
}
.appstore-btn__text small {
  font-size: 0.62rem;
  letter-spacing: 0.02em;
  color: rgba(248, 249, 255, 0.8);
}
.appstore-btn__text strong {
  font-size: 1.18rem;
  font-weight: 600;
  letter-spacing: 0.01em;
}

/* Toggle between "Coming soon" and "Download" copy via data-soon */
.appstore-btn__pre { display: none; }
.appstore-btn[data-soon] .appstore-btn__soon { display: block; }
.appstore-btn:not([data-soon]) .appstore-btn__soon { display: none; }
.appstore-btn:not([data-soon]) .appstore-btn__pre { display: block; }

/* Pre-launch the badge isn't clickable-through; a small SOON tag marks it */
.appstore-btn[data-soon] { position: relative; cursor: default; }
.appstore-btn[data-soon]::after {
  content: "SOON";
  position: absolute;
  top: -9px;
  right: -9px;
  font-family: var(--font-mono);
  font-size: 0.52rem;
  letter-spacing: 0.12em;
  padding: 0.18rem 0.42rem;
  border-radius: 999px;
  color: var(--midnight);
  background: linear-gradient(120deg, var(--gold), var(--amber));
  box-shadow: 0 2px 10px rgba(255, 140, 66, 0.5);
}

/* Smaller footer variant */
.appstore-btn--sm {
  margin-top: 1.2rem;
  padding: 0.55rem 1rem 0.55rem 0.85rem;
  border-radius: 11px;
}
.appstore-btn--sm .appstore-btn__apple { width: 21px; height: 21px; }
.appstore-btn--sm .appstore-btn__text strong { font-size: 1rem; }
.appstore-btn--sm .appstore-btn__text small { font-size: 0.56rem; }

/* ==========================================================================
   1. HERO
   ========================================================================== */
.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  overflow: hidden;
  padding: 7rem clamp(1.2rem, 6vw, 5rem) 4rem;
}

.hero__inner {
  position: relative;
  z-index: 1;
  max-width: 880px;
}

/* Aurora ribbons: drawn crisp on canvas, softened by a heavy CSS blur
   so they read as flowing bands of light behind the type */
.hero__ribbons {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  filter: blur(30px) saturate(150%);
  opacity: 0.85;
}

.hero__eyebrow {
  font-size: 0.72rem;
  color: var(--dawn-blue);
  margin-bottom: 1.4rem;
}

/* Brand wordmark — the hero's protagonist: clean white, glowing,
   nothing competing with it */
.hero__brand {
  font-family: "Comfortaa", var(--font-body);
  font-weight: 700;
  font-size: clamp(4.4rem, 12vw, 8rem);
  line-height: 1;
  margin-bottom: 1.1rem;
  color: var(--white);
  filter: drop-shadow(0 0 36px rgba(169, 201, 255, 0.55));
}

/* The motto carries the metallic blue gradient */
.hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.7rem, 3.8vw, 2.7rem);
  font-weight: 600;
  line-height: 1.15;
  margin-bottom: 1.4rem;
  background: linear-gradient(180deg, var(--white) 8%, #A9C9F5 52%, #5B7BE8 100%);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  text-shadow: none; /* the page-wide halo muddies clipped-gradient text */
}

.hero__subhead {
  color: var(--muted);
  font-size: clamp(1rem, 1.6vw, 1.15rem);
  max-width: 48ch;
  margin-inline: auto;
  margin-bottom: 2.4rem;
}

.hero__ctas { display: flex; flex-wrap: wrap; justify-content: center; gap: 1rem; }

/* Scroll indicator: animated chevron */
.hero__scroll {
  position: absolute;
  bottom: 2rem;
  left: 50%;
  transform: translateX(-50%);
  padding: 1rem;
}
.chevron {
  display: block;
  width: 16px;
  height: 16px;
  border-right: 2px solid var(--muted);
  border-bottom: 2px solid var(--muted);
  transform: rotate(45deg);
  animation: chevron-bob 1.8s ease-in-out infinite;
}
@keyframes chevron-bob {
  0%, 100% { transform: rotate(45deg) translate(0, 0); opacity: 0.5; }
  50% { transform: rotate(45deg) translate(5px, 5px); opacity: 1; }
}

/* ==========================================================================
   2. PROBLEM
   ========================================================================== */
.problem__stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1.6rem;
  margin-top: 1rem;
}

.stat-card {
  padding: 2.4rem 2.2rem;
  border-radius: 22px;
  background: rgba(8, 14, 35, 0.55);
  border: 1px solid rgba(169, 201, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

.stat-card__number {
  font-family: var(--font-display);
  font-size: clamp(3rem, 6vw, 4.4rem);
  font-weight: 700;
  color: var(--gold);
  line-height: 1;
  margin-bottom: 0.9rem;
}
.stat-card__unit { font-size: 0.45em; color: var(--amber); }
.stat-card__copy { color: var(--muted); font-size: 1.05rem; }

/* ==========================================================================
   3. FEATURES — glass-morphism cards
   ========================================================================== */
.features__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 1.8rem;
}

.feature-card {
  position: relative;
  padding: 2.6rem 2.3rem;
  border-radius: 26px;
  background: rgba(8, 14, 35, 0.55);
  border: 1px solid rgba(169, 201, 255, 0.16);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transition: box-shadow 0.4s ease, border-color 0.4s ease, transform 0.4s var(--ease-out);
}
.feature-card:hover {
  border-color: rgba(126, 200, 227, 0.35);
  box-shadow: 0 0 50px rgba(126, 200, 227, 0.12);
  transform: translateY(-4px);
}

.feature-card__icon {
  width: 64px;
  height: 64px;
  margin-bottom: 1.6rem;
  color: var(--dawn-blue);
}
.feature-card__icon--warm { color: var(--amber); }

.tag {
  position: absolute;
  top: 1.6rem;
  right: 1.6rem;
  font-size: 0.6rem;
  color: var(--gold);
  border: 1px solid rgba(255, 209, 102, 0.4);
  border-radius: 999px;
  padding: 0.3rem 0.7rem;
}

.feature-card__title {
  font-family: var(--font-display);
  font-size: 1.6rem;
  font-weight: 600;
  margin-bottom: 0.2rem;
}
.feature-card__abbr { font-size: 0.7rem; color: var(--dawn-blue); margin-bottom: 1rem; }
.feature-card__copy { color: var(--muted); }

/* Pricing pinned to the bottom of each feature card */
.feature-card__price {
  margin-top: 1.6rem;
  padding-top: 1.3rem;
  border-top: 1px solid rgba(169, 201, 255, 0.14);
  display: flex;
  flex-direction: column;
  gap: 0.2rem;
}
.price__amount {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 1.9rem;
  line-height: 1;
  background: linear-gradient(120deg, var(--gold), var(--amber));
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
}
.price__per { font-size: 0.95rem; font-weight: 600; }
.price__note { font-size: 0.82rem; color: var(--muted); }

/* ==========================================================================
   4. HOW IT WORKS — phone & watch pairing scene
   ========================================================================== */
.pairing__visual {
  margin-top: 1rem;
  padding: clamp(1rem, 3vw, 1.8rem);
  border-radius: 28px;
  background:
    radial-gradient(ellipse at 50% 18%, rgba(46, 91, 255, 0.14), transparent 55%),
    linear-gradient(145deg, rgba(11, 19, 36, 0.92), rgba(5, 7, 15, 0.97));
  border: 1px solid rgba(107, 166, 255, 0.28);
}

.pairing__svg { width: 100%; height: auto; display: block; }

/* Dashed link arc — dashes slide along the curve, data flowing */
.pairing__arc { animation: pair-dash 14s linear infinite; }
@keyframes pair-dash {
  to { stroke-dashoffset: -240; }
}

/* Glow dots breathing on each device (watch offset by half a cycle) */
.pairing__pulse-dot { animation: pair-pulse 3.2s cubic-bezier(0.45, 0.05, 0.55, 0.95) infinite; }
.pairing__pulse-dot--delay { animation-delay: 1.6s; }
@keyframes pair-pulse {
  0%, 100% { opacity: 0.6; }
  50% { opacity: 1; }
}

/* Watch heart trace: a bright segment travels the line over a dim baseline */
.pairing__ecg {
  stroke-dasharray: 42 220;
  animation: pair-ecg 2.8s linear infinite;
}
@keyframes pair-ecg {
  from { stroke-dashoffset: 262; }
  to { stroke-dashoffset: 0; }
}

/* Heartbeat next to the BPM readout */
.pairing__heart {
  transform-box: fill-box;
  transform-origin: center;
  animation: pair-heart 1.15s ease-in-out infinite;
}
@keyframes pair-heart {
  0%, 100% { transform: scale(1); }
  30% { transform: scale(1.35); }
}

/* Phone mic equalizer — bars dance while listening for snoring */
.pairing__eqg rect {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: pair-eq 1.1s ease-in-out infinite;
}
.pairing__eqg rect:nth-child(1) { animation-delay: -0.2s; }
.pairing__eqg rect:nth-child(2) { animation-delay: -0.7s; }
.pairing__eqg rect:nth-child(3) { animation-delay: -0.4s; }
.pairing__eqg rect:nth-child(4) { animation-delay: -0.9s; }
.pairing__eqg rect:nth-child(5) { animation-delay: -0.55s; }
@keyframes pair-eq {
  0%, 100% { transform: scaleY(0.25); }
  50% { transform: scaleY(1); }
}

/* Step legend — leads the section, right under the title */
.pairing__steps {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1.4rem;
  margin-bottom: 2.2rem;
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--white);
}
.pairing__steps b { color: var(--amber); font-weight: 400; margin-right: 0.45rem; font-size: 0.82em; }
.pairing__steps-sep { color: rgba(169, 201, 255, 0.6); font-weight: 400; }

/* ==========================================================================
   5. TEAM — founder story + flip cards
   ========================================================================== */
.team__story {
  max-width: 62ch;
  color: #E4EAFB;
  font-size: 1.18rem;
  margin-top: 3.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
}

.team__story-kicker {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.35rem;
  line-height: 1.5;
  color: var(--white);
}

.team__founders-label {
  font-size: 0.7rem;
  color: var(--amber);
  margin-bottom: 1.4rem;
}

.team__grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 1.8rem;
  max-width: 760px;
}

/* 3D flip on hover */
.founder { perspective: 1200px; min-height: 340px; }
.founder__inner {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: 340px;
  transform-style: preserve-3d;
  transition: transform 0.7s var(--ease-out);
}
/* Desktop flips on hover/focus; touch devices flip on tap (.is-flipped,
   toggled by JS) so the back-side quote is reachable without a pointer */
@media (hover: hover) {
  .founder:hover .founder__inner,
  .founder:focus-within .founder__inner { transform: rotateY(180deg); }
}
.founder.is-flipped .founder__inner { transform: rotateY(180deg); }

.founder__front, .founder__back {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  border-radius: 24px;
  padding: 2.2rem 2rem;
  background: rgba(8, 14, 35, 0.6);
  border: 1px solid rgba(255, 209, 102, 0.22);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

.founder__back {
  transform: rotateY(180deg);
  justify-content: center;
  background: linear-gradient(160deg, rgba(255, 140, 66, 0.18), rgba(8, 14, 35, 0.85));
}

.founder__photo {
  position: relative;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 2.2rem;
  font-weight: 700;
  color: var(--midnight);
  background: linear-gradient(140deg, var(--gold), var(--amber));
  margin-bottom: 1.3rem;
  border: 2px solid rgba(169, 201, 255, 0.35);
  box-shadow: 0 0 24px rgba(107, 138, 240, 0.25);
}

/* Headshot covers the circle; if the file is missing the img removes
   itself and the gold initials fallback shows through */
.founder__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.founder__name { font-family: var(--font-display); font-size: 1.45rem; }
.founder__role { font-size: 0.68rem; color: var(--amber); margin: 0.4rem 0 0.9rem; }
.founder__bio { color: var(--muted); font-size: 0.95rem; }

.founder__fact {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.15rem;
  line-height: 1.5;
}

/* ---------- Wider team: smaller member cards beneath the founders ---------- */
.team__team-label { margin-top: 3.2rem; }

.team__members {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  max-width: 560px;
}

/* Wide horizontal cards, stacked: photo left, name + role right */
.member {
  display: flex;
  align-items: center;
  gap: 1.4rem;
  padding: 1.1rem 1.7rem 1.1rem 1.1rem;
  border-radius: 18px;
  background: linear-gradient(110deg, rgba(8, 14, 35, 0.7), rgba(8, 14, 35, 0.45));
  border: 1px solid rgba(169, 201, 255, 0.16);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: border-color 0.3s ease, transform 0.3s var(--ease-out), box-shadow 0.3s ease;
}
.member:hover {
  border-color: rgba(169, 201, 255, 0.45);
  transform: translateX(4px);
  box-shadow: 0 6px 28px rgba(107, 138, 240, 0.18);
}

/* Headshots match the founders' 110px; cards stay compact rectangles */
.member__photo {
  position: relative;
  flex: none;
  width: 110px;
  height: 110px;
  border-radius: 50%;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
  font-family: var(--font-display);
  font-size: 1.8rem;
  font-weight: 700;
  color: var(--midnight);
  background: linear-gradient(140deg, var(--gold), var(--amber));
  border: 2px solid rgba(169, 201, 255, 0.3);
}
.member__photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.member__info { text-align: left; }
.member__name { font-family: var(--font-display); font-size: 1.28rem; font-weight: 600; }
.member__role { font-size: 0.7rem; color: var(--sky-blue); margin-top: 0.25rem; }

/* ==========================================================================
   7. CONTACT
   ========================================================================== */
.contact__subhead { color: var(--muted); margin-bottom: 2.5rem; max-width: 50ch; }

.form { display: flex; flex-direction: column; gap: 1.3rem; }

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.3rem;
}

.form__field { display: flex; flex-direction: column; gap: 0.45rem; }
.form__label { font-size: 0.62rem; color: var(--dawn-blue); }

.form input, .form select, .form textarea {
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--white);
  background: rgba(8, 14, 35, 0.55);
  border: 1px solid rgba(169, 201, 255, 0.2);
  border-radius: 12px;
  padding: 0.85rem 1rem;
  transition: border-color 0.25s ease, background 0.25s ease;
}
.form input::placeholder, .form textarea::placeholder { color: rgba(176, 184, 208, 0.5); }
.form input:focus, .form select:focus, .form textarea:focus {
  outline: none;
  border-color: var(--gold);
  background: rgba(8, 14, 35, 0.8);
}
.form select { appearance: none; cursor: pointer; }
.form select option { background: var(--predawn); color: var(--white); }
.form textarea { resize: vertical; }

/* Submit button morphs to a checkmark on success */
.form__submit { position: relative; align-self: flex-start; overflow: hidden; }
.form__submit-check {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.3rem;
  transform: translateY(110%);
  transition: transform 0.4s var(--ease-out);
}
.form__submit.is-sent { pointer-events: none; background: linear-gradient(120deg, #4caf7d, #7ec8a3); }
.form__submit.is-sent .form__submit-label { opacity: 0; }
.form__submit.is-sent .form__submit-check { transform: translateY(0); }
.form__submit-label { transition: opacity 0.3s ease; }

.contact__email { margin-top: 2rem; color: var(--muted); font-size: 0.95rem; }
.contact__email a { color: var(--gold); }

/* ==========================================================================
   8. FOOTER
   ========================================================================== */
.footer {
  background: var(--midnight);
  border-top: 1px solid rgba(248, 249, 255, 0.07);
  padding: 4rem 0 3rem;
}

.footer__inner {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  align-items: start;
}

.footer__tagline { color: var(--muted); font-size: 0.95rem; margin-top: 0.8rem; max-width: 32ch; }

.footer__links { display: flex; flex-direction: column; gap: 0.7rem; }
.footer__links a {
  text-decoration: none;
  color: var(--muted);
  font-size: 0.92rem;
  transition: color 0.25s ease;
}
.footer__links a:hover { color: var(--gold); }

.footer__meta { color: var(--muted); font-size: 0.85rem; display: flex; flex-direction: column; gap: 0.6rem; }
.footer__location { font-size: 0.7rem; color: rgba(176, 184, 208, 0.6); }

/* ==========================================================================
   Scroll-reveal helpers (JS adds .is-visible via IntersectionObserver)
   ========================================================================== */
.reveal {
  opacity: 0;
  transform: translateY(36px);
  transition: opacity 0.8s var(--ease-out), transform 0.8s var(--ease-out);
}
.reveal--left { transform: translateX(-60px); }
.reveal--right { transform: translateX(60px); }
.reveal.is-visible { opacity: 1; transform: none; }

/* ==========================================================================
   Responsive
   ========================================================================== */
@media (max-width: 880px) {
  .hero { padding-top: 7rem; }
  .hero__ribbons { filter: blur(22px) saturate(150%); }

  .footer__inner { grid-template-columns: 1fr; gap: 2rem; }
  .pairing__steps { justify-content: center; }

  /* Full-width cards: a sideways entrance would push past the viewport,
     so reveal vertically instead (no horizontal overflow) */
  .reveal--left, .reveal--right { transform: translateY(36px); }
}

/* Large phones / small tablets */
@media (max-width: 700px) {
  section { padding: clamp(4rem, 10vh, 6rem) 0; }

  /* Pairing scene: the device labels stay legible by holding the SVG to a
     readable minimum width and letting it scroll inside its own card —
     never the page. The cut-off edge hints that it pans. */
  .pairing__visual {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: rgba(169, 201, 255, 0.4) transparent;
  }
  .pairing__svg { min-width: 540px; }
}

/* Phones */
@media (max-width: 560px) {
  .nav { padding: 0.85rem 1.1rem; }
  .nav__links a:not(.nav__cta) { display: none; }
  .cursor-glow { display: none; }

  .hero__brand { font-size: clamp(3.2rem, 17vw, 5rem); }
  .hero__title { font-size: clamp(1.45rem, 6.5vw, 2rem); }
  .hero__subhead { font-size: 1rem; }

  /* Stack the two hero CTAs as equal, comfortably tappable blocks */
  .hero__ctas { width: 100%; flex-direction: column; align-items: center; gap: 0.85rem; }
  .hero__ctas .btn,
  .hero__ctas .appstore-btn { width: 100%; max-width: 320px; justify-content: center; }

  .form__row { grid-template-columns: 1fr; }
  .section-title { max-width: none; }
  .stat-card, .feature-card { padding: 1.9rem 1.6rem; }

  .pairing__steps { font-size: 1rem; gap: 0.55rem 1rem; }
  .founder { min-height: 320px; }
}

/* Small phones */
@media (max-width: 380px) {
  .hero__brand { font-size: 3rem; }
  .container { width: 94%; }
}

/* ==========================================================================
   Reduced motion — disable all non-essential animation
   ========================================================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  .sky__stars, .cursor-glow { display: none; }
  .pairing__packet { display: none; }
}
