/* Meet Gage — marketing site styles. Plain CSS; no build step, no preprocessor.
   Aesthetic: retrofuturist civic field manual. Cheerful compliance bunker.
   Atomic amber + tested-green on bunker charcoal. */

:root {
  --bg: #12100c;
  --bg-alt: #17140e;
  --panel: #1c1810;
  --line: #2c2517;
  --fg: #f2ead9;
  --muted: #a89b7e;
  --amber: #f0a92a;
  --amber-dim: #b9812a;
  --green: #7fc66a;
  --red: #e2683f;
  --blue: #6fb0c9;
  --maxw: 72rem;
  --readw: 46rem;
  --gutter: clamp(1.2rem, 4vw, 2.5rem);
}

* { box-sizing: border-box; }

html {
  color-scheme: dark;
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font: 16px/1.65 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  background:
    radial-gradient(120% 90% at 50% -10%, #201a10 0%, var(--bg) 55%) fixed;
  color: var(--fg);
  overflow-x: hidden;
}

.mono, .eyebrow, .section-label, .console, .console *, .pillar-no, .tag,
.console-status, .foot-fine, .hero-fineprint {
  font-family: ui-monospace, "SF Mono", "JetBrains Mono", Menlo, monospace;
}

/* ── scanlines: faint CRT texture ── */
.scanlines {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 1;
  background: repeating-linear-gradient(
    to bottom,
    rgba(255,255,255,0.015) 0 1px,
    transparent 1px 3px);
  mix-blend-mode: overlay;
}

/* ── offline banner ── */
/* The [hidden] attribute must win over the class's display, or the banner is
   pinned on for every visitor — a class selector's `display` otherwise overrides
   the UA `[hidden] { display: none }` rule. app.js toggles `hidden` by
   navigator.onLine; this makes that toggle actually hide the banner. */
.offline-banner[hidden] { display: none; }

.offline-banner {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  gap: 0.7rem;
  padding: 0.55rem 1.2rem;
  background: var(--amber);
  color: #201700;
  font-size: 0.85rem;
  font-weight: 600;
  box-shadow: 0 2px 14px rgba(0,0,0,0.5);
}
.offline-banner .dot {
  width: 0.6rem; height: 0.6rem;
  border-radius: 50%;
  background: #201700;
  animation: pulse 1.4s ease-in-out infinite;
  flex: none;
}
@keyframes pulse { 0%,100% { opacity: 1; } 50% { opacity: 0.25; } }

/* ── top bar ── */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.85rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(18,16,12,0.82);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.brand {
  display: flex; align-items: center; gap: 0.5rem;
  text-decoration: none; color: var(--fg);
  font-weight: 700; letter-spacing: -0.01em;
}
.brand-name { font-size: 1.1rem; }
.mark { color: var(--amber); font-size: 1.4rem; line-height: 1; }
.topnav { display: flex; align-items: center; gap: clamp(0.6rem, 2vw, 1.6rem); }
.topnav a {
  color: var(--muted); text-decoration: none; font-size: 0.9rem;
  transition: color 0.15s;
}
.topnav a:hover { color: var(--fg); }
.cta-sm {
  color: var(--amber) !important;
  border: 1px solid var(--amber-dim);
  padding: 0.35rem 0.8rem;
  border-radius: 4px;
}
.cta-sm:hover { background: var(--amber); color: #201700 !important; }
@media (max-width: 640px) {
  .topnav a:not(.cta-sm) { display: none; }
}

/* ── shared layout ── */
main { position: relative; z-index: 2; }

.hero, .band {
  max-width: var(--maxw);
  margin: 0 auto;
  padding: clamp(3.5rem, 8vw, 6rem) var(--gutter);
}

/* band-alt bleeds its background edge-to-edge, then reproduces a normal band's
   content column exactly — same width, same left edge — via symmetric padding.
   The old `.band-alt > *` margin-auto centering shifted alt sections one gutter
   off from normal bands (and re-centered narrow children), so they no longer
   lined up down the page. This keeps every section on one vertical axis. */
.band-alt {
  max-width: none;
  background: var(--bg-alt);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-inline: calc(max(0px, (100% - var(--maxw)) / 2) + var(--gutter));
}

/* Offline spotlight: a deliberately distinct warm-tinted band — a second hero
   moment for the un-matchable differentiator. Same full-width + shared content
   column as band-alt (so it stays aligned), its own signal-in-the-dark glow. */
.offline-band {
  max-width: none;
  background: radial-gradient(120% 120% at 50% 0%, #1d160b 0%, var(--bg) 62%);
  border-top: 1px solid var(--line);
  border-bottom: 1px solid var(--line);
  padding-inline: calc(max(0px, (100% - var(--maxw)) / 2) + var(--gutter));
}

h1 {
  margin: 0.6rem 0 1.2rem;
  font-size: clamp(2.1rem, 6vw, 4rem);
  line-height: 1.05;
  letter-spacing: -0.03em;
  max-width: 18ch;
}
h2 {
  margin: 0.4rem 0 1rem;
  font-size: clamp(1.6rem, 4vw, 2.6rem);
  line-height: 1.1;
  letter-spacing: -0.02em;
  max-width: 20ch;
}
h3 { margin: 0 0 0.5rem; font-size: 1.15rem; letter-spacing: -0.01em; }

.eyebrow, .section-label {
  color: var(--amber);
  font-size: 0.78rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  margin: 0;
}

.lede, .section-lede {
  color: var(--fg);
  font-size: clamp(1.05rem, 2vw, 1.28rem);
  line-height: 1.55;
  max-width: var(--readw);
  margin: 0 0 1rem;
}
.section-lede { color: var(--muted); }
.section-lede.strong { color: var(--fg); font-weight: 500; }
p { color: var(--muted); }
strong { color: var(--fg); font-weight: 600; }

/* ── hero ── */
.hero { padding-top: clamp(3rem, 7vw, 5rem); }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.9rem; margin: 1.8rem 0 1rem; }
.hero-fineprint { color: var(--muted); font-size: 0.82rem; letter-spacing: 0.02em; }

.btn {
  display: inline-block;
  text-decoration: none;
  font-weight: 600;
  padding: 0.8rem 1.5rem;
  border-radius: 6px;
  transition: transform 0.1s, background 0.15s, box-shadow 0.15s;
  border: 1px solid transparent;
}
.btn:active { transform: translateY(1px); }
.btn-lg { padding: 1rem 2rem; font-size: 1.05rem; }
.btn-primary {
  background: var(--amber);
  color: #201700;
  box-shadow: 0 0 0 rgba(240,169,42,0.5);
}
.btn-primary:hover { box-shadow: 0 6px 24px rgba(240,169,42,0.28); }
.btn-ghost { border-color: var(--line); color: var(--fg); background: transparent; }
.btn-ghost:hover { border-color: var(--amber-dim); color: var(--amber); }

/* ── console mockup ── */
.console {
  margin-top: 2.5rem;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 10px;
  overflow: hidden;
  box-shadow: 0 20px 60px rgba(0,0,0,0.45);
  font-size: 0.85rem;
}
.console-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 0.7rem 1rem;
  background: #221c12;
  border-bottom: 1px solid var(--line);
}
.console-title { color: var(--amber); letter-spacing: 0.08em; }
.console-status { font-size: 0.72rem; letter-spacing: 0.1em; }
.console-status.ok { color: var(--green); }
.console-status.off { color: var(--amber); }
.console-rows { list-style: none; margin: 0; padding: 0.4rem 0; }
.console-rows li {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.55rem 1rem;
  color: var(--fg);
  border-bottom: 1px solid rgba(44,37,23,0.5);
}
.console-rows li:last-child { border-bottom: 0; }
.tag {
  flex: none;
  font-size: 0.66rem;
  letter-spacing: 0.08em;
  padding: 0.15rem 0.45rem;
  border-radius: 3px;
  font-weight: 700;
}
.tag.due  { background: rgba(240,169,42,0.16); color: var(--amber); }
.tag.over { background: rgba(226,104,63,0.18); color: var(--red); }
.tag.file { background: rgba(111,176,201,0.16); color: var(--blue); }
.tag.pay  { background: rgba(127,198,106,0.16); color: var(--green); }
.cash { margin-left: auto; color: var(--green); font-family: ui-monospace, monospace; }
.console-foot {
  display: flex; justify-content: space-between; flex-wrap: wrap; gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: #221c12;
  border-top: 1px solid var(--line);
  color: var(--muted); font-size: 0.76rem;
}
.console-foot .next { color: var(--green); }

/* ── grids ── */
.grid { display: grid; gap: 1.1rem; margin-top: 2rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 820px) { .grid-2, .grid-3 { grid-template-columns: 1fr; } }

.hazard, .pillar, .wedge-card, .proof {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 9px;
  padding: 1.4rem;
}
.hazard h3 { color: var(--blue); }
.wedge-card h3 { color: var(--amber); }
.hazard p, .pillar p, .wedge-card p { margin: 0; }

.pillar { position: relative; padding-top: 1.6rem; }
.pillar-no {
  position: absolute; top: 1rem; right: 1.2rem;
  color: var(--amber-dim); font-size: 0.85rem; letter-spacing: 0.1em;
}
.pillar h3 { padding-right: 2.5rem; }
.pillar-wide { grid-column: 1 / -1; }
@media (max-width: 820px) { .pillar-wide { grid-column: auto; } }

/* ── flow strip ── */
.flow {
  list-style: none; margin: 2rem 0 0; padding: 0;
  display: flex; flex-wrap: wrap; gap: 0.6rem;
}
.flow li {
  padding: 0.5rem 0.9rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
  color: var(--fg);
  font-size: 0.88rem;
}
.flow li::before { content: "◍ "; color: var(--amber); }

/* ── ledger ── */
.ledger { list-style: none; margin: 2rem 0; padding: 0; max-width: var(--readw); }
.ledger li {
  padding: 0.7rem 0 0.7rem 1.4rem;
  border-bottom: 1px solid var(--line);
  color: var(--muted);
  position: relative;
}
.ledger li::before {
  content: "▸"; position: absolute; left: 0; color: var(--amber);
}
.ledger-leak { color: var(--fg); font-weight: 600; }

/* ── proof ── */
.proof { margin: 0; }
.proof p { color: var(--fg); font-size: 1.02rem; font-style: italic; margin: 0 0 0.8rem; }
.proof footer { color: var(--amber-dim); font-size: 0.8rem; font-style: normal; }

/* ── CTA band ── */
.cta-band { text-align: center; }
.cta-band h1, .cta-band h2 { margin-left: auto; margin-right: auto; }
.cta-band .section-lede { margin-left: auto; margin-right: auto; }
.cta-band .hero-actions { justify-content: center; }

/* ── footer ── */
.sitefoot {
  position: relative; z-index: 2;
  border-top: 1px solid var(--line);
  padding: 2.5rem clamp(1.2rem, 4vw, 2.5rem);
  max-width: var(--maxw);
  margin: 0 auto;
}
.foot-brand { display: flex; align-items: center; gap: 0.5rem; font-weight: 700; font-size: 1.1rem; }
.foot-tag { margin: 0.6rem 0 0.4rem; color: var(--muted); max-width: var(--readw); }
.foot-fine { color: var(--amber-dim); font-size: 0.78rem; letter-spacing: 0.03em; }

/* ── 404 reuse ── */
.centered {
  max-width: var(--readw);
  margin: 0 auto;
  padding: clamp(4rem, 12vw, 8rem) clamp(1.2rem, 4vw, 2.5rem);
  text-align: center;
}

a { color: var(--amber); }

/* ── factsheet (situation report) ── */
.factsheet {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1px;
  margin: 2.2rem 0 0;
  max-width: var(--readw);
  background: var(--line);
  border: 1px solid var(--line);
  border-radius: 9px;
  overflow: hidden;
}
.factsheet > div { background: var(--panel); padding: 1rem 1.2rem; }
.factsheet dt {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.68rem;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--amber);
  margin: 0 0 0.3rem;
}
.factsheet dd { margin: 0; color: var(--fg); font-weight: 500; }
.factsheet dd a { color: var(--fg); }
.factsheet dd a:hover { color: var(--amber); }
@media (max-width: 560px) { .factsheet { grid-template-columns: 1fr; } }

/* ── footer coordinates ── */
.foot-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 1rem;
}
.foot-links { display: flex; flex-wrap: wrap; gap: 1.1rem; }
.foot-links a { color: var(--muted); text-decoration: none; font-size: 0.9rem; }
.foot-links a:hover { color: var(--amber); }
.foot-address {
  font-style: normal;
  color: var(--muted);
  font-size: 0.85rem;
  margin: 0.9rem 0 0.5rem;
  letter-spacing: 0.01em;
}

/* ── legal pages (privacy / terms) ── */
.legal {
  position: relative;
  z-index: 2;
  max-width: var(--readw);
  margin: 0 auto;
  padding: clamp(3rem, 8vw, 5rem) clamp(1.2rem, 4vw, 2.5rem);
}
.legal h1 { font-size: clamp(1.9rem, 5vw, 3rem); margin: 0.5rem 0 0.5rem; max-width: none; }
.legal-meta {
  font-family: ui-monospace, "SF Mono", Menlo, monospace;
  font-size: 0.8rem;
  color: var(--amber-dim);
  letter-spacing: 0.04em;
  margin: 0 0 2.2rem;
}
.prose h2 { font-size: 1.15rem; color: var(--fg); margin: 2rem 0 0.5rem; max-width: none; }
.prose p { color: var(--muted); margin: 0 0 1rem; }
.prose a, .legal-back a { color: var(--amber); }
.legal-back { margin-top: 2.5rem; }
.legal-back a { text-decoration: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .offline-banner .dot { animation: none; }
}
