@import "tokens/fonts.css";
@import "tokens/colors.css";
@import "tokens/typography.css";
@import "tokens/spacing.css";
@import "tokens/motion.css";

/* ── Reset & base ─────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: hidden; max-width: 100%; }
img { max-width: 100%; display: block; }
a { color: var(--link); }
p { margin: 0; }

.wrap {
  max-width: 1120px;
  margin: 0 auto;
  padding: 0 32px;
}

section { padding: var(--space-9) 0; border-top: 1px solid var(--rule); }
section:first-of-type { border-top: none; }

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  color: var(--graphite);
  margin-bottom: var(--space-3);
}

h2.section-title { font-size: var(--text-xl); max-width: 26ch; }
p.lede {
  font-size: var(--text-md);
  color: var(--graphite);
  max-width: var(--measure-site);
  margin-top: var(--space-4);
}

/* ── Wordmark ─────────────────────────────────────────── */
.wordmark { display: inline-block; line-height: 1; text-decoration: none; }
.wordmark .word {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: -0.02em;
  color: var(--ink);
}
/* the trace points at the ai hiding in plain */
.wordmark .ai { position: relative; }
.wordmark .ai::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: -0.14em;
  height: 2px;
  background: var(--trace);
}
.wordmark.inverse .word { color: var(--paper); }
.wordmark.inverse .ai::after { background: var(--paper); }

/* ── Nav ──────────────────────────────────────────────── */
.site-header {
  border-bottom: 1px solid var(--rule);
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 5;
}
.site-header .wrap {
  padding: 18px 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.site-header .wordmark .word { font-size: 22px; }
.site-nav { display: flex; gap: 28px; align-items: center; }
.site-nav a.nav-link {
  font-family: var(--font-body);
  font-size: var(--text-sm);
  color: var(--ink);
  text-decoration: none;
}
.site-nav a.nav-link:hover { color: var(--proof); text-decoration: underline; text-underline-offset: 3px; }
.nav-toggle { display: none; }

/* ── Buttons ──────────────────────────────────────────── */
.btn {
  font-family: var(--font-body);
  font-weight: var(--weight-semibold);
  border-radius: var(--radius-sm);
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  line-height: 1.2;
  text-decoration: none;
  transition: background-color var(--duration-micro) var(--ease-out), color var(--duration-micro) var(--ease-out), border-color var(--duration-micro) var(--ease-out);
  border: 1px solid var(--ink);
}
.btn-lg { font-size: var(--text-md); padding: 13px 26px; }
.btn-md { font-size: var(--text-base); padding: 10px 20px; }
.btn-primary { background: var(--ink); color: var(--paper); }
.btn-primary:hover { background: #2B2F33; border-color: #2B2F33; }
.btn-secondary { background: transparent; color: var(--ink); }
.btn-secondary:hover { background: var(--mist); }

/* ── Cards ────────────────────────────────────────────── */
.card {
  background: var(--surface-card);
  border-radius: var(--radius-md);
  box-shadow: var(--elevation-flat);
  padding: var(--space-5);
}
.card h3 { font-size: var(--text-lg); }
.card p { font-size: var(--text-sm); color: var(--graphite); margin: var(--space-2) 0 var(--space-3); }

/* ── Badge ────────────────────────────────────────────── */
.badge {
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border-radius: var(--radius-sm);
  padding: 3px 9px;
  white-space: nowrap;
  display: inline-block;
  background: var(--mist);
  color: var(--graphite);
}
.badge-proof { background: var(--proof-tint); color: var(--proof-deep); }

/* ── Timestamp chip ───────────────────────────────────── */
.timestamp {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  border: 1px solid var(--rule);
  color: var(--graphite);
  border-radius: var(--radius-full);
  padding: 3px 12px;
  white-space: nowrap;
}
.timestamp .shown { color: var(--proof); font-weight: 500; }
.timestamp.inverse { border-color: var(--ink); background: var(--ink); color: var(--paper); }
.timestamp.inverse .shown { color: var(--paper); }

/* ── By Friday stamp ──────────────────────────────────── */
.byfriday-stamp {
  display: inline-block;
  border: 2px solid var(--ink);
  padding: 10px 18px;
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  font-size: var(--text-xl);
  line-height: 1.05;
  color: var(--ink);
}
.byfriday-stamp .note {
  display: block;
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 10px;
  letter-spacing: var(--tracking-mono-label);
  text-transform: uppercase;
  color: var(--proof);
  margin-top: 6px;
}

/* ── Claim + proof ────────────────────────────────────── */
.claim-proof { display: flex; flex-direction: column; gap: 10px; }
.claim-proof .claim {
  font-family: var(--font-display);
  font-weight: var(--weight-display);
  letter-spacing: var(--tracking-display);
  font-size: var(--text-lg);
  line-height: var(--leading-snug);
  color: var(--ink);
}
.claim-proof .proof {
  border-left: 2px solid var(--trace);
  padding-left: 14px;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.7;
  color: var(--graphite);
}
.claim-proof .proof a { color: var(--proof); text-decoration: underline; text-underline-offset: 2px; }

/* ── Hero ─────────────────────────────────────────────── */
.hero {
  padding: var(--space-9) 0 80px;
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 64px;
  align-items: start;
}
.hero h1 { font-size: var(--text-3xl); max-width: 12ch; }
.hero .lede { max-width: 52ch; margin-top: var(--space-5); }
.hero .cta-row { display: flex; gap: 12px; margin-top: var(--space-6); align-items: center; flex-wrap: wrap; }
.hero .hero-stamp { margin-top: var(--space-4); }
.hero-evidence { display: grid; gap: 28px; padding-top: 12px; }

/* ── Timeline (genesis) ───────────────────────────────── */
.timeline { display: flex; flex-direction: column; margin-top: var(--space-7); }
.timeline-row { display: grid; grid-template-columns: 110px 16px 1fr; gap: 12px; }
.timeline-label { text-align: right; padding-top: 2px; }
.timeline-label .eyebrow { margin-bottom: 0; }
.timeline-spine { position: relative; }
.timeline-dot { position: absolute; left: 3px; top: 6px; width: 8px; height: 8px; border-radius: 50%; background: var(--ink); }
.timeline-row:first-child .timeline-dot { background: var(--proof); }
.timeline-line { position: absolute; left: 6px; top: 16px; bottom: -6px; width: 2px; background: var(--rule); }
.timeline-row:first-child .timeline-line { background: var(--proof); }
.timeline-body { padding-bottom: 28px; }
.timeline-row:last-child .timeline-body { padding-bottom: 0; }
.timeline-body p.title { font-size: var(--text-base); font-weight: var(--weight-semibold); color: var(--ink); }
.timeline-body p.detail { font-size: var(--text-sm); color: var(--graphite); margin-top: 4px; }

/* ── Grids ────────────────────────────────────────────── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; margin-top: var(--space-7); }
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 20px; margin-top: var(--space-7); }
.grid-5 { display: grid; grid-template-columns: repeat(5, 1fr); gap: 16px; margin-top: var(--space-7); }

/* ── Ledger table ─────────────────────────────────────── */
.ledger-wrap { overflow-x: auto; margin-top: var(--space-6); }
table.ledger { border-collapse: collapse; width: 100%; background: var(--surface-card); min-width: 640px; }
table.ledger caption {
  caption-side: top; text-align: left; font-family: var(--font-mono); font-size: var(--text-xs);
  letter-spacing: var(--tracking-mono-label); text-transform: uppercase; color: var(--graphite); padding: 0 0 8px;
}
table.ledger th, table.ledger td { padding: 10px 14px; font-size: var(--text-sm); text-align: left; vertical-align: top; }
table.ledger thead tr { border-bottom: 2px solid var(--ink); }
table.ledger th { font-family: var(--font-mono); font-size: var(--text-xs); letter-spacing: var(--tracking-mono-label); text-transform: uppercase; font-weight: 500; color: var(--graphite); }
table.ledger tbody tr { border-bottom: 1px solid var(--rule); }
table.ledger td.is-makeplain { font-weight: 600; color: var(--ink); background: var(--proof-tint); }
table.ledger th.is-makeplain { color: var(--proof-deep); }

/* ── Manifesto (inverse panel) ────────────────────────── */
.manifesto { background: var(--surface-inverse); border-top: none; }
.manifesto .eyebrow { color: var(--rule); }
.manifesto h2 { font-size: var(--text-3xl); color: var(--paper); max-width: 20ch; }
.manifesto p.lede { color: var(--rule); max-width: 52ch; }
.manifesto .closing { font-family: var(--font-display); font-weight: var(--weight-display); color: var(--paper); font-size: var(--text-lg); margin-top: var(--space-6); }

/* ── Footer ───────────────────────────────────────────── */
.site-footer { border-top: 1px solid var(--rule); }
.site-footer .wrap { padding: 40px 32px; display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.footer-blurb { font-size: var(--text-sm); color: var(--graphite); max-width: 320px; margin-top: 14px; }
.footer-links { display: flex; gap: 48px; font-size: var(--text-sm); flex-wrap: wrap; }
.footer-col { display: grid; gap: 8px; }
.footer-col a { color: var(--ink); text-decoration: none; }
.footer-col a:hover { color: var(--proof); text-decoration: underline; }

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 560px) {
  .timestamp { white-space: normal; flex-wrap: wrap; border-radius: var(--radius-md); }
  .hero, section, .site-footer .wrap { padding-left: 20px; padding-right: 20px; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { justify-content: center; }
  .hero > div, .hero-evidence, .card, .claim-proof, .byfriday-stamp { min-width: 0; max-width: 100%; }
}

@media (max-width: 900px) {
  .site-nav { display: none; }
  .site-nav.open { display: flex; position: absolute; top: 100%; left: 0; right: 0; background: var(--paper); border-bottom: 1px solid var(--rule); flex-direction: column; gap: 0; padding: 8px 0; }
  .site-nav.open a.nav-link { padding: 12px 32px; }
  .site-nav.open .btn { margin: 8px 32px; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 36px; height: 36px; border: 1px solid var(--ink); background: transparent;
    border-radius: var(--radius-sm); cursor: pointer; font-family: var(--font-mono); font-size: 12px;
  }
  .hero { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .grid-5 { grid-template-columns: repeat(2, 1fr); }
  h1 { font-size: var(--text-2xl) !important; }
}

@media (max-width: 560px) {
  .grid-5 { grid-template-columns: 1fr; }
  .site-footer .wrap { flex-direction: column; }
}
