/* Hallmark · v2.0.0 · shape: workbench · theme: custom (midnight Starknet indigo, luminous Stark coral & brushed platinum) · genre: editorial · signature: interlocking platinum-coral stella octangula occluding STARKSEAL with live FRI polynomial folder */
:root {
  --bg: #0c0d24;
  --surface: #141638;
  --surface-alt: #1c204a;
  --ink: #e8ecf7;
  --ink-ghost: rgba(232, 236, 247, 0.13);
  --muted: #9ba5c4;
  --line: #2a2f63;
  --coral: #ec796b;
  --coral-deep: #cf5e50;
  --on-accent: #0c0d24;
  --ok: #5dd39e;
  --warn: #f08070;
  --font-display: "Instrument Serif", Georgia, serif;
  --font-body: "Plus Jakarta Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { overflow-x: clip; background: var(--bg); color: var(--ink); font-family: var(--font-body); }
html { scroll-behavior: smooth; }
body { min-height: 100dvh; line-height: 1.55; -webkit-font-smoothing: antialiased; }
:focus-visible { outline: 2px solid var(--coral); outline-offset: 3px; }

.topbar {
  position: fixed; top: 0; left: 0; right: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px clamp(20px, 5vw, 64px);
  background: var(--surface);
  color: var(--ink);
  border-bottom: 1px solid var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); font-weight: 600; letter-spacing: -0.02em; }
.brand img { border-radius: 6px; display: block; }
.nav { display: flex; align-items: center; gap: 28px; }
.nav a { text-decoration: none; color: var(--muted); font-size: 0.92rem; font-weight: 500; transition: color 160ms ease; }
.nav a:hover { color: var(--coral); }
.nav a:active { color: var(--coral-deep); }

.hero {
  position: relative; min-height: 100dvh;
  padding: 96px clamp(20px, 5vw, 64px) 64px;
  display: grid; grid-template-rows: 1fr auto; align-items: center; overflow: hidden;
}
.hero-stage { position: relative; width: 100%; height: min(62dvh, 560px); display: grid; place-items: center; }
.hero-word {
  position: relative; z-index: 1;
  font-family: var(--font-display); font-weight: 400;
  font-size: clamp(4.2rem, 13vw, 12.8rem);
  letter-spacing: -0.02em; line-height: 0.88; text-wrap: balance;
  color: var(--ink-ghost); user-select: none;
}
#hero-canvas { position: absolute; inset: 0; width: 100%; height: 100%; z-index: 2; pointer-events: none; }

.hero-copy { position: relative; z-index: 5; max-width: 680px; margin: 0 auto; text-align: center; }
.kicker { font-size: 0.88rem; font-weight: 500; color: var(--coral); margin-bottom: 12px; }
.lead { font-size: clamp(1rem, 1.35vw, 1.16rem); color: var(--muted); margin-bottom: 24px; }
.hero-actions { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

.btn-primary, .btn-secondary, .btn-ghost {
  display: inline-flex; align-items: center; justify-content: center;
  padding: 12px 24px; border-radius: 999px; font-size: 0.92rem; font-weight: 600;
  cursor: pointer; text-decoration: none; border: 1px solid transparent;
  transition: transform 140ms ease, background 160ms ease, border-color 160ms ease;
}
.btn-primary { background: var(--coral); color: var(--on-accent); }
.btn-primary:hover { background: var(--coral-deep); transform: translateY(-1px); }
.btn-primary:active { transform: translateY(0); }
.btn-secondary { background: var(--surface-alt); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover { border-color: var(--coral); }
.btn-secondary:active { transform: translateY(0); }
.btn-ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn-ghost:hover { border-color: var(--coral); color: var(--coral); }
.btn-ghost:active { border-color: var(--coral-deep); }
button:disabled { opacity: 0.45; cursor: not-allowed; }

.section { padding: 88px clamp(20px, 5vw, 64px); max-width: 1220px; margin: 0 auto; }
.section-head { max-width: 680px; margin-bottom: 36px; }
.section-head h2 { font-family: var(--font-display); font-weight: 400; font-size: clamp(2.2rem, 4.4vw, 3.3rem); line-height: 1.06; text-wrap: balance; margin-bottom: 12px; }
.section-head .sub { color: var(--muted); font-size: 0.98rem; }

.fri-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(280px, 1fr); gap: 28px; align-items: start; }
@media (max-width: 900px) { .fri-grid { grid-template-columns: 1fr; } }

.fri-panel, .fri-status { background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; padding: 24px; }
.layers-box { display: flex; flex-direction: column; gap: 12px; margin-bottom: 20px; }
.layer-card {
  background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line); border-radius: 8px;
  padding: 16px; display: flex; flex-direction: column; gap: 8px;
}
.layer-head { display: flex; justify-content: space-between; font-size: 0.84rem; color: var(--coral); font-weight: 600; }
.layer-coeffs { font-family: var(--font-mono); font-size: 0.84rem; color: var(--ink); word-break: break-all; }
.fri-actions { display: flex; gap: 12px; flex-wrap: wrap; }

.fri-status { display: flex; flex-direction: column; gap: 16px; }
.metric-row { display: flex; justify-content: space-between; align-items: baseline; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.m-label { font-size: 0.85rem; color: var(--muted); }
.m-val { font-family: var(--font-mono); font-size: 0.94rem; color: var(--ink); }
.root-box { display: flex; flex-direction: column; gap: 8px; padding-top: 4px; }
.root-hex {
  display: block; padding: 12px 16px; border-radius: 8px;
  background: var(--surface-alt); color: var(--ink); border: 1px solid var(--line);
  font-family: var(--font-mono); font-size: 0.82rem; word-break: break-all;
}
.verdict-ok { font-size: 0.86rem; color: var(--ok); font-weight: 500; }

.spec-table-wrap { overflow-x: auto; background: var(--surface); color: var(--ink); border: 1px solid var(--line); border-radius: 12px; }
.spec-table { width: 100%; border-collapse: collapse; text-align: left; font-size: 0.94rem; }
.spec-table th, .spec-table td { padding: 16px 20px; border-bottom: 1px solid var(--line); }
.spec-table th { font-size: 0.84rem; font-weight: 600; color: var(--muted); }
.spec-table tr:last-child td { border-bottom: none; }
.status-ok { color: var(--ok); font-weight: 600; }
.status-warn { color: var(--warn); font-weight: 500; }

.footer {
  max-width: 1220px; margin: 0 auto;
  padding: 32px clamp(20px, 5vw, 64px) 52px;
  border-top: 1px solid var(--line);
  display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 0.85rem; color: var(--muted);
}
.mono { font-family: var(--font-mono); font-size: 0.8rem; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
