/* voXel — neo-kinpaku on lacquer.
   Palette and type follow the Impeccable system: kinpaku gold carries brand,
   verdigris patina carries state, and the ground is warm mineral black rather
   than neutral. The blue belongs to the product itself — the mark and the film
   — so the chrome around them stays gold and never competes with it. */

:root {
  /* Surfaces */
  --ground:        oklch(7% 0.006 95);
  --ground-deep:   oklch(4% 0.004 95);
  --raised:        oklch(11% 0.006 95);
  --graphite:      oklch(15% 0.008 95);
  --graphite-2:    oklch(19% 0.008 95);

  /* Gold system */
  --gold:          oklch(84% 0.19 80.46);
  --gold-rich:     oklch(77% 0.13 82);
  --gold-deep:     oklch(61% 0.085 78);
  --gold-pale:     oklch(86% 0.07 84);

  /* Secondary and state */
  --patina:        oklch(70% 0.12 188);
  --patina-deep:   oklch(49% 0.08 188);

  /* Text — neutral at every tier; the surfaces carry the warmth */
  --champagne:     oklch(91% 0 0);
  --text:          oklch(88% 0 0);
  --muted:         oklch(72% 0 0);
  --faint:         oklch(62% 0 0);

  --rule:          oklch(78% 0 0 / 0.16);
  --rule-gold:     oklch(74% 0.09 82 / 0.6);

  --display: "Alumni Sans", "Albert Sans", Arial, sans-serif;
  --body:    "Albert Sans", "Avenir Next", "Helvetica Neue", Arial, system-ui, sans-serif;
  --mono:    ui-monospace, SFMono-Regular, "Roboto Mono", Consolas, monospace;

  /* Emil Kowalski: easing is the most important part of an animation, and the
     built-ins lack strength. Everything here is under 300ms. */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --fast: 140ms;
  --base: 200ms;

  /* Single theme, on purpose: this page is the same black a
     reading room is. See the note where the paper theme used to be. */
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--body);
  font-size: 1.02rem;
  line-height: 1.75;
  -webkit-font-smoothing: antialiased;
}

.wrap {
  max-width: 74rem;
  margin: 0 auto;
  padding-inline: 24px;
}

/* ---------------------------------------------------------------- type --- */

h1, h2 {
  font-family: var(--display);
  color: var(--champagne);
  text-wrap: balance;
  margin: 0;
}

/* The weight inversion is deliberate: the hero is thin so the page breathes,
   and section anchors carry more weight to ground each block. */
h1 {
  font-size: clamp(3.4rem, 8vw, 5.6rem);
  font-weight: 100;
  line-height: 1.02;
  letter-spacing: -0.01em;
}

h2 {
  font-size: clamp(2.4rem, 4vw, 3.4rem);
  font-weight: 300;
  line-height: 1.04;
}

h3 {
  font-family: var(--body);
  font-size: 1.18rem;
  font-weight: 500;
  line-height: 1.35;
  color: var(--champagne);
  margin: 0 0 8px;
}

p { margin: 0 0 1.1rem; max-width: 68ch; }
strong { color: var(--champagne); font-weight: 600; }

.eyebrow {
  font-family: var(--mono);
  font-size: 0.7rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.18em;
  color: var(--gold);
  margin: 0 0 20px;
}

.lead { font-size: 1.18rem; line-height: 1.7; color: var(--text); }
.small { font-size: 0.9rem; color: var(--muted); }

a { color: var(--gold); text-decoration-color: var(--rule-gold); text-underline-offset: 3px; }
a:hover { color: var(--gold-pale); }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 3px; border-radius: 2px; }

/* ----------------------------------------------------------------- nav --- */

.nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding-block: 22px;
  border-bottom: 1px solid var(--rule);
}

.lockup { display: flex; align-items: center; gap: 12px; text-decoration: none; }
.lockup img { width: 34px; height: 34px; border-radius: 7px; display: block; }
.lockup span {
  font-family: var(--display);
  font-weight: 400;
  font-size: 1.3rem;
  text-transform: uppercase;
  letter-spacing: 0.15em;
  color: var(--champagne);
}

.nav-links { display: flex; gap: 22px; font-size: 0.9rem; }
.nav-links a { color: var(--muted); text-decoration: none; }
.nav-links a:hover { color: var(--gold); }

/* ---------------------------------------------------------------- hero --- */

.hero {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 64px;
  align-items: center;
  padding-block: clamp(48px, 6vw, 80px);
}

.hero-film {
  position: relative;
  border: 1px solid var(--rule);
  border-radius: 3px;
  overflow: hidden;
  background: var(--ground-deep);
  /* Locked to the film's own 9:16. Letting the column set the width made the
     frame wider than the film, and `cover` then cropped the title the film
     carries in its final seconds. */
  aspect-ratio: 9 / 16;
  width: min(100%, 320px);
  margin-inline: auto;
}
.hero-film video { width: 100%; height: 100%; object-fit: contain; display: block; }
/* A hairline seam in gold, the one brand-bearing accent on the frame. */
.hero-film::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 1px solid var(--rule-gold);
  pointer-events: none;
}

.film-caption {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 10px;
}

.cta-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 34px; }

.btn {
  font-family: var(--body);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 12px 22px;
  border-radius: 2px;
  border: 1px solid var(--rule-gold);
  text-decoration: none;
  display: inline-block;
  transition: background var(--fast) var(--ease),
              color var(--fast) var(--ease),
              transform var(--fast) var(--ease);
}
.btn-primary { background: var(--gold); color: oklch(14% 0.018 95); border-color: var(--gold); }
.btn-primary:hover { background: var(--gold-pale); color: oklch(14% 0.018 95); }
.btn-ghost { background: transparent; color: var(--champagne); border-color: var(--rule); }
.btn-ghost:hover { border-color: var(--rule-gold); color: var(--gold); }
/* Tactile feedback, not decoration. */
.btn:active { transform: scale(0.97); }

/* -------------------------------------------------------------- section --- */

section { padding-block: clamp(56px, 8vw, 104px); border-top: 1px solid var(--rule); }
.section-head { max-width: 60ch; margin-bottom: 48px; }
.section-head p { margin-top: 18px; }

.grid { display: grid; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }

.cell {
  background: var(--raised);
  padding: 28px;
  transition: background var(--base) var(--ease);
}
.cell:hover { background: var(--graphite); }
.cell p { font-size: 0.96rem; color: var(--muted); margin: 0; }
.cell .tag {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--gold-deep);
  display: block;
  margin-bottom: 14px;
}

/* The honesty block. Patina marks the "is", gold-deep the "is not": verdigris
   carries state in this system, and scope is a state. */
.claims { display: grid; grid-template-columns: 1fr 1fr; gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.claim { background: var(--raised); padding: 32px; }
.claim h3 { margin-bottom: 16px; }
.claim ul { margin: 0; padding-left: 1.1rem; }
.claim li { margin-bottom: 10px; color: var(--muted); font-size: 0.96rem; }
.claim.is  { border-top: 2px solid var(--patina); }
.claim.isnt { border-top: 2px solid var(--gold-deep); }

/* --------------------------------------------------------------- window --- */
/* A viewport, not a card. Every PACS lays its numbers in the corners of the
   image, so this does too - but only numbers the file actually contains. No
   tube voltage, no tube current: the phantom is synthetic and has neither, and
   inventing them in a medical interface is the exact failure the rest of this
   project exists to avoid. */

.window-demo { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 1px;
               background: var(--rule); border: 1px solid var(--rule); }
.viewport-pane { background: #000; padding: 26px; display: flex; flex-direction: column;
                 align-items: center; justify-content: center; }
.control-pane { background: var(--raised); padding: 28px; }

/* The image is inset so the annotations land on the black around it, which
   is where a workstation puts them. Over the picture they are unreadable the
   moment the anatomy is bright. */
.viewport { position: relative; width: 100%; max-width: 310px; padding: 54px 0 42px; }
.frame { position: relative; }
.viewport canvas {
  width: 100%; aspect-ratio: 1; height: auto; display: block;
  image-rendering: pixelated;
  border: 1px solid var(--rule);
  background: #000;
  cursor: crosshair;
  touch-action: none;              /* the probe owns the drag */
}
.viewport canvas:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.corner {
  position: absolute;
  font-family: var(--mono);
  font-size: 0.6rem;
  line-height: 1.6;
  letter-spacing: 0.06em;
  color: oklch(72% 0 0 / 0.62);
  pointer-events: none;
  user-select: none;
  text-shadow: 0 1px 3px #000;
  font-variant-numeric: tabular-nums;
}
.corner.tl { top: 0; left: 1px; }
.corner.tr { top: 0; right: 1px; text-align: right; }
.corner.bl { bottom: 2px; left: 1px; }
.corner b { color: var(--patina); font-weight: 500; }
.corner .now { color: var(--champagne); }

/* The probe. A crosshair the pointer drags, the finger drags, or the arrow
   keys walk - because the device this is about has no hover at all. */
.probe {
  position: absolute;
  width: 13px; height: 13px;
  margin: -7px 0 0 -7px;
  pointer-events: none;
  opacity: 0;
  transition: opacity var(--fast) var(--ease);
}
.probe.on { opacity: 1; }
.probe::before, .probe::after {
  content: ""; position: absolute; background: var(--gold);
}
.probe::before { left: 50%; top: 0; width: 1px; height: 100%; transform: translateX(-50%); }
.probe::after  { top: 50%; left: 0; height: 1px; width: 100%; transform: translateY(-50%); }

.hint {
  font-family: var(--mono);
  font-size: 0.6rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
  margin-top: 14px;
  text-align: center;
}

.presets { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 0 0 26px; }
.preset {
  font-family: var(--body);
  text-align: left;
  padding: 10px 13px;
  border-radius: 2px;
  border: 1px solid var(--rule);
  background: var(--graphite);
  color: var(--muted);
  cursor: pointer;
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease),
              background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.preset .name { display: block; font-size: 0.9rem; font-weight: 500; }
.preset .hw {
  display: block; font-family: var(--mono); font-size: 0.6rem;
  letter-spacing: 0.08em; opacity: 0.72; margin-top: 3px;
  font-variant-numeric: tabular-nums;
}
.preset:hover { color: var(--champagne); border-color: var(--rule-gold); }
.preset[aria-pressed="true"] {
  color: var(--gold); border-color: var(--rule-gold); background: var(--graphite-2);
}
.preset:active { transform: scale(0.97); }

.slider { margin-bottom: 24px; }
.slider label {
  display: flex; justify-content: space-between; align-items: baseline;
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.12em;
  text-transform: uppercase; color: var(--muted); margin-bottom: 9px;
}
.slider label b { color: var(--gold); font-variant-numeric: tabular-nums; letter-spacing: 0.04em; }
/* No transition on the range: a drag is a high-frequency interaction, and the
   rule for those is no animation at all. */
input[type="range"] { width: 100%; accent-color: var(--gold); background: transparent; display: block; }

/* The scale a number sits on. Air, water and bone are where the Hounsfield
   scale is defined, so they are the marks worth printing. */
.scale {
  display: flex; justify-content: space-between;
  font-family: var(--mono); font-size: 0.58rem; letter-spacing: 0.06em;
  color: var(--faint); margin-top: 7px; font-variant-numeric: tabular-nums;
}

.note {
  margin-top: 26px; padding: 16px 18px;
  border: 1px solid var(--rule); border-left: 2px solid var(--patina);
  background: var(--ground-deep);
  font-size: 0.88rem; line-height: 1.65; color: var(--muted);
}
.note strong { color: var(--champagne); }
.note p { margin: 0; max-width: none; }

/* --------------------------------------------------------------- proof --- */

.figures { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1px; background: var(--rule); border: 1px solid var(--rule); }
.figure { background: var(--raised); padding: 26px; }
.figure dt {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--faint);
  margin-bottom: 10px;
}
.figure dd {
  margin: 0;
  font-family: var(--display);
  font-weight: 300;
  font-size: 2.6rem;
  line-height: 1;
  color: var(--gold);
  font-variant-numeric: tabular-nums;
}
.figure .unit { font-size: 0.9rem; color: var(--muted); font-family: var(--body); display: block; margin-top: 8px; }

/* -------------------------------------------------------------- article --- */
/* privacy.html and support.html share the shell and set their own rhythm. */

.doc { padding-block: clamp(48px, 7vw, 88px); max-width: 42rem; }
/* A document leads with its title, not with a hero. */
.doc h1 { font-size: clamp(2.3rem, 5vw, 3.2rem); font-weight: 300;
          line-height: 1.06; margin-bottom: 26px; }
.doc h2 { font-size: 1.5rem; font-weight: 400; margin: 48px 0 14px; }
.doc h2:first-of-type { margin-top: 32px; }
.doc ul { padding-left: 1.15rem; }
.doc li { margin-bottom: 10px; }
.doc code {
  font-family: var(--mono);
  font-size: 0.88em;
  background: var(--graphite);
  padding: 0.12em 0.4em;
  border-radius: 2px;
}

/* --------------------------------------------------------------- footer --- */

footer {
  border-top: 1px solid var(--rule);
  background: var(--ground-deep);
  padding-block: 44px;
  margin-top: 0;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 24px; justify-content: space-between; align-items: baseline; }
footer, footer p { color: var(--faint); font-size: 0.88rem; }
footer p { margin: 0; }
.footer-links { display: flex; gap: 20px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- load --- */
/* Content is visible by default and the entrance is added only where motion is
   welcome, so a reader who blocks animation still sees a finished page. */

@media (prefers-reduced-motion: no-preference) {
  .rise { animation: rise 460ms var(--ease) both; }
  .rise:nth-child(2) { animation-delay: 60ms; }
  .rise:nth-child(3) { animation-delay: 120ms; }
  .rise:nth-child(4) { animation-delay: 180ms; }
  .hero-film { animation: rise 620ms var(--ease) 120ms both; }
}

@keyframes rise {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: none; }
}

/* ---------------------------------------------------------- responsive --- */

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 40px; }
  .hero-film { width: min(100%, 280px); }
  .grid-3, .figures { grid-template-columns: repeat(2, 1fr); }
  .window-demo { grid-template-columns: 1fr; }
}

@media (max-width: 560px) {
  .wrap { padding-inline: 18px; }
  .grid-3, .grid-2, .claims, .figures { grid-template-columns: 1fr; }
  .nav-links { gap: 14px; font-size: 0.84rem; }
  .figure dd { font-size: 2.1rem; }
}

/* ------------------------------------------------------- sticky header --- */

.site-head {
  position: sticky; top: 0; z-index: 50;
  background: oklch(7% 0.006 95 / 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--rule);
}
.site-head .nav { border-bottom: none; padding-block: 14px; }
.head-cta {
  font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.1em;
  text-transform: uppercase; padding: 9px 15px; border-radius: 2px;
  border: 1px solid var(--rule-gold); color: var(--gold);
  text-decoration: none; white-space: nowrap;
  transition: background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.head-cta:hover { background: oklch(84% 0.19 80.46 / 0.1); color: var(--gold-pale); }
.head-cta:active { transform: scale(0.97); }

/* ------------------------------------------------------------ features --- */

.split { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 56px; align-items: center; }
.split.flip { grid-template-columns: 1.15fr 0.85fr; }

.steps { list-style: none; margin: 26px 0 0; padding: 0; }
.steps li {
  display: grid; grid-template-columns: 26px 1fr; gap: 14px;
  margin-bottom: 16px; font-size: 0.95rem; color: var(--muted);
}
.steps .n {
  font-family: var(--mono); font-size: 0.68rem; color: var(--gold);
  border: 1px solid var(--rule-gold); border-radius: 999px;
  width: 24px; height: 24px; display: flex; align-items: center;
  justify-content: center; margin-top: 1px;
}
.steps strong { color: var(--champagne); font-weight: 600; }

/* ----------------------------------------------------------------- mpr --- */

.mpr { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
       gap: 1px; background: var(--rule); border: 1px solid var(--rule); }

.plane-tabs { display: flex; gap: 8px; margin-bottom: 24px; }
.plane-tab {
  flex: 1; font-family: var(--body); font-size: 0.86rem; font-weight: 500;
  padding: 10px 8px; border-radius: 2px; cursor: pointer;
  border: 1px solid var(--rule); background: var(--graphite); color: var(--muted);
  transition: color var(--fast) var(--ease), border-color var(--fast) var(--ease),
              background var(--fast) var(--ease), transform var(--fast) var(--ease);
}
.plane-tab:hover { color: var(--champagne); border-color: var(--rule-gold); }
.plane-tab[aria-pressed="true"] {
  color: var(--gold); border-color: var(--rule-gold); background: var(--graphite-2);
}
.plane-tab:active { transform: scale(0.97); }

.mpr-canvas-wrap { width: 100%; max-width: 330px; margin-inline: auto; }
.mpr canvas {
  width: 100%; display: block; image-rendering: pixelated;
  border: 1px solid var(--rule); background: #000;
}

.facts { list-style: none; margin: 24px 0 0; padding: 0;
         font-family: var(--mono); font-size: 0.66rem; letter-spacing: 0.06em;
         color: var(--faint); }
.facts li { display: flex; justify-content: space-between; gap: 16px;
            padding: 7px 0; border-top: 1px solid var(--rule); }
.facts b { color: var(--muted); font-weight: 400; font-variant-numeric: tabular-nums; }

@media (max-width: 900px) {
  .split, .split.flip, .mpr { grid-template-columns: 1fr; gap: 32px; }
  .mpr { gap: 1px; }
}


/* ----------------------------------------------------------- features --- */

.cell ul { margin: 10px 0 0; padding-left: 1.05rem; }
.cell li { font-size: 0.92rem; color: var(--muted); margin-bottom: 7px; }
.cell li b { color: var(--champagne); font-weight: 500; }
.cell li .hu {
  font-family: var(--mono); font-size: 0.86em; color: var(--gold-deep);
  font-variant-numeric: tabular-nums;
}
.grid-feature { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 900px) { .grid-feature { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .grid-feature { grid-template-columns: 1fr; } }
