/* =========================================================
   Abel Sanchez — Homepage option A · "Command Line"
   The prompt is the mark. The page is the session.
   ========================================================= */
@font-face {
  font-family: "Instrument Sans";
  src: url("../assets/fonts/instrument-sans.woff2") format("woff2");
  font-weight: 400 700; font-style: normal; font-display: swap;
}
:root {
  --rail: 64px;
  --frame: 1480px;
  --line: 28px;                    /* rail line height */
  --amber-on-light: #8A5A22;       /* AA on linen */
  --rail-rule: rgba(107, 107, 107, 0.3);

  /* Reading text: Instrument Sans (Cimo One has only a heavy weight; it stays for short lines, titles, buttons) */
  --f-text: "Instrument Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --text-dim: #BCB7AE;          /* brighter paragraph grey on ink/carbon (≈ 9:1) */
  --text-dim-light: #4A4641;    /* paragraph grey on linen (≈ 8.5:1) */

  /* Type scale for this page (overrides tokens.css; ~30–40% smaller headings) */
  --step-0: clamp(0.97rem, 0.94rem + 0.12vw, 1.05rem);   /* body  ≈ 16–17px */
  --step-1: clamp(1.08rem, 1rem + 0.3vw, 1.28rem);       /* lead  ≈ 17–20px */
  --step-2: clamp(1.3rem, 1.1rem + 0.7vw, 1.75rem);      /*       ≈ 21–28px */
  --step-3: clamp(1.6rem, 1.2rem + 1.5vw, 2.5rem);       /*       ≈ 26–40px */
  --step-4: clamp(2.1rem, 1.3rem + 2.6vw, 3.75rem);      /* H2    ≈ 34–60px */
}
@media (max-width: 640px) { :root { --rail: 0px; } }

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 80px; }
body {
  margin: 0; background: var(--ink); color: var(--bone);
  font-family: var(--f-text); font-size: var(--step-0); line-height: 1.6;
  -webkit-font-smoothing: antialiased; overflow-x: hidden;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3, p, ul, ol, dl, dd, figure { margin: 0; padding: 0; }
ul, ol { list-style: none; }
::selection { background: var(--amber); color: var(--ink); }
:focus-visible { outline: 2px solid var(--amber); outline-offset: 3px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 100; background: var(--amber); color: var(--ink); padding: 10px 14px; font-family: var(--f-mono); text-decoration: none; }
.skip:focus { top: 16px; }

.wrap {
  width: 100%; max-width: var(--frame); margin-inline: auto;
  padding-left: calc(var(--rail) + var(--gutter)); padding-right: var(--gutter);
}
.mono { font-family: var(--f-mono); letter-spacing: 0.01em; }
.amber { color: var(--amber); }
.dim { color: var(--text-dim); }

.grain { position: relative; isolation: isolate; }
.grain::after {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: url("../assets/img/grain.jpg") center / 1200px auto repeat;
  mix-blend-mode: screen; opacity: 0.08;
}

/* ---------- Line-number rail ---------- */
main { position: relative; }
.rail {
  position: absolute; top: 0; bottom: 0; z-index: 4; pointer-events: none;
  left: max(0px, calc((100% - var(--frame)) / 2)); width: var(--rail);
  border-right: 1px solid var(--rail-rule);
  font-family: var(--f-mono); font-size: 11px; line-height: var(--line);
  color: var(--ash); overflow: hidden;
}
.rail span { position: absolute; right: 14px; height: var(--line); font-variant-numeric: tabular-nums; }
.rail span.on { color: var(--amber); }
.rail span.on::before { content: "▸ "; }
@media (max-width: 640px) { .rail { display: none; } }

/* ---------- Buttons ---------- */
.btn {
  --pad: 14px 22px;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: var(--pad); border: 0; border-radius: var(--radius);
  background: var(--amber); color: var(--ink);
  font-family: var(--f-body); font-size: var(--step-0); font-weight: 700; line-height: 1;
  text-decoration: none; cursor: pointer; transition: background .25s var(--ease);
}
.btn:hover { background: var(--amber-hi); }
.btn span[aria-hidden] { transition: transform .25s var(--ease); }
.btn:hover span[aria-hidden] { transform: translateX(3px); }
.btn--lg { --pad: 20px 28px; font-size: var(--step-1); }
.btn--block { width: 100%; }
.btn-ghost {
  font-family: var(--f-mono); font-size: var(--step--1); text-decoration: none; color: var(--bone);
  padding: 9px 14px; border: 1px solid var(--rule-strong); border-radius: var(--radius);
  transition: border-color .2s, color .2s;
}
.btn-ghost:hover { border-color: var(--amber); color: var(--amber); }

/* ---------- Nav ---------- */
.nav { position: fixed; inset: 0 0 auto; z-index: 50; border-bottom: 1px solid transparent; transition: background .3s var(--ease), border-color .3s; }
.nav.is-scrolled { background: rgba(14, 14, 14, 0.86); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom-color: var(--rule); }
.nav__inner {
  display: flex; align-items: center; gap: 32px; max-width: var(--frame); margin-inline: auto;
  padding: 16px var(--gutter) 16px calc(var(--rail) + var(--gutter));
}
.wordmark { display: inline-flex; align-items: baseline; gap: 10px; text-decoration: none; }
.wordmark__mark { font-family: var(--f-mono); color: var(--amber); font-size: 0.95rem; }
.wordmark__name { font-family: var(--f-display); font-size: 1.45rem; line-height: 1; letter-spacing: 0.01em; }
.nav__links { display: flex; gap: 28px; margin-left: auto; }
.nav__links a { font-family: var(--f-mono); font-size: var(--step--1); text-decoration: none; color: var(--text-dim); transition: color .2s; }
.nav__links a::before { content: "./"; color: var(--ash); }
.nav__links a:hover { color: var(--bone); }
.nav__toggle, .nav__mobile { display: none; }

@media (max-width: 820px) {
  .nav__links, .nav__inner > .btn-ghost { display: none; }
  .nav__toggle {
    display: grid; place-items: center; margin-left: auto; width: 44px; height: 44px;
    background: none; border: 1px solid var(--rule-strong); border-radius: var(--radius); cursor: pointer;
  }
  .nav__toggle span[aria-hidden], .nav__toggle span[aria-hidden]::before {
    display: block; width: 18px; height: 1.5px; background: var(--bone); position: relative; transition: transform .25s;
  }
  .nav__toggle span[aria-hidden]::before { content: ""; position: absolute; top: 6px; }
  .nav__toggle[aria-expanded="true"] span[aria-hidden] { transform: translateY(3px) rotate(45deg); }
  .nav__toggle[aria-expanded="true"] span[aria-hidden]::before { transform: translateY(-6px) rotate(-90deg); }
  .nav__mobile:not([hidden]) {
    display: grid; padding: 4px var(--gutter) 20px;
    background: rgba(14, 14, 14, 0.97); border-bottom: 1px solid var(--rule);
  }
  .nav__mobile a { padding: 14px 0; border-bottom: 1px solid var(--rule); font-family: var(--f-mono); font-size: var(--step-0); text-decoration: none; }
  .nav__mobile a span { color: var(--amber); }
}

/* ---------- Hero ---------- */
.hero { min-height: 100svh; display: flex; flex-direction: column; overflow: hidden; padding-top: 88px; background: var(--ink); }
.hero > .wrap { position: relative; z-index: 1; }
.hero::before {
  content: ""; position: absolute; inset: 0 0 auto; height: 160px; z-index: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(14,14,14,.85), transparent);
}
.hero__sphere {
  position: absolute; z-index: -1; pointer-events: none;
  top: 50%; right: -10vw; width: min(66vw, 980px); aspect-ratio: 1; transform: translateY(-50%);
  opacity: 0.85; transition: opacity 1.6s var(--ease), transform 2s var(--ease);
  -webkit-mask-image: radial-gradient(circle at 50% 50%, #000 46%, transparent 70%);
  mask-image: radial-gradient(circle at 50% 50%, #000 46%, transparent 70%);
}
.hero__sphere::after {
  content: ""; position: absolute; inset: 22%; border-radius: 50%; z-index: -1;
  background: radial-gradient(circle, rgba(200, 135, 62, 0.14), transparent 70%);
}
.hero__sphere canvas { width: 100%; height: 100%; display: block; }

.hero__body { flex: 1; display: flex; flex-direction: column; justify-content: center; padding-block: 24px 40px; }
.hero__comment { font-size: var(--step--1); color: var(--text-dim); margin-bottom: 14px; }
.hero__hash { display: none; }
@media (max-width: 640px) {
  .hero__comment > span { display: block; }
  .hero__sep { display: none; }
  .hero__hash { display: inline; }
}

.term { font-size: clamp(1rem, 0.85rem + 0.6vw, 1.4rem); line-height: 1.4; color: var(--bone); display: flex; align-items: center; flex-wrap: wrap; min-height: 1.4em; }
.term__ps { color: var(--amber); margin-right: 0.6em; }
.term__cmd { white-space: pre; }
.caret {
  display: inline-block; width: 0.58em; height: 1.1em; margin-left: 3px; background: var(--amber);
  animation: blink 1.05s steps(1) 12;
}
@keyframes blink { 50% { opacity: 0; } }

.hero__title {
  font-family: var(--f-display); font-weight: 400;
  font-size: clamp(3rem, 1rem + 5.6vw, 6.5rem); line-height: 0.9; letter-spacing: -0.01em;
  margin: clamp(14px, 1.6vw, 24px) 0 clamp(28px, 3vw, 44px);
}
.h1v { display: block; }
.h1v__line { display: block; }
.h1v .w { display: inline-block; white-space: nowrap; }
.h1v .ch { display: inline-block; position: relative; }
.h1v .ch__g {
  position: absolute; inset: 0; display: grid; place-items: center;
  font-family: var(--f-mono); font-size: 0.4em; line-height: 1; color: var(--text-dim);
}
.h1v .ch:not(.is-set) .ch__f { opacity: 0; }
.h1v .ch.is-set .ch__g { display: none; }
.h1v .ch.is-set .ch__f { animation: lock .5s var(--ease) both; }
.boot-done .h1v .ch .ch__f { opacity: 1; }
.boot-done .h1v .ch .ch__g { display: none; }
@keyframes lock { from { color: var(--amber); } }

.hero__copy { display: grid; gap: 14px; max-width: 600px; }
.hero__actions { margin-top: 12px; }
.hero__doors { flex-direction: column; align-items: flex-start; gap: 10px; }
.hero__doors .sep { display: none; }
.hero__q { color: var(--text-dim); font-size: var(--step--1); }
.hero__lead { font-size: var(--step-1); color: var(--bone); line-height: 1.3; }
.hero__lede { color: var(--text-dim); max-width: 46ch; }
.hero__lede strong { color: var(--bone); font-weight: 700; }
.hero__actions { padding-top: 6px; }
.hero__doors { font-size: var(--step--1); color: var(--text-dim); display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; }
.hero__doors a { color: var(--bone); text-decoration: none; border-bottom: 1px solid var(--rule-strong); padding-bottom: 1px; transition: border-color .2s, color .2s; }
.hero__doors a:hover { color: var(--amber); border-color: var(--amber); }
.hero__doors .sep { color: var(--ash); padding-inline: 4px; }

.hero__status {
  display: flex; justify-content: space-between; gap: 16px;
  padding-block: 16px; border-top: 1px solid var(--rule);
  font-size: 0.74rem; color: var(--text-dim);
}
.dot { display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); margin-right: 10px; vertical-align: 1px; box-shadow: 0 0 0 0 rgba(200, 135, 62, .6); animation: pulse 2.4s infinite; }
@keyframes pulse { 70% { box-shadow: 0 0 0 9px rgba(200, 135, 62, 0); } 100% { box-shadow: 0 0 0 0 rgba(200, 135, 62, 0); } }

/* Boot sequence states (only when motion is allowed) */
.motion [data-hero]:not(.st-type) .term__cmd,
.motion [data-hero]:not(.st-decode) .h1v,
.motion [data-hero]:not(.st-sphere) .hero__sphere { opacity: 0; }
.motion [data-hero]:not(.st-sphere) .hero__sphere { transform: translateY(-48%) scale(0.96); }
.motion [data-hero] [data-after] { transition: opacity .6s var(--ease), transform .6s var(--ease); }
.motion [data-hero]:not(.st-after) [data-after] { opacity: 0; transform: translateY(10px); }
.motion.boot-done [data-hero] .term__cmd,
.motion.boot-done [data-hero] .h1v,
.motion.boot-done [data-hero] [data-after] { opacity: 1; transform: none; }
.motion.boot-done [data-hero] .hero__sphere { opacity: 0.85; transform: translateY(-50%); }

/* ---------- Sections + command heads ---------- */
.sec { padding-block: var(--section-y); border-top: 1px solid var(--rule); }
.cmd-head { display: grid; gap: 0; margin-bottom: clamp(44px, 5vw, 80px); }
.cmd-head--split { align-items: end; gap: 24px; }
@media (min-width: 960px) { .cmd-head--split { grid-template-columns: 1.15fr 1fr; gap: 64px; } }
.cmd { font-size: clamp(0.95rem, 0.88rem + 0.3vw, 1.15rem); color: var(--bone); margin-bottom: 18px; white-space: pre; }
.cmd__ps { color: var(--amber); }
.sec-title { font-family: var(--f-display); font-weight: 400; font-size: var(--step-4); line-height: 1; max-width: 20ch; padding-left: 1.1rem; border-left: 1px solid var(--rule-strong); }
.sec-title--md { font-size: var(--step-3); max-width: 24ch; }
.sec-lede { color: var(--text-dim); max-width: 52ch; }

/* ---------- Proof ---------- */
.proof { background: var(--ink); }

.stats { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-top: clamp(40px, 5vw, 72px); border-top: 1px solid var(--rule); }
@media (min-width: 900px) { .stats { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.stat { display: flex; flex-direction: column; gap: 12px; padding: 24px 20px 8px 0; }
.stat + .stat { padding-left: 20px; border-left: 1px solid var(--rule); }
@media (max-width: 899px) {
  .stat:nth-child(3) { padding-left: 0; border-left: 0; }
  .stat:nth-child(n+3) { border-top: 1px solid var(--rule); }
}
.stat__num { order: -1; font-family: var(--f-mono); font-size: clamp(2.2rem, 1.4rem + 2.4vw, 3.6rem); line-height: 0.95; letter-spacing: -0.04em; }
.stat__num span { color: var(--amber); }
.stat__label { color: var(--text-dim); font-size: var(--step--1); line-height: 1.45; max-width: 24ch; }
.stat__src { font-size: 0.72rem; line-height: 1.5; color: var(--text-dim); max-width: 28ch; padding-bottom: 16px; }

/* ---------- Doors ---------- */
.doors { background: var(--ink); }
.doors__grid { display: grid; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); }
@media (min-width: 900px) { .doors__grid { grid-template-columns: 1fr 1fr; } }
.door {
  position: relative; display: flex; flex-direction: column; gap: 18px;
  padding: clamp(28px, 3.4vw, 48px) clamp(20px, 3vw, 48px) clamp(28px, 3.4vw, 40px) 0;
  text-decoration: none; transition: background .35s var(--ease);
}
.door + .door { border-top: 1px solid var(--rule); }
@media (min-width: 900px) {
  .door + .door { border-top: 0; border-left: 1px solid var(--rule); padding-left: clamp(20px, 3vw, 48px); }
}
.door::before {
  content: ""; position: absolute; left: 0; right: 0; top: -1px; height: 2px; background: var(--amber);
  transform: scaleX(0); transform-origin: left; transition: transform .5s var(--ease);
}
.door:hover::before, .door:focus-visible::before { transform: scaleX(1); }
.door__path { font-size: var(--step--1); color: var(--text-dim); }
.door__title { font-family: var(--f-display); font-weight: 400; font-size: clamp(1.6rem, 1.2rem + 1.3vw, 2.4rem); line-height: 1; max-width: 16ch; }
.door p { color: var(--text-dim); max-width: 44ch; }
.door .door__when { color: var(--bone); max-width: 44ch; }
.door__when .mono { display: block; font-size: 0.72rem; color: var(--text-dim); margin-bottom: 4px; }
.door__tags { list-style: none; margin: auto 0 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; font-size: 0.74rem; }
.door__tags li { padding: 5px 10px; border: 1px solid var(--rule-strong); border-radius: 999px; color: var(--text-dim); transition: border-color .25s, color .25s; }
.door:hover .door__tags li, .door:focus-visible .door__tags li { border-color: rgba(200, 135, 62, .5); color: var(--bone); }
.door__cta { font-size: var(--step--1); color: var(--bone); display: inline-flex; gap: 8px; }
.door:hover .door__cta { color: var(--amber); }

.process { display: grid; margin-top: clamp(48px, 6vw, 80px); }
@media (min-width: 900px) { .process { grid-template-columns: repeat(3, 1fr); } }
.process li { padding: 20px 28px 20px 0; color: var(--text-dim); }
.process li + li { border-top: 1px solid var(--rule); }
@media (min-width: 900px) { .process li + li { border-top: 0; padding-left: 28px; border-left: 1px solid var(--rule); } }
.process .mono { display: block; color: var(--amber); font-size: var(--step--1); margin-bottom: 10px; }
.process strong { color: var(--bone); font-weight: 700; display: block; font-size: var(--step-1); margin-bottom: 4px; }

/* ---------- Field Notes (light) ---------- */
.notes { background: var(--linen); color: var(--slate); border-top: 0; }
.notes .cmd { color: var(--signal); }
.notes .cmd__ps { color: var(--amber-on-light); }
.notes .sec-title { color: var(--signal); border-left-color: rgba(26,26,26,.25); }
.notes .sec-lede { color: var(--text-dim-light); }
.notes__list { border-top: 1px solid var(--rule-light); }
.notes__list li { border-bottom: 1px solid var(--rule-light); }
.note {
  display: grid; grid-template-columns: 132px minmax(0, 1fr) auto; grid-template-areas: "tile id meta" "tile title meta" "tile try meta";
  column-gap: clamp(20px, 3vw, 40px); row-gap: 8px; align-items: center;
  padding-block: 20px; text-decoration: none; color: var(--signal);
}
.note__tile {
  grid-area: tile; aspect-ratio: 4 / 3; display: grid; place-items: end start; padding: 10px 12px;
  background: var(--ink) url("../assets/img/iso-dark.jpg") center / 320% auto no-repeat;
}
.notes__list li:nth-child(2) .note__tile { background-position: 20% 40%; }
.notes__list li:nth-child(3) .note__tile { background-position: 80% 70%; }
.note__big { font-family: var(--f-mono); font-size: 1.9rem; line-height: 1; letter-spacing: -0.04em; color: var(--bone); }
.note__big small { font-size: 0.36em; letter-spacing: 0.04em; color: var(--amber); margin-left: 4px; }
.note__id { grid-area: id; align-self: end; font-size: var(--step--1); color: var(--amber-on-light); }
.note__title { grid-area: title; align-self: start; font-weight: 700; font-size: clamp(1.2rem, 1rem + 0.8vw, 1.7rem); line-height: 1.2; max-width: 34ch; text-wrap: balance; transition: color .2s; }
.note__try { grid-area: try; align-self: start; color: var(--text-dim-light); max-width: 52ch; font-size: var(--step-0); }
.note__try .mono { font-size: 0.74rem; color: var(--amber-on-light); margin-right: 4px; }
.note__glyph { letter-spacing: 0.1em; color: var(--bone); }
.note__meta { grid-area: meta; font-size: var(--step--1); color: var(--text-dim-light); white-space: nowrap; }
.note__meta span { display: inline-block; transition: transform .25s var(--ease); }
.note:hover .note__title { color: var(--amber-on-light); }
.note:hover .note__meta span { transform: translateX(4px); }
.notes :focus-visible { outline-color: var(--amber-on-light); }
@media (max-width: 640px) {
  .note { grid-template-columns: 84px minmax(0, 1fr); grid-template-areas: "tile id" "tile title" "tile try" "tile meta"; align-items: start; }
  .note__big { font-size: 1.3rem; }
  .note__tile { padding: 6px 8px; }
  .note__title { font-size: 1.1rem; }
  .note__try { font-size: 0.92rem; }
  .note__id, .note__meta { align-self: start; }
}

.link-arrow { display: inline-flex; gap: 10px; margin-top: 40px; font-size: var(--step--1); text-decoration: none; color: var(--signal); border-bottom: 1px solid currentColor; padding-bottom: 4px; }
.link-arrow:hover { color: var(--amber-on-light); }

/* ---------- Operator + contact ---------- */
.operator { background: var(--ink); border-top: 0; }
.operator__grid { display: grid; gap: 56px; align-items: center; }
@media (min-width: 1000px) { .operator__grid { grid-template-columns: 1fr 1.05fr; gap: 88px; } }
.operator__text { display: grid; gap: 22px; align-content: start; }
.operator__text .cmd { margin-bottom: -4px; }
.operator__text p { color: var(--text-dim); max-width: 52ch; }
.operator__text .operator__loc { font-size: var(--step--1); color: var(--bone); }
.operator__media { position: relative; padding-bottom: 12%; }
.operator__work { width: 84%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(0.85) contrast(1.05); border: 1px solid var(--rule); }
.polaroid {
  position: absolute; right: 0; bottom: 0; width: 42%;
  background: #F4F1EA; padding: 10px 10px 40px; transform: rotate(3deg);  /* thick polaroid bottom, no caption */
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.7);
}
.polaroid img { aspect-ratio: 4 / 5; object-fit: cover; object-position: 50% 20%; filter: sepia(0.12) saturate(0.85) contrast(1.02); }
.polaroid figcaption { font-family: Georgia, "Times New Roman", serif; font-style: italic; color: #3A3A3A; font-size: 0.85rem; padding: 12px 4px 16px; }

.contact {
  margin-top: var(--section-y); display: grid; gap: 48px;
  padding: clamp(28px, 5vw, 72px); background: var(--carbon); border: 1px solid var(--rule-strong);
  border-left: 3px solid var(--amber);
}
@media (min-width: 1000px) { .contact { grid-template-columns: 1fr 1fr; gap: 80px; align-items: start; } }
.contact__head { display: grid; gap: 22px; align-content: start; }
.contact__head .cmd { margin-bottom: -6px; }
.contact__title { font-family: var(--f-display); font-weight: 400; font-size: var(--step-4); line-height: 0.98; }
.contact__head p { color: var(--text-dim); max-width: 44ch; }
.link-plain { color: var(--bone); font-size: var(--step--1); text-decoration: none; border-bottom: 1px solid var(--amber); justify-self: start; padding-bottom: 3px; overflow-wrap: anywhere; }
.link-plain:hover { color: var(--amber); }

.form { display: grid; gap: 22px; }
.field { display: grid; gap: 8px; }
.field label { font-family: var(--f-mono); font-size: 0.82rem; color: var(--text-dim); }
.field label span { color: var(--amber); }
.field input, .field textarea {
  width: 100%; font: inherit; color: var(--bone); background: var(--ink);
  border: 1px solid var(--rule-strong); border-radius: var(--radius); padding: 14px 16px;
  transition: border-color .2s, box-shadow .2s;
}
.field textarea { resize: vertical; min-height: 120px; }
.field input:focus, .field textarea:focus { outline: none; border-color: var(--amber); box-shadow: 0 0 0 1px var(--amber); }
.field [aria-invalid="true"] { border-color: #E07A5F; }
.form__note { font-size: 0.8rem; color: var(--text-dim); }
.form-message { font-size: 0.85rem; }
.form-message--error { color: #E07A5F; }

/* ---------- Footer ---------- */
.footer { background: var(--ink); border-top: 1px solid var(--rule); padding-top: clamp(56px, 7vw, 96px); }
.footer__grid { display: grid; gap: 40px; grid-template-columns: 1fr 1fr; }
@media (min-width: 900px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr 1fr; } }
.footer__brand { grid-column: 1 / -1; display: grid; gap: 16px; align-content: start; }
@media (min-width: 900px) { .footer__brand { grid-column: auto; } }
.footer__brand p { color: var(--text-dim); max-width: 34ch; }
.footer__h { font-size: 0.8rem; font-weight: 400; color: var(--amber); margin-bottom: 16px; }
.footer__h::before { content: "# "; color: var(--ash); }
.footer ul { display: grid; gap: 10px; }
.footer a { text-decoration: none; color: var(--bone); transition: color .2s; overflow-wrap: anywhere; }
.footer ul a:hover { color: var(--amber); }
.footer p { color: var(--text-dim); }
.footer p .mono { font-size: var(--step--1); }
.footer__base { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-top: 64px; padding-block: 24px; border-top: 1px solid var(--rule); font-size: 0.78rem; color: var(--text-dim); }

/* ---------- Small screens ---------- */
@media (max-width: 600px) {
  .hide-sm { display: none; }
  .hero__sphere { right: -45vw; width: 125vw; top: 40px; transform: none; opacity: 0.4; }
  .motion [data-hero]:not(.st-sphere) .hero__sphere { transform: scale(0.96); }
  .motion.boot-done [data-hero] .hero__sphere { opacity: 0.4; transform: none; }
  .hero__lede { text-shadow: 0 1px 12px var(--ink); }
  .stat { padding-right: 12px; }
  .stat + .stat { padding-left: 14px; }
  .stat:nth-child(3) { padding-left: 0; }
  .btn--lg { --pad: 18px 20px; font-size: var(--step-0); }
  .contact { padding: 28px 20px; }
  .footer__grid > :nth-child(3) { grid-column: 1 / -1; }
  .sec-title { padding-left: 0.8rem; }
  .cmd { white-space: normal; }
}

/* ---------- Reduced motion: final state, still ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Hero: keep small text legible over the sphere; stack the two door links below desktop */
.hero__comment, .hero__q, .hero__doors { text-shadow: 0 0 2px var(--ink), 0 1px 12px var(--ink); }
@media (max-width: 1099px) {
  .hero__doors { flex-direction: column; align-items: flex-start; gap: 10px; }
  .hero__doors .sep { display: none; }
}
.hero__doors a { white-space: nowrap; }
@media (max-width: 1099px) { .hero__lede, .hero__lead { text-shadow: 0 0 2px var(--ink), 0 1px 12px var(--ink); } }

/* ---------- Friction: "Sound familiar?" ---------- */
.friction { background: var(--carbon); }
.friction__list {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: minmax(0, 1fr);
  border-top: 1px solid var(--rule);
}
.friction__list li {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 4px;
  padding: 16px 0; border-bottom: 1px solid var(--rule);
}
.friction__txt { font-family: var(--f-text); font-weight: 400; font-size: var(--step-1); line-height: 1.3; color: var(--bone); }
@media (min-width: 900px) {
  .friction__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 56px; }
  .friction__list li { padding: 24px 0; }
}
.friction__result { margin-top: clamp(40px, 5vw, 64px); display: grid; gap: 14px; }
.friction__count { font-size: var(--step--1); color: var(--text-dim); }
.friction__take { font-family: var(--f-display); font-size: var(--step-3); line-height: 1; color: var(--bone); max-width: 24ch; text-wrap: balance; }

/* one-time reveal: only hidden once JS has armed the section */
.friction.is-armed .friction__list li,
.friction.is-armed .friction__result { opacity: 0; transform: translateX(-8px); }
.friction.is-in .friction__list li,
.friction.is-in .friction__result {
  opacity: 1; transform: none;
  transition: opacity .45s var(--ease), transform .45s var(--ease);
  transition-delay: calc(var(--i, 0) * 90ms);
}

/* ---------- Point of view: beliefs.md ---------- */
.beliefs { background: var(--carbon); }
.beliefs__list { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.belief {
  display: grid; grid-template-columns: 1.4rem minmax(0, 1fr); column-gap: 14px; row-gap: 10px;
  padding: 26px 0; border-bottom: 1px solid var(--rule);
}
.belief__mark { color: var(--amber); font-size: var(--step-1); line-height: 1.1; transition: color .35s var(--ease); }
.belief__claim { font-family: var(--f-display); font-size: clamp(1.4rem, 1.1rem + 1vw, 2.1rem); line-height: 1.08; color: var(--bone); max-width: 32ch; text-wrap: balance; transition: color .35s var(--ease); }
.belief__note { grid-column: 2; color: var(--text-dim); max-width: 46ch; transition: color .35s var(--ease); }
@media (min-width: 960px) {
  .belief { grid-template-columns: 2rem minmax(0, 1.5fr) minmax(0, 1fr); column-gap: 32px; align-items: baseline; padding: 28px 0; }
  .belief__note { grid-column: 3; }
}
/* reading focus: the belief nearest the middle of the screen is lit */
.beliefs.is-armed .belief__claim { color: var(--text-dim); }
.beliefs.is-armed .belief__mark { color: var(--ash); }
.beliefs.is-armed .belief.is-focus .belief__claim { color: var(--bone); }
.beliefs.is-armed .belief.is-focus .belief__mark { color: var(--amber); }
.beliefs.is-armed .belief.is-focus .belief__note { color: var(--bone); }
@media (max-width: 959px) {
  .belief { grid-template-columns: 1rem minmax(0, 1fr); column-gap: 10px; padding: 22px 0; }
  .belief__claim { max-width: none; font-size: clamp(1.3rem, 1.15rem + 0.8vw, 1.6rem); }
}

/* third path: not sure which door */
.door-unsure {
  display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; align-items: center;
  padding: 26px 0; border-bottom: 1px solid var(--rule); text-decoration: none; color: var(--bone);
}
@media (min-width: 900px) { .door-unsure { grid-template-columns: 12rem minmax(0, 1fr) auto; gap: 32px; padding: 30px 0; } }
.door-unsure__path { font-size: var(--step--1); color: var(--text-dim); }
.door-unsure__text { font-family: var(--f-display); font-size: clamp(1.3rem, 1.1rem + 0.8vw, 1.8rem); line-height: 1.08; }
.door-unsure__cta { font-size: var(--step--1); display: inline-flex; gap: 8px; border-bottom: 1px solid var(--rule-strong); padding-bottom: 2px; justify-self: start; transition: color .2s, border-color .2s; }
.door-unsure__cta span { transition: transform .25s var(--ease); }
.door-unsure:hover .door-unsure__cta, .door-unsure:focus-visible .door-unsure__cta { color: var(--amber); border-color: var(--amber); }
.door-unsure:hover .door-unsure__cta span { transform: translateX(4px); }
.door-unsure:focus-visible { outline: 2px solid var(--amber); outline-offset: 4px; }

/* Field Notes: recurring series index */
.series { margin-top: clamp(48px, 6vw, 80px); }
.series__cmd { font-size: var(--step--1); color: var(--signal); margin-bottom: 18px; }
.series__cmd .cmd__ps { color: var(--amber-on-light); }
.series__list { display: grid; grid-template-columns: minmax(0, 1fr); border-top: 1px solid var(--rule-light); margin: 0; }
@media (min-width: 700px) { .series__list { grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 40px; } }
@media (min-width: 1100px) { .series__list { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.series__item { padding: 18px 0; border-bottom: 1px solid var(--rule-light); }
.series__item dt { font-weight: 700; color: var(--signal); margin-bottom: 4px; }
.series__item dd { margin: 0; color: var(--text-dim-light); font-size: 0.95rem; max-width: 40ch; }

/* operator: the first question */
.operator__text .operator__q { margin-top: 6px; padding: 18px 0 18px 18px; border-left: 2px solid var(--amber); }
.operator__text .operator__q-label { font-size: 0.74rem; color: var(--text-dim); margin-bottom: 6px; }
.operator__text .operator__q-text { font-family: var(--f-display); font-size: clamp(1.3rem, 1.1rem + 0.7vw, 1.7rem); line-height: 1.1; color: var(--bone); max-width: 34ch; text-wrap: balance; }

/* contact: optional "where's it stuck?" choice */
.field--choice { border: 0; margin: 0; padding: 0; min-width: 0; }
.field--choice legend { font-family: var(--f-mono); font-size: 0.82rem; color: var(--text-dim); padding: 0; margin-bottom: 10px; }
.field--choice legend > span[aria-hidden] { color: var(--amber); }
.field__opt { color: var(--text-dim); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { position: relative; cursor: pointer; }
.chip input { position: absolute; opacity: 0; inset: 0; margin: 0; cursor: pointer; }
.field .chip span {
  display: inline-block; padding: 9px 16px; border: 1px solid var(--rule-strong); border-radius: 999px;
  font-family: var(--f-mono); font-size: 0.8rem; color: var(--text-dim); transition: border-color .2s, color .2s, background .2s;
}
.field .chip:hover span { border-color: var(--bone); color: var(--bone); }
.field .chip input:checked + span { background: var(--amber); border-color: var(--amber); color: var(--ink); }
.field .chip input:focus-visible + span { outline: 2px solid var(--amber); outline-offset: 3px; }
.field textarea::placeholder { color: var(--ash); }

/* ---------- Type roles: Cimo One only for short, punchy lines ---------- */
.hero__lead, .process strong, .note__title, .series__item dt { font-family: var(--f-body); }
strong, b { font-weight: 600; }
.hero__lede, .sec-lede, .operator__text p:not(.mono), .contact__head p, .door p, .belief__note, .note__try, .series__item dd, .stat__label, .process li, .run__i-text, .run__i-why { letter-spacing: 0.005em; }
