/* ==========================================================================
   Reactive Brands — design system
   Mirrors the Mello (mellomfg.com) visual language for the UK company.
   Palette, type scale and component set are shared with the parent site.
   ========================================================================== */

/* --------------------------------------------------------------- 1. Tokens */
:root {
  /* Core palette — lifted from mellomfg.com */
  --cream:        #f4f2ed;
  --cream-warm:   #f7f5f0;
  --peri:         #7c8fde;
  --peri-light:   #869ef8;
  --peri-pale:    #c5d7ff;
  --peri-deep:    #5e7ce2;
  --navy:         #1f3384;
  --navy-deep:    #0f1a3b;
  --mint:         #e0f6ca;
  --pink:         #e0add8;
  --rust:         #c02b0a;
  --white:        #ffffff;

  --ink:          var(--navy);
  --page-bg:      var(--cream);

  /* Type */
  --font-display: 'Newsreader', 'ITC Garamond Std', Georgia, 'Times New Roman', serif;
  --font-mono:    'DM Mono', 'Messina Sans Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;

  /* Fluid type scale */
  --fs-display:   clamp(2.75rem, 1.4rem + 5.4vw, 6rem);
  --fs-h1:        clamp(2.25rem, 1.3rem + 3.9vw, 4.5rem);
  --fs-h2:        clamp(1.9rem, 1.25rem + 2.7vw, 3.5rem);
  --fs-h3:        clamp(1.45rem, 1.15rem + 1.2vw, 2.1rem);
  --fs-h4:        clamp(1.15rem, 1.05rem + 0.45vw, 1.45rem);
  --fs-body:      clamp(0.9rem, 0.86rem + 0.18vw, 1rem);
  --fs-small:     0.8125rem;
  --fs-label:     0.6875rem;

  /* Rhythm */
  --gutter:       clamp(1.25rem, 4vw, 4rem);
  --section-y:    clamp(4rem, 9vw, 9rem);
  --maxw:         1400px;
  --maxw-text:    68ch;

  --radius:       14px;
  --radius-lg:    26px;
  --radius-pill:  999px;

  --border:       1.5px solid var(--navy);
  --border-hair:  1px solid color-mix(in srgb, var(--navy) 22%, transparent);

  --ease:         cubic-bezier(0.22, 1, 0.36, 1);
  --header-h:     clamp(66px, 8vw, 118px);

  --check-size:   clamp(16px, 2vw, 26px);
}

/* ----------------------------------------------------------- 2. Base reset */
*, *::before, *::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 40px);
}

body {
  margin: 0;
  background: var(--page-bg);
  color: var(--ink);
  font-family: var(--font-mono);
  font-size: var(--fs-body);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  line-height: 1.02;
  letter-spacing: -0.015em;
  margin: 0 0 0.4em;
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); }
h2 { font-size: var(--fs-h2); }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }

p { margin: 0 0 1.1em; }
p:last-child { margin-bottom: 0; }

a { color: inherit; text-decoration: none; }

em, .italic {
  font-family: var(--font-display);
  font-style: italic;
  letter-spacing: -0.005em;
}

::selection { background: var(--navy); color: var(--mint); }

:focus-visible {
  outline: 2.5px solid var(--navy);
  outline-offset: 3px;
  border-radius: 3px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 200;
  background: var(--navy);
  color: var(--mint);
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 var(--radius) 0;
}
.skip-link:focus { left: 0; }

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* ------------------------------------------------------- 3. Layout helpers */
.wrap {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: 1040px; }

.section { padding-block: var(--section-y); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 5rem); }
.section--flush-top { padding-top: 0; }

.bg-cream { background: var(--cream); }
.bg-peri  { background: var(--peri);  }
.bg-navy  { background: var(--navy);  color: var(--cream); }
.bg-mint  { background: var(--mint);  }
.bg-pink  { background: var(--pink);  }
.bg-peri-pale { background: var(--peri-pale); }

.bg-navy :is(h1, h2, h3, h4) { color: var(--cream); }
.bg-navy .eyebrow { color: var(--peri-pale); opacity: 1; }

/* Soft periwinkle → pink → cream wash under the client logo strip. It reaches
   cream early so the logos themselves sit on a clean background. */
.bg-wash {
  background: linear-gradient(180deg, var(--peri) 0%, var(--pink) 16%, var(--cream) 46%);
}

.center { text-align: center; }
.measure { max-width: var(--maxw-text); }
.measure-center { max-width: var(--maxw-text); margin-inline: auto; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 3rem;
  margin-bottom: clamp(2.25rem, 4.5vw, 4rem);
}
.section-head > div { flex: 1 1 min(100%, 40rem); }
/* A heading sharing its row with a button gets the h2 scale, not the full
   display scale, or it wraps into a narrow stack of four or five lines. */
.section-head .display { font-size: var(--fs-h2); max-width: 20ch; }

/* ---------------------------------------------------------- 4. Type pieces */
.eyebrow {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  margin: 0 0 1.25rem;
  display: block;
  opacity: 0.75;
}

.display {
  font-size: var(--fs-display);
  line-height: 0.96;
  letter-spacing: -0.025em;
}

.lede {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.7;
  max-width: 56ch;
}

/* Oversized serif statement paragraph */
.statement {
  font-family: var(--font-display);
  font-size: clamp(1.6rem, 0.95rem + 2.9vw, 3.4rem);
  line-height: 1.16;
  letter-spacing: -0.02em;
  max-width: 24ch;
  margin: 0;
  text-wrap: balance;
}
.statement--wide { max-width: 34ch; }

/* ------------------------------------------------------------- 5. Buttons */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.6em;
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 500;
  padding: 0.95em 1.9em;
  border-radius: var(--radius-pill);
  border: var(--border);
  background: var(--mint);
  color: var(--navy);
  cursor: pointer;
  transition: background 0.35s var(--ease), color 0.35s var(--ease),
              transform 0.35s var(--ease);
  text-align: center;
}
.btn:hover { background: var(--navy); color: var(--mint); transform: translateY(-2px); }

.btn--navy { background: var(--navy); color: var(--mint); }
.btn--navy:hover { background: var(--mint); color: var(--navy); }

.btn--ghost { background: transparent; }
.btn--ghost:hover { background: var(--navy); color: var(--cream); }

.btn--light { background: var(--cream); color: var(--navy); }

.btn--lg { padding: 1.15em 2.4em; font-size: 0.75rem; }
.btn--block { display: flex; width: 100%; justify-content: center; }

.link-u {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  padding-bottom: 3px;
  border-bottom: 1.5px solid currentColor;
  transition: opacity 0.3s var(--ease);
  display: inline-block;
}
.link-u:hover { opacity: 0.55; }

/* ------------------------------------------------ 6. Ticker + marquee bands */
.ticker {
  background: var(--mint);
  color: var(--navy);
  border-bottom: var(--border);
  overflow: hidden;
  padding-block: 0.4rem;
  position: relative;
  z-index: 60;
}
.ticker__track {
  display: flex;
  width: max-content;
  animation: slide-left 46s linear infinite;
}
.ticker__group {
  display: flex;
  align-items: center;
  gap: 2.25rem;
  padding-right: 2.25rem;
  white-space: nowrap;
}
.ticker__item {
  font-size: clamp(0.6875rem, 0.58rem + 0.3vw, 0.9375rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
  display: inline-flex;
  align-items: center;
  gap: 0.85rem;
}
/* Small checkerboard separator, echoing the divider strips */
.ticker__item::before {
  content: "";
  width: 0.7em;
  height: 0.7em;
  flex-shrink: 0;
  background-color: var(--mint);
  background-image:
    linear-gradient(45deg, var(--navy) 25%, transparent 25%, transparent 75%, var(--navy) 75%),
    linear-gradient(45deg, var(--navy) 25%, transparent 25%, transparent 75%, var(--navy) 75%);
  background-size: 0.35em 0.35em;
  background-position: 0 0, 0.175em 0.175em;
}

@keyframes slide-left {
  from { transform: translate3d(0, 0, 0); }
  to   { transform: translate3d(-50%, 0, 0); }
}

.marquee {
  background: var(--navy);
  color: var(--cream);
  padding-block: clamp(1rem, 2.2vw, 1.9rem);
  overflow: hidden;
  border-block: var(--border);
}
.marquee--peri { background: var(--peri); color: var(--navy); }
.marquee--mint { background: var(--mint); color: var(--navy); }

.marquee__track {
  display: flex;
  width: max-content;
  animation: slide-left 38s linear infinite;
}
.marquee__group {
  display: flex;
  align-items: center;
  gap: 1.75rem;
  padding-right: 1.75rem;
  white-space: nowrap;
}
.marquee__item {
  font-family: var(--font-display);
  font-size: clamp(1.4rem, 3.4vw, 3rem);
  letter-spacing: -0.02em;
  display: inline-flex;
  align-items: center;
  gap: 1.75rem;
}
.marquee__item::after { content: "\25C6"; font-size: 0.4em; opacity: 0.6; }

.marquee--slow .marquee__track { animation-duration: 62s; }
.marquee--rev  .marquee__track { animation-direction: reverse; }

@media (prefers-reduced-motion: reduce) {
  .ticker__track, .marquee__track { animation: none; }
}

/* ------------------------------------------- 7. Checkerboard divider strip */
.checker {
  height: var(--check-size);
  background-color: var(--peri);
  background-image:
    linear-gradient(45deg, var(--navy) 25%, transparent 25%, transparent 75%, var(--navy) 75%),
    linear-gradient(45deg, var(--navy) 25%, transparent 25%, transparent 75%, var(--navy) 75%);
  background-size: var(--check-size) var(--check-size);
  background-position: 0 0, calc(var(--check-size) / 2) calc(var(--check-size) / 2);
}
.checker--cream { background-color: var(--cream); }
.checker--mint  { background-color: var(--mint); }
.checker--pink  { background-color: var(--pink); }

/* ---------------------------------------------------------- 8. Site header */
.header {
  background: var(--cream);
  border-bottom: var(--border);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: clamp(1rem, 2.5vw, 2.25rem);
  min-height: var(--header-h);
  padding-block: 0.6rem;
}

.brand { display: flex; align-items: center; flex-shrink: 0; }
.brand img { height: clamp(34px, 5.2vw, 76px); width: auto; }

.nav {
  display: flex;
  align-items: center;
  gap: clamp(0.85rem, 1.9vw, 2.6rem);
  margin-inline: auto;
}
.nav__link {
  /* Tuned so all seven links still fit on one line down to ~860px, rather
     than collapsing to a burger while there is still room for them. */
  font-size: clamp(0.6875rem, 0.333rem + 0.74vw, 1rem);
  letter-spacing: 0.02em;
  text-transform: uppercase;
  font-weight: 500;
  line-height: 1.2;
  /* Two-word labels wrap, so centre the lines on each other */
  text-align: center;
  /* Narrow enough to break two-word labels onto a second line, as the
     parent site does ("WHAT WE / MAKE"). */
  max-width: 5.2em;
  transition: opacity 0.3s var(--ease);
  position: relative;
}
.nav__link:hover { opacity: 0.6; }
.nav__link[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -5px;
  height: 1.5px;
  background: currentColor;
}

/* The header pill is periwinkle with white text and no rule, unlike the
   mint-and-navy buttons used inside the page. */
.header__cta,
.nav__cta-mobile {
  flex-shrink: 0;
  background: var(--peri-light);
  color: var(--white);
  border-color: transparent;
  font-size: clamp(0.6875rem, 0.6rem + 0.28vw, 0.875rem);
  padding: 0.85em 1.75em;
}
.header__cta:hover,
.nav__cta-mobile:hover { background: var(--navy); color: var(--mint); }

.nav-toggle {
  display: none;
  background: transparent;
  border: var(--border);
  border-radius: var(--radius-pill);
  padding: 0.6rem 1.1rem;
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  cursor: pointer;
}

.nav__cta-mobile { display: none; }

@media (max-width: 860px) {
  .nav, .header__cta { display: none; }
  .nav-toggle { display: inline-block; }

  .nav--open {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 1.35rem;
    margin-inline: 0;
    position: fixed;
    inset: 0 0 0 auto;
    width: min(88vw, 400px);
    background: var(--cream);
    border-left: var(--border);
    padding: clamp(5rem, 12vw, 7rem) var(--gutter) 2.5rem;
    overflow-y: auto;
    z-index: 70;
  }
  /* In the drawer the links stack in a left-aligned column, so the centring
     used by the inline nav would leave them looking ragged. */
  .nav--open .nav__link { font-size: 0.875rem; max-width: none; text-align: left; }
  .nav--open .nav__cta-mobile { display: inline-flex; margin-top: 1rem; }
}

.nav-scrim {
  position: fixed;
  inset: 0;
  background: color-mix(in srgb, var(--navy-deep) 55%, transparent);
  z-index: 65;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s var(--ease);
}
.nav-scrim.is-visible { opacity: 1; pointer-events: auto; }

body.nav-locked { overflow: hidden; }

/* ----------------------------------------------------------------- 9. Hero */
.hero {
  background: var(--peri);
  padding-block: clamp(3rem, 7vw, 6.5rem) clamp(3.5rem, 8vw, 7rem);
  position: relative;
  overflow: hidden;
}
.hero__grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2.5rem, 5vw, 4rem);
  align-items: center;
}
@media (min-width: 900px) {
  .hero__grid { grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.05fr); }
}

.hero__copy { max-width: 46ch; }
.hero__title {
  /* Deliberately smaller than --fs-display: the hero sits in a half-width
     column, and the parent site keeps this headline to three or four lines. */
  font-size: clamp(2.35rem, 1.35rem + 3.4vw, 4rem);
  line-height: 1.0;
  margin-bottom: 0.6em;
}
.hero__lede { margin-bottom: 2rem; max-width: 46ch; }

.collage {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: clamp(0.75rem, 1.6vw, 1.35rem);
}
.collage__item {
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--peri-light);
  aspect-ratio: 4 / 5;
}
.collage__item img { width: 100%; height: 100%; object-fit: cover; }
.collage__item--wide { aspect-ratio: 5 / 4; }
.collage__item--offset { margin-top: clamp(1.5rem, 4vw, 3.5rem); }

/* ------------------------------------------------------- 10. Client logos */
/* Client logos ship as navy-on-transparent PNGs, so no tinting filter is
   needed here — see the note in README.md on preparing new ones. */

/* Serif lead-in above the strip, matching the parent site's 28px heading. */
.logo-heading {
  font-family: var(--font-display);
  font-size: clamp(1.35rem, 1.05rem + 0.95vw, 1.85rem);
  font-weight: 400;
  line-height: 1.2;
  letter-spacing: -0.01em;
  text-align: center;
  margin: 0 0 clamp(1.75rem, 3.2vw, 2.75rem);
}

/* Continuously scrolling strip, so the row holds more brands than fit on
   screen and never wraps into a ragged second line. */
.logo-marquee { overflow: hidden; }
.logo-marquee__track {
  display: flex;
  width: max-content;
  animation: slide-left 44s linear infinite;
}
.logo-marquee__group {
  display: flex;
  align-items: center;
  gap: clamp(2.5rem, 5.5vw, 5.5rem);
  padding-right: clamp(2.5rem, 5.5vw, 5.5rem);
}
.logo-marquee img {
  height: clamp(26px, 3.4vw, 50px);
  width: auto;
  object-fit: contain;
  opacity: 0.88;
  flex-shrink: 0;
}
.logo-marquee:hover .logo-marquee__track { animation-play-state: paused; }

@media (prefers-reduced-motion: reduce) {
  .logo-marquee__track { animation: none; flex-wrap: wrap; justify-content: center; }
}

/* Static fallback row, still used where a strip would be overkill. */
.logo-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: center;
  gap: clamp(1.75rem, 4vw, 4rem);
}
.logo-row img {
  height: clamp(24px, 3.2vw, 44px);
  width: auto;
  object-fit: contain;
  opacity: 0.88;
  transition: opacity 0.3s var(--ease);
}
.logo-row img:hover { opacity: 1; }

/* --------------------------------------------------- 11. Programme blocks */
.programme { border-top: var(--border); }
.programme__inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: clamp(2rem, 4vw, 4rem);
  align-items: center;
  padding-block: clamp(3rem, 6vw, 6rem);
}
@media (min-width: 900px) {
  .programme__inner { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .programme--flip .programme__media { order: -1; }
}

.programme__mark {
  width: clamp(44px, 5vw, 62px);
  height: clamp(44px, 5vw, 62px);
  margin-bottom: 1.75rem;
}
.programme__mark svg { width: 100%; height: 100%; }

.programme__meta {
  font-size: var(--fs-small);
  font-style: italic;
  font-family: var(--font-display);
  opacity: 0.8;
  margin-bottom: 1.25rem;
  display: block;
}

.programme__media {
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  aspect-ratio: 4 / 3;
}
/* For a portrait source, the default 4:3 frame crops away most of the shot. */
.programme__media--tall { aspect-ratio: 4 / 5; }
/* For artwork with content in the corners — a concept board carrying logos —
   where any crop would clip something that matters. */
.programme__media--square { aspect-ratio: 1 / 1; }
.programme__media img { width: 100%; height: 100%; object-fit: cover; }

.tag-list {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1.5rem 0 2rem;
  padding: 0;
  list-style: none;
}
.tag {
  font-size: var(--fs-label);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  padding: 0.45em 1em;
  border: var(--border-hair);
  border-radius: var(--radius-pill);
}

/* --------------------------------------------------------- 12. Card grids */
.grid {
  display: grid;
  gap: clamp(1rem, 2.2vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
}
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 380px), 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 230px), 1fr)); }

.card {
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.5rem, 2.6vw, 2.35rem);
  background: var(--cream);
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  transition: transform 0.4s var(--ease), background 0.4s var(--ease);
}
a.card:hover { transform: translateY(-5px); }
.card h3 { margin: 0; }
.card p  { font-size: var(--fs-small); line-height: 1.65; }
.card--peri { background: var(--peri); }
.card--mint { background: var(--mint); }
.card--pink { background: var(--pink); }
.card--pale { background: var(--peri-pale); }
.card--navy { background: var(--navy); color: var(--cream); }
.card--navy h3 { color: var(--cream); }
/* Text-only variant used for the three pillars under the statement line */
.card--bare { border: 0; background: transparent; padding: 0; }

.card__num { font-size: var(--fs-label); letter-spacing: 0.16em; opacity: 0.55; }

.card__media {
  border-radius: var(--radius);
  overflow: hidden;
  aspect-ratio: 3 / 2;
  margin-bottom: 0.4rem;
  border: var(--border-hair);
}
.card__media img { width: 100%; height: 100%; object-fit: cover; }

/* ------------------------------------------------- 13. Capability columns */
.cap-cols {
  display: grid;
  gap: clamp(1.5rem, 3vw, 2.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 180px), 1fr));
}
.cap-col h3 {
  font-size: var(--fs-h4);
  padding-bottom: 0.6rem;
  margin-bottom: 1rem;
  border-bottom: var(--border);
}
.cap-col ul { list-style: none; margin: 0; padding: 0; }
.cap-col li {
  font-size: var(--fs-small);
  padding-block: 0.4rem;
  border-bottom: var(--border-hair);
}

/* ------------------------------------------------------------ 14. Process */
.steps { counter-reset: step; list-style: none; margin: 0; padding: 0; }
.step {
  counter-increment: step;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: clamp(1.25rem, 3vw, 2.75rem);
  padding-block: clamp(1.75rem, 3vw, 2.6rem);
  border-top: var(--border-hair);
  align-items: start;
}
.step:first-child { border-top: var(--border); }
.step:last-child  { border-bottom: var(--border); }
.step::before {
  content: counter(step, decimal-leading-zero);
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 4vw, 3.25rem);
  line-height: 0.9;
  opacity: 0.35;
}
.step h3 { margin-bottom: 0.4rem; }
.step p  { font-size: var(--fs-small); max-width: 62ch; }

/* ------------------------------------------------- 14b. Team group photo
   A cut-out duotone shot that sits flush on the section's bottom edge, so the
   figures stand directly on the background colour with no visible frame. */
.has-team-photo { padding-bottom: 0; overflow: hidden; }

/* Sits outside .wrap so it runs the full viewport width with no gutter. */
.team-photo {
  margin: clamp(2.5rem, 6vw, 5rem) 0 0;
  width: 100%;
  display: block;
}
.team-photo img {
  width: 100%;
  height: auto;
  display: block;
  /* Nudged down by a hair so anti-aliased edges meet the section edge cleanly */
  margin-bottom: -1px;
}

/* --------------------------------------------------------- 15. Work grid */
.work-grid {
  display: grid;
  gap: clamp(1rem, 2vw, 1.75rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr));
}
.work-card {
  display: block;
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  transition: transform 0.45s var(--ease);
}
.work-card:hover { transform: translateY(-6px); }
.work-card__media { aspect-ratio: 4 / 3; overflow: hidden; background: var(--peri-pale); }
.work-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.work-card:hover .work-card__media img { transform: scale(1.05); }
.work-card__body { padding: 1.25rem clamp(1.1rem, 2vw, 1.6rem) 1.5rem; }
.work-card__body h3 { font-size: var(--fs-h4); margin-bottom: 0.5rem; }
.work-card__tags {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  line-height: 1.6;
}

/* ------------------------------------------------- Work carousel
   A compact, horizontally scrolling alternative to the grid. Native
   overflow scrolling does the work, so it drags on touch and scrolls with a
   trackpad; the arrows are a convenience on top, not the mechanism. */
.carousel-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  margin-bottom: clamp(1.5rem, 3vw, 2.25rem);
}
.carousel-head .filters { margin-bottom: 0; }

.carousel__nav { display: flex; gap: 0.5rem; flex-shrink: 0; }
.carousel__btn {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border: var(--border);
  border-radius: 50%;
  background: transparent;
  color: var(--navy);
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), opacity 0.3s var(--ease);
}
.carousel__btn:hover:not(:disabled) { background: var(--navy); color: var(--mint); }
.carousel__btn:disabled { opacity: 0.25; cursor: default; }
.carousel__btn svg { width: 1rem; height: 1rem; }

.carousel__viewport {
  display: flex;
  gap: clamp(0.85rem, 1.6vw, 1.35rem);
  overflow-x: auto;
  /* Deliberately no scroll-snap. The arrows already move in exact card
     increments, and snapping fought them at every turn — overriding the
     programmatic scroll, offsetting the snap positions, and pulling back from
     the clamped end so the final card never quite arrived. */
  scroll-behavior: smooth;
  scrollbar-width: none;
  -ms-overflow-style: none;
  /* Vertical only — horizontal padding would offset every snap position and
     put the maths out of step with the card width the arrows scroll by. */
  padding-block: 0.5rem 1rem;
}
.carousel__viewport::-webkit-scrollbar { display: none; }

.carousel__viewport > .work-card {
  flex: 0 0 clamp(228px, 23vw, 300px);
}
.carousel__viewport > .work-card .work-card__media { aspect-ratio: 4 / 3; }
.carousel__viewport > .work-card .work-card__body { padding: 1rem 1.15rem 1.25rem; }
.carousel__viewport > .work-card .work-card__body h3 { font-size: var(--fs-h4); }

@media (prefers-reduced-motion: reduce) {
  .carousel__viewport { scroll-behavior: auto; }
}

.filters {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
  padding: 0;
  list-style: none;
}
.filter-btn {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  padding: 0.55em 1.2em;
  border: var(--border-hair);
  border-radius: var(--radius-pill);
  background: transparent;
  cursor: pointer;
  transition: background 0.3s var(--ease), color 0.3s var(--ease), border-color 0.3s var(--ease);
}
.filter-btn:hover { border-color: var(--navy); }
.filter-btn[aria-pressed="true"] { background: var(--navy); color: var(--mint); border-color: var(--navy); }

.work-card[hidden] { display: none; }

/* ------------------------------------------------------- 17. Testimonials */
.quotes {
  display: grid;
  gap: clamp(1rem, 2.2vw, 2rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 290px), 1fr));
}
.quote {
  border: var(--border);
  border-radius: var(--radius-lg);
  padding: clamp(1.6rem, 2.6vw, 2.35rem);
  display: flex;
  flex-direction: column;
  gap: 1.25rem;
}
.quote__avatar {
  width: 46px; height: 46px;
  border-radius: 50%;
  border: var(--border);
  display: grid;
  place-items: center;
  font-family: var(--font-display);
  font-size: 1.25rem;
  flex-shrink: 0;
}
.quote__text {
  font-family: var(--font-display);
  font-size: clamp(1.1rem, 0.95rem + 0.6vw, 1.5rem);
  line-height: 1.32;
  margin: 0;
  flex-grow: 1;
}
.quote__by {
  font-size: var(--fs-label);
  letter-spacing: 0.11em;
  text-transform: uppercase;
  line-height: 1.7;
  opacity: 0.75;
}

/* -------------------------------------------------------------- 18. Stats */
.stats {
  display: grid;
  gap: clamp(1.5rem, 3vw, 3rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
}
.stat__figure {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 1.5rem + 4vw, 5rem);
  line-height: 0.9;
  letter-spacing: -0.03em;
  display: block;
  margin-bottom: 0.5rem;
}
.stat__label {
  font-size: var(--fs-label);
  letter-spacing: 0.15em;
  text-transform: uppercase;
  opacity: 0.7;
}

/* ---------------------------------------------------------- 19. Accordion */
.accordion { border-top: var(--border); }
.acc-item { border-bottom: var(--border-hair); }
.acc-btn {
  width: 100%;
  background: transparent;
  border: 0;
  cursor: pointer;
  text-align: left;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1.5rem;
  padding: clamp(1.1rem, 2.2vw, 1.6rem) 0;
  font-family: var(--font-display);
  font-size: var(--fs-h4);
  line-height: 1.25;
  color: inherit;
}
.acc-btn__icon {
  flex-shrink: 0;
  width: 1.5rem; height: 1.5rem;
  position: relative;
  margin-top: 0.25rem;
}
.acc-btn__icon::before,
.acc-btn__icon::after {
  content: "";
  position: absolute;
  inset: 50% 0 auto 0;
  height: 1.5px;
  background: currentColor;
  transition: transform 0.35s var(--ease);
}
.acc-btn__icon::after { transform: rotate(90deg); }
.acc-btn[aria-expanded="true"] .acc-btn__icon::after { transform: rotate(0deg); }

.acc-panel {
  display: grid;
  grid-template-rows: 0fr;
  transition: grid-template-rows 0.4s var(--ease);
}
.acc-panel[data-open="true"] { grid-template-rows: 1fr; }
.acc-panel__inner { overflow: hidden; }
.acc-panel__inner > div {
  padding-bottom: clamp(1.25rem, 2.4vw, 1.9rem);
  font-size: var(--fs-small);
  max-width: 74ch;
}
.acc-panel ul { margin: 0.75rem 0 0; padding-left: 1.15rem; }
.acc-panel li { margin-bottom: 0.35rem; }

/* --------------------------------------------------------------- 20. Form */
.form-grid {
  display: grid;
  gap: clamp(1.25rem, 2.4vw, 1.9rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr));
}
.field { display: flex; flex-direction: column; gap: 0.55rem; }
.field--full { grid-column: 1 / -1; }

.field > label,
.fieldset__legend {
  font-size: var(--fs-label);
  letter-spacing: 0.14em;
  text-transform: uppercase;
  font-weight: 500;
}
.req { color: var(--rust); }

.field__hint { font-size: var(--fs-small); opacity: 0.65; line-height: 1.55; margin: 0; }

.field input,
.field select,
.field textarea {
  width: 100%;
  background: var(--cream);
  border: var(--border);
  border-radius: var(--radius);
  padding: 0.85rem 1.1rem;
  font-size: var(--fs-body);
  transition: box-shadow 0.25s var(--ease);
}
.field textarea { min-height: 9rem; resize: vertical; }
.field select { appearance: none; padding-right: 2.75rem; cursor: pointer; }

.select-wrap { position: relative; }
.select-wrap::after {
  content: "";
  position: absolute;
  right: 1.15rem; top: 50%;
  width: 0.5rem; height: 0.5rem;
  border-right: 1.5px solid var(--navy);
  border-bottom: 1.5px solid var(--navy);
  transform: translateY(-70%) rotate(45deg);
  pointer-events: none;
}

.field input:focus,
.field select:focus,
.field textarea:focus {
  outline: none;
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--navy) 28%, transparent);
}

.fieldset { border: 0; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 0.85rem; }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }

.choice { position: relative; display: inline-flex; }
.choice input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }
.choice span {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  padding: 0.6em 1.15em;
  border: var(--border-hair);
  border-radius: var(--radius-pill);
  transition: background 0.25s var(--ease), color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.choice input:checked + span { background: var(--navy); color: var(--mint); border-color: var(--navy); }
.choice input:focus-visible + span { outline: 2.5px solid var(--navy); outline-offset: 3px; }

.form-note { font-size: var(--fs-small); opacity: 0.65; margin-top: 1.5rem; }

.form-status {
  margin-top: 1.25rem;
  padding: 1rem 1.25rem;
  border: var(--border);
  border-radius: var(--radius);
  background: var(--mint);
  font-size: var(--fs-small);
}
.form-status[hidden] { display: none; }
.form-status--error { background: color-mix(in srgb, var(--rust) 12%, var(--cream)); }

/* Honeypot */
.hp { position: absolute; left: -9999px; opacity: 0; height: 0; overflow: hidden; }

/* ----------------------------------------------------------- 21. Job list */
.jobs { list-style: none; margin: 0; padding: 0; border-top: var(--border); }
.job {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding-block: clamp(1.25rem, 2.4vw, 1.9rem);
  border-bottom: var(--border-hair);
}
.job h3 { margin: 0 0 0.25rem; font-size: var(--fs-h4); }
.job__where { font-size: var(--fs-label); letter-spacing: 0.13em; text-transform: uppercase; opacity: 0.65; }

/* --------------------------------------------------------------- 22. CTA */
.cta-band { text-align: center; }
.cta-band .display { margin-bottom: 0.4em; }
.cta-band .lede { margin-inline: auto; margin-bottom: 2.25rem; }

/* ------------------------------------------------------------ 23. Footer */
.footer { background: var(--navy); color: var(--cream); }
.footer a { color: var(--cream); }

.footer__main {
  display: grid;
  gap: clamp(2.25rem, 4vw, 3.5rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  padding-block: clamp(3rem, 6vw, 5rem);
}
@media (min-width: 900px) { .footer__brand { grid-column: span 2; max-width: 34ch; } }

.footer__logo { height: clamp(32px, 4vw, 46px); width: auto; filter: brightness(0) invert(1); }
.footer__tagline { font-size: var(--fs-small); opacity: 0.8; margin-top: 1.5rem; }

.footer h4 {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-weight: 500;
  opacity: 0.6;
  margin-bottom: 1.1rem;
  color: var(--cream);
}
.footer ul { list-style: none; margin: 0; padding: 0; }
.footer li { margin-bottom: 0.6rem; font-size: var(--fs-small); }
.footer li a { transition: opacity 0.3s var(--ease); }
.footer li a:hover { opacity: 0.6; }
.footer address { font-style: normal; font-size: var(--fs-small); line-height: 1.8; opacity: 0.85; }

.footer__legal {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 2rem;
  justify-content: space-between;
  align-items: center;
  padding-block: 1.75rem;
  border-top: 1px solid color-mix(in srgb, var(--cream) 22%, transparent);
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.7;
}
.footer__legal ul { display: flex; flex-wrap: wrap; gap: 1.5rem; }
.footer__legal li { margin: 0; font-size: inherit; }

/* ---------------------------------------------------- 24. Sub-page hero */
.page-hero {
  background: var(--peri);
  border-bottom: var(--border);
  padding-block: clamp(3rem, 7vw, 6rem);
}
.page-hero .eyebrow { opacity: 0.8; }
.page-hero__title { font-size: var(--fs-h1); max-width: 18ch; }
.page-hero .lede { margin-top: 1.5rem; }

/* ------------------------------------------------- 25. Reveal on scroll
   Scoped to .js (set by an inline script in <head>). Without JavaScript the
   starting state never applies, so content is never left invisible. */
.js .reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.75s var(--ease), transform 0.75s var(--ease);
}
.js .reveal.is-in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

/* ---------------------------------------------------------------- 26. Blog */
.post-meta {
  font-family: var(--font-mono);
  font-size: var(--fs-label);
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.7;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem 1.1rem;
  margin: 0;
}
.post-meta > * { margin: 0; }

.post-grid {
  display: grid;
  gap: clamp(1.25rem, 2.6vw, 2.25rem);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
}

.post-card {
  display: flex;
  flex-direction: column;
  border: var(--border);
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--cream);
  transition: transform 0.45s var(--ease);
}
.post-card:hover { transform: translateY(-5px); }
.post-card__media { aspect-ratio: 16 / 10; overflow: hidden; background: var(--peri-pale); }
.post-card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform 0.7s var(--ease);
}
.post-card:hover .post-card__media img { transform: scale(1.05); }
.post-card__body {
  display: flex;
  flex-direction: column;
  gap: 0.85rem;
  padding: clamp(1.25rem, 2.2vw, 1.85rem);
  flex-grow: 1;
}
.post-card__body h3 { font-size: var(--fs-h3); margin: 0; }
.post-card__body p { font-size: var(--fs-small); margin: 0; }
/* Pins the read link to the bottom so cards of differing length still align */
.post-card__more { margin-top: auto; padding-top: 0.5rem; }

/* Article body. Spacing is owned by the flow rule below rather than by each
   element, so pasting new blocks into a post keeps the rhythm. */
.article { max-width: 68ch; }
.article > * { margin-block: 0; }
.article > * + * { margin-top: 1.4em; }
.article > h2 { margin-top: 2.4em; font-size: var(--fs-h3); }
.article > h3 { margin-top: 2em; font-size: var(--fs-h4); }
.article p,
.article li {
  font-size: clamp(0.95rem, 0.9rem + 0.25vw, 1.0625rem);
  line-height: 1.75;
}
.article ul, .article ol { padding-left: 1.3rem; }
.article li + li { margin-top: 0.5rem; }
.article a:not(.btn) { border-bottom: 1.5px solid currentColor; }
.article a:not(.btn):hover { opacity: 0.6; }
.article strong { font-weight: 500; }

.article blockquote {
  padding-left: clamp(1rem, 2vw, 1.5rem);
  border-left: 3px solid var(--peri);
  font-family: var(--font-display);
  font-size: clamp(1.2rem, 1rem + 0.8vw, 1.6rem);
  line-height: 1.35;
}
.article figure img { border: var(--border); border-radius: var(--radius-lg); }
.article figcaption {
  font-size: var(--fs-label);
  letter-spacing: 0.1em;
  text-transform: uppercase;
  opacity: 0.6;
  margin-top: 0.75rem;
}
.article hr { border: 0; border-top: var(--border-hair); }

/* --------------------------------------------------------------- 27. Print */
@media print {
  .ticker, .marquee, .header, .footer, .checker, .nav-scrim { display: none !important; }
  body { background: #fff; color: #000; }
}
