/* zkasper — landing page
   Palette encodes the argument: warm = the 512 you trust today, cool = the set we prove. */

:root {
  --ground:      #0A0C10;
  --surface:     #0F1218;
  --rule:        #1D222B;
  --rule-strong: #2A313D;
  --text:        #E7EAF0;
  --muted:       #8C95A6;
  --dim:         #3A4352;
  --warn:        #D9A05B;
  --signal:      #79BECB;

  --serif: ui-serif, Georgia, "Iowan Old Style", "Palatino Linotype", "Times New Roman", serif;
  --sans:  -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono:  ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --gap:  clamp(1.25rem, 4vw, 2rem);
  --band: clamp(3.5rem, 9vw, 6.5rem);
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--ground);
  color: var(--text);
  font-family: var(--sans);
  font-size: 16px;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

.wrap {
  width: 100%;
  max-width: 58rem;
  margin: 0 auto;
  padding-inline: var(--gap);
}

.prose, .lead, .footnote { max-width: 40rem; }

a { color: inherit; }

.skip {
  position: absolute;
  left: -9999px;
}
.skip:focus {
  left: var(--gap);
  top: 0.5rem;
  z-index: 10;
  background: var(--surface);
  border: 1px solid var(--rule-strong);
  padding: 0.5rem 0.9rem;
  border-radius: 2px;
}

:focus-visible {
  outline: 2px solid var(--signal);
  outline-offset: 3px;
  border-radius: 1px;
}

.vh {
  position: absolute;
  width: 1px; height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ── Masthead ─────────────────────────────────────────────── */

.masthead {
  border-bottom: 1px solid var(--rule);
}
.masthead-in {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 3.5rem;
  flex-wrap: wrap;
}

.wordmark {
  font-family: var(--mono);
  font-size: 0.9rem;
  letter-spacing: 0.04em;
  color: var(--text);
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
}
.status-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--warn);
  flex: none;
}

/* ── Hero ─────────────────────────────────────────────────── */

.hero {
  padding-block: clamp(4rem, 13vw, 8.5rem) clamp(3.5rem, 9vw, 6rem);
}

.display {
  font-family: var(--serif);
  font-weight: 400;
  letter-spacing: -0.022em;
  margin: 0;
}

h1.display {
  font-size: clamp(2.6rem, 8.2vw, 4.6rem);
  line-height: 1.03;
}

.h2 {
  font-size: clamp(1.55rem, 3.9vw, 2.3rem);
  line-height: 1.2;
  letter-spacing: -0.018em;
  margin: 0 0 1.5rem;
  max-width: 24ch;
}

.lead {
  margin: clamp(1.5rem, 3vw, 2rem) 0 0;
  font-size: clamp(1.02rem, 1.9vw, 1.16rem);
  line-height: 1.65;
  color: #C3CAD6;
}
.lead em {
  font-style: italic;
  color: var(--text);
}

.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
}

.btn {
  display: inline-flex;
  align-items: baseline;
  gap: 0.4rem;
  font-family: var(--mono);
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-decoration: none;
  padding: 0.62rem 1.1rem;
  border: 1px solid var(--rule-strong);
  border-radius: 2px;
  color: var(--text);
  background: var(--surface);
  transition: border-color 0.18s ease, color 0.18s ease, background 0.18s ease;
}
.btn:hover {
  border-color: var(--signal);
  color: var(--signal);
}
.btn-quiet {
  background: none;
  border-color: transparent;
  color: var(--muted);
  padding-inline: 0;
}
.btn-quiet:hover {
  color: var(--text);
  border-color: transparent;
  text-decoration: underline;
  text-underline-offset: 4px;
}
.btn-arw { font-size: 0.9em; }

/* ── Bands ────────────────────────────────────────────────── */

.band {
  border-top: 1px solid var(--rule);
  padding-block: var(--band);
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1.1rem;
}
.eyebrow::before {
  content: "";
  display: inline-block;
  width: 1.6rem;
  height: 1px;
  background: var(--rule-strong);
  vertical-align: middle;
  margin-right: 0.7rem;
}

.prose p { margin: 0 0 1.15rem; }
.prose p:last-child { margin-bottom: 0; }
.prose strong { color: var(--text); font-weight: 600; }
.prose code {
  font-family: var(--mono);
  font-size: 0.86em;
  color: var(--signal);
  overflow-wrap: anywhere;
}
.prose a {
  color: var(--signal);
  text-decoration: none;
  border-bottom: 1px solid rgba(121, 190, 203, 0.35);
}
.prose a:hover { border-bottom-color: var(--signal); }

.prose, .footnote { color: #A9B1C0; }
.note-after { margin-top: clamp(1.75rem, 4vw, 2.5rem); }

/* ── The dot field ────────────────────────────────────────── */

.field {
  margin: clamp(1.75rem, 4vw, 2.75rem) 0 clamp(1.75rem, 4vw, 2.5rem);
}
.field svg {
  display: block;
  width: 100%;
  height: auto;
  background: var(--surface);
  border: 1px solid var(--rule);
  border-radius: 2px;
  padding: clamp(0.4rem, 1.4vw, 0.9rem);
}
.glow {
  animation: breathe 7s ease-in-out infinite;
  transform-origin: 22.5px 11.5px;
}
@keyframes breathe {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}

.field figcaption {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem 1.5rem;
  margin-top: 0.9rem;
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  color: var(--muted);
}
.key { display: inline-flex; align-items: center; gap: 0.5rem; }
.key-swatch {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--warn);
  flex: none;
}
.key-dim .key-swatch { background: var(--dim); }

/* ── Comparison table ─────────────────────────────────────── */

.cmp {
  width: 100%;
  border-collapse: collapse;
  margin: clamp(1.5rem, 4vw, 2.25rem) 0 0;
  text-align: left;
  font-size: 0.95rem;
}
.cmp th, .cmp td {
  padding: 1.1rem 1.15rem;
  border-top: 1px solid var(--rule);
  vertical-align: top;
}
.cmp thead th {
  border-top: 0;
  border-bottom: 1px solid var(--rule-strong);
  padding-top: 0;
  font-family: var(--mono);
  font-size: 0.72rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
}
.cmp thead th.ours { color: var(--signal); }
.cmp tbody th {
  font-family: var(--mono);
  font-size: 0.74rem;
  font-weight: 400;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--muted);
  width: 22%;
  padding-left: 0;
}
.cmp td { color: #B7BFCC; width: 39%; }
.cmp td.ours {
  color: var(--text);
  background: rgba(121, 190, 203, 0.045);
  box-shadow: inset 1px 0 0 rgba(121, 190, 203, 0.22);
}

.verdict {
  font-family: var(--mono);
  font-size: 1.2rem;
  letter-spacing: 0.04em;
}
.verdict-no  { color: var(--warn); }
.verdict-yes { color: var(--signal); }

.tag { display: none; }

/* ── Stages ───────────────────────────────────────────────── */

.stages {
  list-style: none;
  counter-reset: stage;
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0 0.8rem;
  padding: 0;
  border-left: 1px solid var(--rule);
}
.stages li {
  counter-increment: stage;
  position: relative;
  padding: 0 0 1.9rem 2.4rem;
  max-width: 42rem;
}
.stages li:last-child { padding-bottom: 0; }
.stages li::before {
  content: counter(stage, decimal-leading-zero);
  position: absolute;
  left: 0;
  top: 0.15rem;
  transform: translateX(-50%);
  background: var(--ground);
  padding: 0.15rem 0.35rem;
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.06em;
  color: var(--muted);
}
.stage-name {
  font-family: var(--serif);
  font-size: 1.22rem;
  letter-spacing: -0.01em;
  margin: 0 0 0.35rem;
  color: var(--text);
}
.stage-body {
  margin: 0;
  color: #A9B1C0;
}

/* ── Metrics ──────────────────────────────────────────────── */

.metrics {
  margin: clamp(1.75rem, 4vw, 2.5rem) 0 0;
  border-top: 1px solid var(--rule);
}
.metric {
  display: grid;
  grid-template-columns: minmax(7.5rem, 9rem) 1fr;
  gap: 0.35rem 2rem;
  padding: 1.15rem 0;
  border-bottom: 1px solid var(--rule);
}
.metric dt {
  font-family: var(--mono);
  font-size: clamp(1.35rem, 3.6vw, 1.7rem);
  letter-spacing: -0.02em;
  color: var(--signal);
  line-height: 1.3;
}
.metric dd {
  margin: 0;
  color: #A9B1C0;
}
.metric-name {
  display: block;
  color: var(--text);
  font-size: 0.95rem;
}

.footnote {
  margin: 1.5rem 0 0;
  font-size: 0.86rem;
  line-height: 1.6;
  color: var(--muted);
}

/* ── Ledger ───────────────────────────────────────────────── */

.ledger {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(17rem, 1fr));
  gap: clamp(1.75rem, 4vw, 3rem);
  margin-top: clamp(2.5rem, 6vw, 3.5rem);
}
.ledger-head {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--rule-strong);
}
.ledger-done { color: var(--signal); }
.ledger-todo { color: var(--warn); }
.ledger ul {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.93rem;
  color: #A9B1C0;
}
.ledger li {
  padding: 0.45rem 0 0.45rem 1.1rem;
  position: relative;
  line-height: 1.55;
}
.ledger li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.95rem;
  width: 4px; height: 1px;
  background: var(--rule-strong);
}

/* ── Footer ───────────────────────────────────────────────── */

.foot {
  border-top: 1px solid var(--rule);
  padding-block: 2.25rem 3rem;
}
.foot-in {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.75rem 1.5rem;
}
.foot a {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--muted);
  text-decoration: none;
}
.foot a:hover { color: var(--signal); }

/* ── Narrow ───────────────────────────────────────────────── */

@media (max-width: 640px) {
  .cmp, .cmp thead, .cmp tbody, .cmp tr, .cmp th, .cmp td { display: block; width: auto; }
  .cmp thead { display: none; }
  .cmp tbody tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0.9rem;
    border-top: 1px solid var(--rule-strong);
    padding-top: 1rem;
    margin-top: 1.4rem;
  }
  .cmp tbody th { grid-column: 1 / -1; }
  .cmp tbody tr:first-child { margin-top: 0; }
  .cmp tbody th {
    padding: 0 0 0.5rem;
    border-top: 0;
    width: auto;
  }
  .cmp td {
    padding: 0.15rem 0 0.6rem 0.75rem;
    font-size: 0.88rem;
    border-top: 0;
    box-shadow: inset 1px 0 0 var(--rule-strong);
  }
  .cmp td.ours { box-shadow: inset 1px 0 0 rgba(121, 190, 203, 0.4); }
  .tag {
    display: block;
    font-family: var(--mono);
    font-size: 0.66rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--muted);
    margin-bottom: 0.15rem;
  }
  .metric {
    grid-template-columns: 1fr;
    gap: 0.2rem;
  }
  .stages li { padding-left: 2.1rem; }
}

@media (prefers-reduced-motion: reduce) {
  .glow { animation: none; opacity: 0.8; }
  * { transition-duration: 0.01ms !important; }
}

@media print {
  body { background: #fff; color: #000; }
}
