/* ============================================================
   HOME — sections that only exist on the index
   ============================================================ */

/* ---------- HERO ----------
   Figma 479:5045 — badge at 64, text block at 160 (640 wide), coord
   line at 528 running the full 1200 container. */
/* Two knobs, both live here so they are easy to find:
   --hero-gap  spacing between badge, text block and coord line
   --hero-tail extra room under the CTA, on top of --hero-gap */
.hero {
  padding-block: var(--space-64);
  --hero-gap:  var(--space-64);
  --hero-tail: 0px;
}
.hero__inner { display: grid; row-gap: var(--hero-gap); }

/* ---------- HERO CASCADE ----------
   Spec §3: on load, no scroll. Delays reused from the coming soon.
   Applied via a class on <html> so nothing flashes before the CSS
   parses, and only added when motion is allowed. */
.js-cascade .nav,
.js-cascade .badge,
.js-cascade .hero__name,
.js-cascade .hero__role,
.js-cascade .hero__lede,
.js-cascade .hero__text .btn,
.js-cascade .coord-rail {
  opacity: 0;
  transform: translateY(14px);
  animation: hero-in var(--dur-slow) var(--ease-out) forwards;
}
.js-cascade .nav         { animation-delay:  20ms; }
.js-cascade .badge       { animation-delay: 100ms; }
.js-cascade .hero__name  { animation-delay: 180ms; }
.js-cascade .hero__role  { animation-delay: 250ms; }
.js-cascade .hero__lede,
.js-cascade .hero__text .btn { animation-delay: 400ms; }
.js-cascade .coord-rail  { animation-delay: 550ms; }

@keyframes hero-in {
  to { opacity: 1; transform: none; }
}

/* On phones the hero takes the whole screen below the fixed header.
   The badge and the text stay packed at the top at their normal
   spacing; all the leftover screen height collects in one row under
   the CTA, and the coord line rides the bottom edge like a map margin.
   Spreading the slack evenly (space-between) pushed the headline into
   the middle of the screen, which is not where it belongs.

   svh, not vh: vh on iOS measures the viewport with the URL bar
   hidden, so a 100vh hero is taller than what you can actually see and
   the coord line starts below the fold. svh measures the smallest
   state, so the hero always fits — and unlike dvh it doesn't resize
   while you scroll. vh first as a fallback for older browsers. */
@media (max-width: 767px) {
  .hero { min-height: calc(100vh - var(--nav-h)); }
  @supports (height: 100svh) {
    .hero { min-height: calc(100svh - var(--nav-h)); }
  }
  .hero__inner {
    align-content: start;
    grid-template-rows: auto auto 1fr;   /* the tail row absorbs the slack */
  }
  .hero__inner > .coord-rail {
    align-self: end;
    margin-top: var(--hero-tail);
  }
}

/* Outlined in brand/accent, not border/strong — the badge is the one
   piece of the hero that flags status, and it is meant to read hot. */
.badge {
  /* justify-self, not align-self: in a grid, align-self is the block
     axis. The badge is a grid item, so it was being blockified and
     stretched to the full column instead of hugging its label. */
  display: inline-flex;
  justify-self: start;
  padding: var(--space-4) var(--space-8);
  border: 1px solid var(--brand-accent);
  font-size: var(--fs-callout); line-height: var(--lh-callout);
  /* No tracking. The 6% belongs to the section labels, not here — I had
     applied it as a blanket rule for anything uppercase, which stretched
     this label past its box. Figma sets letter-spacing 0 on this node. */
  letter-spacing: var(--ls-none);
  text-transform: uppercase;
  color: var(--brand-accent);
}

/* Name / role / lede are 8 apart; the CTA sits 16 below the block. */
.hero__text { display: grid; gap: var(--space-8); max-width: var(--layout-col-wide); }
.hero__text .btn { margin-top: var(--space-8);
  /* The hero CTA carries a 1px lift in the design. */
  filter: drop-shadow(0 1px 1px rgb(var(--shadow-color) / 0.06)); }
.hero__name {
  font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-title-2); line-height: var(--lh-title-2);
  color: var(--content-primary); margin: 0;
}
.hero__role { font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-display); line-height: var(--lh-display); margin: 0; letter-spacing: -0.01em;
  color: var(--content-primary); }
/* The discipline lands in brand/primary — the sentence names the role
   and then points at it. */
.hero__role em { font-style: normal; color: var(--brand-primary); }
.hero__lede { font-size: var(--fs-body); line-height: var(--lh-body); color: var(--content-secondary); margin: 0; max-width: var(--layout-measure); }

/* Spans the container and sits right-aligned at the foot of the hero.
   No rule above it — the only horizontal lines on this page belong to
   the background grid, and I had invented a border here. */
.coord-rail {
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--content-subtle);
  text-align: right;
  margin: 0;
}

/* Section labels: 14px, 6% tracking, content/tertiary. Plain text —
   the home has no rule under its section headings. */
.section-label {
  font-size: var(--fs-caption); line-height: var(--lh-caption);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--content-tertiary);
  margin: 0;
}
.section-label--split { display: flex; justify-content: space-between; gap: var(--space-16); }

/* ---------- OPERATIONS ----------
   Figma: 400 index / 160 gutter / 640 stack, inside the 1200 container.
   Not the 304/80/640 the case study uses — the home is its own rhythm. */
.ops-layout {
  display: grid;
  gap: var(--space-40);
  /* start, not the default stretch. A stretched grid item gets a
     definite height, and that is the one thing that differed between
     desktop — where the pile works — and the two smaller widths, where
     the cards refused to overlap. The stack has to size to its own
     content for the sticky cards inside it to have room to travel. */
  align-items: start;
}

/* Below 1024 the section is a single column: label, description, the
   sheaf, then the complementary records. The numbered index is a
   desktop affordance — it exists to pair with the sticky side column,
   and without that column it just repeats the cards. Figma drops it at
   both 768 and 375, so it is hidden rather than restyled. */
.ops-index { display: grid; gap: var(--space-32); align-content: start; }
.ops-index__list { display: grid; }

/* The DOM is already in the order small screens need — label,
   description, the pile, then the complementary records — so nothing
   is reordered and the aside stays a real box.

   It used to be label and description inside the aside, with
   display:contents dissolving it and `order` shuffling four items back
   into place below 1024. That worked visually but left the stack
   sitting in an order-shifted, contents-dissolved grid, and the sticky
   cards inside it never engaged there while desktop was fine. Plain
   structure removes the question. */
@media (max-width: 1023px) {
  .ops-layout { gap: var(--space-16); }
  /* The numbered index pairs with the sticky side column. Without that
     column it only repeats the cards, so Figma drops it at 768 and 375. */
  .ops-index__list { display: none; }
}
@media (min-width: 768px) and (max-width: 1023px) {
  .ops-layout { gap: var(--space-24); }
}

@media (min-width: 1024px) {
  .ops-layout {
    /* 400 / 160 / 640 is the 1440 case. Both tracks shrink, or the
       section blows past the container at every width between 1024 and
       1440 — most laptops, and an iPad 13 in portrait at exactly 1024. */
    grid-template-columns: minmax(0, 400px) minmax(0, 640px);
    /* Rows 1 and 2 hug their text; row 3 absorbs the rest of the
       stack's height so the index sits under the description instead
       of being pushed to the vertical middle. */
    grid-template-rows: auto auto 1fr;
    /* column-gap only. The 160 is the gutter between the two columns —
       as a shorthand `gap` it also landed between the three rows of the
       left column, throwing 320px of air between the label, the
       description and the index. The left column's own rhythm is 32,
       the same as the Figma index-col. */
    column-gap: clamp(var(--space-40), 11vw, 160px);
    row-gap: var(--space-32);
    justify-content: space-between;
  }
  /* Explicit placement instead of source order: the left column stacks
     label, description and index; the stack holds column two for the
     full height of the section. */
  .ops-layout > .section-label { grid-area: 1 / 1; }
  .ops-layout > .t-body        { grid-area: 2 / 1; }
  .ops-layout > .ops-index     { grid-area: 3 / 1; align-self: start; }
  .ops-layout > .card-stack    { grid-area: 1 / 2 / 4 / 3; }
  .ops-index { position: sticky; top: calc(var(--nav-h) + var(--ops-pt)); }
}

/* 56px rows: numeral in a fixed 28px column, name at 16px. The numeral
   is content/subtle and the name content/secondary — the index reads
   as reference, the cards carry the weight. */
.ops-index__row {
  display: grid; grid-template-columns: 28px minmax(0, 1fr); align-items: center;
  gap: var(--space-16);
  min-height: 56px;
  border-bottom: 1px solid var(--border-strong);
  text-decoration: none; color: var(--content-secondary);
  font-size: var(--fs-body); line-height: var(--lh-body);
  transition: color var(--dur-fast);
}
.ops-index__row:hover,
.ops-index__row.is-active { color: var(--content-primary); }
.ops-index__row.is-active .ops-index__num { color: var(--brand-primary); }
.ops-index__num {
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  color: var(--content-subtle); letter-spacing: var(--ls-num);
  font-variant-numeric: tabular-nums;
}

.ops-extra { display: grid; margin-top: var(--space-40); }
.ops-extra__row {
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-12);
  min-height: 56px;
  border-bottom: 1px solid var(--border-strong);
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--content-link);
  margin: 0;
}
.ops-extra__row:hover span:first-child,
.ops-extra__row:focus-visible span:first-child { text-decoration: underline; text-underline-offset: 4px; }
.ops-extra__row span:last-child {
  font-size: var(--fs-callout); color: var(--content-tertiary);
  letter-spacing: var(--ls-label);
}

/* ---------- OPERATION CARDS ----------
   Figma: 640x484, 32px radius, no border, and the three card surfaces
   cycling 1-2-3-1-2-3 down the deck. */
/* The sheaf is the resting layout, not a scroll effect. Figma builds it
   with a vertical auto-layout at a negative gap, so each card overlaps
   the one before and only a lip shows. The three breakpoints check out
   exactly: 396+5×52=656, 416+5×68=756, 484+5×72=844.

   Negative margin, not sticky: the pile simply exists, costs no scroll
   and hijacks nothing — which is what spec §1 is protecting. The cards
   still deal into it on entry (see below). Later cards paint over
   earlier ones by document order, so no z-index is needed. */
.ops-layout {
  /* Figma pads the card asymmetrically — the bottom is roughly twice
     the top, which is what gives the open card its footing. I had one
     uniform value, so all the slack piled up under the button. */
  --card-h:    396px;  --deck-lip:  52px;  --deck-lip-max:  52px;
  --card-pt:    16px;  --card-pb:   24px;  --card-px: 20px;  --card-gap: 20px;
  --ops-pt:     24px;  /* section top padding = the first card's pin */
}
/* flow-root, not grid. Per CSS Position, a sticky box is "constrained
   to remain within its containing block", and for a grid item that
   containing block is its grid area. One auto row per card means the
   area is exactly the card's own height — no room to shift, so it can
   never pin. In normal flow the containing block is the whole stack. */
.card-stack { display: flow-root; }
@media (min-width: 768px) {
  .ops-layout {
    --card-h:  416px;  --deck-lip:  68px;  --deck-lip-max:  68px;
    --card-pt:  24px;  --card-pb:   36px;  --card-px: 32px;  --card-gap: 32px;
    --ops-pt:   32px;
  }
}
/* Below desktop the lip gives way before the card's foot does. With a
   fixed 68 the last card pins at 452 and runs to 868 — on a tablet in
   landscape (768 tall) that buries the button by 100px. Tying the lip
   to the space actually available keeps every card's button on screen,
   and on a tall viewport the min() resolves to the Figma value anyway.
   Floored at 28 so the pile still reads as a pile. */
@media (max-width: 1023px) {
  .ops-layout {
    --deck-lip: clamp(28px, calc((100svh - var(--nav-h) - var(--ops-pt)
                 - var(--card-h) - var(--space-24)) / 5), var(--deck-lip-max));
  }
}

@media (min-width: 1024px) {
  .ops-layout {
    --card-h:  484px;  --deck-lip:  72px;
    --card-pt:  32px;  --card-pb:   64px;  --card-px: 40px;  --card-gap: 40px;
    --ops-pt:   56px;
  }
}

.op-card {
  display: grid; gap: var(--card-gap);
  align-content: start;
  min-height: var(--card-h);
  padding: var(--card-pt) var(--card-px) var(--card-pb);
  background: var(--surface-card1);
  border-radius: var(--radius-default);
  /* Figma has a static drop shadow on every card: 2,2 blur 24 at 6%,
     which is exactly --shadow-sm. I had removed it reading spec §2's
     "no animar la sombra" as "no shadow" — it says don't animate it. */
  box-shadow: var(--shadow-sm);
  scroll-margin-top: calc(var(--nav-h) + var(--ops-pt));
}

/* ---------- THE PILE ----------
   Sticky at every width. Each card holds the screen on its own until
   the next one reaches it and comes to rest one lip lower — that is the
   whole effect, and it is the same at 375 as at 1440.

   The flow height of a card is what buys the pause: a card occupies its
   full height in the document, so you scroll past all of it before the
   next one arrives. The pins accumulate, and by the end all six sit in
   the 656 / 756 / 844px pile the Figma frames show. */
.op-card {
  position: sticky;
  top: calc(var(--nav-h) + var(--ops-pt) + var(--i-pin) * var(--deck-lip));
}

.op-card:nth-child(3n + 2) { background: var(--surface-card2); }
.op-card:nth-child(3n + 3) { background: var(--surface-card3); }

/* The pin index belongs in CSS, not in JS. It was being set as an
   inline style, and if that ever failed to run, var(--i-pin) resolved
   to nothing, the calc() went invalid, top fell back to auto, and a
   sticky element with top:auto simply never pins — the pile vanished
   with no error anywhere. The stack is layout; it should not need
   JavaScript to hold its shape. */
.op-card:nth-child(1) { --i-pin: 0; }
.op-card:nth-child(2) { --i-pin: 1; }
.op-card:nth-child(3) { --i-pin: 2; }
.op-card:nth-child(4) { --i-pin: 3; }
.op-card:nth-child(5) { --i-pin: 4; }
.op-card:nth-child(6) { --i-pin: 5; }

/* The lip: the strip that stays visible once the next card covers this
   one. Its height is the pin offset, so the two always agree. */
.op-card__head {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-12);
  min-height: calc(var(--deck-lip) - var(--card-pt));
  padding-bottom: var(--space-12);
  border-bottom: 1px solid var(--border-strong);
  font-size: var(--fs-footnote); letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--brand-primary);
  margin: 0;
}
/* Two colors in the design: the word in content/secondary, the digits
   in brand/accent — the file number is the one hot mark on a shut card. */
.op-card__file { color: var(--content-secondary); }
.op-card__file b { font-weight: inherit; color: var(--brand-accent); }

.op-card__name {
  font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-title-1); line-height: var(--lh-title-1);
  color: var(--content-primary); margin: 0;
}
/* Figma draws four rules inside the card: under the lip, above the
   meta pair, between the pair and the summary, and under the summary.
   Plus a vertical one splitting Client from Status. They are LINE nodes
   in the file, so they read as real dividers, not as card edges. */
.op-card__meta {
  display: grid;
  border-block: 1px solid var(--border-strong);
}
.op-card__pair {
  /* minmax(0,1fr), not 1fr: a grid column's default min-width is auto,
     so it refuses to shrink below its content and pushes the card wider
     than its container instead — which is how a page ends up with a
     horizontal scrollbar nobody asked for. */
  display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  border-bottom: 1px solid var(--border-strong);
}
.op-card__pair .op-card__field + .op-card__field {
  border-left: 1px solid var(--border-strong);
  padding-left: var(--space-24);
}
.op-card__field {
  display: grid; gap: var(--space-4);
  padding-block: var(--space-12);
  font-size: var(--fs-caption); line-height: var(--lh-caption);
  margin: 0;
}
.op-card__field--block { padding-inline: 0; }
.op-card__key { color: var(--content-tertiary); }
.op-card__val { color: var(--content-secondary); }

.op-card__foot { display: flex; align-items: center; justify-content: space-between; gap: var(--space-12); }
/* No dimming. Figma draws every card at full strength; the state is
   carried by the CLASSIFIED tag and the disabled button, which say it
   in words. Fading the whole card on top of that was my addition, and
   it stacked on an already low-contrast disabled label. */

/* ---------- DEALING THE FILE ----------
   Spec §1. The cards arrive as a stacked, misaligned sheaf and deal out
   to their list positions — once, when the section enters the viewport,
   without hijacking scroll.

   I had replaced this with sticky stacking, reading the 72px offsets in
   the Figma frame as the resting state. The spec rejects that pattern
   by name and gives three reasons: the scroll toll (9 projects would run
   past 7000px), it forces sequential consumption when a portfolio needs
   to be scannable, and it delays the one thing the site is for — getting
   someone to the email. The sheaf metaphor stays; the toll goes.

   Offsets cap at four levels: past the fifth card the fourth card's
   value repeats so the sheaf doesn't come apart. site.js sets --i. */
/* Sheaf offsets, capped at four levels as the spec asks: past the
   fifth card the fourth's value repeats so the stack doesn't come
   apart. In CSS for the same reason as --i-pin. */
.op-card:nth-child(1) { --i: 0; }
.op-card:nth-child(2) { --i: 1; }
.op-card:nth-child(3) { --i: 2; }
.op-card:nth-child(4) { --i: 3; }
.op-card:nth-child(n + 5) { --i: 4; }
.ops-extra__row:nth-child(2) { --i: 0; }
.ops-extra__row:nth-child(3) { --i: 1; }
.ops-extra__row:nth-child(4) { --i: 2; }

/* The hidden state is gated on .js. Without it, a script that never
   runs leaves every card at opacity 0 and the section reads as empty. */
.js .op-card {
  opacity: 0;
  transform:
    translateY(calc(var(--i) * -8px))
    translateX(calc(var(--i) * 3px))
    rotate(calc(var(--i) * -0.6deg))
    scale(calc(1 - var(--i) * 0.012));
  transform-origin: 50% 0%;
}
.op-card.is-in {
  opacity: 1;
  transform: none;
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-snap);
  transition-delay: calc(var(--i) * var(--stagger));
}

/* Complementary records: same pattern, no rotation or scale. They are
   supporting evidence and should not compete with the cards. */
.js .ops-extra__row { opacity: 0; transform: translateY(12px); }
.ops-extra__row.is-in {
  opacity: 1; transform: none;
  transition: opacity var(--dur-base) var(--ease-out),
              transform var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i) * var(--stagger));
}

/* ---------- CARD MICRO-INTERACTIONS ----------
   Spec §2. focus-within is required, not optional: the card answers the
   keyboard exactly as it answers the mouse. Touch has no hover, so
   :active carries the tap feedback. The shadow is deliberately not
   animated — the system is flat, and a growing shadow both breaks the
   language and costs a repaint.

   is-settled is added on transitionend, the same hook §7 uses to drop
   will-change. Without it the entrance transition (dur-base, staggered)
   would stay on the element and hover would inherit its delay. */
.op-card.is-settled {
  transition:
    transform var(--dur-fast) var(--ease-out),
    border-color var(--dur-fast) var(--ease-out);
  transition-delay: 0s;
  border: 1px solid transparent;
}
.op-card.is-settled:hover,
.op-card.is-settled:focus-within {
  transform: translateY(-2px);
  border-color: var(--brand-primary);
}
.op-card .ico { transition: transform var(--dur-fast) var(--ease-out); }
.op-card.is-settled:hover .ico,
.op-card.is-settled:focus-within .ico { transform: translateX(4px); }
.op-card.is-settled:active { transform: translateY(0); }

/* ---------- MARQUEE (client logos) ---------- */
/* Spec §4b. Without the edge fade, marks pop in and out against the
   margin. 80px on desktop, 40 below — a 80px fade on a 375px screen
   eats a fifth of the row. */
.marquee {
  overflow: hidden; --marquee-speed: 40s;
  --marquee-fade: 40px;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 var(--marquee-fade),
                      #000 calc(100% - var(--marquee-fade)), transparent);
          mask-image: linear-gradient(90deg, transparent, #000 var(--marquee-fade),
                      #000 calc(100% - var(--marquee-fade)), transparent);
}
@media (min-width: 1024px) { .marquee { --marquee-fade: 80px; } }
.marquee__track {
  display: flex; width: max-content;
  /* One of the few animations that runs continuously, so it earns
     a permanent will-change (spec §4b). */
  will-change: transform;
  animation: marquee-scroll var(--marquee-speed) linear infinite;
}
.marquee:hover .marquee__track,
.marquee:focus-within .marquee__track { animation-play-state: paused; }
.marquee__group { display: flex; align-items: center; flex-shrink: 0; }
.marquee__item {
  padding-inline: var(--space-40);
  font-family: var(--font-serif); font-size: var(--fs-title-3);
  color: var(--content-tertiary); white-space: nowrap;
}
/* Figma 479:5278 — a 104x80 cell per mark, in content/subtle, with a
   1x16 rule between. The exported files already carry that cell as
   their viewBox, so nothing is re-scaled.

   Inlined into the page, not masked from a file. I tried a CSS mask so
   the files could stay external and cacheable, and it fails on file://:
   the mask image is a cross-origin fetch there, and a mask that fails
   to load counts as transparent black — which hides the element
   instead of showing it unmasked. That is why you saw the dividers and
   nothing else. Coordinates are rounded to 2dp on the way into the
   sprite, and the sprite is tree-shaken per page, so the case study
   does not carry 60KB of client logos it never draws. */
.marquee__logo {
  position: relative;
  flex: none;
  display: grid; place-items: center;
  width: 104px; height: 80px;
  color: var(--content-subtle);
  transition: color var(--dur-fast);
}
.marquee__logo svg {
  width: 104px; height: 80px;
  fill: currentColor;
}
.marquee__logo:hover { color: var(--content-tertiary); }

/* Trailing, not between: the rule sits after EVERY mark, the last one
   included. Figma's row is 1489 wide = 9 cells + a ninth divider, and
   that ninth is what makes the loop seamless — the gap and rule at the
   seam are identical to every other gap, so the restart is invisible.
   The margin is on the right for the same reason: a left margin only
   applies between siblings, so the two groups would butt together. */
.marquee__logo { margin-right: var(--space-32); }
.marquee__logo::before {
  content: "";
  position: absolute;
  right: calc(var(--space-32) / -2);
  top: 50%; margin-top: -8px;
  width: 1px; height: 16px;
  background: currentColor;
}

/* Spec §4b: testimonials run at 60s against the logos' 40s. Same
   direction — opposite directions read as restless when both are on
   screen at once; the difference in speed is felt without the wobble.
   It also solves the overflow: five 360px cards at a 40px gap are
   1960px inside a 1200px container. */
.marquee--quotes {
  --marquee-speed: 60s; --marquee-fade: 0px;
  --quote-w: 335px; --quote-h: 360px; --quote-gap: var(--space-16);
  --quote-pt: 32px; --quote-px: 20px;  --quote-pb: 24px;
}
/* 360 is the desktop instance; below that the card keeps the master's
   335/16, because a 360 card at a 40 gutter leaves only one visible on
   a 768 tablet — a carousel showing a single item reads as a mistake. */
@media (min-width: 1024px) {
  .marquee--quotes {
    --quote-w: 360px; --quote-h: 462px; --quote-gap: var(--space-40);
    --quote-pt: 32px; --quote-px: 40px; --quote-pb: 64px;
  }
}
.marquee--quotes .marquee__group { display: flex; align-items: stretch; }

@keyframes marquee-scroll { to { transform: translateX(-50%); } }
@media (prefers-reduced-motion: reduce) {
  /* Spec §4b: stopping is not enough — a halted marquee leaves the far
     logos unreachable. It becomes a hand-scrollable row, and the
     duplicate group is dropped so screen readers don't read it twice. */
  .marquee__track { animation: none; }
  .marquee { overflow-x: auto; scroll-snap-type: x mandatory; }
  .marquee__group[aria-hidden="true"] { display: none; }
  .quote { scroll-snap-align: start; }
}

/* Figma 479:5278 is a single section — label, roster, label, slider —
   padded 56 top and bottom with 64 between each part. Two separate
   .sections stacked their 80px paddings and put 160px between the
   roster and the testimonials. */
.roster { padding-block: var(--space-56); }
/* justify-items: center stops grid items from stretching, so every
   child sizes to its own max-content unless it is told otherwise. A
   marquee's max-content is its whole duplicated track — 2448px — so a
   child without a width rule silently made the document that wide and
   gave the page a horizontal scrollbar. Every child gets the width,
   not just the ones tagged .bleed. */
.roster__inner {
  display: grid; gap: var(--space-64);
  justify-items: center;
}
/* Stated as `.section > …` so it outranks `.section > *:not(.bleed)` on
   purpose. At `.roster__inner` alone the two tied and this only won by
   load order, which is how the case study lost its page margins. */
.section > .roster__inner { width: 100%; }
.roster__inner > * {
  width: min(var(--layout-bleed), 100% - var(--margin-page) * 2);
  min-width: 0;
}
/* Both carousels run edge to edge. A marquee that stops at the page
   margin reads as a boxed widget; running it off both sides is what
   makes it read as a band passing through. Safe because .marquee clips
   its own track — the width here is definite (100%), never max-content,
   which is what gave the page a horizontal scrollbar before. */
.roster__inner > .marquee { width: 100%; }

/* Component 698:5564 is 280x360; the instances stretch per breakpoint.
   Desktop 360x462.86 with 32/40/64 padding, mobile 335x360 with 20.
   The quote heights differ per card (140 to 196) but every card is the
   same height — the author block is pinned to the foot. */
.quote {
  flex: 0 0 var(--quote-w);
  margin-right: var(--quote-gap);
  min-height: var(--quote-h);
  /* space-between, not start: Figma sets primaryAxisAlignItems
     SPACE_BETWEEN on both the master and every instance, which is what
     holds the author against the bottom padding however short the
     quote is. With align-content:start the tracks pack at the top and
     the leftover space falls outside them, so the margin-top:auto I
     had on the author had nothing to push against. */
  display: grid; gap: var(--space-24); align-content: space-between;
  padding: var(--quote-pt) var(--quote-px) var(--quote-pb);
  background: var(--surface-default);
  border-radius: 16px;
}
/* 16px mono in content/secondary — not a serif pull-quote. These are
   colleagues on the record, so they read as testimony, not as display. */
.quote__body {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--content-secondary); margin: 0;
}
/* The author sits at the foot of the card: a 56px portrait, the name in
   content/accent, the role in content/tertiary at 14px. */
/* counterAxisAlignItems MAX in the design: the portrait and the name
   sit on a shared baseline at the foot of the row, not centerd. */
.quote__by {
  display: grid; grid-template-columns: 56px minmax(0, 1fr);
  align-items: end; gap: var(--space-16);
}
.quote__face {
  width: 56px; height: 56px; border-radius: 50%;
  object-fit: cover;               /* Figma: IMAGE fill, scaleMode FILL */
  background: var(--surface-overlay);
}
/* Stand-in until a portrait arrives. Initials rather than an empty
   circle, which reads as a failed image. */
.quote__face--initials {
  display: grid; place-items: center;
  background: var(--bg-tertiary);
  color: var(--content-tertiary);
  font-size: var(--fs-caption); letter-spacing: var(--ls-label);
}
.quote__name { color: var(--content-accent); font-size: var(--fs-body); line-height: var(--lh-body); text-transform: none; }
.quote__role { color: var(--content-tertiary); font-size: var(--fs-caption); line-height: var(--lh-caption); }

/* ---------- ABOUT / ARSENAL RECORD ---------- */
/* ---------- PROFILE ----------
   Figma "About". The card's padding and gap change at every width —
   16/20/24 on a phone, 24/32/36 on tablet, 32/40/40 on desktop — and I
   had the desktop values hardcoded for all three, which is why the
   phone card looked so slack. */
.dossier {
  --dsr-pt: 16px; --dsr-px: 20px; --dsr-pb: 24px; --dsr-gap: var(--space-20);
  display: grid; gap: var(--dsr-gap);
  padding: var(--dsr-pt) var(--dsr-px) var(--dsr-pb);
  background: var(--surface-card1);
  border-radius: 16px;
  box-shadow: var(--shadow-sm);
}
@media (min-width: 768px) {
  .dossier { --dsr-pt: 24px; --dsr-px: 32px; --dsr-pb: 36px; --dsr-gap: var(--space-32); }
}
@media (min-width: 1024px) {
  .dossier { --dsr-pt: 32px; --dsr-px: 40px; --dsr-pb: 40px; --dsr-gap: var(--space-40); }
}

/* The identity block closes with a rule — s0010 in the file, with 24
   of clearance under the name before it. */
.dossier__head {
  display: grid; gap: var(--space-16);
  padding-bottom: var(--space-24);
  border-bottom: 1px solid var(--border-strong);
}
.dossier__file {
  margin: 0; text-align: right;
  font-size: var(--fs-footnote); line-height: var(--lh-footnote);
  letter-spacing: var(--ls-label);
  color: var(--content-secondary);
}
.dossier__file b { font-weight: inherit; color: var(--brand-accent); margin-left: var(--space-4); }

/* The portrait is a rectangle, not a circle — 88x106 in the design. */
.dossier__id { display: flex; align-items: center; gap: var(--space-16); }
.dossier__photo {
  width: 88px; height: 106px; flex: none;
  object-fit: cover; border-radius: 8px;
  background: var(--bg-tertiary);
}
.dossier__name {
  font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-title-2); line-height: var(--lh-title-2);
  color: var(--content-primary); margin: 0;
}
.dossier__role {
  font-size: var(--fs-callout); line-height: var(--lh-body);
  color: var(--content-tertiary); margin: var(--space-4) 0 0;
}

/* One column below 1024, in reading order: prose, fields, availability,
   then the CTA centerd at the foot. Desktop splits it into two. */
.dossier__body { display: grid; gap: var(--space-12); }
.dossier__prose { display: grid; gap: var(--space-16); margin: 0; }
.dossier__prose p {
  margin: 0;
  font-size: var(--fs-callout); line-height: var(--lh-body);
  color: var(--content-secondary);
}
.dossier__fields { display: grid; }
.dossier__cta { margin: 0; display: flex; justify-content: flex-start; }

@media (min-width: 1024px) {
  .dossier__body {
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-rows: 1fr auto;
    column-gap: var(--space-64); row-gap: var(--space-16);
  }
  .dossier__prose  { grid-area: 1 / 1; }
  .dossier__cta    { grid-area: 2 / 1; }
  .dossier__fields { grid-area: 1 / 2; }
  .dossier__body > .availability--block { grid-area: 2 / 2; margin-top: 0; }
}

/* ---------- ARSENAL ----------
   Figma "Capability Lab": not a shadowed card like Profile but a ruled
   one — surface/default with a 1px border/strong outline, radius 16 and
   no shadow. Every division inside is a real rule, so it reads as a
   specimen sheet rather than a list. */
.lab {
  display: grid;
  background: var(--surface-default);
  border: 1px solid var(--border-strong);
  border-radius: 16px;
  overflow: hidden;              /* keeps the rules inside the radius */
}

.lab__cell { display: grid; gap: var(--space-4); align-content: start; }
.lab__key {
  font-size: var(--fs-caption); line-height: var(--lh-caption);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--content-tertiary);
}
.lab__val {
  /* 14 / 14 / 16 across the breakpoints — callout, not body, which was
     holding every value at 16 and forcing extra wraps on a phone. */
  font-size: var(--fs-callout); line-height: var(--lh-body);
  color: var(--content-secondary);
}
/* The two numbers that are claims rather than labels. */
.lab__val--accent { color: var(--content-accent); text-transform: uppercase; }
/* The file number cell is 72 tall in a 112 row — it sits up, not
   centerd, and carries no rule of its own. */
.lab__head { display: grid; border-bottom: 1px solid var(--border-strong); }
.lab__body { display: grid; }
.lab__grid { display: grid; }
/* Without this the grid-template-columns below are inert and the two
   cells stack as plain blocks. I dropped the line in a rewrite and
   then spent two rounds blaming the browser cache for it. */
.lab__row  { display: grid; }

/* Every row is two cells at all three widths — the design never stacks
   them. Only the narrow column and the paddings change, and at 1024
   the manifest moves from below the grid to beside it. */
.lab__head,
.lab__row { grid-template-columns: minmax(0, 1fr) var(--lab-narrow); }
/* The split flips row by row so whichever value is long gets the wide
   cell: discipline wide, service narrow, industries wide. */
.lab__row--a { grid-template-columns: var(--lab-narrow-a, var(--lab-narrow)) minmax(0, 1fr); }
.lab__row--b { grid-template-columns: minmax(0, 1fr) var(--lab-narrow); }
.lab__head > .lab__cell:first-child,
.lab__row > .lab__cell:first-child { border-right: 1px solid var(--border-strong); }
/* Both rows carry the bottom rule (s0010 on each in the file), and the
   manifest carries one too. Together they draw the single line above
   the attribution — which is why the attribution itself has no border
   of its own. I had given the rule to row A only, so the line under
   INDUSTRIES / LANGUAGE was missing. */
.lab__row { border-bottom: 1px solid var(--border-strong); }

.lab {
  /* Row A's narrow column is its own value: on a 335 card the design
     gives SERVICE 96 and ELEMENTS 239, while the other two rows split
     217/118. One token for both squeezed ELEMENTS by 22px. */
  --lab-narrow: 118px;  --lab-narrow-a: 96px;
  --lab-px: var(--space-20); --lab-py: var(--space-16);
  --lab-row-h: 96px; --lab-head-h: 72px;
}
@media (min-width: 768px) {
  .lab {
    --lab-narrow: 144px;  --lab-narrow-a: 144px;
    --lab-px: var(--space-32); --lab-py: var(--space-24);
    --lab-row-h: 96px; --lab-head-h: 96px;
  }
}
@media (min-width: 1024px) {
  .lab {
    --lab-narrow: 200px;  --lab-narrow-a: 200px;
    --lab-px: var(--space-40); --lab-py: var(--space-32);
    --lab-row-h: 152px; --lab-head-h: 112px;
  }
  /* Only here does the manifest sit beside the field grid. */
  .lab__body { grid-template-columns: minmax(0, 560px) minmax(0, 1fr); }
  .lab__grid { border-right: 1px solid var(--border-strong); }
}

.lab__cell { padding: var(--lab-py) var(--lab-px); }
.lab__head { min-height: var(--lab-head-h); }
.lab__row  { min-height: var(--lab-row-h); }

/* The file number is right-aligned in its own cell and sits at the top
   of the row rather than centerd in it. */
/* HMAX in the file: the two run side by side, gap 2, pushed to the
   right edge — not stacked like every other cell. */
.lab__cell--file {
  display: flex; align-items: baseline; justify-content: flex-end;
  gap: 2px; align-content: start;
}

/* Marker and category in brand/primary, what each covers in
   content/secondary. Mixed fills in the design. Below the grid on
   phone and tablet, beside it on desktop. */
.lab__manifest {
  list-style: none; margin: 0;
  padding: var(--lab-py) var(--lab-px);
  display: grid; gap: var(--space-8); align-content: start;
  border-bottom: 1px solid var(--border-strong);
  font-size: var(--fs-callout); line-height: var(--lh-callout);
  color: var(--content-secondary);
}
.lab__manifest b { font-weight: inherit; color: var(--brand-primary); }

/* Centerd at all three widths — your call. Figma left-aligns it, but
   an attribution closing a ruled sheet reads better on the axis. */
.lab__foot {
  display: grid; gap: var(--space-4); justify-items: center;
  padding: var(--lab-px);
  text-align: center;
}
.lab__foot .lab__key { font-size: var(--fs-footnote); color: var(--content-subtle); }
.lab__sign {
  font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-title-3); line-height: var(--lh-title-3);
  color: var(--content-secondary);
}

/* ---------- COMMS ----------
   Figma: no card. The section is a space-between pair — a 400 intro on
   the left, the 640 frequency list on the right — padded 56 top and
   bottom. It was sharing .dossier with Profile, so when I rebuilt that
   for the profile card, Comms inherited a surface, a radius, a shadow
   and 40px of padding that the design never gives it. */
.comms { padding-block: var(--space-56); }
.comms__inner { display: grid; gap: var(--space-40); }
.comms__intro { display: grid; gap: var(--space-56); align-content: start; }
.comms__pitch { display: grid; gap: var(--space-8); }
.comms__title {
  font-family: var(--font-serif); font-weight: var(--weight-semibold);
  font-size: var(--fs-title-2); line-height: var(--lh-title-2);
  color: var(--content-primary); margin: 0;
}
.comms__lede {
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--content-secondary); margin: 0;
}
@media (min-width: 1024px) {
  .comms__inner {
    grid-template-columns: minmax(0, 400px) minmax(0, 640px);
    justify-content: space-between;
    align-items: start;
  }
}

/* 92px rows, 32 of padding, and the rule between them is dashed 2-2 in
   the file — a real dash pattern, not a solid hairline. CSS `dashed`
   picks its own rhythm, so the gradient reproduces the 2/2 exactly. */
.freq-list { display: grid; }
.freq {
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-20);
  min-height: 92px; padding-block: var(--space-32);
  text-decoration: none;
  background-image: linear-gradient(90deg, var(--border-strong) 0 2px, transparent 2px 4px);
  background-size: 4px 1px;
  background-repeat: repeat-x;
  background-position: bottom;
}
.freq:hover .freq__val { text-decoration: underline; }
.freq__key {
  font-size: var(--fs-caption); line-height: var(--lh-caption);
  letter-spacing: var(--ls-label); text-transform: uppercase;
  color: var(--content-tertiary); flex: none;
}
.freq__val {
  display: inline-flex; align-items: center; gap: var(--space-8);
  font-size: var(--fs-body); line-height: var(--lh-body);
  color: var(--content-link); overflow-wrap: anywhere; text-align: right;
}
.freq__val a { color: inherit; text-decoration: none; }
.freq__copy {
  display: grid; place-items: center;
  width: 24px; height: 24px; flex: none;
  color: var(--content-link);
  transition: color var(--dur-fast), transform var(--dur-fast);
}
.freq__copy .ico { width: 20px; height: 20px; }
.freq__copy:hover { color: var(--interactive-hover); }
.freq__copy:active { transform: scale(0.94); }
