/* ============================================================
   Tokens — spec §2.2. Do not add colours beyond this set.
   ============================================================ */
:root {
  --ink: #1A2421;          /* text, headers — green-black, never pure black */
  --paper: #FBFAF7;        /* page background */
  --tended: #2D6A4F;       /* primary — buttons, links, seals, accents */
  --tended-soft: #E8F0EB;  /* tinted grounds */
  --signal: #9B2C2C;       /* ONLY for "IN FORCE" stamps in the ledger */
  --stamp: #5A6B63;        /* all mono evidence metadata */

  --ink-soft: rgba(26, 36, 33, 0.72);   /* body grey (derived from --ink) */
  --hairline: rgba(26, 36, 33, 0.14);   /* hairline rules (derived from --ink) */

  --font-display: "Newsreader", Georgia, serif;
  --font-body: "Public Sans", system-ui, -apple-system, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius: 6px;                                   /* uniform */
  --shadow: 0 1px 3px rgba(26, 36, 33, 0.08);      /* maximum weight */
  --max-width: 1100px;
  --measure: 62ch;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 400;
  line-height: 1.6;
  text-align: left;
  -webkit-font-smoothing: antialiased;
}

@media (min-width: 900px) {
  body { font-size: 18px; }
}

h1, h2, h3 {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  line-height: 1.15;
  margin: 0 0 0.6em;
  letter-spacing: -0.01em;
}

p { margin: 0 0 1em; max-width: var(--measure); }

a { color: var(--tended); text-decoration-thickness: 1px; text-underline-offset: 3px; }

a, button, .btn { transition: color 150ms ease, background-color 150ms ease, border-color 150ms ease; }

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

.mono {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--stamp);
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--tended);
  color: #fff;
  padding: 0.75rem 1rem;
  border-radius: var(--radius);
  z-index: 100;
}
.skip-link:focus-visible { left: 0.5rem; top: 0.5rem; }

/* ============================================================
   Nav — spec §3.1
   ============================================================ */
.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid transparent;
  transition: border-color 150ms ease;
}
.site-nav.is-scrolled { border-bottom-color: var(--hairline); }

.nav-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  min-height: 60px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.5rem;
  color: var(--ink);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}

.nav-right { display: flex; align-items: center; gap: 1.25rem; }

.nav-tagline { white-space: nowrap; }
@media (max-width: 640px) { .nav-tagline { display: none; } }

.nav-signin {
  font-weight: 500;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--tended);
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.25rem;
}
.nav-signin:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 48px;
  padding: 0 1.5rem;
  border-radius: var(--radius);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  text-decoration: none;
  cursor: pointer;
  border: 1px solid transparent;
}

.btn-primary {
  background: var(--tended);
  color: #fff;
}
.btn-primary:hover { background: #245640; }

.btn-secondary {
  background: transparent;
  color: var(--tended);
  border-color: var(--tended);
}
.btn-secondary:hover { background: var(--tended-soft); }

/* ============================================================
   Hero — spec §3.2
   ============================================================ */
.hero { padding: 4rem 0 4.5rem; }

.hero-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 3.5rem;
  align-items: center;
}

@media (max-width: 860px) {
  .hero { padding: 2.5rem 0 3.5rem; }
  .hero-inner { grid-template-columns: 1fr; gap: 3rem; }
}

.hero-copy h1 {
  font-size: clamp(2.1rem, 4.6vw, 3.1rem);
  margin-bottom: 0.55em;
}

.hero-copy h1 em {
  font-style: italic;
  font-weight: 600;
  color: var(--tended);
}

.lede {
  font-size: 1.15rem;
  line-height: 1.6;
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.statute-lines {
  margin: 0 0 2rem;
  padding: 0;
  white-space: pre-wrap;
  line-height: 1.9;
}

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

/* ============================================================
   The Record Card — signature element, spec §2.3
   ============================================================ */
.hero-card { display: flex; justify-content: center; }

.record-card {
  background: #fff;
  border: 1px solid var(--ink);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  transform: rotate(0.4deg);
  padding: 1.75rem 1.6rem 1.5rem;
  width: 100%;
  max-width: 450px; /* sized so the 56-char evidence line fits at 11.5px */
}

.record-eyebrow {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.09em;
  color: var(--stamp);
  margin: 0 0 1.1rem;
}

.record-name {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.85rem;
  line-height: 1.1;
  color: var(--ink);
  margin: 0 0 0.3rem;
}

.record-tier {
  font-size: 0.95rem;
  color: var(--ink-soft);
  margin: 0 0 1.25rem;
}

.record-seal {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.15rem;
  letter-spacing: 0.16em;
  color: var(--tended);
  text-align: center;
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  padding: 0.65rem 0;
  margin: 0 0 1.25rem;
}

.record-footer {
  display: flex;
  flex-direction: column;
  gap: 0.3rem;
}

.record-footer .mono-line {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 11.5px; /* Plex Mono advance is 0.6em: 56 chars ≈ 393px, fits the 398px inner width */
  letter-spacing: 0.01em;
  color: var(--stamp);
  white-space: nowrap;
}

@media (max-width: 480px) {
  .record-card { padding: 1.4rem 1.25rem 1.25rem; }
  .record-footer .mono-line { white-space: normal; }
  .statute-lines { font-size: 12px; }
}

/* Entrance animation — only runs when JS adds .anim-ready and
   prefers-reduced-motion is NOT set (guarded in site.js too). */
.anim-ready .record-card {
  opacity: 0;
  transform: rotate(0.4deg) translateY(10px);
}
.anim-ready .record-card.is-in {
  opacity: 1;
  transform: rotate(0.4deg) translateY(0);
  transition: opacity 400ms ease, transform 400ms ease;
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .anim-ready .record-card {
    opacity: 1;
    transform: rotate(0.4deg);
    transition: none;
  }
}

/* ============================================================
   Timeline ledger — spec §3.3
   ============================================================ */
.ledger {
  border-top: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
}

.ledger-grid {
  max-width: var(--max-width);
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.ledger-cell {
  padding: 2rem 1.75rem;
  border-left: 1px solid var(--hairline);
}
.ledger-cell:first-child { border-left: none; }

@media (max-width: 1000px) {
  .ledger-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .ledger-cell:nth-child(odd) { border-left: none; }
  .ledger-cell:nth-child(n + 3) { border-top: 1px solid var(--hairline); }
}

@media (max-width: 780px) {
  .ledger-grid { grid-template-columns: 1fr; }
  .ledger-cell {
    border-left: none;
    border-top: 1px solid var(--hairline);
    padding: 1.5rem 1.25rem;
  }
  .ledger-cell:first-child { border-top: none; }
}

.ledger-date {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 13px;
  letter-spacing: 0.04em;
  color: var(--stamp);
  margin: 0 0 0.7rem;
}

.stamp-inforce {
  color: var(--signal);
  border: 1px solid var(--signal);
  border-radius: 2px;
  padding: 1px 6px;
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.stamp-scheduled {
  color: var(--ink);
  border: 1px solid var(--ink);
  border-radius: 2px;
  padding: 1px 6px;
  font-weight: 500;
  letter-spacing: 0.07em;
  white-space: nowrap;
}

.ledger-body {
  margin: 0;
  font-size: 0.98rem;
  line-height: 1.55;
}

/* ============================================================
   Sections
   ============================================================ */
.section { padding: 4.5rem 0; }

.section-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.section h2 {
  font-size: clamp(1.7rem, 3.2vw, 2.25rem);
  margin-bottom: 1.2em;
}

.section-tinted { background: var(--tended-soft); }

.section-cta { margin-top: 2rem; }

@media (max-width: 640px) {
  .section { padding: 3rem 0; }
}

/* ============================================================
   How the record works — spec §3.4
   ============================================================ */
.steps {
  list-style: none;
  margin: 0 0 2.5rem;
  padding: 0;
  display: flex;
  flex-direction: column;
  gap: 2.5rem;
}

.step {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  gap: 1.25rem;
  align-items: start;
}

.step-marker {
  font-family: var(--font-mono);
  font-weight: 500;
  font-size: 1rem;
  color: var(--tended);
  border: 1px solid var(--tended);
  border-radius: var(--radius);
  width: 2.6rem;
  height: 2.6rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: 0.2rem;
}

.step-body h3 { font-size: 1.35rem; margin-bottom: 0.4em; }

.step-body p { margin-bottom: 0.75em; }

.step-detail {
  font-family: var(--font-mono);
  font-weight: 400;
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--stamp);
  margin-bottom: 0;
}

.section-note {
  border-top: 1px solid var(--hairline);
  padding-top: 1.75rem;
  color: var(--ink-soft);
}

@media (max-width: 640px) {
  .step { grid-template-columns: 2.4rem minmax(0, 1fr); gap: 1rem; }
  .step-marker { width: 2.2rem; height: 2.2rem; font-size: 0.9rem; }
}

/* ============================================================
   Footer — spec §3.7
   ============================================================ */
.site-footer {
  border-top: 1px solid var(--hairline);
  padding: 3.5rem 0 3rem;
}

.footer-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.25rem;
}

.footer-wordmark {
  font-family: var(--font-display);
  font-optical-sizing: auto;
  font-weight: 600;
  font-size: 1.35rem;
  margin-bottom: 0.75rem;
}

.footer-line {
  color: var(--ink-soft);
  margin-bottom: 1.5rem;
}

.footer-links { margin-bottom: 1.25rem; }
.footer-links a {
  display: inline-block;
  padding: 0.5rem 0; /* keeps tap targets comfortable */
}

.footer-reg { margin-bottom: 0; }

/* ============================================================
   Utility pages (/privacy, /contact)
   ============================================================ */
.page { padding: 3.5rem 0 5rem; }

.page .section-inner > h1 {
  font-size: clamp(1.9rem, 3.6vw, 2.5rem);
  margin-bottom: 0.75em;
}

.page h2 { font-size: 1.35rem; margin-top: 2em; }

.review-flag {
  background: var(--tended-soft);
  border: 1px solid var(--tended);
  border-radius: var(--radius);
  padding: 1rem 1.25rem;
  max-width: var(--measure);
  margin-bottom: 2.5rem;
}
.review-flag p { margin: 0; }

.placeholder-note {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.02em;
  color: var(--stamp);
}

.contact-email {
  font-size: 1.15rem;
  font-weight: 600;
}
