/* ==========================================================================
   Matthew Loebenstein — design system
   Register: fashion-house editorial. Crisp paper, near-black ink, one rust
   accent, hairline structure, sharp corners. No shadows, no cards-by-default.
   ========================================================================== */

:root {
  /* Palette (OKLCH) */
  --paper:       oklch(0.988 0.003 60);   /* reads as white, not cream */
  --surface:     oklch(0.958 0.005 55);   /* alternate band */
  --ink:         oklch(0.235 0.008 55);   /* near-black, faintly warm */
  --ink-2:       oklch(0.430 0.012 55);   /* secondary text  (5.8:1) */
  --ink-3:       oklch(0.480 0.010 55);   /* captions/meta   (4.8:1) */
  --accent:      oklch(0.620 0.140 43);   /* rust — fills & large use */
  --accent-ink:  oklch(0.475 0.115 43);   /* rust for text  (4.8:1) */
  --accent-soft: oklch(0.945 0.018 48);   /* rust tint for hover bands */
  --line:        color-mix(in oklab, var(--ink) 14%, transparent);
  --line-strong: color-mix(in oklab, var(--ink) 34%, transparent);

  /* Type */
  --font-sans:  "Archivo", "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-serif: "Spectral", Georgia, "Times New Roman", serif;
  --font-mono:  ui-monospace, "SF Mono", "Cascadia Code", Consolas, monospace;

  /* Structure */
  --wrap: 76rem;
  --measure: 66ch;
  --gutter: clamp(1.25rem, 4vw, 3rem);

  /* Z scale */
  --z-sticky: 10;
  --z-menu: 20;

  /* Motion */
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --dur: 200ms;
}

/* ---------- Reset / base ---------- */

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

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0;
  font-family: var(--font-sans);
  font-weight: 700;
  line-height: 1.12;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

p { margin: 0; }

a {
  color: inherit;
  text-decoration-color: color-mix(in oklab, var(--accent) 60%, transparent);
  text-underline-offset: 0.18em;
}
a:hover { color: var(--accent-ink); }

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

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

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100%;
  z-index: var(--z-menu);
  background: var(--ink);
  color: var(--paper);
  padding: 0.6rem 1rem;
  font-size: 0.85rem;
  text-decoration: none;
  transition: top var(--dur) var(--ease-out);
}
.skip-link:focus { top: 0.75rem; color: var(--paper); }

/* ---------- Layout primitives ---------- */

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

.section {
  padding-block: clamp(3.5rem, 8vw, 6.5rem);
}

.section--band {
  background: var(--surface);
  border-block: 1px solid var(--line);
}

.rule { border: 0; border-top: 1px solid var(--line); margin: 0; }

/* ---------- Type utilities ---------- */

.display {
  font-weight: 840;
  font-stretch: 122%;
  text-transform: uppercase;
  letter-spacing: 0.005em;
  line-height: 0.99;
  font-size: clamp(2.6rem, 7vw, 5.25rem);
}

.page-title {
  font-weight: 800;
  font-stretch: 114%;
  letter-spacing: -0.01em;
  line-height: 1.02;
  font-size: clamp(2.1rem, 5vw, 3.5rem);
}

.section-title {
  font-size: clamp(1.5rem, 2.6vw, 2rem);
  font-weight: 760;
}

.standfirst {
  font-family: var(--font-serif);
  font-size: clamp(1.15rem, 1.8vw, 1.375rem);
  line-height: 1.55;
  color: var(--ink-2);
  max-width: 58ch;
  text-wrap: pretty;
}

.meta {
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
}

.serif { font-family: var(--font-serif); }

/* ---------- Masthead ---------- */

.masthead {
  position: sticky;
  top: 0;
  z-index: var(--z-sticky);
  background: var(--paper);
  border-bottom: 1px solid var(--line);
}

.masthead__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  min-height: 4rem;
}

.wordmark {
  font-weight: 840;
  font-stretch: 118%;
  font-size: 0.95rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  text-decoration: none;
  white-space: nowrap;
}
.wordmark::after { content: "."; color: var(--accent); }
.wordmark:hover { color: var(--ink); }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 2.5vw, 2rem);
  font-size: 0.9rem;
  font-weight: 560;
}

.nav a {
  text-decoration: none;
  color: var(--ink-2);
  padding-block: 0.35rem;
  border-bottom: 2px solid transparent;
  transition: color var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.nav a:hover { color: var(--accent-ink); }
.nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom-color: var(--accent);
}

.nav .nav__cta {
  color: var(--paper);
  background: var(--ink);
  padding: 0.5rem 1rem;
  border-bottom: 0;
  transition: background var(--dur) var(--ease-out);
}
.nav .nav__cta:hover { background: var(--accent-ink); color: var(--paper); }

.menu-toggle {
  display: none;
  font: inherit;
  font-weight: 600;
  font-size: 0.9rem;
  background: none;
  border: 0;
  padding: 0.5rem 0;
  cursor: pointer;
  color: var(--ink);
}

@media (max-width: 47.99em) {
  .menu-toggle { display: inline-flex; align-items: center; gap: 0.4rem; }
  .nav {
    display: none;
    position: absolute;
    inset: 100% 0 auto 0;
    z-index: var(--z-menu);
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--line-strong);
    padding: 0.5rem var(--gutter) 1.25rem;
  }
  .nav.is-open { display: flex; }
  .nav a {
    padding-block: 0.85rem;
    border-bottom: 1px solid var(--line);
    font-size: 1.05rem;
  }
  .nav a[aria-current="page"] { border-bottom: 1px solid var(--line); color: var(--accent-ink); }
  .nav .nav__cta {
    margin-top: 0.9rem;
    text-align: center;
    padding: 0.85rem 1rem;
  }
}

/* ---------- Buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.95rem 1.6rem;
  background: var(--ink);
  color: var(--paper);
  font-weight: 620;
  font-size: 0.98rem;
  line-height: 1;
  text-decoration: none;
  border: 1px solid var(--ink);
  transition: background var(--dur) var(--ease-out), border-color var(--dur) var(--ease-out);
}
.btn:hover { background: var(--accent-ink); border-color: var(--accent-ink); color: var(--paper); }
.btn .arrow { transition: transform var(--dur) var(--ease-out); }
.btn:hover .arrow { transform: translateX(4px); }

.btn--ghost {
  background: transparent;
  color: var(--ink);
  border-color: var(--line-strong);
}
.btn--ghost:hover {
  background: var(--surface);
  border-color: var(--ink);
  color: var(--ink);
}

/* Text link with arrow */
.tlink {
  font-weight: 640;
  font-size: 0.95rem;
  text-decoration: none;
  color: var(--ink);
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
}
.tlink .arrow { color: var(--accent-ink); transition: transform var(--dur) var(--ease-out); }
.tlink:hover { color: var(--accent-ink); }
.tlink:hover .arrow { transform: translateX(4px); }

/* ---------- Hero ---------- */

.hero {
  padding-block: clamp(4rem, 10vw, 8rem) clamp(3rem, 7vw, 5.5rem);
}

.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: end;
}
@media (min-width: 60em) {
  .hero__grid { grid-template-columns: minmax(0, 7fr) minmax(0, 4fr); }
}

.hero__status {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--ink-2);
  margin-bottom: 1.75rem;
}
.hero__status::before {
  content: "";
  width: 0.55rem;
  height: 0.55rem;
  background: var(--accent);
  flex: none;
}

.hero .display { margin-bottom: 1.75rem; }
.hero .display em { font-style: normal; color: var(--accent-ink); }

.hero__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  margin-top: 2.25rem;
}

.hero__links {
  display: flex;
  flex-wrap: wrap;
  gap: 1.75rem;
  margin-top: 2rem;
  font-size: 0.9rem;
  font-weight: 600;
}
.hero__links a { text-decoration: none; color: var(--ink-2); }
.hero__links a:hover { color: var(--accent-ink); }

/* Portrait plate */
.plate { max-width: 22rem; }
.plate img {
  width: 100%;
  aspect-ratio: 4 / 5;
  object-fit: cover;
  filter: grayscale(1) contrast(1.03);
  border: 1px solid var(--line-strong);
}
.plate figcaption {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 0.6rem;
  font-size: 0.8rem;
  color: var(--ink-3);
}

/* Hero entrance (enhancement only — content visible without it) */
@keyframes rise {
  from { opacity: 0; transform: translateY(0.55em); }
  to   { opacity: 1; transform: none; }
}
.rise { animation: rise 0.9s var(--ease-out) both; animation-delay: var(--d, 0s); }

/* ---------- Section headers ---------- */

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
.section-head .section-title { max-width: 24ch; }

/* ---------- Index rows (the workhorse: career, services, writing) ---------- */

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

.index__row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.35rem 2rem;
  padding-block: 1.4rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur) var(--ease-out);
}
@media (min-width: 48em) {
  .index__row { grid-template-columns: 11rem minmax(0, 1fr) auto; align-items: baseline; }
  .index__row--solo { grid-template-columns: minmax(0, 1fr); }
}

a.index__row:hover { background: var(--accent-soft); color: inherit; }
a.index__row:hover .index__title { color: var(--accent-ink); }

.index__lead {           /* year / number / key column */
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.index__title {
  font-weight: 700;
  font-size: 1.18rem;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease-out);
}
.index__title small { display: block; font-weight: 560; font-size: 0.95rem; color: var(--ink-2); margin-top: 0.35rem; letter-spacing: 0; max-width: 62ch; line-height: 1.55; }

.index__note {
  font-size: 0.92rem;
  color: var(--ink-2);
  max-width: 40ch;
}
@media (min-width: 48em) { .index__note { text-align: right; justify-self: end; } }

.index__tail {           /* arrow column for linked rows */
  color: var(--accent-ink);
  font-weight: 700;
  transition: transform var(--dur) var(--ease-out);
}
a.index__row:hover .index__tail { transform: translateX(4px); }

/* ---------- Timeline (career) ---------- */

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

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

.role > summary {
  list-style: none;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.35rem 2rem;
  padding-block: 1.5rem;
  align-items: baseline;
  transition: background var(--dur) var(--ease-out);
}
.role > summary::-webkit-details-marker { display: none; }
.role > summary:hover { background: var(--accent-soft); }
.role__years { grid-column: 1 / -1; margin-bottom: 0.2rem; }
@media (min-width: 48em) {
  .role > summary { grid-template-columns: 9rem minmax(0, 1fr) auto; align-items: baseline; }
  .role__years { grid-column: auto; margin-bottom: 0; }
}

.role__years {
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.04em;
  color: var(--ink-3);
  text-transform: uppercase;
}

.role__company { font-weight: 760; font-size: 1.3rem; letter-spacing: -0.01em; }
.role__title { display: block; font-weight: 560; font-size: 0.98rem; color: var(--ink-2); margin-top: 0.15rem; }

.role__toggle {
  font-size: 1.4rem;
  font-weight: 400;
  color: var(--accent-ink);
  line-height: 1;
  transition: transform var(--dur) var(--ease-out);
}
.role[open] .role__toggle { transform: rotate(45deg); }

.role__body {
  padding: 0 0 1.75rem;
  display: grid;
  gap: 1rem;
}
@media (min-width: 48em) { .role__body { padding-left: 11rem; } }
.role__body p { font-family: var(--font-serif); font-size: 1.05rem; line-height: 1.65; color: var(--ink-2); max-width: var(--measure); }

.results { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.55rem; max-width: var(--measure); }
.results li {
  position: relative;
  padding-left: 1.4rem;
  font-size: 0.95rem;
  color: var(--ink);
}
.results li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.52em;
  width: 0.5rem;
  height: 0.5rem;
  background: var(--accent);
}

/* ---------- Quotes (references) ---------- */

.quote-list { border-top: 1px solid var(--line-strong); }

.quote {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 1.25rem;
  padding-block: 2rem;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 48em) { .quote { grid-template-columns: 5.5rem minmax(0, 1fr); gap: 2rem; } }

.quote__img {
  width: 4.5rem;
  height: 4.5rem;
  object-fit: cover;
  filter: grayscale(1);
  border: 1px solid var(--line-strong);
}
@media (min-width: 48em) { .quote__img { width: 5.5rem; height: 5.5rem; } }

.quote__text {
  font-family: var(--font-serif);
  font-size: 1.08rem;
  line-height: 1.65;
  color: var(--ink);
  max-width: 62ch;
  margin-bottom: 0.9rem;
  text-wrap: pretty;
}
.quote__text p + p { margin-top: 0.8em; }

.quote__who { font-size: 0.88rem; color: var(--ink-2); }
.quote__who strong { color: var(--ink); font-weight: 700; }
.quote__who .meta { display: block; margin-top: 0.3rem; letter-spacing: 0.07em; }

/* Featured pull-quote */
.pull {
  border-block: 1px solid var(--line-strong);
  padding-block: clamp(2.5rem, 6vw, 4rem);
}
.pull blockquote {
  margin: 0;
  font-family: var(--font-serif);
  font-size: clamp(1.5rem, 3.2vw, 2.25rem);
  line-height: 1.35;
  letter-spacing: -0.01em;
  max-width: 26ch;
  text-wrap: balance;
}
.pull blockquote::before {
  content: "";
  display: block;
  width: 2.5rem;
  height: 0.28rem;
  background: var(--accent);
  margin-bottom: 1.5rem;
}
.pull cite {
  display: block;
  margin-top: 1.5rem;
  font-family: var(--font-sans);
  font-style: normal;
  font-size: 0.9rem;
  color: var(--ink-2);
}

/* ---------- Panels (rare, bordered — never shadowed cards) ---------- */

.panel {
  border: 1px solid var(--line-strong);
  padding: clamp(1.25rem, 3vw, 2rem);
  background: var(--paper);
}
.panel--tint { background: var(--surface); border-color: var(--line); }
.panel > * + * { margin-top: 1rem; }

/* ---------- Tags & chips (metadata only) ---------- */

.tag {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--accent-ink);
  border: 1px solid color-mix(in oklab, var(--accent-ink) 45%, transparent);
  padding: 0.28rem 0.6rem;
  line-height: 1;
  text-decoration: none;
}
a.tag:hover { background: var(--accent-soft); color: var(--accent-ink); }
.tag--plain { color: var(--ink-3); border-color: var(--line-strong); }
.tag--alert { background: var(--accent-ink); color: var(--paper); border-color: var(--accent-ink); }

/* Jump navigation (long documents) */
.jump-nav { display: flex; flex-wrap: wrap; gap: 0.5rem; }

/* ---------- Spec tables ---------- */

.table-scroll { overflow-x: auto; border-block: 1px solid var(--line-strong); }

.spec {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.92rem;
  text-align: left;
}
.spec th {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--ink-3);
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
.spec td {
  padding: 0.85rem 1rem 0.85rem 0;
  border-bottom: 1px solid var(--line);
  vertical-align: top;
  color: var(--ink-2);
}
.spec tr:last-child td { border-bottom: 0; }
.spec td:first-child { color: var(--ink); font-weight: 620; }
.spec td.num, .spec td .mono { font-family: var(--font-mono); font-size: 0.82rem; }

/* ---------- Code / terminal blocks ---------- */

.codeblock {
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 1.25rem 1.5rem;
  font-family: var(--font-mono);
  font-size: 0.84rem;
  line-height: 1.7;
  color: var(--ink-2);
  overflow-x: auto;
}
.codeblock .c { color: var(--accent-ink); }   /* comments / markers */
.codeblock p { margin: 0; }
.codeblock p + p { margin-top: 0.35em; }

code {
  font-family: var(--font-mono);
  font-size: 0.86em;
  background: var(--surface);
  border: 1px solid var(--line);
  padding: 0.1em 0.35em;
  color: var(--accent-ink);
}

/* ---------- Article prose ---------- */

.article-head { padding-block: clamp(3rem, 7vw, 5rem) clamp(2rem, 4vw, 3rem); border-bottom: 1px solid var(--line-strong); }
.article-head .tag { margin-bottom: 1.5rem; }
.article-head .page-title { max-width: 18ch; margin-bottom: 1.25rem; }

.prose {
  max-width: var(--measure);
  font-family: var(--font-serif);
  font-size: 1.13rem;
  line-height: 1.78;
  color: var(--ink);
  text-wrap: pretty;
}
.prose > * + * { margin-top: 1.4em; }
.prose > section + section { margin-top: 4rem; }
.prose section > * + * { margin-top: 1.4em; }
.prose p { color: color-mix(in oklab, var(--ink) 88%, var(--paper)); }

.prose h2 {
  font-size: 1.55rem;
  font-weight: 760;
  margin-top: 2.4em;
  padding-top: 1.4rem;
  border-top: 1px solid var(--line);
  max-width: none;
}
.prose h3 {
  font-size: 1.14rem;
  font-weight: 700;
  margin-top: 2em;
}
.prose h2 + *, .prose h3 + * { margin-top: 0.9em; }
.prose h4 { font-size: 1rem; font-weight: 700; margin-top: 1.8em; }

/* Entity names in data-model docs */
.mono-entity { font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0; }

.prose strong { font-weight: 600; }
.prose em { font-style: italic; }

.prose a {
  color: var(--ink);
  text-decoration: underline;
  text-decoration-color: var(--accent);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
  overflow-wrap: anywhere;
  transition: color var(--dur) var(--ease-out);
}
.prose a:hover { color: var(--accent-ink); }

/* Drop-cap lede, where the article calls for one */
.prose .lede::first-letter {
  float: left;
  font-family: var(--font-sans);
  font-weight: 840;
  font-size: 3.3em;
  line-height: 0.82;
  padding: 0.06em 0.16em 0 0;
  color: var(--accent-ink);
}

/* Closing statement, weighted like the author intended */
.prose .closer { font-size: 1.32rem; line-height: 1.6; color: var(--ink); font-weight: 500; }

.prose ul, .prose ol { padding-left: 1.3em; display: grid; gap: 0.6em; }
.prose li::marker { color: var(--accent-ink); font-weight: 700; }

.prose blockquote {
  margin: 2em 0;
  padding: 0;
  border: 0;
  font-size: 1.35rem;
  line-height: 1.5;
  font-style: italic;
  color: var(--ink);
  max-width: 30ch;
}
.prose blockquote::before {
  content: "";
  display: block;
  width: 2rem;
  height: 0.22rem;
  background: var(--accent);
  margin-bottom: 1rem;
}

.prose figure { margin: 2.5em 0; }
.prose figure img { border: 1px solid var(--line-strong); }
.prose figcaption {
  margin-top: 0.6rem;
  font-family: var(--font-sans);
  font-size: 0.82rem;
  color: var(--ink-3);
}

.prose .codeblock { margin: 1.8em 0; font-size: 0.8rem; }

.prose .wide { max-width: none; }   /* tables/code can exceed measure */

/* Numbered build steps (a genuine sequence) */
.steps { list-style: none; padding: 0; margin: 0; counter-reset: step; display: grid; gap: 1.1rem; }
.steps li {
  counter-increment: step;
  display: grid;
  grid-template-columns: 2.75rem minmax(0, 1fr);
  gap: 1rem;
  align-items: baseline;
}
.steps li::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-sans);
  font-weight: 800;
  font-size: 0.95rem;
  color: var(--accent-ink);
  border-bottom: 2px solid var(--accent);
  padding-bottom: 0.2rem;
}
.steps strong { font-family: var(--font-sans); font-size: 0.98rem; }

/* ---------- Article index rows ---------- */

.article-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  padding-block: 1.75rem;
  border-bottom: 1px solid var(--line);
  text-decoration: none;
  color: inherit;
  transition: background var(--dur) var(--ease-out);
}
@media (min-width: 48em) {
  .article-row { grid-template-columns: 12rem minmax(0, 1fr) auto; align-items: center; gap: 2rem; }
  .article-row--noimg { grid-template-columns: minmax(0, 1fr) auto; }
}
.article-row:hover { background: var(--accent-soft); color: inherit; }

.article-row img {
  width: 100%;
  aspect-ratio: 16 / 10;
  object-fit: cover;
  filter: grayscale(1);
  border: 1px solid var(--line);
  transition: filter var(--dur) var(--ease-out);
}
.article-row:hover img { filter: grayscale(0); }

.article-row .meta { display: block; margin-bottom: 0.5rem; }
.article-row h3 {
  font-size: 1.3rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  transition: color var(--dur) var(--ease-out);
}
.article-row:hover h3 { color: var(--accent-ink); }
.article-row p {
  margin-top: 0.4rem;
  font-size: 0.95rem;
  color: var(--ink-2);
  max-width: 52ch;
}

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

.cta {
  border-block: 1px solid var(--line-strong);
  background: var(--ink);
  color: var(--paper);
  padding-block: clamp(3.5rem, 8vw, 6rem);
}
.cta .section-title { color: var(--paper); max-width: 22ch; font-size: clamp(1.8rem, 3.6vw, 2.75rem); }
.cta p { color: oklch(0.82 0.01 55); margin-top: 1rem; max-width: 52ch; }
.cta .btn { margin-top: 2rem; background: var(--paper); color: var(--ink); border-color: var(--paper); }
.cta .btn:hover { background: var(--accent); border-color: var(--accent); color: var(--paper); }

/* ---------- Footer ---------- */

.footer {
  padding-block: 3rem 3.5rem;
}
.footer__grid {
  display: grid;
  gap: 2rem;
}
@media (min-width: 48em) {
  .footer__grid { grid-template-columns: auto 1fr auto; align-items: start; }
}
.footer nav { display: flex; flex-wrap: wrap; gap: 1.5rem; font-size: 0.9rem; font-weight: 560; }
.footer nav a { text-decoration: none; color: var(--ink-2); }
.footer nav a:hover { color: var(--accent-ink); }
.colophon {
  font-size: 0.8rem;
  color: var(--ink-3);
  line-height: 1.7;
}
@media (min-width: 48em) { .colophon { text-align: right; } }

/* ---------- 404 ---------- */

.err {
  min-height: 70vh;
  display: grid;
  place-content: center;
  gap: 1.25rem;
  text-align: center;
  padding-block: 4rem;
}
.err .display { font-size: clamp(4rem, 14vw, 8rem); }

/* ---------- Motion preferences ---------- */

@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;
  }
  .rise { animation: none; }
}
