/* ============================================================
   fonts.css
   ============================================================ */
/* AMI Sleep Watch — Web Font Declarations
 *
 * Fonts loaded from Google Fonts CDN.
 * Flag: AMI's original materials appear to use Times New Roman (headings) and
 * Arial/Helvetica (body). These have been substituted with:
 *   • Merriweather → authoritative serif, close in feel to Times New Roman
 *   • IBM Plex Sans → clean technical sans, better than Arial for digital
 *   • IBM Plex Mono → data-forward monospace for metrics and readouts
 * Please supply licensed TTF/OTF files if a specific brand typeface is chosen during rebrand.
 */

@import url('https://fonts.googleapis.com/css2?family=Merriweather:ital,wght@0,400;0,700;1,400&family=IBM+Plex+Sans:ital,wght@0,400;0,500;0,600;0,700;1,400&family=IBM+Plex+Mono:wght@400;500;600&display=swap');

/* ============================================================
   colors.css
   ============================================================ */
/* AMI Sleep Watch — Color Tokens
 * Brand palette preserved from existing materials.
 * Elevated for conference use; does not constitute a rebrand.
 */

:root {
  /* ── Brand primitives ────────────────────────────────── */
  --ami-navy-950:  #0A1A30;
  --ami-navy-900:  #0F2347;
  --ami-navy-800:  #1B3A6B;   /* Primary navy — header bars, booth background */
  --ami-navy-700:  #23508F;
  --ami-navy-600:  #2B5EA7;   /* Mid navy — "Excellence of a Motionlogger" accent */
  --ami-navy-500:  #3B72C4;
  --ami-navy-200:  #B8CCE8;
  --ami-navy-100:  #D8E5F4;
  --ami-navy-50:   #EEF4FB;

  --ami-red-900:   #7A0C0C;
  --ami-red-800:   #991B1B;
  --ami-red-700:   #C41E1E;   /* AMI Crimson — waveform mark, primary accent */
  --ami-red-600:   #DC2626;
  --ami-red-500:   #EF4444;
  --ami-red-100:   #FEE2E2;
  --ami-red-50:    #FFF5F5;

  --ami-gray-950:  #0D1117;
  --ami-gray-800:  #1E2A3A;
  --ami-gray-700:  #2D3B4E;
  --ami-gray-600:  #4A5568;
  --ami-gray-500:  #6B7A90;
  --ami-gray-400:  #8A98AE;
  --ami-gray-300:  #B0BBC8;
  --ami-gray-200:  #D4DAE4;
  --ami-gray-100:  #EEF1F5;
  --ami-gray-50:   #F6F8FB;

  --ami-white:     #FFFFFF;
  --ami-black:     #0A0C0F;

  /* ── Semantic: surface ───────────────────────────────── */
  --color-surface-default:   var(--ami-white);
  --color-surface-subtle:    var(--ami-gray-50);
  --color-surface-muted:     var(--ami-gray-100);
  --color-surface-raised:    var(--ami-white);
  --color-surface-inverse:   var(--ami-navy-800);
  --color-surface-accent:    var(--ami-navy-50);
  --color-surface-danger:    var(--ami-red-50);

  /* ── Semantic: text ──────────────────────────────────── */
  --color-text-primary:      var(--ami-gray-800);
  --color-text-secondary:    var(--ami-gray-600);
  --color-text-tertiary:     var(--ami-gray-500);
  --color-text-disabled:     var(--ami-gray-400);
  --color-text-inverse:      var(--ami-white);
  --color-text-brand:        var(--ami-navy-800);
  --color-text-accent:       var(--ami-navy-600);
  --color-text-danger:       var(--ami-red-700);
  --color-text-link:         var(--ami-navy-600);

  /* ── Semantic: border ────────────────────────────────── */
  --color-border-subtle:     var(--ami-gray-100);
  --color-border-default:    var(--ami-gray-200);
  --color-border-strong:     var(--ami-gray-300);
  --color-border-brand:      var(--ami-navy-800);
  --color-border-accent:     var(--ami-navy-600);
  --color-border-danger:     var(--ami-red-700);

  /* ── Semantic: interactive ───────────────────────────── */
  --color-action-primary:         var(--ami-navy-800);
  --color-action-primary-hover:   var(--ami-navy-700);
  --color-action-primary-active:  var(--ami-navy-900);
  --color-action-secondary:       var(--ami-navy-50);
  --color-action-secondary-hover: var(--ami-navy-100);
  --color-action-danger:          var(--ami-red-700);
  --color-action-danger-hover:    var(--ami-red-800);

  /* ── Data / status ───────────────────────────────────── */
  --color-status-good:     #1A7A4A;
  --color-status-good-bg:  #E8F5EE;
  --color-status-warn:     #92600A;
  --color-status-warn-bg:  #FEF3C7;
  --color-status-danger:   var(--ami-red-700);
  --color-status-danger-bg:var(--ami-red-50);
  --color-status-neutral:  var(--ami-gray-600);
  --color-status-neutral-bg: var(--ami-gray-100);
}

/* ============================================================
   typography.css
   ============================================================ */
/* AMI Sleep Watch — Typography Tokens
 * Merriweather: authoritative serif for display headings (matches the professional, clinical character of existing materials)
 * IBM Plex Sans: clean technical sans for UI and body text
 * IBM Plex Mono: monospace for data readouts, metrics, and code
 * All loaded via Google Fonts in fonts.css
 */

:root {
  /* ── Font families ──────────────────────────────────── */
  --font-serif:    'Merriweather', 'Georgia', 'Times New Roman', serif;
  --font-sans:     'IBM Plex Sans', 'Helvetica Neue', Arial, sans-serif;
  --font-mono:     'IBM Plex Mono', 'Courier New', monospace;

  /* ── Aliases ────────────────────────────────────────── */
  --font-display:  var(--font-serif);
  --font-heading:  var(--font-serif);
  --font-body:     var(--font-sans);
  --font-ui:       var(--font-sans);
  --font-data:     var(--font-mono);

  /* ── Scale (px → rem, base 16px) ───────────────────── */
  --text-xs:   0.6875rem;   /* 11px — labels, legal */
  --text-sm:   0.8125rem;   /* 13px — captions, metadata */
  --text-base: 0.9375rem;   /* 15px — body */
  --text-md:   1.0625rem;   /* 17px — large body / lead */
  --text-lg:   1.25rem;     /* 20px — h4 / section label */
  --text-xl:   1.5rem;      /* 24px — h3 */
  --text-2xl:  1.875rem;    /* 30px — h2 */
  --text-3xl:  2.25rem;     /* 36px — h1 */
  --text-4xl:  3rem;        /* 48px — display */
  --text-5xl:  3.75rem;     /* 60px — hero display */
  --text-6xl:  4.5rem;      /* 72px — slide hero */

  /* ── Line heights ───────────────────────────────────── */
  --leading-tight:  1.2;
  --leading-snug:   1.35;
  --leading-normal: 1.5;
  --leading-loose:  1.7;
  --leading-data:   1.3;

  /* ── Letter spacing ─────────────────────────────────── */
  --tracking-tight:    -0.02em;
  --tracking-normal:   0em;
  --tracking-wide:     0.04em;
  --tracking-widest:   0.12em;   /* caps labels, overlines */

  /* ── Font weights ───────────────────────────────────── */
  --weight-regular: 400;
  --weight-medium:  500;
  --weight-semibold:600;
  --weight-bold:    700;

  /* ── Semantic text styles (composite) ──────────────── */
  --style-display-size:       var(--text-5xl);
  --style-display-weight:     var(--weight-bold);
  --style-display-leading:    var(--leading-tight);
  --style-display-family:     var(--font-display);
  --style-display-tracking:   var(--tracking-tight);

  --style-h1-size:            var(--text-3xl);
  --style-h1-weight:          var(--weight-bold);
  --style-h1-leading:         var(--leading-tight);
  --style-h1-family:          var(--font-heading);

  --style-h2-size:            var(--text-2xl);
  --style-h2-weight:          var(--weight-bold);
  --style-h2-leading:         var(--leading-snug);
  --style-h2-family:          var(--font-heading);

  --style-h3-size:            var(--text-xl);
  --style-h3-weight:          var(--weight-semibold);
  --style-h3-leading:         var(--leading-snug);
  --style-h3-family:          var(--font-sans);

  --style-h4-size:            var(--text-lg);
  --style-h4-weight:          var(--weight-semibold);
  --style-h4-leading:         var(--leading-normal);
  --style-h4-family:          var(--font-sans);

  --style-label-size:         var(--text-xs);
  --style-label-weight:       var(--weight-semibold);
  --style-label-tracking:     var(--tracking-widest);
  --style-label-family:       var(--font-sans);

  --style-body-size:          var(--text-base);
  --style-body-weight:        var(--weight-regular);
  --style-body-leading:       var(--leading-normal);
  --style-body-family:        var(--font-body);

  --style-caption-size:       var(--text-sm);
  --style-caption-weight:     var(--weight-regular);
  --style-caption-leading:    var(--leading-normal);

  --style-metric-size:        var(--text-4xl);
  --style-metric-weight:      var(--weight-bold);
  --style-metric-leading:     var(--leading-tight);
  --style-metric-family:      var(--font-mono);
  --style-metric-tracking:    var(--tracking-tight);
}

/* ============================================================
   spacing.css
   ============================================================ */
/* AMI Sleep Watch — Spacing & Layout Tokens */

:root {
  /* ── Base spacing scale (4px grid) ──────────────────── */
  --space-0:   0;
  --space-1:   0.25rem;   /* 4px  */
  --space-2:   0.5rem;    /* 8px  */
  --space-3:   0.75rem;   /* 12px */
  --space-4:   1rem;      /* 16px */
  --space-5:   1.25rem;   /* 20px */
  --space-6:   1.5rem;    /* 24px */
  --space-8:   2rem;      /* 32px */
  --space-10:  2.5rem;    /* 40px */
  --space-12:  3rem;      /* 48px */
  --space-16:  4rem;      /* 64px */
  --space-20:  5rem;      /* 80px */
  --space-24:  6rem;      /* 96px */
  --space-32:  8rem;      /* 128px */

  /* ── Semantic spacing ───────────────────────────────── */
  --gap-xs:     var(--space-2);    /* 8px  — tight groups */
  --gap-sm:     var(--space-3);    /* 12px — form rows */
  --gap-md:     var(--space-4);    /* 16px — default gap */
  --gap-lg:     var(--space-6);    /* 24px — section spacing */
  --gap-xl:     var(--space-8);    /* 32px — section breaks */
  --gap-2xl:    var(--space-12);   /* 48px — page sections */

  --padding-xs:   var(--space-2);   /* 8px  */
  --padding-sm:   var(--space-3);   /* 12px */
  --padding-md:   var(--space-4);   /* 16px */
  --padding-lg:   var(--space-6);   /* 24px */
  --padding-xl:   var(--space-8);   /* 32px */
  --padding-2xl:  var(--space-12);  /* 48px */

  /* ── Component sizing ───────────────────────────────── */
  --height-xs:     1.75rem;   /* 28px — compact chips/tags */
  --height-sm:     2.25rem;   /* 36px — small buttons */
  --height-md:     2.5rem;    /* 40px — default buttons/inputs */
  --height-lg:     3rem;      /* 48px — large buttons */
  --height-xl:     3.5rem;    /* 56px — hero inputs */

  /* ── Border radius ──────────────────────────────────── */
  --radius-none:   0;
  --radius-sm:     2px;       /* Subtle — data cells */
  --radius-md:     4px;       /* Default — cards, buttons */
  --radius-lg:     8px;       /* Panels, dialogs */
  --radius-xl:     12px;      /* Large cards */
  --radius-full:   9999px;    /* Pills, badges */

  /* ── Container widths ───────────────────────────────── */
  --container-sm:  640px;
  --container-md:  768px;
  --container-lg:  1024px;
  --container-xl:  1280px;
  --container-2xl: 1440px;

  /* ── Z-index ────────────────────────────────────────── */
  --z-base:     0;     /* @kind other */
  --z-raised:   10;    /* @kind other */
  --z-sticky:   100;   /* @kind other */
  --z-overlay:  200;   /* @kind other */
  --z-modal:    300;   /* @kind other */
  --z-toast:    400;   /* @kind other */
  --z-tooltip:  500;   /* @kind other */
}

/* ============================================================
   effects.css
   ============================================================ */
/* AMI Sleep Watch — Effects Tokens
 * Shadow, transitions, and motion
 * Character: clinical precision — minimal animation, functional transitions
 */

:root {
  /* ── Shadows ─────────────────────────────────────────── */
  --shadow-none:    none;
  --shadow-xs:      0 1px 2px 0 rgba(27, 42, 74, 0.06);
  --shadow-sm:      0 1px 3px 0 rgba(27, 42, 74, 0.08), 0 1px 2px -1px rgba(27, 42, 74, 0.06);
  --shadow-md:      0 4px 6px -1px rgba(27, 42, 74, 0.10), 0 2px 4px -2px rgba(27, 42, 74, 0.06);
  --shadow-lg:      0 10px 15px -3px rgba(27, 42, 74, 0.10), 0 4px 6px -4px rgba(27, 42, 74, 0.06);
  --shadow-xl:      0 20px 25px -5px rgba(27, 42, 74, 0.10), 0 8px 10px -6px rgba(27, 42, 74, 0.06);

  /* Card variant — slightly warmer, sits on white */
  --shadow-card:    0 2px 8px 0 rgba(27, 42, 74, 0.08), 0 0 0 1px rgba(27, 42, 74, 0.06);
  --shadow-card-hover: 0 6px 16px 0 rgba(27, 42, 74, 0.12), 0 0 0 1px rgba(27, 42, 74, 0.08);

  /* Inset (inputs, wells) */
  --shadow-inset:   inset 0 1px 3px 0 rgba(27, 42, 74, 0.10);
  --shadow-focus:   0 0 0 3px rgba(43, 94, 167, 0.25);
  --shadow-focus-danger: 0 0 0 3px rgba(196, 30, 30, 0.22);

  /* ── Transitions ─────────────────────────────────────── */
  --duration-fast:    100ms;   /* @kind other */
  --duration-base:    160ms;   /* @kind other */
  --duration-slow:    250ms;   /* @kind other */
  --duration-slower:  400ms;   /* @kind other */

  --ease-out:    cubic-bezier(0.22, 1, 0.36, 1);    /* @kind other */
  --ease-in:     cubic-bezier(0.64, 0, 0.78, 0);    /* @kind other */
  --ease-in-out: cubic-bezier(0.45, 0, 0.55, 1);    /* @kind other */
  --ease-linear: linear;                             /* @kind other */

  --transition-fast:  all var(--duration-fast) var(--ease-out);    /* @kind other */
  --transition-base:  all var(--duration-base) var(--ease-out);    /* @kind other */
  --transition-slow:  all var(--duration-slow) var(--ease-out);    /* @kind other */
  --transition-colors: color var(--duration-base) var(--ease-out),
                       background-color var(--duration-base) var(--ease-out),
                       border-color var(--duration-base) var(--ease-out); /* @kind other */

  /* ── Borders ─────────────────────────────────────────── */
  --border-thin:   1px solid var(--color-border-default);
  --border-medium: 2px solid var(--color-border-strong);
  --border-thick:  4px solid var(--color-border-brand);

  /* ── Opacity ─────────────────────────────────────────── */
  --opacity-disabled: 0.42; /* @kind other */
  --opacity-muted:    0.65; /* @kind other */
  --opacity-hover:    0.88; /* @kind other */
}

/* ============================================================
   landing.css
   ============================================================ */
/* AMI Sleep Watch — Landing page styles
 * Built on the AMI Sleep Watch design system tokens.
 * Page-level layout only; components come from the DS bundle.
 */

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

html { scroll-behavior: smooth; scroll-padding-top: 84px; }

body {
  font-family: var(--font-sans);
  color: var(--color-text-primary);
  background: var(--color-surface-default);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }

/* ── Layout helpers ─────────────────────────────────── */
.wrap {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  width: 100%;
}
@media (max-width: 720px) { .wrap { padding: 0 var(--space-5); } }

.section { padding: var(--space-24) 0; }
.section--tight { padding: var(--space-16) 0; }
@media (max-width: 720px) { .section { padding: var(--space-16) 0; } }

.navy { background: var(--ami-navy-800); color: #fff; }
.subtle { background: var(--color-surface-subtle); }

/* ── Crimson ruled label (sell-sheet signature) ─────── */
.eyebrow {
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ami-red-700);
}
.ruled {
  display: flex;
  align-items: center;
  gap: 14px;
}
.ruled::after {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--ami-red-700);
  opacity: 0.55;
}
.ruled.center::before {
  content: '';
  flex: 1;
  height: 1.5px;
  background: var(--ami-red-700);
  opacity: 0.55;
}

/* Headings */
.serif { font-family: var(--font-serif); }
h1, h2, h3 { font-family: var(--font-serif); color: var(--ami-navy-800); letter-spacing: -0.02em; }

.section-title {
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-3xl);
  line-height: 1.15;
  color: var(--ami-navy-800);
  letter-spacing: -0.025em;
  text-wrap: balance;
  margin-top: 16px;
}
.section-lead {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  max-width: 640px;
  margin-top: 12px;
  text-wrap: pretty;
}

/* ═══════════════ NAV ═══════════════ */
.nav {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: color-mix(in srgb, var(--ami-navy-800) 92%, transparent);
  backdrop-filter: saturate(140%) blur(12px);
  -webkit-backdrop-filter: saturate(140%) blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.10);
  transition: background var(--duration-base) var(--ease-out);
}
.nav-inner {
  max-width: 1200px;
  margin: 0 auto;
  padding: 0 var(--space-8);
  height: 68px;
  display: flex;
  align-items: center;
  gap: var(--space-6);
}
.nav-logo { height: 30px; width: auto; filter: brightness(0) invert(1); }
.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-6);
  margin-left: var(--space-6);
}
.nav-link {
  font-size: var(--text-sm);
  font-weight: var(--weight-medium);
  color: rgba(255,255,255,0.78);
  letter-spacing: 0.01em;
  transition: color var(--duration-base) var(--ease-out);
}
.nav-link:hover { color: #fff; }
.nav-spacer { flex: 1; }
@media (max-width: 860px) { .nav-links { display: none; } }

/* ═══════════════ HERO ═══════════════ */
.hero {
  position: relative;
  display: grid;
  grid-template-columns: 1.02fr 0.98fr;
  min-height: min(760px, calc(100vh - 68px));
  background: var(--ami-navy-900);
  overflow: hidden;
  isolation: isolate;
}
/* Full-bleed dark cloud backdrop */
.hero-bg {
  position: absolute;
  inset: -60px 0;
  background: url('assets/hero-bg.png') center/cover no-repeat;
  z-index: 0;
  will-change: transform;
}
/* Darken the left so white copy stays legible; let the right (watch) breathe */
.hero-bg::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(100deg,
    rgba(8,22,44,0.86) 0%,
    rgba(8,22,44,0.62) 38%,
    rgba(8,22,44,0.22) 70%,
    rgba(8,22,44,0.05) 100%);
}

.hero-left {
  position: relative;
  z-index: 2;
  color: #fff;
  /* Left padding tracks the .wrap content edge (1200px column, centered). */
  padding: var(--space-16) clamp(24px, 4vw, 56px) var(--space-16)
           max(var(--space-8), calc(50vw - 600px + var(--space-8)));
  display: flex;
  flex-direction: column;
  justify-content: center;
  gap: var(--space-5);
}
.hero-eyebrow {
  font-size: var(--text-sm);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--ami-navy-200);
}
.hero-headline {
  font-family: var(--font-serif);
  font-size: clamp(2.3rem, 4.6vw, 3.6rem);
  font-weight: var(--weight-bold);
  line-height: 1.1;
  letter-spacing: -0.03em;
  color: #fff;
  text-wrap: balance;
  max-width: 16em;
}
.hero-headline .dot { color: var(--ami-red-700); }

/* Inline stat strip */
.hero-stats {
  display: flex;
  flex-wrap: nowrap;
  align-items: flex-start;
  margin-top: var(--space-3);
}
.hs-item {
  position: relative;
  padding: 1.35em var(--space-6) 0;
  border-left: 1px solid rgba(255,255,255,0.18);
}
.hs-item:first-child { padding-left: 0; border-left: none; }
.hs-pre {
  position: absolute;
  top: 0;
  left: var(--space-6);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-sm);
  color: var(--ami-navy-200);
}
.hs-item:first-child .hs-pre { left: 0; }
.hs-val {
  display: block;
  font-family: var(--font-serif);
  font-weight: var(--weight-bold);
  font-size: var(--text-2xl);
  line-height: 1.05;
  letter-spacing: -0.02em;
  color: #fff;
}
.hs-lab {
  display: block;
  max-width: 13ch;
  margin-top: 6px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.12em;
  line-height: 1.25;
  color: var(--ami-navy-200);
}
.hs-sub {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  color: rgba(255,255,255,0.62);
  margin-left: 8px;
}

/* Tagline with crimson rule mark (absolute, so the ® stays inline) */
.hero-tag {
  position: relative;
  padding-left: 46px;
  margin-top: var(--space-5);
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-md);
  line-height: 1.4;
  color: rgba(255,255,255,0.82);
  text-wrap: pretty;
  max-width: 34em;
}
.hero-tag::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0.72em;
  width: 30px;
  height: 2px;
  background: var(--ami-red-700);
}

/* FDA badge, pinned top-right of the hero */
.hero-fda {
  position: absolute;
  top: var(--space-6);
  right: clamp(24px, 4vw, 56px);
  z-index: 3;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  border: 1.5px solid var(--ami-red-700);
  padding: 8px 16px;
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: #fff;
  border-radius: var(--radius-full);
  background: rgba(8,22,44,0.35);
  backdrop-filter: blur(4px);
  white-space: nowrap;
}

.hero-right {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: center;
}
/* Wrapper carries the (JS) scroll-drift; the img carries the CSS idle float,
   so the float survives the no-JS export while parallax stays on the live site. */
.hero-watch-wrap {
  position: relative;
  z-index: 1;
  width: 108%;
  max-width: 680px;
  will-change: transform;
}
.hero-watch {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
  filter: drop-shadow(0 30px 60px rgba(4,10,24,0.55));
  animation: watch-float 6.5s ease-in-out infinite;
  will-change: transform, filter;
}
/* Gentle bob + sway, with the shadow lifting as the watch rises */
@keyframes watch-float {
  0%, 100% { transform: translateY(0) rotate(0deg); filter: drop-shadow(0 30px 60px rgba(4,10,24,0.55)); }
  50%      { transform: translateY(-16px) rotate(-1.3deg); filter: drop-shadow(0 48px 72px rgba(4,10,24,0.42)); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-watch { animation: none; }
}

@media (max-width: 860px) {
  .hero {
    grid-template-columns: 1fr;
    min-height: auto;
    overflow: visible;
  }
  .hero-right { min-height: 340px; order: -1; }
  .hero-watch-wrap { width: 84%; max-width: 440px; }
  .hero-left {
    justify-content: flex-start;
    padding: var(--space-12) var(--space-8) var(--space-14);
  }
  .hero-fda { top: var(--space-4); right: var(--space-6); }
}
@media (max-width: 720px) {
  .hero-left { padding-right: var(--space-5); padding-left: var(--space-5); }
  .hs-item { padding: 1.35em var(--space-4) 0; }
  .hs-pre { left: var(--space-4); }
  .hs-item:first-child .hs-pre { left: 0; }
}

@media (max-height: 760px) {
  .hero {
    min-height: auto;
    overflow: visible;
  }
  .hero-left {
    justify-content: flex-start;
    padding-top: var(--space-12);
    padding-bottom: var(--space-14);
  }
}

/* ═══════════════ STATS BAND ═══════════════ */
.stats-band { background: var(--color-surface-subtle); border-block: 1px solid var(--color-border-default); }
.stats-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-5);
  padding: var(--space-10) 0;
}
@media (max-width: 860px) { .stats-grid { grid-template-columns: 1fr; } }
@media (max-width: 460px) { .stats-grid { grid-template-columns: 1fr; } }

/* Stat cards: tie the text to the active colorway.
   MetricCard renders [label][value+unit][trend] divs inline-styled, so we
   override with !important. These vars switch automatically per colorway. */
.stat-card > div {
  transition: border-color 160ms var(--ease-out), box-shadow 160ms var(--ease-out), transform 160ms var(--ease-out);
}
/* First line (label) → accent (crimson / terracotta) */
.stat-card > div > div:first-child {
  color: var(--ami-red-700) !important;
}
/* Big value → brand navy (steel-blue in alt) */
.stat-card > div > div:nth-child(2) span:first-child {
  color: var(--ami-navy-800) !important;
}
/* Sub line → mid navy so it shifts with the colorway too */
.stat-card > div > div:nth-child(3) span {
  color: var(--ami-navy-600) !important;
}
/* Hover: lift + accent border */
.stat-card:hover > div {
  border-color: var(--ami-red-700) !important;
  box-shadow: var(--shadow-card-hover) !important;
  transform: translateY(-3px);
}

/* Buttons turn accent (crimson / terracotta) on hover + press.
   DS Button spreads style last, so we win with !important. */
.cta-btn:hover,
.cta-btn:focus-visible {
  background: var(--ami-red-700) !important;
  border-color: var(--ami-red-700) !important;
  color: #fff !important;
}
.cta-btn:active {
  background: var(--ami-red-800) !important;
  border-color: var(--ami-red-800) !important;
  color: #fff !important;
}
/* Nav demo button already sits accent — deepen it on hover */
.nav-cta:hover,
.nav-cta:focus-visible {
  background: var(--ami-red-800) !important;
  border-color: var(--ami-red-800) !important;
}
.nav-cta:active {
  background: var(--ami-red-900) !important;
  border-color: var(--ami-red-900) !important;
}

/* ═══════════════ WHY / PILLARS ═══════════════ */
.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-12);
}
@media (max-width: 980px) { .pillars { grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-6); } }
@media (max-width: 520px) { .pillars { grid-template-columns: 1fr; } }
.pillar { display: flex; flex-direction: column; gap: var(--space-3); }
.pillar-ic {
  width: 52px; height: 52px;
  border-radius: var(--radius-lg);
  background: var(--ami-navy-50);
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
}
.pillar-img {
  width: 34px; height: 34px;
  object-fit: contain;
}
.pillar-title {
  font-size: var(--text-md);
  font-weight: var(--weight-bold);
  color: var(--ami-navy-800);
  line-height: 1.3;
  letter-spacing: -0.01em;
}
.pillar-desc {
  font-size: var(--text-base);
  line-height: var(--leading-loose);
  color: var(--color-text-secondary);
  text-wrap: pretty;
}

/* ═══════════════ PLATFORM BAND ═══════════════ */
.platform {
  background: var(--ami-navy-800);
  position: relative;
  overflow: hidden;
}
.platform::before {
  content: '';
  position: absolute;
  inset: 0;
  background: url('assets/night-sky.png') center/cover no-repeat;
  opacity: 0.30;
}
.platform-inner {
  position: relative;
  display: grid;
  grid-template-columns: 0.9fr 1.1fr;
  gap: var(--space-16);
  align-items: center;
  padding: var(--space-20) 0;
}
.platform-kicker {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: var(--text-4xl);
  line-height: 1.2;
  color: #fff;
  letter-spacing: -0.01em;
  text-wrap: balance;
}
.platform-copy {
  font-size: var(--text-md);
  line-height: var(--leading-loose);
  color: rgba(255,255,255,0.82);
  text-wrap: pretty;
}
.platform-copy a { color: #fff; font-weight: var(--weight-semibold); border-bottom: 1.5px solid var(--ami-red-700); padding-bottom: 1px; }
@media (max-width: 860px) {
  .platform-inner { grid-template-columns: 1fr; gap: var(--space-8); padding: var(--space-12) 0; }
  .platform-kicker { font-size: var(--text-3xl); }
}

/* ═══════════════ WORKFLOWS ═══════════════ */
.wf-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: var(--space-10) var(--space-16);
  margin-top: var(--space-12);
}
@media (max-width: 720px) { .wf-grid { grid-template-columns: 1fr; gap: var(--space-8); } }
.wf-item { display: flex; gap: var(--space-4); }
.wf-num {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--ami-red-700);
  padding-top: 3px;
  flex-shrink: 0;
}
.wf-title {
  font-size: var(--text-lg);
  font-weight: var(--weight-bold);
  color: var(--ami-navy-800);
  margin-bottom: 6px;
  letter-spacing: -0.01em;
}
.wf-desc { font-size: var(--text-base); line-height: var(--leading-loose); color: var(--color-text-secondary); text-wrap: pretty; }

/* ═══════════════ DEPLOYMENT ═══════════════ */
.deploy-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: var(--space-5);
  margin-top: var(--space-12);
}
@media (max-width: 920px) { .deploy-grid { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 480px) { .deploy-grid { grid-template-columns: 1fr; } }
.d-card {
  background: var(--color-surface-default);
  border: 1px solid var(--color-border-default);
  border-top: 3px solid var(--ami-navy-800);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  box-shadow: var(--shadow-card);
  transition: box-shadow var(--duration-base) var(--ease-out), transform var(--duration-base) var(--ease-out), border-top-color var(--duration-base) var(--ease-out);
}
.d-card:hover { box-shadow: var(--shadow-card-hover); transform: translateY(-3px); border-top-color: var(--ami-red-700); }
.d-card-ic { color: var(--ami-navy-800); }
.d-card-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  color: var(--ami-navy-800);
  text-transform: uppercase;
  letter-spacing: 0.1em;
}
.d-card-desc { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--color-text-secondary); }

.cont-row {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--space-8);
  margin-top: var(--space-10);
  padding-top: var(--space-10);
  border-top: 1px solid var(--color-border-default);
}
@media (max-width: 720px) { .cont-row { grid-template-columns: 1fr; gap: var(--space-6); } }
.cont-item { display: flex; gap: var(--space-3); align-items: flex-start; }
.cont-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ami-red-700); flex-shrink: 0; margin-top: 7px; }
.cont-title { font-weight: var(--weight-bold); color: var(--ami-navy-800); font-size: var(--text-base); margin-bottom: 3px; }
.cont-desc { font-size: var(--text-sm); line-height: var(--leading-normal); color: var(--color-text-secondary); }

/* Deployment lead should sit on one line on desktop */
#deployment .section-lead { max-width: 900px; }

/* ═══════════════ SPECS ═══════════════ */
.spec-wrap { margin-top: var(--space-12); display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-8) var(--space-12); }
@media (max-width: 820px) { .spec-wrap { grid-template-columns: 1fr; } }
.spec-group { }
.spec-group-title {
  font-size: var(--text-xs);
  font-weight: var(--weight-bold);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: #fff;
  background: var(--ami-navy-800);
  padding: 8px 14px;
  border-radius: var(--radius-sm);
  margin-bottom: var(--space-2);
}
.spec-rows { padding: 0 2px; }
.spec-row {
  display: grid;
  grid-template-columns: 0.8fr 1.2fr;
  gap: var(--space-4);
  padding: 11px 12px;
  border-bottom: 1px solid var(--color-border-default);
  align-items: baseline;
}
.spec-row:nth-child(odd) { background: rgba(27,42,74,0.025); }
.spec-k {
  font-size: var(--text-sm);
  font-weight: var(--weight-semibold);
  color: var(--ami-navy-800);
  line-height: 1.4;
}
.spec-v {
  font-family: var(--font-mono);
  font-size: var(--text-sm);
  line-height: 1.5;
  color: var(--color-text-secondary);
  text-wrap: pretty;
}
@media (max-width: 460px) {
  .spec-row { grid-template-columns: 1fr; gap: 2px; }
}

/* ═══════════════ CTA ═══════════════ */
.cta {
  background: var(--ami-navy-800);
  position: relative;
  overflow: hidden;
  text-align: center;
}
.cta::before {
  content: '';
  position: absolute; inset: 0;
  background: url('assets/night-sky.png') center/cover no-repeat;
  opacity: 0.34;
}
.cta-inner { position: relative; padding: var(--space-24) 0; display: flex; flex-direction: column; align-items: center; gap: var(--space-6); }
.cta-title {
  font-family: var(--font-serif);
  font-size: var(--text-4xl);
  font-weight: var(--weight-bold);
  color: #fff;
  letter-spacing: -0.02em;
  line-height: 1.15;
  text-wrap: balance;
  max-width: 16em;
}
.cta-sub { font-size: var(--text-md); color: rgba(255,255,255,0.80); max-width: 38em; line-height: var(--leading-loose); }
.cta-ctas { display: flex; flex-wrap: wrap; gap: var(--space-4); justify-content: center; margin-top: var(--space-2); }
.cta-email {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: center;
  gap: var(--space-3);
  margin-top: var(--space-2);
}
.cta-email-label { font-size: var(--text-md); color: rgba(255,255,255,0.85); }
.cta-email-link {
  font-family: var(--font-mono);
  font-size: var(--text-lg);
  font-weight: var(--weight-semibold);
  color: #fff;
  border-bottom: 2px solid var(--ami-red-700);
  padding-bottom: 2px;
  transition: color var(--duration-base) var(--ease-out), border-color var(--duration-base) var(--ease-out);
}
.cta-email-link:hover { color: var(--ami-red-700); }
.cta-tag { font-family: var(--font-serif); font-style: italic; font-size: var(--text-md); color: rgba(255,255,255,0.7); margin-top: var(--space-4); }

/* ═══════════════ FOOTER ═══════════════ */
.footer { background: var(--ami-navy-950); color: rgba(255,255,255,0.7); }
.footer-inner { padding: var(--space-12) 0 var(--space-10); display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: var(--space-10); }
@media (max-width: 720px) { .footer-inner { grid-template-columns: 1fr; gap: var(--space-8); } }
.footer-logo { height: 90px; width: auto; margin-bottom: var(--space-4); filter: brightness(0) invert(1); }
.footer-blurb { font-size: var(--text-sm); line-height: var(--leading-loose); color: rgba(255,255,255,0.55); max-width: 30em; }
.footer-col-title { font-size: var(--text-xs); font-weight: var(--weight-bold); text-transform: uppercase; letter-spacing: 0.14em; color: rgba(255,255,255,0.85); margin-bottom: var(--space-4); }
.footer-link { display: block; font-size: var(--text-sm); color: rgba(255,255,255,0.65); padding: 5px 0; transition: color var(--duration-base) var(--ease-out); }
.footer-link:hover { color: #fff; }
.footer-bottom { border-top: 1px solid rgba(255,255,255,0.12); padding: var(--space-6) 0; display: flex; justify-content: space-between; gap: var(--space-4); flex-wrap: wrap; }
.footer-legal { font-size: var(--text-xs); line-height: var(--leading-normal); color: rgba(255,255,255,0.42); max-width: 60em; }

/* ═══════════════ SCROLL REVEAL ═══════════════ */
/* CSS-only load fade-in (this export ships no JavaScript) */
@media (prefers-reduced-motion: no-preference) {
  .reveal { opacity: 0; animation: reveal-in 0.7s var(--ease-out) both; }
  /* Hero copy cascades in */
  .hero-left .reveal:nth-child(1) { animation-delay: 0ms; }
  .hero-left .reveal:nth-child(2) { animation-delay: 90ms; }
  .hero-left .reveal:nth-child(3) { animation-delay: 180ms; }
  .hero-left .reveal:nth-child(4) { animation-delay: 270ms; }
}
@keyframes reveal-in {
  from { opacity: 0; transform: translateY(22px); }
  to   { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; }
}

/* ═══════════════ ALT COLORWAY (Terracotta / Steel-blue) ═══════════════ */
/* Toggled via Tweaks — remaps the navy + crimson brand primitives so the
   whole page (DS components included) shifts without touching markup. */
:root[data-colorway="alt"] {
  /* Steel-blue navy scale — primary #235789, footer #12406b */
  --ami-navy-950: #12406b;
  --ami-navy-900: #1a4d7c;
  --ami-navy-800: #235789;
  --ami-navy-700: #2a6498;
  --ami-navy-600: #3070a3;
  --ami-navy-500: #4082b5;
  --ami-navy-200: #b4cfe2;
  --ami-navy-100: #d6e6f1;
  --ami-navy-50:  #eaf3f9;

  /* Terracotta accent scale — primary #de5a39 */
  --ami-red-900: #9c3a22;
  --ami-red-800: #c24a2c;
  --ami-red-700: #de5a39;
  --ami-red-600: #e56e4f;
  --ami-red-500: #ea8369;
  --ami-red-100: #fbe3da;
  --ami-red-50:  #fef4f0;
}

/* ============================================================
   site.css
   ============================================================ */
/* AMI Sleep Watch — Component styles
 * Plain-CSS reimplementation of the design-system primitives
 * (Button, Badge, MetricCard) that the prototype rendered with inline styles,
 * plus the live colorway switcher. Loaded after landing.css so the page-level
 * hover overrides in landing.css continue to win.
 */

/* Registered-trademark superscript (DS R() helper) */
sup.r { font-size: 0.5em; line-height: 0; vertical-align: super; }

/* ── Button (DS core/Button.jsx) ─────────────────────── */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.01em;
  border-radius: var(--radius-md);
  border: 1.5px solid transparent;
  cursor: pointer;
  transition: background-color 160ms ease, border-color 160ms ease, color 160ms ease, box-shadow 160ms ease;
  text-decoration: none;
  white-space: nowrap;
  user-select: none;
  outline: none;
}
.btn:focus-visible { box-shadow: var(--shadow-focus); }

.btn--sm { font-size: var(--text-sm);   height: var(--height-sm); padding: 0 12px; }
.btn--md { font-size: var(--text-base); height: var(--height-md); padding: 0 16px; }
.btn--lg { font-size: var(--text-md);   height: var(--height-lg); padding: 0 24px; }

.btn--primary { background: var(--ami-navy-800); border-color: var(--ami-navy-800); color: #fff; }
.btn--primary:hover { background: var(--ami-navy-700); border-color: var(--ami-navy-700); }
.btn--primary:active { background: var(--ami-navy-900); border-color: var(--ami-navy-900); }

.btn--secondary { background: var(--ami-white); border-color: var(--ami-navy-800); color: var(--ami-navy-800); }
.btn--secondary:hover { background: var(--ami-navy-50); border-color: var(--ami-navy-700); }
.btn--secondary:active { background: var(--ami-navy-100); border-color: var(--ami-navy-900); }

.btn--danger { background: var(--ami-red-700); border-color: var(--ami-red-700); color: #fff; }
.btn--danger:hover { background: var(--ami-red-800); border-color: var(--ami-red-800); }
.btn--danger:active { background: var(--ami-red-900); border-color: var(--ami-red-900); }

/* On-dark outline variant used in the closing CTA */
.btn--ondark-outline { background: transparent; border-color: rgba(255,255,255,0.6); color: #fff; }

/* ── Badge (DS core/Badge.jsx) ───────────────────────── */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: var(--font-sans);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
  font-size: var(--text-xs);
  height: 24px;
  padding: 0 10px;
  border-radius: 12px;
}
.badge--outline { background: transparent; color: var(--ami-navy-800); border: 1.5px solid var(--ami-navy-800); }
.badge--ondark { color: #fff; border-color: rgba(255,255,255,0.5); }

/* ── MetricCard (DS data/MetricCard.jsx) ─────────────── */
/* DOM mirrors the prototype so landing.css's .stat-card overrides still apply:
   .metric-card > [label] > [value-row] > [trend-row] */
.metric-card {
  background: var(--color-surface-default);
  border: 1px solid var(--color-border-subtle);
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-card);
  padding: 14px 18px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-family: var(--font-sans);
}
.metric-card > .mc-label {
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-widest);
  text-transform: uppercase;
  color: var(--color-text-tertiary);
}
.metric-card > .mc-value {
  display: flex;
  align-items: baseline;
  gap: 4px;
}
.metric-card > .mc-value > span:first-child {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: var(--weight-bold);
  line-height: var(--leading-tight);
  letter-spacing: var(--tracking-tight);
  color: var(--color-text-primary);
}
.metric-card > .mc-trend {
  display: flex;
  align-items: center;
  gap: 4px;
}
.metric-card > .mc-trend > span {
  font-size: var(--text-sm);
  color: var(--ami-gray-500);
  font-family: var(--font-mono);
  font-weight: var(--weight-medium);
}

/* Deployment "Coming soon" footnote */
.deploy-note {
  margin-top: var(--space-4);
  font-family: var(--font-sans);
  font-size: var(--text-xs);
  color: var(--color-text-tertiary);
  letter-spacing: 0.02em;
}
