/* ===== Core ===== */
* { box-sizing: border-box; }
html, body { height: 100%; }
html {
  font-family: "Inter", -apple-system, BlinkMacSystemFont, sans-serif;
  /* scroll-behavior: smooth; - handled by JavaScript for better control */
  scrollbar-gutter: stable;
}
body {
  margin:0;
  font-family:Sora, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial;
  color:#0b1020; background:#fff; line-height:1.55;
  -webkit-font-smoothing:antialiased; text-rendering:optimizeLegibility;
  padding-top: var(--dock-offset);
}

/* iOS Safari color rendering fix */
@supports (-webkit-touch-callout: none) {
  body {
    color-scheme: light;
    -webkit-user-select: none;
    user-select: none;
  }
  * {
    -webkit-user-select: text;
    user-select: text;
  }
  
  /* Fix navbar backdrop-filter causing gray tint on iOS */
  header.dock {
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    background: rgba(255,255,255,0.95) !important;
  }
}

/* ===== Legal pages (privacy, terms) ===== */
body.legal .parallax-bg{ display:none; }
body.legal .section{ padding: 0; }

.legal-main{ padding: clamp(44px, 8vw, 86px) 0; }
.legal-container{ width:min(1100px, calc(100% - 40px)); margin-inline:auto; }
.legal-header{ padding-left: 320px; }
.legal-header .section-title{ margin:.15em 0 .05em 0; text-align:left; text-transform:lowercase; }
.legal-header .legal-pill{ margin: 6px 0 6px; display:inline-block; }
.legal-meta{ text-align:left; color:#4b5c84; margin-bottom: 8px; }
.legal-summary{ text-align:left; color:#243152; max-width: 70ch; margin: 8px 0 36px; line-height:1.75; font-size: clamp(16px, 1.6vw, 18px); }
body.legal .legal-container a{ color:#1e3a8a; text-decoration:none; }
body.legal .legal-container a:visited{ color:#1e3a8a; }
body.legal .legal-container a:hover{ text-decoration:underline; text-underline-offset:2px; }
@media (max-width: 980px){
  .legal-header{ padding-left: 0; }
  .legal-header .section-title, .legal-summary, .legal-meta{ text-align:center; }
  .legal-header .legal-pill{ margin-inline:auto; }
}

.legal-toc{ border:1px solid var(--line); border-radius:16px; background:#fff; box-shadow: 0 16px 34px rgba(10,20,50,.12); padding:14px 16px; position:sticky; top: calc(var(--dock-offset) + 12px); }
.legal-toc .toc-title{ display:none !important; } /* remove “on this page” legends site-wide */
.legal-toc ul{ margin:0; padding:0; list-style: none; }
.legal-toc li{ margin:6px 0; }
.legal-toc a{ color:#0e152a; text-decoration:none; text-transform:lowercase; display:block; padding:6px 8px; border-radius:10px; }
.legal-toc a:hover{ text-decoration:underline; }
.legal-toc a.active{ color:#1e3a8a; font-weight:800; text-decoration:none; background: rgba(37,99,235,.06); }
@media (max-width: 640px){ .legal-toc{ position:static; } }

.legal-container h2{ font-size: clamp(22px, 2.6vw, 28px); margin:34px 0 12px; letter-spacing:-.1px; text-transform:lowercase; }
.legal-container section{ scroll-margin-top: calc(var(--dock-offset) + 12px); }
.legal-container p{ margin:12px 0; color:#1b2544; line-height:1.7; }
.legal-container ul{ margin:10px 0; padding: 0; list-style: none; }
.legal-container li{ margin:6px 0; }
.legal-footnote{ color:#4b5c84; }

/* Two-column legal layout */
.legal-layout{ display:grid; grid-template-columns: 280px 1fr; gap:40px; align-items:start; }
.legal-aside{ align-self:start; height: fit-content; margin-left:0; }
.legal-content{ min-width:0; max-width: 72ch; }
@media (max-width: 980px){
  .legal-layout{ grid-template-columns: 1fr; gap:22px; }
  .legal-aside{ position: static; }
}

/* ===== Tokens ===== */
:root{
  --ink:#0b1020; --muted:#4b5c84; --line:#e6ebff;
  --brand:#1e3a8a; --brand-accent:#2563eb; --accent-2:#60a5fa;

  --shadow-lg: 0 18px 42px rgba(10,20,50,.18);
  --shadow-md: 0 12px 28px rgba(10,20,50,.14);

  --radius-lg: 26px; --radius-md: 16px;
  --dock-offset: 72px;

  --dock-alpha: .04; --dock-blur: 22px;
  --hx: 60%; --hy: 0%;

  --pad-mobile: clamp(16px, 4.6vw, 22px);

  --intro-hold: 240ms;
  --intro-curtain: 2000ms;
  --intro-copy-dur: 1250ms;
  --intro-copy-delay: 120ms;
  --intro-fill-dur: 1400ms;
  --intro-fill-delay: calc(var(--intro-copy-delay) + var(--intro-copy-dur) + 660ms);
}

/* Containers & sections */
.container{ width:min(1100px, calc(100% - 40px)); margin-inline:auto; }
.container.narrow{ width:min(960px, calc(100% - 40px)); }
.section{ padding: clamp(72px, 10vw, 120px) 0; scroll-margin-top: calc(var(--dock-offset) + 14px); }
.section--center .container{ text-align:center; }

/* ===== Header links ===== */
header.dock a { text-decoration:none; color:#0e152a; font-weight:700; }
header.dock a:visited { color:#0e152a; }

/* ===== Cinematic Intro ===== */
#intro{ position:fixed; inset:0; z-index:999; background:#fff; overflow:hidden; display:grid; place-items:center; opacity:1; transition: opacity 1.2s ease; will-change: opacity; }
#intro.fade-out{ opacity:0; pointer-events:none; }
#intro.hidden{ display:none; }

.intro-grid{
  position:absolute; inset:0;
  background:
    radial-gradient(1200px 600px at 50% -10%, rgba(96,165,250,.28), transparent 60%),
    repeating-linear-gradient(to right, rgba(218,228,255,.6) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(to bottom, rgba(218,228,255,.6) 0 1px, transparent 1px 28px),
    linear-gradient(#ffffff, #ffffff);
  animation: gridFloat 1.8s ease-out both;
  transform-origin: 50% 0;
}
@keyframes gridFloat { from{ transform: translateY(-14px);} to{ transform: translateY(0);} }

@keyframes copyZoomFade {
  0% { opacity: 1; transform: scale(1) translateZ(0); filter: blur(0); }
  50% { opacity: 1; transform: scale(1.8) translateZ(0); filter: blur(4px); }
  85% { opacity: 0.6; transform: scale(3.2) translateZ(0); filter: blur(10px); }
  100% { opacity: 0; transform: scale(4.2) translateZ(0); filter: blur(18px); }
}

.intro-spark{
  position:absolute; inset:0 0 auto 0; height:55%;
  background: radial-gradient(80% 100% at 50% 0%, rgba(37,99,235,.25), transparent);
  filter: blur(10px); animation: sparkIn 1.2s .1s ease both;
}
@keyframes sparkIn{ from{ opacity:.1;} to{ opacity:.7;} }

.intro-copy{
  text-align:center;
  animation: copyShootIn var(--intro-copy-dur) var(--intro-copy-delay) cubic-bezier(.0,.0,.12,1) both,
             copyZoomFade var(--intro-fill-dur) var(--intro-fill-delay) cubic-bezier(.07,0,.6,1) forwards;
  will-change: transform, opacity, filter; backface-visibility: hidden; transform: translateZ(0);
}
@keyframes copyShootIn{
  0%   { opacity: 0; transform: translate3d(0,24px,0) scale(.36); filter: blur(10px); }
  100% { opacity: 1; transform: translate3d(0,0,0) scale(1); filter: blur(0); }
}
.i-top{ display:block; font-weight:700; letter-spacing:.3px; text-transform:lowercase; color:#4b5c84; }
.i-title{ margin:.15em 0; font-weight:800; letter-spacing:-.3px; font-size: clamp(48px, 10vw, 120px); }
.i-sub{ color:#1f2b4a; text-transform:lowercase; }
.i-sub b{ background: linear-gradient(90deg, var(--brand), var(--accent-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }

.intro-curtain{
  position:absolute; inset:0; background:
    radial-gradient(1200px 600px at 50% 110%, rgba(96,165,250,.25), transparent 60%),
    linear-gradient(180deg, #ffffff, #ffffff);
  animation: curtainQuickFade calc(var(--intro-curtain) * 0.85) calc(var(--intro-hold)) cubic-bezier(.12,.0,.18,1) forwards;
  transform-origin: 50% 50%; will-change: opacity, transform; backface-visibility: hidden; transform: translateZ(0);
}
@keyframes curtainQuickFade {
  0%   { opacity: 1; transform: scale(1); }
  55%  { opacity: 0; transform: scale(1.025); }
  100% { opacity: 0; transform: scale(1.03); }
}

/* ===== Parallax BG ===== */
.parallax-bg{
  position: fixed; inset:0; z-index:-1; pointer-events:none;
  --px:50%; --py:50%;
  background:
    radial-gradient(800px 800px at var(--px) var(--py), rgba(96,165,250,.14), transparent 60%),
    radial-gradient(1000px 1000px at calc(100% - var(--px)) calc(100% - var(--py)), rgba(37,99,235,.10), transparent 65%),
    repeating-linear-gradient(to right, rgba(218,228,255,.55) 0 1px, transparent 1px 28px),
    repeating-linear-gradient(to bottom, rgba(218,228,255,.55) 0 1px, transparent 1px 28px),
    linear-gradient(#ffffff, #ffffff);
}

/* ===== Liquid Dock ===== */
header.dock{
  position:fixed; inset:0 0 auto 0; z-index:50; width:100%;
  background:
    linear-gradient(180deg, rgba(255,255,255,calc(var(--dock-alpha))) 0%, rgba(255,255,255,calc(var(--dock-alpha) * .55)) 100%),
    linear-gradient(180deg, rgba(10,20,50,.04), rgba(10,20,50,0));
  backdrop-filter: blur(var(--dock-blur)) saturate(175%);
  -webkit-backdrop-filter: blur(var(--dock-blur)) saturate(175%);
  border-bottom: 1px solid rgba(14,21,42,.08);
  transition: transform .35s ease, background .35s ease, backdrop-filter .35s ease;
}
/* iOS Safari backdrop-filter fix */
@supports (-webkit-touch-callout: none) {
  header.dock {
    backdrop-filter: blur(var(--dock-blur));
    -webkit-backdrop-filter: blur(var(--dock-blur));
  }
}
.safe-area-spacer{ height: env(safe-area-inset-top); }
.dock__inner{
  display:grid; grid-template-columns: 1fr auto 1fr; align-items:center; gap:16px;
  width:min(1100px, calc(100% - 40px)); margin-inline:auto; height:64px;
}
.nav-toggle{ display:none; appearance:none; border:none; background:transparent; font-size:22px; padding:6px 10px; border-radius:10px; cursor:pointer; }
.dock__group{ display:flex; align-items:center; gap:14px; }
.dock__left{ justify-self:start; } .dock__right{ justify-self:end; }

/* Mobile menu */
.mobile-menu{ 
  position:absolute; top:100%; left:0; right:0; 
  background: #fff; border-top:1px solid rgba(14,21,42,.06); 
  box-shadow: 0 12px 30px rgba(10,20,50,.08); padding:12px 16px;
  z-index: 49; /* Below the navbar (z-index: 50) */
  
  /* Curtain animation - smooth both directions */
  max-height: 0; opacity: 0; visibility: hidden;
  transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              padding 0.5s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0s 0.5s;
  overflow: hidden;
  padding-top: 0;
  padding-bottom: 0;
}
.mobile-menu.open{ 
  max-height: 300px; /* Enough for all menu items */
  opacity: 1; visibility: visible;
  padding-top: 12px;
  padding-bottom: 12px;
  transition: max-height 0.5s cubic-bezier(0.25, 0.8, 0.25, 1), 
              opacity 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              padding 0.4s cubic-bezier(0.25, 0.8, 0.25, 1),
              visibility 0s 0s;
}
.mobile-menu .mobile-link{ 
  display:block; padding:10px 0; color:#0e152a; text-decoration:none; 
  opacity: 0; transform: translateY(-8px);
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
.mobile-menu.open .mobile-link{ 
  opacity: 1; transform: translateY(0);
  transition: opacity 0.3s cubic-bezier(0.25, 0.8, 0.25, 1), 
              transform 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}
/* Stagger the link animations for opening */
.mobile-menu.open .mobile-link:nth-child(1) { transition-delay: 0.15s; }
.mobile-menu.open .mobile-link:nth-child(2) { transition-delay: 0.2s; }
.mobile-menu.open .mobile-link:nth-child(3) { transition-delay: 0.25s; }
.mobile-menu.open .mobile-link:nth-child(4) { transition-delay: 0.3s; }
/* Reverse stagger for closing - links disappear in reverse order */
.mobile-menu .mobile-link:nth-child(4) { transition-delay: 0.05s; }
.mobile-menu .mobile-link:nth-child(3) { transition-delay: 0.1s; }
.mobile-menu .mobile-link:nth-child(2) { transition-delay: 0.15s; }
.mobile-menu .mobile-link:nth-child(1) { transition-delay: 0.2s; }

@media (max-width: 920px){

  /* absolute centering for brand + hamburger on mobile to ensure brand sits ON the bar */
  .dock__inner{ position: relative; }
  .dock__brand{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    height: auto; display: inline-flex; align-items: center;
  }
  .nav-toggle{
    position: absolute;
    right: 8px; top: 50%;
    transform: translateY(-50%);
    padding-right: 6px;
  }

  /* mobile dock offset fix */
  :root{ --dock-offset: 60px; }

  /* move hamburger to the RIGHT, mirroring original left placement */
  .nav-toggle{
    display:inline-flex;
    grid-column: 3;        /* was 1 */
    justify-self: end;     /* was start */
    padding-right: 10px;   /* mirrors original visual inset */
    align-self: stretch;   /* fill header height for perfect centering */
    align-items: center;
  }
  .dock__left, .dock__right{ display:none; }
  .dock__brand{ grid-column:2; justify-self:center; display:flex; align-items:center; height:60px; }
  .dock__inner{ height:60px; }

  /* Make navbar opaque on mobile */
  header.dock {
    background: #ffffff !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    border-bottom: 1px solid rgba(14,21,42,.12);
  }
}

.brand-text{
  font-weight:800; letter-spacing:-.2px; font-size: clamp(22px, 6vw, 30px);
  text-transform:lowercase; color:#0e152a;
}

.dock__liquid{
  position:absolute; inset:-1px 0 0 0; pointer-events:none; z-index:1;
  background:
    paint(liquid-noise),
    radial-gradient(380px 120px at var(--hx) calc(-18% + var(--hy)), rgba(255,255,255,.28), rgba(255,255,255,0) 65%),
    radial-gradient(520px 200px at var(--hx) calc(120% + var(--hy)), rgba(255,255,255,.18), rgba(255,255,255,0) 70%);
  mix-blend-mode: soft-light; opacity: var(--dock-alpha);
  -webkit-mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,.35) 80%, rgba(0,0,0,0) 100%);
          mask-image: linear-gradient(to bottom, rgba(0,0,0,1) 50%, rgba(0,0,0,.35) 80%, rgba(0,0,0,0) 100%);
}

/* ===== Hero ===== */
.hero{ position:relative; }
.hero-grid{ display:grid; grid-template-columns:1fr; align-items:center; justify-items:center; gap:22px; min-height:70vh; }
@supports (height: 100dvh) { .hero-grid{ min-height: 80dvh; } }
.hero-copy{ position:relative; z-index:2; text-align:center; max-width:920px; padding: 0 4px; }
.headline{ font-weight:800; letter-spacing:-0.2px; font-size: clamp(34px, 7.5vw, 86px); line-height:1.05; margin:0 0 12px 0; color:#0b1020; }
.headline .gradient{ background:linear-gradient(90deg, var(--brand), var(--accent-2)); -webkit-background-clip:text; background-clip:text; color:transparent; }
.subhead{ font-size: clamp(17px, 4vw, 22px); color: var(--muted); margin: 0 0 20px 0; min-height:1.4em; }
.typed::after{ content:""; display:inline-block; width:2px; height:1em; margin-left:4px; vertical-align:bottom; background: currentColor; animation: blink .9s steps(1,end) infinite; }
@keyframes blink{ 50%{ opacity:0; } }

.cta-row{ display:flex; gap:12px; flex-wrap:wrap; justify-content:center; margin:18px 0; }
/* compact spacing now that the pills are gone */
.hero .cta-row { margin-bottom: 6px; }
@media (max-width: 820px){
  .hero .cta-row { margin-bottom: 2px; }
}

/* ===== Buttons ===== */
.btn[disabled]{ opacity:.6; filter:saturate(.6) brightness(.98); cursor:not-allowed; box-shadow:none; }
.btn{
  --bg: var(--brand-accent); --bg2: var(--accent-2);
  display:inline-flex; align-items:center; justify-content:center; gap:8px;
  padding: 16px 24px; border-radius:999px; font-weight:800; letter-spacing:.2px;
  border:0; cursor:pointer; text-decoration:none; transition: transform .06s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: 0 8px 18px rgba(37,99,235,.18);
  background: linear-gradient(90deg, var(--bg), var(--bg2)); color:#fff; text-transform:lowercase;
  font-size: 15px;
}
.btn:hover{ transform: translateY(-1px); box-shadow: 0 10px 22px rgba(37,99,235,.22); }
.btn--ghost{
  background: rgba(255,255,255,.9); color: var(--ink); border: 1px solid var(--line);
  box-shadow: 0 8px 18px rgba(12,22,48,.12); /* consistent elevation next to gradient CTA */
}
/* nav bar CTA identical to hero gradient on desktop; white text with better pill shape */
.dock__right .btn.btn--ghost{ 
  background: linear-gradient(90deg, var(--brand-accent), var(--accent-2)); 
  color:#fff; border:0; box-shadow: 0 8px 18px rgba(37,99,235,.18); 
  padding: 12px 20px; border-radius:999px; font-size: 14px;
}

/* ===== Sections ===== */
.section-title{ font-weight:800; font-size: clamp(26px, 6vw, 48px); margin:0 0 16px 0; color:#0b1020; text-transform:lowercase; }
.section-title.mega{ font-size: clamp(28px, 7vw, 56px); }

/* ===== Cards/tiles (Features) ===== */
.feature-tiles{ display:grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 18px 22px; grid-auto-rows: 1fr; }
.feature-tile{ 
  border:1px solid var(--line); border-radius: 18px; padding:18px 20px; 
  background:#fff; box-shadow: var(--shadow-md); text-align:left; 
  display:flex; flex-direction:column;
}
.feature-tile h3{
  margin: 0 0 6px;
  font-weight: 800;
  letter-spacing: -0.2px;
  font-size: clamp(18px, 1.6vw, 20px);
}
.feature-tile p{
  margin: 0;
  color:#3b4b76;
  line-height: 1.55;
}
@media (hover:hover){
  .feature-tile{ transition: transform .18s ease, box-shadow .18s ease; }
  .feature-tile:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10,20,50,.16); }
}
@media (max-width: 960px){ .feature-tiles{ grid-template-columns:1fr; } }

/* Reveal stagger for features */
.feature-tile.reveal{ transform: translateY(10px) scale(.995); }
.feature-tile.reveal.in{ transform: translateY(0) scale(1); }
.feature-tile.reveal:nth-child(1){ transition-delay: .02s; }
.feature-tile.reveal:nth-child(2){ transition-delay: .06s; }
.feature-tile.reveal:nth-child(3){ transition-delay: .10s; }
.feature-tile.reveal:nth-child(4){ transition-delay: .14s; }

/* ===== How it works ===== */
.timeline{ position:relative; display:grid; gap:42px; justify-items:center; }
.timeline::before{
  content:"";
  position:absolute;
  top: 28px;
  bottom: 28px;
  left: 50%;
  width: 4px;
  transform: translateX(-50%);
  background: linear-gradient(var(--brand-accent), var(--accent-2));
  opacity:.22;
  border-radius:999px;
  filter: blur(.2px);
}
/* Remove any previous connector pseudo-elements if present */
.t-line{ display: none; }
.t-card{ 
  width:min(760px, 100%); position:relative; background:#fff; border:1px solid var(--line); 
  border-radius: 18px; padding:20px; box-shadow: var(--shadow-md); text-align:left; 
  z-index:1;
}
.t-card h3{ margin:0 0 6px; font-weight:800; letter-spacing:-.2px; }
.t-card p{ margin:0; color:#3b4b76; line-height:1.55; }
.t-badge{ 
  position:absolute; left:50%; transform: translate(-50%,-50%); top:0; background:#fff; 
  border:1px solid var(--line); border-radius:999px; padding:8px 12px; font-weight:900; font-size:14px; letter-spacing:.2px;
  box-shadow: 0 12px 24px rgba(10,20,50,.14); 
}
@media (hover:hover){
  .t-card{ transition: transform .18s ease, box-shadow .18s ease; }
  .t-card:hover{ transform: translateY(-2px); box-shadow: 0 16px 36px rgba(10,20,50,.16); }
}
@media (max-width:820px){
  .timeline{ gap:28px; }
  .timeline::before{ width:3px; opacity:.18; top:22px; bottom:22px; }
  .t-card{ padding:16px; border-radius:16px; }
  .t-badge{ padding:7px 11px; font-size:13px; }
}

/* ===== Privacy (safety rows) ===== */
#privacy .container{ max-width:1050px; }
.privacy-card{
  position:relative; margin:auto; padding: clamp(20px, 3.2vw, 30px); border-radius: 28px;
  background: linear-gradient(180deg, rgba(255,255,255,.95), rgba(255,255,255,.86));
  border:1px solid rgba(210,220,255,.85);
  box-shadow: 0 14px 34px rgba(10,20,50,.10), inset 0 1px 0 rgba(255,255,255,.92);
}
.safety-list{ display:grid; gap:18px; padding-left: clamp(44px, 5vw, 64px); position:relative; }
.safety-item{
  display:grid; grid-template-columns: 36px 1fr; align-items:center; gap:12px;
  background: linear-gradient(180deg, #fff, #f7fbff);
  border:1px solid var(--line); border-radius: 18px; padding:14px 18px; box-shadow: 0 10px 24px rgba(10,20,50,.10);
  text-align:left; position:relative; z-index:1; min-height:76px;
}
.s-icon{ display:grid; place-items:center; width:36px; height:36px; border-radius:12px; color:#1e3a8a;
  background: radial-gradient(60% 80% at 50% 0%, rgba(96,165,250,.22), transparent), rgba(232,240,255,.85);
  border:1px solid rgba(210,220,255,0.95);
}
.safety-item p{ margin:0; font-size: clamp(1.05rem, 1.2vw + .5rem, 1.25rem); line-height:1.5; color:#1b2544; }
.safety-rail{
  position:absolute; left: clamp(16px, 2vw, 20px); top: 24px; bottom: 24px; width: 3px;
  background: linear-gradient(180deg, var(--brand-accent), var(--accent-2)); border-radius: 999px; opacity: .24; z-index:0;
  box-shadow: 0 6px 18px rgba(28,48,113,0.06);
}
@media (max-width:820px){
  .safety-list{ padding-left: 18px; gap: 14px; }
  .safety-rail{ left: 10px; top: 18px; bottom: 18px; width: 3px; opacity:.16; }
  .safety-item{ min-height: 68px; padding: 12px 14px; border-radius:16px; }
  .s-icon{ width:34px; height:34px; border-radius:10px; }
}

/* ===== Early Access ===== */
.waitlist-card{
  position:relative; background: #fff; border: 1px solid var(--line); border-radius: 30px;
  padding: clamp(22px, 3.2vw, 30px); box-shadow: 0 18px 44px rgba(10,20,50,.14), inset 0 1px 0 rgba(255,255,255,.95);
}
.waitlist-card.vivid{ background: #fff; }
.waitlist-card.glass-surface::before{ display: none; }
.waitlist-card.halo::after{ display: none; }
.waitlist-sub{ color: #3b4b76; margin: 0 0 14px; text-transform:lowercase; }
.form-row{ display:flex; gap: 12px; align-items:center; }
input[type="email"]{
  flex:1; padding: 16px 18px; border-radius: 16px; border:1px solid var(--line); font: inherit;
  background:#fff; color:#0b1020; box-shadow: inset 0 1px 0 rgba(255,255,255,.95);
}
.form-hint{ color:#5b6a8f; margin:10px 0 0 2px; font-size:14px; text-transform:lowercase; }
.form-msg{ margin:6px 0 0 2px; font-weight:700; }

/* Neutralize iOS autofill yellow (nice-to-have) */
input[type="email"]:-webkit-autofill,
input[type="email"]:-webkit-autofill:hover,
input[type="email"]:-webkit-autofill:focus{
  -webkit-text-fill-color:#0b1020;
  -webkit-box-shadow: 0 0 0 1000px #fff inset;
  box-shadow: inset 0 0 0 1000px #fff;
  caret-color:#0b1020;
  transition: background-color 9999s ease-out 0s;
}

/* ===== Footer ===== */
.site-footer{ margin-top: 28px; background: linear-gradient(180deg, #1e3a8a, #1c3071); color:#f2f6ff; border-top:1px solid rgba(255,255,255,.12); }
.footer-grid-lg{
  display:grid; gap:26px; grid-template-columns: repeat(3, minmax(160px, 1fr)); align-items:start; justify-content: center; padding:24px 0;
}
.footer-brand{
  font-weight:800; text-transform:lowercase; grid-column: 1 / -1; justify-self: center;
  font-size: clamp(22px, 6vw, 30px); color:#ffffff;
}
.footer-links a{ display:block; color:#e7edff; text-decoration:none; padding:5px 0; text-transform:lowercase; }
.footer-links a:hover{ text-decoration:underline; }
.footer-bottom{ display:flex; align-items:center; justify-content:space-between; padding: 14px 0 24px; }
.footer-chrome{ height:6px; width:100%; background: linear-gradient(90deg, transparent, rgba(255,255,255,.28), transparent); }
.nowrap{ white-space:nowrap; }

.site-footer{ padding:48px 0 28px; border-top:1px solid rgba(255,255,255,.06); }
.footer-grid-lg{ width:min(1100px, calc(100% - 40px)); margin:0 auto; gap:36px; padding:0; }
.footer-col h4{ margin:0 0 12px 0; font-size:15px; font-weight:700; color:#f3f8ff; text-transform:lowercase; }
.footer-links{ margin:0; padding:0; list-style:none; }
.footer-links a{ 
  display:block; color:rgba(231,237,255,0.95); text-decoration:none; 
  padding:8px 0; font-size:14px; opacity:.95; 
  margin:2px 0;
  position:relative;
}
.footer-links a:hover{ text-decoration:underline; opacity:1; }

.footer-bottom{ gap:12px; width:min(1100px, calc(100% - 40px)); margin:18px auto 0; }
.footer-legal{ color: rgba(242,246,255,0.9); }
.footer-chrome{ border-radius:6px; opacity:.6; }

@media (max-width:820px){
  .footer-grid-lg{ grid-template-columns:1fr; gap:20px; padding:0 16px; }
  .footer-brand{ grid-column: auto; }
  .footer-bottom{ flex-direction:column; align-items:center; text-align:center; }
}

/* Footer privacy button */
.footer-privacy-btn{
  margin-top:12px; border:1px solid rgba(255,255,255,.35); background: rgba(255,255,255,.10);
  color:#e7edff; padding:10px 14px; border-radius:12px; text-transform:lowercase; font-weight:700;
  transition: background .2s ease, transform .2s ease, box-shadow .2s ease; box-shadow: inset 0 1px 0 rgba(255,255,255,.25);
}
.footer-privacy-btn:hover{ background: rgba(255,255,255,.18); transform: translateY(-1px); }

/* ===== Modal ===== */
.privacy-modal{
  width:min(760px, calc(100% - 32px));
  border:none; border-radius:22px; padding:0;
  box-shadow: 0 30px 60px rgba(10,20,50,.35);
  overflow:auto; /* allow scrolling when content taller than viewport */
  max-height: 90dvh;
}
.privacy-modal::backdrop{ background: rgba(10,20,50,.55); backdrop-filter: blur(6px); }
.privacy-header{ display:flex; align-items:center; justify-content:space-between; padding:14px 16px; border-bottom:1px solid #ecf1ff; }
.privacy-header .close{
  appearance:none; border:1px solid #e3eaff; background:#fff; border-radius:12px;
  width:36px; height:36px; font-size:18px; display:grid; place-items:center; cursor:pointer;
}
.privacy-modal h2{ margin:16px 16px 6px 16px; font-size:28px; }
.privacy-intro{ margin:0 16px 8px 16px; color:#334166; font-size:16px; }
.prefs{ padding: 0 16px 12px 16px; }
.prefs details{ border:1px solid #e7edff; border-radius:12px; padding:10px 12px; background:#fff; margin:10px 0; }
.prefs summary{ display:flex; align-items:center; justify-content:space-between; gap:10px; cursor:pointer; font-weight:700; text-transform:lowercase; font-size:16px; }
.switch{ position:relative; width:44px; height:24px; display:inline-block; }
.switch input{ display:none; }
.switch .slider{ position:absolute; inset:0; background:#e5eaf7; border-radius:999px; transition:.25s; }
.switch .slider::before{ content:""; position:absolute; width:18px; height:18px; left:3px; top:3px; background:#fff; border-radius:50%; box-shadow:0 1px 3px rgba(0,0,0,.25); transition:.25s; }
.switch input:checked + .slider{ background:#2563eb; }
.switch input:checked + .slider::before{ transform: translateX(20px); }
.privacy-actions{ display:flex; gap:12px; justify-content:flex-end; align-items:center; padding: 12px 16px 18px 16px; border-top:1px solid #ecf1ff; }

/* ===== Animations & reveals ===== */
[data-anim]{ opacity:0; transform: translate3d(0,16px,0); filter: blur(8px); transition: opacity .7s ease, transform .7s ease, filter .7s ease; }
[data-anim].in{ opacity:1; transform: translate3d(0,0,0); filter: blur(0); }
.reveal{ opacity:0; transform: translateY(14px) scale(.98); transition: transform .6s ease, opacity .6s ease; }
.reveal.in{ opacity:1; transform: translateY(0) scale(1); }

/* Respect reduced motion globally */
@media (prefers-reduced-motion: reduce){
  .feature-tile, .reveal, .t-card{ transition:none !important; transform:none !important; }
}

/* ===== Media (mobile-only overrides; desktop unaffected) ===== */
@media (max-width: 820px){
  /* Reinstate graph paper on mobile, but much lighter */
  .parallax-bg{
    display:block !important;
    --px:50%; --py:50%;
    background:
      radial-gradient(800px 800px at var(--px) var(--py), rgba(96,165,250,.08), transparent 60%),
      radial-gradient(1000px 1000px at calc(100% - var(--px)) calc(100% - var(--py)), rgba(37,99,235,.06), transparent 65%),
      repeating-linear-gradient(to right, rgba(218,228,255,.28) 0 1px, transparent 1px 28px),
      repeating-linear-gradient(to bottom, rgba(218,228,255,.28) 0 1px, transparent 1px 28px),
      linear-gradient(#ffffff, #ffffff);
  }
  body{ background:#fff; }

  /* Comfier hero + type */
  .hero-grid{ min-height: 76dvh; padding-top: 6px; }
  .headline{ font-size: clamp(30px, 8.2vw, 44px); }
  .subhead{ font-size: clamp(16px, 4.2vw, 18px); }

  /* Lighter card surfaces/shadows on mobile */
  .feature-tile, .t-card, .waitlist-card, .safety-item, .privacy-card{ background:rgba(255,255,255,.96) !important; }
  .feature-tile, .t-card, .waitlist-card, .safety-item{ box-shadow: 0 10px 24px rgba(10,20,50,.09); }
  .privacy-card{ border-color:#eef2ff; box-shadow: 0 10px 24px rgba(10,20,50,.07); }
  .s-icon{ background:#f6f9ff; }

  /* Mobile-only CTA redesign: button outside input field for better alignment */
  .form-row{ display:flex; gap:12px; align-items:center; }
  .form-row input[type="email"]{
    flex:1; height:56px; border-radius:18px; padding:16px 18px; /* remove right padding */
  }
  .form-row .btn.btn--primary{
    width:56px; height:56px; padding:0; margin:0; flex-shrink:0;
    border-radius:999px; font-size:0; /* hide text but keep accessible name */
    background: linear-gradient(135deg, var(--brand-accent), var(--accent-2));
    box-shadow: 0 8px 18px rgba(37,99,235,.22);
    border: none;
    position: relative;
    overflow: hidden;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .form-row .btn.btn--primary::before{
    content: "";
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(255,255,255,0.15), transparent 50%);
    border-radius: 999px;
    pointer-events: none;
  }
  .form-row .btn.btn--primary::after{
    content: "➤";
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 22px;
    font-weight: 900;
    color: #ffffff;
    line-height: 1;
    transition: transform 0.2s cubic-bezier(0.4, 0, 0.2, 1);
  }
  .form-row .btn.btn--primary:hover{
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37,99,235,.28);
  }
  .form-row .btn.btn--primary:hover::after{
    transform: translate(-50%, -50%) translateX(2px);
  }
  .form-row .btn.btn--primary:active{ 
    transform: translateY(-1px) scale(.96);
    box-shadow: 0 6px 16px rgba(37,99,235,.20);
  }

  /* Privacy dialog should never clip on mobile */
  .privacy-modal{
    max-height: calc(100dvh - 20px - env(safe-area-inset-top) - env(safe-area-inset-bottom));
    margin: max(8px, env(safe-area-inset-top)) auto max(8px, env(safe-area-inset-bottom)) auto;
    overflow:auto;
  }
}

/* Backdrop-filter fallback */
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  header.dock { background: rgba(255,255,255,.97); border-bottom: 1px solid #e8eefc; box-shadow: 0 10px 24px rgba(10,20,50,.1); }
  .dock__liquid { display:none; }
}

/* One-time cinematic gate: subsequent visits use a quick fade */
body.page-fade{ opacity:0; animation: pageFade .8s ease forwards; }
@keyframes pageFade{ to { opacity:1; } }

/* Invalid input highlight for early access */
input.is-invalid{
  border-color:#e11d48 !important;
  box-shadow: inset 0 0 0 2px rgba(225,29,72,.12);
}

/* solid mobile header background layer + proper stacking so brand sits on the bar */
@media (max-width: 920px){
  header.dock { position: fixed; }
  header.dock::before{
    content:"";
    position:absolute;
    inset:0;
    background:#ffffff;
    z-index:0;
  }
  .dock__inner{ position:relative; z-index:2; }
}



  .dock__brand{
    grid-column: 2 !important;
    justify-self: center !important;
    align-self: center !important;
    display: flex !important;
    align-items: center !important;
    height: 60px !important;
    margin: 0 !important;
  }
  .nav-toggle{
    grid-column: 3 !important;
    justify-self: end !important;
    align-self: center !important;
  }


/* Mobile: hard-center brand, pin hamburger right */
@media (max-width: 920px){
  .dock__inner{
    position: relative;
    display: block;            /* stop grid from biasing center */
    height: 60px;              /* matches your bar height */
  }
  .dock__brand{
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);  /* true center, independent of toggle width */
    margin: 0;
    display: flex;
    align-items: center;
    height: 60px;
  }
  .nav-toggle{
    position: absolute;
    right: 0;
    top: 50%;
    transform: translateY(-50%);
  }
}
