﻿/* Core Reactor site. Tokens from design/tokens.json. No JS required. */

@font-face {
  font-family: "IBM Plex Sans";
  src: url("/fonts/ibm-plex-sans.woff2") format("woff2");
  font-weight: 400 600;
  font-style: normal;
  font-display: swap;
  unicode-range: U+0020-007E, U+00A0-00FF, U+0100-017F, U+2013-2014, U+2018-2019, U+201C-201D, U+2026, U+00D7, U+2212, U+2192;
}

:root {
  --bg: #060a14;
  --tab: #05080f;
  --surface: #0c1322;
  --deep: #080f1d;
  --line: #16233a;
  --line-strong: #1c2c47;
  --text: #dbe9ff;
  --body: #b6c7e2;
  --muted: #8aa0c0;
  --faint: #6a7e9e;
  --green: #3dffa0;
  --green-fill: #0b1a1a;
  --green-line: #1f4a39;
  --on-green: #04110b;
  --cyan: #38d6ff;
  --cyan-fill: #0a1a26;
  --amber: #ffb83d;
  --amber-fill: #1a1608;
  --amber-line: #5a4416;
  --violet: #b48cff;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: ui-monospace, "Cascadia Mono", "Segoe UI Mono", Consolas, monospace;
  --wrap: 1120px;
  --legal-wrap: 780px;
  --radius: 4px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
  color-scheme: dark;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--body);
  font-family: var(--sans);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; }
h1, h2, h3 { color: var(--text); letter-spacing: -0.015em; text-wrap: balance; }
p { text-wrap: pretty; }
a { color: var(--cyan); text-underline-offset: 3px; }
a:hover { color: var(--green); }
:focus-visible { outline: 2px solid var(--green); outline-offset: 3px; }
img, svg { display: block; max-width: 100%; height: auto; }

.wrap { width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 0 20px; }

.skip { position: absolute; left: -9999px; }
.skip:focus {
  left: 16px; top: 12px; z-index: 40; padding: 10px 14px;
  background: var(--green); color: var(--on-green);
  font-family: var(--mono); font-weight: 700; text-decoration: none; border-radius: var(--radius);
}

/* Header */
.site-header {
  position: sticky; top: 0; z-index: 20;
  border-bottom: 1px solid var(--line);
  background: color-mix(in srgb, var(--tab) 94%, transparent);
  backdrop-filter: blur(10px);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; min-height: 64px; }
.brand {
  display: inline-flex; align-items: center; gap: 10px; color: var(--text);
  font-family: var(--mono); font-size: 13px; font-weight: 700;
  letter-spacing: 0.06em; text-transform: uppercase; text-decoration: none;
}
.brand img { width: 36px; height: 36px; border-radius: 8px; }
.site-nav { display: flex; flex-wrap: wrap; gap: 0 18px; align-items: center; }
.site-nav a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--muted);
  font-family: var(--mono); font-size: 11px; font-weight: 600;
  letter-spacing: 0.08em; text-transform: uppercase; text-decoration: none;
}
.site-nav a:hover, .site-nav .lang { color: var(--text); }
.site-nav .nav-cta {
  padding: 0 14px; min-height: 36px; border: 1px solid var(--green-line);
  border-radius: var(--radius); color: var(--green);
}
.site-nav .nav-cta:hover { background: var(--green); color: var(--on-green); }

/* Hero */
.hero {
  position: relative; overflow: hidden;
  border-bottom: 1px solid var(--line);
  background:
    linear-gradient(rgba(22, 35, 58, 0.45) 1px, transparent 1px) 0 0 / 48px 48px,
    linear-gradient(90deg, rgba(22, 35, 58, 0.45) 1px, transparent 1px) 0 0 / 48px 48px,
    var(--bg);
}
.hero::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse 75% 85% at 72% 50%, transparent 30%, var(--bg) 100%);
}
.hero .wrap {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 32px 56px; align-items: center;
  padding-top: 56px; padding-bottom: 64px;
}
.eyebrow {
  margin: 0 0 18px; color: var(--green);
  font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase;
}
.hero h1 {
  font-size: clamp(2.5rem, 5.6vw, 4rem); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em;
}
.hero h1 em { font-style: normal; color: var(--green); }
.lead { margin-top: 20px; max-width: 36ch; color: var(--body); font-size: clamp(1.05rem, 2vw, 1.2rem); line-height: 1.5; }
.cta-row { display: flex; flex-wrap: wrap; gap: 12px 16px; align-items: center; margin-top: 30px; }
.btn-play {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 52px; padding: 0 24px; border: 1px solid var(--green);
  border-radius: var(--radius); background: var(--green); color: var(--on-green);
  font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: 0.1em;
  text-transform: uppercase; text-decoration: none; transition: background .15s;
}
.btn-play:hover { background: #7affb9; color: var(--on-green); }
.btn-play svg { width: 16px; height: 16px; }
.cta-row a:not(.btn-play) {
  display: inline-flex; align-items: center; min-height: 52px; padding: 0 18px;
  border: 1px solid var(--line-strong); border-radius: var(--radius); color: var(--text);
  font-family: var(--mono); font-size: 12px; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none;
}
.cta-row a:not(.btn-play):hover { border-color: var(--cyan); color: var(--cyan); }
.fine { margin-top: 16px; color: var(--faint); font-family: var(--mono); font-size: 11px; letter-spacing: 0.04em; }

/* Phone frames with real screens */
.shots { position: relative; display: flex; justify-content: center; align-items: flex-start; min-height: 520px; }
.shot {
  position: absolute; width: 232px; border: 1px solid var(--line-strong); border-radius: 22px;
  background: var(--bg); overflow: hidden;
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.6);
}
.shot img { width: 100%; height: auto; aspect-ratio: 1080 / 2316; }
.shot.s-main { z-index: 3; left: 50%; top: 0; transform: translateX(-50%); width: 252px; border-color: var(--green-line); }
.shot.s-left { z-index: 1; left: 0; top: 56px; opacity: .9; }
.shot.s-right { z-index: 2; right: 0; top: 96px; opacity: .9; }
.hero .shots { min-height: 560px; }

/* Readout strip */
.readout { border-bottom: 1px solid var(--line); background: var(--tab); }
.readout dl { display: grid; grid-template-columns: repeat(4, 1fr); }
.readout .cell { padding: 22px 20px; border-right: 1px solid var(--line); }
.readout .cell:first-child { border-left: 1px solid var(--line); }
.readout dt { font-family: var(--mono); font-size: 28px; font-weight: 800; color: var(--green); line-height: 1.1; }
.readout .cell:nth-child(2) dt { color: var(--cyan); }
.readout .cell:nth-child(3) dt { color: var(--amber); }
.readout .cell:nth-child(4) dt { color: var(--violet); }
.readout dd { margin-top: 6px; font-size: 14px; color: var(--muted); line-height: 1.4; }

/* Sections */
.section { padding: 80px 0; border-bottom: 1px solid var(--line); }
.section.alt { background: var(--deep); }
.kicker { font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: 0.14em; text-transform: uppercase; color: var(--green); margin-bottom: 14px; }
.section h2 { font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 700; line-height: 1.12; max-width: 22ch; }
.section .intro { margin-top: 14px; max-width: 58ch; color: var(--muted); font-size: 1.05rem; }

.split { display: grid; grid-template-columns: 1fr 300px; gap: 48px; align-items: start; margin-top: 40px; }
.split.flip { grid-template-columns: 300px 1fr; }
.split.flip .shot-single { order: -1; }
.shot-single .zoom { border: 1px solid var(--line-strong); border-radius: 22px; box-shadow: 0 24px 60px rgba(0,0,0,.5); }
.shot-single img { width: 100%; aspect-ratio: 1080 / 2316; }
figcaption { margin-top: 14px; color: var(--muted); font-size: 14px; line-height: 1.4; text-align: center; }

/* Zoomable screens */
a.zoom { display: block; overflow: hidden; border-radius: inherit; background: var(--bg); cursor: zoom-in; position: relative; }
.shot a.zoom { border-radius: 21px; }
a.zoom:hover { outline: 2px solid var(--green); outline-offset: -2px; }
.lightbox { border: 0; padding: 0; background: transparent; max-width: 100vw; max-height: 100vh; width: 100%; height: 100%; display: none; place-items: center; }
.lightbox[open] { display: grid; }
.lightbox::backdrop { background: rgba(2, 5, 10, .92); }
.lightbox img { max-width: min(92vw, 560px); max-height: 92vh; width: auto; height: auto; border-radius: 22px; border: 1px solid var(--line-strong); cursor: zoom-out; }
.lightbox button { position: fixed; top: 12px; right: 16px; width: 48px; height: 48px; border: 1px solid var(--line-strong); border-radius: 50%; background: var(--surface); color: var(--text); font-size: 28px; line-height: 1; cursor: pointer; }

/* Rhythm table */
.rtable { display: grid; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); overflow: hidden; }
.rrow { display: grid; grid-template-columns: 150px 1fr; gap: 6px 20px; padding: 18px 20px; border-top: 1px solid var(--line); }
.rrow:first-child { border-top: 0; }
.rstate { font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; display: flex; align-items: flex-start; gap: 10px; }
.rstate::before { content: ""; width: 10px; height: 10px; margin-top: 3px; flex: none; background: var(--c, var(--green)); }
.rrow.c { --c: var(--cyan); } .rrow.a { --c: var(--amber); }
.rstate { color: var(--c, var(--green)); }
.rrow h3 { font-size: 1rem; font-weight: 600; }
.rrow p { margin-top: 4px; font-size: .96rem; color: var(--body); }

.note {
  margin-top: 20px; padding: 14px 18px; border-left: 2px solid var(--amber);
  background: var(--amber-fill); color: var(--text); font-size: .96rem;
}

/* Steps list (what you do) */
.flow { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 0; counter-reset: f; }
.flow li { counter-increment: f; display: grid; grid-template-columns: 44px 1fr; gap: 0 12px; padding: 18px 0; border-top: 1px solid var(--line); }
.flow li::before { content: counter(f, decimal-leading-zero); font-family: var(--mono); font-weight: 800; font-size: 12px; color: var(--green); padding-top: 3px; }
.flow h3 { font-size: 1.05rem; font-weight: 600; }
.flow p { margin-top: 4px; font-size: .97rem; }

/* Ledger of promises */
.ledger { margin-top: 36px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.ledger > div { display: grid; grid-template-columns: 96px 1fr; gap: 6px 20px; padding: 16px 20px; border-top: 1px solid var(--line); align-items: baseline; }
.ledger > div:first-child { border-top: 0; }
.ledger dt { font-family: var(--mono); font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--green); }
.ledger dd { color: var(--body); }
.ledger dd b { color: var(--text); font-weight: 600; }

/* Era table */
.tscroll { margin-top: 32px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.tbl { width: 100%; min-width: 600px; border-collapse: collapse; font-size: 15px; }
.tbl th, .tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.tbl th { background: var(--deep); color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl td:first-child { font-family: var(--mono); font-weight: 800; color: var(--green); white-space: nowrap; }
.tbl td:nth-child(3) { font-family: var(--mono); color: var(--text); white-space: nowrap; }

/* FAQ */
.faq { margin-top: 32px; display: grid; gap: 8px; max-width: 760px; }
.faq details { border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 4px 18px; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { cursor: pointer; color: var(--text); font-weight: 600; list-style: none; min-height: 52px; display: flex; align-items: center; gap: 16px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; margin-left: auto; color: var(--green); font-family: var(--mono); font-weight: 800; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { padding: 0 0 16px; color: var(--body); font-size: .97rem; max-width: 64ch; }

/* Final CTA */
.final-cta { padding: 88px 0; background: radial-gradient(ellipse 60% 80% at 50% 0%, rgba(61,255,160,.08), transparent 60%), var(--bg); }
.final-cta .wrap { display: grid; grid-template-columns: 1fr auto; gap: 40px; align-items: center; }
.final-cta h2 { font-size: clamp(1.9rem, 4vw, 2.8rem); max-width: 18ch; }
.final-cta .lead { max-width: 44ch; }
.qr { text-align: center; }
.qr img { width: 148px; height: 148px; padding: 10px; background: var(--text); border-radius: var(--radius); margin: 0 auto; }
.qr p { margin-top: 10px; font-family: var(--mono); font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; max-width: 16ch; }

/* Sticky mobile CTA */
.sticky-cta { display: none; }

/* SEO subpages */
.seo-hero { padding: 64px 0 48px; border-bottom: 1px solid var(--line); background: linear-gradient(rgba(22,35,58,.4) 1px, transparent 1px) 0 0 / 48px 48px, var(--bg); }
.seo-hero h1 { font-size: clamp(2.1rem, 4.4vw, 3.1rem); max-width: 20ch; line-height: 1.08; }
.seo-hero .lead { max-width: 56ch; }
.crumbs { margin-bottom: 18px; font-family: var(--mono); font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--faint); }
.crumbs a { color: var(--muted); text-decoration: none; }
.prose { max-width: 70ch; }
.prose p + p { margin-top: 16px; }
.prose h3 { margin-top: 32px; font-size: 1.2rem; }
.prose h3 + p { margin-top: 8px; }
.prose strong { color: var(--text); font-weight: 600; }
.more { margin-top: 36px; display: flex; flex-wrap: wrap; gap: 10px 20px; font-family: var(--mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; }

/* Legal */
.legal { padding: 28px 0 80px; }
.legal .wrap { max-width: var(--legal-wrap); }
.legal h1 { font-size: clamp(28px, 5vw, 42px); font-weight: 700; line-height: 1.1; }
.legal .meta { margin-top: 12px; color: var(--muted); font-family: var(--mono); font-size: 13px; }
.legal .summary { margin-top: 28px; padding: 18px 20px; border: 1px solid var(--green-line); border-radius: var(--radius); background: var(--green-fill); color: var(--text); }
.legal .summary p + p { margin-top: 10px; }
.legal h2 { margin-top: 44px; font-size: 22px; font-weight: 600; max-width: none; }
.legal h3 { margin-top: 24px; font-size: 17px; font-weight: 600; }
.legal p, .legal ul { margin-top: 12px; }
.legal ul { padding-left: 22px; }
.legal li + li { margin-top: 6px; }
.legal code { font-family: var(--mono); font-size: .9em; color: var(--amber); }
.table-scroll { margin-top: 16px; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.legal table { width: 100%; min-width: 520px; border-collapse: collapse; font-size: 15px; }
.legal th, .legal td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.legal th { background: var(--deep); color: var(--muted); font-family: var(--mono); font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.legal tr:last-child td { border-bottom: 0; }

/* Footer */
.site-footer { padding: 28px 0 48px; border-top: 1px solid var(--line); color: var(--muted); font-size: 14px; }
.site-footer .wrap { display: grid; gap: 10px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 0 20px; }
.site-footer a {
  display: inline-flex; align-items: center; min-height: 44px; color: var(--text);
  font-family: var(--mono); font-size: 11px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; text-decoration: none;
}
.site-footer a:hover { color: var(--green); }

.notfound { padding: 96px 0; text-align: center; }
.notfound h1 { font-size: clamp(40px, 8vw, 72px); font-family: var(--mono); color: var(--green); }
.notfound p { margin-top: 16px; }

@media (max-width: 960px) {
  .hero .wrap { grid-template-columns: 1fr; padding-top: 40px; }
  .hero .shots { min-height: 500px; order: 2; }
  .split, .split.flip { grid-template-columns: 1fr; gap: 28px; }
  .split .shot-single, .split.flip .shot-single { order: 2; max-width: 280px; }
  .readout dl { grid-template-columns: 1fr 1fr; }
  .readout .cell:nth-child(odd) { border-left: 1px solid var(--line); }
  .readout .cell { border-bottom: 1px solid var(--line); }
  .final-cta .wrap { grid-template-columns: 1fr; }
  .qr { display: none; }
}

@media (max-width: 640px) {
  body { font-size: 16px; padding-bottom: 72px; }
  .section { padding: 56px 0; }
  .site-nav a:not(.lang):not(.nav-cta) { display: none; }
  .shot { width: 170px; border-radius: 18px; }
  .shot.s-main { width: 196px; }
  .hero .shots { min-height: 420px; }
  .shot.s-left { top: 48px; } .shot.s-right { top: 80px; }
  .rrow, .ledger > div { grid-template-columns: 1fr; }
  .readout dt { font-size: 22px; }
  .sticky-cta {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
    padding: 10px 16px calc(10px + env(safe-area-inset-bottom)); gap: 12px; align-items: center;
    background: color-mix(in srgb, var(--tab) 96%, transparent); backdrop-filter: blur(10px); border-top: 1px solid var(--line-strong);
  }
  .sticky-cta span { flex: 1; font-family: var(--mono); font-size: 11px; letter-spacing: .04em; color: var(--muted); line-height: 1.3; }
  .sticky-cta .btn-play { min-height: 44px; padding: 0 16px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}
