/* ============================================================
   BURNISH — design tokens + base
   Precision-instrument aesthetic: phosphor green / amber meters
   on near-black, Space Grotesk + JetBrains Mono.
   ============================================================ */

:root {
  /* --- surfaces --- */
  --bg:        #070908;
  --bg-1:      #0a0d0c;
  --panel:     #0e1211;
  --panel-2:   #121817;
  --line:      #1c2422;
  --line-2:    #283330;

  /* --- ink --- */
  --ink:       #eef3f1;
  --ink-2:     #aab4b0;
  --ink-3:     #6b7672;
  --ink-4:     #444e4a;

  /* --- phosphor green (brand / PASS) --- */
  --green:     #4fe08a;
  --green-hi:  #86f7b1;
  --green-dim: #2a7a52;
  --green-glow: rgba(79, 224, 138, 0.35);

  /* --- amber (CAUTION / secondary meter) --- */
  --amber:     #f0ad4a;
  --amber-hi:  #ffc874;
  --amber-dim: #8a5f22;

  /* --- red (FAIL, sparse) --- */
  --red:       #ff5a5a;
  --red-dim:   #7a2a2a;

  /* accent role — switched by data-accent for color-direction tweak */
  --accent:     var(--green);
  --accent-hi:  var(--green-hi);
  --accent-dim: var(--green-dim);
  --accent-glow: var(--green-glow);

  /* --- type --- */
  --font-display: "Space Grotesk", system-ui, sans-serif;
  --font-body:    "Space Grotesk", system-ui, sans-serif;
  --font-mono:    "JetBrains Mono", ui-monospace, monospace;

  /* --- layout --- */
  --maxw: 1240px;
  --gutter: clamp(20px, 5vw, 64px);
  --radius: 14px;
  --radius-sm: 8px;

  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* amber-led accent direction */
[data-accent="amber"] {
  --accent:     var(--amber);
  --accent-hi:  var(--amber-hi);
  --accent-dim: var(--amber-dim);
  --accent-glow: rgba(240, 173, 74, 0.32);
}

/* ============================================================ reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  letter-spacing: -0.005em;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
/* NOTE: never set overflow-x:hidden on html/body — it forces overflow-y:auto,
   turning the body into the scroll container and breaking window scroll + IO.
   Clip horizontal overflow at the section level (e.g. .hero) instead. */
img, canvas, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; cursor: pointer; background: none; border: none; }
::selection { background: var(--accent); color: #04130b; }

/* page atmosphere: subtle vignette + grain + grid */
body::before {
  content: "";
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(120% 80% at 50% -10%, rgba(79,224,138,0.07), transparent 60%),
    radial-gradient(80% 60% at 100% 100%, rgba(240,173,74,0.04), transparent 60%),
    var(--bg);
}
body::after {
  content: "";
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: 0.035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ============================================================ layout */
.wrap { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: var(--gutter); }
section { position: relative; }

.hr-grid {
  position: absolute; inset: 0; z-index: 0; pointer-events: none;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 100%);
          mask-image: radial-gradient(80% 60% at 50% 40%, #000 30%, transparent 100%);
  opacity: 0.5;
}

/* ============================================================ type scale */
.display {
  font-family: var(--font-display);
  font-weight: 600;
  line-height: 0.98;
  letter-spacing: -0.03em;
  font-size: clamp(2.6rem, 7vw, 5.6rem);
  text-wrap: balance;
}
.h1 { font-family: var(--font-display); font-weight: 600; line-height: 1.02; letter-spacing: -0.025em; font-size: clamp(2.1rem, 4.6vw, 3.6rem); text-wrap: balance; }
.h2 { font-family: var(--font-display); font-weight: 600; line-height: 1.05; letter-spacing: -0.02em; font-size: clamp(1.7rem, 3.2vw, 2.6rem); text-wrap: balance; }
.h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.15; letter-spacing: -0.015em; font-size: 1.3rem; }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.3rem); color: var(--ink-2); line-height: 1.55; text-wrap: pretty; max-width: 60ch; }
.muted { color: var(--ink-3); }

/* mono micro-label (the "readout / terminal" voice) */
.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--ink-3);
  display: inline-flex; align-items: center; gap: 0.7em;
}
.eyebrow::before {
  content: ""; width: 7px; height: 7px; border-radius: 50%;
  background: var(--accent); box-shadow: 0 0 10px var(--accent-glow);
}
.mono { font-family: var(--font-mono); }
.tnum { font-family: var(--font-mono); font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }

/* ============================================================ buttons */
.btn {
  display: inline-flex; align-items: center; gap: 0.6em;
  font-family: var(--font-mono); font-size: 0.85rem; font-weight: 500;
  letter-spacing: 0.02em;
  padding: 0.95em 1.4em; border-radius: 10px;
  border: 1px solid transparent; position: relative;
  transition: transform .25s var(--ease), background .25s, box-shadow .3s, border-color .25s;
  white-space: nowrap;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent); color: #04130b; font-weight: 600;
  box-shadow: 0 0 0 1px var(--accent), 0 8px 30px -8px var(--accent-glow);
}
.btn-primary:hover { box-shadow: 0 0 0 1px var(--accent-hi), 0 10px 38px -6px var(--accent-glow); transform: translateY(-1px); }
.btn-ghost { border-color: var(--line-2); color: var(--ink); background: rgba(255,255,255,0.015); }
.btn-ghost:hover { border-color: var(--accent-dim); color: var(--ink); background: rgba(255,255,255,0.04); }
.btn .arr { transition: transform .25s var(--ease); }
.btn:hover .arr { transform: translateX(3px); }

/* ============================================================ chips / status */
.status {
  display: inline-flex; align-items: center; gap: 0.5em;
  font-family: var(--font-mono); font-size: 0.74rem; letter-spacing: 0.04em;
  padding: 0.3em 0.7em; border-radius: 100px; border: 1px solid var(--line-2);
  color: var(--ink-2);
}
.status .dot { width: 7px; height: 7px; border-radius: 50%; }
.dot-pass { background: var(--green); box-shadow: 0 0 8px var(--green-glow); }
.dot-warn { background: var(--amber); box-shadow: 0 0 8px rgba(240,173,74,.4); }
.dot-fail { background: var(--red); box-shadow: 0 0 8px rgba(255,90,90,.4); }

/* panel */
.panel {
  background: linear-gradient(180deg, var(--panel) 0%, var(--bg-1) 100%);
  border: 1px solid var(--line); border-radius: var(--radius);
}

/* ============================================================ reveal anim */
.reveal { opacity: 0; transform: translateY(22px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .06s; }
.reveal[data-d="2"] { transition-delay: .12s; }
.reveal[data-d="3"] { transition-delay: .18s; }
.reveal[data-d="4"] { transition-delay: .24s; }
.reveal[data-d="5"] { transition-delay: .30s; }
.reveal[data-d="6"] { transition-delay: .36s; }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* section rhythm */
.section-pad { padding-block: clamp(80px, 12vw, 150px); }
.section-pad-sm { padding-block: clamp(56px, 8vw, 96px); }

/* section header kicker */
.sec-head { display: flex; flex-direction: column; gap: 18px; max-width: 70ch; }
.sec-index {
  font-family: var(--font-mono); font-size: .74rem; letter-spacing: .2em;
  color: var(--ink-4); text-transform: uppercase;
}
.sec-index b { color: var(--accent); font-weight: 500; }

/* divider line w/ ticks */
.rule { height: 1px; background: var(--line); position: relative; }
.rule::before, .rule::after { content:""; position:absolute; top:-3px; width:1px; height:7px; background: var(--line-2); }
.rule::before { left: 0; } .rule::after { right: 0; }

/* utility */
.center { text-align: center; }
.stack { display: flex; flex-direction: column; }
.row { display: flex; align-items: center; }
.gap-s { gap: 10px; } .gap-m { gap: 18px; } .gap-l { gap: 32px; }
.wrap-flex { flex-wrap: wrap; }
.grow { flex: 1; }
