/* mihiir.com — audit-grade spec sheet
   Default: light engineering paper. Dark terminal via prefers-color-scheme.
   Every fg/bg pair validated ≥ WCAG AA (see scratchpad/contrast_check.py). */

@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-400.woff2") format("woff2");
  font-weight: 400; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-500.woff2") format("woff2");
  font-weight: 500; font-style: normal; font-display: swap;
}
@font-face {
  font-family: "Plex Mono";
  src: url("fonts/plex-mono-600.woff2") format("woff2");
  font-weight: 600; font-style: normal; font-display: swap;
}

:root {
  --ground: #F6F6F3;
  --surface: #FFFFFF;
  --line: #DEDFD8;
  --ink: #15181D;
  --muted: #555D69;
  --accent: #B87700;      /* bars, borders, marks — 3.4:1 on ground */
  --accent-ink: #8A5A00;  /* links, labels — 5.5:1 on ground */
  --ok: #1E7A48;
  --chip: #EFEEE7;
  --art: #77601E;
  --btn-bg: #15181D;      /* spec-sheet authority: ink button on paper */
  --btn-text: #F6F6F3;
  --mono: "Plex Mono", ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  --sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root {
    --ground: #0B0E13;
    --surface: #11151C;
    --line: #232B37;
    --ink: #E9ECF0;
    --muted: #939CAA;
    --accent: #E3A43B;
    --accent-ink: #F0BD68;
    --ok: #4CBF7A;
    --chip: #171D26;
    --art: #A5894E;
    --btn-bg: #E3A43B;    /* terminal amber CTA on dark */
    --btn-text: #0B0E13;
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ground); color: var(--ink);
  font: 16px/1.6 var(--sans);
  -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
a:focus-visible, button:focus-visible, summary:focus-visible {
  outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 3px;
}

.bar { border-top: 3px solid var(--accent); }
.wrap { max-width: 840px; margin: 0 auto; padding: 0 24px 96px; }

/* ── header status line ─────────────────────────── */
header.status {
  display: flex; justify-content: space-between; align-items: baseline; gap: 16px;
  padding: 20px 0 0; font-family: var(--mono);
  font-size: 12.5px; letter-spacing: .04em; color: var(--muted);
}
header.status .id { color: var(--ink); font-weight: 600; }
header.status a { color: var(--muted); text-decoration: none; }
header.status a:hover { color: var(--ink); }
.live { display: inline-flex; align-items: center; gap: 7px; white-space: nowrap; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); display: inline-block; }
@media (prefers-reduced-motion: no-preference) {
  .dot { animation: pulse 2.4s ease-in-out infinite; }
  @keyframes pulse { 50% { opacity: .35; } }
}

/* ── hero ────────────────────────────────────────── */
.hero { display: flex; gap: 44px; align-items: center; padding: 60px 0 44px; }
.hero-text { flex: 1 1 400px; min-width: 0; }
h1 {
  font-size: clamp(27px, 4.4vw, 38px); line-height: 1.16; margin: 0 0 18px;
  font-weight: 650; letter-spacing: -0.015em; text-wrap: balance; max-width: 22ch;
}
h1 em { font-style: normal; color: var(--accent-ink); }
.hero p.sub { max-width: 56ch; color: var(--muted); margin: 0 0 26px; font-size: 16.5px; }
.hero p.sub strong { color: var(--ink); font-weight: 600; }

.cta-row { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; }
.btn {
  display: inline-block; font-family: var(--mono); font-size: 14px; font-weight: 600;
  text-decoration: none; color: var(--btn-text); background: var(--btn-bg);
  padding: 12px 22px; border-radius: 5px; letter-spacing: .01em; border: 0; cursor: pointer;
}
.btn:hover { opacity: .88; }
.btn.alt { background: transparent; color: var(--ink); border: 1px solid var(--line); }
.btn.alt:hover { border-color: var(--accent); opacity: 1; }
.cta-note { font-family: var(--mono); font-size: 12px; color: var(--muted); }
.cta-note a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }

.art {
  flex: 0 0 auto; font-family: var(--mono);
  font-size: 12px; line-height: 1.55; color: var(--art); margin: 0;
  white-space: pre; overflow-x: auto; max-width: 100%;
}
.art b { color: var(--accent-ink); font-weight: 600; }
.art .mid { color: var(--muted); }
@media (max-width: 720px) { .hero { flex-wrap: wrap; padding-top: 40px; } .art { font-size: 11px; } }

/* ── worked-with row ─────────────────────────────── */
.logos { border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); padding: 18px 0; }
.logos .label {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--muted); margin-right: 18px;
}
.logos ul {
  display: inline-flex; flex-wrap: wrap; gap: 8px 22px; margin: 0; padding: 0; list-style: none;
  font-family: var(--mono); font-size: 12.5px; letter-spacing: .06em; color: var(--muted);
  text-transform: uppercase; vertical-align: baseline;
}
.logos li { white-space: nowrap; }

/* ── numbers strip ───────────────────────────────── */
.nums { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.num { padding: 22px 18px 20px; border-right: 1px solid var(--line); }
.num:nth-child(3n) { border-right: none; }
.num:nth-child(-n+3) { border-bottom: 1px solid var(--line); }
.num b {
  display: block; font-family: var(--mono); font-variant-numeric: tabular-nums;
  font-size: 24px; font-weight: 600; letter-spacing: -0.01em;
}
.num span { font-size: 12.5px; color: var(--muted); line-height: 1.45; display: block; margin-top: 6px; }
@media (max-width: 640px) {
  .nums { grid-template-columns: 1fr 1fr; }
  .num { border-right: none !important; }
  .num:nth-child(odd) { border-right: 1px solid var(--line) !important; }
  .num:nth-child(-n+4) { border-bottom: 1px solid var(--line); }
}

/* ── section headers ─────────────────────────────── */
.eyebrow {
  display: flex; align-items: center; gap: 12px;
  font-family: var(--mono); font-size: 11.5px; letter-spacing: .14em;
  text-transform: uppercase; color: var(--accent-ink);
  margin: 56px 0 8px; font-weight: 600; white-space: nowrap;
}
.eyebrow::after { content: ""; flex: 1; border-top: 1px solid var(--line); }
.section-note { color: var(--muted); font-size: 14.5px; margin: 0 0 26px; max-width: 62ch; }

/* ── case studies ────────────────────────────────── */
.case { border-top: 1px solid var(--line); padding: 30px 0 34px; }
.case:first-of-type { border-top: none; padding-top: 6px; }
.case-head { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; margin-bottom: 4px; }
.case h3, .case h2.t { font-size: 19.5px; margin: 0; font-weight: 650; letter-spacing: -0.01em; }
.tag {
  font-family: var(--mono); font-size: 10.5px; letter-spacing: .1em; text-transform: uppercase;
  color: var(--muted); background: var(--chip); border: 1px solid var(--line);
  padding: 3px 9px; border-radius: 3px; white-space: nowrap;
}
.meta { font-family: var(--mono); font-size: 12px; color: var(--muted); margin: 0 0 14px; }
.case p.body { margin: 0 0 16px; max-width: 68ch; font-size: 15.5px; }

.pipeline {
  font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--art);
  margin: 0 0 18px; white-space: pre; overflow-x: auto; padding: 14px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: 5px;
}
.pipeline b { color: var(--ink); font-weight: 600; }

.proofrow { display: flex; flex-wrap: wrap; gap: 8px; }
.proofrow a {
  font-family: var(--mono); font-size: 12.5px; color: var(--accent-ink);
  text-decoration: none; border: 1px solid var(--line); background: var(--surface);
  padding: 6px 11px; border-radius: 4px;
}
.proofrow a:hover { border-color: var(--accent); }
.proofrow .note { font-family: var(--mono); font-size: 12.5px; color: var(--muted); padding: 6px 2px; }

/* ── mid-page CTA band ───────────────────────────── */
.band {
  margin-top: 44px; border: 1px solid var(--line); background: var(--surface); border-radius: 6px;
  padding: 22px 24px; display: flex; align-items: center; justify-content: space-between;
  gap: 18px; flex-wrap: wrap;
}
.band p { margin: 0; font-size: 15.5px; max-width: 46ch; }
.band p strong { font-weight: 650; }

/* ── ledger table ────────────────────────────────── */
.ledger-scroll { overflow-x: auto; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); }
table.ledger {
  width: 100%; border-collapse: collapse; font-family: var(--mono);
  font-size: 12.5px; font-variant-numeric: tabular-nums; min-width: 660px;
}
.ledger th {
  text-align: left; font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--accent-ink); font-weight: 600; padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.ledger td { padding: 10px 14px; border-bottom: 1px solid var(--line); color: var(--muted); vertical-align: top; }
.ledger tr:last-child td { border-bottom: none; }
.ledger td.sys { color: var(--ink); font-weight: 600; white-space: nowrap; }
.ledger td.yr { white-space: nowrap; }
.ledger .ok-txt { color: var(--ok); }

/* ── rates ───────────────────────────────────────── */
.rates { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
@media (max-width: 700px) { .rates { grid-template-columns: 1fr; } }
.rate {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 20px 18px; display: flex; flex-direction: column; gap: 8px;
}
.rate .terms {
  font-family: var(--mono); font-size: 11px; letter-spacing: .08em;
  text-transform: uppercase; color: var(--accent-ink);
}
.rate .price { font-family: var(--mono); font-variant-numeric: tabular-nums; font-size: 22px; font-weight: 600; }
.rate h3.rate-t { margin: 0; font-size: 15.5px; font-weight: 650; letter-spacing: 0; }
.rate p { margin: 0; font-size: 13.5px; color: var(--muted); }

/* ── FAQ / objections ────────────────────────────── */
.faq { display: grid; gap: 10px; }
.faq details {
  background: var(--surface); border: 1px solid var(--line); border-radius: 6px;
  padding: 0 18px;
}
.faq summary {
  cursor: pointer; list-style: none; display: flex; align-items: baseline; gap: 12px;
  padding: 15px 0; font-size: 15px; font-weight: 600;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::before {
  content: "+"; font-family: var(--mono); color: var(--accent-ink); font-weight: 600; flex: none;
}
.faq details[open] summary::before { content: "−"; }
.faq details p { margin: 0 0 16px; padding-left: 24px; color: var(--muted); font-size: 14.5px; max-width: 64ch; }

/* ── final CTA ───────────────────────────────────── */
.contact {
  margin-top: 56px; border: 1px solid var(--line); background: var(--surface);
  border-radius: 6px; padding: 30px 28px;
}
.contact h2 { margin: 0 0 8px; font-size: 21px; letter-spacing: -0.01em; }
.contact > p { margin: 0 0 20px; color: var(--muted); max-width: 56ch; font-size: 15px; }

footer {
  margin-top: 40px; font-family: var(--mono); font-size: 12px;
  color: var(--muted); line-height: 1.7;
}
footer a { color: var(--accent-ink); text-decoration: underline; text-underline-offset: 2px; }
footer .rule { color: var(--art); }

/* ── deep case page ──────────────────────────────── */
.crumb { font-family: var(--mono); font-size: 12.5px; margin: 40px 0 0; }
.crumb a { color: var(--muted); text-decoration: underline; text-underline-offset: 2px; }
.crumb a:hover { color: var(--ink); }
article.deep h1 { margin-top: 18px; max-width: 26ch; }
article.deep .meta { margin-bottom: 26px; }
article.deep h2 { font-size: 17px; font-weight: 650; letter-spacing: -0.01em; margin: 40px 0 10px; }
article.deep p { max-width: 68ch; font-size: 15.5px; margin: 0 0 14px; }
article.deep p.lede { font-size: 17px; color: var(--muted); }
article.deep p.lede strong { color: var(--ink); }
article.deep ul.hard { margin: 0; padding: 0; list-style: none; display: grid; gap: 14px; }
article.deep ul.hard li { display: flex; gap: 12px; font-size: 15px; max-width: 70ch; }
article.deep ul.hard li::before { content: "▸"; color: var(--accent-ink); flex: none; }
article.deep ul.hard li strong { font-weight: 650; }

/* studio byline (2026-07-17) — color MUST match .meta/.section-note (AA-validated) */
.byline, article.deep p.byline { font-size: 0.82rem; letter-spacing: .02em; color: var(--muted); margin-top: 10px; }
