/* ═══════════════════════════════════════════════
   SONILABS — cobalt on paper, dithered matter
   ═══════════════════════════════════════════════ */

:root {
  --paper: #e8e9e4;
  --paper-dim: #dfe0da;
  --cobalt: #1b2ee6;
  --cobalt-deep: #0e1a8c;
  --ink: #101010;
  --white: #f4f5f1;

  transition: color 0.5s;

  --font-serif: "Instrument Serif", Georgia, serif;
  --font-mono: "IBM Plex Mono", "Courier New", monospace;

  --gutter: clamp(1.25rem, 4vw, 4rem);
}

/* ── Themes ────────────────────────────────────── */
:root[data-theme="black"]  { --cobalt: #141414; --cobalt-deep: #000000; }
:root[data-theme="red"]    { --cobalt: #e02412; --cobalt-deep: #8f0e05; }
:root[data-theme="orange"] { --cobalt: #f04e0c; --cobalt-deep: #96300a; }
:root[data-theme="yellow"] { --cobalt: #e0a400; --cobalt-deep: #8a6400; }

body, .section--cobalt, .caps__row, .work__frame, .process__step,
.contact__cta, .marquee, .preloader, .detail, .plate {
  transition: background-color 0.5s, color 0.5s, border-color 0.5s;
}

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

html { scrollbar-width: thin; scrollbar-color: var(--cobalt) var(--paper); }
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }

body {
  background: var(--paper);
  color: var(--cobalt);
  font-family: var(--font-serif);
  overflow-x: hidden;
  cursor: none;
}

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

.mono {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.serif { font-family: var(--font-serif); font-weight: 400; }

a { color: inherit; text-decoration: none; }
em { font-style: italic; }

/* ── WebGL canvas ──────────────────────────────── */
#gl {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  height: 100lvh; /* large-viewport unit: doesn't jump when the mobile URL bar collapses */
  z-index: 0;
  pointer-events: none;
}

/* sections that let the particle field show through */
.section--glass { position: relative; z-index: 1; background: transparent; }
/* opaque sections that cover the field */
main section:not(.section--glass) { position: relative; z-index: 2; }

/* ── Preloader ─────────────────────────────────── */
.preloader {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: var(--cobalt);
  color: var(--paper);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: var(--gutter);
}
.preloader__row { display: flex; justify-content: space-between; }
.preloader__bar {
  height: 1px;
  background: rgba(244, 245, 241, 0.25);
  position: relative;
  overflow: visible;
}
.preloader__bar span {
  position: absolute;
  left: 0; top: -1px;
  height: 3px;
  width: 0%;
  background: var(--paper);
}
#preloader-count { font-size: clamp(3rem, 10vw, 8rem); letter-spacing: 0; font-weight: 400; }

/* ── Cursor ────────────────────────────────────── */
.cursor {
  position: fixed;
  top: 0; left: 0;
  z-index: 99;
  pointer-events: none;
  mix-blend-mode: normal;
}
.cursor__dot {
  position: absolute;
  width: 10px; height: 10px;
  background: var(--cobalt);
  transform: translate(-50%, -50%);
  transition: width 0.25s, height 0.25s, background 0.25s;
}
.cursor.is-active .cursor__dot { width: 4px; height: 4px; }
.cursor__label {
  position: absolute;
  left: 16px; top: 8px;
  white-space: nowrap;
  background: var(--cobalt);
  color: var(--paper);
  padding: 0.3em 0.6em;
  opacity: 0;
  transform: translateY(4px);
  transition: opacity 0.2s, transform 0.2s;
}
.cursor.is-active .cursor__label { opacity: 1; transform: translateY(0); }
@media (hover: none) {
  .cursor { display: none; }
  body { cursor: auto; }
}

/* ── Nav ───────────────────────────────────────── */
.nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.4rem var(--gutter);
  mix-blend-mode: multiply;
}
.nav__center { opacity: 0.55; }
.nav__right { display: flex; align-items: center; gap: 1.4rem; }
@media (max-width: 640px) { .nav__center { display: none; } }

/* ── Theme slider ──────────────────────────────── */
.theme-slider { pointer-events: auto; }
.theme-slider__track {
  position: relative;
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 6px 4px;
  cursor: none;
  touch-action: none;
}
.theme-slider__track::before {
  content: "";
  position: absolute;
  left: 4px; right: 4px;
  top: 50%;
  height: 1px;
  background: var(--cobalt);
  opacity: 0.4;
}
.theme-dot {
  position: relative;
  width: 8px; height: 8px;
  border: none;
  padding: 0;
  background: var(--dot);
  cursor: none;
  flex: none;
}
.theme-dot:focus-visible { outline: 1px solid var(--cobalt); outline-offset: 3px; }
.theme-knob {
  position: absolute;
  top: 50%;
  width: 14px; height: 14px;
  border: 1px solid var(--cobalt);
  background: var(--paper);
  transform: translate(-50%, -50%) rotate(45deg);
  pointer-events: none;
  transition: border-color 0.5s;
}

/* ── Section labels ────────────────────────────── */
.sec-label {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin-bottom: clamp(2rem, 5vh, 4rem);
}
.sec-label span {
  border: 1px solid currentColor;
  padding: 0.25em 0.5em;
}
.sec-label::after {
  content: "";
  flex: 1;
  height: 1px;
  background: currentColor;
  opacity: 0.3;
}

/* ── 01 Hero ───────────────────────────────────── */
.hero {
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: var(--gutter);
  gap: 2rem;
}
.hero__kicker { opacity: 0.7; }
.hero__title {
  font-size: clamp(3rem, 11vw, 9.5rem);
  line-height: 0.98;
  font-weight: 400;
  letter-spacing: -0.02em;
}
.hero__title .line { display: block; overflow: hidden; }
.hero__title sup {
  font-size: 0.32em;
  vertical-align: 1.1em;
  letter-spacing: 0;
  margin-right: 0.08em;
}
.hero__foot {
  position: absolute;
  bottom: 1.4rem;
  left: var(--gutter);
  right: var(--gutter);
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}
.hero__scroll { animation: bob 2.2s ease-in-out infinite; }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(6px); } }
@media (max-width: 640px) { .hero__foot span:first-child { display: none; } }

/* ── 02 Manifesto ──────────────────────────────── */
.manifesto {
  background: var(--paper);
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
  text-align: center;
}
.manifesto__horse {
  max-width: min(460px, 70vw);
  margin: 0 auto clamp(3rem, 7vh, 5rem);
}
.manifesto__horse img {
  width: 100%;
  display: block;
  image-rendering: pixelated;
}
.manifesto__horse figcaption { margin-top: 0.9rem; opacity: 0.6; }
.manifesto__text {
  font-size: clamp(2.2rem, 6.5vw, 5.5rem);
  line-height: 1.05;
  font-weight: 400;
  max-width: 18ch;
  margin: 0 auto;
  letter-spacing: -0.01em;
}
.manifesto__text sup {
  font-size: 0.34em;
  vertical-align: 1.15em;
  margin-right: 0.05em;
}
.manifesto__text .w { display: inline-block; }

/* ── 03 Signal / Noise ─────────────────────────── */
.section--cobalt { background: var(--cobalt); color: var(--paper); }
.signal {
  padding: clamp(3rem, 7vh, 5rem) var(--gutter);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  gap: 2rem;
}
.signal__head {
  display: flex;
  justify-content: space-between;
}
.signal__panels {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  /* definite rows so canvas height:100% resolves against a fixed box
     instead of the canvas's own (growing) buffer — prevents a
     ResizeObserver feedback loop that ran the canvas to 33M px.
     grid-auto-rows (not grid-template-rows) so it governs BOTH the
     desktop single row and the mobile stacked-panel rows. */
  grid-auto-rows: minmax(0, 1fr);
  gap: clamp(2rem, 8vw, 8rem);
  min-height: 60vh;
}
.signal__panel { position: relative; min-height: 0; overflow: hidden; }
.signal__panel canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}
.signal__side {
  position: absolute;
  top: 0;
  writing-mode: vertical-rl;
  letter-spacing: 0.35em;
}
.signal__side--l { right: -2.2em; }
.signal__side--r { left: -2.2em; }
.signal__foot { text-align: center; opacity: 0.65; }
@media (max-width: 700px) {
  .signal { min-height: auto; }
  /* stacked: two definite rows, each a real panel height */
  .signal__panels {
    grid-template-columns: 1fr;
    grid-auto-rows: 42vh;
    gap: 2rem;
  }
  .signal__side { display: none; }
}

/* ── 04 Capabilities ───────────────────────────── */
.caps {
  background: var(--paper);
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.caps__list { list-style: none; border-top: 1px solid var(--cobalt); }
.caps__row {
  display: grid;
  grid-template-columns: 4rem 1fr auto;
  align-items: baseline;
  gap: 1.5rem;
  padding: clamp(1.2rem, 3vh, 2rem) 0.75rem;
  border-bottom: 1px solid var(--cobalt);
  position: relative;
  overflow: hidden;
  transition: color 0.35s;
}
.caps__row::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cobalt);
  transform: scaleY(0);
  transform-origin: bottom;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.caps__row:hover { color: var(--paper); }
.caps__row:hover::before { transform: scaleY(1); }
.caps__name {
  font-size: clamp(1.8rem, 5vw, 4rem);
  font-weight: 400;
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
}
.caps__row:hover .caps__name { transform: translateX(1.5rem); }
.caps__tag { opacity: 0.65; }
@media (max-width: 640px) {
  .caps__row { grid-template-columns: 2.5rem 1fr; }
  .caps__tag { display: none; }
}

/* ── Marquee ───────────────────────────────────── */
.marquee {
  position: relative;
  z-index: 2;
  background: var(--paper);
  border-top: 1px solid var(--cobalt);
  border-bottom: 1px solid var(--cobalt);
  overflow: hidden;
  padding: 0.9rem 0;
}
.marquee__track {
  display: flex;
  white-space: nowrap;
  will-change: transform;
  font-size: 0.85rem;
}

/* ── 05 Morph ──────────────────────────────────── */
.morph { height: 100vh; }
.morph__stage {
  height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  gap: 1.2rem;
  padding: var(--gutter);
}
.morph .sec-label { width: min(560px, 80vw); }
.morph__caption {
  font-size: clamp(4rem, 13vw, 11rem);
  line-height: 1;
  letter-spacing: -0.02em;
}
.morph__index { opacity: 0.7; }
.morph__hint {
  position: absolute;
  bottom: 1.4rem;
  opacity: 0.55;
}

/* ── 06 Works ──────────────────────────────────── */
.works {
  background: var(--paper);
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.works__grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: clamp(2rem, 5vw, 5rem) clamp(2rem, 5vw, 4rem);
}
.work:nth-child(even) { transform: translateY(clamp(2rem, 6vh, 5rem)); }
.work__frame {
  border: 1px solid var(--cobalt);
  aspect-ratio: 4 / 5;
  overflow: hidden;
  position: relative;
  background: var(--cobalt);
}
.work__canvas {
  width: 100%;
  height: 100%;
  display: block;
  transition: transform 0.6s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.work:hover .work__canvas { transform: scale(1.045); }
.work__meta {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-top: 1rem;
  gap: 1rem;
}
.work__meta h3 { font-size: clamp(1.6rem, 3.4vw, 2.6rem); font-weight: 400; }
.work__meta .mono { opacity: 0.65; text-align: right; }
@media (max-width: 700px) {
  .works__grid { grid-template-columns: 1fr; }
  .work:nth-child(even) { transform: none; }
}

/* ── 07 Numbers ────────────────────────────────── */
.numbers {
  min-height: 90vh;
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
  display: flex;
  flex-direction: column;
  justify-content: center;
}
.numbers__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2rem;
  text-align: center;
}
.num { display: flex; flex-direction: column; gap: 0.6rem; }
.num__val {
  font-size: clamp(4rem, 9vw, 8.5rem);
  line-height: 1;
}
.num__unit { opacity: 0.7; }
@media (max-width: 800px) { .numbers__grid { grid-template-columns: repeat(2, 1fr); row-gap: 3.5rem; } }

/* ── 08 Words ──────────────────────────────────── */
.words {
  min-height: 100vh;
  padding: clamp(3rem, 7vh, 5rem) var(--gutter);
  display: flex;
  flex-direction: column;
  position: relative;
  overflow: hidden;
}
.sec-label--light { color: var(--paper); }
.words__grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  align-content: space-evenly;
  gap: 1.2rem 0.5rem;
  opacity: 0.85;
}
.words__grid span {
  font-size: 0.68rem;
  letter-spacing: 0.12em;
  white-space: nowrap;
}
.words__grid span.dim { opacity: 0.28; }
.words__claim {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  font-size: clamp(2.8rem, 8vw, 7rem);
  line-height: 1;
  padding: var(--gutter);
  pointer-events: none;
  text-shadow: 0 0 30px var(--cobalt-deep);
}
@media (max-width: 700px) { .words__grid { grid-template-columns: repeat(3, 1fr); } }

/* ── 09 Process ────────────────────────────────── */
.process {
  background: var(--paper);
  padding: clamp(5rem, 12vh, 9rem) var(--gutter);
}
.process__list {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  border: 1px solid var(--cobalt);
}
.process__step {
  padding: clamp(1.5rem, 3vw, 2.5rem);
  border-right: 1px solid var(--cobalt);
  display: flex;
  flex-direction: column;
  gap: 1.2rem;
  min-height: clamp(16rem, 34vh, 22rem);
  transition: background 0.35s, color 0.35s;
}
.process__step:last-child { border-right: 0; }
.process__step:hover { background: var(--cobalt); color: var(--paper); }
.process__step h3 { font-size: clamp(2.2rem, 4.5vw, 3.6rem); flex: 1; }
.process__step p { opacity: 0.65; }
@media (max-width: 800px) {
  .process__list { grid-template-columns: 1fr 1fr; }
  .process__step { border-bottom: 1px solid var(--cobalt); min-height: 12rem; }
  .process__step:nth-child(2n) { border-right: 0; }
  .process__step:nth-child(n+3) { border-bottom: 0; }
}

/* ── 10 Contact ────────────────────────────────── */
.contact {
  min-height: 100vh;
  padding: clamp(5rem, 12vh, 8rem) var(--gutter) 1.4rem;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 2.5rem;
}
.contact .sec-label { width: min(560px, 80vw); }
.contact__title {
  font-size: clamp(3rem, 10vw, 8.5rem);
  line-height: 0.98;
  letter-spacing: -0.02em;
  font-weight: 400;
}
.contact__title .line { display: block; overflow: hidden; }
.contact__cta {
  display: inline-block;
  border: 1px solid var(--cobalt);
  padding: 1.1em 2.2em;
  font-size: 0.85rem;
  position: relative;
  overflow: hidden;
  transition: color 0.35s;
  will-change: transform;
}
.contact__cta::before {
  content: "";
  position: absolute;
  inset: 0;
  background: var(--cobalt);
  transform: translateY(101%);
  transition: transform 0.4s cubic-bezier(0.65, 0, 0.35, 1);
  z-index: -1;
}
.contact__cta:hover { color: var(--paper); }
.contact__cta:hover::before { transform: translateY(0); }
.footer {
  margin-top: auto;
  width: 100%;
  display: flex;
  justify-content: space-between;
  padding-top: 4rem;
  opacity: 0.75;
}
@media (max-width: 640px) { .footer span:nth-child(3) { display: none; } }

/* ── Dither mask (theme-reactive horse) ────────── */
.dither-mask {
  width: 100%;
  background: var(--cobalt);
  -webkit-mask-repeat: no-repeat;
  mask-repeat: no-repeat;
  -webkit-mask-size: 100% 100%;
  mask-size: 100% 100%;
  transition: background-color 0.5s;
}

/* ── Work detail overlay ───────────────────────── */
.detail {
  position: fixed;
  inset: 0;
  z-index: 40; /* below the nav so the theme slider stays usable */
  background: var(--paper);
  display: grid;
  grid-template-columns: 1fr minmax(320px, 30rem);
  transform: translateY(100%);
  visibility: hidden;
  transition:
    transform 0.85s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s linear 0.85s,
    background-color 0.5s;
}
.detail.is-open {
  visibility: visible;
  transform: translateY(0);
  transition:
    transform 0.85s cubic-bezier(0.76, 0, 0.24, 1),
    visibility 0s,
    background-color 0.5s;
}
.detail__left {
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: calc(3.2rem + var(--gutter)) var(--gutter) var(--gutter);
  display: flex;
  flex-direction: column;
  gap: clamp(2rem, 5vh, 4rem);
  scrollbar-width: thin;
  scrollbar-color: var(--cobalt) var(--paper);
}
.detail__right {
  border-left: 1px solid var(--cobalt);
  padding: calc(3.2rem + 1.5rem) clamp(1.5rem, 3vw, 3rem) clamp(1.5rem, 3vw, 3rem);
  display: flex;
  flex-direction: column;
  color: var(--cobalt);
  overflow: hidden;
}
.detail__close {
  align-self: flex-end;
  background: none;
  border: 1px solid var(--cobalt);
  color: var(--cobalt);
  padding: 0.6em 1em;
  letter-spacing: 0.14em;
  cursor: none;
  transition: background 0.3s, color 0.3s;
}
.detail__close:hover { background: var(--cobalt); color: var(--paper); }
.detail__info { margin-top: clamp(2rem, 8vh, 5rem); }
.detail__kicker { opacity: 0.65; margin-bottom: 1.2rem; }
.detail__title {
  font-size: clamp(2.6rem, 4.5vw, 4.5rem);
  line-height: 1;
  margin-bottom: 1.5rem;
}
.detail__desc {
  font-size: clamp(1.05rem, 1.4vw, 1.3rem);
  line-height: 1.5;
  display: -webkit-box;
  -webkit-line-clamp: 4;
  line-clamp: 4;
  -webkit-box-orient: vertical;
  overflow: hidden;
}
.detail__line {
  border: none;
  border-top: 1px solid var(--cobalt);
  margin-top: 2rem;
}
.detail__cta {
  margin-top: auto;
  display: block;
  text-align: center;
  border: 1px solid var(--cobalt);
  padding: 1.2em 1.5em;
  transition: background 0.3s, color 0.3s;
}
.detail__cta:hover { background: var(--cobalt); color: var(--paper); }

/* plates — HTML-native artwork */
.plate {
  border: 1px solid var(--cobalt);
  position: relative;
  overflow: hidden;
  flex: none;
}
.plate--canvas { background: var(--cobalt); }
.plate canvas { width: 100%; height: 100%; display: block; }
.plate__cap {
  margin-top: 0.8rem;
  opacity: 0.6;
  color: var(--cobalt);
}
.plate-wrap { display: flex; flex-direction: column; }
.plate--typo {
  background: var(--paper);
  color: var(--cobalt);
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
  padding: clamp(2rem, 6vw, 5rem);
  min-height: 24rem;
}
.plate--typo.plate--invert { background: var(--cobalt); color: var(--paper); }
.plate--typo .big {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5.5vw, 5rem);
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.plate--typo .big sup { font-size: 0.34em; vertical-align: 1.15em; margin-right: 0.06em; }
.plate--typo .glyphs {
  font-family: var(--font-serif);
  font-size: clamp(4rem, 9vw, 8rem);
  line-height: 1;
}
.plate--horse {
  background: var(--paper);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: clamp(2rem, 6vw, 5rem);
}
.plate--horse .dither-mask { max-width: 32rem; }
.plate--words {
  background: var(--cobalt);
  color: var(--paper);
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.1rem 0.6rem;
  align-content: space-evenly;
  padding: clamp(2rem, 5vw, 4rem);
  min-height: 26rem;
}
.plate--words span { font-family: var(--font-mono); font-size: 0.66rem; letter-spacing: 0.12em; }
.plate--words span.dim { opacity: 0.3; }
.plate--frames {
  background: var(--paper);
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: clamp(1rem, 2.5vw, 2rem);
  padding: clamp(1.5rem, 4vw, 3rem);
}
.plate--frames .dither-mask:nth-child(even) { transform: scaleX(-1); }
.plate--frames .dither-mask:nth-child(3n) { opacity: 0.55; }
.plate--frames .dither-mask:nth-child(4n) { opacity: 0.3; }

.plate--marquee {
  background: var(--paper);
  color: var(--cobalt);
  padding: clamp(1.2rem, 3vw, 2.2rem) 0;
}
.plate--marquee.plate--invert { background: var(--cobalt); color: var(--paper); }
.plate--marquee .track {
  display: flex;
  width: max-content;
  white-space: nowrap;
  animation: plate-marquee 16s linear infinite;
}
.plate--marquee .g {
  font-family: var(--font-serif);
  font-style: italic;
  font-size: clamp(2.2rem, 4.5vw, 4rem);
  line-height: 1;
  padding-right: 0.5em;
}
@keyframes plate-marquee { to { transform: translateX(-50%); } }

.plate--glyphrow {
  background: var(--paper);
  color: var(--cobalt);
  display: grid;
  grid-template-columns: repeat(6, 1fr);
}
.plate--glyphrow .cell {
  border-right: 1px solid var(--cobalt);
  border-bottom: 1px solid var(--cobalt);
  aspect-ratio: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
}
.plate--glyphrow .cell:nth-child(6n) { border-right: none; }
.plate--glyphrow .cell:nth-child(n+7) { border-bottom: none; }
.plate--glyphrow .cell .serif { font-size: clamp(2rem, 4.5vw, 4rem); line-height: 1; }
.plate--glyphrow .cell .mono { opacity: 0.55; }

.plate--stat {
  background: var(--paper);
  color: var(--cobalt);
  padding: clamp(1.5rem, 3vw, 2.5rem);
}
.plate--stat .row {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9em 0;
  border-bottom: 1px solid var(--cobalt);
}
.plate--stat .row:last-child { border-bottom: none; }

@media (max-width: 800px) {
  .detail { grid-template-columns: 1fr; grid-template-rows: auto 1fr; }
  .detail__right {
    order: -1;
    border-left: none;
    border-bottom: 1px solid var(--cobalt);
    padding: calc(3.2rem + 0.25rem) var(--gutter) 1rem;
  }
  .detail__close {
    position: absolute;
    top: 3.3rem;
    right: var(--gutter);
    padding: 0.45em 0.8em;
  }
  .detail__right { position: relative; }
  .detail__info { margin-top: 0.4rem; }
  .detail__title { font-size: 2rem; margin-bottom: 0.7rem; }
  .detail__kicker { margin-bottom: 0.6rem; }
  .detail__desc { font-size: 0.95rem; -webkit-line-clamp: 3; line-clamp: 3; }
  .detail__line { margin-top: 1rem; }
  .detail__cta { margin-top: 1rem; padding: 0.85em 1.2em; font-size: 0.75rem; }
  .detail__left { padding-top: var(--gutter); gap: 1.8rem; }
  .plate--typo { min-height: 15rem; padding: 1.8rem 1.2rem; }
  .plate--words { min-height: 15rem; grid-template-columns: repeat(3, 1fr); }
  .plate--frames { grid-template-columns: repeat(2, 1fr); }
  .plate--glyphrow .cell .serif { font-size: 1.7rem; }
}

/* ── Reveal defaults (pre-JS state) ────────────── */
.reveal, .sec-label, .caps__row, .work, .process__step, .num { opacity: 0; }
.no-js .reveal, .no-js .sec-label, .no-js .caps__row,
.no-js .work, .no-js .process__step, .no-js .num { opacity: 1; }

/* ── Reduced motion ────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  .hero__scroll { animation: none; }
  * { transition-duration: 0.01ms !important; }
}
