/* ═══════════════════════════════════════════════════════
   VERNIER — Calibre 01 · clinical white void
   ═══════════════════════════════════════════════════════ */
:root{
  --void:   #1B1D21;
  --void-2: #24272C;
  --ink:    #F3F4F6;
  --ink-2:  #B9BDC6;
  --muted:  #8F949E;
  --blued:  #7FA3E8;
  --blued-cta: #3D63B3;
  --line:   rgba(243,244,246,.14);
  --sans:   "Familjen Grotesk", system-ui, sans-serif;
  --mono:   "Fragment Mono", ui-monospace, monospace;
  --pad:    clamp(20px, 5vw, 80px);
  --col:    520px;
  --ease:   cubic-bezier(.22,1,.36,1);
  --z-stage: 0; --z-scrim: 1; --z-main: 2; --z-top: 10;
}
*,*::before,*::after{ box-sizing:border-box; }
html{ -webkit-text-size-adjust:100%; }
body{
  margin:0; background:var(--void); color:var(--ink);
  font-family:var(--sans); font-weight:400; font-size:clamp(15.5px,1.05vw,17px);
  line-height:1.6; overflow-x:hidden; -webkit-font-smoothing:antialiased;
}
a{ color:inherit; text-decoration:none; }
h1,h2,h3,p,dl,dd,ul{ margin:0; }
img{ display:block; max-width:100%; }
[hidden]{ display:none !important; }   /* the img reset above must never beat the hidden attribute */
::selection{ background:var(--blued-cta); color:#fff; }

/* keyboard focus is visible on every control */
:focus-visible{ outline:2px solid var(--blued); outline-offset:3px; border-radius:3px; }
:focus:not(:focus-visible){ outline:none; }
.skip{ position:absolute; left:-999px; top:8px; background:var(--ink); color:#141619; padding:8px 12px; z-index:var(--z-top); }
.skip:focus{ left:8px; }

/* ── stage ─────────────────────────────────────────── */
.stage{ position:fixed; inset:0; z-index:var(--z-stage); }
/* Own compositing layer: keeps iOS from re-rasterising the canvas with the
   scrolling content above it. */
.stage canvas{ display:block; width:100%; height:100%; will-change:transform; transform:translateZ(0); }
.fallback{ position:absolute; inset:0; width:100%; height:100%; object-fit:cover; }
/* phone mode: one still of the movement; no WebGL context is ever created */
.stage-still{ position:absolute; inset:0; width:100%; height:100%; display:none; object-fit:cover; object-position:50% 30%; background:var(--void); }
.is-still #stage{ display:none; }
.is-still .stage-still{ display:block; }
.is-still .scrim{ background:linear-gradient(180deg, rgba(27,29,33,0) 22%, rgba(27,29,33,.5) 40%, rgba(27,29,33,.94) 54%, var(--void) 100%); }
.is-still .top{ background:linear-gradient(180deg, rgba(27,29,33,.9), rgba(27,29,33,0)); }
.only-video{ display:none; }
.is-still .only-live{ display:none; }
.is-still .only-video{ display:inline; }
.is-still .crownctl{ display:none; }
.is-still .crown-note{ display:block; }
.crown-note{ display:none; font-family:var(--mono); font-size:.7rem; color:var(--muted); margin-top:10px; }
.no-webgl .fallback{ display:block; }
.diag{ position:fixed; left:8px; bottom:8px; z-index:var(--z-top); margin:0; padding:8px 10px; border-radius:8px;
  font:11px/1.45 var(--mono); color:#fff; background:rgba(0,0,0,.72); pointer-events:none; white-space:pre; }
.no-webgl #stage{ display:none; }
/* on phones the object sits in the upper half; this keeps the text legible over it */
.scrim{ position:absolute; inset:0; z-index:var(--z-scrim); pointer-events:none;
  background:linear-gradient(180deg, rgba(27,29,33,0) 26%, rgba(27,29,33,.94) 50%, var(--void) 100%); opacity:0; }
@media (max-width:820px){
  .scrim{ opacity:1; }
  /* The mobile tier has no post chain, so the vignette that keeps the stage
     from reading flat comes from CSS instead — free, and it cannot flicker. */
  .stage::after{ content:""; position:absolute; inset:0; pointer-events:none;
    background:radial-gradient(75% 60% at 50% 38%, rgba(27,29,33,0) 50%, rgba(27,29,33,.6) 100%); }
  /* Copy sits over the object on a phone; give every glyph its own ground. */
  .pre, h1, h2, .lede, .sec p{ text-shadow:0 1px 2px rgba(27,29,33,.85), 0 0 18px rgba(27,29,33,.7); }
}

/* ── top bar ───────────────────────────────────────── */
.top{ position:fixed; top:0; left:0; right:0; z-index:var(--z-top);
  display:flex; align-items:center; gap:28px; padding:18px var(--pad); }
.mark{ font-weight:700; letter-spacing:-.02em; font-size:1.15rem; }
.topnav{ display:flex; gap:22px; margin-left:auto; font-size:.92rem; color:var(--ink-2); }
.topnav a:hover{ color:var(--ink); }
@media (max-width:820px){ .topnav{ display:none; } .top .btn{ margin-left:auto; } }

/* ── buttons ───────────────────────────────────────── */
.btn{ display:inline-flex; align-items:center; gap:8px; padding:12px 20px; border-radius:999px;
  border:1px solid var(--line); font-weight:500; font-size:.95rem; background:var(--void-2);
  transition:transform .25s var(--ease), background .25s, border-color .25s; }
.btn:hover{ transform:translateY(-1px); border-color:var(--ink); }
.btn--ink{ background:var(--ink); color:#141619; border-color:var(--ink); }
.btn--blued{ background:var(--blued-cta); border-color:var(--blued-cta); }
.btn--blued:hover{ background:#325396; }

/* ── sections ──────────────────────────────────────── */
main{ position:relative; z-index:var(--z-main); }
.sec{ min-height:100vh; display:flex; align-items:center; padding:120px var(--pad); }
/* #exploded height sets where the explode/reassemble beats land; main.js buildMaster() positions them from this section's top and #escapement's top. Change one, re-check the other. */
.sec--tall{ min-height:180vh; align-items:flex-start; padding-top:22vh; }
.sec--hero{ min-height:100vh; }
.col{ max-width:var(--col); }
.col--wide{ max-width:820px; }
.pre{ font-family:var(--mono); font-size:.72rem; letter-spacing:.06em; color:var(--muted); margin-bottom:22px; }
h1{ font-size:clamp(3.4rem,9vw,6rem); line-height:.92; letter-spacing:-.04em; font-weight:700; text-wrap:balance; margin-bottom:26px; }
h2{ font-size:clamp(2rem,4.2vw,3.2rem); line-height:1.02; letter-spacing:-.03em; font-weight:700; text-wrap:balance; margin-bottom:18px; }
h3{ font-size:1.25rem; font-weight:700; letter-spacing:-.01em; margin-bottom:6px; }
.lede{ font-size:1.12rem; color:var(--ink-2); max-width:44ch; text-wrap:pretty; }
.sec p{ color:var(--ink-2); max-width:52ch; text-wrap:pretty; }
.ctas{ display:flex; gap:12px; flex-wrap:wrap; margin-top:30px; }
@media (max-width:820px){
  .sec{ align-items:flex-end; padding-bottom:12vh; }
  .sec--hero{ align-items:flex-end; padding-bottom:7vh; }   /* copy starts below the object's edge */
  .sec--tall{ align-items:flex-end; padding-top:60vh; }
}

/* readouts */
.read{ display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:18px 28px; margin-top:28px;
  padding-top:18px; border-top:1px solid var(--line); }
.read dt{ font-family:var(--mono); font-size:.68rem; letter-spacing:.06em; color:var(--muted); margin-bottom:4px; }
.read dd{ font-size:1.25rem; font-weight:500; font-variant-numeric:tabular-nums; }

/* crown control */
.crownctl{ margin-top:30px; }
.crown{ width:220px; height:64px; border-radius:999px; border:1px solid var(--line); background:var(--void-2);
  position:relative; cursor:grab; touch-action:pan-y; user-select:none; overflow:hidden; }
.crown:active{ cursor:grabbing; }
.crown__grip{ position:absolute; top:6px; bottom:6px; left:6px; width:52px; border-radius:999px; background:var(--ink);
  background-image:repeating-linear-gradient(90deg, rgba(20,22,25,.35) 0 2px, transparent 2px 6px); }
.hint{ font-family:var(--mono); font-size:.7rem; color:var(--muted); margin-top:10px; }

/* parts list */
.parts{ list-style:none; padding:0; margin-top:26px; border-top:1px solid var(--line); }
.parts li{ display:flex; flex-direction:column; gap:2px; padding:12px 0; border-bottom:1px solid var(--line); }
.parts b{ font-weight:500; }
.parts span{ font-family:var(--mono); font-size:.72rem; color:var(--muted); }

/* materials */
.mat{ padding:22px 0; min-height:40vh; border-top:1px solid var(--line); }
.mat:first-of-type{ margin-top:14px; }

/* figures */
.figs{ list-style:none; padding:0; display:grid; grid-template-columns:repeat(auto-fit,minmax(150px,1fr)); gap:26px 34px; margin-top:26px; }
.figs b{ display:block; font-size:clamp(2.2rem,4vw,3.2rem); font-weight:700; letter-spacing:-.03em; line-height:1; font-variant-numeric:tabular-nums; }
.figs span{ font-family:var(--mono); font-size:.7rem; color:var(--muted); letter-spacing:.04em; }

/* spec */
.spec{ width:100%; border-collapse:collapse; margin-top:22px; }
.spec th,.spec td{ text-align:left; padding:12px 0; border-bottom:1px solid var(--line); vertical-align:top; }
.spec th{ font-family:var(--mono); font-weight:400; font-size:.72rem; color:var(--muted); width:38%; letter-spacing:.04em; }
.enq{ margin-top:40px; padding:26px; background:var(--void-2); border-radius:14px; display:flex; gap:18px; align-items:center; justify-content:space-between; flex-wrap:wrap; }
.enq p{ color:var(--ink); font-weight:500; max-width:40ch; }

/* footer */
.foot{ position:relative; z-index:var(--z-main); display:flex; justify-content:space-between; gap:20px; flex-wrap:wrap;
  padding:28px var(--pad) 40px; font-family:var(--mono); font-size:.7rem; color:var(--muted); border-top:1px solid var(--line); background:var(--void); }
.foot nav{ display:flex; gap:18px; }
.foot a:hover{ color:var(--ink); }

/* reduced motion: CSS side. The JS side is handled in main.js. */
@media (prefers-reduced-motion: reduce){
  *,*::before,*::after{ transition-duration:.01ms!important; animation-duration:.01ms!important; scroll-behavior:auto!important; }
}
