/* ==========================================================================
   MYCEL — style.css
   Editorial refactor. One bold device: the thread — a thin line running down
   the page that each section plugs into, like mycelium under a forest floor.
   Palette proportions: ~70% cream, ~20% charcoal, ~10% purple + yellow.
   ========================================================================== */

/* ---------- Tokens ---------- */
:root {
  /* brand palette (fixed) */
  --cream: #F4F0E7;
  --cream-light: #FAF8F2;
  --purple: #5740A5;
  --purple-dark: #38266F;
  --charcoal: #242321;
  --black: #171717;
  --yellow: #E7C65A;
  --gray-line: #D8D2C7;
  --gray-text: #77736D;        /* large text only on cream (4.1:1) */
  --gray-text-dark: #615D56;   /* AA-safe small secondary text on cream (5.8:1) */
  --purple-soft: #A99BDD;      /* AA-safe purple text on charcoal (6.3:1) */

  /* category accents (decorative only — never body text) */
  --cat-ai: var(--purple);
  --cat-auto: var(--yellow);
  --cat-web: #315BCB;
  --cat-sys: #A8C8B7;

  /* semantic (light) */
  --bg: var(--cream);
  --bg-card: var(--cream-light);
  --ink: var(--charcoal);
  --ink-2: var(--gray-text-dark);
  --line: var(--gray-line);
  --accent: var(--purple);        /* text-safe accent on current bg */
  --accent-solid: var(--purple);  /* fills, buttons */
  --accent-hover: var(--purple-dark);

  --footer-bg: var(--charcoal);
  --footer-ink: var(--cream);
  --footer-accent: var(--purple-soft);

  --net-line: rgba(36, 35, 33, 0.38);
  --mascot-shadow: rgba(87, 64, 165, 0.16);   /* flat puddle under the hero mascot */
  --thread: rgba(36, 35, 33, 0.28);      /* the page spine */
  --thread-node: var(--purple);
  --band-bg: var(--charcoal);

  /* type — system placeholders; self-host real fonts later (see README) */
  --font-head: "Avenir Next", Avenir, Futura, "Century Gothic", Seravek, ui-rounded, system-ui, sans-serif;
  --font-body: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;

  /* modular scale, ratio ≈ 1.33 on a 17px base */
  --t-0: 1.0625rem;                             /* 17 — body */
  --t-1: 1.33rem;                               /* 22.6 */
  --t-2: clamp(1.55rem, 2.6vw, 1.77rem);        /* 30 — h3 territory */
  --t-3: clamp(1.9rem, 3.4vw, 2.35rem);         /* 40 — h2 */
  --t-4: clamp(2.6rem, 6vw, 4.2rem);            /* display */

  /* spacing scale */
  --s-1: 4px; --s-2: 8px; --s-3: 16px; --s-4: 24px; --s-5: 48px; --s-6: 96px;

  --radius: 8px;      /* interactive surfaces only: buttons, chips, fields */
  --speed: 180ms;

  color-scheme: light;
}

[data-theme="dark"] {
  --bg: var(--charcoal);
  --bg-card: #2C2B28;
  --ink: var(--cream);
  --ink-2: #A39E96;
  --line: #3F3D38;
  --accent: var(--purple-soft);
  --accent-solid: var(--purple);
  --accent-hover: var(--purple-dark);

  --footer-bg: var(--black);

  --net-line: rgba(244, 240, 231, 0.3);
  --mascot-shadow: rgba(23, 23, 23, 0.55);
  --thread: rgba(244, 240, 231, 0.25);
  --thread-node: var(--purple-soft);
  --band-bg: var(--black);

  color-scheme: dark;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: var(--charcoal);
    --bg-card: #2C2B28;
    --ink: var(--cream);
    --ink-2: #A39E96;
    --line: #3F3D38;
    --accent: var(--purple-soft);
    --accent-solid: var(--purple);
    --accent-hover: var(--purple-dark);

    --footer-bg: var(--black);

    --net-line: rgba(244, 240, 231, 0.3);
    --mascot-shadow: rgba(23, 23, 23, 0.55);
    --thread: rgba(244, 240, 231, 0.25);
    --thread-node: var(--purple-soft);
    --band-bg: var(--black);

    color-scheme: dark;
  }
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: 88px; /* anchors must clear the sticky header */
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--t-0);
  line-height: 1.65;
  -webkit-text-size-adjust: 100%;
}

h1, h2, h3, h4 {
  font-family: var(--font-head);
  line-height: 1.12;
  margin: 0 0 var(--s-3);
  letter-spacing: -0.015em;
  overflow-wrap: break-word;
}

h1 { font-size: var(--t-4); font-weight: 700; }
h2 { font-size: var(--t-3); font-weight: 700; }
h3 { font-size: var(--t-1); font-weight: 600; }

p, ul, ol { margin: 0 0 var(--s-3); }
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
[data-theme="dark"] a:hover { color: var(--cream-light); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) a:hover { color: var(--cream-light); }
}

img, svg { max-width: 100%; height: auto; }

button, input, select, textarea { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }

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

::selection { background: var(--purple); color: var(--cream); }

.container {
  max-width: 1120px;
  margin-inline: auto;
  padding-inline: var(--s-4);
}

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  left: var(--s-3); top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--bg);
  padding: var(--s-2) var(--s-3);
  border-radius: var(--radius);
}
.skip-link:focus-visible { top: var(--s-3); color: var(--bg); }

/* ---------- Voice ---------- */
/* Headings are lowercase with a terminal period — the wordmark's register.
   The tagline is the single uppercase element, by decree of the brief. */
.tagline {
  font-family: var(--font-head);
  text-transform: uppercase;
  letter-spacing: 0.14em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--accent);
  margin-bottom: var(--s-3);
}

.placeholder-tag {
  display: inline-block;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--ink-2);
  border: 1px dashed var(--line);
  border-radius: 4px;
  padding: 1px var(--s-2);
  margin: 0 0 var(--s-2);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 10px 22px;
  border-radius: var(--radius);
  border: 1.5px solid transparent;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--speed) ease, border-color var(--speed) ease, color var(--speed) ease;
}

.btn-primary {
  background: var(--accent-solid);
  color: var(--cream-light);
}
.btn-primary:hover { background: var(--accent-hover); color: var(--cream-light); }

.btn-secondary {
  background: transparent;
  color: var(--ink);
  border-color: var(--ink);
}
.btn-secondary:hover { color: var(--accent-hover); border-color: var(--accent-hover); }
[data-theme="dark"] .btn-secondary:hover { color: var(--accent); border-color: var(--accent); }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .btn-secondary:hover { color: var(--accent); border-color: var(--accent); }
}

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line);
}

.nav {
  max-width: 1120px;
  margin-inline: auto;
  padding: var(--s-3) var(--s-4);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--s-4);
}

.brand { display: inline-flex; align-items: center; color: var(--ink); }
.logo { display: block; }
.logo-word {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: 19px;
  letter-spacing: 0.01em;
  fill: var(--ink);
}
.logo-word-footer { fill: var(--footer-ink); }

.nav-menu { display: flex; align-items: center; gap: var(--s-5); }

.nav-links {
  display: flex;
  gap: var(--s-4);
  list-style: none;
  margin: 0;
  padding: 0;
}
.nav-links a {
  color: var(--ink);
  text-decoration: none;
  font-size: 0.95rem;
  padding: var(--s-1) 0;
  border-bottom: 2px solid transparent;
}
.nav-links a:hover { color: var(--accent); }
.nav-links a[aria-current="true"] {
  color: var(--accent);
  border-bottom-color: var(--accent);
}

.nav-actions { display: flex; align-items: center; gap: var(--s-3); }

.theme-toggle {
  background: none;
  border: none;
  padding: var(--s-2);
  cursor: pointer;
  color: var(--ink);
  display: inline-flex;
  border-radius: var(--radius);
}
.theme-toggle:hover { color: var(--accent); }
.theme-toggle .theme-moon { display: none; }
[data-theme="dark"] .theme-toggle .theme-moon { display: block; }
[data-theme="dark"] .theme-toggle .theme-sun { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .theme-moon { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .theme-sun { display: none; }
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: var(--s-2);
  width: 40px; height: 36px;
  flex-direction: column;
  justify-content: center;
  gap: 6px;
}
.nav-toggle-bar {
  display: block;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
  transition: transform var(--speed) ease;
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:first-child { transform: translateY(4px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:last-child { transform: translateY(-4px) rotate(-45deg); }

@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .nav-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid var(--line);
    flex-direction: column;
    align-items: flex-start;
    padding: var(--s-4);
    gap: var(--s-4);
  }
  .nav-menu.open { display: flex; }
  .nav-links { flex-direction: column; gap: var(--s-3); }
}

/* ---------- Hero ---------- */
.hero { padding: var(--s-6) 0 var(--s-5); }

.hero-grid {
  display: grid;
  grid-template-columns: minmax(0, 7fr) minmax(0, 6fr);
  gap: var(--s-5);
  align-items: center;
}

.hero-sub {
  font-size: var(--t-1);
  color: var(--ink-2);
  max-width: 34ch;
  margin-bottom: var(--s-4);
}

.hero-actions { display: flex; flex-wrap: wrap; gap: var(--s-3); }

.hero-visual {
  margin: 0;
  display: flex;
  justify-content: center;
}
.mascot-replay {
  display: block;
  background: none;
  border: 0;
  padding: 0;
  margin: 0;
  cursor: pointer;      /* hover or click = a wave (js/mascot.js) */
  border-radius: 32px;
  color: inherit;
}
.mascot-replay:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 6px;
}
.hero-visual .mascot {
  display: block;
  width: clamp(150px, 17vw, 230px);   /* frames are portrait (272×530) */
  height: auto;
}

@media (max-width: 860px) {
  .hero { padding: var(--s-5) 0; }
  .hero-grid { grid-template-columns: 1fr; }
  .hero-visual { order: -1; }
  .hero-visual .mascot { width: clamp(120px, 34vw, 170px); }
}

/* ---------- The thread: section scaffold ---------- */
/* Desktop: [rail 56px][heading 264px][body 1fr]. The section's own ::before
   draws the thread segment so adjacent sections join into one line; each
   heading cell pins a node onto it. Mobile: single column, no thread. */

.sec { position: relative; padding: var(--s-6) 0; }

.sec-grid { display: grid; gap: var(--s-4); }

.sec-head h2 { margin-bottom: var(--s-3); font-size: var(--t-2); }
.sec-head p { color: var(--ink-2); max-width: 36ch; }

.band {
  background: var(--band-bg);
  color: var(--cream);
  --ink: var(--cream);
  --ink-2: #A39E96;
  --thread: rgba(244, 240, 231, 0.25);
  --thread-node: var(--purple-soft);
  --accent: var(--purple-soft);
}

@media (min-width: 980px) {
  .sec::before {
    content: "";
    position: absolute;
    top: 0; bottom: 0;
    left: calc(max((100% - 1120px) / 2, 0px) + 52px);
    width: 2px;
    background: var(--thread);
  }
  .sec-grid {
    grid-template-columns: 56px 264px minmax(0, 1fr);
    gap: 0 var(--s-5);
  }
  .sec-rail-gap { grid-column: 1; }
  .sec-head {
    grid-column: 2;
    position: relative;
    align-self: start;
    position: sticky;
    top: 104px;
  }
  /* the node: where this section plugs into the thread */
  .sec-head::before {
    content: "";
    position: absolute;
    left: calc(-1 * var(--s-5) - 28px - 7px + 1px); /* rail center */
    top: 0.52em;
    width: 14px; height: 14px;
    border-radius: 50%;
    background: var(--thread-node);
    border: 3px solid var(--bg);
  }
  .band .sec-head::before { border-color: var(--band-bg); }
  .sec-body { grid-column: 3; }
}

/* ---------- Problem strip (charcoal band) ---------- */
.problem-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-4);
}
.problem-list li {
  font-family: var(--font-head);
  font-size: var(--t-2);
  font-weight: 600;
  line-height: 1.35;
  max-width: 30ch;
}
@media (min-width: 760px) {
  .problem-list li:nth-child(2) { margin-left: 6%; }
  .problem-list li:nth-child(3) { margin-left: 12%; }
}

/* ---------- Services: the ledger ---------- */
.svc {
  display: grid;
  gap: var(--s-3);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.svc:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 760px) {
  .svc { grid-template-columns: 230px minmax(0, 1fr); gap: var(--s-4); }
}

.svc h3 {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin: 0;
  font-size: var(--t-1);
}
.svc h3::before {
  content: "";
  width: 11px; height: 11px;
  border-radius: 3px;
  flex: none;
  transform: translateY(-1px);
  background: var(--cat-color, var(--accent-solid));
}
.svc[data-cat="ai"]   { --cat-color: var(--cat-ai); }
.svc[data-cat="auto"] { --cat-color: var(--cat-auto); }
.svc[data-cat="web"]  { --cat-color: var(--cat-web); }
.svc[data-cat="sys"]  { --cat-color: var(--cat-sys); }

.svc-promise {
  font-family: var(--font-head);
  font-weight: 600;
  margin-bottom: var(--s-3);
}

.svc-caps {
  list-style: none;
  margin: 0;
  padding: 0;
  color: var(--ink-2);
}
.svc-caps li { padding: var(--s-1) 0; }
.svc-caps strong { color: var(--ink); font-weight: 600; }

/* ---------- How it connects ---------- */
.diagram {
  position: relative;
  display: grid;
  gap: var(--s-5);
  justify-items: center;
  margin-bottom: var(--s-4);
}

.diagram-lines {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
}
.diagram-lines line {
  stroke: var(--net-line);
  stroke-width: 1.5;
  transition: stroke var(--speed) ease;
}
.diagram-lines line.active {
  stroke: var(--accent-solid);
  stroke-width: 2.5;
}

.diagram-row {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: var(--s-3);
  justify-content: center;
  position: relative;
  z-index: 1;
}

.chip {
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-3);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: border-color var(--speed) ease, color var(--speed) ease;
}
.chip:hover, .chip.active {
  border-color: var(--accent-solid);
  color: var(--accent);
}

.diagram-hub {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  gap: var(--s-2);
  background: var(--charcoal);
  color: var(--cream);
  border-radius: var(--radius);
  padding: var(--s-3) var(--s-4);
  transition: background-color var(--speed) ease;
}
.diagram-hub.active { background: var(--purple-dark); }
.hub-name { font-family: var(--font-head); font-weight: 700; }
.hub-sub { color: var(--purple-soft); font-size: 0.85rem; }

.outcome {
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: var(--s-2) var(--s-3);
  font-size: 0.95rem;
  color: var(--ink-2);
}

.diagram-caption {
  color: var(--ink-2);
  font-size: 0.95rem;
  min-height: 3.4em; /* caption changes must not shift layout */
  max-width: 52ch;
}

@media (max-width: 720px) {
  .diagram { gap: var(--s-4); }
  .diagram-lines { display: none; }
  .diagram-row { flex-direction: column; align-items: stretch; width: 100%; }
  .chip { width: 100%; }
  .diagram-hub { width: 100%; justify-content: center; flex-wrap: wrap; text-align: center; }
  .diagram-hub::before, .diagram-outcomes::before {
    content: "";
    position: absolute;
    top: calc(-1 * var(--s-4));
    left: 50%;
    width: 2px;
    height: var(--s-4);
    background: var(--net-line);
  }
  .diagram-hub, .diagram-outcomes { position: relative; }
}

/* ---------- How we work (a real sequence — numerals earn their place) ---------- */
.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--s-5);
}

.step-num {
  display: block;
  font-family: var(--font-head);
  font-weight: 700;
  font-size: var(--t-3);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin-bottom: var(--s-2);
}

.step h3 { margin-bottom: var(--s-2); }
.step p { color: var(--ink-2); margin: 0; }

@media (max-width: 760px) {
  .steps { grid-template-columns: 1fr; gap: var(--s-4); }
}

/* ---------- Proof: honest rows, not cards ---------- */
.proof-row {
  display: grid;
  gap: var(--s-2);
  padding: var(--s-4) 0;
  border-top: 1px solid var(--line);
}
.proof-row:last-child { border-bottom: 1px solid var(--line); }

@media (min-width: 760px) {
  .proof-row { grid-template-columns: 150px minmax(0, 1fr); gap: var(--s-4); }
}

.proof-row h3 { font-size: var(--t-0); margin-bottom: var(--s-1); }
.proof-row div > p { color: var(--ink-2); font-size: 0.95rem; margin: 0; }
.proof-row .placeholder-tag { align-self: start; justify-self: start; margin: 0; }

/* ---------- Who we are (charcoal band) ---------- */
.about-text {
  font-size: var(--t-1);
  line-height: 1.6;
  margin: 0;
  max-width: 54ch;
}

/* ---------- FAQ ---------- */
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item:first-of-type { border-top: 1px solid var(--line); }

.faq-item summary {
  font-family: var(--font-head);
  font-weight: 600;
  padding: var(--s-3) var(--s-4) var(--s-3) 0;
  cursor: pointer;
  list-style: none;
  position: relative;
}
.faq-item summary::-webkit-details-marker { display: none; }
.faq-item summary::after {
  content: "";
  position: absolute;
  right: var(--s-1);
  top: 50%;
  width: 10px; height: 10px;
  border-right: 2px solid var(--accent);
  border-bottom: 2px solid var(--accent);
  transform: translateY(-70%) rotate(45deg);
  transition: transform var(--speed) ease;
}
.faq-item[open] summary::after { transform: translateY(-30%) rotate(225deg); }
.faq-item p {
  color: var(--ink-2);
  padding-bottom: var(--s-3);
  margin: 0;
  max-width: 60ch;
}

/* ---------- Contact ---------- */
.contact { border-top: 1px solid var(--line); }

.contact-channels {
  list-style: none;
  margin: var(--s-4) 0 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}

.contact-form {
  display: grid;
  gap: var(--s-3);
  background: var(--bg-card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: var(--s-4);
  max-width: 560px;
}

.field { display: grid; gap: var(--s-1); }
.field label { font-family: var(--font-head); font-weight: 600; font-size: 0.95rem; }
.optional { color: var(--ink-2); font-weight: 400; }

.field input,
.field select,
.field textarea {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 10px var(--s-3);
  color: var(--ink);
  width: 100%;
}
.field textarea { resize: vertical; min-height: 96px; }
.field input:focus-visible,
.field select:focus-visible,
.field textarea:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 1px;
  border-color: var(--accent);
}

.field.invalid input,
.field.invalid textarea { border-color: var(--accent-hover); }

.field-error {
  color: var(--accent);
  font-size: 0.88rem;
  margin: 0;
}

.btn-submit { justify-self: start; }

.form-status { margin: 0; color: var(--ink); font-weight: 600; min-height: 1.6em; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--footer-bg);
  color: var(--footer-ink);
  padding: var(--s-5) 0;
}

.footer-grid {
  display: grid;
  grid-template-columns: 2fr 1fr 2fr;
  gap: var(--s-5);
  align-items: start;
}

.footer-tagline { color: var(--footer-accent); margin: var(--s-3) 0 0; }

.footer-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-2);
}
.footer-nav a { color: var(--footer-ink); text-decoration: none; }
.footer-nav a:hover { color: var(--footer-accent); }

.footer-meta {
  display: flex;
  align-items: flex-end;
  flex-direction: column;
  gap: var(--s-3);
}
.footer-meta p { color: var(--footer-ink); opacity: 0.75; font-size: 0.9rem; margin: 0; text-align: right; }
.footer-meta .mascot { flex: none; }

@media (max-width: 760px) {
  .footer-grid { grid-template-columns: 1fr; gap: var(--s-4); }
  .footer-meta { align-items: flex-start; }
  .footer-meta p { text-align: left; }
}

/* ---------- Mascot ----------
   Drawn from the official character: purple dome cap with dark underside,
   white face, two tall oval eyes, all-black blob body. */
.mascot {
  --m-cap: var(--accent-solid);
  --m-cap-under: var(--purple-dark);
  --m-face: var(--cream-light);
  --m-body: var(--black);
  --m-line: var(--ink); /* charcoal outline on light bg, cream outline in dark mode */
  --m-cheek: #E2A79F;   /* subtle blush — decorative only */
  --m-shadow: var(--mascot-shadow);
}
.site-footer .mascot { --m-line: var(--footer-ink); }

/* ---------- Contact page / 404 ---------- */
.page-contact main { padding: var(--s-6) 0; }
.page-contact .contact { border-top: none; padding-top: 0; }
.page-contact .contact::before { display: none; } /* no thread on the subpage */

/* two-column layout for the dedicated contact page */
.contact-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: var(--s-6);
  align-items: start;
}
.contact-copy > p { color: var(--ink-2); max-width: 42ch; }
@media (max-width: 860px) {
  .contact-grid { grid-template-columns: 1fr; gap: var(--s-5); }
}

.subhead {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: var(--t-1);
  margin: var(--s-5) 0 var(--s-3);
}

.next-steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  gap: var(--s-3);
  counter-reset: next;
}
.next-steps li {
  counter-increment: next;
  padding-left: var(--s-5);
  position: relative;
  color: var(--ink-2);
}
.next-steps li::before {
  content: counter(next);
  position: absolute;
  left: 0; top: 2px;
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 1.5px solid var(--accent);
  color: var(--accent);
  font-size: 0.8rem;
  font-weight: 700;
  font-variant-numeric: tabular-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-404 main {
  min-height: 60vh;
  display: grid;
  place-content: center;
  text-align: center;
  padding: var(--s-6) var(--s-4);
  gap: var(--s-2);
}
.code-404 {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: clamp(4rem, 14vw, 7rem);
  line-height: 1;
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  margin: 0;
}
.page-404 .mascot { margin-inline: auto; }
.page-404 p { color: var(--ink-2); max-width: 40ch; margin-inline: auto; }
.page-404 .btn { justify-self: center; margin-top: var(--s-3); }

/* ---------- Reduced motion: no transitions anywhere ---------- */
@media (prefers-reduced-motion: reduce) {
  .btn, .chip, .diagram-hub, .diagram-lines line,
  .faq-item summary::after, .nav-toggle-bar { transition: none; }
}
