/* ============================================================
   Self-hosted fonts — subset to Latin, woff2, variable where
   possible. No third-party request, no render-blocking CSS
   round-trip, no Google Fonts privacy/GDPR surface.
   ============================================================ */

@font-face {
  font-family: "Fraunces";
  src: url("fonts/fraunces-var.woff2") format("woff2-variations"),
       url("fonts/fraunces-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Inter";
  src: url("fonts/inter-var.woff2") format("woff2-variations"),
       url("fonts/inter-var.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

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

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

/* ============================================================
   Quantivs — design system
   Paper  #F5F1E8 · Ink #201B12 · Muted #6B6353
   Hairline #DED6C2 · Accent #D9480F (hover #B83A0B, tint #F9E4D8)
   Display: Fraunces · Body: Inter · Mono: IBM Plex Mono
   ============================================================ */

:root {
  --paper: #F5F1E8;
  --paper-2: #EFE9DB;
  --ink: #201B12;
  --muted: #6B6353;
  --line: #DED6C2;
  --accent: #D9480F;          /* fills, borders, non-text UI — 3.81:1 vs paper (AA for UI) */
  --accent-text: #A8330A;     /* text-on-paper accent — 6.28:1 vs paper (AA + AAA-large) */
  --accent-dark: #B83A0B;
  --accent-tint: #F9E4D8;
  --display: "Fraunces", Georgia, serif;
  --body: "Inter", -apple-system, sans-serif;
  --mono: "IBM Plex Mono", "SFMono-Regular", monospace;
  --wrap: 1160px;
  --radius: 4px;
}

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

@media (prefers-reduced-motion: no-preference) {
  html { scroll-behavior: smooth; }
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

/* ---------- typography ---------- */

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 560;
  line-height: 1.08;
  letter-spacing: -0.015em;
  margin: 0 0 0.5em;
}

h1 { font-size: clamp(2.5rem, 5.4vw, 4.3rem); }
h2 { font-size: clamp(1.9rem, 3.6vw, 2.9rem); }
h3 { font-size: 1.35rem; }

p { margin: 0 0 1em; }

a { color: var(--ink); text-decoration-color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-text); }

a:focus-visible,
button:focus-visible,
summary:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 2px;
}

::selection { background: var(--accent); color: var(--paper); }

.mono {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--accent-text);
  margin: 0 0 1.4rem;
}

.eyebrow .sec { color: var(--muted); }

.lede {
  font-size: 1.13rem;
  color: var(--muted);
  max-width: 56ch;
}

.fig-cap {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 1rem;
}

/* ---------- layout ---------- */

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 1.5rem;
}

section { padding: 5.5rem 0; }

section + section { border-top: 1px solid var(--line); }

.sec-head { max-width: 46rem; margin-bottom: 3rem; }

.skip-link {
  position: absolute;
  left: 1rem;
  top: -4rem;
  z-index: 200;
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1.1rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  text-decoration: none;
  transition: top 0.15s ease;
}
.skip-link:focus { top: 1rem; color: var(--paper); }

/* ---------- nav ---------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}

.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
  height: 4.5rem;
}

.brand {
  font-family: var(--display);
  font-weight: 640;
  font-size: 1.4rem;
  letter-spacing: -0.02em;
  text-decoration: none;
  color: var(--ink);
}
.brand span { color: var(--accent-text); }

.nav-links {
  display: flex;
  align-items: center;
  gap: 1.9rem;
  list-style: none;
  margin: 0;
  padding: 0;
}

.nav-links a {
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink);
}
.nav-links a:hover { color: var(--accent-text); }

.nav-links a[aria-current="page"] {
  color: var(--accent-text);
  font-weight: 600;
}

.nav-cta { margin-left: 0.4rem; }

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.55rem 0.9rem;
  color: var(--ink);
  cursor: pointer;
}

/* ---------- buttons ---------- */

.btn {
  display: inline-block;
  font-family: var(--body);
  font-weight: 600;
  font-size: 0.95rem;
  line-height: 1;
  padding: 0.95rem 1.6rem;
  border-radius: var(--radius);
  border: 1px solid transparent;
  text-decoration: none;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}

.btn-accent {
  background: var(--accent-dark);
  color: #FFFFFF;
}
.btn-accent:hover { background: #8F2C06; color: #FFFFFF; }

.btn-ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-ghost:hover { border-color: var(--accent-text); color: var(--accent-text); }

.btn-ghost-light {
  background: transparent;
  color: var(--paper);
  border-color: rgba(245, 241, 232, 0.5);
}
.btn-ghost-light:hover { border-color: var(--paper); color: var(--paper); }

.cta-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.9rem;
  align-items: center;
}

/* ---------- hero ---------- */

.hero { padding: 5rem 0 6rem; }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
  gap: 4rem;
  align-items: center;
}

.hero .lede { margin-bottom: 2.2rem; }

.machine { width: 100%; height: auto; display: block; }

.machine .node-box { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.machine .node-box-accent { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.4; }
.machine .wire { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.machine .wire-flow {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 5 7;
}
.machine .core-ring {
  fill: none;
  stroke: var(--accent);
  stroke-width: 1.4;
  stroke-dasharray: 4 8;
  transform-origin: center;
  transform-box: fill-box;
}
.machine .pulse { fill: var(--accent); opacity: 0; }
.machine .out-glow { fill: var(--accent); opacity: 0; }
.machine text { font-family: var(--mono); fill: var(--ink); }
.machine .t-label { font-size: 10px; letter-spacing: 0.14em; text-transform: uppercase; fill: var(--muted); }
.machine .t-name { font-family: var(--display); font-size: 17px; font-weight: 560; }
.machine .t-accent { fill: var(--accent); }

@keyframes flow { to { stroke-dashoffset: -12; } }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- shift / comparison ---------- */

.compare {
  display: grid;
  grid-template-columns: 1fr 1fr;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  overflow: hidden;
  margin-top: 2.5rem;
}

.compare-col { padding: 2rem 2.2rem; }
.compare-col + .compare-col { border-left: 1px solid var(--line); }
.compare-col.is-new { background: var(--ink); color: var(--paper); }
.compare-col.is-new .compare-row span { color: rgba(245, 241, 232, 0.65); }
.compare-col.is-new h3 { color: var(--paper); }

.compare-tag {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  display: block;
  margin-bottom: 1.2rem;
}
.compare-col.is-new .compare-tag { color: var(--accent-text); }

.compare-row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.7rem 0;
  border-top: 1px solid var(--line);
  font-weight: 600;
  font-size: 0.98rem;
}
.compare-col.is-new .compare-row { border-top-color: rgba(245, 241, 232, 0.18); }
.compare-row span { font-weight: 400; color: var(--muted); font-family: var(--mono); font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; padding-top: 0.2rem; }

/* ---------- cards / grids ---------- */

.grid-3 {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.2rem;
}

.grid-2 {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.2rem;
}

.card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.8rem;
  background: var(--paper);
  display: flex;
  flex-direction: column;
  transition: border-color 0.15s ease, transform 0.15s ease;
}
.card:hover { border-color: var(--ink); }

.card-num {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  color: var(--accent-text);
  margin-bottom: 1.1rem;
}

.card h3 { margin-bottom: 0.4rem; }
.card p { color: var(--muted); font-size: 0.95rem; margin-bottom: 1.2rem; }

.card-link {
  margin-top: auto;
  font-weight: 600;
  font-size: 0.92rem;
  text-decoration: none;
  color: var(--ink);
}
.card-link::after { content: " →"; color: var(--accent-text); }
.card-link:hover { color: var(--accent-text); }

.card .status {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.28rem 0.7rem;
  align-self: flex-start;
  margin-bottom: 1rem;
}
.card .status.is-dev { color: var(--muted); border-color: var(--line); }

.section-note {
  margin-top: 2.4rem;
  font-family: var(--mono);
  font-size: 0.8rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--muted);
  border-top: 1px solid var(--line);
  padding-top: 1.2rem;
}
.section-note strong { color: var(--accent-text); font-weight: 500; }

/* ---------- serve list ---------- */

.serve-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--line);
}

.serve-list li { border-bottom: 1px solid var(--line); }

.serve-list a {
  display: flex;
  align-items: baseline;
  gap: 1.4rem;
  padding: 1.3rem 0.4rem;
  text-decoration: none;
  color: var(--ink);
}
.serve-list a:hover { color: var(--accent-text); }

.serve-list .serve-name {
  font-family: var(--display);
  font-size: 1.35rem;
  font-weight: 560;
}

.serve-list .serve-desc { color: var(--muted); font-size: 0.92rem; }

.serve-list .serve-arrow {
  margin-left: auto;
  color: var(--accent-text);
  font-family: var(--mono);
  font-size: 0.8rem;
}

.serve-badge {
  font-family: var(--mono);
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--accent-text);
  border: 1px solid var(--accent);
  border-radius: 999px;
  padding: 0.2rem 0.6rem;
  white-space: nowrap;
}

/* ---------- steps ---------- */

.steps {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 2.5rem;
  counter-reset: step;
}

.step { border-top: 2px solid var(--ink); padding-top: 1.4rem; }
.step .step-word {
  font-family: var(--display);
  font-size: 2rem;
  font-weight: 600;
  display: block;
  margin-bottom: 0.4rem;
}
.step .step-word em { color: var(--accent-text); font-style: normal; }
.step p { color: var(--muted); font-size: 0.96rem; margin: 0; }

/* ---------- dark CTA band ---------- */

.band {
  background: var(--ink);
  color: var(--paper);
  text-align: center;
  padding: 6rem 0;
}
.band h2 { color: var(--paper); max-width: 22ch; margin-left: auto; margin-right: auto; }
.band p { color: rgba(245, 241, 232, 0.65); max-width: 46ch; margin: 0 auto 2.2rem; }
.band .cta-row { justify-content: center; }

/* ---------- problem list (niche) ---------- */

.pain-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.pain-list li {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 1.3rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}

.pain-list strong { display: block; margin-bottom: 0.25rem; font-family: var(--display); font-size: 1.1rem; font-weight: 560; }
.pain-list span { color: var(--muted); font-size: 0.93rem; }

/* ---------- FAQ ---------- */

.faq { border-top: 1px solid var(--line); }

.faq details { border-bottom: 1px solid var(--line); }

.faq summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  gap: 1rem;
  padding: 1.4rem 0.3rem;
  font-family: var(--display);
  font-size: 1.2rem;
  font-weight: 560;
}
.faq summary::-webkit-details-marker { display: none; }

.faq summary::after {
  content: "+";
  margin-left: auto;
  font-family: var(--mono);
  color: var(--accent-text);
  font-size: 1.2rem;
  transition: transform 0.15s ease;
}
.faq details[open] summary::after { transform: rotate(45deg); }

.faq .faq-a { padding: 0 0.3rem 1.5rem; color: var(--muted); max-width: 62ch; }
.faq .faq-a p { margin: 0; }

/* ---------- form ---------- */

.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.4rem 1.6rem;
  max-width: 46rem;
}

.field { display: flex; flex-direction: column; gap: 0.45rem; }
.field.is-full { grid-column: 1 / -1; }

.field label {
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--ink);
}
.field label .req { color: var(--accent-text); }

.field input,
.field select,
.field textarea {
  font-family: var(--body);
  font-size: 1rem;
  color: var(--ink);
  background: #FCFAF4;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.8rem 0.95rem;
  width: 100%;
}
.field textarea { min-height: 9rem; resize: vertical; }

.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--muted); }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field .field-error {
  display: none;
  font-size: 0.85rem;
  color: var(--accent-text);
  font-weight: 500;
}
.field.has-error input,
.field.has-error select,
.field.has-error textarea { border-color: var(--accent-dark); }
.field.has-error .field-error { display: block; }

.form-foot { margin-top: 1.8rem; display: flex; flex-wrap: wrap; align-items: center; gap: 1.4rem; }

.form-confirm {
  display: none;
  font-weight: 600;
  color: var(--ink);
  background: var(--accent-tint);
  border: 1px solid var(--accent);
  border-radius: var(--radius);
  padding: 0.95rem 1.6rem;
}
.form-confirm.is-visible { display: inline-block; }
.form-confirm.is-error {
  background: #FBEAE5;
  border-color: #A8330A;
  color: #6E2206;
}

/* Honeypot — hidden from sighted users and from assistive tech, but a real
   field in the DOM so form-filling bots take the bait. Never display:none:
   some bots skip those. */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.contact-alt {
  margin-top: 3rem;
  border-top: 1px solid var(--line);
  padding-top: 1.6rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  font-size: 0.96rem;
}
.contact-alt .mono { display: block; color: var(--muted); margin-bottom: 0.3rem; }
.contact-alt a { font-weight: 600; text-decoration: none; }
.contact-alt a:hover { color: var(--accent-text); }

/* ---------- footer ---------- */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--paper-2);
  padding: 4rem 0 2rem;
}

.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: 2.5rem;
  margin-bottom: 3rem;
}

.site-footer .brand { font-size: 1.25rem; }
.site-footer p { color: var(--muted); font-size: 0.92rem; max-width: 34ch; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { color: var(--accent-text); }

.footer-col h4 {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 1rem;
  font-weight: 500;
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; }
.footer-col a { font-size: 0.92rem; color: var(--ink); }

.footer-base {
  border-top: 1px solid var(--line);
  padding-top: 1.4rem;
  font-family: var(--mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  color: var(--muted);
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 0.6rem;
}

/* ---------- responsive ---------- */

@media (max-width: 940px) {
  .hero-grid { grid-template-columns: 1fr; gap: 3rem; }
  .grid-3 { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; gap: 1.8rem; }
  .footer-grid { grid-template-columns: 1fr 1fr; }

  .nav-toggle { display: inline-block; }
  .nav-links {
    display: none;
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    flex-direction: column;
    align-items: flex-start;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line);
    padding: 0.6rem 1.5rem 1.2rem;
  }
  .nav-links.is-open { display: flex; }
  .nav-links li { width: 100%; }
  .nav-links li a { display: block; padding: 0.7rem 0; }
  .nav-cta { margin: 0.6rem 0 0; }
}

@media (max-width: 640px) {
  body { font-size: 16px; }
  section { padding: 3.8rem 0; }
  .hero { padding: 3.2rem 0 4rem; }
  .grid-3, .grid-2, .compare, .pain-list, .form-grid { grid-template-columns: 1fr; }
  .compare-col + .compare-col { border-left: none; border-top: 1px solid var(--line); }
  .footer-grid { grid-template-columns: 1fr; gap: 2rem; }
  .serve-list a { flex-wrap: wrap; gap: 0.4rem 1rem; }
  .serve-list .serve-arrow { display: none; }
}

/* ---------- reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.001s !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001s !important;
  }
}

/* ============================================================
   Motion & illustration layer
   Every animation lives inside prefers-reduced-motion:
   no-preference. With motion disabled, all animated elements
   are invisible overlays and each SVG remains a complete,
   labeled static diagram.
   ============================================================ */

/* ---------- scroll reveal (JS-gated so no-JS stays visible) ---------- */

html.js .reveal { opacity: 0; transform: translateY(16px); }
html.js .reveal.is-visible { opacity: 1; transform: none; }

/* ---------- quiet hover touches ---------- */

.card-link { position: relative; }
.card-link::before {
  content: "";
  position: absolute;
  left: 0;
  bottom: -4px;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.card:hover .card-link::before { transform: scaleX(1); }

/* ---------- step markers: accent line draw on scroll-in ---------- */

.step { position: relative; }
.step::before {
  content: "";
  position: absolute;
  top: -2px;
  left: 0;
  width: 100%;
  height: 2px;
  background: var(--accent);
  transform: scaleX(0);
  transform-origin: left;
}
.step.is-visible::before { transform: scaleX(0.38); }

/* ---------- niche hero: outcome-journey SVG (static-first) ---------- */

.journey { width: 100%; height: auto; display: block; }
.journey .j-wire { fill: none; stroke: var(--ink); stroke-width: 1.2; }
.journey .j-node { fill: var(--paper); stroke: var(--ink); stroke-width: 1.4; }
.journey .j-bar { fill: var(--paper); stroke: var(--ink); stroke-width: 1.2; }
.journey .j-tint { fill: var(--accent-tint); stroke: var(--accent); stroke-width: 1.2; }
.journey .j-ink { fill: none; stroke: var(--ink); stroke-width: 1.4; stroke-linecap: round; stroke-linejoin: round; }
.journey .j-acc { fill: none; stroke: var(--accent); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.journey .j-fill-acc { fill: var(--accent); }
.journey .j-glow { fill: var(--accent); opacity: 0; }
.journey .j-dot { fill: var(--accent); opacity: 0; }
.journey text { font-family: var(--mono); fill: var(--ink); }
.journey .j-label { font-size: 9.5px; letter-spacing: 0.12em; text-transform: uppercase; fill: var(--muted); }
.journey .j-q { font-size: 9px; fill: var(--muted); }
.journey .j-tiny { font-size: 7px; letter-spacing: 0.08em; text-transform: uppercase; fill: var(--accent); }

/* ---------- all motion, gated ---------- */

@media (prefers-reduced-motion: no-preference) {

  /* reveal + hovers */
  html.js .reveal { transition: opacity 0.45s ease, transform 0.45s ease; }
  .card:hover { transform: translateY(-3px); }
  .card-link::before { transition: transform 0.25s ease; }
  .step::before { transition: transform 0.5s ease 0.1s; }

  /* homepage machine: the machine visibly runs */
  .machine .wire-flow { animation: flow 1.6s linear infinite; }
  .machine .core-ring { animation: spin 26s linear infinite; }
  .machine .core-breathe {
    animation: breathe 4.5s ease-in-out infinite;
    transform-origin: center;
    transform-box: fill-box;
  }
  .machine .pulse {
    animation-duration: 8s;
    animation-timing-function: linear;
    animation-iteration-count: infinite;
  }
  .machine .p-in { animation-name: m-in; }
  .machine .p1 { animation-name: m-o1; animation-delay: 2s; }
  .machine .p2 { animation-name: m-o2; animation-delay: 4s; }
  .machine .p3 { animation-name: m-o3; animation-delay: 6s; }
  .machine .p4 { animation-name: m-o4; animation-delay: 8s; }
  .machine .out-glow { animation: m-glow 8s ease-in-out infinite; }
  .machine .g1 { animation-delay: 2s; }
  .machine .g2 { animation-delay: 4s; }
  .machine .g3 { animation-delay: 6s; }
  .machine .g4 { animation-delay: 8s; }

  /* niche journeys: dot travels, nodes light as it arrives */
  .journey .j-dot { animation: j-dot 6s linear infinite; }
  .journey .j-glow { animation: j-glow 6s ease-in-out infinite; }
  .journey .g1 { animation-delay: 0.35s; }
  .journey .g2 { animation-delay: 2s; }
  .journey .g3 { animation-delay: 3.7s; }
  .journey .g4 { animation-delay: 5.35s; }
  .journey .j-ring {
    transform-box: fill-box;
    transform-origin: center bottom;
    animation: j-ring 6s ease-in-out infinite;
    animation-delay: 3.7s;
  }
}

@keyframes breathe {
  0%, 100% { transform: scale(1); opacity: 1; }
  50% { transform: scale(1.035); opacity: 0.92; }
}

/* machine pulses — input, then one output every ~2s */
@keyframes m-in {
  0% { cx: 158px; opacity: 0; }
  4% { opacity: 0.95; }
  20% { cx: 252px; opacity: 0.95; }
  24%, 100% { cx: 252px; opacity: 0; }
}
@keyframes m-o1 {
  0% { cx: 408px; cy: 220px; opacity: 0; }
  4% { opacity: 0.95; }
  12% { cx: 442px; cy: 132px; }
  20% { cx: 472px; cy: 84px; opacity: 0.95; }
  24%, 100% { cx: 472px; cy: 84px; opacity: 0; }
}
@keyframes m-o2 {
  0% { cx: 408px; cy: 220px; opacity: 0; }
  4% { opacity: 0.95; }
  12% { cx: 442px; cy: 196px; }
  20% { cx: 472px; cy: 176px; opacity: 0.95; }
  24%, 100% { cx: 472px; cy: 176px; opacity: 0; }
}
@keyframes m-o3 {
  0% { cx: 408px; cy: 220px; opacity: 0; }
  4% { opacity: 0.95; }
  12% { cx: 442px; cy: 244px; }
  20% { cx: 472px; cy: 268px; opacity: 0.95; }
  24%, 100% { cx: 472px; cy: 268px; opacity: 0; }
}
@keyframes m-o4 {
  0% { cx: 408px; cy: 220px; opacity: 0; }
  4% { opacity: 0.95; }
  12% { cx: 442px; cy: 296px; }
  20% { cx: 472px; cy: 360px; opacity: 0.95; }
  24%, 100% { cx: 472px; cy: 360px; opacity: 0; }
}
@keyframes m-glow {
  0%, 15% { opacity: 0; }
  21% { opacity: 0.28; }
  34%, 100% { opacity: 0; }
}

/* journey dot: travels the full wire in 6s */
@keyframes j-dot {
  0% { cx: 40px; opacity: 0; }
  3% { opacity: 0.95; }
  96% { opacity: 0.95; }
  100% { cx: 560px; opacity: 0; }
}
@keyframes j-glow {
  0%, 100% { opacity: 0; }
  4% { opacity: 0.25; }
  12% { opacity: 0; }
}
@keyframes j-ring {
  0%, 100% { transform: rotate(0deg); }
  3% { transform: rotate(-4deg); }
  6% { transform: rotate(4deg); }
  9% { transform: rotate(-3deg); }
  12% { transform: rotate(0deg); }
}

/* ---------- "You own it" checklist (service pages) ---------- */

.own-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.2rem;
}

.own-item {
  border-left: 3px solid var(--accent);
  background: var(--paper-2);
  padding: 1.3rem 1.5rem;
  border-radius: 0 var(--radius) var(--radius) 0;
}
.own-item strong {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--display);
  font-size: 1.1rem;
  font-weight: 560;
}
.own-item span { color: var(--muted); font-size: 0.93rem; }

@media (max-width: 640px) {
  .own-grid { grid-template-columns: 1fr; }
}

/* ---------- pricing ---------- */

.price-line {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.2rem 0.8rem;
  margin: 0 0 1rem;
  padding-bottom: 0.9rem;
  border-bottom: 1px solid var(--line);
}
.price-line strong {
  font-family: var(--display);
  font-size: 1.55rem;
  font-weight: 560;
  letter-spacing: -0.015em;
  line-height: 1.1;
}
.price-line span {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-left: auto;
}

.price-list {
  list-style: none;
  margin: 1.1rem 0 0;
  padding: 0;
  font-size: 0.94rem;
  color: var(--muted);
}
.price-list li {
  position: relative;
  padding: 0.34rem 0 0.34rem 1.25rem;
}
.price-list li::before {
  content: "→";
  position: absolute;
  left: 0;
  color: var(--accent-text);
}

/* ---------- legal pages ---------- */

.legal {
  max-width: 66ch;
}
.legal h2 {
  font-size: 1.4rem;
  margin: 3rem 0 0.9rem;
  padding-top: 1.6rem;
  border-top: 1px solid var(--line);
}
.legal h2:first-child {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.legal p,
.legal li {
  color: var(--muted);
}
.legal strong {
  color: var(--ink);
  font-weight: 600;
}
.legal ul {
  margin: 0 0 1em;
  padding-left: 1.2rem;
}
.legal li {
  margin-bottom: 0.5rem;
}

/* ============================================================
   Blog — field notes
   ============================================================ */

.crumbs {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 1.6rem;
}
.crumbs a { color: var(--muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent-text); }
.crumbs span { margin: 0 0.5rem; }

/* ---------- listing ---------- */

.post-list {
  display: grid;
  gap: 0;
  border-top: 1px solid var(--line);
}

.post-card {
  border-bottom: 1px solid var(--line);
  padding: 2rem 0;
}
.post-card > a {
  display: block;
  text-decoration: none;
  color: inherit;
}
.post-card h3 {
  margin: 0.5rem 0 0.6rem;
  font-size: 1.6rem;
  transition: color 0.15s ease;
}
.post-card > a:hover h3 { color: var(--accent-text); }

.post-meta {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0;
  display: flex;
  gap: 0.6rem;
  align-items: center;
}

.post-excerpt {
  color: var(--muted);
  max-width: 62ch;
  margin: 0;
}

.post-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0 0;
}
.post-tags a {
  font-family: var(--mono);
  font-size: 0.66rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.3rem 0.6rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.post-tags a:hover { border-color: var(--accent-text); color: var(--accent-text); }

/* grid-2 variant, used for related posts */
.grid-2 .post-card {
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.6rem;
}
.grid-2 .post-card:hover { border-color: var(--ink); }
.grid-2 .post-card h3 { font-size: 1.3rem; }

.pagination {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-top: 2.5rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.pagination a { text-decoration: none; }
.pagination a:hover { color: var(--accent-text); }
.pagination .mono { margin-left: auto; color: var(--muted); }
.pagination a:last-child { margin-left: auto; }
.pagination .mono + a { margin-left: 1rem; }

.tag-cloud {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 0;
}
.tag-cloud a {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  text-decoration: none;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 0.45rem 0.8rem;
  transition: border-color 0.15s ease, color 0.15s ease;
}
.tag-cloud a:hover { border-color: var(--accent-text); color: var(--accent-text); }
.tag-cloud a span { color: var(--muted); margin-left: 0.3rem; }

/* ---------- single post ---------- */

.post-hero .lede { max-width: 62ch; }

.post-body-wrap { padding-top: 0; }

.post-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 3rem;
}
@media (min-width: 1000px) {
  .post-layout {
    grid-template-columns: 15rem minmax(0, 1fr);
    gap: 4rem;
  }
  .toc {
    position: sticky;
    top: 6rem;
    align-self: start;
    max-height: calc(100vh - 8rem);
    overflow-y: auto;
  }
}

.toc p.mono {
  color: var(--muted);
  margin: 0 0 0.9rem;
  padding-bottom: 0.7rem;
  border-bottom: 1px solid var(--line);
}
.toc ol {
  list-style: none;
  margin: 0;
  padding: 0;
  font-size: 0.9rem;
}
.toc li { margin-bottom: 0.55rem; }
.toc li.lvl-3 { padding-left: 1rem; font-size: 0.85rem; }
.toc a { color: var(--muted); text-decoration: none; }
.toc a:hover { color: var(--accent-text); }

/* --- prose --- */

.post-body {
  max-width: 68ch;
  font-size: 1.06rem;
  line-height: 1.72;
}
.post-body > *:first-child { margin-top: 0; }

.post-body h2 {
  font-size: clamp(1.55rem, 2.6vw, 2rem);
  margin: 3.2rem 0 1rem;
  padding-top: 2rem;
  border-top: 1px solid var(--line);
}
.post-body h3 {
  font-size: 1.3rem;
  margin: 2.4rem 0 0.8rem;
}

.post-body h2 .anchor,
.post-body h3 .anchor {
  font-family: var(--mono);
  font-size: 0.75em;
  color: var(--line);
  text-decoration: none;
  margin-left: 0.5rem;
  opacity: 0;
  transition: opacity 0.15s ease, color 0.15s ease;
}
.post-body h2:hover .anchor,
.post-body h3:hover .anchor,
.post-body .anchor:focus-visible { opacity: 1; color: var(--accent-text); }

.post-body p { margin: 0 0 1.35em; }
.post-body a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--accent); }
.post-body a:hover { color: var(--accent-text); }
.post-body strong { font-weight: 600; }

.post-body ul,
.post-body ol { margin: 0 0 1.35em; padding-left: 1.4rem; }
.post-body li { margin-bottom: 0.55em; }

.post-body blockquote {
  margin: 2rem 0;
  padding: 0.2rem 0 0.2rem 1.5rem;
  border-left: 3px solid var(--accent);
  font-family: var(--display);
  font-size: 1.2rem;
  line-height: 1.45;
  color: var(--ink);
}
.post-body blockquote p:last-child { margin-bottom: 0; }

.post-body code {
  font-family: var(--mono);
  font-size: 0.86em;
  background: var(--paper-2);
  border: 1px solid var(--line);
  border-radius: 3px;
  padding: 0.12em 0.35em;
}
.post-body pre {
  background: var(--ink);
  color: #EDE7DA;
  border-radius: var(--radius);
  padding: 1.2rem 1.4rem;
  overflow-x: auto;
  margin: 0 0 1.6em;
  font-size: 0.86rem;
  line-height: 1.6;
}
.post-body pre code {
  background: none;
  border: 0;
  padding: 0;
  font-size: inherit;
  color: inherit;
}

.post-body img {
  max-width: 100%;
  height: auto;
  border-radius: var(--radius);
  display: block;
  margin: 2rem 0;
}

.post-body table {
  width: 100%;
  border-collapse: collapse;
  margin: 0 0 1.8em;
  font-size: 0.94rem;
}
.post-body th,
.post-body td {
  text-align: left;
  padding: 0.7rem 0.9rem;
  border-bottom: 1px solid var(--line);
}
.post-body th {
  font-family: var(--mono);
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom-color: var(--ink);
}

.post-body hr {
  border: 0;
  border-top: 1px solid var(--line);
  margin: 2.8rem 0;
}

.post-updated {
  font-family: var(--mono);
  font-size: 0.72rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
  margin-top: 3rem;
  padding-top: 1.2rem;
  border-top: 1px solid var(--line);
}

@media (max-width: 640px) {
  .post-card h3 { font-size: 1.35rem; }
  .post-body { font-size: 1rem; }
  .pagination { flex-wrap: wrap; }
}
