/* ═══════════════════════════════════════════════════════════════════
   TOSC — the open source company
   Design system implementing DESIGN.md (warm editorial).
   Binding rules: paper dominates · never pure black · no gradients ·
   no drop shadows · corners 0 (2px on photos only) · circles only for
   the O-ring · transitions never `all` · hover transforms gated behind
   @media (hover:hover) and (pointer:fine).
   ═══════════════════════════════════════════════════════════════════ */

/* ─── 1. Tokens (DESIGN.md §1–§3, exact) ─────────────────────────── */

:root {
  /* color */
  --paper:     #F4EEE6;  /* dominant background */
  --surface:   #FBF7F0;  /* raised cards, pulled quotes */
  --band:      #E4DCD9;  /* full-width alternating bands */
  --ink:       #2C2824;  /* text + structural rules, never pure black */
  --muted:     #6E6257;  /* captions, meta, secondary copy */
  --sage:      #8EABA6;  /* GRAPHIC ONLY: strokes, fills, rings, tags */
  --sage-ink:  #54706B;  /* readable accent: links, italic headline words */
  --sage-tint: #B9CEC7;  /* hover washes, selection, duotone highlight */
  --taupe:     #B0A08F;  /* footnote markers, index numbers, tick marks */
  --hairline:  #D9CFC4;  /* 1px rules/borders */
  --dark:      #222B28;  /* dark sections (infra + footer) */
  --dark-muted:#93A29D;  /* muted text on --dark */

  /* type */
  --font-display: "Fraunces", "Iowan Old Style", Georgia, serif;
  --font-text: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  /* spacing — 8px base */
  --space-1: 8px;
  --space-2: 16px;
  --space-3: 24px;
  --space-4: 32px;
  --space-5: 40px;
  --space-6: 48px;
  --space-8: 64px;
  --space-12: 96px;
  --space-18: 144px;

  /* layout */
  --container: 1280px;
  --gutter: 24px;
  --margin-page: 64px;
  --section-pad: 144px;

  /* motion — global curve, never ease-in on UI */
  --ease: cubic-bezier(0.23, 1, 0.32, 1);
}

/* ─── 2. Reset ───────────────────────────────────────────────────── */

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

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

img,
svg,
video {
  display: block;
  max-width: 100%;
}

img {
  height: auto;
}

ul[role="list"],
ol[role="list"] {
  list-style: none;
}

button,
input,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: 0;
  cursor: pointer;
}

/* ─── 3. Base ────────────────────────────────────────────────────── */

body {
  background-color: var(--paper);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 17px;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: clip;
}

/* paper grain — texture-paper.png at very low opacity over --paper.
   Fixed pseudo-layer under all content (z-index: -1 paints above the
   canvas background, below normal-flow content). Subtle by design. */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  background-image: url("../img/texture-paper.png");
  background-size: 480px;
  background-repeat: repeat;
  opacity: 0.04;
  pointer-events: none;
}

::selection {
  background: var(--sage-tint);
  color: var(--ink);
  text-shadow: none;
}

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

a {
  color: var(--sage-ink);
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

p + p {
  margin-top: var(--space-3);
}

strong {
  font-weight: 600;
}

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

.skip-link {
  position: absolute;
  top: var(--space-2);
  left: var(--space-2);
  z-index: 400;
  padding: 10px 18px;
  background: var(--ink);
  color: var(--paper);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  transform: translateY(-300%);
  transition: transform 250ms var(--ease);
}

.skip-link:focus-visible {
  transform: translateY(0);
}

/* ─── 4. Typography (DESIGN.md §2) ─────────────────────────────────
   Display: Fraunces, lowercase, SOFT 100 / WONK 0, one italic
   sage-ink word per headline (.accent). Text: Schibsted Grotesk.   */

.display-hero,
.title-2,
.title-3 {
  font-family: var(--font-display);
  font-variation-settings: "wght" 480, "SOFT" 100, "WONK" 0;
  font-weight: 480;
  text-transform: lowercase;
  hyphens: auto;
  text-wrap: pretty;
}

.display-hero {
  font-size: clamp(44px, 7.5vw, 104px);
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.title-2 {
  font-size: clamp(34px, 4.2vw, 60px);
  line-height: 1.06;
  letter-spacing: -0.01em;
}

.title-3 {
  font-variation-settings: "wght" 500, "SOFT" 100, "WONK" 0;
  font-weight: 500;
  font-size: 28px;
  line-height: 1.18;
}

/* the brand's smile — exactly one per major headline */
.accent {
  font-style: italic;
  color: var(--sage-ink);
}

.lead {
  font-size: 20px;
  line-height: 1.5;
}

.caption,
.footnote {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
  font-feature-settings: "tnum";
}

.eyebrow--sage {
  color: var(--sage-ink);
}

/* tabular numerals for stats, index numbers, data */
.stat__value,
.card__index,
.tnum {
  font-feature-settings: "tnum";
}

/* ─── 5. Layout (DESIGN.md §3) ───────────────────────────────────── */

.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--margin-page);
}

.grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
}

/* spans via grid-column-end so .col-start-* can set the start line
   independently (start:6 + end:span 7 → tracks 6–12) */
.col-3 { grid-column-end: span 3; }
.col-4 { grid-column-end: span 4; }
.col-5 { grid-column-end: span 5; }
.col-6 { grid-column-end: span 6; }
.col-7 { grid-column-end: span 7; }
.col-8 { grid-column-end: span 8; }

.col-start-5 { grid-column-start: 5; }
.col-start-6 { grid-column-start: 6; }
.col-start-7 { grid-column-start: 7; }
.col-start-9 { grid-column-start: 9; }

.section {
  padding-block: var(--section-pad);
}

.band {
  background-color: var(--band);
}

/* reading column 640–680px */
.measure {
  max-width: 660px;
}

/* hairline ledger rules; structural breaks may use ink */
.rule {
  border: 0;
  border-top: 1px solid var(--hairline);
}

.rule--ink {
  border-top-color: var(--ink);
}

/* short tick rule above section titles */
.tick {
  display: block;
  width: 24px;
  height: 2px;
  background-color: var(--sage);
}

/* section head pattern: eyebrow → tick → title */
.section-head > * + * {
  margin-top: var(--space-3);
}

/* sticky left column (manifesto layout) */
@media (min-width: 768px) {
  .sticky-col {
    position: sticky;
    top: 120px;
    align-self: start;
  }
}

/* ─── dark sections (infra band, footer) ───────────────────────────
   text --paper, muted #93A29D; --sage MAY be text here.            */

.dark {
  background-color: var(--dark);
  color: var(--paper);
  --muted: var(--dark-muted);
  --hairline: color-mix(in srgb, var(--paper) 16%, transparent);
}

.dark .eyebrow {
  color: var(--sage);
}

.dark a {
  color: var(--sage);
}

.dark .accent {
  color: var(--sage);
}

.dark .btn {
  background-color: var(--paper);
  color: var(--dark);
}

/* ─── 6. Components (DESIGN.md §6) ───────────────────────────────── */

/* · buttons — square ink button, arrow translates on hover,
     :active scale(0.97) at 160ms ease-out · */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 16px 28px;
  background-color: var(--ink);
  color: var(--paper);
  border-radius: 0;
  font-size: 16px;
  font-weight: 600;
  line-height: 1;
  text-decoration: none;
  transition: transform 160ms ease-out, background-color 250ms var(--ease);
}

.btn__arrow {
  display: inline-block;
  transition: transform 250ms var(--ease);
}

.btn:active {
  transform: scale(0.97);
}

.btn--small {
  padding: 10px 18px;
  font-size: 14px;
}

/* · secondary link — sage-ink, underline draws scaleX 300ms from left · */
.link-arrow {
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  color: var(--sage-ink);
  font-weight: 500;
  text-decoration: none;
  padding-bottom: 3px;
}

.link-arrow::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease);
}

.link-arrow__arrow {
  display: inline-block;
  transition: transform 250ms var(--ease);
}

.dark .link-arrow {
  color: var(--sage);
}

/* · tags — sage-tint fill, sage-ink text, 12px caps · */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  list-style: none;
}

.tag {
  display: inline-block;
  padding: 4px 10px;
  background-color: var(--sage-tint);
  color: var(--sage-ink);
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  line-height: 1.4;
  border-radius: 0;
}

/* · card — 1px top rule, index, image exhibit, Fraunces title,
     muted line, taupe tags · */
.card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
  transition: transform 500ms var(--ease);
}

.card--ink {
  border-top-color: var(--ink);
}

.card__index {
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--taupe);
}

.card__frame {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  background-color: var(--surface);
}

.card__frame img {
  width: 100%;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  transition: transform 500ms var(--ease);
}

.card__title {
  margin-top: var(--space-1);
}

.card__title a {
  position: relative;
  display: inline-block;
  color: inherit;
  text-decoration: none;
}

.card__title a::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: -2px;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease);
}

.card__text {
  color: var(--muted);
}

.card .tags {
  margin-top: auto;
  padding-top: var(--space-1);
}

/* · stat — tabular numeral 64px + 13px caps label · */
.stat__value {
  display: block;
  font-family: var(--font-display);
  font-variation-settings: "wght" 500, "SOFT" 100, "WONK" 0;
  font-weight: 500;
  font-size: clamp(44px, 5vw, 64px);
  line-height: 1.05;
}

.stat__label {
  display: block;
  margin-top: var(--space-1);
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}

/* · footnote strip — hairline-top row of ①②③ items, 13px muted · */
.footnote-strip {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
}

.footnote-strip__item {
  font-size: 13px;
  line-height: 1.5;
  color: var(--muted);
}

.footnote-strip__marker {
  color: var(--taupe);
  margin-right: 6px;
}

/* · exhibit — image with 2px radius, hairline frame, mono-caps caption · */
.exhibit__frame {
  border: 1px solid var(--hairline);
  border-radius: 2px;
  overflow: hidden;
  background-color: var(--surface);
}

.exhibit__frame img {
  width: 100%;
}

.exhibit figcaption {
  margin-top: var(--space-2);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
  font-feature-settings: "tnum";
}

/* ─── 7. O-ring — the logo's circular-arrow "o" (DESIGN.md §4.1) ───
   One inline <symbol id="o-ring"> in base-template.html, referenced
   via <use>. currentColor stroke → recolor via `color`.            */

/* .o-ring is applied directly on the <svg> element */
.o-ring {
  display: inline-block;
  width: 48px;
  height: 48px;
  color: var(--sage);
  flex: none;
  overflow: visible;
}

/* decorative watermark instance at ~30% opacity */
.o-ring--watermark {
  opacity: 0.3;
}

/* slowly rotating stamp — 40s linear */
.o-ring--spin {
  animation: o-ring-spin 40s linear infinite;
}

@keyframes o-ring-spin {
  to { transform: rotate(360deg); }
}

/* draw-on: stroke-dashoffset 1100ms on first view (JS adds .is-drawn).
   pathLength="100" is set on the symbol path; --o-dash is consumed by
   the symbol's path and inherits into the <use> shadow tree — where
   unsupported it falls back to 0 (fully drawn, graceful). */
#o-ring path {
  stroke-dasharray: 100;
  stroke-dashoffset: var(--o-dash, 0);
  transition: stroke-dashoffset 1100ms var(--ease);
}

.o-ring--draw {
  --o-dash: 100;
}

.o-ring--draw.is-drawn {
  --o-dash: 0;
}

/* inline living-o glyph inside the homepage hero H1 */
.living-o {
  white-space: nowrap;
}

.o-glyph {
  display: inline-block;
  width: 0.78em;
  height: 0.78em;
  vertical-align: -0.1em;
  margin-inline: 0.015em;
  color: var(--sage);
  will-change: transform;
}

/* ─── 8. Header ──────────────────────────────────────────────────── */

.site-header {
  position: sticky;
  top: 0;
  z-index: 250; /* above .nav-overlay (200) so the toggle stays reachable */
  background-color: color-mix(in srgb, var(--paper) 88%, transparent);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--hairline);
}

/* overlay open: header chrome disappears, logo + toggle float above it */
body.nav-open .site-header {
  background-color: transparent;
  border-bottom-color: transparent;
  -webkit-backdrop-filter: none;
  backdrop-filter: none;
}

.site-header__inner {
  display: flex;
  align-items: center;
  gap: var(--space-5);
  height: 76px;
}

.site-header__logo {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.site-header__logo img {
  height: 34px;
  width: auto;
}

/* numbered text nav */
.site-nav {
  display: flex;
  align-items: center;
  gap: var(--space-4);
  margin-left: auto;
}

.nav-link {
  position: relative;
  display: inline-flex;
  align-items: baseline;
  gap: 7px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  padding-block: 6px;
}

.nav-link__num {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.08em;
  color: var(--taupe);
  font-feature-settings: "tnum";
}

.nav-link::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease);
}

/* active page: sage-ink + underline */
.nav-link[aria-current="page"] {
  color: var(--sage-ink);
}

.nav-link[aria-current="page"]::after {
  transform: scaleX(1);
}

.site-header__cta {
  flex: none;
}

/* hamburger — visible < 900px only */
.nav-toggle {
  display: none;
  position: relative;
  z-index: 300;
  width: 44px;
  height: 44px;
  margin-left: auto;
  flex: none;
}

.nav-toggle__bar {
  position: absolute;
  left: 10px;
  top: 21px;
  width: 24px;
  height: 2px;
  background-color: var(--ink);
  transition: transform 300ms var(--ease);
}

.nav-toggle__bar:nth-child(1) { transform: translateY(-4px); }
.nav-toggle__bar:nth-child(2) { transform: translateY(4px); }

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(1) {
  transform: rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle__bar:nth-child(2) {
  transform: rotate(-45deg);
}

/* full-screen overlay menu */
.nav-overlay {
  position: fixed;
  inset: 0;
  z-index: 200;
  background-color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: var(--space-12) var(--margin-page);
  opacity: 0;
  visibility: hidden;
  transition: opacity 300ms var(--ease), visibility 0s linear 300ms;
}

.nav-overlay.is-open {
  opacity: 1;
  visibility: visible;
  transition: opacity 300ms var(--ease);
}

.nav-overlay__links {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  list-style: none;
}

.nav-overlay__link {
  display: inline-flex;
  align-items: baseline;
  gap: var(--space-2);
  font-family: var(--font-display);
  font-variation-settings: "wght" 480, "SOFT" 100, "WONK" 0;
  font-weight: 480;
  font-size: clamp(34px, 8vw, 56px);
  line-height: 1.15;
  text-transform: lowercase;
  color: var(--ink);
  text-decoration: none;
  opacity: 0;
  transform: translateY(18px);
}

.nav-overlay__link .nav-link__num {
  font-family: var(--font-text);
  font-size: 13px;
}

.nav-overlay__link[aria-current="page"] {
  color: var(--sage-ink);
}

/* staggered fade-rise, 50ms steps via --nav-d set inline */
.nav-overlay.is-open .nav-overlay__link {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms var(--ease) var(--nav-d, 0ms),
              transform 500ms var(--ease) var(--nav-d, 0ms);
}

.nav-overlay__sub {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-3);
  margin-top: var(--space-5);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
  list-style: none;
}

.nav-overlay__sub a {
  font-size: 15px;
  font-weight: 500;
  color: var(--muted);
  text-decoration: none;
}

body.nav-open {
  overflow: hidden;
}

/* ─── 9. Footer ──────────────────────────────────────────────────── */

.site-footer {
  position: relative;
  overflow: hidden;
  background-color: var(--dark);
  color: var(--paper);
  padding-block: var(--space-12) var(--space-5);
}

.site-footer__wordmark {
  display: block;
  margin-bottom: var(--space-8);
}

.site-footer__wordmark img {
  height: clamp(56px, 9vw, 110px);
  width: auto;
  opacity: 0.9;
}

.site-footer__grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: var(--gutter);
  padding-bottom: var(--space-8);
}

.site-footer__contact {
  grid-column: span 5;
}

.site-footer__contact a {
  color: var(--paper);
  text-decoration-color: color-mix(in srgb, var(--paper) 40%, transparent);
}

.site-footer__heading {
  display: block;
  margin-bottom: var(--space-2);
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--sage);
}

.site-footer__grid > nav {
  grid-column: span 3;
}

.site-footer__nav {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.site-footer__nav a {
  color: var(--dark-muted);
  font-size: 15px;
  text-decoration: none;
  transition: color 250ms var(--ease);
}

/* decorative slowly rotating O-ring stamp */
.site-footer__stamp {
  position: absolute;
  right: -40px;
  bottom: -40px;
  width: 220px;
  height: 220px;
  color: var(--sage);
  opacity: 0.3;
  pointer-events: none;
}

.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-2) var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid color-mix(in srgb, var(--paper) 16%, transparent);
  font-size: 13px;
  color: var(--dark-muted);
}

/* ─── 10. Hero (reference layout) ────────────────────────────────── */

.hero {
  padding-block: var(--space-12) var(--space-8);
}

.hero .eyebrow {
  margin-bottom: var(--space-4);
}

.hero .display-hero {
  max-width: 12ch;
}

.hero .lead {
  max-width: 560px;
  margin-top: var(--space-4);
  color: var(--muted);
}

.hero__cta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-3) var(--space-4);
  margin-top: var(--space-5);
}

.hero .footnote-strip {
  margin-top: var(--space-12);
}

/* ─── 11. Motion — reveal engine (DESIGN.md §5, binding) ───────────
   JS (main.js) drives all three via IntersectionObserver @15%, once.
   Three-state pattern: hidden → .is-in (transition runs) → .is-done
   (transition rules drop, natural styles, hover stays pristine).    */

/* masked line reveal — JS wraps each visual line:
   .reveal-mask (overflow hidden, block) > .reveal-line (translateY) */
.reveal-mask {
  display: block;
  overflow: hidden;
}

.reveal-line {
  display: block;
  transform: translateY(110%);
  transition: transform 650ms var(--ease);
  transition-delay: var(--reveal-d, 0ms);
}

/* will-change only while the reveal is pending/active — dropped once
   JS adds .is-done (finishReveal) so headlines don't stay composited */
[data-reveal]:not(.is-done) .reveal-line {
  will-change: transform;
}

[data-reveal].is-in .reveal-line {
  transform: translateY(0);
}

/* group fade-rise — children rise 18px, 600ms, 50ms stagger (≤8) */
[data-rise]:not(.is-in):not(.is-done) > * {
  opacity: 0;
  transform: translateY(18px);
}

[data-rise].is-in > * {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 600ms var(--ease) var(--rise-d, 0ms),
              transform 600ms var(--ease) var(--rise-d, 0ms);
}

/* image reveal — clip-path inset bottom→full, 900ms */
[data-clip]:not(.is-in):not(.is-done) {
  clip-path: inset(0 0 100% 0);
}

[data-clip].is-in {
  clip-path: inset(0 0 0 0);
  transition: clip-path 900ms var(--ease);
}

/* cursor ring — homepage only ([data-cursor] on <body>), pointer:fine.
   JS springs position (stiffness 150, damping 20) and lerps scale:
   40px box at scale 0.3 → 12px ring; scale 1 over links → 40px. */
.cursor-ring {
  position: fixed;
  top: 0;
  left: 0;
  z-index: 9000;
  width: 40px;
  height: 40px;
  border: 2px solid var(--sage);
  border-radius: 50%;
  pointer-events: none;
  opacity: 0;
  transition: opacity 250ms var(--ease);
  will-change: transform;
}

.cursor-ring.is-visible {
  opacity: 1;
}

/* ─── 12. Hover — ALL hover transforms gated (DESIGN.md §5) ──────── */

@media (hover: hover) and (pointer: fine) {
  .btn:hover .btn__arrow {
    transform: translateX(4px);
  }

  .link-arrow:hover::after {
    transform: scaleX(1);
  }

  .link-arrow:hover .link-arrow__arrow {
    transform: translateX(4px);
  }

  .nav-link:hover::after {
    transform: scaleX(1);
  }

  .card:hover {
    transform: translateY(-4px);
  }

  .card:hover .card__frame img {
    transform: scale(1.03);
  }

  .card:hover .card__title a::after {
    transform: scaleX(1);
  }

  .site-footer__nav a:hover {
    color: var(--paper);
  }
}

/* ─── 13. Reduced motion — reveals collapse to 200ms opacity fades ─ */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  [data-rise]:not(.is-in):not(.is-done) > * {
    transform: none;
  }

  [data-rise].is-in > * {
    transition: opacity 200ms ease-out;
  }

  [data-clip]:not(.is-in):not(.is-done) {
    clip-path: none;
    opacity: 0;
  }

  [data-clip].is-in {
    transition: opacity 200ms ease-out;
  }

  .reveal-line {
    transform: none;
    transition: opacity 200ms ease-out;
  }

  .o-ring--spin {
    animation: none;
  }

  .o-ring--draw,
  .o-ring--draw.is-drawn {
    --o-dash: 0;
  }

  #o-ring path {
    transition: none;
  }

  .cursor-ring {
    display: none;
  }

  /* no hover/press movement either — transitions off; underline
     pseudo-elements keep their scaleX rest/hover states (snap, no
     animation); opacity fades above stay untouched */
  .btn,
  .btn__arrow,
  .link-arrow__arrow,
  .card,
  .card__frame img,
  .link-arrow::after,
  .nav-link::after,
  .site-footer__nav a,
  .card__title a::after,
  .contact-mail::after {
    transition: none;
  }

  .btn:active,
  .btn:hover .btn__arrow,
  .link-arrow:hover .link-arrow__arrow,
  .card:hover,
  .card:hover .card__frame img {
    transform: none;
  }
}

/* ─── 14. Responsive ─────────────────────────────────────────────── */

@media (max-width: 899px) {
  .site-nav,
  .site-header__cta {
    display: none;
  }

  .nav-toggle {
    display: block;
  }
}

@media (min-width: 900px) {
  .nav-overlay {
    display: none;
  }
}

@media (max-width: 767px) {
  :root {
    --margin-page: 20px;
    --section-pad: 80px;
  }

  .grid > [class*="col-"] {
    grid-column: 1 / -1;
  }

  .site-footer__grid > * {
    grid-column: 1 / -1;
  }

  .hero {
    padding-block: var(--space-8) var(--space-6);
  }

  .hero .footnote-strip {
    margin-top: var(--space-8);
  }
}

/* ─── 15. Contact page — form + contact block (contact.html) ───────
   Hairline-bottom inputs on paper, 11.5px caps taupe labels, square
   ink submit (.btn). Invalid fields: ink underline + box-shadow tick
   (no layout shift); the palette has no error red by design.        */

.form__row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  column-gap: var(--space-4);
}

.field {
  display: flex;
  flex-direction: column;
  gap: var(--space-1);
  margin-bottom: var(--space-4);
}

.field__label {
  font-size: 11.5px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--taupe);
}

.field__input {
  width: 100%;
  padding: 10px 0;
  background-color: transparent;
  border: 0;
  border-bottom: 1px solid var(--hairline);
  border-radius: 0;
  color: var(--ink);
  transition: border-color 250ms var(--ease), box-shadow 250ms var(--ease);
}

textarea.field__input {
  min-height: 140px;
  resize: vertical;
}

.field__input:focus-visible {
  border-bottom-color: var(--sage-ink);
}

.field--invalid .field__input {
  border-bottom-color: var(--ink);
  box-shadow: 0 1px 0 var(--ink);
}

.form__note {
  margin-bottom: var(--space-3);
  font-size: 13px;
  line-height: 1.5;
  color: var(--sage-ink);
}

/* success state — the page script swaps the form for this block;
   the .o-ring--draw inside is already observed by main.js, so the
   draw-on fires as soon as [hidden] is removed and it intersects */
.form-success .o-ring {
  width: 88px;
  height: 88px;
  margin-bottom: var(--space-3);
}

/* contact block — sticky right column, ledger hairlines */
.contact-block__item + .contact-block__item {
  margin-top: var(--space-4);
  padding-top: var(--space-4);
  border-top: 1px solid var(--hairline);
}

.contact-block__item .eyebrow {
  margin-bottom: var(--space-1);
}

.contact-block .footnote-strip {
  margin-top: var(--space-4);
}

/* big Fraunces mail link, underline draws in on hover */
.contact-mail {
  position: relative;
  display: inline-block;
  padding-bottom: 3px;
  font-family: var(--font-display);
  font-variation-settings: "wght" 500, "SOFT" 100, "WONK" 0;
  font-weight: 500;
  font-size: clamp(28px, 3vw, 40px);
  line-height: 1.15;
  color: var(--sage-ink);
  text-decoration: none;
}

.contact-mail::after {
  content: "";
  position: absolute;
  left: 0;
  bottom: 0;
  width: 100%;
  height: 1px;
  background-color: currentColor;
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 300ms var(--ease);
}

/* compact hero → the form section follows without extra top padding */
.section--contact {
  padding-top: 0;
}

.section--contact .rule {
  margin-bottom: var(--space-6);
}

@media (hover: hover) and (pointer: fine) {
  .contact-mail:hover::after {
    transform: scaleX(1);
  }
}

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