/* ============================================================
   BIOCRAFT MEDICAL
   Brand Identity v1.0 — four colours, Archivo + IBM Plex Mono.
   Layout language adapted from the supplied reference: centred
   section heads, hairline divider grids, rounded inset panels,
   compact mono buttons, generous vertical rhythm.
   ============================================================ */

/* ---- 01 · TOKENS ------------------------------------------ */

:root {
  --bone: #FAFBFC;
  --graphite: #262E38;
  --steel: #6E7884;
  --scan: #1F7BA6;
  --scan-lift: #3E9BCB;

  --bone-oklch: oklch(.985 .003 250);
  --graphite-oklch: oklch(.24 .02 250);
  --steel-oklch: oklch(.52 .015 250);
  --scan-oklch: oklch(.56 .105 238);
  --scan-lift-oklch: oklch(.66 .115 238);

  /* Permitted tints. Not new colours. */
  --steel-30: rgba(110, 120, 132, .28);
  --steel-18: rgba(110, 120, 132, .18);
  --steel-10: rgba(110, 120, 132, .10);
  --steel-06: rgba(110, 120, 132, .055);
  --rule-dark: rgba(250, 251, 252, .14);
  --panel-dark: rgba(250, 251, 252, .04);

  --sans: 'Archivo', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, monospace;

  --s1: 4px;  --s2: 8px;  --s3: 12px; --s4: 16px;
  --s5: 24px; --s6: 32px; --s7: 48px; --s8: 64px;
  --s9: 96px; --s10: 128px;

  --container: 1280px;
  --measure: 720px;
  --gutter: 32px;

  /* Corner radii — the reference's softened geometry. */
  --r-xs: 4px;
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 18px;
  --r-xl: 28px;

  /* Elevation, built from Graphite at low alpha so no new colour
     enters the system. Kept deliberately soft. */
  --lift-1: 0 1px 2px rgba(38, 46, 56, .04), 0 2px 6px rgba(38, 46, 56, .03);
  --lift-2: 0 2px 4px rgba(38, 46, 56, .04), 0 10px 24px rgba(38, 46, 56, .07);
  --lift-3: 0 4px 8px rgba(38, 46, 56, .05), 0 20px 48px rgba(38, 46, 56, .10);

  --ease: cubic-bezier(.22, .61, .36, 1);
  --ease-soft: cubic-bezier(.4, 0, .2, 1);
  --ease-out-expo: cubic-bezier(.16, 1, .3, 1);
  --t-fast: 180ms;
  --t-base: 280ms;
  --t-slow: 460ms;
}

@supports (color: oklch(.5 .1 240)) {
  :root {
    --bone: var(--bone-oklch);
    --graphite: var(--graphite-oklch);
    --steel: var(--steel-oklch);
    --scan: var(--scan-oklch);
    --scan-lift: var(--scan-lift-oklch);
  }
}

/* ---- 02 · RESET ------------------------------------------- */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 104px;
}

body {
  margin: 0;
  background: var(--bone);
  color: var(--graphite);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
@supports (overflow: clip) { body { overflow-x: clip; } }

img, svg { display: block; max-width: 100%; }
button, input, textarea, select { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--scan); outline-offset: 3px; border-radius: var(--r-xs); }
.on-graphite :focus-visible { outline-color: var(--scan-lift); }

/* ---- 03 · TYPOGRAPHY -------------------------------------- */

.display {
  font-weight: 700;
  font-size: clamp(2.5rem, 5.4vw, 4.5rem);
  letter-spacing: -.028em;
  line-height: 1.04;
  margin: 0;
  text-wrap: balance;
}

.h2 {
  font-weight: 600;
  font-size: clamp(1.875rem, 3.6vw, 3rem);
  letter-spacing: -.022em;
  line-height: 1.12;
  margin: 0;
  text-wrap: balance;
}

.h3 {
  font-weight: 600;
  font-size: 1.0625rem;
  letter-spacing: -.008em;
  line-height: 1.35;
  margin: 0;
}

.lead { font-size: 1.0625rem; line-height: 1.65; margin: 0; }
.body { margin: 0; max-width: 68ch; }
.body + .body { margin-top: var(--s4); }

.label {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
  margin: 0;
}

.data { font-family: var(--mono); font-size: .8125rem; line-height: 1.7; margin: 0; }

.accent { color: var(--scan); }
.on-graphite .accent { color: var(--scan-lift); }

/* ---- 04 · LAYOUT ------------------------------------------ */

.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }

.section { padding: 132px 0; }
.section-tight { padding: 88px 0; }
.subsection { margin-top: 104px; }

.section-graphite { background: var(--graphite); color: var(--bone); }
.section-graphite .label { color: rgba(250, 251, 252, .5); }

/* Centred section head — the reference's core hierarchy move.
   Headings centre; body copy below never does. */
.section-head {
  max-width: var(--measure);
  margin: 0 auto var(--s9);
  text-align: center;
}
.section-head .label { margin-bottom: var(--s4); }
.section-head .lead {
  color: var(--steel);
  margin: var(--s5) auto 0;
  max-width: 58ch;
}
.section-graphite .section-head .lead { color: rgba(250, 251, 252, .66); }

/* A rounded inset panel, alternating against the page ground. */
.panel-inset {
  background: var(--steel-06);
  border: 1px solid var(--steel-18);
  border-radius: var(--r-xl);
  padding: var(--s9) var(--s8);
}
.panel-inset-dark {
  background: var(--graphite);
  color: var(--bone);
  border-radius: var(--r-xl);
  padding: var(--s9) var(--s8);
}

.rule {
  height: 1px; background: var(--steel-30); border: 0; margin: 0;
  transform: scaleX(0); transform-origin: left center;
  transition: transform 760ms var(--ease);
}
.section-graphite .rule { background: var(--rule-dark); }
.rule.is-in, .is-in .rule { transform: scaleX(1); }

/* ---- 05 · HEADER ------------------------------------------ */

.header {
  position: sticky;
  top: 0;
  z-index: 60;
  background: rgba(250, 251, 252, .82);
  -webkit-backdrop-filter: saturate(160%) blur(14px);
  backdrop-filter: saturate(160%) blur(14px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.header.is-stuck { border-bottom-color: var(--steel-18); background: rgba(250, 251, 252, .93); }

.header-inner {
  display: flex;
  align-items: center;
  gap: var(--s5);
  height: 78px;
  transition: height var(--t-base) var(--ease);
}
.header.is-stuck .header-inner { height: 66px; }

.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: inherit; flex-shrink: 0; }
.brand-mark { width: 30px; height: auto; transition: transform var(--t-slow) var(--ease-out-expo); }
.brand:hover .brand-mark { transform: translateY(-1px); }
.brand-name { font-weight: 700; font-size: 1.25rem; letter-spacing: -.028em; line-height: 1; }

.nav { display: flex; align-items: center; gap: var(--s2); margin: 0 auto; }
.nav-item { position: relative; }

.nav-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--graphite);
  text-decoration: none;
  font-size: .9375rem;
  padding: 9px 14px;
  border-radius: var(--r-sm);
  background: transparent;
  border: 0;
  cursor: pointer;
  transition: background var(--t-fast) var(--ease), color var(--t-fast) var(--ease);
}
.nav-link:hover { background: var(--steel-10); }
.nav-link.is-active { color: var(--scan); }

.nav-caret {
  width: 9px; height: 9px;
  opacity: .55;
  transition: transform var(--t-base) var(--ease);
}
.nav-item:hover .nav-caret,
.nav-item:focus-within .nav-caret { transform: rotate(180deg); }

/* Dropdown — the reference's soft, elevated panel. */
.nav-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 50%;
  width: 540px;
  padding: var(--s3);
  background: var(--bone);
  border: 1px solid var(--steel-18);
  border-radius: var(--r-lg);
  box-shadow: var(--lift-3);
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 2px;
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px) scale(.985);
  transition: opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              visibility 0s linear var(--t-base);
}
.nav-item:hover .nav-panel,
.nav-item:focus-within .nav-panel {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0) scale(1);
  transition-delay: 0s;
}

.nav-panel-link {
  display: block;
  padding: 11px 13px;
  border-radius: var(--r-sm);
  text-decoration: none;
  color: var(--graphite);
  transition: background var(--t-fast) var(--ease), transform var(--t-fast) var(--ease);
  opacity: 0;
  transform: translateY(4px);
}
.nav-item:hover .nav-panel-link,
.nav-item:focus-within .nav-panel-link {
  opacity: 1;
  transform: none;
  transition: background var(--t-fast) var(--ease),
              opacity var(--t-base) var(--ease),
              transform var(--t-base) var(--ease);
}
/* Staggered entrance, capped so the menu never feels slow. */
.nav-panel-link:nth-child(1) { transition-delay: 30ms; }
.nav-panel-link:nth-child(2) { transition-delay: 60ms; }
.nav-panel-link:nth-child(3) { transition-delay: 90ms; }
.nav-panel-link:nth-child(4) { transition-delay: 110ms; }
.nav-panel-link:nth-child(5) { transition-delay: 130ms; }
.nav-panel-link:nth-child(6) { transition-delay: 150ms; }
.nav-panel-link:hover { background: var(--steel-10); }

.nav-panel-title { display: block; font-size: .9375rem; font-weight: 600; letter-spacing: -.008em; line-height: 1.3; }
.nav-panel-desc {
  display: block;
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--steel);
  margin-top: 4px;
}

.header-actions { display: flex; align-items: center; gap: var(--s2); flex-shrink: 0; }

/* The nav carries its own CTA for the mobile sheet; on desktop the
   header-actions copy is the one that shows. */
.nav > .btn { display: none; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--steel-18);
  border-radius: var(--r-sm);
  padding: 10px 12px;
  cursor: pointer;
  line-height: 0;
  transition: background var(--t-fast) var(--ease);
}
.nav-toggle:hover { background: var(--steel-10); }
.nav-toggle-bar {
  display: block; width: 18px; height: 2px;
  background: var(--graphite); border-radius: 1px;
  transition: transform var(--t-base) var(--ease), opacity var(--t-fast) var(--ease);
}
.nav-toggle-bar + .nav-toggle-bar { margin-top: 4px; }
.nav-toggle-bar:last-child { background: var(--scan); width: 12px; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-6px) rotate(-45deg); width: 18px; }

/* ---- 06 · BUTTONS ----------------------------------------- */
/* Compact, mono, uppercase — the reference's button voice. */

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 44px;
  padding: 12px 20px;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--graphite);
  border-radius: var(--r-sm);
  background: var(--graphite);
  color: var(--bone);
  cursor: pointer;
  overflow: hidden;
  transition: background var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              color var(--t-base) var(--ease),
              transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}
.btn:hover { transform: translateY(-2px); box-shadow: var(--lift-2); background: var(--scan); border-color: var(--scan); }
.btn:active { transform: translateY(0); box-shadow: var(--lift-1); }

.btn-ghost { background: transparent; color: var(--graphite); border-color: var(--steel-30); }
.btn-ghost:hover { background: var(--bone); color: var(--scan); border-color: var(--scan); }

.btn-soft { background: var(--steel-10); color: var(--graphite); border-color: transparent; }
.btn-soft:hover { background: var(--steel-18); color: var(--graphite); border-color: transparent; }

.hero .btn, .section-graphite .btn, .panel-inset-dark .btn {
  background: var(--bone); color: var(--graphite); border-color: var(--bone);
}
.hero .btn:hover, .section-graphite .btn:hover, .panel-inset-dark .btn:hover {
  background: var(--scan-lift); border-color: var(--scan-lift); color: var(--graphite);
}
.hero .btn-ghost, .section-graphite .btn-ghost, .panel-inset-dark .btn-ghost {
  background: transparent; color: var(--bone); border-color: var(--rule-dark);
}
.hero .btn-ghost:hover, .section-graphite .btn-ghost:hover, .panel-inset-dark .btn-ghost:hover {
  color: var(--scan-lift); border-color: var(--scan-lift); background: rgba(250, 251, 252, .05);
}

.btn-arrow { display: inline-block; transition: transform var(--t-base) var(--ease); }
.btn:hover .btn-arrow { transform: translateX(4px); }

/* Mono accent micro-link with a drawing underline. */
.link-mono {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  position: relative;
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--scan);
  text-decoration: none;
  padding-bottom: 4px;
}
.link-mono::after {
  content: '';
  position: absolute;
  left: 0; bottom: 0; width: 100%; height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-base) var(--ease);
}
.link-mono:hover::after { transform: scaleX(1); transform-origin: left center; }
.link-mono .btn-arrow { transition: transform var(--t-base) var(--ease); }
.link-mono:hover .btn-arrow { transform: translateX(4px); }
.on-graphite .link-mono, .section-graphite .link-mono { color: var(--scan-lift); }

/* ---- 07 · HERO -------------------------------------------- */

.hero {
  position: relative;
  background: var(--graphite);
  color: var(--bone);
  padding: var(--s8) 0 var(--s9);
  overflow: hidden;
  isolation: isolate;
}

/* Gentle background movement — a drifting measurement grid at very
   low opacity. Never competes with the type. */
.hero-grid-bg {
  position: absolute;
  inset: -60px -60px;
  z-index: -1;
  background-image:
    linear-gradient(to right, rgba(250, 251, 252, .045) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(250, 251, 252, .045) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 25%, transparent 78%);
  mask-image: radial-gradient(ellipse 78% 62% at 50% 42%, #000 25%, transparent 78%);
  animation: drift 48s linear infinite;
}
@keyframes drift {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(64px, 64px, 0); }
}

/* Copy left, the anatomy stage on the right at roughly 40%. */
.hero-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr);
  gap: var(--s9);
  align-items: start;
}

.hero-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: var(--s3);
  padding: 7px 16px 7px 12px;
  border: 1px solid var(--rule-dark);
  border-radius: 999px;
  background: rgba(250, 251, 252, .035);
  margin-bottom: var(--s6);
}
.hero-eyebrow .label { color: rgba(250, 251, 252, .68); }
.hero-eyebrow-dash { width: 22px; height: 2px; background: var(--scan-lift); border-radius: 1px; flex-shrink: 0; }

.hero-lead {
  color: rgba(250, 251, 252, .7);
  margin: var(--s6) 0 0;
  max-width: 52ch;
  font-size: 1.125rem;
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s3); margin-top: var(--s7); }

/* ---- 07b · THE ANATOMY STAGE ------------------------------ */

.hero-stage { position: relative; }

.stage-frame {
  position: relative;
  aspect-ratio: 4 / 5;
  border: 1px solid var(--rule-dark);
  border-radius: var(--r-xl);
  background: rgba(250, 251, 252, .022);
  overflow: hidden;
  isolation: isolate;
}

/* Ambient layer: slow-moving light, the §07 slice field cycling
   through the series, and a few restrained motes. */
.stage-ambient {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  display: block;
}

/* WebGL layer, transparent so the ambient reads through it. */
.stage-model { position: absolute; inset: 0; z-index: 1; }
.stage-model canvas {
  width: 100% !important;
  height: 100% !important;
  display: block;
  opacity: 0;
  transition: opacity 900ms var(--ease);
}
.stage-model.is-ready canvas { opacity: 1; }

.stage-loading {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  z-index: 2;
  color: rgba(250, 251, 252, .45);
  transition: opacity var(--t-slow) var(--ease);
}
.stage-loading.is-done { opacity: 0; pointer-events: none; }

.stage-key {
  list-style: none;
  margin: var(--s4) 0 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s2) var(--s5);
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(250, 251, 252, .45);
}
.stage-key li { display: flex; align-items: center; gap: 8px; }
.stage-key-dot {
  width: 14px; height: 4px; border-radius: 2px;
  background: rgba(250, 251, 252, .45);
  flex-shrink: 0;
}
.stage-key-dot.is-part { background: var(--scan-lift); }

.slice-readout {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: baseline;
  gap: var(--s2) var(--s4);
  margin-top: var(--s5);
  padding-top: var(--s3);
  border-top: 1px solid var(--rule-dark);
}
.slice-readout > * { min-width: 0; }
.slice-readout .label { color: rgba(250, 251, 252, .48); }
.slice-readout .data {
  color: var(--scan-lift);
  font-size: .75rem;
  letter-spacing: .08em;
  transition: opacity var(--t-base) var(--ease);
}

/* ---- 08 · DIVIDER GRID ------------------------------------ */
/* The reference's signature: hairline verticals that overshoot the
   horizontal rules, with no outer box. */

.divider-grid {
  position: relative;
  display: grid;
  border-top: 1px solid var(--steel-18);
  border-bottom: 1px solid var(--steel-18);
}
.divider-grid > * { position: relative; }
/* Flush with the grid's own top and bottom rules — a closed
   rectangle, not verticals poking past the frame. */
.divider-grid > *::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--steel-18);
}
.divider-grid > *:last-child::after {
  content: '';
  position: absolute;
  right: 0; top: 0; bottom: 0;
  width: 1px;
  background: var(--steel-18);
}
.section-graphite .divider-grid { border-color: var(--rule-dark); }
.section-graphite .divider-grid > *::before,
.section-graphite .divider-grid > *:last-child::after { background: var(--rule-dark); }

/* The rule between rows — without it, a 3- or 4-up grid with more
   than one row reads as the top and bottom cells sharing a cell. */
.divider-grid.grid-3 > *:nth-child(n+4) { border-top: 1px solid var(--steel-18); }
.divider-grid.grid-4 > *:nth-child(n+5) { border-top: 1px solid var(--steel-18); }
.section-graphite .divider-grid.grid-3 > *:nth-child(n+4),
.section-graphite .divider-grid.grid-4 > *:nth-child(n+5) { border-top-color: var(--rule-dark); }

.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* ---- 09 · CARDS ------------------------------------------- */

.card { position: relative; }

/* Everything interactive lives on this INNER wrapper, never on .card
   itself. .card is the actual grid item — it carries the shared
   divider lines — and a transformed grid item paints above all its
   siblings regardless of geometry, which would erase the neighbouring
   borders. Confining effects to .card-surface keeps them in their
   own cell. Nothing here moves the cell: the grid stays rigid. */
.card-surface {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: var(--s3);
  height: 100%;
  padding: var(--s7) var(--s6);
  background: transparent;
  transition: background var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease);
}

/* Hover and keyboard focus share one state: a 5% Scan tint inside the
   cell and a slightly stronger ring over the shared hairlines. The
   inset shadow draws the ring without affecting layout — and unlike
   `transform`, box-shadow creates no stacking context, so it cannot
   paint over an adjacent cell's border. */
.divider-grid .card:hover .card-surface,
.divider-grid .card:focus-within .card-surface {
  background: rgba(31, 123, 166, .05);
  box-shadow: inset 0 0 0 1px var(--steel-30);
}

/* A thin accent rule drawing left to right along the bottom edge. */
.card-surface::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 2px;
  background: var(--scan);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform var(--t-base) var(--ease);
}
.divider-grid .card:hover .card-surface::after,
.divider-grid .card:focus-within .card-surface::after { transform: scaleX(1); }

.card-index {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .12em;
  color: var(--scan);
  opacity: .55;                       /* muted until the cell is active */
  margin: 0 0 var(--s4);
  transition: opacity var(--t-base) var(--ease);
}
.divider-grid .card:hover .card-index,
.divider-grid .card:focus-within .card-index { opacity: 1; }

/* The heading is the only thing that moves, and only by 3px. The
   description and category label stay put. */
.divider-grid .card .h3 { transition: transform var(--t-base) var(--ease); }
.divider-grid .card:hover .h3,
.divider-grid .card:focus-within .h3 { transform: translateX(3px); }

.card-body { color: var(--graphite); font-size: .9375rem; margin: 0; }
.card-spec {
  margin-top: auto;
  padding-top: var(--s5);
  color: var(--steel);
  font-size: .75rem;
  letter-spacing: .06em;
}

/* Entrance: a shorter travel than the site default, run once. The
   stagger itself is set per-grid via data-stagger. */
.supply-grid > .card.reveal { transform: translateY(10px); }
.supply-grid > .card.reveal.is-in { transform: none; }

/* Standalone rounded cards, used for the imagery slots. */
.tile-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: var(--s5); }

.tile {
  border: 1px solid var(--steel-18);
  border-radius: var(--r-lg);
  overflow: hidden;
  background: var(--bone);
  transition: transform var(--t-base) var(--ease),
              box-shadow var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease);
}
.tile:hover { transform: translateY(-4px); box-shadow: var(--lift-2); border-color: var(--steel-30); }
.tile-media { background: var(--steel-06); overflow: hidden; }
.tile-media svg { width: 100%; height: auto; transition: transform 700ms var(--ease); }
.tile:hover .tile-media svg { transform: scale(1.035); }
.tile-caption { padding: var(--s4) var(--s5); border-top: 1px solid var(--steel-18); }

/* ---- 10 · PROCESS (workflow) ------------------------------ */
/* Two columns: a sticky argument on the left, five steps on the
   right. Every step names who is responsible — Biocraft coordinates,
   Protomed designs and manufactures, the surgical team approves. */

.flow-section { position: relative; isolation: isolate; }

/* Technical grid, static and very faint — it sits under the content
   without competing with it. No overflow clipping here: that would
   turn the section into a scroll container and kill the sticky column. */
.flow-grid-bg {
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, rgba(250, 251, 252, .035) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(250, 251, 252, .035) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse 72% 60% at 50% 45%, #000 20%, transparent 82%);
  mask-image: radial-gradient(ellipse 72% 60% at 50% 45%, #000 20%, transparent 82%);
}

.flow-layout {
  display: grid;
  grid-template-columns: minmax(0, .88fr) minmax(0, 1.12fr);
  gap: var(--s9);
  align-items: start;
}

.flow-intro { position: sticky; top: 104px; }
.flow-intro .label { margin-bottom: var(--s4); }
.flow-intro .h2 { margin-bottom: var(--s5); }
.flow-intro-lead {
  color: rgba(250, 251, 252, .66);
  max-width: 42ch;
  margin-bottom: var(--s7);
}

/* ---- The steps ------------------------------------------- */

.flow-list { list-style: none; margin: 0; padding: 0; }

.flow-item {
  position: relative;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr);
  gap: var(--s5);
  padding-bottom: var(--s4);
}
.flow-item:last-child { padding-bottom: 0; }

/* The rail: a track from this step's number to the next one, and an
   accent fill that grows over it once the step is behind you. */
.flow-item::before,
.flow-item::after {
  content: '';
  position: absolute;
  left: 19px;
  top: 46px;
  bottom: 10px;
  width: 2px;
  border-radius: 1px;
}
.flow-item::before { background: rgba(250, 251, 252, .10); }
.flow-item::after {
  background: var(--scan-lift);
  transform: scaleY(0);
  transform-origin: top center;
  transition: transform 340ms var(--ease);
}
.flow-item.is-done::after { transform: scaleY(1); }
.flow-item:last-child::before,
.flow-item:last-child::after { display: none; }

.flow-rail { position: relative; z-index: 1; }

.flow-num {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border: 1px solid rgba(250, 251, 252, .14);
  border-radius: 50%;
  background: var(--graphite);
  font-family: var(--mono);
  font-size: .75rem;
  letter-spacing: .06em;
  color: rgba(250, 251, 252, .5);
  transition: color var(--t-base) var(--ease),
              border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.flow-item.is-done .flow-num { color: rgba(62, 155, 203, .9); border-color: rgba(62, 155, 203, .42); }
.flow-item.is-current .flow-num {
  color: var(--scan-lift);
  border-color: var(--scan-lift);
  background: rgba(62, 155, 203, .10);
}

.flow-card {
  position: relative;
  border: 1px solid rgba(250, 251, 252, .10);
  border-radius: var(--r-lg);
  background: rgba(250, 251, 252, .02);
  overflow: hidden;
  transition: border-color var(--t-base) var(--ease),
              background var(--t-base) var(--ease);
}
.flow-card:hover { border-color: rgba(250, 251, 252, .2); }
.flow-item.is-current .flow-card {
  border-color: rgba(62, 155, 203, .45);
  background: rgba(62, 155, 203, .06);
}
.flow-item.is-current .flow-card:hover { border-color: rgba(62, 155, 203, .58); }

/* Accent bar down the leading edge of the open card. */
.flow-card::before {
  content: '';
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 3px;
  background: var(--scan-lift);
  transform: scaleY(0);
  transition: transform 300ms var(--ease);
}
.flow-item.is-current .flow-card::before { transform: scaleY(1); }

.flow-head {
  width: 100%;
  display: grid;
  grid-template-columns: 40px minmax(0, 1fr) 16px;
  align-items: center;
  gap: var(--s4);
  padding: var(--s5);
  background: none;
  border: 0;
  text-align: left;
  cursor: pointer;
  color: rgba(250, 251, 252, .72);
  transition: color var(--t-base) var(--ease);
}
.flow-item.is-current .flow-head { color: var(--bone); }

/* Icon sits in a tile, filling with the accent when the step is open. */
.flow-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  border-radius: var(--r-md);
  background: rgba(250, 251, 252, .06);
  color: rgba(250, 251, 252, .5);
  transition: background var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.flow-icon svg { width: 20px; height: 20px; display: block; }
.flow-item.is-done .flow-icon { background: rgba(62, 155, 203, .14); color: rgba(62, 155, 203, .9); }
.flow-item.is-current .flow-icon { background: var(--scan-lift); color: var(--graphite); }

.flow-title { font-weight: 600; font-size: 1.0625rem; letter-spacing: -.01em; }

.flow-chevron {
  width: 16px;
  height: 16px;
  color: rgba(250, 251, 252, .4);
  transition: transform var(--t-base) var(--ease), color var(--t-base) var(--ease);
}
.flow-chevron svg { width: 100%; height: 100%; display: block; }
.flow-item.is-current .flow-chevron { transform: rotate(180deg); color: var(--scan-lift); }

/* Height-animated disclosure: 0fr → 1fr needs no measured pixel value. */
.flow-body {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 340ms var(--ease);
}
.flow-body > div { overflow: hidden; }
.flow-body p {
  margin: 0;
  /* Aligns under the title, past the icon tile. */
  padding: 0 var(--s5) var(--s5) calc(var(--s5) + 40px + var(--s4));
  font-size: .9375rem;
  line-height: 1.6;
  color: rgba(250, 251, 252, .64);
  max-width: 54ch;
}
.flow-item.is-current .flow-body { grid-template-rows: 1fr; }

/* ---- 11 · SPEC TABLE -------------------------------------- */

.spec-table { width: 100%; border-collapse: collapse; }
.spec-table th, .spec-table td {
  text-align: left;
  padding: var(--s4) var(--s5) var(--s4) 0;
  border-bottom: 1px solid var(--steel-18);
  vertical-align: top;
}
.spec-table tr:last-child th, .spec-table tr:last-child td { border-bottom: 0; }
.spec-table th {
  font-family: var(--mono);
  font-size: .6875rem;
  font-weight: 400;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
  white-space: nowrap;
  width: 1%;
}
.spec-table td { font-size: .9375rem; }
.spec-table td.mono { font-family: var(--mono); font-size: .8125rem; }
.section-graphite .spec-table th, .panel-inset-dark .spec-table th { color: rgba(250, 251, 252, .5); }
.section-graphite .spec-table th, .section-graphite .spec-table td,
.panel-inset-dark .spec-table th, .panel-inset-dark .spec-table td { border-color: var(--rule-dark); }

/* ---- 12 · SPLIT + PANELS ---------------------------------- */

.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: var(--s9); align-items: start; }
.split-wide { grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); }
/* Side-by-side cards match height rather than ragging. */
.split-stretch { align-items: stretch; gap: var(--s6); }
.split-stretch > * { height: 100%; }

.note-card {
  background: var(--bone);
  border: 1px solid var(--steel-18);
  border-left: 2px solid var(--scan);
  border-radius: var(--r-md);
  padding: var(--s6);
  box-shadow: var(--lift-1);
}
.note-card-plain { background: var(--bone); border: 1px solid var(--steel-18); border-radius: var(--r-md); padding: var(--s6); box-shadow: var(--lift-1); }

.cert-list { list-style: none; margin: 0; padding: 0; }
.cert-item {
  display: flex;
  gap: var(--s4);
  padding: var(--s4) var(--s3);
  border-radius: var(--r-sm);
  border-bottom: 1px solid var(--steel-18);
  transition: background var(--t-fast) var(--ease);
}
.cert-item:hover { background: var(--steel-06); }
.cert-item:last-child { border-bottom: 0; }
.cert-key { font-family: var(--mono); font-size: .8125rem; min-width: 148px; flex-shrink: 0; color: var(--graphite); }
.cert-val { color: var(--graphite); font-size: .9375rem; }

/* ---- 13 · FORM ------------------------------------------- */

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--s5); }
.field { position: relative; display: flex; flex-direction: column; gap: var(--s2); }
.field-wide { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: .6875rem;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--steel);
  transition: color var(--t-fast) var(--ease);
}
.field:focus-within label { color: var(--scan); }

.field input, .field select, .field textarea {
  background: var(--bone);
  border: 1px solid var(--steel-18);
  border-radius: var(--r-sm);
  padding: 13px 15px;
  font-size: .9375rem;
  font-family: var(--sans);
  min-height: 48px;
  transition: border-color var(--t-fast) var(--ease), box-shadow var(--t-fast) var(--ease);
  -webkit-appearance: none;
  appearance: none;
}
.field select {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5 6 6.5l5-5' fill='none' stroke='%236E7884' stroke-width='1.5'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 15px center;
  background-size: 12px;
  padding-right: 40px;
}
.field textarea { min-height: 136px; resize: vertical; }
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--steel-30); }
.field input:focus, .field select:focus, .field textarea:focus {
  border-color: var(--scan);
  box-shadow: 0 0 0 3px rgba(31, 123, 166, .12);
  outline: none;
}

.field-hint { font-size: .8125rem; color: var(--graphite); margin: 0; }
.form-note { margin: var(--s5) 0 0; font-size: .8125rem; color: var(--graphite); max-width: 60ch; }
.form-status { margin: var(--s4) 0 0; font-family: var(--mono); font-size: .8125rem; color: var(--scan); min-height: 1.7em; }

/* ---- 14 · FOOTER ------------------------------------------ */

.footer { background: var(--graphite); color: var(--bone); padding: var(--s9) 0 var(--s6); }
.footer .label { color: rgba(250, 251, 252, .42); }

.footer-top {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) repeat(3, minmax(0, 1fr));
  gap: var(--s8) var(--s7);
  padding-bottom: var(--s8);
  border-bottom: 1px solid var(--rule-dark);
}

.footer-links { list-style: none; margin: var(--s4) 0 0; padding: 0; }
.footer-links li { margin-bottom: 10px; }
.footer-links a {
  position: relative;
  color: rgba(250, 251, 252, .7);
  text-decoration: none;
  font-size: .9375rem;
  transition: color var(--t-fast) var(--ease);
}
.footer-links a::after {
  content: '';
  position: absolute;
  left: 0; bottom: -2px; width: 100%; height: 1px;
  background: var(--scan-lift);
  transform: scaleX(0);
  transform-origin: right center;
  transition: transform var(--t-base) var(--ease);
}
.footer-links a:hover { color: var(--bone); }
.footer-links a:hover::after { transform: scaleX(1); transform-origin: left center; }

.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--s4); padding-top: var(--s6); }
.footer-brand { display: flex; align-items: center; gap: 11px; margin-bottom: var(--s4); }
.footer-brand .brand-mark { width: 34px; }
.footer-brand .brand-name { font-size: 1.375rem; }

.contact-link {
  color: var(--graphite);
  text-decoration: none;
  border-bottom: 1px solid var(--scan);
  padding-bottom: 1px;
  transition: color var(--t-fast) var(--ease);
}
.contact-link:hover { color: var(--scan); }
.footer .contact-link, .section-graphite .contact-link { color: var(--bone); border-bottom-color: var(--scan-lift); }
.footer .contact-link:hover, .section-graphite .contact-link:hover { color: var(--scan-lift); }

/* ---- 15 · REVEAL + PARALLAX ------------------------------- */

.reveal { opacity: 0; transform: translateY(18px); transition: opacity var(--t-slow) var(--ease), transform var(--t-slow) var(--ease); }
.reveal.is-in { opacity: 1; transform: none; }

/* Depth: elements drift a little slower than the page. */
.parallax { will-change: transform; }

/* ---- 16 · PLACEHOLDER FLAG -------------------------------- */

.tbc {
  display: inline-block;
  font-family: var(--mono);
  font-size: .625rem;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--scan);
  border: 1px dashed var(--scan);
  border-radius: var(--r-xs);
  padding: 1px 6px;
  white-space: nowrap;
}
.section-graphite .tbc, .footer .tbc { color: var(--scan-lift); border-color: var(--scan-lift); }

/* ---- 17 · UTILITY ----------------------------------------- */

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.skip-link {
  position: absolute; top: -60px; left: var(--gutter); z-index: 100;
  background: var(--graphite); color: var(--bone);
  padding: 12px 18px; border-radius: var(--r-sm); text-decoration: none;
  transition: top var(--t-base) var(--ease);
}
.skip-link:focus { top: 12px; }

.center { text-align: center; }
.actions-center { display: flex; justify-content: center; flex-wrap: wrap; gap: var(--s3); }

/* ---- 18 · RESPONSIVE -------------------------------------- */

@media (max-width: 1080px) {
  .section { padding: 104px 0; }
  .grid-3 { grid-template-columns: repeat(2, 1fr); }
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .tile-grid { grid-template-columns: repeat(2, 1fr); }
  .flow-layout { gap: var(--s7); }
  .footer-top { grid-template-columns: repeat(2, 1fr); }
  .panel-inset, .panel-inset-dark { padding: var(--s9) var(--s6); }
}

@media (max-width: 900px) {
  :root { --gutter: 24px; }

  .section { padding: 84px 0; }
  .section-tight { padding: 64px 0; }
  .subsection { margin-top: 72px; }
  .section-head { margin-bottom: var(--s8); }

  /* Nav becomes a full sheet. */
  .nav {
    position: fixed;
    inset: 78px 0 auto 0;
    margin: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--bone);
    border-bottom: 1px solid var(--steel-18);
    box-shadow: var(--lift-2);
    padding: var(--s3) var(--gutter) var(--s6);
    max-height: calc(100dvh - 78px);
    overflow-y: auto;
    opacity: 0;
    transform: translateY(-10px);
    pointer-events: none;
    transition: opacity var(--t-base) var(--ease), transform var(--t-base) var(--ease);
  }
  .nav.is-open { opacity: 1; transform: none; pointer-events: auto; }
  .nav-item { width: 100%; }
  .nav-link { width: 100%; justify-content: space-between; padding: var(--s4) 0; border-radius: 0; border-bottom: 1px solid var(--steel-18); font-size: 1rem; }
  .nav-link:hover { background: transparent; }

  /* Dropdown becomes an inline disclosure. */
  .nav-panel {
    position: static;
    width: 100%;
    transform: none;
    box-shadow: none;
    border: 0;
    border-bottom: 1px solid var(--steel-18);
    border-radius: 0;
    padding: var(--s2) 0 var(--s4);
    grid-template-columns: 1fr;
    display: none;
    opacity: 1;
    visibility: visible;
  }
  .nav-item.is-expanded .nav-panel { display: grid; }
  .nav-item.is-expanded .nav-caret { transform: rotate(180deg); }
  .nav-panel-link { opacity: 1; transform: none; padding: 11px 0; }

  .header-actions .btn { display: none; }
  .nav > .btn { display: inline-flex; margin-top: var(--s5); }
  .nav-toggle { display: block; }

  .hero { padding: var(--s7) 0 var(--s8); }
  .hero-layout { grid-template-columns: 1fr; gap: var(--s8); }
  .hero-stage { max-width: 460px; }
  .stage-frame { aspect-ratio: 1 / 1; }

  .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .tile-grid { grid-template-columns: repeat(2, 1fr); gap: var(--s4); }
  .divider-grid .card-surface { padding: var(--s6) 0; }
  .divider-grid > *::before,
  .divider-grid > *:last-child::after { display: none; }
  .divider-grid > * + * { border-top: 1px solid var(--steel-18); }
  .section-graphite .divider-grid > * + * { border-top-color: var(--rule-dark); }

  .split, .split-wide { grid-template-columns: 1fr; gap: var(--s8); }
  .footer-top { grid-template-columns: 1fr; gap: var(--s6); }

  /* Intro stacks above the workflow and stops sticking. */
  .flow-layout { grid-template-columns: 1fr; gap: var(--s8); }
  .flow-intro { position: static; top: auto; }
  .flow-intro-lead { max-width: none; }
}

@media (max-width: 620px) {
  .form-grid { grid-template-columns: 1fr; }
  .cert-item { flex-direction: column; gap: var(--s1); }
  .cert-key { min-width: 0; }
  .spec-table th { white-space: normal; width: auto; }
  .spec-table th, .spec-table td { padding-right: var(--s3); display: block; border-bottom: 0; }
  .spec-table td { padding-top: 2px; padding-bottom: var(--s4); border-bottom: 1px solid var(--steel-18); }
  .note-card .data, .note-card-plain .data { overflow-x: auto; }
  .panel-inset, .panel-inset-dark { padding: var(--s7) var(--s5); border-radius: var(--r-lg); }
  .hero-actions .btn, .actions-center .btn { width: 100%; }

  /* Tighter rail so the cards keep their width on a phone. */
  .flow-item { grid-template-columns: 34px minmax(0, 1fr); gap: var(--s4); }
  .flow-num { width: 34px; height: 34px; font-size: .6875rem; }
  .flow-item::before, .flow-item::after { left: 16px; top: 40px; }
  .flow-head { padding: var(--s4); gap: var(--s3); grid-template-columns: 34px minmax(0, 1fr) 16px; }
  .flow-icon { width: 34px; height: 34px; }
  .flow-icon svg { width: 18px; height: 18px; }
  .flow-body p { padding: 0 var(--s4) var(--s4) calc(var(--s4) + 34px + var(--s3)); }
  .flow-intro .btn { width: 100%; }
}

/* ---- 19 · REDUCED MOTION ---------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
  .reveal { opacity: 1; transform: none; }
  .rule { transform: scaleX(1); }
  .hero-grid-bg { animation: none; }
  .parallax { transform: none !important; }
  .btn:hover, .tile:hover { transform: none; }

  /* Supply cells keep the tint and the border, and lose the movement:
     the heading does not shift, and the bottom rule appears rather
     than sweeping across. */
  .supply-grid > .card.reveal { transform: none; }
  .divider-grid .card:hover .h3,
  .divider-grid .card:focus-within .h3 { transform: none; }
}

/* ---- 20 · PRINT ------------------------------------------- */

@media print {
  .header, .nav-toggle, .hero-actions, .form-grid, .hero-stage { display: none; }
  body, .hero, .section-graphite, .footer, .panel-inset-dark { background: #fff; color: #000; }
  .reveal { opacity: 1; transform: none; }
  .flow-body { grid-template-rows: 1fr; }
}
