/* =========================================================================
   Weird Labs — site stylesheet

   The static site kept its entire design in inline `style` attributes, which
   forced `style-src 'unsafe-inline'` in the CSP and a wall of `!important`
   in the responsive rules to beat inline specificity. Both are gone: every
   rule lives here, nothing is inline, and the only !important left is the
   reduced-motion override at the bottom, where it belongs.

   Contents
     1. Tokens
     2. Reset & base
     3. Layout — shell, band, backdrop
     4. Type — display, section headings, eyebrows, prose
     5. Chrome — nav, progress, footer
     6. Components — hero, marquee, stats, rows, cards, tags, tiles,
                     clients, team, case rows, meters, quote, image slots
     7. Motion — reveal, marquee, spin, pulse
     8. Responsive
     9. Reduced motion & print

   Colour, rules and muted text are token-driven, so a section only has to
   declare `band--dark` to invert: the tokens swap and every component inside
   follows. Nothing hardcodes #111 or #f2f1ed except the tokens themselves.
   ========================================================================= */


/* ---------------------------------------------------------------- 1. tokens */

:root {
  /* brand */
  --paper: #f2f1ed;
  --ink: #111;
  --accent: #e82127;
  --white: #fff;

  /* surface tokens — what components actually read (see .band--dark) */
  --surface: var(--paper);
  --text: var(--ink);
  --text-soft: #333;
  --text-muted: #666;
  --text-faint: #999;
  --rule: rgba(17, 17, 17, 0.2);
  --rule-soft: rgba(17, 17, 17, 0.12);
  --raise: var(--white);
  --hatch: rgba(17, 17, 17, 0.035);
  --outline: rgba(17, 17, 17, 0.14);

  /* type */
  --font-sans: Archivo, "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-mono: "Space Grotesk", ui-monospace, SFMono-Regular, Menlo, monospace;

  --fs-display: clamp(64px, 15.5vw, 260px);
  --fs-title: clamp(44px, 7vw, 116px);
  --fs-h2: clamp(38px, 5.6vw, 86px);
  --fs-h2-sm: clamp(34px, 4.6vw, 68px);
  --fs-h3: clamp(26px, 3vw, 44px);
  --fs-h3-sm: clamp(22px, 2.6vw, 38px);
  --fs-lead: clamp(20px, 2.4vw, 34px);
  --fs-deck: clamp(19px, 2.1vw, 30px);
  --fs-prose: clamp(17px, 1.5vw, 21px);
  --fs-stat: clamp(38px, 4.4vw, 68px);
  --fs-stat-sm: clamp(28px, 3vw, 44px);
  --fs-body: 16px;
  --fs-small: 15px;
  --fs-mono: 11px;

  /* rhythm */
  --shell: 1360px;
  --gutter: 40px;
  --band-y: 14vh;
  --row-pad: 40px 20px;

  /* motion */
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --reveal-shift: 32px;
}


/* ------------------------------------------------------------ 2. reset/base */

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

html {
  scroll-behavior: smooth;
  /* the fixed nav is 64px; keep anchored sections clear of it */
  scroll-padding-top: 84px;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.5;
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1,
h2,
h3,
p,
figure,
blockquote {
  margin: 0;
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
  height: auto;
}

::selection {
  background: var(--accent);
  color: var(--white);
}

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

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  padding: 14px 20px;
}

.skip-link:focus {
  left: 0;
}

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


/* ----------------------------------------------------------- 3. layout */

/* Six hairline columns behind everything, inset by the page gutter. */
.backdrop {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image: repeating-linear-gradient(
    90deg,
    rgba(17, 17, 17, 0.045) 0 1px,
    transparent 1px calc(100% / 6)
  );
  background-size: calc(100% - (var(--gutter) * 2)) 100%;
  background-position: var(--gutter) 0;
  background-repeat: no-repeat;
}

.band {
  position: relative;
  z-index: 1;
  padding: var(--band-y) var(--gutter);
}

.band--tall {
  --band-y: 16vh;
}

/* Continues the band above it: no top padding, so two bands read as one. */
.band--joined {
  padding-top: 0;
}

.band--dark {
  --surface: var(--ink);
  --text: var(--paper);
  --text-soft: #ccc;
  --text-muted: #888;
  --text-faint: #666;
  --rule: rgba(242, 241, 237, 0.18);
  --rule-soft: rgba(242, 241, 237, 0.12);
  --raise: var(--paper);
  --hatch: rgba(242, 241, 237, 0.05);
  --outline: rgba(242, 241, 237, 0.22);
  background: var(--surface);
  color: var(--text);
}

.shell {
  width: 100%;
  max-width: var(--shell);
  margin-inline: auto;
}

.shell--relative {
  position: relative;
}

/* Right-aligned column used by the Method and Outcome headers. */
.shell__indent {
  display: flex;
  justify-content: flex-end;
}

.shell__indent > * {
  width: 100%;
  max-width: 1020px;
}


/* ------------------------------------------------------------- 4. type */

.eyebrow {
  display: block;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.26em;
  color: var(--text-muted);
}

.eyebrow::before {
  content: "■";
  color: var(--accent);
  margin-right: 1.4em;
}

.eyebrow--plain::before {
  content: none;
}

.mono {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

/* Outlined section numeral, parked behind the heading. */
.ghost-number {
  position: absolute;
  top: -8vh;
  font-size: clamp(140px, 22vw, 380px);
  font-weight: 900;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1px var(--outline);
  pointer-events: none;
  user-select: none;
}

.ghost-number--right {
  right: -10px;
}

.ghost-number--left {
  left: -10px;
}

.section-head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  flex-wrap: wrap;
  gap: 16px;
}

.section-head--stacked {
  display: block;
}

.section-head--stacked .eyebrow {
  margin-bottom: 40px;
}

.h-display {
  font-size: var(--fs-display);
  line-height: 0.84;
  letter-spacing: -0.045em;
  font-weight: 900;
  text-transform: uppercase;
}

.h-title {
  font-size: var(--fs-title);
  line-height: 0.9;
  letter-spacing: -0.04em;
  font-weight: 900;
  text-transform: uppercase;
}

.h-section {
  font-size: var(--fs-h2);
  line-height: 1;
  letter-spacing: -0.035em;
  font-weight: 800;
  max-width: 1100px;
  text-wrap: balance;
}

.h-section--sm {
  font-size: var(--fs-h2-sm);
  letter-spacing: -0.03em;
}

.h-section--wide {
  max-width: none;
}

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

.dim {
  color: var(--text-faint);
}

.dim-soft {
  color: var(--text-muted);
}

.lead {
  font-size: var(--fs-lead);
  line-height: 1.25;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 620px;
}

.deck {
  font-size: var(--fs-deck);
  line-height: 1.28;
  letter-spacing: -0.02em;
  font-weight: 500;
  max-width: 680px;
}

.prose {
  font-size: var(--fs-prose);
  line-height: 1.55;
  color: var(--text-soft);
  max-width: 560px;
}

.prose--wide {
  max-width: none;
}

.prose-stack {
  display: flex;
  flex-direction: column;
  gap: 22px;
}

em {
  font-style: italic;
  font-weight: 400;
}


/* ----------------------------------------------------------- 5. chrome */

.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 50;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  height: 64px;
  padding: 0 var(--gutter);
  background: rgba(242, 241, 237, 0.88);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(17, 17, 17, 0.12);
}

.nav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 16px;
  letter-spacing: -0.01em;
  white-space: nowrap;
}

.nav__mark {
  width: 12px;
  height: 12px;
  background: var(--accent);
}

.nav__links {
  display: flex;
  align-items: center;
  gap: 2px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  font-weight: 500;
  letter-spacing: 0.14em;
}

.nav__link {
  padding: 8px 14px;
  transition: background 0.2s, color 0.2s;
}

.nav__link:hover {
  background: var(--ink);
  color: var(--paper);
}

.nav__cta {
  padding: 8px 18px;
  margin-left: 14px;
  background: var(--accent);
  color: var(--white);
  white-space: nowrap;
  transition: background 0.2s;
}

.nav__cta:hover {
  background: var(--ink);
}

/* Reading-progress bar; --progress is set by site.js. */
.progress {
  position: fixed;
  top: 64px;
  left: 0;
  right: 0;
  height: 2px;
  z-index: 49;
  background: rgba(17, 17, 17, 0.08);
}

.progress__bar {
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--progress, 0));
  transform-origin: 0 50%;
}

.footer {
  padding-bottom: var(--gutter);
}

.footer__cta {
  display: inline-flex;
  align-items: center;
  gap: 18px;
  background: var(--accent);
  color: var(--white);
  font-size: clamp(16px, 1.6vw, 22px);
  font-weight: 700;
  letter-spacing: -0.01em;
  padding: 22px 36px;
  transition: background 0.25s, color 0.25s, gap 0.25s;
}

.footer__cta:hover {
  background: var(--paper);
  color: var(--ink);
  gap: 30px;
}

.footer__cta--ghost {
  background: none;
  border: 2px solid var(--paper);
  color: var(--paper);
  padding: 20px 34px;
}

.footer__cta-wrap {
  margin: 64px 0 100px;
  display: flex;
  flex-wrap: wrap;
  gap: 16px;
}

.footer__meta {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 40px;
  border-top: 1px solid var(--rule);
  padding-top: 40px;
}

.footer__field {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.footer__field dt {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--text-faint);
}

.footer__field dd {
  margin: 0;
  font-size: 17px;
  font-weight: 700;
}

.footer__field a {
  transition: color 0.2s;
}

.footer__field a:hover {
  color: var(--accent);
}

.footer__legal {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.26em;
  color: var(--text-faint);
  margin-top: 90px;
  border-top: 1px solid var(--rule);
  padding-top: 22px;
}


/* ------------------------------------------------------- 6. components */

/* --- hero ---------------------------------------------------------- */

.hero {
  position: relative;
  z-index: 1;
  padding: 110px var(--gutter) 0;
}

.hero--home {
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.hero__strap {
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.22em;
  color: var(--text-muted);
}

.hero__strap--ruled {
  padding-bottom: 20px;
  border-bottom: 1px solid var(--rule);
}

.hero__title {
  margin-top: 3vh;
}

.hero__grid {
  display: grid;
  grid-template-columns: 1.2fr 1fr;
  gap: 40px;
  align-items: end;
  margin-top: 5vh;
}

.hero__grid--case {
  grid-template-columns: 1.35fr 1fr;
  gap: 56px;
  margin-top: 7vh;
}

.hero__index {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.16em;
  border-left: 1px solid rgba(17, 17, 17, 0.25);
  padding-left: 24px;
}

.hero__index-link {
  display: flex;
  justify-content: space-between;
  padding: 11px 0;
  border-bottom: 1px solid var(--rule-soft);
  transition: padding-left 0.25s, color 0.25s;
}

.hero__index-link:last-child {
  border-bottom: 0;
}

.hero__index-link:hover {
  padding-left: 8px;
  color: var(--accent);
}

.hero__status {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 12px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.22em;
  color: var(--text-faint);
  padding: 22px 0;
  margin-top: 6vh;
  border-top: 1px solid var(--rule);
}

.hero__live {
  display: flex;
  align-items: center;
  gap: 10px;
}

.hero__dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: var(--accent);
}

/* Key/value rail beside a case-study headline. */
.spec {
  display: flex;
  flex-direction: column;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  border-left: 1px solid rgba(17, 17, 17, 0.25);
  padding-left: 24px;
  margin: 0;
}

.spec__row {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  padding: 13px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec__row dt {
  color: var(--text-muted);
}

.spec__row dd {
  margin: 0;
  font-weight: 700;
  text-align: right;
}

.tag-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-bottom: 28px;
}

/* --- marquee ------------------------------------------------------- */

.marquee {
  position: relative;
  z-index: 1;
  overflow: hidden;
  padding: 16px 0;
  background: var(--accent);
  color: var(--white);
  white-space: nowrap;
}

.marquee__track {
  display: inline-flex;
  will-change: transform;
  animation: wl-marquee 24s linear infinite;
}

.marquee__set {
  font-family: var(--font-mono);
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0.28em;
  padding-right: 0;
}

.marquee__item::after {
  content: "✳";
  margin: 0 1.4em;
}

/* --- stats --------------------------------------------------------- */

/* Hairline grid: the gap is the parent's background showing through. */
.hairline-grid {
  display: grid;
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
}

.hairline-grid--stats {
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
}

.hairline-grid--method {
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
}

.hairline-grid--industries {
  grid-template-columns: repeat(5, 1fr);
}

.hairline-grid--clients {
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  margin-top: 72px;
}

.hairline-grid--compact {
  grid-template-columns: repeat(3, 1fr);
}

.stat {
  background: var(--surface);
  padding: 34px 26px 30px;
  transition: background 0.3s;
}

.stat:hover {
  background: var(--raise);
}

.stat__value {
  font-size: var(--fs-stat);
  font-weight: 900;
  letter-spacing: -0.045em;
  line-height: 1;
}

.stat__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.18em;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 14px;
}

.stat--compact {
  padding: 24px 20px;
}

.stat--compact .stat__value {
  font-size: var(--fs-stat-sm);
  letter-spacing: -0.03em;
}

.stat--compact .stat__label {
  font-size: 10px;
  margin-top: 8px;
}

.position-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 40px;
  margin-top: 64px;
  align-items: start;
}

/* --- rows ---------------------------------------------------------- */

.rowset {
  margin-top: 72px;
  border-top: 1px solid var(--rule);
}

.rowset--flush {
  margin-top: 0;
}

.row {
  display: grid;
  gap: 32px;
  align-items: center;
  padding: var(--row-pad);
  border-bottom: 1px solid var(--rule);
  transition: background 0.3s, padding-left 0.3s, color 0.3s;
}

.row--capability {
  grid-template-columns: 80px 1fr 1.1fr auto;
  padding: 44px 20px;
}

.row--phase {
  grid-template-columns: 90px 1fr 1.15fr 130px;
}

.row--case {
  grid-template-columns: 90px 1.15fr 1fr 200px auto;
}

.row--accent:hover {
  background: var(--accent);
  padding-left: 36px;
}

/* Case rows invert on hover: light band, dark row. */
.row--case:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 36px;
}

.row__index {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.2em;
  opacity: 0.65;
}

.row__title {
  font-size: var(--fs-h3);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.row__title--sm {
  font-size: var(--fs-h3-sm);
}

.row__body {
  font-size: var(--fs-small);
  line-height: 1.6;
  opacity: 0.75;
}

.row__span {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  opacity: 0.65;
  text-align: right;
}

.row__arrow {
  font-size: 28px;
  line-height: 1;
}

.row__label {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.row__kicker {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.row__headline {
  font-size: clamp(22px, 2.6vw, 38px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.02;
}

.row__metric {
  display: flex;
  flex-direction: column;
  gap: 4px;
  text-align: right;
}

.row__metric-value {
  font-size: clamp(22px, 2.4vw, 34px);
  font-weight: 900;
  letter-spacing: -0.035em;
  line-height: 1;
}

.row__metric-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.18em;
  opacity: 0.6;
}

/* --- two-column definition lists ----------------------------------- */

.split {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 56px;
  margin-top: 88px;
}

.split--flush {
  margin-top: 0;
}

.split--brief {
  grid-template-columns: 1fr 1fr;
  gap: 56px;
  margin-top: 64px;
  align-items: start;
}

.listing__head {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.26em;
  color: var(--text-muted);
  padding-bottom: 16px;
  border-bottom: 1px solid var(--rule);
}

.listing__row {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 20px;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.listing__label {
  font-size: 17px;
  font-weight: 600;
}

.listing__meta {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-align: right;
}

.arrow-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.arrow-list li {
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text-soft);
}

.arrow-list li::before {
  content: "→";
  color: var(--accent);
  font-weight: 700;
}

.numbered-list {
  list-style: none;
  margin: 0;
  padding: 0;
  border-top: 1px solid var(--rule);
  /* Own counter, not `list-item`: `display: flex` below takes the items out of
     list-item display, and the built-in counter stops incrementing with it. */
  counter-reset: constraint;
}

.numbered-list li {
  counter-increment: constraint;
  display: flex;
  gap: 16px;
  align-items: baseline;
  padding: 20px 0;
  border-top: 1px solid var(--rule-soft);
  font-size: var(--fs-body);
  line-height: 1.55;
  color: var(--text-soft);
}

.numbered-list li::before {
  content: counter(constraint, decimal-leading-zero);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 700;
  color: var(--accent);
}

.numbered-list__head {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.26em;
  color: var(--text-muted);
  padding: 16px 0;
}

/* --- cards --------------------------------------------------------- */

.card {
  background: var(--surface);
  padding: 36px 28px 44px;
  display: flex;
  flex-direction: column;
  min-height: 260px;
  transition: background 0.3s;
}

.card:hover {
  background: var(--raise);
}

.card__number {
  font-size: 56px;
  font-weight: 900;
  letter-spacing: -0.04em;
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 1.4px var(--text);
}

.card__title {
  font-size: 24px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: auto;
  padding-top: 40px;
}

.card__body {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-muted);
  margin-top: 12px;
}

.tile {
  background: var(--surface);
  padding: 32px 26px;
  display: flex;
  flex-direction: column;
  gap: 14px;
  min-height: 170px;
  transition: background 0.3s;
}

.tile:hover {
  background: var(--raise);
}

.tile__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.tile__name {
  font-size: 20px;
  font-weight: 800;
  letter-spacing: -0.02em;
  margin-top: auto;
}

.client {
  background: var(--surface);
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 30px 28px;
  min-height: 96px;
  transition: background 0.3s, padding-left 0.3s;
}

.client:hover {
  background: var(--accent);
  padding-left: 36px;
}

.client__index {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--accent);
}

.client:hover .client__index {
  color: inherit;
}

.client__body {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.client__name {
  font-size: clamp(18px, 2vw, 24px);
  font-weight: 700;
  letter-spacing: -0.02em;
}

.client__work {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.client:hover .client__work {
  color: inherit;
  opacity: 0.8;
}

/* --- side projects -------------------------------------------------- */

/* Built for exactly two (see pages/content.py FUN_PROJECTS). */
.projects-grid {
  grid-template-columns: repeat(2, 1fr);
  margin-top: 64px;
}

.project {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  gap: 12px;
  padding: 36px 30px 34px;
  min-height: 240px;
  transition: background 0.3s, color 0.3s, padding-left 0.3s;
}

/* Inverts like a case row: light band, dark card. Children inherit and use
   opacity for hierarchy, so the whole card flips in one declaration. */
.project:hover {
  background: var(--ink);
  color: var(--paper);
  padding-left: 40px;
}

.project__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.project__kind {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.2em;
  opacity: 0.6;
}

.project__name {
  font-size: clamp(24px, 2.6vw, 36px);
  font-weight: 800;
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.project__blurb {
  font-size: var(--fs-small);
  line-height: 1.6;
  opacity: 0.75;
  max-width: 46ch;
}

.project__visit {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  color: var(--accent);
  margin-top: auto;
  padding-top: 28px;
}

.project:hover .project__index,
.project:hover .project__visit {
  color: inherit;
}

/* --- team ---------------------------------------------------------- */

/* Built for exactly three (see pages/content.py TEAM). */
.team-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--rule);
  border: 1px solid var(--rule);
  margin-top: 64px;
}

.team-card {
  background: var(--surface);
  display: flex;
  flex-direction: column;
  transition: background 0.3s;
}

.team-card:hover {
  background: var(--raise);
}

.team-card__portrait {
  position: relative;
  aspect-ratio: 4 / 5;
  border-bottom: 1px solid var(--rule);
  overflow: hidden;
}

.team-card__portrait img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.team-card__body {
  padding: 28px 26px 32px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  flex: 1;
}

.team-card__index {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.2em;
  color: var(--accent);
}

.team-card__name {
  font-size: clamp(22px, 2.2vw, 30px);
  font-weight: 800;
  letter-spacing: -0.025em;
  line-height: 1.05;
}

.team-card__role {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--text-muted);
}

.team-card__bio {
  font-size: 14.5px;
  line-height: 1.6;
  color: var(--text-soft);
  margin-top: 6px;
}

.team-card__focus {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.14em;
  color: var(--text-faint);
  margin-top: auto;
  padding-top: 24px;
}

.team-card__link {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.16em;
  color: var(--accent);
  margin-top: 14px;
  transition: padding-left 0.25s;
}

.team-card__link:hover {
  padding-left: 6px;
}

/* --- tags ---------------------------------------------------------- */

.tag {
  font-family: var(--font-mono);
  font-size: 12.5px;
  letter-spacing: 0.04em;
  border: 1px solid var(--outline);
  padding: 7px 14px;
  transition: background 0.2s, color 0.2s, border-color 0.2s;
}

.tag--static {
  border-color: rgba(17, 17, 17, 0.3);
}

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.stack {
  border-top: 1px solid var(--rule);
}

.stack__row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 24px;
  align-items: center;
  padding: 26px 0;
  border-bottom: 1px solid var(--rule);
}

.stack__label {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.26em;
  color: var(--text-muted);
}

.stack__row .tag:hover {
  background: var(--ink);
  color: var(--paper);
  border-color: var(--ink);
}

.band--dark .tag:hover {
  background: var(--paper);
  color: var(--ink);
  border-color: var(--paper);
}

.spec-group {
  padding: 20px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.spec-group__label {
  font-family: var(--font-mono);
  font-size: 10.5px;
  letter-spacing: 0.22em;
  color: var(--text-muted);
  margin-bottom: 12px;
}

/* --- meters -------------------------------------------------------- */

.metric {
  padding: 22px 0;
  border-bottom: 1px solid var(--rule-soft);
}

.metric__head {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 16px;
}

.metric__label {
  font-size: var(--fs-body);
  font-weight: 600;
}

.metric__delta {
  font-family: var(--font-mono);
  font-size: 13px;
  letter-spacing: 0.06em;
}

.metric__from {
  color: var(--text-faint);
  text-decoration: line-through;
}

.metric__to {
  color: var(--accent);
  font-weight: 700;
}

.meter {
  height: 4px;
  background: rgba(17, 17, 17, 0.1);
  margin-top: 14px;
}

/* The fill is a scale, not a width, so it animates on the compositor.
   One modifier per value used on the site — add a line when you need a
   new proportion rather than reaching for an inline style (the CSP has
   no 'unsafe-inline' for styles). */
.meter__fill {
  height: 100%;
  background: var(--accent);
  transform: scaleX(var(--fill, 1));
  transform-origin: 0 50%;
  transition: transform 1.1s var(--ease);
}

.meter--67 .meter__fill { --fill: 0.67; }
.meter--92 .meter__fill { --fill: 0.92; }
.meter--100 .meter__fill { --fill: 1; }

/* --- pull quote ---------------------------------------------------- */

.pull-quote {
  border-left: 3px solid var(--accent);
  padding-left: 32px;
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.pull-quote p {
  font-size: clamp(20px, 2.2vw, 32px);
  line-height: 1.3;
  letter-spacing: -0.02em;
  font-weight: 500;
}

.pull-quote figcaption {
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 28px;
}

/* --- image frames and slots ---------------------------------------- */

.frame {
  position: relative;
  border: 1px solid var(--rule);
  overflow: hidden;
}

.frame--hero {
  width: 100%;
  height: min(62vh, 620px);
  margin-top: 8vh;
}

.frame--main {
  height: min(56vh, 540px);
}

.frame img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.shots {
  display: grid;
  grid-template-columns: 2fr 1fr;
  gap: 24px;
  margin-top: 80px;
}

.shots__side {
  display: grid;
  grid-template-rows: 1fr 1fr;
  gap: 24px;
}

/* Hatched placeholder that stands in for an image that has not been shot yet.
   Replace the .slot element with an <img> to fill the frame. */
.slot {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 24px;
  font-family: var(--font-mono);
  font-size: var(--fs-mono);
  letter-spacing: 0.18em;
  line-height: 1.8;
  color: var(--text-faint);
  background-image: repeating-linear-gradient(
    45deg,
    var(--hatch) 0 10px,
    transparent 10px 20px
  );
}


/* ---------------------------------------------------------- 7. motion */

@keyframes wl-marquee {
  from { transform: translateX(0); }
  to { transform: translateX(-50%); }
}

@keyframes wl-up {
  from { opacity: 0; transform: translateY(40px); }
  to { opacity: 1; transform: none; }
}

@keyframes wl-fade {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes wl-spin {
  from { transform: rotate(0); }
  to { transform: rotate(360deg); }
}

@keyframes wl-pulse {
  0%, 100% { transform: scale(1); }
  50% { transform: scale(0.6); }
}

.spinner {
  display: inline-block;
  color: var(--accent);
  font-weight: 400;
  transform-origin: 50% 54%;
  animation: wl-spin 14s linear infinite;
}

.spinner--super {
  font-size: 0.42em;
  vertical-align: super;
  margin-left: 0.06em;
  transform-origin: 50% 50%;
}

.nav__mark,
.hero__dot {
  animation: wl-pulse 3s ease-in-out infinite;
}

.hero__dot {
  animation-duration: 1.8s;
}

.nav {
  animation: wl-fade 0.8s ease both;
}

/* Entrance animations for above-the-fold content, which never waits on JS. */
.enter {
  animation: wl-up 1s var(--ease) both;
}

.enter--1 { animation-delay: 0.05s; }
.enter--2 { animation-delay: 0.2s; animation-duration: 1.1s; }
.enter--3 { animation-delay: 0.35s; }
.enter--4 { animation-delay: 0.45s; }
.enter--5 { animation-delay: 0.55s; animation-duration: 1.1s; }
.enter--fade { animation-name: wl-fade; animation-delay: 0.8s; }

/* Scroll reveal. The initial hidden state is only applied once site.js has
   confirmed it can reveal them again — no JS, no observer or reduced motion
   means the content simply renders. */
html[data-reveal-ready] [data-reveal] {
  opacity: 0;
  transform: translateY(var(--reveal-shift));
  transition: opacity 0.9s var(--ease), transform 0.9s var(--ease);
}

html[data-reveal-ready] [data-reveal].is-revealed {
  opacity: 1;
  transform: none;
}

/* Meters hold at zero until their block is revealed, then fill. */
html[data-reveal-ready] .meter__fill {
  transform: scaleX(0);
}

html[data-reveal-ready] .is-revealed .meter__fill,
html[data-reveal-ready] .meter__fill.is-revealed {
  transform: scaleX(var(--fill, 1));
}


/* ------------------------------------------------------ 8. responsive */

@media (max-width: 1100px) {
  .hairline-grid--industries {
    grid-template-columns: repeat(3, 1fr);
  }

  .team-grid {
    grid-template-columns: 1fr;
  }

  .team-card__portrait {
    aspect-ratio: 16 / 9;
  }
}

@media (max-width: 900px) {
  .row--case {
    grid-template-columns: 70px 1fr 180px;
  }

  .row--case .row__body,
  .row--case .row__arrow {
    display: none;
  }

  .shots {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 768px) {
  :root {
    --gutter: 20px;
    --band-y: 10vh;
  }

  .nav {
    padding-inline: 16px;
  }

  /* Section links drop; the brand and the CTA stay. Sections remain
     reachable by scrolling, so no JS menu is needed. */
  .nav__link {
    display: none;
  }

  .nav__cta {
    margin-left: 0;
  }

  .hero__grid,
  .hero__grid--case,
  .position-grid,
  .split--brief,
  .stack__row {
    grid-template-columns: 1fr;
    gap: 28px;
  }

  .hero__index,
  .spec {
    border-left: 0;
    border-top: 1px solid rgba(17, 17, 17, 0.25);
    padding-left: 0;
    padding-top: 8px;
  }

  .row--capability,
  .row--phase,
  .row--case {
    grid-template-columns: 1fr;
    gap: 12px;
    padding: 28px 16px;
    text-align: left;
  }

  .row--accent:hover,
  .row--case:hover {
    padding-left: 16px;
  }

  .row--case .row__body {
    display: block;
  }

  .row__span,
  .row__metric,
  .row__metric-label {
    text-align: left;
  }

  .row__metric {
    align-items: flex-start;
  }

  .row__arrow {
    display: none;
  }

  .hairline-grid--industries {
    grid-template-columns: repeat(2, 1fr);
  }

  .projects-grid {
    grid-template-columns: 1fr;
    margin-top: 40px;
  }

  .project:hover {
    padding-left: 30px;
  }

  .split {
    gap: 40px;
    margin-top: 56px;
  }

  .frame--hero {
    height: 44vh;
  }

  .frame--main {
    height: 40vh;
  }

  .pull-quote {
    border-left: 0;
    border-top: 3px solid var(--accent);
    padding-left: 0;
    padding-top: 28px;
  }

  .footer__legal {
    margin-top: 56px;
  }

  .spec__row dd {
    text-align: left;
  }
}

@media (max-width: 480px) {
  .hairline-grid--industries,
  .hairline-grid--compact {
    grid-template-columns: 1fr;
  }
}


/* --------------------------------------------- 9. reduced motion, print */

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

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  .marquee__track {
    animation: none;
  }
}

@media print {
  .nav,
  .progress,
  .backdrop,
  .marquee {
    display: none;
  }

  .band,
  .band--dark {
    background: #fff;
    color: #000;
    padding: 12mm 0;
  }
}
