/* =========================================================
   FRAMEWORK — site stylesheet
   Brand system: near-monochrome, sharp corners, hairline rules.
   Switzer (display) + General Sans (body), via Fontshare.
   ========================================================= */

:root {
  --ink: #0A0A0A;
  --paper: #FFFFFF;
  --slate: #5C5C5C;
  --stone: #A3A3A3;
  --hairline: #E0E0E0;
  --mist: #F5F5F5;

  --font-display: "Switzer", "Space Grotesk", "Helvetica Neue", Arial, sans-serif;
  --font-body: "General Sans", "Inter", "Helvetica Neue", Arial, sans-serif;

  --max: 1280px;
  --gutter: clamp(20px, 4vw, 48px);
  --section-y: clamp(80px, 11vw, 144px);
  --header-h: 72px;
}

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

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; }
p { margin: 0 0 1em; }
p:last-child { margin-bottom: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}
.section--ink :focus-visible { outline-color: var(--paper); }

.skip-link {
  position: absolute;
  left: var(--gutter);
  top: -100px;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  padding: 12px 18px;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; }

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

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

.container {
  width: 100%;
  max-width: var(--max);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.section {
  padding: var(--section-y) 0;
  border-top: 1px solid var(--hairline);
}
.section--flush-top { border-top: 0; }

.section--ink {
  background: var(--ink);
  color: var(--paper);
  border-top: 0;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  margin: 0;
  font-weight: 600;
}

.display {
  font-weight: 700;
  font-size: clamp(46px, 6.8vw, 100px);
  line-height: 0.98;
  letter-spacing: -0.02em;
}

.h2 {
  font-size: clamp(34px, 4.1vw, 52px);
  line-height: 1.08;
  letter-spacing: -0.012em;
}

.h3 {
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
}

.eyebrow {
  display: block;
  margin: 0 0 24px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  line-height: 1.1;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.eyebrow::before { content: "— "; }

.lead {
  font-size: clamp(18px, 1.6vw, 21px);
  line-height: 1.5;
  color: var(--ink);
  max-width: 34em;
}

.muted { color: var(--slate); }
.section--ink .muted { color: var(--stone); }

.index {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 15px;
  letter-spacing: 0.02em;
  color: var(--stone);
  font-variant-numeric: tabular-nums;
}

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

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 0 26px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: transparent;
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
  text-decoration: none;
  cursor: pointer;
  transition: background-color .15s ease, color .15s ease;
}
.btn--primary { background: var(--ink); color: var(--paper); }
.btn--primary:hover { background: var(--paper); color: var(--ink); }
.btn--secondary:hover { background: var(--ink); color: var(--paper); }

.section--ink .btn { border-color: var(--paper); color: var(--paper); }
.section--ink .btn--primary { background: var(--paper); color: var(--ink); }
.section--ink .btn--primary:hover { background: transparent; color: var(--paper); }
.section--ink .btn--secondary:hover { background: var(--paper); color: var(--ink); }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 40px; }

.text-link {
  display: inline-block;
  margin-top: 32px;
  font-weight: 600;
  font-size: 15px;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 6px;
}
.text-link:hover { text-decoration-thickness: 2px; }

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

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 1px solid var(--hairline);
}
.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: var(--header-h);
  gap: 24px;
}

.brand {
  display: inline-flex;
  align-items: center;
  gap: 14px;
  text-decoration: none;
}
.brand__mark { width: 36px; height: 36px; flex: none; }
.brand__word {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.26em;
  text-transform: uppercase;
}

.nav { display: flex; align-items: center; gap: 32px; }
.nav__list { display: flex; gap: 28px; }
.nav__link {
  font-size: 15px;
  font-weight: 500;
  color: var(--slate);
  text-decoration: none;
  padding: 6px 0;
  border-bottom: 1px solid transparent;
}
.nav__link:hover { color: var(--ink); }
.nav__link[aria-current="page"] { color: var(--ink); border-bottom-color: var(--ink); }
.nav .btn { min-height: 44px; padding: 0 20px; }

.menu-toggle {
  display: none;
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 0;
  background: var(--paper);
  font: 600 14px/1 var(--font-body);
  color: var(--ink);
  cursor: pointer;
}

@media (max-width: 960px) {
  .menu-toggle { display: inline-flex; align-items: center; }
  .nav {
    position: fixed;
    inset: var(--header-h) 0 0 0;
    display: none;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 8px var(--gutter) 32px;
    background: var(--paper);
    overflow-y: auto;
  }
  .nav.is-open { display: flex; }
  .nav__list { flex-direction: column; gap: 0; }
  .nav__link {
    display: block;
    padding: 18px 0;
    border-bottom: 1px solid var(--hairline);
    font-family: var(--font-display);
    font-weight: 600;
    font-size: 26px;
    letter-spacing: -0.01em;
    color: var(--ink);
  }
  .nav__link[aria-current="page"] { border-bottom-color: var(--ink); }
  .nav .btn { margin-top: 28px; min-height: 56px; }
  body.nav-open { overflow: hidden; }
}

/* ---------- Page heads & section heads ---------- */

.page-head { padding: clamp(72px, 10vw, 128px) 0 clamp(64px, 8vw, 104px); }
.page-head .display { max-width: 12em; }
.page-head .lead { margin-top: 32px; }

.split {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 32px;
}
.split__main { grid-column: 1 / span 7; }
.split__side { grid-column: 9 / -1; align-self: end; }

.section-head { margin-bottom: clamp(48px, 6vw, 80px); }
.section-head .h2 { max-width: 14em; }

@media (max-width: 860px) {
  .split__main, .split__side { grid-column: 1 / -1; }
}

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

.hero { padding: clamp(64px, 8vw, 112px) 0 clamp(80px, 10vw, 136px); }
.hero__grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 56px;
  align-items: start;
}
.hero__copy { grid-column: 1 / span 7; }
.hero__drawing { grid-column: 9 / -1; margin: 0; }
.hero .display { margin-bottom: 40px; }
.hero .lead + p { margin-top: 20px; max-width: 34em; }

@media (max-width: 960px) {
  .hero__copy { grid-column: 1 / -1; }
  .hero__drawing { grid-column: 1 / -1; max-width: 520px; }
}

.drawing {
  border: 1px solid var(--hairline);
  background: var(--paper);
}
.drawing svg { width: 100%; height: auto; }
.drawing__caption {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 12px 16px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--slate);
}

.dw-grid line { stroke: var(--hairline); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dw-reg line { stroke: var(--stone); stroke-width: 1; vector-effect: non-scaling-stroke; }
/* Hero drawing — one 9-second cycle, repeated:
   strategy (outer F) → design (inner F) → execution (logo fills in),
   holds, fades out, and starts again. */
.dw-build { animation: dw-cycle 9s linear infinite; }
.dw-shape {
  fill: var(--paper);
  fill-opacity: 0;
  stroke: var(--ink);
  stroke-width: 3;
  stroke-dasharray: 1;
  stroke-dashoffset: 1;
  animation: 9s cubic-bezier(.6,0,.2,1) infinite;
}
.dw-shape--1 { animation-name: dw-outer; }
.dw-shape--2 { animation-name: dw-inner; }
.dw-square { fill: var(--ink); opacity: 0; animation: dw-square 9s ease infinite; }
.dw-callout { opacity: 0; animation: 9s ease infinite; }
.dw-callout line { stroke: var(--ink); stroke-width: 1; vector-effect: non-scaling-stroke; }
.dw-callout circle { fill: var(--ink); }
.dw-callout text {
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 30px;
  letter-spacing: 3px;
  fill: var(--ink);
}
.dw-callout .dw-num { fill: var(--stone); }
.dw-callout--1 { animation-name: dw-c1; }
.dw-callout--2 { animation-name: dw-c2; }
.dw-callout--3 { animation-name: dw-c3; }

@keyframes dw-cycle {
  0%, 84% { opacity: 1; }
  93%, 100% { opacity: 0; }
}
@keyframes dw-outer {
  0%, 2% { stroke-dashoffset: 1; fill-opacity: 0; stroke: var(--ink); }
  14%, 29% { stroke-dashoffset: 0; fill-opacity: 0; stroke: var(--ink); }
  37%, 100% { stroke-dashoffset: 0; fill-opacity: 1; stroke: var(--paper); }
}
@keyframes dw-inner {
  0%, 14% { stroke-dashoffset: 1; fill-opacity: 0; stroke: var(--ink); }
  27%, 29% { stroke-dashoffset: 0; fill-opacity: 0; stroke: var(--ink); }
  37%, 100% { stroke-dashoffset: 0; fill-opacity: 1; stroke: var(--paper); }
}
@keyframes dw-square { 0%, 29% { opacity: 0; } 37%, 100% { opacity: 1; } }
@keyframes dw-c1 { 0%, 10% { opacity: 0; } 14%, 100% { opacity: 1; } }
@keyframes dw-c2 { 0%, 22% { opacity: 0; } 27%, 100% { opacity: 1; } }
@keyframes dw-c3 { 0%, 33% { opacity: 0; } 38%, 100% { opacity: 1; } }

/* Reduced motion: show the finished mark, no loop. */
@media (prefers-reduced-motion: reduce) {
  .dw-build, .dw-shape, .dw-square, .dw-callout { animation: none !important; }
  .dw-shape { stroke-dashoffset: 0; fill-opacity: 1; stroke: var(--paper); }
  .dw-square, .dw-callout { opacity: 1; }
}

/* ---------- Figures ---------- */

.figure { margin: clamp(56px, 7vw, 96px) 0 0; }
.figure__media {
  position: relative;
  aspect-ratio: 16 / 9;
  background: var(--mist);
  overflow: hidden;
}
.figure__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1) contrast(1.06);
}
.figure__pair {
  display: grid;
  grid-template-columns: 1.4fr 1fr;
  gap: 24px;
}
.figure__pair .figure__media { aspect-ratio: auto; height: clamp(280px, 34vw, 480px); }
.figure__caption {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 24px;
  padding-top: 16px;
  margin-top: 16px;
  border-top: 1px solid var(--hairline);
  font-size: 15px;
  color: var(--slate);
}
.figure__caption strong { color: var(--ink); font-weight: 600; }

@media (max-width: 700px) {
  .figure__pair { grid-template-columns: 1fr; }
  .figure__caption { grid-template-columns: 1fr; gap: 4px; }
}

/* Shown only if an image file is missing — a blueprint placeholder with its filename. */
.is-missing {
  background-color: var(--paper);
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 32px 32px;
  border: 1px solid var(--hairline);
}
.is-missing img { display: none; }
.is-missing::after {
  content: "Add image: " attr(data-src);
  position: absolute;
  left: 16px; bottom: 14px;
  padding: 4px 8px;
  background: var(--paper);
  font-size: 13px;
  color: var(--slate);
}

/* ---------- Index rows (services list on home) ---------- */

.rows { border-top: 1px solid var(--ink); }
.row {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) minmax(0, 1.3fr);
  gap: 24px;
  align-items: baseline;
  padding: 28px 0;
  border-bottom: 1px solid var(--hairline);
  text-decoration: none;
}
.row .h3 { text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.row:hover .h3 { text-decoration-color: var(--ink); }
.row p { color: var(--slate); margin: 0; }

@media (max-width: 700px) {
  .row { grid-template-columns: 48px 1fr; row-gap: 6px; }
  .row p { grid-column: 2; }
}

/* ---------- Cell grids (method stages, reasons, principles) ---------- */

.cells {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.cells--4 { grid-template-columns: repeat(4, 1fr); }
.cells--2 { grid-template-columns: repeat(2, 1fr); }
.cell {
  padding: 32px 28px 40px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
}
.cell .index { display: block; margin-bottom: 48px; }
.cell .h3 { margin-bottom: 12px; }
.cell p { color: var(--slate); font-size: 16px; }
.cell__tag {
  display: block;
  margin-bottom: 40px;
  font-size: 14px;
  font-weight: 500;
  color: var(--stone);
}

@media (max-width: 1024px) {
  .cells--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .cells { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 560px) {
  .cells, .cells--4, .cells--2 { grid-template-columns: 1fr; }
  .cell .index, .cell__tag { margin-bottom: 24px; }
}

/* ---------- Services page ---------- */

.service {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 24px;
  padding: clamp(48px, 6vw, 72px) 0;
  border-top: 1px solid var(--hairline);
  scroll-margin-top: var(--header-h);
}
.service:first-child { border-top: 1px solid var(--ink); }
.service__title { grid-column: 1 / span 4; }
.service__title .index { display: block; margin-bottom: 16px; }
.service__body { grid-column: 6 / span 4; color: var(--slate); }
.service__list { grid-column: 10 / -1; }

.checklist li {
  padding: 11px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
  font-weight: 500;
}
.checklist li:first-child { border-top: 1px solid var(--hairline); }

@media (max-width: 960px) {
  .service__title { grid-column: 1 / -1; }
  .service__body { grid-column: 1 / span 7; }
  .service__list { grid-column: 8 / -1; }
}
@media (max-width: 640px) {
  .service__body, .service__list { grid-column: 1 / -1; }
}

/* ---------- Method page ---------- */

.stage {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 24px;
  padding: clamp(48px, 6vw, 80px) 0;
  border-top: 1px solid var(--hairline);
}
.stage:first-child { border-top: 1px solid var(--ink); }
.stage__num {
  grid-column: 1 / span 2;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(40px, 5vw, 64px);
  line-height: 1;
  letter-spacing: -0.02em;
  color: var(--stone);
}
.stage__title { grid-column: 3 / span 4; }
.stage__title p { margin-top: 12px; color: var(--slate); }
.stage__body { grid-column: 7 / span 3; color: var(--slate); }
.stage__output {
  grid-column: 10 / -1;
  align-self: start;
  padding: 20px;
  background: var(--mist);
  border: 1px solid var(--hairline);
  font-weight: 500;
  font-size: 15px;
}
.stage__output .eyebrow { margin-bottom: 12px; }

@media (max-width: 960px) {
  .stage__num { grid-column: 1 / -1; }
  .stage__title { grid-column: 1 / -1; }
  .stage__body { grid-column: 1 / span 7; }
  .stage__output { grid-column: 8 / -1; }
}
@media (max-width: 640px) {
  .stage__body, .stage__output { grid-column: 1 / -1; }
}

/* ---------- About: audience lists ---------- */

.audience {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.audience__group h3 {
  padding-bottom: 16px;
  border-bottom: 1px solid var(--ink);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
}
.audience__group li {
  display: grid;
  grid-template-columns: 48px 1fr;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  letter-spacing: -0.01em;
}
@media (max-width: 700px) { .audience { grid-template-columns: 1fr; gap: 48px; } }

/* ---------- Portfolio ---------- */

.work {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 48px 24px;
}
.work__item { display: flex; flex-direction: column; }
.work__frame {
  position: relative;
  aspect-ratio: 1 / 1;
  border: 1px solid var(--hairline);
  background: var(--paper);
  margin-bottom: 20px;
}
.work__frame img { width: 100%; height: 100%; object-fit: contain; padding: 12%; }
.work__frame--pending {
  display: flex;
  align-items: flex-end;
  padding: 16px;
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 32px 32px;
  background-position: -1px -1px;
}
.work__frame--pending span {
  padding: 4px 8px;
  background: var(--paper);
  font-size: 13px;
  color: var(--slate);
}
.work__cat { font-size: 14px; color: var(--stone); font-weight: 500; }
.work__item .h3 { margin: 6px 0 8px; }
.work__scope { color: var(--slate); font-size: 16px; margin: 0; }
.work__status {
  margin-top: 16px;
  padding-top: 12px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.work__status--pending { color: var(--stone); }

@media (max-width: 960px) { .work { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 560px) { .work { grid-template-columns: 1fr; } }

/* ---------- Contact ---------- */

.contact {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 64px;
}
.contact__form { grid-column: 1 / span 7; }
.contact__aside { grid-column: 9 / -1; }
@media (max-width: 960px) {
  .contact__form, .contact__aside { grid-column: 1 / -1; }
}

.field { margin-bottom: 28px; }
.field label {
  display: block;
  margin-bottom: 10px;
  font-weight: 600;
  font-size: 15px;
}
.field .optional { font-weight: 500; color: var(--stone); }
.input {
  width: 100%;
  min-height: 52px;
  padding: 12px 14px;
  border: 1px solid var(--hairline);
  border-bottom-color: var(--ink);
  border-radius: 0;
  background: var(--paper);
  color: var(--ink);
  font: 400 17px/1.4 var(--font-body);
  -webkit-appearance: none;
  appearance: none;
}
textarea.input { min-height: 180px; resize: vertical; }
select.input {
  background-image: linear-gradient(45deg, transparent 50%, var(--ink) 50%), linear-gradient(135deg, var(--ink) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}
.input:focus { outline: 2px solid var(--ink); outline-offset: -1px; }
.input[aria-invalid="true"] { border: 2px solid var(--ink); }
.field__error {
  display: none;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 600;
}
.field__error::before { content: "Required — "; font-weight: 500; color: var(--slate); }
.field.has-error .field__error { display: block; }

.form-status {
  margin-top: 20px;
  padding: 16px 18px;
  border: 1px solid var(--ink);
  font-size: 15px;
}
.form-status[hidden] { display: none; }

.success {
  padding: 40px 32px;
  border: 1px solid var(--ink);
}
.success .h3 { margin-bottom: 12px; }
.success[hidden] { display: none; }

.details { border-top: 1px solid var(--ink); margin-bottom: 64px; }
.details div {
  display: grid;
  grid-template-columns: 140px 1fr;
  gap: 16px;
  padding: 16px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
.details dt { color: var(--slate); }
.details dd { margin: 0; font-weight: 500; }

.steps li {
  display: grid;
  grid-template-columns: 48px 1fr;
  padding: 20px 0;
  border-bottom: 1px solid var(--hairline);
}
.steps li:first-child { border-top: 1px solid var(--ink); }
.steps strong { display: block; font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.steps p { color: var(--slate); font-size: 15px; margin-top: 4px; }

/* ---------- CTA (inverted section) ---------- */

.cta .h2 { max-width: 13em; }
.cta p { color: var(--stone); max-width: 32em; margin-top: 24px; }
.cta .eyebrow { color: var(--stone); }

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

.site-footer { border-top: 1px solid var(--hairline); padding: 72px 0 32px; }
.site-footer__grid {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr 1fr;
  gap: 40px 24px;
}
.site-footer__tag { margin-top: 20px; color: var(--slate); font-size: 15px; max-width: 18em; }
.site-footer h4 {
  margin-bottom: 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.site-footer li { margin-bottom: 8px; font-size: 15px; }
.site-footer li a { text-decoration: none; }
.site-footer li a:hover { text-decoration: underline; text-underline-offset: 4px; }
.site-footer__base {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: 64px;
  padding-top: 20px;
  border-top: 1px solid var(--hairline);
  font-size: 13px;
  color: var(--slate);
}
@media (max-width: 860px) { .site-footer__grid { grid-template-columns: 1fr 1fr; } .site-footer__brand { grid-column: 1 / -1; } }

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

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0s !important; animation-delay: 0s !important; transition: none !important; }
}

/* Placeholder grid also applies inside portfolio frames */
.work__frame.is-missing {
  background-image:
    linear-gradient(var(--hairline) 1px, transparent 1px),
    linear-gradient(90deg, var(--hairline) 1px, transparent 1px);
  background-size: 32px 32px;
}

/* ---------- Portfolio: cover images & links ---------- */

.work__frame--cover img { object-fit: cover; padding: 0; filter: grayscale(1) contrast(1.06); }
.work__link {
  align-self: flex-start;
  margin-top: 10px;
  font-size: 15px;
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 5px;
}
.work__link:hover { text-decoration-thickness: 2px; }

/* ---------- Portfolio: featured case study ----------
   Client colours appear only inside the client's own work. */


.feature__head {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 32px;
  margin-bottom: clamp(40px, 5vw, 64px);
}
.feature__intro { grid-column: 1 / span 6; }
.feature__intro .h2 { margin: 6px 0 20px; }
.feature__summary { grid-column: 8 / -1; align-self: end; }

.feature__visuals {
  display: grid;
  grid-template-columns: 1fr 1.25fr;
  grid-template-rows: auto auto;
  gap: 24px;
}
.feature__crest {
  grid-row: 1 / span 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 32px;
  padding: 48px 24px 24px;
  background: #17181A;
  color: #A3A3A3;
  font-size: 13px;
  text-align: center;
}
.feature__crest img { width: min(58%, 260px); height: auto; }
.feature__photo { background: var(--mist); overflow: hidden; }
.feature__photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 16 / 9; }

.feature__detail {
  display: grid;
  grid-template-columns: 1.2fr 1fr 1fr;
  gap: 40px 24px;
  margin-top: clamp(40px, 5vw, 64px);
  margin-bottom: 8px;
}
.feature__label {
  margin: 0 0 16px;
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 15px;
}
.feature__detail .muted { font-size: 15px; }
.feature__detail .details { margin-bottom: 32px; }

.swatches li {
  display: grid;
  grid-template-columns: 40px 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 0;
  border-bottom: 1px solid var(--hairline);
  font-size: 15px;
}
.swatches li:first-child { border-top: 1px solid var(--hairline); }
.swatches strong { font-weight: 500; }
.swatches li > span:last-child { color: var(--slate); font-variant-numeric: tabular-nums; }
.swatch { width: 40px; height: 24px; border: 1px solid var(--hairline); }

.details--compact { border-top: 1px solid var(--hairline); }
.details--compact div { grid-template-columns: 80px 1fr; padding: 11px 0; }

@media (max-width: 960px) {
  .feature__intro, .feature__summary { grid-column: 1 / -1; }
  .feature__detail { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 640px) {
  .feature__visuals { grid-template-columns: 1fr; }
  .feature__crest { grid-row: auto; padding: 40px 24px 20px; }
  .feature__detail { grid-template-columns: 1fr; }
}

/* Eagle's Nest panel — the client's own cream ground */
.feature__crest--cream { background: #F3EEE1; color: #5F6A5C; }
.feature__crest .feature__lockup { width: min(86%, 420px); }
.feature__foot {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px 24px;
}
.feature__foot .work__link { margin-top: 16px; }
.feature__foot { margin-top: 16px; border-top: 1px solid var(--hairline); }
.feature__foot .work__status { margin-top: 0; padding-top: 12px; border-top: 0; }
.feature__foot .work__link { margin-top: 10px; }

/* Eagle's Nest — logo + wide photo, then a strip of on-site portraits */
.feature__visuals--gallery { grid-template-columns: 1fr 1fr; grid-template-rows: auto; }
.feature__visuals--gallery .feature__crest { grid-row: auto; }
.feature__photo--wide img { aspect-ratio: 3 / 2; }
.feature__strip {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 24px;
}
.feature__strip .feature__photo img { aspect-ratio: 2 / 3; }
.feature__credit {
  grid-column: 1 / -1;
  margin: -8px 0 0;
  font-size: 13px;
  color: var(--slate);
}
@media (max-width: 640px) {
  .feature__visuals--gallery { grid-template-columns: 1fr; }
  .feature__strip { grid-template-columns: 1fr 1fr; gap: 12px; }
}

/* Aurora — site screens: one wide, three below */
.feature__visuals--screens { grid-template-columns: 1fr; }
.feature__screen { background: #071A24; border: 1px solid var(--hairline); }
.feature__screen img { aspect-ratio: 16 / 10; }
.feature__screen--dark { background: #17181A; }
.feature__strip--3 { grid-template-columns: repeat(3, 1fr); }
.feature__strip--3 .feature__photo img { aspect-ratio: 16 / 10; }
@media (max-width: 640px) {
  .feature__strip--3 { grid-template-columns: 1fr; }
}

/* ---------- Photo grids (home, about, services, method) ---------- */
.figure__grid { display: grid; gap: 24px; }
.figure__grid--3 { grid-template-columns: repeat(3, 1fr); }
.figure__grid--2 { grid-template-columns: repeat(2, 1fr); }
.figure__grid .figure__media { aspect-ratio: 4 / 5; }
.figure__grid--2 .figure__media { aspect-ratio: 1 / 1; }
.figure--lead { margin-top: 0; margin-bottom: clamp(56px, 7vw, 96px); }
@media (max-width: 700px) {
  .figure__grid { gap: 12px; }
  .figure__grid--3 { grid-template-columns: 1fr 1fr; }
  .figure__grid--3 .figure__media:first-child { grid-column: 1 / -1; aspect-ratio: 4 / 3; }
}

/* Contact aside image */
.contact__image { margin: 48px 0 0; aspect-ratio: 4 / 5; overflow: hidden; background: var(--ink); }
.contact__image img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1); }
.service:first-of-type { border-top: 1px solid var(--ink); }
img[src$="arch-concrete-corner.jpg"] { object-position: 50% 80%; }

/* Aurora — logo row (square) and phone row (9:16) */
.feature__strip--logos .feature__photo img { aspect-ratio: 1 / 1; }
.feature__strip--phones .feature__photo img { aspect-ratio: 9 / 16; }
.feature__strip--phones + .feature__credit { margin-top: -8px; }
@media (max-width: 640px) {
  .feature__strip--logos, .feature__strip--phones { grid-template-columns: repeat(3, 1fr); gap: 8px; }
}

/* Laptop + phone mockups (Red E, Aurora Surveys); behaviour in main.js */
.device-stage {
  --p: 0;
  position: relative;
  width: min(100%, 1040px);
  margin: 0 auto;
  aspect-ratio: 1555 / 1012;
  margin-block: clamp(8px, 2vw, 24px);
}
.device { position: absolute; }
.device__frame { position: absolute; inset: 0; width: 100%; height: 100%; display: block; pointer-events: none; z-index: 2; }
.device__screen { position: absolute; overflow: hidden; background: var(--screen-bg, #17181A); z-index: 1; isolation: isolate; }
.device--laptop { left: 0; top: 0; width: 88%; }
.device--laptop { aspect-ratio: 1555 / 1012; }
/* opening is x172-1384, y69-855 of the 1555x1012 frame; its anti-aliased edge is ~3px wider, so the screen
   extends 5px past the opening, tucked under the opaque bezel, or the page background shows through as a thin line */
.device--laptop .device__screen { left: 10.74%; top: 6.32%; width: 78.65%; height: 78.75%; border-radius: 1.635% / 2.509%; clip-path: inset(0 round 1.635% / 2.509%); }
.device__page { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: top; opacity: 0; }
.device__page:first-child { opacity: 1; z-index: 1; }
/* laptop screen is a button: click / tap / Enter / Space shows the next page */
.device__carousel { appearance: none; -webkit-appearance: none; border: 0; padding: 0; margin: 0; font: inherit; color: inherit; cursor: pointer; display: block; -webkit-tap-highlight-color: transparent; }
.device__carousel:focus { outline: none; }
/* focus ring sits on an overlay, above the stacked page images */
.device__carousel:focus-visible::after { content: ""; position: absolute; inset: 0; border-radius: inherit; z-index: 1000; pointer-events: none; box-shadow: inset 0 0 0 3px #fff, inset 0 0 0 6px #8A2E2A; }
.device--phone { right: 0; bottom: 0; width: 22%; aspect-ratio: 388 / 800; z-index: 3; filter: drop-shadow(0 12px 24px rgba(0, 0, 0, .28)); }
/* screen opening is a rounded rect with a ~52px corner radius (of 354x772): clip the content to that exact shape.
   clip-path as well as border-radius, because Safari can ignore overflow rounding for transformed children. */
/* opening is x17-370, y14-785 of the 388x800 frame, but the frame is only fully opaque up to 1px short of it, so
   the screen extends 3px past the opening (x14-373, y11-788, 360x778), tucked under the bezel; otherwise the page
   background shows through as a thin line. Corner radius 52 + 3 = 55px. */
.device--phone .device__screen { left: 3.608%; top: 1.375%; width: 92.784%; height: 97.25%; border-radius: 15.28% / 7.07%; clip-path: inset(0 round 15.28% / 7.07%); }
.device__scroll {
  display: block; width: 100%; height: auto;
  margin-top: 13.06%; /* starts below the Dynamic Island (47px of 360) */
  /* --travel (px) is how far the capture overflows the screen; main.js measures it. No overflow, no movement. */
  transform: translate3d(0, calc(var(--p, 0) * var(--travel, 0px) * -1), 0);
  will-change: transform;
}
/* Live website demos (see assets/js/live-demos.js). Hidden until a demo URL is configured for the environment;
   the screenshots (.device__static) are the fallback. The iframe is a fixed logical viewport scaled into the
   existing screen box, so it never affects layout, and it is a display only: it can't be clicked, focused or scrolled. */
.device__live { display: none; pointer-events: none; }
.device-stage.is-live .device__live { display: block; }
.device-stage.is-live .device__static { display: none; }
/* The phone's drop shadow on a live-demo stage is a plain box-shadow on a layer behind the screen, not a CSS filter:
   Safari clips a filter to the element's box when a live iframe is inside it, which left a hard-edged pale rectangle
   around the phone (iPhone Safari). Same shadow, shaped to the phone's outline (corner radius 78px of 388 x 800). */
.device-stage.is-live .device--phone { filter: none; }
.device-stage.is-live .device--phone::before {
  content: ""; position: absolute; inset: 0; z-index: 0;
  border-radius: 20.1% / 9.75%;
  box-shadow: 0 12px 48px rgba(0, 0, 0, .28); /* = the old filter's drop-shadow(0 12px 24px): its blur is a std-dev, this one a diameter */
  pointer-events: none;
}

.device__live-frame {
  position: absolute; left: 0; top: 0;
  margin: 0; padding: 0; border: 0; max-width: none;
  background: var(--screen-bg, #17181A);
  transform: scale(var(--live-scale, 1)); transform-origin: 0 0;
  opacity: 0; transition: opacity .45s ease;
  pointer-events: none;
}
.device__live-frame.is-loaded { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .device__live-frame { transition: none; }
}
/* Aurora Surveys: the site is a near-black navy, so any screen not filled by a capture matches it */
.device-stage--aurora { --screen-bg: #071923; }
@media (max-width: 640px) {
  .device--laptop { width: 86%; }
  .device--phone { width: 30%; }
}
@media (prefers-reduced-motion: reduce) {
  .device__scroll { will-change: auto; }
}

/* ---------- Client feedback (private page: client-feedback.html) ----------
   An architectural specification sheet: hairline rules, square controls, no colour. */

.fb { --fb-w: 720px; }
.fb-note { margin-top: 20px; font-size: 14px; color: var(--slate); }

.fb-progress-wrap { margin-bottom: clamp(40px, 5vw, 64px); }
.fb-progress { display: grid; grid-template-columns: repeat(5, 1fr); gap: 12px; }
.fb-progress__item {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding-top: 12px;
  border-top: 2px solid var(--hairline);
  color: var(--stone);
}
.fb-progress__item .index, .fb-progress__name { color: inherit; }
.fb-progress__name { font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase; }
.fb-progress__item.is-done { border-top-color: var(--slate); color: var(--slate); }
.fb-progress__item.is-current { border-top-color: var(--ink); color: var(--ink); }
.fb-progress__text {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}

.fb-step__title {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin-bottom: clamp(24px, 3vw, 40px);
  font-size: clamp(30px, 3.4vw, 44px);
  line-height: 1.08;
  letter-spacing: -0.012em;
}
.fb-step__title .index { font-size: 17px; }
.fb-step__title:focus { outline: none; }
.fb-step:not([hidden]) { animation: fb-in .22s ease; }
@keyframes fb-in { from { opacity: 0; } to { opacity: 1; } }

.fb-q {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  padding: 36px 0 44px;
  border-top: 1px solid var(--hairline);
}
.fb-step__title + .fb-q { border-top-color: var(--ink); }
.fb-q__idx {
  grid-column: 1 / span 3;
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0 8px;
  align-self: start;
  padding-top: 6px;
  font-weight: 600;
  font-size: 13px;
  line-height: 1.4;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}
.fb-q__idx .index { font-size: 15px; letter-spacing: 0.02em; }
.fb-q__tag::before { content: "— "; }
.fb-q__body { grid-column: 4 / -1; min-width: 0; }
.fb-q__title {
  max-width: 28em;
  margin-bottom: 20px;
  font-size: clamp(20px, 2vw, 25px);
  line-height: 1.25;
  letter-spacing: -0.01em;
}
.fb-q__title .optional {
  display: block;
  margin: 10px 0 0;
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--stone);
}
.fb-q__hint { max-width: 38em; margin: -8px 0 20px; font-size: 15px; color: var(--slate); }
.fb-q.has-error .fb-q__idx .index { color: var(--ink); }
.fb-q .field__error { max-width: 38em; margin-top: 14px; }
.fb-q.has-error .field__error { display: block; }

/* 1–10, 0–10, 1–5 rating strips: one hairline grid, square cells */
.fb-scale {
  display: grid;
  grid-template-columns: repeat(var(--n), 1fr);
  max-width: var(--fb-w);
  border-top: 1px solid var(--hairline);
  border-left: 1px solid var(--hairline);
}
.fb-scale--10 { --n: 10; }
.fb-scale--11 { --n: 11; }
.fb-scale--5 { --n: 5; }
.fb-rate { position: relative; display: block; cursor: pointer; }
.fb-rate input {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  margin: 0;
  opacity: 0;
  cursor: pointer;
}
.fb-rate span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 56px;
  border-right: 1px solid var(--hairline);
  border-bottom: 1px solid var(--hairline);
  background: var(--paper);
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 18px;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
  transition: background-color .12s ease, color .12s ease;
}
.fb-rate:hover span { background: var(--mist); }
.fb-rate input:checked + span { background: var(--ink); color: var(--paper); }
.fb-rate input:focus-visible + span { outline: 2px solid var(--ink); outline-offset: 2px; position: relative; z-index: 1; }
.fb-scale__ends {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  max-width: var(--fb-w);
  margin-top: 12px;
  font-size: 13px;
  color: var(--stone);
}
.fb-scale__ends span:last-child { text-align: right; }

.fb-matrix { max-width: var(--fb-w); }
.fb-matrix__key { margin: 0 0 12px; font-size: 13px; color: var(--stone); }
.fb-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 280px;
  align-items: center;
  gap: 8px 24px;
  padding: 14px 0;
  border-top: 1px solid var(--hairline);
}
.fb-row:last-child { border-bottom: 1px solid var(--hairline); }
.fb-row__label { font-weight: 500; font-size: 16px; line-height: 1.35; }
.fb-row .fb-scale { max-width: none; }
.fb-row .fb-rate span { min-height: 48px; }
.fb-row.has-error .fb-row__label { font-weight: 600; }
.fb-row.has-error { border-left: 2px solid var(--ink); padding-left: 14px; }

/* Radio + checkbox lists: full-width hairline rows, square marks */
.fb-options { max-width: var(--fb-w); border-top: 1px solid var(--hairline); }
.fb-opt {
  position: relative;
  display: flex;
  align-items: center;
  gap: 16px;
  min-height: 56px;
  padding: 12px 0;
  border-bottom: 1px solid var(--hairline);
  cursor: pointer;
}
.fb-opt input { position: absolute; inset: 0; width: 100%; height: 100%; margin: 0; opacity: 0; cursor: pointer; }
.fb-opt__mark {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
  border: 1px solid var(--ink);
  background: var(--paper);
  transition: background-color .12s ease;
}
.fb-opt__text { font-size: 17px; line-height: 1.35; }
.fb-opt:hover .fb-opt__mark { background: var(--mist); }
.fb-opt input:focus-visible ~ .fb-opt__mark { outline: 2px solid var(--ink); outline-offset: 3px; }
.fb-opt--radio input:checked ~ .fb-opt__mark::after {
  content: "";
  position: absolute;
  inset: 5px;
  background: var(--ink);
}
.fb-opt--checkbox input:checked ~ .fb-opt__mark { background: var(--ink); }
.fb-opt--checkbox input:checked ~ .fb-opt__mark::after {
  content: "";
  position: absolute;
  left: 6px;
  top: 3px;
  width: 6px;
  height: 11px;
  border: solid var(--paper);
  border-width: 0 2px 2px 0;
  transform: rotate(45deg);
}

.fb-reveal, .fb-attr { max-width: var(--fb-w); }
.fb-reveal { padding-top: 20px; }
.fb-reveal label { display: block; margin-bottom: 8px; font-weight: 600; font-size: 15px; }
.fb-q textarea.input { max-width: var(--fb-w); }
.fb-q textarea.fb-short { min-height: 120px; }
.fb-q textarea.fb-long { min-height: 200px; }

.fb-actions {
  display: flex;
  gap: 12px;
  margin-top: 16px;
  padding-top: 32px;
  border-top: 1px solid var(--ink);
}
.fb-actions #fb-next { margin-left: auto; min-width: 180px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn:disabled:hover { background: var(--ink); color: var(--paper); }
.fb .form-status { max-width: var(--fb-w); }

.fb-hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.fb-done { padding-top: clamp(24px, 4vw, 48px); border-top: 1px solid var(--ink); }
.fb-done:focus { outline: none; }
.fb-done .display { max-width: 10em; margin-bottom: 32px; }
.fb-done[hidden] { display: none; }

@media (max-width: 860px) {
  .fb-q { display: block; padding: 28px 0 36px; }
  .fb-q__idx { margin-bottom: 14px; padding-top: 0; }
}
@media (max-width: 640px) {
  .fb-progress { gap: 6px; }
  .fb-progress__name { display: none; }
  .fb-progress__text {
    position: static !important; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal;
    margin: 16px 0 0; font-weight: 600; font-size: 13px; letter-spacing: 0.14em; text-transform: uppercase;
  }
  .fb-row { grid-template-columns: 1fr; }
  .fb-row .fb-rate span { min-height: 52px; }
}
@media (max-width: 560px) {
  /* 5 per row for 1–10, 6 per row for 0–10: cells stay ≥ 52px wide and 56px tall at 320px */
  .fb-scale--10 { --n: 5; }
  .fb-scale--11 { --n: 6; }
  .fb-rate span { min-height: 56px; }
  .fb-actions .btn { flex: 1; }
  .fb-actions #fb-next { min-width: 0; }
  }
@media (prefers-reduced-motion: reduce) {
  .fb-step:not([hidden]) { animation: none; }
  .fb-rate span, .fb-opt__mark { transition: none; }
}

/* ---------- Testimonial (home) ----------
   An editorial pull quote on the existing grid: hairline rule, Switzer for the lead sentence, no card or ornament. */

.testimonial {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 40px;
  margin: 0;
  padding-top: clamp(32px, 4vw, 48px);
  border-top: 1px solid var(--ink);
}
.testimonial__quote { grid-column: 1 / span 8; margin: 0; }
.testimonial__quote p { margin: 0; max-width: 40em; font-size: clamp(17px, 1.4vw, 19px); line-height: 1.6; color: var(--slate); }
.testimonial__lead {
  display: block;
  margin-bottom: 1em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(25px, 3vw, 38px);
  line-height: 1.2;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.testimonial__source { grid-column: 10 / -1; align-self: end; display: flex; flex-direction: column; gap: 4px; }
.testimonial__source strong { font-family: var(--font-display); font-weight: 600; font-size: 19px; letter-spacing: -0.01em; }
.testimonial__source span { font-size: 15px; color: var(--slate); }
.testimonial__source .text-link { align-self: flex-start; margin-top: 20px; }
@media (max-width: 960px) {
  .testimonial__quote, .testimonial__source { grid-column: 1 / -1; }
}

/* ---------- Combined client revenue (homepage) ----------
   A full-width ink band straight after the hero. Hidden until the Worker returns a total. Motion is restrained
   and runs once (results.js adds .is-in when the band first scrolls into view); the figure counts up, and the rail
   under it fills in step with the count. Reduced motion: everything is simply shown, finished. */

.results {
  --line: rgba(255, 255, 255, 0.22);
  --line-soft: rgba(255, 255, 255, 0.08);
  position: relative;
  overflow: hidden;
  padding: clamp(80px, 11vw, 160px) 0;
}
.results[hidden] { display: none; }
/* While the total loads the band is already laid out at its final size (same markup, a placeholder figure) but
   shows nothing and is inert, so the page below never moves. If there is no total it is removed ([hidden]). */
.results.is-loading { pointer-events: none; user-select: none; }
.results__inner { position: relative; }

/* faint column grid behind the content */
.results__cols {
  position: absolute;
  inset: 0 var(--gutter);
  pointer-events: none;
  background-image: linear-gradient(to right, var(--line-soft) 1px, transparent 1px);
  background-size: calc(100% / 6) 100%;
  border-right: 1px solid var(--line-soft);
  opacity: 0;
  transition: opacity 1.6s ease;
}
.results.is-in .results__cols { opacity: 1; }

.results__top { position: relative; display: flex; justify-content: space-between; align-items: baseline; gap: 24px; padding-bottom: 28px; }
.results__top .eyebrow { margin: 0; }
.results__top .index { flex: none; white-space: nowrap; }

.results__rule {
  position: relative;
  display: block;
  height: 1px;
  background: var(--line);
  transform: scaleX(0);
  transform-origin: left center;
  transition: transform 1.5s cubic-bezier(0.22, 0.8, 0.2, 1);
}
.results.is-in .results__rule { transform: none; }
.results__rule + .results__headline + .results__rule { transition-delay: 0.35s; }

.results__headline {
  position: relative;
  max-width: 13em;
  padding: clamp(36px, 5vw, 72px) 0;
  font-size: clamp(34px, 5.4vw, 80px);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.02em;
}

.results__metric { position: relative; padding-top: clamp(32px, 4vw, 56px); }
.results__label {
  display: flex;
  align-items: baseline;
  gap: 16px;
  margin: 0 0 clamp(20px, 3vw, 36px);
  font-weight: 600;
  font-size: 13px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stone);
}

/* The figure sizes itself so any total fits its width on one line (--len is set from the final text). */
.results__figure { margin: 0; container-type: inline-size; }
.results__value {
  position: relative;
  display: block;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: min(15vw, 200px);
  font-size: min(calc(100cqw / (var(--len, 11) * 0.62)), 200px);
  line-height: 1;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
/* The ghost holds the final text invisibly, reserving the exact width and height, so counting never shifts layout. */
.results__ghost { visibility: hidden; display: block; }
.results__live { position: absolute; left: 0; top: 0; }

/* progress rail: fills as the number counts */
.results__rail { position: relative; display: block; height: 1px; margin-top: clamp(20px, 3vw, 36px); background: var(--line-soft); }
.results__rail-fill {
  position: absolute;
  inset: 0;
  background: var(--paper);
  transform: scaleX(var(--p, 0));
  transform-origin: left center;
}

.results__foot {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px 48px;
  flex-wrap: wrap;
  padding-top: 24px;
}
.results__note { margin: 0; max-width: 32em; font-size: 16px; color: var(--paper); }

/* labels and headline fade/rise into place, staggered */
.results__rise { opacity: 0; transform: translateY(14px); transition: opacity 0.9s ease, transform 0.9s cubic-bezier(0.22, 0.8, 0.2, 1); }
.results.is-in .results__rise { opacity: 1; transform: none; }
.results__top .eyebrow { transition-delay: 0.1s; }
.results__top .index { transition-delay: 0.2s; }
.results__headline { transition-duration: 1.1s; transition-delay: 0.3s; }
.results__label { transition-delay: 0.6s; }
.results__note { transition-delay: 1.8s; }

@media (max-width: 640px) {
  .results__cols { background-size: calc(100% / 3) 100%; }
  .results__top { padding-bottom: 20px; }
  .results__foot { flex-direction: column; align-items: flex-start; }
}

@media (prefers-reduced-motion: reduce) {
  .results__cols, .results__rule, .results__rise { transition: none; opacity: 1; transform: none; }
}

.case-quote {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  column-gap: 24px;
  row-gap: 8px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-top: 24px;
  border-top: 1px solid var(--ink);
}
.case-quote .feature__label { grid-column: 1 / span 3; margin: 6px 0 0; }
.case-quote__figure { grid-column: 4 / -1; margin: 0; }
.case-quote__text { margin: 0; }
.case-quote__text p { margin: 0; max-width: 42em; font-size: clamp(16px, 1.3vw, 18px); line-height: 1.6; color: var(--slate); }
.case-quote__lead {
  display: block;
  margin-bottom: 0.9em;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(22px, 2.3vw, 30px);
  line-height: 1.22;
  letter-spacing: -0.012em;
  color: var(--ink);
}
.case-quote__source { display: flex; flex-direction: column; gap: 2px; margin-top: 24px; }
.case-quote__source strong { font-family: var(--font-display); font-weight: 600; font-size: 17px; letter-spacing: -0.01em; }
.case-quote__source span { font-size: 14px; color: var(--slate); }
@media (max-width: 860px) {
  .case-quote .feature__label, .case-quote__figure { grid-column: 1 / -1; }
}
