/* ==========================================================================
   ingeniascale — "Private by default"
   Wine, blush and an acid-lime accent. Melodrama for display, Switzer for
   reading, Fragment Mono for labels. The censor mosaic is the motif.
   ========================================================================== */

/* Self-hosted so the headline never waits on a third-party font CDN. */
@font-face {
  font-family: "Melodrama";
  src: url("fonts/melodrama-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Melodrama";
  src: url("fonts/melodrama-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/switzer-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}
@font-face {
  font-family: "Switzer";
  src: url("fonts/switzer-500.woff2") format("woff2");
  font-weight: 500;
  font-display: swap;
}
@font-face {
  font-family: "Fragment Mono";
  src: url("fonts/fragment-mono-400.woff2") format("woff2");
  font-weight: 400;
  font-display: swap;
}

:root {
  --wine: #2a0811;
  --wine-2: #3b0e1a;
  --night: #16040a;
  --blush: #f3d6cf;
  --cream: #fbf1ec;
  --rose: #c99a93;        /* secondary text on wine */
  --mauve: #7a4a4f;       /* secondary text on blush */
  --lime: #d9ff3f;
  --error: #8a0d24;

  --display: "Melodrama", "Bodoni 72", Didot, Georgia, serif;
  --sans: "Switzer", "Helvetica Neue", Arial, sans-serif;
  --mono: "Fragment Mono", ui-monospace, "SFMono-Regular", Menlo, monospace;

  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-io: cubic-bezier(0.76, 0, 0.24, 1);

  --gutter: clamp(16px, 3vw, 40px);
  --gap: clamp(12px, 1.4vw, 20px);
  --header-h: 64px;
  --section-y: clamp(72px, 8vw, 128px);

  /* Light-section defaults; dark and accent sections override below. */
  --fg: var(--wine);
  --muted: var(--mauve);
  --line: rgba(42, 8, 17, 0.18);
  --hot: var(--wine);          /* index numbers, bullets */
  --btn-bg: var(--wine);
  --btn-fg: var(--lime);
  --btn-hover: var(--night);
}

[data-theme="dark"] {
  --fg: var(--cream);
  --muted: var(--rose);
  --line: rgba(251, 241, 236, 0.16);
  --hot: var(--lime);
  --btn-bg: var(--lime);
  --btn-fg: var(--wine);
  --btn-hover: var(--cream);
}

[data-theme="accent"] {
  --fg: var(--wine);
  --muted: rgba(42, 8, 17, 0.72);
  --line: rgba(42, 8, 17, 0.28);
  --hot: var(--wine);
  --btn-bg: var(--wine);
  --btn-fg: var(--lime);
  --btn-hover: var(--night);
}

/* Base ------------------------------------------------------------------ */

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: var(--header-h);
}

body {
  margin: 0;
  background: var(--wine);
  color: var(--fg);
  font-family: var(--sans);
  font-size: clamp(15px, 0.2vw + 13.6px, 16px);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

body.menu-open { overflow: hidden; }

h1, h2, h3, p, ul, ol, dl, dd, figure, blockquote, fieldset { margin: 0; }
h1, h2, h3 { font-weight: inherit; }
ul, ol { padding: 0; list-style: none; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
mark { background: none; color: inherit; }

::selection { background: var(--lime); color: var(--wine); }
:focus-visible { outline: 2px solid var(--hot); outline-offset: 3px; }

.sr-only {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

.skip {
  position: fixed;
  left: var(--gutter);
  top: 12px;
  z-index: 100;
  padding: 10px 16px;
  background: var(--lime);
  color: var(--wine);
  transform: translateY(-200%);
}
.skip:focus { transform: none; }

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

.mono {
  font-family: var(--mono);
  font-size: 12px;
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

/* Shared pieces ---------------------------------------------------------- */

.eyebrow { color: var(--muted); }
.eyebrow span { color: var(--hot); }
.eyebrow span::after { content: "\00a0—\00a0"; color: var(--muted); }

.h2 {
  font-family: var(--display);
  font-size: clamp(2.5rem, 5.2vw, 5.6rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.015em;
  text-wrap: balance;
}

.section-head { margin-bottom: clamp(40px, 5vw, 80px); }
.section-head .eyebrow { margin-bottom: clamp(16px, 1.8vw, 28px); }
.section-head-main {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px 48px;
}
.section-lede {
  max-width: 34ch;
  color: var(--muted);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.45;
}

.link-inline {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
@media (hover: hover) {
  .link-inline:hover { background-size: 0 1px; background-position: 100% 100%; }
}

/* Anonymous name bar: a live censor mosaic. The image comes from main.js. */
.anon {
  display: inline-block;
  width: 5.5em;
  height: 1.05em;
  vertical-align: -0.2em;
  background-image: var(--anon-dark);
  background-repeat: repeat-x;
  background-size: auto 100%;
  background-color: rgba(42, 8, 17, 0.12);
  image-rendering: pixelated;
  animation: anon 2.4s steps(1) infinite;
}
[data-theme="dark"] .anon {
  background-image: var(--anon-light);
  background-color: rgba(251, 241, 236, 0.12);
}
@keyframes anon {
  0%   { background-position: 0 0; }
  25%  { background-position: -1.575em 0; }
  50%  { background-position: -3.675em 0; }
  75%  { background-position: -0.525em 0; }
}

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

.btn {
  position: relative;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  height: 48px;
  padding: 0 22px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  isolation: isolate;
  transition: color 0.4s var(--ease);
}
.btn::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--btn-hover);
  transform: scaleY(0);
  transform-origin: 50% 100%;
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) {
  .btn:hover::before { transform: scaleY(1); }
  [data-theme="dark"] .btn:hover { color: var(--wine); }
  [data-theme="accent"] .btn:hover,
  .btn-ink:hover { color: var(--lime); }
}

.btn-label {
  position: relative;
  display: block;
  overflow: hidden;
  line-height: 1.3;
}
.btn-label > span {
  position: relative;
  display: block;
  transition: transform 0.6s var(--ease);
}
.btn-label > span::after {
  content: attr(data-text);
  position: absolute;
  left: 0;
  top: 100%;
}
@media (hover: hover) {
  .btn:hover .btn-label > span { transform: translateY(-100%); }
}

.btn-arrow {
  position: relative;
  flex: none;
  width: 16px;
  height: 16px;
  overflow: hidden;
}
.btn-arrow svg,
.quote-btn svg,
.direct svg {
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
}
.btn-arrow svg {
  position: absolute;
  inset: 0;
  width: 16px;
  height: 16px;
  transition: transform 0.6s var(--ease);
}
.btn-arrow svg + svg { transform: translateX(-140%); }
@media (hover: hover) {
  .btn:hover .btn-arrow svg:first-child { transform: translateX(140%); }
  .btn:hover .btn-arrow svg + svg { transform: none; }
}

.btn-sm { height: 40px; padding: 0 16px; font-size: 12px; }
.btn-block { width: 100%; height: 56px; justify-content: space-between; }

.link {
  position: relative;
  display: inline-flex;
  padding-block: 6px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}
.link::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: currentColor;
  transform-origin: 100% 50%;
}
@media (hover: hover) {
  .link:hover::after { animation: redraw 0.9s var(--ease-io); }
}
@keyframes redraw {
  0%   { transform: scaleX(1); transform-origin: 100% 50%; }
  45%  { transform: scaleX(0); transform-origin: 100% 50%; }
  46%  { transform: scaleX(0); transform-origin: 0 50%; }
  100% { transform: scaleX(1); transform-origin: 0 50%; }
}

/* Header ----------------------------------------------------------------- */

.site-header {
  --h-fg: var(--cream);
  --h-bg: var(--wine);
  --btn-bg: var(--lime);
  --btn-fg: var(--wine);
  --btn-hover: var(--cream);
  --hot: var(--lime);
  position: fixed;
  inset: 0 0 auto;
  z-index: 70;
  height: var(--header-h);
  color: var(--h-fg);
  transition: transform 0.7s var(--ease), background-color 0.35s, color 0.35s;
}
.site-header[data-on="light"],
.site-header[data-on="accent"] {
  --h-fg: var(--wine);
  --btn-bg: var(--wine);
  --btn-fg: var(--lime);
  --btn-hover: var(--night);
  --hot: var(--wine);
}
.site-header[data-on="light"] { --h-bg: var(--blush); }
.site-header[data-on="accent"] { --h-bg: var(--lime); }
@media (hover: hover) {
  .site-header[data-on="dark"] .btn:hover { color: var(--wine); }
}

.site-header::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 1px;
  background: currentColor;
  opacity: 0;
  transition: opacity 0.35s;
}
.site-header.is-scrolled { background: var(--h-bg); }
.site-header.is-scrolled::after { opacity: 0.14; }
.site-header.is-hidden { transform: translateY(-100%); }

.header-inner {
  height: 100%;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
}

.logo {
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}
.logo-word {
  font-family: var(--display);
  font-size: 24px;
  font-weight: 500;
  letter-spacing: -0.01em;
  line-height: 1;
  transform: translateY(-1px);
}
.mark { width: 16px; height: 16px; flex: none; }
.mark rect { fill: currentColor; opacity: var(--o, 1); }
.mark .mark-hot { fill: var(--hot); }
@media (hover: hover) {
  .logo:hover .mark rect { animation: flicker 0.9s steps(1) infinite; }
  .logo:hover .mark rect:nth-child(2n) { animation-delay: -0.3s; }
  .logo:hover .mark rect:nth-child(3n) { animation-delay: -0.6s; }
}
@keyframes flicker {
  0%   { opacity: var(--o, 1); }
  33%  { opacity: 0.2; }
  66%  { opacity: 0.8; }
}

.nav {
  display: flex;
  gap: clamp(20px, 2.2vw, 36px);
  font-size: 14px;
}
.nav a { position: relative; padding-block: 6px; }
.nav a::after {
  content: "";
  position: absolute;
  inset: auto 0 2px;
  height: 1px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: 100% 50%;
  transition: transform 0.5s var(--ease);
}
@media (hover: hover) {
  .nav a:hover::after { transform: scaleX(1); transform-origin: 0 50%; }
}

.header-cta {
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 20px;
}

.menu-toggle {
  display: none;
  height: 40px;
  font-family: var(--mono);
  font-size: 13px;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

body.menu-open .site-header {
  --h-fg: var(--cream);
  --hot: var(--lime);
  background: transparent;
  transform: none;
}
body.menu-open .site-header::after { opacity: 0; }

/* Mobile menu ------------------------------------------------------------ */

.menu {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  padding: calc(var(--header-h) + 32px) var(--gutter) 32px;
  overflow-y: auto;
  overscroll-behavior: contain;
  background: var(--wine);
  color: var(--cream);
  clip-path: inset(0 0 100% 0);
  visibility: hidden;
  transition: clip-path 0.8s var(--ease-io), visibility 0s 0.8s;
}
.menu.is-open {
  clip-path: inset(0 0 0 0);
  visibility: visible;
  transition: clip-path 0.8s var(--ease-io), visibility 0s;
}
.menu-link {
  display: block;
  overflow: hidden;
  font-family: var(--display);
  font-size: clamp(3.2rem, 16vw, 6.5rem);
  font-size: clamp(2.4rem, min(16vw, 10svh), 6.5rem); /* five links fit a phone on its side */
  font-weight: 500;
  line-height: 1;
  padding-bottom: 0.08em;
}
.menu-link span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.7s var(--ease);
}
.menu.is-open .menu-link span {
  transform: none;
  transition-delay: calc(0.25s + var(--i) * 0.05s);
}
.menu-foot {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  color: var(--rose);
  font-size: 15px;
}
.menu-foot a { padding-block: 10px; }

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

.hero {
  position: relative;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  padding-top: calc(var(--header-h) + 4px);
  overflow: clip; /* the headline canvas bleeds past the gutter */
  background: var(--wine);
  color: var(--cream);
}
.hero-inner {
  flex: 1;
  display: flex;
  flex-direction: column;
}

.hero-meta {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  padding-top: 14px;
  border-top: 1px solid var(--line);
  color: var(--muted);
}
.hero-meta p:nth-child(1) { grid-column: 1 / span 4; }
.hero-meta p:nth-child(2) { grid-column: 5 / span 4; }
.hero-meta p:nth-child(3) { grid-column: 9 / span 4; justify-self: end; }

.status { display: flex; align-items: center; gap: 10px; color: var(--cream); }
.status::before {
  content: "";
  width: 7px;
  height: 7px;
  background: var(--lime);
  animation: blink 2.4s steps(1) infinite;
}
@keyframes blink { 50% { opacity: 0.2; } }

.hero-title {
  position: relative;
  margin-top: auto;
  padding-top: 6vh;
  font-family: var(--display);
  font-size: clamp(3.4rem, 11.5vw, 13rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.hero-title .line { display: block; }
/* Right-aligned so the descenders above never land on the capital below. */
.hero-title .line-2 { text-align: right; color: var(--blush); }

.hero-foot {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: end;
  padding-block: clamp(32px, 5vh, 64px) clamp(24px, 4vh, 44px);
}
.hero-lede {
  grid-column: 1 / span 5;
  max-width: 40ch;
  color: var(--cream);
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.45;
}
.hero-actions {
  grid-column: 8 / -1;
  justify-self: end;
  display: flex;
  align-items: center;
  gap: 28px;
}

.js .hero-meta,
.js .hero-foot { opacity: 0; }
.is-ready .hero-meta,
.is-ready .hero-foot {
  opacity: 1;
  transition: opacity 1.2s var(--ease) 0.9s;
}

/* Mosaic text: the DOM text keeps layout and meaning, a canvas draws it. */
[data-mosaic] { position: relative; }
.js [data-mosaic] { -webkit-text-fill-color: transparent; }
.js [data-mosaic].is-crisp { -webkit-text-fill-color: currentColor; }
.mosaic-canvas {
  position: absolute;
  pointer-events: none;
}

/* The censor lens that follows the cursor over the hero headline. */
.lens {
  --c: var(--lime);
  position: absolute;
  left: 0;
  top: 0;
  width: var(--size, 160px);
  height: var(--size, 160px);
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.3s;
  background:
    linear-gradient(var(--c) 0 0) 0 0 / 16px 2px,
    linear-gradient(var(--c) 0 0) 0 0 / 2px 16px,
    linear-gradient(var(--c) 0 0) 100% 0 / 16px 2px,
    linear-gradient(var(--c) 0 0) 100% 0 / 2px 16px,
    linear-gradient(var(--c) 0 0) 0 100% / 16px 2px,
    linear-gradient(var(--c) 0 0) 0 100% / 2px 16px,
    linear-gradient(var(--c) 0 0) 100% 100% / 16px 2px,
    linear-gradient(var(--c) 0 0) 100% 100% / 2px 16px;
  background-repeat: no-repeat;
  will-change: transform;
}
.lens.is-on { opacity: 1; }
.lens-tag {
  position: absolute;
  left: 0;
  bottom: calc(100% + 6px);
  padding: 2px 6px;
  background: var(--lime);
  color: var(--wine);
  font-size: 11px;
  -webkit-text-fill-color: var(--wine);
}

/* Ticker ----------------------------------------------------------------- */

.ticker {
  overflow: hidden;
  padding-block: 15px;
  background: var(--night);
  color: var(--cream);
  font-size: 13px;
}
.ticker-track { display: flex; width: max-content; will-change: transform; }
.ticker-group { display: flex; flex: none; }
.ticker-item {
  display: inline-flex;
  align-items: center;
  gap: 0.9em;
  white-space: nowrap;
}
.ticker-item::after {
  content: "";
  flex: none;
  width: 6px;
  height: 6px;
  margin-inline: 2.2em;
  background: var(--lime);
}

/* 01 About --------------------------------------------------------------- */

.about {
  padding-block: var(--section-y);
  background: var(--blush);
  color: var(--wine);
}
.about .eyebrow { margin-bottom: clamp(24px, 2.6vw, 40px); }

.statement {
  max-width: 24em;
  font-family: var(--display);
  font-size: clamp(1.9rem, 3.4vw, 3.9rem);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.01em;
  text-wrap: pretty;
}
.hl {
  padding-inline: 0.04em;
  /* Sits on the baseline like a marker stroke: Melodrama's baseline is 0.98em down the box. */
  background: linear-gradient(var(--lime), var(--lime)) 0 0.66em / 100% 0.4em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.js .hl {
  background-size: 0% 0.4em;
  transition: background-size 1.4s var(--ease) 0.5s;
}
.js .statement.is-in .hl { background-size: 100% 0.4em; }

.stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: var(--gap);
  margin-top: clamp(56px, 7vw, 112px);
}
.stat {
  display: flex;
  flex-direction: column-reverse;
  justify-content: flex-end;
  padding-top: 16px;
  border-top: 1px solid var(--wine);
}
.stat dd {
  margin-top: clamp(20px, 2.2vw, 36px);
  font-family: var(--display);
  font-size: clamp(2.8rem, 4.6vw, 5.2rem);
  font-weight: 500;
  line-height: 0.9;
  letter-spacing: -0.02em;
}
.stat dt { color: var(--mauve); }

/* 02 Services ------------------------------------------------------------ */

.services {
  padding-block: var(--section-y);
  background: var(--wine);
  color: var(--cream);
}

.svc-list { border-top: 1px solid var(--line); }
.svc {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: baseline;
  padding-block: clamp(22px, 2.4vw, 34px);
  border-bottom: 1px solid var(--line);
}
.svc-idx { grid-column: 1 / span 1; color: var(--lime); }
.svc-title {
  grid-column: 2 / span 6;
  font-family: var(--display);
  font-size: clamp(1.9rem, 2.9vw, 3.3rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.01em;
  transition: transform 0.6s var(--ease);
}
@media (hover: hover) {
  .svc:hover .svc-title { transform: translateX(12px); }
}
.svc-body { grid-column: 8 / -1; max-width: 46ch; }
.svc-tags {
  display: flex;
  flex-wrap: wrap;
  gap: 4px 18px;
  margin-top: 16px;
  color: var(--rose);
}

/* Redaction bars that pull back as each row scrolls in. */
.redact { color: var(--lime); }
.js .redact {
  padding-inline: 0.12em;
  margin-inline: -0.12em;
  color: var(--cream);
  background: linear-gradient(var(--cream), var(--cream)) 100% 55% / 100% 1.15em no-repeat;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
  transition: background-size 0.9s var(--ease-io) var(--rd, 0.25s), color 0.5s var(--ease) calc(var(--rd, 0.25s) + 0.6s);
}
.js .svc.is-in .redact {
  background-size: 0% 1.15em;
  color: var(--lime);
}

/* 03 Method -------------------------------------------------------------- */

.method {
  padding-block: var(--section-y);
  overflow: clip; /* title canvases bleed past the gutter until they resolve */
  background: var(--night);
  color: var(--cream);
}

.steps { border-top: 1px solid var(--line); }
.step {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 20px;
  align-items: start;
  padding-block: clamp(28px, 3vw, 44px);
  border-bottom: 1px solid var(--line);
}
.step-when { grid-column: 1 / span 2; padding-top: 0.6em; color: var(--lime); }
.step-title {
  grid-column: 3 / span 6;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 6.6rem);
  font-weight: 500;
  line-height: 0.86;
  letter-spacing: -0.02em;
}
.step-body { grid-column: 9 / -1; padding-top: 0.4em; }
.step-body > p { color: rgba(251, 241, 236, 0.82); }
.step-list {
  display: grid;
  gap: 4px;
  margin-top: 20px;
  color: var(--rose);
}
.step-list li { display: flex; align-items: center; gap: 10px; }
.step-list li::before {
  content: "";
  flex: none;
  width: 5px;
  height: 5px;
  background: var(--lime);
}

/* 04 Results ------------------------------------------------------------- */

.results {
  padding-block: var(--section-y);
  background: var(--blush);
  color: var(--wine);
}

.cases {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(40px, 4vw, 56px) var(--gap);
}
.case {
  display: flex;
  flex-direction: column;
  padding-top: 16px;
  border-top: 1px solid var(--wine);
}
.case-meta {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  color: var(--mauve);
}
.case-meta > span:first-child { display: inline-flex; align-items: center; gap: 8px; }
.case-figure {
  margin-top: clamp(32px, 3.6vw, 56px);
  font-family: var(--display);
  font-size: clamp(2.6rem, 3.6vw, 4rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.015em;
  white-space: nowrap;
}
.case-figure .to { font-family: var(--sans); font-size: 0.6em; vertical-align: 0.14em; }
.case-caption { margin-top: 12px; color: var(--mauve); }

.spark {
  position: relative;
  height: clamp(80px, 6.5vw, 104px);
  margin-top: 28px;
  border-bottom: 1px solid var(--line);
}
.spark svg { width: 100%; height: 100%; overflow: visible; }
.spark-line {
  fill: none;
  stroke: var(--wine);
  stroke-width: 1.5;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}
.spark-area { fill: var(--wine); opacity: 0.07; }
.spark-dot {
  position: absolute;
  right: -5px;
  top: var(--y);
  width: 10px;
  height: 10px;
  background: var(--lime);
  outline: 1.5px solid var(--wine);
  transform: translateY(-50%);
}
.js .spark svg {
  clip-path: inset(-10% 100% -10% 0);
  transition: clip-path 1.8s var(--ease-io) 0.3s;
}
.js .spark.is-in svg { clip-path: inset(-10% 0 -10% 0); }
.js .spark-dot {
  transform: translateY(-50%) scale(0);
  transition: transform 0.6s var(--ease) 1.9s;
}
.js .spark.is-in .spark-dot { transform: translateY(-50%) scale(1); }

.case-note { margin-top: 20px; max-width: 36ch; font-size: 15px; line-height: 1.5; }

/* 05 Voices -------------------------------------------------------------- */

.voices {
  padding-block: var(--section-y);
  background: var(--wine);
  color: var(--cream);
}
.quotes { margin-top: clamp(32px, 3.6vw, 56px); }
.quote-stage { display: grid; }
.quote {
  grid-area: 1 / 1;
  visibility: hidden;
  transition: visibility 0s 0.5s;
}
.quote.is-active { visibility: visible; transition: none; }
.quote blockquote p {
  max-width: 21ch;
  font-family: var(--display);
  font-size: clamp(2rem, 3.8vw, 4.2rem);
  font-weight: 400;
  line-height: 1;
  letter-spacing: -0.01em;
  text-indent: -0.4em;
  text-wrap: pretty;
}
.quote figcaption {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 12px;
  margin-top: clamp(24px, 2.4vw, 36px);
  color: var(--rose);
}

.js .quote .w {
  display: inline-block;
  text-indent: 0; /* the hanging quote's indent would otherwise repeat per word */
}
.js .quote .w > span {
  display: inline-block;
  opacity: 0;
  filter: blur(14px);
  transition: opacity 0.4s, filter 0.4s;
}
.js .quote.is-active .w > span {
  opacity: 1;
  filter: blur(0);
  transition: opacity 0.9s var(--ease), filter 1.1s var(--ease);
  transition-delay: calc(0.15s + var(--i) * 28ms);
}
.js .quote figcaption { opacity: 0; transition: opacity 0.4s; }
.js .quote.is-active figcaption { opacity: 1; transition: opacity 0.8s 0.8s; }

.quote-controls {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: clamp(32px, 3.6vw, 56px);
}
.quote-btn {
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  border: 1px solid rgba(251, 241, 236, 0.35);
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
.quote-btn svg { width: 16px; height: 16px; }
@media (hover: hover) {
  .quote-btn:hover { background: var(--lime); color: var(--wine); border-color: var(--lime); }
}
.quote-count { margin-left: 14px; font-variant-numeric: tabular-nums; }
.quote-progress {
  position: relative;
  width: min(200px, 30vw);
  height: 1px;
  margin-left: 14px;
  overflow: hidden;
  background: rgba(251, 241, 236, 0.25);
}
.quote-progress span {
  position: absolute;
  inset: 0;
  background: var(--lime);
  transform: scaleX(0);
  transform-origin: 0 50%;
}
.quote-progress.is-running span { animation: fill var(--dur, 8s) linear forwards; }
@keyframes fill { to { transform: scaleX(1); } }

/* 06 FAQ ----------------------------------------------------------------- */

.faq {
  padding-block: var(--section-y);
  background: var(--blush);
  color: var(--wine);
}
.faq-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  align-items: start;
}
.faq-head {
  grid-column: 1 / span 5;
  position: sticky;
  top: calc(var(--header-h) + 32px);
}
.faq-head .h2 { margin-top: 24px; }
.faq-note { max-width: 32ch; margin-top: 28px; color: var(--mauve); }
.faq-note a { color: var(--wine); }

.faq-list { grid-column: 7 / -1; border-top: 1px solid var(--wine); }
.faq-item { border-bottom: 1px solid var(--line); }
.faq-item h3 { font: inherit; }
.faq-q {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
  width: 100%;
  padding-block: 20px;
  text-align: left;
  font-family: var(--display);
  font-size: clamp(20px, 1.6vw, 25px);
  font-weight: 500;
  line-height: 1.15;
}
.faq-q > span:first-child { transition: transform 0.5s var(--ease); }
@media (hover: hover) {
  .faq-q:hover > span:first-child { transform: translateX(8px); }
}
.faq-icon { position: relative; flex: none; width: 14px; height: 14px; }
.faq-icon::before,
.faq-icon::after {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 100%;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.5s var(--ease);
}
.faq-icon::after { transform: rotate(90deg); }
.faq-item.is-open .faq-icon::after { transform: rotate(0deg); }

.faq-a {
  display: grid;
  grid-template-rows: 1fr;
  transition: grid-template-rows 0.6s var(--ease);
}
.faq-a > div { overflow: hidden; }
.faq-a p { max-width: 58ch; padding-bottom: 28px; color: var(--mauve); }
.js .faq-a { grid-template-rows: 0fr; }
.js .faq-item.is-open .faq-a { grid-template-rows: 1fr; }

/* 07 Apply --------------------------------------------------------------- */

.apply {
  padding-block: var(--section-y) calc(var(--section-y) * 0.8);
  background: var(--lime);
  color: var(--wine);
}
.apply-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 56px;
}
.apply-intro { grid-column: 1 / span 6; }
.apply-title {
  margin-top: 24px;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 6.6rem);
  font-weight: 500;
  line-height: 0.88;
  letter-spacing: -0.02em;
  text-wrap: balance;
}
.apply-lede {
  max-width: 38ch;
  margin-top: 28px;
  font-size: clamp(16px, 1.1vw, 18px);
  line-height: 1.45;
}

.terms { margin-top: clamp(32px, 4vw, 48px); border-top: 1px solid var(--line); }
.terms li {
  position: relative;
  padding: 15px 0 15px 22px;
  border-bottom: 1px solid var(--line);
  font-size: 16px;
}
.terms li::before {
  content: "";
  position: absolute;
  left: 0;
  top: calc(15px + 0.6em);
  width: 6px;
  height: 6px;
  background: var(--wine);
}
.terms strong { font-weight: 500; }
.terms span { color: var(--muted); }

.direct { display: grid; margin-top: 40px; }
.direct a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-block: 16px;
  border-bottom: 1px solid var(--line);
  font-size: clamp(16px, 1.15vw, 19px);
}
.direct small { display: block; margin-bottom: 2px; color: var(--muted); }
.direct svg { width: 18px; height: 18px; transition: transform 0.5s var(--ease); }
@media (hover: hover) {
  .direct a:hover svg { transform: translate(4px, -4px); }
}

.apply-form {
  grid-column: 8 / -1;
  align-self: start;
  padding-top: clamp(0px, 2.4vw, 32px);
}
.field { min-width: 0; margin-bottom: 26px; padding: 0; border: 0; }
.field > label,
.field > legend {
  display: block;
  margin-bottom: 6px;
  padding: 0;
  color: var(--muted);
}
.control { position: relative; }
.control::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 2px;
  background: var(--wine);
  transform: scaleX(0);
  transform-origin: 0 50%;
  transition: transform 0.6s var(--ease), background-color 0.3s;
}
.control:focus-within::after { transform: scaleX(1); }
.field.is-invalid .control::after { transform: scaleX(1); background: var(--error); }

.control input,
.control select,
.control textarea {
  display: block;
  width: 100%;
  padding: 8px 0 12px;
  background: transparent;
  color: var(--wine);
  border: 0;
  border-bottom: 1px solid var(--line);
  border-radius: 0;
  font-size: 17px;
  line-height: 1.4;
  appearance: none;
  outline: none;
}
.control textarea { resize: vertical; min-height: 88px; }
.control input::placeholder,
.control textarea::placeholder { color: rgba(42, 8, 17, 0.4); }
.control select { padding-right: 28px; cursor: pointer; }
.control select option { background: var(--cream); color: var(--wine); }
.control-select::before {
  content: "";
  position: absolute;
  right: 4px;
  top: 45%;
  width: 8px;
  height: 8px;
  border-right: 1.5px solid currentColor;
  border-bottom: 1.5px solid currentColor;
  transform: translateY(-50%) rotate(45deg);
  pointer-events: none;
}
.control input:-webkit-autofill {
  -webkit-text-fill-color: var(--wine);
  box-shadow: 0 0 0 100px var(--lime) inset;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; padding-top: 4px; }
.chip { position: relative; }
.chip input { position: absolute; inset: 0; margin: 0; opacity: 0; cursor: pointer; }
.chip span {
  display: block;
  padding: 10px 18px;
  border: 1px solid var(--line);
  font-size: 15px;
  transition: background-color 0.3s, color 0.3s, border-color 0.3s;
}
@media (hover: hover) {
  .chip input:hover + span { border-color: var(--wine); }
}
.chip input:checked + span { background: var(--wine); color: var(--lime); border-color: var(--wine); }
.chip input:focus-visible + span { outline: 2px solid var(--wine); outline-offset: 2px; }

/* Beats `.field > label`; the padding turns the whole row into a finger-sized target. */
.field > .check {
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 12px;
  margin: -11px 0;
  padding: 11px 0;
  color: var(--fg);
  font-size: 16px;
  line-height: 1.4;
  cursor: pointer;
}
.check input {
  position: absolute;
  left: 0;
  top: 11px;
  width: 22px;
  height: 22px;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.check-box {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--wine);
  transition: background-color 0.3s, border-color 0.3s;
}
.check-box::after {
  content: "";
  position: absolute;
  left: 7px;
  top: 2px;
  width: 6px;
  height: 12px;
  border-right: 2px solid var(--lime);
  border-bottom: 2px solid var(--lime);
  transform: rotate(45deg) scale(0);
  transition: transform 0.4s var(--ease);
}
.check input:checked + .check-box { background: var(--wine); }
.check input:checked + .check-box::after { transform: rotate(45deg) scale(1); }
.check input:focus-visible + .check-box { outline: 2px solid var(--wine); outline-offset: 2px; }
.check-label { padding-top: 1px; }
.field.is-invalid .check-box { border: 2px solid var(--error); }
.field.is-invalid .check-label { color: var(--error); }

.btn-ink { --btn-bg: var(--wine); --btn-fg: var(--lime); --btn-hover: var(--night); }
.apply-form .btn-block { margin-top: 12px; }
.form-status { min-height: 1.5em; margin-top: 16px; font-size: 15px; }
.form-status.is-error { color: var(--error); font-weight: 500; }
.form-note { color: var(--muted); }

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

.site-footer {
  overflow: hidden;
  background: var(--night);
  color: var(--cream);
}
.footer-top {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  column-gap: var(--gap);
  row-gap: 40px;
  padding-block: clamp(56px, 6vw, 88px) clamp(48px, 5vw, 80px);
  font-size: 15px;
}
.footer-tag {
  grid-column: 1 / span 4;
  font-family: var(--display);
  font-size: clamp(24px, 2.2vw, 32px);
  font-weight: 500;
  line-height: 1;
}
.footer-top > nav { grid-column: 6 / span 2; }
.footer-top > div:not(.footer-legal) { grid-column: 8 / span 3; }
.footer-legal { grid-column: 11 / span 2; }
.footer-h { margin-bottom: 14px; color: var(--rose); }
.footer-links { display: grid; gap: 6px; }
.footer-links a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
@media (hover: hover) {
  .footer-links a:hover { background-size: 100% 1px; }
}

.footer-mark {
  padding-inline: var(--gutter);
  font-family: var(--display);
  font-size: 19.2vw;
  font-weight: 500;
  line-height: 0.8;
  letter-spacing: -0.02em;
  white-space: nowrap;
  user-select: none;
  color: var(--cream);
}

/* Legal pages ------------------------------------------------------------ */

.page-legal .site-header { position: sticky; top: 0; }
.page-legal .header-inner, .page-404 .header-inner { grid-template-columns: 1fr auto; }
.page-legal .header-cta, .page-404 .header-cta { gap: 24px; }

.legal {
  padding-block: clamp(56px, 7vw, 104px) var(--section-y);
  background: var(--blush);
  color: var(--wine);
}
.legal-title {
  margin-top: 20px;
  font-family: var(--display);
  font-size: clamp(2.8rem, 6vw, 5.6rem);
  font-weight: 500;
  line-height: 0.92;
  letter-spacing: -0.015em;
}
.legal-updated { margin-top: 20px; color: var(--muted); }

.legal-body { max-width: 68ch; margin-top: clamp(40px, 5vw, 72px); }
.legal-lede {
  font-size: clamp(18px, 1.3vw, 21px);
  line-height: 1.45;
}
.legal-body h2 {
  margin-top: clamp(40px, 4vw, 56px);
  padding-top: 20px;
  border-top: 1px solid var(--line);
  font-family: var(--display);
  font-size: clamp(1.7rem, 2.4vw, 2.3rem);
  font-weight: 500;
  line-height: 1.05;
  letter-spacing: -0.01em;
}
.legal-body h2 + * { margin-top: 16px; }
.legal-body p + p,
.legal-body p + ul,
.legal-body ul + p { margin-top: 1em; }
.legal-body strong { font-weight: 500; }
.legal-body a {
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 1px no-repeat;
  transition: background-size 0.5s var(--ease);
}
@media (hover: hover) {
  .legal-body a:hover { background-size: 0 1px; background-position: 100% 100%; }
}
.legal-body ul { display: grid; gap: 8px; }
.legal-body li { position: relative; padding-left: 22px; }
.legal-body li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.62em;
  width: 6px;
  height: 6px;
  background: var(--wine);
}

/* Reveal primitives ------------------------------------------------------ */

.js [data-reveal] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 1s var(--ease), transform 1.2s var(--ease);
  transition-delay: var(--d, 0s);
}
.js [data-reveal].is-in { opacity: 1; transform: none; }

.js [data-split] .w {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
  padding-bottom: 0.12em;
  margin-bottom: -0.12em;
}
.js [data-split] .w > span {
  display: inline-block;
  transform: translateY(105%);
  transition: transform 1.1s var(--ease);
  transition-delay: calc(var(--i) * 40ms);
}
.js [data-split].is-in .w > span { transform: none; }

/* Responsive ------------------------------------------------------------- */

@media (max-width: 1100px) {
  .hero-lede { grid-column: 1 / span 6; }
  .hero-actions { grid-column: 7 / -1; flex-wrap: wrap; justify-content: flex-end; gap: 16px 24px; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cases { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .step-title { grid-column: 3 / -1; }
  .step-body { grid-column: 3 / -1; }
}

@media (max-width: 900px) {
  :root { --header-h: 60px; }

  .nav { display: none; }
  .header-inner { grid-template-columns: 1fr auto; }
  .header-cta .btn { display: none; }
  .menu-toggle { display: block; }

  .hero-meta p:nth-child(1) { grid-column: 1 / span 7; }
  .hero-meta p:nth-child(2) { display: none; }
  .hero-meta p:nth-child(3) { grid-column: 8 / -1; }
  .hero { min-height: auto; }
  .hero-title {
    margin-top: clamp(48px, 10vh, 120px);
    padding-top: 0;
    font-size: clamp(3.2rem, 15vw, 7.5rem);
    font-size: clamp(3.2rem, min(15vw, 24svh), 7.5rem); /* a phone on its side */
  }
  /* Left-aligned here, the descender of "private" falls between "Get" and "paid". */
  .hero-title .line-2 { text-align: left; }
  /* On the 404 the descender of "page" would touch the t of "private". */
  .page-404 .hero-title { line-height: 1.02; }
  .hero-foot { row-gap: 28px; }
  .hero-lede,
  .hero-actions { grid-column: 1 / -1; justify-self: start; justify-content: flex-start; }

  .svc { row-gap: 14px; }
  .svc-idx { grid-column: 1 / -1; }
  .svc-title,
  .svc-body { grid-column: 1 / -1; }

  .step-when,
  .step-title,
  .step-body { grid-column: 1 / -1; }
  .step-when { padding-top: 0; }

  .faq-head,
  .faq-list { grid-column: 1 / -1; }
  .faq-head { position: static; margin-bottom: 48px; }

  .apply-intro,
  .apply-form { grid-column: 1 / -1; }
  .apply-form { padding-top: 0; }

  .footer-tag { grid-column: 1 / -1; }
  .footer-top > nav { grid-column: 1 / span 6; }
  .footer-top > div:not(.footer-legal) { grid-column: 7 / -1; }
  .footer-legal { grid-column: 1 / -1; }
  .footer-legal .footer-links { grid-auto-flow: column; justify-content: start; gap: 20px; }

  /* Finger-sized targets without moving any text. */
  .logo { padding-block: 10px; }
  .link::before { content: ""; position: absolute; inset: -6px -4px; }
  .footer-links { gap: 0; }
  .footer-links a { display: inline-block; padding-block: 10px; background-origin: content-box; }
}

@media (max-width: 600px) {
  .hero-meta { font-size: 11px; }
  .hero-actions,
  .hero-actions .btn { width: 100%; }
  .hero-actions .btn { justify-content: space-between; }

  .stat dd { font-size: clamp(2.6rem, 12vw, 3.6rem); }
  .cases { grid-template-columns: 1fr; }

  .quote-controls { flex-wrap: wrap; }
  .quote-progress { flex: 1; width: auto; }

  .footer-top > nav,
  .footer-top > div:not(.footer-legal) { grid-column: 1 / -1; }
  .footer-mark { font-size: 18.4vw; }
}

/* Reduced motion: keep fades and the censor effects, drop the travel. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }

  .js [data-reveal] { transform: none; }
  .js [data-split] .w > span,
  .menu-link span { transform: none !important; }
  .js [data-split] { opacity: 0; transition: opacity 1s var(--ease); }
  .js [data-split].is-in { opacity: 1; }

  .redact { transition: background-size 0.01ms var(--rd, 0.25s), color 0.4s var(--rd, 0.25s); }
  .js .spark svg { clip-path: none; opacity: 0; transition: opacity 1.2s var(--ease) 0.2s; }
  .js .spark.is-in svg { opacity: 1; }
  .js .quote .w > span { filter: none; }

  .menu,
  .menu.is-open { clip-path: none; }
  .menu { opacity: 0; transition: opacity 0.3s, visibility 0s 0.3s; }
  .menu.is-open { opacity: 1; transition: opacity 0.3s, visibility 0s; }

  .anon,
  .status::before { animation: none; }
}
