/* Zyra marketing site.
 *
 * Colour contract (shared with the workstation):
 *   accent   indigo, the only brand and interactive hue: primary actions, links, focus, the mark's top body.
 *   measured cyan, only for data measured from a film.
 *   plan     orange, only for planned or target data.
 *   neutral  true graphite with no hue, so radiographs and model renders are not tinted by their surround.
 */

@font-face { font-family: "Inter"; src: url("/assets/fonts/inter.woff2") format("woff2"); font-weight: 400 650; font-display: swap; }
@font-face { font-family: "Newsreader"; src: url("/assets/fonts/newsreader.woff2") format("woff2"); font-weight: 400 600; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-mono-400.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "IBM Plex Mono"; src: url("/assets/fonts/plex-mono-500.woff2") format("woff2"); font-weight: 500; font-display: swap; }

:root {
  --bg: #FBFBFA;
  --surface: #FFFFFF;
  --sunken: #F3F3F1;
  --ink: #111214;
  --body: #3D4046;
  --muted: #62666E;
  --faint: #868A92;
  --rule: #E3E3E0;
  --rule-strong: #CFCFCB;

  --accent: #4340AE;
  --accent-hover: #39358E;
  --accent-ink: #FFFFFF;
  --accent-soft: #EEF0FD;
  --accent-text: #4340AE;

  --measured: #0891B2;
  --plan: #EA580C;

  --lightbox: #0B0C0D;
  --plate: #FFFFFF;
  --shadow: 0 1px 2px rgba(17, 18, 20, .05), 0 12px 32px -16px rgba(17, 18, 20, .18);

  --serif: "Newsreader", "Iowan Old Style", Georgia, serif;
  --sans: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;
  --radius: 10px;
  --wrap: 1160px;
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0E0F11; --surface: #16171A; --sunken: #121315; --ink: #ECEDEE; --body: #B9BCC2; --muted: #8E929A; --faint: #6E727A;
    --rule: #26282C; --rule-strong: #34373C;
    --accent: #5B5EE0; --accent-hover: #7178DF; --accent-ink: #FFFFFF; --accent-soft: #1C1D33; --accent-text: #9AA3EE;
    --measured: #22D3EE; --plan: #FB923C;
    --plate: #F3F3F1;
    --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -16px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0E0F11; --surface: #16171A; --sunken: #121315; --ink: #ECEDEE; --body: #B9BCC2; --muted: #8E929A; --faint: #6E727A;
  --rule: #26282C; --rule-strong: #34373C;
  --accent: #5B5EE0; --accent-hover: #7178DF; --accent-ink: #FFFFFF; --accent-soft: #1C1D33; --accent-text: #9AA3EE;
  --measured: #22D3EE; --plan: #FB923C;
  --plate: #F3F3F1;
  --shadow: 0 1px 2px rgba(0, 0, 0, .35), 0 12px 32px -16px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 80px; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--body); font: 400 17px/1.65 var(--sans); -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
img, video { max-width: 100%; height: auto; display: block; }
a { color: var(--accent-text); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { text-decoration-thickness: 2px; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }
h1, h2, h3 { color: var(--ink); margin: 0; }
h1, h2 { font-family: var(--serif); font-weight: 500; letter-spacing: -0.015em; }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.35; }
p { margin: 0 0 1em; }
.wrap { width: min(100% - 32px, var(--wrap)); margin-inline: auto; }
.mono { font-family: var(--mono); font-weight: 500; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 100; }
.skip:focus { left: 16px; }
.kicker { font-family: var(--mono); font-size: 12.5px; font-weight: 500; letter-spacing: .06em; text-transform: uppercase; color: var(--accent-text); margin-bottom: 16px; }

/* ---------- Header ---------- */
.site-header { position: sticky; top: 0; z-index: 50; background: color-mix(in srgb, var(--bg) 84%, transparent); backdrop-filter: saturate(160%) blur(12px); -webkit-backdrop-filter: saturate(160%) blur(12px); border-bottom: 1px solid transparent; transition: border-color .2s; }
.site-header.scrolled { border-bottom-color: var(--rule); }
.header-inner { display: flex; align-items: center; gap: 24px; height: 64px; }
.brand { display: inline-flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.mark { width: 26px; height: 26px; }
.mark rect { fill: var(--ink); }
.mark .mark-top { fill: var(--accent); }
.mark .mark-rod { fill: none; stroke: var(--ink); stroke-width: 1.8; stroke-linecap: round; }
.nav { display: flex; align-items: center; gap: 28px; margin-left: auto; }
.nav a:not(.btn) { color: var(--muted); text-decoration: none; font-size: 15px; font-weight: 500; transition: color .15s; }
.nav a:not(.btn):hover, .nav a.active { color: var(--ink); }
.header-tools { display: flex; gap: 8px; }
.icon-btn { width: 36px; height: 36px; border-radius: 50%; border: 1px solid var(--rule); background: transparent; color: var(--muted); display: grid; place-items: center; cursor: pointer; transition: color .15s, border-color .15s; }
.icon-btn:hover { color: var(--ink); border-color: var(--faint); }
.icon-btn svg { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; }
.theme-btn .i-moon { display: none; }
:root[data-theme="dark"] .theme-btn .i-sun { display: none; }
:root[data-theme="dark"] .theme-btn .i-moon { display: block; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-btn .i-sun { display: none; }
  :root:not([data-theme="light"]) .theme-btn .i-moon { display: block; }
}
.menu-btn { display: none; }

/* ---------- Buttons ---------- */
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 30px 0 0; }
.btn { display: inline-flex; align-items: center; justify-content: center; height: 46px; padding: 0 22px; border-radius: 8px; border: 1px solid var(--rule-strong); background: var(--surface); color: var(--ink); font: 500 15px/1 var(--sans); text-decoration: none; transition: background .15s, border-color .15s, transform .15s; }
.btn:hover { border-color: var(--faint); transform: translateY(-1px); text-decoration: none; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); border-color: var(--accent-hover); }
.btn-sm { height: 36px; padding: 0 16px; font-size: 14px; }

/* ---------- Hero ----------
 * Always the lightbox: a near-black reading-room ground in both themes, so the hero reads like a film on a viewer. */
.hero { position: relative; overflow: hidden; background: var(--lightbox); color: #C9CCD1; padding: 88px 0 96px; isolation: isolate; }
.hero::before { content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 40px 40px; mask-image: radial-gradient(ellipse 70% 80% at 70% 45%, #000 20%, transparent 75%); -webkit-mask-image: radial-gradient(ellipse 70% 80% at 70% 45%, #000 20%, transparent 75%); }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 56px; align-items: center; }
.hero .kicker { color: #9AA3EE; }
.hero h1 { color: #F4F4F5; font-size: clamp(46px, 6vw, 76px); line-height: 1.02; letter-spacing: -0.025em; margin-bottom: 30px; }
.hero h1 em { font-style: italic; color: #B4B9F5; }
.hero .lead { color: #C9CCD1; }
.lead { font-size: 19.5px; line-height: 1.6; color: var(--body); max-width: 34em; }
.btn-ghost { background: transparent; color: #ECEDEE; border-color: #3A3D42; }
.btn-ghost:hover { border-color: #8E929A; }
.hero .btn-primary { background: #5B5EE0; border-color: #5B5EE0; }
.hero .btn-primary:hover { background: #7178DF; border-color: #7178DF; }
.hero-facts { list-style: none; padding: 0; margin: 40px 0 0; display: flex; flex-wrap: wrap; gap: 10px 32px; font-size: 15px; color: #B9BCC2; }
.hero-facts .mono { display: inline-block; min-width: 34px; font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; color: #6E727A; margin-right: 6px; }

.instrument { position: relative; margin: 0; }
.spine-svg { width: 100%; height: auto; display: block; max-height: 520px; overflow: visible; }
.spine-svg .vb { fill: #2A2C31; stroke: #4A4E55; stroke-width: 1.2; }
.spine-svg .vb-fused { fill: #1F2125; stroke: #3A3D42; stroke-width: 1.2; }
.spine-svg .vb-junction { fill: #5B5EE0; stroke: #9AA3EE; stroke-width: 1.2; }
.spine-svg .disc { fill: #3A3D42; }
.spine-svg .rod { fill: none; stroke: #8E929A; stroke-width: 5; stroke-linecap: round; stroke-linejoin: round; }
.spine-svg .screw { stroke: #6E727A; stroke-width: 3; stroke-linecap: round; }
.spine-svg .sacrum { fill: #1F2125; stroke: #3A3D42; stroke-width: 1.2; }
.spine-svg .hip { fill: none; stroke: #4A4E55; stroke-width: 1.5; }
.spine-svg .load { stroke: #9AA3EE; stroke-width: 3.5; stroke-linecap: round; }
.spine-svg .load-label { font: 500 12px var(--mono); fill: #B4B9F5; letter-spacing: .03em; }
.spine-svg .ruler line { stroke: #3A3D42; stroke-width: 1; }
.spine-svg .ruler text { font: 400 10px var(--mono); fill: #6E727A; }
.readout { margin-top: 8px; padding: 14px 16px 12px; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px 18px; align-items: end; border: 1px solid #2A2C31; border-radius: 10px; background: rgba(22, 23, 26, .82); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); }
.readout-head { grid-column: 1 / -1; font-size: 13px; color: #ECEDEE; font-weight: 500; margin-bottom: 4px; }
.readout-row { display: flex; justify-content: space-between; align-items: baseline; gap: 8px; font-size: 11px; color: #8E929A; text-transform: uppercase; letter-spacing: .04em; margin-bottom: 4px; }
.readout-row .mono { color: #B4B9F5; font-size: 12px; font-variant-numeric: tabular-nums; }
.meter { display: grid; gap: 7px; margin-bottom: 4px; }
.meter span { font-size: 11px; color: #8E929A; text-transform: uppercase; letter-spacing: .04em; }
.meter i { display: block; height: 6px; border-radius: 3px; background: #2A2C31; overflow: hidden; }
.meter b { display: block; height: 100%; width: 30%; border-radius: 3px; background: linear-gradient(90deg, #5B5EE0, #9AA3EE); }
.instrument figcaption { font-size: 13px; color: #6E727A; margin-top: 10px; max-width: 30em; line-height: 1.5; }

/* ---------- Plates (figure frames) ---------- */
.plate { background: var(--plate); border: 1px solid var(--rule); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.plate-dark { background: var(--lightbox); border-color: #222; }
.plate-video { background: #fff; }

.posture { position: relative; aspect-ratio: 605 / 1022; width: 100%; }
.posture img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; padding: 20px 20px 48px; opacity: 0; animation: pose 9s infinite; mix-blend-mode: multiply; }
.posture img:nth-child(1) { animation-delay: 0s; }
.posture img:nth-child(2) { animation-delay: 3s; }
.posture img:nth-child(3) { animation-delay: 6s; }
@keyframes pose { 0% { opacity: 0; } 6% { opacity: 1; } 33% { opacity: 1; } 40% { opacity: 0; } 100% { opacity: 0; } }
.posture-step { aspect-ratio: 4 / 3; }
.posture-step img { padding: 16px 16px 44px; }
.posture-steps { position: absolute; left: 0; right: 0; bottom: 16px; margin: 0; padding: 0; list-style: none; display: flex; justify-content: center; gap: 20px; font: 500 11.5px/1 var(--mono); letter-spacing: .04em; text-transform: uppercase; color: #8A8E95; }
.posture-steps li { position: relative; padding-top: 11px; animation: step 9s infinite; }
.posture-steps li::before { content: ""; position: absolute; top: 0; left: 50%; width: 5px; height: 5px; margin-left: -2.5px; border-radius: 50%; background: currentColor; }
.posture-steps li:nth-child(2) { animation-delay: 3s; }
.posture-steps li:nth-child(3) { animation-delay: 6s; }
@keyframes step { 0%, 36% { color: #4340AE; } 40%, 100% { color: #8A8E95; } }

/* ---------- Bands and sections ---------- */
.band { background: var(--sunken); border-block: 1px solid var(--rule); padding: 88px 0; }
.gap-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; align-items: start; }
.gap-grid h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; }
.prose p { font-size: 17.5px; }
.prose p:last-child { margin-bottom: 0; }

.section { padding: 112px 0 0; }
.section-head { max-width: 760px; margin-bottom: 56px; }
.section-head h2 { font-size: clamp(32px, 4vw, 50px); line-height: 1.08; }
.section-intro { margin: 18px 0 0; font-size: 18px; color: var(--muted); }

/* ---------- Steps ---------- */
.steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 88px; }
.step { display: grid; grid-template-columns: 1.25fr .75fr; gap: 64px; align-items: center; }
.step:nth-child(even) { grid-template-columns: .75fr 1.25fr; }
.step:nth-child(even) .step-media { order: 2; }
.step-media img, .step-media video { width: 100%; }
.step-media.plate-dark img { aspect-ratio: 16 / 10; object-fit: cover; object-position: top left; }
.step-no { display: block; font-size: 13px; color: var(--accent-text); margin-bottom: 14px; }
.step-text h3 { font-family: var(--serif); font-size: 28px; font-weight: 500; letter-spacing: -0.01em; margin-bottom: 14px; }
.step-text p { color: var(--body); }

/* ---------- Uses ---------- */
.use-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.use { border: 1px solid var(--rule); border-radius: var(--radius); background: var(--surface); padding: 36px 36px 30px; }
.use-primary { border-color: color-mix(in srgb, var(--accent) 45%, var(--rule)); box-shadow: inset 0 3px 0 var(--accent); }
.use-tag { font-size: 12px; letter-spacing: .05em; text-transform: uppercase; color: var(--faint); margin-bottom: 18px; }
.use-primary .use-tag { color: var(--accent-text); }
.use h3 { font-family: var(--serif); font-size: 26px; font-weight: 500; margin-bottom: 14px; }
.use p:last-child { margin-bottom: 0; }

/* ---------- Workstation ---------- */
.workstation { padding-bottom: 0; }
.swatch { white-space: nowrap; font-weight: 500; color: var(--ink); }
.swatch::before { content: ""; display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.swatch-measured::before { background: var(--measured); }
.swatch-plan::before { background: var(--plan); }
.shot { margin: 0; }
.shot-frame img { width: 100%; }
.shot figcaption { font-size: 13.5px; color: var(--faint); margin-top: 14px; max-width: 760px; }
.features { list-style: none; margin: 64px 0 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); border-top: 1px solid var(--rule); }
.features li { padding: 26px 24px 26px 0; border-bottom: 1px solid var(--rule); }
.features li:not(:nth-child(4n)) { border-right: 1px solid var(--rule); }
.features li:not(:nth-child(4n+1)) { padding-left: 24px; }
.features h3 { font-size: 15.5px; margin-bottom: 8px; }
.features p { font-size: 15px; color: var(--muted); margin: 0; line-height: 1.55; }

/* ---------- Science ---------- */
.pubs { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.pubs li { display: grid; grid-template-columns: 96px 1fr; gap: 24px; padding: 26px 0; border-bottom: 1px solid var(--rule); }
.pub-year { font-size: 14px; color: var(--faint); padding-top: 3px; }
.pubs a { font-family: var(--serif); font-size: 21px; line-height: 1.3; color: var(--ink); text-decoration: none; }
.pubs a:hover { color: var(--accent-text); text-decoration: underline; }
.pubs p { margin: 8px 0 0; font-size: 15.5px; color: var(--muted); }

/* ---------- About ---------- */
.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 72px; }
.about h2 { font-size: clamp(30px, 3.6vw, 44px); line-height: 1.12; }
.founder { padding-top: 20px; border-top: 1px solid var(--rule); color: var(--muted); }
.founder strong { color: var(--ink); font-weight: 600; }

/* ---------- Pilot CTA ---------- */
.pilot { margin-top: 128px; background: var(--lightbox); color: #C9CCD1; padding: 104px 0; }
.pilot-inner { max-width: 820px; }
.pilot .kicker { color: #9AA3EE; }
.pilot h2 { color: #F4F4F5; font-size: clamp(34px, 4.6vw, 56px); line-height: 1.06; margin-bottom: 22px; }
.pilot .lead { color: #C9CCD1; }
.pilot .btn-primary { background: #5B5EE0; border-color: #5B5EE0; }
.pilot .btn-primary:hover { background: #7178DF; border-color: #7178DF; }

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--rule); padding: 44px 0 52px; font-size: 14px; color: var(--muted); }
.footer-inner { display: grid; grid-template-columns: 1fr 1.6fr 1fr; gap: 40px; align-items: start; }
.footer-brand p { margin: 10px 0 0; }
.regulatory { margin: 0; line-height: 1.6; }
.footer-links { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px 22px; }
.footer-links a { color: var(--muted); text-decoration: none; }
.footer-links a:hover { color: var(--ink); }

/* ---------- Simple pages ---------- */
.page { padding: 88px 0 40px; max-width: 720px; }
.page h1 { font-size: clamp(38px, 5vw, 56px); line-height: 1.05; margin-bottom: 28px; }
.page h2 { font-size: 26px; margin: 44px 0 12px; }

/* ---------- Motion ---------- */
.reveal { opacity: 0; transform: translateY(14px); transition: opacity .7s ease, transform .7s cubic-bezier(.2,.7,.2,1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .posture img { animation: none; }
  .posture img:first-child { opacity: 1; }
  .posture-steps { display: none; }
  .btn:hover { transform: none; }
}

/* ---------- Responsive ---------- */
@media (max-width: 960px) {
  .hero { padding: 56px 0 64px; }
  .hero-grid { grid-template-columns: 1fr; gap: 32px; }
  .spine-svg { max-height: 460px; }
  .gap-grid, .about-grid, .use-grid { grid-template-columns: 1fr; gap: 28px; }
  .step, .step:nth-child(even) { grid-template-columns: 1fr; gap: 28px; }
  .step:nth-child(even) .step-media { order: 0; }
  .features { grid-template-columns: 1fr 1fr; }
  .features li, .features li:not(:nth-child(4n+1)) { padding: 22px 20px 22px 0; border-right: 0; }
  .features li:nth-child(odd) { border-right: 1px solid var(--rule); }
  .features li:nth-child(even) { padding-left: 20px; }
  .footer-inner { grid-template-columns: 1fr; gap: 20px; }
  .footer-links { justify-content: flex-start; }
}
@media (max-width: 760px) {
  .menu-btn { display: grid; }
  .nav { display: none; position: absolute; top: 64px; left: 0; right: 0; flex-direction: column; align-items: stretch; gap: 0; padding: 8px 16px 20px; background: var(--bg); border-bottom: 1px solid var(--rule); }
  .nav.open { display: flex; }
  .nav a:not(.btn) { padding: 12px 0; border-bottom: 1px solid var(--rule); font-size: 16px; }
  .nav .btn { margin-top: 16px; height: 44px; }
  .header-tools { margin-left: auto; }
  .section { padding-top: 80px; }
  .band { padding: 64px 0; }
  .steps { gap: 64px; }
  .use { padding: 28px 24px 24px; }
  .features { grid-template-columns: 1fr; }
  .features li, .features li:nth-child(odd), .features li:nth-child(even) { padding: 20px 0; border-right: 0; }
  .pubs li { grid-template-columns: 1fr; gap: 6px; }
  .pilot { margin-top: 96px; padding: 72px 0; }
  .lead { font-size: 18px; }
  .readout { grid-template-columns: 1fr; }
}
