/* ============================================================
   ToothPassport — showcase site
   Design language: Apple product-page inspired (big centered
   display type, alternating white / #f5f5f7 / near-black bands,
   980px text measure, pill CTAs, blurred sticky local-nav),
   carried by the ToothPassport crimson as the single accent.
   ============================================================ */

:root{
  --ink:#1d1d1f;
  --gray:#6e6e73;
  --gray-2:#86868b;
  --light:#f5f5f7;
  --white:#ffffff;
  --black:#0a0b10;            /* cool near-black (titanium/chrome theme) */
  --black-2:#14161d;          /* graphite panel */
  --ink-inv:#f3f5f9;
  --gray-inv:#a6aec0;         /* cool gray on dark */
  --teal:#c6cedb;             /* platinum accent */
  --teal-deep:#9aa4b4;        /* steel */
  --cyan:#d6dde7;             /* bright steel */
  /* accent "grad" words on LIGHT bands: dark polished gunmetal (chrome reads
     only on dark, so light bands get the reflective-dark-metal treatment). */
  --grad:linear-gradient(180deg,#5b6474 0%,#20262f 46%,#39414c 56%,#141821 100%);
  /* CHROME display fill — adapted from Apple's OWN shipping gradient-text CSS
     (their giant "PRO" is a baked 3D render, but this mirrors the technique they
     use for real gradient text): three layers blended to "chrome" —
       1. iridescent diagonal flecks (blue / peach / violet, low opacity)
       2. a bright specular band the .shimmer sweep animates across on reveal
       3. the metal ramp: cool blue-white top → DARK SLATE "fold" mid-letter
          (this crease is what reads as metal, not a flat gradient) → warm gold
          at the base.
     The layers are stacked here; the rule adds the sizes/positions/blend. */
  --chrome:
    linear-gradient(100deg, rgba(140,200,255,.35) 0%, rgba(255,255,255,0) 16%, rgba(255,190,150,.30) 42%, rgba(255,255,255,0) 60%, rgba(190,170,255,.28) 82%, rgba(255,255,255,0) 100%),
    linear-gradient(115deg, transparent 38%, rgba(255,255,255,.95) 50%, transparent 62%),
    linear-gradient(180deg, #ffffff 0%, #e3edfb 9%, #b9cde3 21%, #78828e 37%, #5c6168 48%, #867b6c 58%, #c3a06c 71%, #eac785 85%, #fde9bf 95%, #dcac6c 100%);
  --hairline:rgba(0,0,0,.1);
  --hairline-inv:rgba(255,255,255,.12);
  --radius:20px;
  --font:-apple-system,BlinkMacSystemFont,"SF Pro Display","SF Pro Text","Segoe UI",Roboto,Helvetica,Arial,sans-serif;
  --ease:cubic-bezier(.22,1,.36,1);
}

*{box-sizing:border-box;margin:0;padding:0}
html{scroll-behavior:smooth;scroll-padding-top:60px}
body{
  font-family:var(--font);
  color:var(--ink);
  background:var(--white);
  line-height:1.5;
  -webkit-font-smoothing:antialiased;
  text-rendering:optimizeLegibility;
}
img,svg{display:block;max-width:100%}
a{color:inherit;text-decoration:none}

/* ---------- measures ---------- */
.wrap{max-width:980px;margin:0 auto;padding:0 22px}
.wrap-wide{max-width:1240px;margin:0 auto;padding:0 22px}

/* ---------- type ---------- */
.display{
  font-size:clamp(44px,7.4vw,88px);
  line-height:1.04;
  font-weight:700;
  letter-spacing:-.018em;
}
h2.chapter{
  font-size:clamp(34px,5.4vw,64px);
  line-height:1.06;
  font-weight:700;
  letter-spacing:-.016em;
}
.subhead{
  font-size:clamp(19px,2.3vw,26px);
  line-height:1.35;
  font-weight:600;
  color:var(--gray);
  letter-spacing:-.008em;
}
.on-dark .subhead{color:var(--gray-inv)}
.kicker{
  display:block;
  font-size:clamp(15px,1.6vw,19px);
  font-weight:700;
  letter-spacing:-.005em;
  color:#6b7686;
  margin-bottom:14px;
}
/* Accent words on LIGHT bands = dark polished gunmetal (reflective metal). */
.grad{background:var(--grad);-webkit-background-clip:text;background-clip:text;color:transparent;-webkit-text-fill-color:transparent}
.on-dark .kicker{color:#cdd5e1}
/* CHROME iridescent display type on DARK bands — hero + on-dark chapters and
   accent words — the polished-metal lettering from the reference (image #10):
   a bright steel ramp with a faint spectral wash and a soft outer bloom. */
.chrome,
.hero .display,
.hero .grad,
.on-dark .display,
.on-dark .chapter,
.on-dark .grad{
  color:#f2f0eb;                      /* legible fallback if clip unsupported */
  background:var(--chrome);
  background-repeat:no-repeat;
  background-size:100% 100%, 320% 100%, 100% 100%;   /* specular band is wide */
  background-position:0% 0%, 160% 0%, 0% 0%;          /* band parked off-right */
  background-blend-mode:screen, screen, normal;
  -webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  /* CRISP, minimal glow — just a tight specular edge + a faint cool halo. A
     wide bloom read as "too much haze" (and a big blur re-rasters every frame
     under the pulse animation, tanking perf). Keep it tight. */
  filter:drop-shadow(0 1px 1px rgba(0,0,0,.35))
         drop-shadow(0 0 6px rgba(205,216,236,.16));
}
/* one-shot specular sweep on reveal (Apple's own 3.4s/linear/forwards timing) */
.chrome.shimmer,.hero .display.shimmer,.hero .grad.shimmer,
.on-dark .chapter.shimmer,.on-dark .grad.shimmer{
  animation:chrome-sweep 3.4s linear 1 forwards;
}
@keyframes chrome-sweep{
  0%{background-position:0% 0%,160% 0%,0% 0%}
  100%{background-position:0% 0%,-30% 0%,0% 0%}
}
@media (prefers-reduced-motion:reduce){
  .chrome.shimmer,.hero .display.shimmer,.hero .grad.shimmer,
  .on-dark .chapter.shimmer,.on-dark .grad.shimmer{animation:none}
}

/* ---------- local nav (Apple-style, dark, blurred) ---------- */
.localnav{
  position:sticky;top:0;z-index:50;
  background:rgba(14,16,22,.78);
  -webkit-backdrop-filter:saturate(180%) blur(20px);
  backdrop-filter:saturate(180%) blur(20px);
  border-bottom:1px solid rgba(255,255,255,.08);
}
/* 3-column grid: brand left, nav TRULY centered between equal 1fr gutters, an
   empty right column balancing the brand — the canonical centered-nav layout. */
.localnav .bar{
  max-width:1120px;margin:0 auto;padding:0 24px;
  height:54px;display:grid;grid-template-columns:1fr auto 1fr;align-items:center;gap:16px;
}
.localnav .brand{
  display:flex;align-items:center;gap:9px;justify-self:start;
  color:#fff;font-size:18px;font-weight:700;letter-spacing:-.02em;
}
.localnav .brand img{width:22px;height:22px}
.localnav .brand .p{color:var(--cyan)}
.localnav nav{display:flex;align-items:center;gap:30px;justify-self:center}
/* Narrow: grid would squeeze the brand, so fall back to brand-left / links-right;
   ≤640px only the pill shows (see below). */
@media (max-width:860px){
  .localnav .bar{display:flex;justify-content:space-between}
}
.localnav nav a{
  color:rgba(255,255,255,.78);font-size:13.5px;font-weight:500;
  transition:color .25s;
}
.localnav nav a:hover{color:#fff}
.localnav .pill{
  background:var(--teal);color:#ffffff;
  padding:7px 15px;border-radius:980px;
  font-size:13.5px;font-weight:600;
  transition:filter .25s;
}
.localnav .pill:hover{filter:brightness(1.12);color:#ffffff}

/* ---------- bands ---------- */
section{padding:clamp(84px,11vw,140px) 0}
.band-light{background:var(--light)}
.band-white{background:var(--white)}
.on-dark{background:var(--black);color:var(--ink-inv)}
.hairline-top{border-top:1px solid var(--hairline)}

.center{text-align:center}
.chapter-head{max-width:820px;margin:0 auto clamp(44px,6vw,76px)}
.chapter-head .subhead{margin-top:18px}

/* ---------- hero ---------- */
.hero{
  /* Pure black, no colour wash — the only glow is a faint NEUTRAL vignette for
     depth. The iridescence lives on the lettering itself (its bloom filter), so
     the backdrop stays clean instead of taking on a navy hue. */
  background:
    radial-gradient(72rem 38rem at 50% -2rem, rgba(255,255,255,.045), transparent 60%),
    #050507;
  color:var(--ink-inv);
  padding:clamp(72px,9vw,120px) 0 0;
  overflow:hidden;
}
.hero .eyebrow{
  display:inline-flex;align-items:center;gap:9px;
  font-size:15px;font-weight:600;color:var(--cyan);
  margin-bottom:22px;
}
.hero .eyebrow .dot{width:7px;height:7px;border-radius:50%;background:var(--cyan);box-shadow:0 0 12px var(--cyan)}
.hero .lead{
  max-width:680px;margin:26px auto 0;
  font-size:clamp(18px,2.1vw,23px);line-height:1.45;
  font-weight:500;color:var(--gray-inv);
}
.hero-actions{display:flex;gap:14px;justify-content:center;flex-wrap:wrap;margin-top:34px}
.btn{
  display:inline-block;border-radius:980px;
  font-size:17px;font-weight:500;
  padding:13px 26px;
  transition:filter .25s,background .25s,color .25s;
}
.btn-primary{
  background:linear-gradient(180deg,#f4f7fb 0%,#cdd5e1 60%,#aeb7c5 100%);
  color:#10131b;border:1px solid rgba(255,255,255,.55);
  box-shadow:inset 0 1px 0 rgba(255,255,255,.7),0 6px 22px rgba(140,180,255,.2);
}
.btn-primary:hover{filter:brightness(1.12)}
.btn-ghost{color:var(--cyan);border:1px solid rgba(214,221,231,.5)}
.btn-ghost:hover{background:rgba(214,221,231,.12)}
.badge-dev{
  display:inline-flex;align-items:center;gap:9px;
  margin-top:30px;color:var(--gray-inv);font-size:13.5px;font-weight:500;
}
.badge-dev .pulse{
  width:8px;height:8px;border-radius:50%;background:#34d399;
  animation:pulse 2.2s infinite;
}
@keyframes pulse{0%,100%{box-shadow:0 0 0 0 rgba(52,211,153,.5)}55%{box-shadow:0 0 0 9px rgba(52,211,153,0)}}

/* problem section — two labelled groups (For patients / For the practice) */
.prob-group+.prob-group{margin-top:clamp(24px,3.4vw,38px)}
.prob-label{
  text-align:center;font-size:12.5px;font-weight:700;letter-spacing:.09em;
  text-transform:uppercase;color:var(--gray-2);margin-bottom:15px;
}

.hero-device{
  margin:clamp(48px,6.5vw,80px) auto 0;
  max-width:400px;padding:0 30px;
  will-change:transform;
  position:relative; /* anchor for the explainer popovers */
}
.hero-fade{
  /* Sits BELOW the device in normal flow — it must never wash over the
     phone (review note 2026-12-02). The hero's own dark background runs
     behind it, so dark → light reads as one continuous gradient. */
  height:clamp(56px,7vw,96px);
  background:linear-gradient(to bottom, var(--black), var(--light));
  pointer-events:none;
}

/* ---------- card grids ---------- */
.grid-3{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.grid-2{display:grid;grid-template-columns:repeat(2,1fr);gap:18px}
.card{
  background:var(--white);
  border-radius:var(--radius);
  padding:34px 30px;
  box-shadow:0 4px 24px rgba(0,0,0,.05);
}
.card h3{font-size:21px;font-weight:700;letter-spacing:-.01em;margin-bottom:10px}
.card p{font-size:16px;color:var(--gray);line-height:1.55}

/* feature cards on white band */
.band-white .card{background:var(--light);box-shadow:none}
.feature-card{display:flex;flex-direction:column;gap:16px}
.feature-card .ic{
  width:46px;height:46px;border-radius:13px;
  display:grid;place-items:center;
  background:rgba(198,206,219,.12);color:var(--teal-deep);
}
.feature-card .ic svg{width:24px;height:24px}

/* ---------- imaging chapter (dark) ---------- */
.mpr-strip{margin-top:clamp(40px,5.5vw,64px)}
.strip-row{display:flex;gap:16px}
.strip-pane{flex:1;position:relative;border-radius:22px;overflow:hidden;background:#0d0f14;border:1px solid rgba(255,255,255,.07)}
.strip-pane img{width:100%;height:100%;object-fit:cover;aspect-ratio:1/1;display:block}
.strip-pane figcaption{position:absolute;top:12px;left:14px;font-size:13px;font-weight:600;letter-spacing:.04em;color:#dde3ec;text-shadow:0 1px 6px rgba(0,0,0,.8)}
.mpr-caption{
  margin-top:26px;text-align:center;
  color:var(--gray-inv);font-size:14.5px;
}
.mpr-caption b{color:var(--ink-inv);font-weight:600}

/* ---------- steps ---------- */
.steps{display:grid;grid-template-columns:repeat(3,1fr);gap:18px}
.step{
  background:var(--white);border-radius:var(--radius);
  padding:36px 30px;box-shadow:0 4px 24px rgba(0,0,0,.05);
}
.step .n{
  display:inline-grid;place-items:center;
  width:40px;height:40px;border-radius:50%;
  background:var(--grad);color:#ffffff;
  font-size:18px;font-weight:700;margin-bottom:18px;
}
.step h3{font-size:21px;font-weight:700;margin-bottom:10px;letter-spacing:-.01em}
.step p{font-size:16px;color:var(--gray);line-height:1.55}

/* ---------- stats band ---------- */
.stats{
  display:grid;grid-template-columns:repeat(4,1fr);
  gap:18px;margin-top:clamp(44px,6vw,70px);
}
.stat{text-align:center;padding:10px}
.stat .num{
  font-size:clamp(40px,5.4vw,66px);
  font-weight:700;letter-spacing:-.02em;line-height:1.05;
  background:var(--chrome);-webkit-background-clip:text;background-clip:text;
  color:transparent;-webkit-text-fill-color:transparent;
  filter:drop-shadow(0 0 22px rgba(150,190,255,.18));
}
.stat .lbl{margin-top:10px;font-size:15px;color:var(--gray-inv);font-weight:500}
.chips{display:flex;flex-wrap:wrap;gap:10px;justify-content:center;margin-top:clamp(36px,5vw,54px)}
.chip{
  font-size:13.5px;font-weight:500;color:var(--ink-inv);
  padding:8px 16px;border-radius:980px;
  border:1px solid var(--hairline-inv);
  background:rgba(255,255,255,.04);
}

/* ---------- status ---------- */
.status-copy{max-width:760px;margin:0 auto;font-size:clamp(17px,1.9vw,20px);line-height:1.6;color:var(--ink)}
.status-copy p+p{margin-top:20px}
.status-copy .muted{color:var(--gray)}
.status-next{
  margin:34px auto 0;max-width:760px;
  background:var(--light);border-radius:var(--radius);
  padding:24px 28px;font-size:16.5px;color:var(--ink);
}
.status-next b{font-weight:700}

/* ---------- founder ---------- */
.founder{
  display:flex;gap:26px;align-items:flex-start;
  max-width:760px;margin:0 auto;
  background:var(--white);border-radius:var(--radius);
  padding:36px;box-shadow:0 4px 24px rgba(0,0,0,.05);
}
.founder .avatar{
  flex:0 0 72px;width:72px;height:72px;border-radius:50%;
  display:grid;place-items:center;
  background:var(--grad);color:#ffffff;
  font-size:24px;font-weight:700;letter-spacing:-.02em;
}
.founder h3{font-size:22px;font-weight:700;letter-spacing:-.01em}
.founder .role{color:var(--teal-deep);font-size:14.5px;font-weight:600;margin:3px 0 12px}
.founder p{font-size:16px;color:var(--gray);line-height:1.6}

/* ---------- footer ---------- */
footer{
  background:var(--light);
  border-top:1px solid var(--hairline);
  padding:46px 0 54px;
}
.frow{display:flex;align-items:center;justify-content:space-between;gap:20px;flex-wrap:wrap}
.fbrand{display:flex;align-items:center;gap:9px;font-weight:700;font-size:16px;letter-spacing:-.01em}
.fbrand img{width:20px;height:20px}
footer nav{display:flex;gap:24px;flex-wrap:wrap}
footer nav a{font-size:13.5px;color:var(--gray);transition:color .25s}
footer nav a:hover{color:var(--ink)}
.disc{
  margin-top:26px;padding-top:22px;border-top:1px solid var(--hairline);
  font-size:12.5px;color:var(--gray-2);line-height:1.6;max-width:760px;
}

/* ---------- reveal motion ---------- */
.reveal{opacity:0;transform:translateY(26px);transition:opacity .9s var(--ease),transform .9s var(--ease)}
.reveal.in{opacity:1;transform:none}
.grid-3 .reveal:nth-child(2),.steps .reveal:nth-child(2){transition-delay:.08s}
.grid-3 .reveal:nth-child(3),.steps .reveal:nth-child(3){transition-delay:.16s}
.grid-2 .reveal:nth-child(2){transition-delay:.08s}
.grid-2 .reveal:nth-child(3){transition-delay:.16s}
.grid-2 .reveal:nth-child(4){transition-delay:.24s}
.stats .reveal:nth-child(2){transition-delay:.07s}
.stats .reveal:nth-child(3){transition-delay:.14s}
.stats .reveal:nth-child(4){transition-delay:.21s}

@media (prefers-reduced-motion: reduce){
  html{scroll-behavior:auto}
  .reveal{opacity:1;transform:none;transition:none}
  .badge-dev .pulse{animation:none}
  .hero-device{transform:none !important}
}

/* ---------- responsive ---------- */
@media (max-width:900px){
  .grid-3,.steps{grid-template-columns:1fr 1fr}
  .grid-2{grid-template-columns:1fr 1fr}
  .stats{grid-template-columns:1fr 1fr;row-gap:34px}
}
@media (max-width:640px){
  .localnav nav a:not(.pill){display:none}
  .grid-3,.grid-2,.steps{grid-template-columns:1fr}
  .founder{flex-direction:column}
  .frow{flex-direction:column;align-items:flex-start}
  .hero-device{max-width:320px}
}

/* On narrow screens the 4-pane strip becomes an Apple-style horizontal
   swipe gallery instead of an illegible sliver. Inner scroller only — the
   page itself never scrolls sideways. */
@media (max-width:760px){
  .mpr-strip{
    overflow-x:auto;
    -webkit-overflow-scrolling:touch;
    scrollbar-width:none;
    margin-left:-22px;margin-right:-22px;
    padding-left:22px;padding-right:22px;
  }
  .mpr-strip::-webkit-scrollbar{display:none}
  .strip-row{min-width:940px}
  .mpr-caption{padding:0 22px}
}

/* ============================================================
   The device — a realistic iPhone running the live demo.
   Realism comes from layering: titanium rail (gradient ring),
   black bezel, screen glass highlight, Dynamic Island, side
   buttons, deep ground shadow.
   ============================================================ */
.hero-device{max-width:400px}
.iphone{
  position:relative;
  border-radius:60px;
  padding:4px;
  background:
    linear-gradient(145deg,#8f8f98 0%,#55555e 18%,#3a3a42 42%,#2c2c33 60%,#6b6b74 85%,#9a9aa4 100%);
  box-shadow:
    0 60px 110px rgba(0,0,0,.65),
    0 24px 48px rgba(0,0,0,.5),
    inset 0 0 1.5px rgba(255,255,255,.55);
}
.iphone-bezel{
  border-radius:56px;
  background:#000;
  padding:11px;
}
.iphone-screen{
  position:relative;
  border-radius:45px;
  background:#0e1016;
  overflow:hidden;
  aspect-ratio:393/830;
  display:flex;flex-direction:column;
  text-align:left;
}
.iphone-screen::after{  /* glass reflection */
  content:"";position:absolute;inset:0;z-index:9;pointer-events:none;
  background:
    linear-gradient(118deg,rgba(255,255,255,.085) 0%,rgba(255,255,255,.028) 24%,transparent 38%),
    radial-gradient(130% 60% at 85% -10%,rgba(255,255,255,.05),transparent 55%);
  border-radius:45px;
}
.ibtn{position:absolute;background:linear-gradient(90deg,#2e2e35,#6e6e78,#2e2e35);border-radius:2.5px;z-index:1}
.ibtn-action{left:-2.5px;top:17%;width:5px;height:30px}
.ibtn-volup{left:-2.5px;top:25.5%;width:5px;height:52px}
.ibtn-voldn{left:-2.5px;top:33.5%;width:5px;height:52px}
.ibtn-power{right:-2.5px;top:27%;width:5px;height:84px}
.dyn-island{
  position:absolute;top:13px;left:50%;transform:translateX(-50%);
  width:31%;height:26px;border-radius:16px;background:#000;z-index:8;
  box-shadow:inset 0 0 2px rgba(255,255,255,.08);
}
.home-indicator{
  position:absolute;bottom:8px;left:50%;transform:translateX(-50%);
  width:36%;height:5px;border-radius:3px;background:rgba(255,255,255,.32);z-index:8;
}

/* ---- in-app UI ---- */
.statusbar{
  display:flex;justify-content:space-between;align-items:center;
  padding:16px 26px 0 30px;height:40px;flex:0 0 auto;
  font-size:14px;font-weight:600;color:#fff;
}
.sb-icons{display:flex;align-items:center}
.app-head{padding:12px 20px 0;flex:0 0 auto}
.app-title{font-size:19px;font-weight:700;letter-spacing:-.02em;color:#fff}
.app-sub{font-size:11.5px;color:#aab4c4;margin-top:2px}
.app-tabs{
  display:flex;gap:4px;margin:12px 16px 0;padding:4px;flex:0 0 auto;
  background:#161a22;border-radius:12px;
}
.app-tab{
  flex:1;border:0;background:transparent;border-radius:8px;
  padding:6px 0;font-family:var(--font);font-size:12px;font-weight:600;
  color:#9aa3b4;cursor:pointer;transition:background .2s,color .2s;
}
.app-tab.active{
  background:linear-gradient(180deg,#eef2f7,#c4cdda);color:#12151c;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 1px 4px rgba(0,0,0,.3);
}
.app-view{display:none;flex:1 1 auto;flex-direction:column;padding:12px 16px 40px;min-height:0}
.app-view.active{display:flex}

/* MPR grid */
.mpr-grid{display:grid;grid-template-columns:1fr 1fr;gap:9px;flex:0 0 auto}
.pane{
  position:relative;border-radius:14px;overflow:hidden;background:#0a0b0f00;
  background:#0d0f14;border:1.5px solid rgba(255,255,255,.06);
  aspect-ratio:1/1;cursor:ns-resize;touch-action:none;
}
.pane img{width:100%;height:100%;object-fit:cover;display:block;user-select:-webkit-none;user-select:none}
.pane figcaption{
  position:absolute;top:7px;left:9px;font-size:9px;font-weight:700;letter-spacing:.06em;
  color:#dde3ec;text-shadow:0 1px 4px rgba(0,0,0,.9);
}
.pane .count{
  position:absolute;bottom:6px;right:9px;font-size:9px;color:#9aa3b4;
  text-shadow:0 1px 4px rgba(0,0,0,.9);
}
.pane.active{border-color:#c6cedb;box-shadow:0 0 0 1px rgba(198,206,219,.4)}
.pane-3d{cursor:pointer}
.scrub-row{margin-top:12px;flex:0 0 auto}
.scrub-label{display:block;font-size:11px;color:#aab4c4;margin-bottom:6px}
#scrub{
  -webkit-appearance:none;appearance:none;width:100%;height:5px;border-radius:3px;
  background:linear-gradient(to right,#c6cedb 0%,#c6cedb 50%,#272d38 50%);outline:none;
}
#scrub::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:19px;height:19px;border-radius:50%;
  background:#fff;box-shadow:0 1px 6px rgba(0,0,0,.5);cursor:grab;
}
#scrub::-moz-range-thumb{width:19px;height:19px;border-radius:50%;background:#fff;border:0;box-shadow:0 1px 6px rgba(0,0,0,.5)}
.app-hint{margin-top:10px;font-size:10.5px;line-height:1.45;color:#8b94a4}

/* 3D view */
.spin-stage{
  position:relative;flex:1 1 auto;border-radius:16px;overflow:hidden;
  background:#000;border:1.5px solid rgba(255,255,255,.06);
  cursor:ew-resize;touch-action:pan-y;min-height:0;
}
.spin-stage canvas{width:100%;height:100%;display:block}
.spin-hint{
  position:absolute;bottom:10px;left:50%;transform:translateX(-50%);
  font-size:10.5px;color:#dde3ec;background:rgba(12,14,20,.65);
  padding:4px 11px;border-radius:999px;transition:opacity .6s;
}
.spin-hint.hide{opacity:0}

/* Share view */
.share-card{background:#161b29;border-radius:14px;overflow:hidden;border:1px solid rgba(123,146,245,.14);flex:0 0 auto}
.share-row{
  display:flex;align-items:center;justify-content:space-between;gap:8px;
  padding:13px 14px;border-bottom:1px solid rgba(255,255,255,.05);
}
.share-row:last-child{border-bottom:0}
.share-who{font-size:12px;font-weight:600;color:#f3f6fb}
.share-what{font-size:10.5px;color:#9aa3b4;margin-top:2px}
.share-revoke{
  border:1px solid rgba(255,138,116,.45);background:rgba(255,120,100,.1);color:#ff9f8e;
  font-family:var(--font);font-size:10.5px;font-weight:600;border-radius:999px;padding:5px 11px;cursor:pointer;
}
.share-grant{
  margin-top:10px;width:100%;border:0;border-radius:12px;
  background:linear-gradient(135deg,#5b8cf7,#7c6cf0);color:#fff;
  font-family:var(--font);font-size:12.5px;font-weight:600;padding:11px 0;cursor:pointer;flex:0 0 auto;
  box-shadow:0 4px 16px rgba(91,140,247,.3);
}

@media (max-width:640px){
  .hero-device{max-width:330px}
}

/* ============================================================
   In-phone app shell: screens, tab bar, push navigation.
   ============================================================ */
.screens{flex:1 1 auto;display:flex;min-height:0;position:relative}
.screen{display:none;flex:1 1 auto;flex-direction:column;min-height:0;overflow-y:auto;scrollbar-width:none;padding:0}  /* beats the page-band section padding */
.screen::-webkit-scrollbar{display:none}
.screen.active{display:flex}
.scr-pad{padding:10px 16px 16px}
.scr-title{font-size:21px;font-weight:700;letter-spacing:-.02em;color:#fff}
.scr-sub{font-size:11.5px;color:#aab4c4;margin-top:1px}
.scr-sub2{font-size:11.5px;color:#9aa3b4;margin:2px 0 12px}
.scr-section{font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:#8a9ad6;margin:16px 2px 8px}
.home-head{display:flex;align-items:center;gap:11px;margin-bottom:14px}
/* The in-phone app UI carries COLOUR (a friendly blue→violet primary + a warm
   amber accent on imaging) so the preview isn't flat black-and-white. */
.avatar-sm{
  width:42px;height:42px;border-radius:50%;flex:0 0 42px;
  display:grid;place-items:center;background:linear-gradient(135deg,#5b8cf7 0%,#8b6cf0 100%);
  color:#fff;font-size:15px;font-weight:700;box-shadow:0 2px 11px rgba(91,140,247,.4);
}
.tpid-card{
  display:flex;align-items:center;justify-content:space-between;gap:10px;
  background:linear-gradient(120deg,#273457 0%,#15182b 100%);
  border:1px solid rgba(123,146,245,.34);border-radius:14px;padding:13px 14px;
}
.tpid-label{font-size:9.5px;font-weight:600;letter-spacing:.06em;text-transform:uppercase;color:#96a9ea}
.tpid-value{font-family:ui-monospace,Menlo,monospace;font-size:15px;font-weight:600;color:#eef2ff;margin-top:2px;letter-spacing:.04em}
.tpid-copy{
  border:1px solid rgba(123,150,245,.55);background:rgba(91,140,247,.14);color:#b1c8ff;
  font-family:var(--font);font-size:11px;font-weight:600;border-radius:999px;padding:6px 13px;cursor:pointer;
}
.rec-card{
  display:flex;align-items:center;gap:11px;width:100%;text-align:left;
  background:linear-gradient(120deg,#1d2231 0%,#141821 100%);
  border:1px solid rgba(243,179,107,.26);border-radius:14px;
  padding:10px;cursor:pointer;font-family:var(--font);
}
.rec-thumb{width:52px;height:52px;border-radius:10px;object-fit:cover;flex:0 0 52px;background:#000;box-shadow:0 0 0 1.5px rgba(243,179,107,.4)}
.rec-meta{flex:1;min-width:0}
.rec-name{font-size:13px;font-weight:600;color:#f3f6fb}
.rec-sub{font-size:10.5px;color:#a5aec0;margin-top:2px}
.chev{color:#7b85be;font-size:18px;font-weight:600;flex:0 0 auto}
.list-card{background:#161b29;border:1px solid rgba(123,146,245,.14);border-radius:14px;overflow:hidden}
.list-row{
  display:flex;align-items:center;justify-content:space-between;gap:8px;width:100%;
  padding:11px 13px;border-bottom:1px solid rgba(255,255,255,.05);
  background:transparent;border-left:0;border-right:0;border-top:0;
  font-family:var(--font);text-align:left;color:inherit;
}
button.list-row{cursor:pointer}
.list-row:last-child{border-bottom:0}
.row-t{font-size:12.5px;font-weight:600;color:#f3f6fb}
.row-s{font-size:10.5px;color:#9aa3b4;margin-top:2px}
.practices-row{margin-top:16px}

/* top bar on pushed screens */
.topbar{display:flex;align-items:center;gap:6px;padding:3px 10px 0;flex:0 0 auto}
.back{
  border:0;background:transparent;color:#d6dde7;font-family:var(--font);
  font-size:13.5px;font-weight:500;cursor:pointer;padding:6px 6px;
}
.topbar-title{flex:1;text-align:center;font-size:13px;font-weight:600;color:#f3f6fb}
.topbar-spacer{width:52px}

/* tab bar */
.tabbar{
  flex:0 0 auto;display:flex;align-items:stretch;
  border-top:1px solid rgba(255,255,255,.08);
  background:rgba(14,16,22,.92);
  padding:6px 6px calc(14px);
}
.tab-item{
  flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;
  border:0;background:transparent;color:#8b94a4;cursor:pointer;
  font-family:var(--font);font-size:9px;font-weight:600;padding:4px 0 0;
}
.tab-item svg{width:21px;height:21px}
.tab-item.active{color:#7ba0ff}
.screen-viewer.active ~ * .tabbar{display:none}
#screenRoot.in-viewer .tabbar{display:none}

/* demo toast */
.demo-toast{
  position:absolute;left:50%;bottom:76px;transform:translateX(-50%) translateY(8px);
  background:rgba(18,21,28,.95);border:1px solid rgba(214,221,231,.4);color:#f3f6fb;
  font-size:11px;font-weight:600;padding:7px 14px;border-radius:999px;
  opacity:0;pointer-events:none;transition:opacity .25s,transform .25s;z-index:10;white-space:nowrap;
}
.demo-toast.show{opacity:1;transform:translateX(-50%) translateY(0)}

/* viewer screen keeps its own paddings */
.screen-viewer .app-tabs{margin:5px 14px 0;padding:3px}
.screen-viewer .app-view{padding:12px 16px 14px}

/* ============================================================
   Explainer popovers — every in-phone interaction reveals a
   card beside the device describing what the real app does.
   ============================================================ */
.demo-pop{
  position:absolute;width:248px;z-index:20;
  background:rgba(16,18,24,.96);
  border:1px solid rgba(214,221,231,.35);
  border-radius:16px;padding:16px 17px;
  box-shadow:0 18px 50px rgba(0,0,0,.5);
  text-align:left;opacity:0;pointer-events:none;
  transform:translateY(6px);
  transition:opacity .3s var(--ease),transform .3s var(--ease);
}
.demo-pop.show{opacity:1;transform:none}
.demo-pop .pop-title{font-size:13.5px;font-weight:700;color:#f3f6fb;letter-spacing:-.01em}
.demo-pop .pop-body{font-size:12px;line-height:1.5;color:#c3ccd9;margin-top:6px}
.demo-pop::before{  /* arrow toward the phone */
  content:"";position:absolute;top:26px;width:10px;height:10px;
  background:inherit;border:inherit;border-width:1px 1px 0 0;transform:rotate(45deg);
}
.demo-pop.side-left{right:calc(100% + 18px)}
.demo-pop.side-left::before{right:-6px;transform:rotate(45deg)}
.demo-pop.side-right{left:calc(100% + 18px)}
.demo-pop.side-right::before{left:-6px;transform:rotate(-135deg)}

/* Narrow screens: no side room — the card docks under the phone. */
@media (max-width:1019px){
  .demo-pop,.demo-pop.side-left,.demo-pop.side-right{
    position:static;width:auto;max-width:400px;
    margin:14px auto 0;transform:none;
    display:none;
  }
  .demo-pop.show{display:block}
  .demo-pop::before{display:none}
}
@media (prefers-reduced-motion: reduce){
  .demo-pop{transition:none}
}

/* ============================================================
   MPR — accurate to the iOS app: three full-width panels STACKED
   (Axial / Coronal / Sagittal), Carestream-style plane identity
   colors, orientation letters, and crosshair lines drawn in the
   color of the plane they move. Colors locked to the app:
   axial #E8B33D · coronal #A78BFA · sagittal #3ECFB2.
   ============================================================ */
.mpr-stack{flex:1 1 auto;display:flex;flex-direction:column;gap:7px;min-height:0}
.mpr-stack .pane{
  flex:1 1 0;min-height:0;aspect-ratio:auto;
  background:#000;cursor:ns-resize;
}
.mpr-stack .pane img{object-fit:contain}
.plane-tag{
  position:absolute;top:6px;left:9px;
  font-size:10px;font-weight:700;letter-spacing:.02em;
  text-shadow:0 1px 4px rgba(0,0,0,.9);
}
.pane figcaption.tag-axial{color:#E8B33D}
.pane figcaption.tag-coronal{color:#A78BFA}
.pane figcaption.tag-sagittal{color:#3ECFB2}
.mpr-stack .pane[data-plane="axial"]{border-color:rgba(232,179,61,.35)}
.mpr-stack .pane[data-plane="coronal"]{border-color:rgba(167,139,250,.35)}
.mpr-stack .pane[data-plane="sagittal"]{border-color:rgba(62,207,178,.35)}
.mpr-stack .pane.active[data-plane="axial"]{border-color:#E8B33D;box-shadow:0 0 0 1px rgba(232,179,61,.35)}
.mpr-stack .pane.active[data-plane="coronal"]{border-color:#A78BFA;box-shadow:0 0 0 1px rgba(167,139,250,.35)}
.mpr-stack .pane.active[data-plane="sagittal"]{border-color:#3ECFB2;box-shadow:0 0 0 1px rgba(62,207,178,.35)}
.orient{
  position:absolute;font-size:8px;font-weight:600;color:rgba(255,255,255,.4);
  text-shadow:0 1px 3px rgba(0,0,0,.9);pointer-events:none;
}
.o-l{left:5px;top:50%;transform:translateY(-50%)}
.o-r{right:5px;top:50%;transform:translateY(-50%)}
.o-t{top:4px;left:50%;transform:translateX(-50%)}
.o-b{bottom:4px;left:50%;transform:translateX(-50%)}
.xline{position:absolute;pointer-events:none;opacity:.6}
.xline-h{left:0;right:0;height:1px;top:50%}
.xline-v{top:0;bottom:0;width:1px;left:50%}
.line-axial{background:#E8B33D}
.line-coronal{background:#A78BFA}
.line-sagittal{background:#3ECFB2}

/* ============================================================
   Round-4 accuracy fixes (2026-12-02):
   MPR panels are NOT boxes — each takes a flush third of the
   screen, edge to edge, exactly like the app. 3D gets the app's
   controls: mode chips (3D / X-ray) + transparency slider, and
   never auto-rotates.
   ============================================================ */
/* Leave a bottom safe-area so the sagittal pane (and its slice counter) clears
   the home indicator and the screen's rounded bottom corners — it was flush to
   the edge and getting clipped. A tighter top bar (above) frees the room. */
/* Pure-black viewer so the bottom safe-area blends with the panes (no lighter
   seam cutting across the sagittal); the home indicator floats cleanly below. */
.screen-viewer{background:#000}
.screen-viewer .view-mpr{padding:3px 0 15px;background:#000;position:relative}
/* interaction hint (how to use the MPR) — fades on first touch, like the 3D one */
.mpr-hint{
  position:absolute;left:50%;bottom:22px;transform:translateX(-50%);z-index:5;
  font-size:10.5px;color:#dde3ec;background:rgba(12,14,20,.74);white-space:nowrap;
  padding:5px 13px;border-radius:999px;transition:opacity .5s;pointer-events:none;
  box-shadow:0 2px 10px rgba(0,0,0,.4);
}
.mpr-hint.hide{opacity:0}
.mpr-stack{gap:0}
.mpr-stack .pane{
  border:0;border-radius:0;box-shadow:none;
}
/* The axial slice is square; give its pane extra height so, shown in full
   (contain), it reads large. Coronal/sagittal are landscape and fit short. */
.mpr-stack .pane[data-plane="axial"]{flex:1.5 1 0}
.mpr-stack .pane[data-plane="coronal"],
.mpr-stack .pane[data-plane="sagittal"]{flex:1 1 0}
.mpr-stack .pane.active[data-plane="axial"],
.mpr-stack .pane.active[data-plane="coronal"],
.mpr-stack .pane.active[data-plane="sagittal"]{
  border:0;box-shadow:none;
}
/* double-tap expands a pane to fill the stack; the others hide */
.mpr-stack.expanded .pane{display:none}
.mpr-stack.expanded .pane.exp{display:block;flex:1 1 auto}
/* Colourways: a gentle warm "lightbox" tint over the grayscale CBCT so the
   preview feels friendlier than flat black-and-white. The plane tags and
   crosshair lines are separate elements, so their identity colours stay true. */
.pane-canvas{}
/* ============================================================
   3D viewer — FULL-BLEED, exactly like the iOS app: the render
   fills the whole screen and the style toggles sit in a sheet
   pinned to the BOTTOM. The patient app's 3D styles are precisely
   Solid / Transparent / X-ray (no Dental/MIP). Never auto-rotates.
   ============================================================ */
.screen-viewer .view-spin{padding:0}
.spin-stage{
  position:relative;flex:1 1 auto;min-height:0;
  border:0;border-radius:0;overflow:hidden;background:#000;
  cursor:ew-resize;touch-action:pan-y;
}
.spin-stage canvas{position:absolute;inset:0;width:100%;height:100%;display:block;background:#000}
/* Live WebGPU render canvas: inserted BEHIND the frame-grid poster (DOM order),
   so the turntable shows instantly and upgrades seamlessly to the GPU render
   once the volume loads. touch-action:none so a vertical drag pitches the
   volume instead of scrolling the page. */
.spin-gl{touch-action:none}
.spin-stage.gl-live #spinCanvas{display:none}
.spin-hint{
  position:absolute;left:50%;bottom:74px;transform:translateX(-50%);
  font-size:10.5px;color:#dde3ec;background:rgba(12,14,20,.7);white-space:nowrap;
  padding:4px 11px;border-radius:999px;transition:opacity .6s;z-index:3;
}
.spin-hint.hide{opacity:0}
/* bottom control sheet, floating over the full-bleed render (app-style) */
.spin-sheet{
  position:absolute;left:0;right:0;bottom:0;z-index:4;
  display:flex;flex-direction:column;gap:8px;padding:30px 14px 14px;
  background:linear-gradient(to top,rgba(8,9,13,.94) 0%,rgba(8,9,13,.7) 58%,transparent 100%);
  pointer-events:none;
}
.spin-sheet>*{pointer-events:auto}
.spin-styles{
  display:flex;gap:3px;padding:3px;border-radius:11px;
  background:rgba(22,26,34,.66);border:1px solid rgba(255,255,255,.09);
  -webkit-backdrop-filter:blur(8px);backdrop-filter:blur(8px);
}
.style-chip{
  flex:1;border:0;background:transparent;border-radius:9px;
  padding:8px 0;text-align:center;font-family:var(--font);
  font-size:11.5px;font-weight:600;color:#aab4c4;cursor:pointer;
  transition:background .2s,color .2s;
}
.style-chip.active{
  background:linear-gradient(180deg,#eef2f7,#c4cdda);color:#12151c;
  box-shadow:inset 0 1px 0 rgba(255,255,255,.6),0 1px 4px rgba(0,0,0,.35);
}
.trans-row{display:flex;align-items:center;gap:8px;padding:2px 6px;color:#aab4c4;transition:opacity .2s}
.trans-row.hidden{display:none}
.app-slider{
  -webkit-appearance:none;appearance:none;flex:1;height:4px;border-radius:2px;
  background:#272d38;outline:none;
}
.app-slider::-webkit-slider-thumb{
  -webkit-appearance:none;appearance:none;width:16px;height:16px;border-radius:50%;
  background:#fff;box-shadow:0 1px 5px rgba(0,0,0,.5);cursor:grab;
}
.app-slider::-moz-range-thumb{width:16px;height:16px;border-radius:50%;background:#fff;border:0}
.pane-canvas{width:100%;height:100%;display:block;background:#000}
