/* ==========================================================================
   Clay Seal — site.css (v2)
   Tokens and layout per design-docs/v2.md.
   Defaults render the finished page with no JS: animations only re-hide
   elements when GSAP initializes in a motion-allowed context.
   ========================================================================== */

/* ---------- 1 · tokens ---------------------------------------------------- */

:root {
  /* base */
  --slip:   #F4F5F2;
  --tablet: #E9E9E4;
  --ink:    #16181D;
  --stylus: #63665F;
  --rule:   #D6D7D1;
  --emboss-hi: rgba(255, 255, 255, 0.85);
  --emboss-lo: rgba(22, 24, 29, 0.07);

  /* the clay family — sampled from the seal mark (#C8A088) */
  --clay:       #C8A088;                /* raw clay: large fills, stamps, decoration */
  --clay-fired: #8A5A40;                /* buttons, labels, focus — ≈5.3:1 on slip   */
  --clay-kiln:  #6F4732;                /* hover / active                            */
  --clay-wash:  rgba(200, 160, 136, 0.16); /* the permission-envelope band          */

  /* type */
  --font-display: "Erode", Georgia, "Times New Roman", serif;
  --font-body: "Switzer", -apple-system, "Segoe UI", system-ui, sans-serif;
  --font-mono: "IBM Plex Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --text-hero:    clamp(2.5rem, 1.4rem + 3.4vw, 4.25rem);
  --text-thesis:  clamp(1.6rem, 1rem + 2.4vw, 3rem);
  --text-h2:      clamp(1.9rem, 1.2rem + 2.6vw, 3.25rem);
  --text-h3:      clamp(1.25rem, 1.05rem + 0.8vw, 1.65rem);
  --text-body:    clamp(1rem, 0.95rem + 0.3vw, 1.125rem);
  --text-caption: 0.8125rem;
  --text-mono:    clamp(0.8125rem, 0.78rem + 0.2vw, 0.9375rem);
  --text-stamp:   0.6875rem;

  /* space */
  --space-2xs: clamp(0.25rem, 0.2rem + 0.25vw, 0.375rem);
  --space-xs:  clamp(0.5rem, 0.4rem + 0.5vw, 0.75rem);
  --space-sm:  clamp(0.75rem, 0.6rem + 0.75vw, 1.125rem);
  --space-md:  clamp(1rem, 0.8rem + 1vw, 1.5rem);
  --space-lg:  clamp(1.5rem, 1.2rem + 1.5vw, 2.25rem);
  --space-xl:  clamp(2.5rem, 1.8rem + 2.5vw, 4rem);
  --space-2xl: clamp(4rem, 3rem + 4vw, 7rem);

  --wrap-max: 1180px;
  --spine-col: 18%;

  /* motion */
  --dur-fast: 180ms;
  --dur-base: 400ms;
  --ease-press: cubic-bezier(0.32, 0, 0.15, 1);
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
}

/* ---------- 2 · fonts ------------------------------------------------------ */

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

/* ---------- 3 · base ------------------------------------------------------- */

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

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

body {
  margin: 0;
  background: var(--slip);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2 {
  font-family: var(--font-display);
  font-weight: 500;
  margin: 0;
}
h3 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 600;
  margin: 0 0 var(--space-xs);
}
p { margin: 0 0 var(--space-sm); }
a { color: var(--ink); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--clay-fired); }
code, pre { font-family: var(--font-mono); }

.mono {
  font-family: var(--font-mono);
  font-size: var(--text-mono);
}

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

::selection { background: var(--ink); color: var(--slip); }

.sr-only {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

.skip-link {
  position: absolute; left: var(--space-sm); top: -100%;
  z-index: 100; padding: var(--space-xs) var(--space-sm);
  background: var(--ink); color: var(--slip);
}
.skip-link:focus { top: var(--space-sm); color: var(--slip); }

.svg-defs { display: none; }

/* SVG groups that receive the press motif scale from their own center */
.press-item { transform-box: fill-box; transform-origin: 50% 50%; }

/* ---------- 4 · layout ----------------------------------------------------- */

.wrap {
  width: 100%;   /* auto inline margins disable flex stretch (hero) — keep full width */
  max-width: var(--wrap-max);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.section-grid {
  position: relative;
  display: grid;
  grid-template-columns: var(--spine-col) minmax(0, 1fr);
  column-gap: var(--space-lg);
}
.section-grid > * { min-width: 0; }  /* long lines must scroll, not widen the track */

section { padding-block: var(--space-2xl); }

/* the scope spine — width steps down section by section (the taper) */
.spine-col { position: relative; }

.spine {
  position: absolute;
  top: calc(-1 * var(--space-2xl));
  bottom: calc(-1 * var(--space-2xl));
  right: 0;
  background: var(--stylus);
  opacity: 0.55;
  transform-origin: top center;
}
.spine--hero     { width: 3px;    top: 0; }
.spine--thesis   { width: 2.5px; }
.spine--sandbox  { width: 2.25px; }
.spine--replay   { width: 2px; }
.spine--atten    { width: 1.75px; }
.spine--how      { width: 1.5px; }
.spine--receipts { width: 1px; }
.spine--oss      { width: 0.75px; }
.spine--faq      { width: 0.5px; bottom: 0; }

.spine-tick {
  position: absolute;
  top: 0.4em;
  right: var(--space-sm);
  margin: 0;
  color: var(--stylus);
  font-size: var(--text-stamp);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: right;
  white-space: nowrap;
}
.spine-tick::after {
  content: "";
  position: absolute;
  top: 50%; right: calc(-1 * var(--space-sm));
  width: calc(var(--space-sm) - 4px);
  height: 1px;
  background: var(--stylus);
}

/* ---------- 5 · nav --------------------------------------------------------- */

.site-nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(244, 245, 242, 0.92);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur-base) var(--ease-out);
}
.site-nav.is-scrolled { border-bottom-color: var(--rule); }

.nav-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-md);
  min-height: 60px;
}

.nav-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.nav-brand:hover { color: var(--ink); }

.nav-mark {
  width: 26px; height: 20px;
  background: var(--ink);
  -webkit-mask: url("/assets/img/seal-mark.png") center / contain no-repeat;
  mask: url("/assets/img/seal-mark.png") center / contain no-repeat;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: var(--space-md);
  font-size: 0.9375rem;
}
.nav-links a { text-decoration: none; }
.nav-links a:not(.btn):hover { text-decoration: underline; }

.nav-menu { display: none; position: relative; }
.nav-menu summary {
  cursor: pointer;
  list-style: none;
  font-family: var(--font-mono);
  font-size: var(--text-caption);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: var(--space-xs) var(--space-sm);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.nav-menu summary::-webkit-details-marker { display: none; }
.nav-menu-panel {
  position: absolute;
  right: 0; top: calc(100% + 8px);
  display: grid;
  gap: 2px;
  min-width: 220px;
  padding: var(--space-sm);
  background: var(--slip);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.05);
}
.nav-menu-panel a {
  text-decoration: none;
  padding: var(--space-xs) var(--space-2xs);
}

/* ---------- 6 · buttons & shared components -------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  padding: 0.55em 1.3em;
  border-radius: 3px;
  font-family: var(--font-body);
  font-size: 0.9375rem;
  font-weight: 500;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--dur-fast) var(--ease-out),
              color var(--dur-fast) var(--ease-out),
              border-color var(--dur-fast) var(--ease-out);
}
.btn-primary {
  background: var(--clay-fired);
  border: 1px solid var(--clay-fired);
  color: var(--slip);
}
.btn-primary:hover { background: var(--clay-kiln); border-color: var(--clay-kiln); color: var(--slip); }

.nav-links .btn-primary { min-height: 40px; padding-block: 0.45em; }

.install-box {
  display: inline-flex;
  align-items: center;
  gap: var(--space-sm);
  padding: var(--space-xs) var(--space-xs) var(--space-xs) var(--space-md);
  background: var(--tablet);
  border: 1px solid var(--rule);
  border-radius: 3px;
  min-height: 48px;
}
.install-box code { font-size: var(--text-mono); }

.copy-btn {
  font-family: var(--font-mono);
  font-size: var(--text-stamp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding: 0.6em 0.9em;
  min-height: 32px;
  background: var(--slip);
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 2px;
  cursor: pointer;
  transition: border-color var(--dur-fast) var(--ease-out), color var(--dur-fast) var(--ease-out);
}
.copy-btn:hover,
.copy-btn.is-copied { border-color: var(--clay-fired); color: var(--clay-fired); }

.eyebrow {
  color: var(--stylus);
  font-size: var(--text-stamp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-md);
}

/* the blind emboss — the mark pressed into the paper (footer only in v2) */
.emboss-mark { position: relative; }
.emboss-mark::before,
.emboss-mark::after {
  content: "";
  position: absolute;
  inset: 0;
  -webkit-mask: url("/assets/img/seal-mark.png") center / contain no-repeat;
  mask: url("/assets/img/seal-mark.png") center / contain no-repeat;
}
.emboss-mark::before { background: var(--emboss-lo); transform: translate(-1.5px, -1.5px); }
.emboss-mark::after  { background: var(--emboss-hi); transform: translate(1.5px, 1.5px); }

/* circular seal stamp (receipt corner, form success) */
.seal-stamp {
  display: inline-block;
  color: var(--clay-fired);
  transform: rotate(-2deg);
}
.seal-stamp svg { display: block; width: 100%; height: 100%; }
.stamp-arc-text { font-family: var(--font-mono); font-weight: 600; }

/* ---------- 7 · hero — type only -------------------------------------------- */

.hero {
  position: relative;
  min-height: calc(92svh - 60px);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-block: var(--space-xl) var(--space-2xl);
  overflow: hidden;
}

.hero-copy { position: relative; z-index: 1; }

.hero-title {
  font-size: var(--text-hero);
  line-height: 1.05;
  letter-spacing: -0.015em;
  margin-bottom: var(--space-lg);
}
.hero-line { display: block; }

.hero-ctas {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md);
}

.thesis-word { color: inherit; }

/* ---------- 8 · thesis — line-by-line ink reveal ----------------------------- */

.thesis {
  padding-block: var(--space-2xl);
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.thesis-text {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-thesis);
  line-height: 1.28;
  letter-spacing: -0.01em;
  margin: 0;
  max-width: 24em;
}
.thesis-line { display: block; color: var(--ink); }  /* no-JS: full ink */

/* ---------- 9 · shared section headings -------------------------------------- */

.section-body h2 {
  font-size: var(--text-h2);
  line-height: 1.08;
  margin-bottom: var(--space-lg);
}

/* ---------- 10 · the sandbox — walls that move with the task ------------------- */

.sandbox {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.sb-fig {
  margin: 0 0 var(--space-sm);
  max-width: 640px;
}
.sb-fig svg { display: block; width: 100%; height: auto; }

/* permission chips: clay while in scope; the walls leave them gray.
   CSS defaults are the FINAL state (no-JS / reduced motion). */
.chip-bg { fill: rgba(200, 160, 136, 0.32); }
.chip-tx {
  font-family: var(--font-body);
  font-size: 14px;
  font-weight: 500;
  text-anchor: middle;
  fill: var(--ink);
}
.sb-chip[data-out] .chip-bg { fill: rgba(22, 24, 29, 0.05); }
.sb-chip[data-out] .chip-tx { fill: #8A8D86; }

.sb-ghost { opacity: 0.5; }
.sb-ghost-label,
.sb-agent-label {
  font-family: var(--font-body);
  font-size: 13px;
  fill: var(--stylus);
}
.sb-agent-label { text-anchor: middle; }

.sb-void {
  font-family: var(--font-body);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  fill: var(--ink);
}

.sb-cap {
  display: grid;
  max-width: 640px;
  margin: 0 0 var(--space-lg);
  color: var(--stylus);
  font-size: var(--text-caption);
}
.sb-state { grid-area: 1 / 1; opacity: 0; }
.sb-state:last-child { opacity: 1; }   /* no-JS: final state */

.sb-copy { max-width: 52ch; }

/* ---------- 10b · delegation — capability attenuation --------------------------- */

.atten {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.at-fig {
  margin: 0 0 var(--space-md);
  max-width: 640px;
}
.at-fig svg { display: block; width: 100%; height: auto; }

.at-name {
  font-family: var(--font-body);
  font-size: 17px;
  font-weight: 600;
  text-anchor: middle;
  fill: var(--ink);
}
.at-child .at-name { font-size: 16px; }
.at-scope {
  font-family: var(--font-body);
  font-size: 13.5px;
  text-anchor: middle;
  fill: var(--stylus);
}

.at-copy { max-width: 52ch; }

/* ---------- 11 · the replay — trajectory diagram ------------------------------- */

.replay { padding-block: var(--space-2xl); }
.replay-stage { align-content: center; }

.replay-sub {
  color: var(--stylus);
  margin-top: calc(-1 * var(--space-md));
  margin-bottom: var(--space-lg);
}

.replay-count {
  position: absolute;
  top: 4.2em;
  right: var(--space-sm);
  margin: 0;
  display: grid;
  color: var(--clay-fired);
  font-size: var(--text-stamp);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-align: right;
}
.count-step { grid-area: 1 / 1; opacity: 0; }
.count-step:last-child { opacity: 1; }   /* no-JS: final state */

.traj {
  position: relative;
  max-width: 860px;
}
.traj svg { display: block; width: 100%; height: auto; }

.traj-label {
  position: absolute;
  transform: translateX(-50%);
  margin: 0;
  font-size: var(--text-caption);
  font-weight: 500;
  color: var(--ink);
  white-space: nowrap;
}
.traj-label--drift { color: var(--stylus); }
.traj-void {
  position: absolute;
  transform: translateX(-50%);
  margin: 0;
  font-size: var(--text-stamp);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink);
  white-space: nowrap;
}
.traj-branch-out { opacity: 0.22; }   /* no-JS: final state */
.traj-node { fill: var(--ink); }
.traj-ring { opacity: 0.3; }          /* no-JS: final (contracted, faded) state */

.traj-scope-label {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  fill: var(--clay-fired);
}
.traj-agent-label {
  font-family: var(--font-body);
  font-size: 12px;
  text-anchor: middle;
  fill: var(--stylus);
}
.traj-chip-label {
  font-family: var(--font-body);
  font-size: 12.5px;
  font-weight: 500;
  text-anchor: middle;
  fill: var(--stylus);
}

.traj-cap {
  display: grid;
  max-width: 860px;
  margin-top: var(--space-sm);
  color: var(--stylus);
  font-size: var(--text-caption);
}
.traj-state { grid-area: 1 / 1; opacity: 0; }
.traj-state:last-child { opacity: 1; }   /* no-JS: final state */

/* mobile trajectory — the same beats, stacked */
.traj-mobile {
  display: none;
  list-style: none;
  margin: 0;
  padding: 0 0 0 6px;
  position: relative;
}
.traj-mobile::before {
  content: "";
  position: absolute;
  left: 12px; top: 8px; bottom: 8px;
  width: 2px;
  background: var(--clay-wash);
  border-inline: 1px solid rgba(200, 160, 136, 0.5);
}
.tm-row {
  position: relative;
  display: flex;
  align-items: baseline;
  gap: var(--space-sm);
  padding: var(--space-xs) 0 var(--space-xs) 26px;
}
.tm-dot {
  position: absolute;
  left: 8px; top: 1.05em;
  width: 10px; height: 10px;
  border-radius: 50%;
  background: var(--ink);
}
.tm-dot--receipt { background: var(--clay-fired); }
.tm-x {
  position: absolute;
  left: 3px; top: 0.35em;
  width: 20px;
  text-align: center;
  color: var(--ink);
  font-weight: 600;
  font-size: 1.15em;
}
.tm-text { margin: 0; font-size: 0.9375rem; font-weight: 500; }
.tm-sub {
  display: block;
  font-weight: 400;
  font-size: var(--text-caption);
  color: var(--stylus);
}
.tm-sub--void {
  color: var(--ink);
  font-weight: 600;
  font-size: var(--text-stamp);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.tm-stamp {
  flex: none;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  background: var(--clay);
  border: 1px solid var(--clay-fired);
  color: var(--clay-fired);
  font-weight: 700;
  font-size: 0.8em;
  transform: rotate(-2deg);
}
.tm-row--void .tm-text > :first-child { text-decoration: line-through; }
.tm-row--receipt { border-top: 1px solid var(--rule); margin-top: var(--space-xs); }

/* ---------- 12 · how it works --------------------------------------------------- */

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--space-lg);
  max-width: 680px;
}

.step-card {
  position: relative;
  min-width: 0;   /* grid item: content must not widen the column */
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  grid-template-rows: auto auto 1fr;
  column-gap: var(--space-lg);
  padding: var(--space-md) var(--space-lg);
  background: var(--tablet);
  border: 1px solid var(--rule);
  border-radius: 3px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.05);
}

.step-glyph {
  grid-column: 1;
  grid-row: 1 / span 3;
  align-self: center;
  width: 120px;
  height: 120px;
}

.step-num {
  position: absolute;
  top: var(--space-md);
  right: calc(100% + var(--space-lg) + var(--space-md));
  color: var(--stylus);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1;
}

.step-eyebrow {
  grid-column: 2;
  color: var(--clay-fired);
  font-size: var(--text-stamp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: var(--space-xs);
}
.step-card h3 { grid-column: 2; }
.step-card p:not(.step-eyebrow) { grid-column: 2; max-width: 48ch; margin-bottom: 0; }

.glyph-outer { opacity: 0.25; }   /* no-JS: final (aperture closed) state */

/* ---------- 13 · receipts --------------------------------------------------------- */

.receipts-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--space-xl);
  align-items: start;
}
.receipts-grid > * { min-width: 0; }

.receipts-copy p { max-width: 44ch; }

.verify-motif { max-width: 300px; margin-top: var(--space-md); }
.verify-motif svg { display: block; width: 100%; height: auto; }
.verify-cap {
  margin: var(--space-2xs) 0 0;
  color: var(--stylus);
  font-size: var(--text-caption);
}

.receipt-card {
  position: relative;
  margin: 0;
  padding: var(--space-lg);
  background: var(--tablet);
  border: 1px solid var(--rule);
  border-radius: 0 0 3px 3px;
  box-shadow: 0 1px 2px rgba(22, 24, 29, 0.05);
}
/* perforated top edge */
.receipt-card::before {
  content: "";
  position: absolute;
  top: -5px; left: 0; right: 0;
  height: 10px;
  background-image: radial-gradient(circle at 5px 5px, var(--slip) 3.5px, transparent 4px);
  background-size: 14px 10px;
  background-repeat: repeat-x;
}

.receipt-head {
  color: var(--stylus);
  font-size: var(--text-stamp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  padding-bottom: var(--space-sm);
  border-bottom: 1px solid var(--rule);
  margin-bottom: var(--space-sm);
}

.receipt-fields { margin: 0; font-size: 0.9375rem; }
.receipt-fields > div {
  display: grid;
  grid-template-columns: 7em minmax(0, 1fr);
  gap: var(--space-sm);
  padding-block: var(--space-2xs);
}
.receipt-fields dt {
  color: var(--stylus);
  font-size: var(--text-caption);
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  padding-top: 0.15em;
}
.receipt-fields dd { margin: 0; overflow-wrap: anywhere; }

.seal-stamp--card {
  position: absolute;
  top: -18px;
  right: var(--space-lg);
  width: 84px;
  height: 84px;
}

/* ---------- 14 · open source -------------------------------------------------------- */

.oss-strip {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-md) var(--space-lg);
  padding: var(--space-lg);
  background: var(--tablet);
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.oss-strip .install-box { background: var(--slip); }

.oss-lede { font-weight: 600; margin: 0; }
.oss-links { margin: 0; color: var(--stylus); }
.oss-links a { color: var(--ink); }

/* ---------- 14b · questions -------------------------------------------------------- */

.faq-list {
  max-width: 680px;
  border-top: 1px solid var(--rule);
}

.faq-item { border-bottom: 1px solid var(--rule); }

.faq-item summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--space-md);
  padding-block: var(--space-sm);
  font-weight: 600;
  font-size: 1.0625rem;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "+";
  flex: none;
  font-family: var(--font-mono);
  font-weight: 400;
  color: var(--clay-fired);
}
.faq-item[open] summary::after { content: "−"; }

.faq-item p {
  max-width: 58ch;
  margin: 0 0 var(--space-md);
  color: var(--ink);
}

/* ---------- 15 · cta ------------------------------------------------------------------ */

.cta { padding-block: var(--space-2xl); }

.cta-inner {
  max-width: 620px;
  margin-inline: auto;
  text-align: center;
}
.cta-inner h2 {
  font-size: var(--text-h2);
  line-height: 1.08;
  margin-bottom: var(--space-md);
}
.cta-inner > p {
  color: var(--ink);
  margin-inline: auto;
  max-width: 52ch;
  margin-bottom: var(--space-lg);
}

.waitlist-form { text-align: left; max-width: 460px; margin-inline: auto; }
.waitlist-form label {
  display: block;
  font-size: var(--text-caption);
  font-weight: 500;
  margin-bottom: var(--space-2xs);
}

.form-row { display: flex; gap: var(--space-xs); }
.form-row input {
  flex: 1;
  min-width: 0;
  min-height: 44px;
  padding: 0.55em 0.9em;
  font: inherit;
  color: var(--ink);
  background: #FFFFFF;
  border: 1px solid var(--rule);
  border-radius: 3px;
}
.form-row input:focus-visible { outline-offset: 0; }

.hp-field {
  position: absolute;
  left: -9999px;
  width: 1px; height: 1px;
  opacity: 0;
}

.form-error {
  margin: var(--space-xs) 0 0;
  font-size: var(--text-caption);
  color: var(--ink);
  font-weight: 500;
}

.form-success {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: var(--space-sm);
}
.form-success[hidden] { display: none; }
.form-success p { margin: 0; font-weight: 600; }
.seal-stamp--form { width: 56px; height: 56px; flex: none; }

/* ---------- 15b · legal / prose pages ------------------------------------------------- */

.legal { padding-block: var(--space-xl) var(--space-2xl); }

.legal-head { max-width: 60ch; margin-bottom: var(--space-xl); }
.legal-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h2);
  line-height: 1.08;
  margin: 0 0 var(--space-sm);
}
.legal-updated {
  color: var(--stylus);
  font-size: var(--text-stamp);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin: 0;
}

.legal-body { max-width: 68ch; }
.legal-body h2 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 600;
  line-height: 1.2;
  margin: var(--space-xl) 0 var(--space-sm);
}
.legal-body h2:first-child { margin-top: 0; }
.legal-body p { margin: 0 0 var(--space-sm); }
.legal-body ul {
  margin: 0 0 var(--space-sm);
  padding-left: 1.25em;
}
.legal-body li { margin-bottom: var(--space-2xs); }
.legal-body a { color: var(--ink); }
.legal-body a:hover { color: var(--clay-fired); }

/* ---------- 15b · legal / prose pages ---------------------------------------------------- */

.legal { padding-block: var(--space-2xl); }

.legal-head { margin-bottom: var(--space-xl); }
.legal-head h1 {
  font-family: var(--font-display);
  font-weight: 500;
  font-size: var(--text-h2);
  line-height: 1.08;
  letter-spacing: -0.01em;
  margin: 0 0 var(--space-sm);
}
.legal-updated {
  margin: 0;
  color: var(--stylus);
  font-size: var(--text-caption);
}

.legal-body { max-width: 68ch; }
.legal-body > section + section { margin-top: var(--space-xl); }
.legal-body h2 {
  font-family: var(--font-body);
  font-size: var(--text-h3);
  font-weight: 600;
  letter-spacing: 0;
  margin: 0 0 var(--space-sm);
}
.legal-body p { color: var(--ink); }
.legal-body a { color: var(--clay-fired); }

.legal-body ul {
  margin: 0 0 var(--space-sm);
  padding-left: 1.25em;
}
.legal-body li { margin-bottom: var(--space-2xs); }

.legal-lede { font-size: 1.0625rem; }

/* ---------- 16 · footer ----------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  padding-block: var(--space-xl) var(--space-lg);
}

.footer-cols {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: var(--space-lg);
  font-size: var(--text-caption);
  margin-bottom: var(--space-xl);
}
.footer-cols a {
  display: block;
  color: var(--ink);
  text-decoration: none;
  padding-block: var(--space-2xs);
}
.footer-cols a:hover { color: var(--clay-fired); text-decoration: underline; }

.footer-head {
  color: var(--stylus);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: var(--text-stamp);
  margin-bottom: var(--space-xs);
}

.footer-seal {
  width: 48px;
  aspect-ratio: 297 / 228;
  margin: 0 auto var(--space-sm);
}

.footer-fine {
  text-align: center;
  color: var(--stylus);
  font-size: var(--text-stamp);
  margin: 0;
}

/* ---------- 17 · responsive --------------------------------------------------------------- */

@media (max-width: 900px) {
  .receipts-grid { grid-template-columns: 1fr; }
  .seal-stamp--card { top: auto; bottom: calc(-1 * var(--space-md)); }
}

@media (max-width: 799px) {
  :root { --spine-col: 14px; }

  .nav-links { display: none; }
  .nav-menu { display: block; }

  .section-grid { column-gap: var(--space-md); }
  .spine-tick, .replay-count { display: none; }
  .spine--hero { width: 2px; }
  .spine--thesis { width: 1.9px; }
  .spine--gap { width: 1.75px; }
  .spine--replay { width: 1.5px; }
  .spine--how { width: 1.25px; }
  .spine--receipts, .spine--oss { width: 1px; }

  .thesis-text { line-height: 1.35; }
  .thesis-line { display: inline; }   /* authored lines re-wrap naturally on small screens */

  .sb-fig svg, .at-fig svg { min-width: 480px; }
  .sb-fig, .at-fig { overflow-x: auto; }

  .traj, .traj-cap { display: none; }
  .traj-mobile { display: block; }

  .step-card {
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: none;
  }
  .step-glyph {
    grid-column: 1;
    grid-row: auto;
    width: 96px; height: 96px;
    margin-bottom: var(--space-sm);
  }
  .step-eyebrow, .step-card h3, .step-card p:not(.step-eyebrow) { grid-column: 1; }
  .step-num { position: static; display: block; margin-bottom: var(--space-2xs); }

  .form-row { flex-direction: column; }

  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols a { overflow-wrap: anywhere; }
}

/* ---------- 18 · reduced motion -------------------------------------------------------------- */

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