/* ADA landing/download: design tokens + shared components.
   Source of truth: docs/landing/design-spec.md */

:root {
  --void: #06070F;
  --substrate: #0B0E1D;
  --plate: #131735;
  --phosphor: #E7EBF4;
  --accent: #4572FD;
  --accent-hover: #3861F5;
  --annot: #8CA5FF;
  --purple: #A78BFA;
  --green: #34D399;
  --red: #EF4444;
  --ramp-floor: #1B2347;

  --font-body: "Inter", "Segoe UI", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, monospace;
  --font-display: "Martian Mono", Consolas, monospace;

  --section-gap: 128px;
  --panel-pad: 32px;
}

@media (max-width: 640px) {
  :root {
    --section-gap: 80px;
    --panel-pad: 20px;
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }

* { scrollbar-width: thin; scrollbar-color: var(--plate) transparent; }
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-thumb { background: var(--plate); border-radius: 4px; }
::-webkit-scrollbar-track { background: transparent; }

html { scroll-behavior: smooth; }

body {
  position: relative;
  background: var(--void);
  color: var(--phosphor);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

::selection { background: var(--purple); color: var(--void); }

a { color: var(--accent); text-decoration: none; transition: color 140ms; }
a:hover { color: var(--accent-hover); }

:focus-visible { outline: 2px solid var(--annot); outline-offset: 2px; }

.muted { color: var(--phosphor); opacity: 0.7; }

@media (prefers-contrast: more) {
  .muted { opacity: 1; }
}

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--plate); color: var(--phosphor);
  padding: 8px 16px; font-family: var(--font-mono); font-size: 13px; z-index: 100;
}
.skip-link:focus { left: 16px; top: 16px; }

/* ── Nav ─────────────────────────────────────────────── */

.site-nav {
  height: 64px; display: flex; align-items: center; justify-content: space-between;
}
.wordmark { display: flex; align-items: center; gap: 12px; color: var(--phosphor); }
.wordmark .logo { display: block; height: 38px; width: auto; }
.colophon .who { display: flex; align-items: center; gap: 10px; }
.colophon .who .logo { display: block; height: 26px; width: auto; }
.wordmark:hover { color: var(--phosphor); }
.wordmark .mark { font-family: var(--font-display); font-weight: 700; font-size: 14px; }
.site-nav .links { display: flex; align-items: center; gap: 20px; }
.site-nav .links a { font-family: var(--font-mono); font-size: 12px; color: var(--phosphor); opacity: 0.7; }
.site-nav .links a:hover { opacity: 1; color: var(--phosphor); }
.stamp { font-family: var(--font-mono); font-size: 11px; color: var(--annot); }
.stamp:empty { display: none; }

/* ── Type utilities ──────────────────────────────────── */

.t-display { font-family: var(--font-display); font-weight: 700; }
.t-mono { font-family: var(--font-mono); font-size: 13px; }

.eyebrow {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--annot);
}

.divider { height: 1px; background: rgba(231, 235, 244, 0.12); margin: 10px 0 28px; }

.micro { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.04em; }

.kv-key {
  font-family: var(--font-mono); font-size: 11px; font-weight: 500;
  letter-spacing: 0.08em; text-transform: uppercase; color: var(--phosphor); opacity: 0.7;
}

/* ── Panels + buttons + chips ────────────────────────── */

.panel { background: var(--substrate); border-radius: 8px; padding: var(--panel-pad); }

.btn {
  display: inline-block; background: var(--accent); color: #FFFFFF;
  font-family: var(--font-mono); font-size: 13px; font-weight: 500;
  padding: 12px 22px; border-radius: 6px; border: 0; cursor: pointer;
  transition: background-color 140ms;
}
.btn:hover { background: var(--accent-hover); color: #FFFFFF; }

.btn-caption { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; margin-top: 10px; }

.chip {
  display: inline-block; font-family: var(--font-mono); font-size: 11px;
  padding: 2px 8px; border-radius: 2px;
  color: var(--accent); border: 1px solid var(--accent);
}
.chip.beta { color: var(--purple); border: 1px dashed var(--purple); }

.copy-btn {
  font-family: var(--font-mono); font-size: 11px; background: none;
  border: 0; color: var(--accent); cursor: pointer;
  padding: 14px 10px; margin: -12px -6px;
}
.copy-btn:hover { color: var(--accent-hover); }

.echo { box-shadow: 0 0 0 1px var(--annot); }

/* ── Fingerprint band ────────────────────────────────── */

.band { display: flex; gap: 1px; height: 10px; }
.band i { flex: 1; transition: background-color 1.2s; }
.band.verified i { background: var(--green) !important; }

/* ── Status glyphs (real run states) ─────────────────── */

.glyph { width: 10px; height: 10px; flex: none; }
.glyph .done { fill: var(--green); }
.glyph .active { fill: var(--accent); }
.glyph .queued { fill: none; stroke: rgba(231, 235, 244, 0.4); }

@keyframes glyph-pulse { 50% { opacity: 0.4; } }
.glyph.pulsing { animation: glyph-pulse 1.6s ease-in-out infinite; }

/* ── Colophon ────────────────────────────────────────── */

.colophon {
  margin-top: var(--section-gap); padding: 32px 0 48px;
  position: relative;
  display: flex; flex-wrap: wrap; gap: 16px 28px; align-items: baseline;
  font-size: 13px;
}
.colophon::before {
  content: ""; position: absolute; top: 0; left: 0; right: 0;
  height: 1px; background: rgba(231, 235, 244, 0.12);
}
.colophon .copyright { flex-basis: 100%; font-size: 12px; }
.colophon .who { font-family: var(--font-body); opacity: 0.7; }
.colophon .who .mark { font-family: var(--font-display); font-weight: 700; font-size: 14px; opacity: 1; }
.colophon nav { display: flex; gap: 18px; }
.colophon nav a { font-family: var(--font-mono); font-size: 12px; }
.colophon .live { font-family: var(--font-mono); font-size: 11px; opacity: 0.7; margin-left: auto; }
.colophon .live:empty { display: none; }

/* ── States ──────────────────────────────────────────── */

/* Skeletons are still Plate blocks: ambient loops sit outside the
   five-moment motion budget (spec section 5) */
.skeleton { background: var(--plate); border-radius: 8px; min-height: 52px; }

.state-error { font-size: 15px; }
.state-error .retry {
  font-family: var(--font-mono); font-size: 12px; border: 0;
  background: var(--plate); color: var(--phosphor);
  border-radius: 6px; padding: 10px 16px; cursor: pointer; margin-left: 10px;
  min-height: 44px;
}

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .skeleton, .glyph.pulsing { animation: none; }
  * { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}
