/* ---------- Section heads ---------- */
.section-head { display: grid; gap: var(--space-3); margin-bottom: var(--space-5); }
.section-head h2 { margin: 0; }
.section-lead { max-width: var(--measure); margin: 0; font-size: var(--text-lg); color: var(--color-muted); }
@media (min-width: 1024px) {
  .section-head { grid-template-columns: 1.4fr 1fr; align-items: end; column-gap: var(--space-5); }
  .section-head .eyebrow { grid-column: 1 / -1; margin-bottom: 0; }
}

/* ---------- Hero (type mode) ---------- */
.hero {
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  padding-block: calc(var(--header-height) + var(--space-3)) var(--space-4);
}
.hero-inner {
  flex: 1;
  display: grid;
  grid-template-rows: auto 1fr auto;
  gap: var(--space-4);
}
.hero-top {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: var(--space-1) var(--space-3);
  font-size: var(--text-sm);
  color: var(--color-muted);
}
.hero-top .eyebrow { margin: 0; }
.hero-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem var(--space-3);
  margin: 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}

.hero-main { align-self: end; }
/* Oswald headline. Size follows the smaller of width and height, so the hero fits short screens too. */
.hero-title {
  max-width: 8.5em;
  margin: 0 0 0.08em; /* room for the Oswald descenders above the word wheel */
  overflow-wrap: break-word;
  font-family: var(--font-condensed);
  font-size: clamp(2.5rem, min(13vw, 15svh), 13rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.95;
}

/* "[Strength] is built in." The visible wheel is decorative; a visually-hidden sentence carries the meaning. */
.hero-wheel {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  gap: 0 0.3em;
  margin: var(--space-3) 0 0;
  font-family: var(--font-display);
  font-size: clamp(1.25rem, min(1rem + 2.6vw, 6svh), 3.5rem);
  font-weight: 500;
  line-height: 1.15;
  letter-spacing: -0.03em;
}
.wheel {
  position: relative;
  display: inline-block;
  height: 1.15em;
  overflow: hidden;
  vertical-align: bottom;
}
.wheel-word { display: block; height: 1.15em; white-space: nowrap; }
.wheel-suffix { color: var(--color-muted); }

.hero-bottom { display: grid; gap: var(--space-3); align-items: end; }
.hero-text { max-width: 34ch; margin: 0; font-size: var(--text-lg); color: var(--color-muted); }
.hero-actions { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-3); }
/* Phones: keep the button and the link on one row */
@media (max-width: 639px) { .hero-actions { column-gap: var(--space-2); } }
@media (min-width: 768px) {
  .hero-bottom { grid-template-columns: 1fr auto; }
}

/* Hero showcase panel (type mode; main.js renderHeroVisual): the showcase project's images crossfading, with a
   caption, linking to Projects.
   - Laptops (docs/specs/2026-10-11-hero-showcase.md): a large image filling the right 42% of the screen, from under
     the header to the bottom of the hero, edge to edge. The hero content keeps to the left of it (padding-right below)
     and the headline is sized for the narrower column.
   - Phones and tablets (docs/specs/2026-10-21-mobile-hero.md): a rounded photo card in the hero's spare middle row.
     Hidden on short screens (under 600px tall), where the hero text needs the whole screen. */
.hero-visual { display: none; }
.hero-visual-link { position: absolute; inset: 0; display: block; color: var(--color-on-dark); text-decoration: none; }
.hero-visual-frame { position: absolute; inset: 0; overflow: hidden; }
.hero-visual .media-item { opacity: 0; transform: scale(1.06); transition: opacity 1.6s cubic-bezier(0.45, 0, 0.2, 1), transform 0s linear 1.6s; }
.hero-visual .media-item.is-active { opacity: 1; transform: scale(1); transition: opacity 1.6s cubic-bezier(0.45, 0, 0.2, 1), transform 8s cubic-bezier(0.3, 0, 0.4, 1); }
.hero-visual-link::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 30%;
  background: linear-gradient(to top, rgb(var(--dark-rgb) / 0.55), rgb(var(--dark-rgb) / 0));
  pointer-events: none;
}
.hero-visual-caption {
  position: absolute;
  z-index: 1;
  left: var(--space-3);
  bottom: var(--space-3);
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.hero-visual-caption::after { content: "\2192"; display: inline-block; margin-left: 0.5em; transition: transform 0.4s var(--ease-out); }
.hero-visual-link:hover .hero-visual-caption::after,
.hero-visual-link:focus-visible .hero-visual-caption::after { transform: translateX(0.35em); }
.hero-visual-link:focus-visible { outline: 2px solid var(--color-on-dark); outline-offset: -6px; }
/* Entrance once the loader is done (main.js adds .is-in on site:ready): the photo settles from a zoom */
.js .hero-visual:not(.is-in) .hero-visual-frame { transform: scale(1.15); }
.js .hero-visual.is-in .hero-visual-frame { transform: scale(1); transition: transform 2.2s cubic-bezier(0.22, 1, 0.36, 1) 0.2s; }

@media (min-width: 1024px) {
  .hero--type { --hero-panel: 42vw; }
  .hero--type.has-visual .hero-inner {
    /* content ends a gap before the panel, wherever the centred container sits */
    padding-right: calc(var(--hero-panel) + var(--space-5) - max(0px, (100vw - var(--max-width)) / 2));
  }
  .hero--type.has-visual .hero-title { font-size: clamp(2.5rem, min(7vw, 14svh), 11rem); }
  .hero--type.has-visual .hero-bottom { grid-template-columns: 1fr; }
  /* Short laptops: the narrower column wraps the eyebrow, so trim the headline and body text to keep one screen */
  @media (max-height: 700px) {
    .hero--type.has-visual .hero-title { font-size: clamp(2.5rem, min(7vw, 12svh), 11rem); }
    .hero--type.has-visual .hero-text { font-size: var(--text-base); }
  }
  .hero--type .hero-visual:not([hidden]) {
    position: absolute;
    z-index: 0;
    top: var(--header-height);
    right: 0;
    bottom: 0;
    display: block;
    width: var(--hero-panel);
    overflow: hidden;
    background: var(--color-surface);
  }
  /* Entrance: wipes up from the bottom */
  .js .hero-visual:not(.is-in) { clip-path: inset(100% 0 0 0); }
  .js .hero-visual.is-in { clip-path: inset(0 0 0 0); transition: clip-path 1.6s cubic-bezier(0.77, 0, 0.18, 1) 0.2s; }
}

/*
 * Phones and tablets: the card takes the hero's 1fr row (the spare space between the meta line and the headline).
 * The box runs edge to edge and is clipped back to the gutters with rounded corners, so motion.js can widen it to the
 * screen edges on scroll. clip-path also clips taps, so the hidden strips are not part of the link.
 */
@media (max-width: 1023px) and (min-height: 600px) {
  .hero--type.has-visual .hero-inner { grid-template-rows: auto 1fr auto auto; gap: var(--space-3); }
  .hero--type.has-visual .hero-text { font-size: var(--text-base); }
  .hero--type .hero-visual:not([hidden]) {
    position: relative;
    display: block;
    min-height: 8rem;
    margin-inline: calc(-1 * var(--gutter));
    overflow: hidden; /* the scroll zoom must not widen the page */
    background: var(--color-surface);
    clip-path: inset(0 var(--gutter) round 1.25rem);
  }
  .hero-visual .media-img { object-position: 50% 40%; }
  .hero-visual-caption { left: calc(var(--gutter) + var(--space-2)); bottom: var(--space-2); }
  /* The edge-to-edge link's outline would be clipped: draw the focus ring inside the visible card instead */
  .hero-visual-link:focus-visible { outline: none; }
  .hero-visual-link:focus-visible::before {
    content: "";
    position: absolute;
    z-index: 2;
    inset: 6px calc(var(--gutter) + 6px);
    border: 2px solid var(--color-on-dark);
    border-radius: 1rem;
    pointer-events: none;
  }
  /* Short phones (iPhone SE size): the tighter hero spacing from the short-screen rule below */
  @media (max-height: 700px) {
    .hero--type.has-visual .hero-inner { gap: var(--space-2); }
  }
  /* Entrance: the photo wipes up inside the card */
  .js .hero-visual:not(.is-in) .hero-visual-link { clip-path: inset(100% 0 0 0); }
  .js .hero-visual.is-in .hero-visual-link { clip-path: inset(0 0 0 0); transition: clip-path 1.6s cubic-bezier(0.77, 0, 0.18, 1) 0.2s; }
}

@media (prefers-reduced-motion: reduce) {
  .hero-visual .media-item,
  .hero-visual .media-item.is-active { transition: none; transform: none; }
  .js .hero-visual:not(.is-in),
  .js .hero-visual.is-in,
  .js .hero-visual:not(.is-in) .hero-visual-link,
  .js .hero-visual.is-in .hero-visual-link { transition: none; }
  .js .hero-visual:not(.is-in) .hero-visual-frame,
  .js .hero-visual.is-in .hero-visual-frame { transform: none; transition: none; }
}
@media (min-width: 1024px) and (prefers-reduced-motion: reduce) {
  .js .hero-visual:not(.is-in),
  .js .hero-visual.is-in { clip-path: none; }
}
@media (max-width: 1023px) and (min-height: 600px) and (prefers-reduced-motion: reduce) {
  .js .hero-visual:not(.is-in) .hero-visual-link,
  .js .hero-visual.is-in .hero-visual-link { clip-path: none; }
}

/* Short screens (small phones, landscape phones, short laptops): tighter hero so it fits in one screen */
@media (max-height: 700px) {
  .hero { padding-block: calc(var(--header-height) + var(--space-2)) var(--space-3); }
  .hero-inner { gap: var(--space-2); }
  .hero-wheel { margin-top: var(--space-2); }
  .hero-bottom { gap: var(--space-2); }
}
@media (orientation: landscape) and (max-height: 520px) {
  .hero { padding-bottom: var(--space-2); }
  .hero-title { font-size: clamp(2.25rem, min(13vw, 11svh), 13rem); }
  .hero-bottom { grid-template-columns: 1fr auto; }
  .hero-text { max-width: 52ch; font-size: var(--text-sm); line-height: 1.5; }
}

/* ---------- Projects ---------- */
/* Mosaic (bloom): near edge-to-edge, tight gaps. Laptops: rows of 2 wide cards then 3 narrow ones. */
.mosaic-wrap { --mosaic-gap: clamp(0.5rem, 0.8vw, 0.75rem); padding-inline: var(--mosaic-gap); }
.project-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: var(--space-4) var(--mosaic-gap, var(--space-2));
  margin: 0;
  padding: 0;
  list-style: none;
}
@media (min-width: 640px) { .project-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .project-grid { grid-template-columns: repeat(6, 1fr); }
  .mosaic-item.is-wide { grid-column: span 3; }
  .mosaic-item.is-narrow { grid-column: span 2; }
}
@media (hover: hover) and (pointer: fine) { .project-grid { row-gap: var(--mosaic-gap, var(--space-2)); } }
/*
 * Touch devices (phones, tablets): each project is one card, photo flush on top and text padded inside, lined up
 * with the page gutters like every other section (docs/specs/2026-10-21-mobile-project-cards.md).
 */
@media (hover: none), (pointer: coarse) {
  .mosaic-wrap { padding-inline: var(--gutter); }
  .project-grid { gap: 2rem var(--space-2); }
  .project-card {
    background: var(--color-paper);
    border: 1px solid var(--color-border);
    border-radius: 1rem;
    box-shadow: 0 1px 2px rgb(var(--dark-rgb) / 0.04), 0 0.75rem 2rem -1rem rgb(var(--dark-rgb) / 0.18);
  }
  .project-card .project-body { padding: 1.25rem; } /* beats the base .project-body rule further down */
  .project-detail-inner > :last-child { margin-bottom: 0; }
  .project-tags { gap: 0.35rem; }
  .project-tags .tag { padding: 0.1rem 0.5rem; font-size: 0.6875rem; letter-spacing: 0.04em; }
}

.project-card { position: relative; height: 100%; overflow: hidden; }
.project-tags { display: flex; flex-wrap: wrap; gap: 0.4rem; margin: var(--space-2) 0 var(--space-1); padding: 0; list-style: none; }
.tag {
  padding: 0.15rem 0.7rem;
  border: 1px solid currentColor;
  border-radius: var(--radius-pill);
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.08em;
  line-height: 1.6;
  text-transform: uppercase;
}
/* isolation: the stacked images' z-index stays inside the frame, so the laptop caption overlay paints above them */
.project-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface); container-type: size; isolation: isolate; }
.media-stack { position: absolute; inset: 0; }
.project-media img { transition: transform 1.2s var(--ease-out); }

/* Project images (gallery.js): each .media-item fills its frame. Frames (.project-media, .slide) are size containers. */
.media-item { position: absolute; inset: 0; overflow: hidden; }
.media-item img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; }
.media-backdrop { display: none; }
/* Portrait fit: in a landscape frame, show the whole portrait image over a blurred, darkened copy of itself */
@container (orientation: landscape) {
  .media-item.is-portrait .media-img { object-fit: contain; }
  .media-item.is-portrait .media-backdrop {
    display: block;
    inset: -10%;
    width: 120%;
    height: 120%;
    filter: blur(28px) brightness(0.5) saturate(1.1);
  }
}

/* In-card slider: images crossfade in place. The incoming image fades in on top while the outgoing one stays
   visible underneath until the fade ends (no dip). The shown image drifts from 1.06 to 1; it resets while hidden. */
.has-gallery .media-stack { touch-action: pan-y; user-select: none; }
.has-gallery .media-item {
  --fade: 1.2s;
  z-index: 0;
  opacity: 0;
  visibility: hidden;
  transform: scale(1.06);
  transition: opacity 0s linear var(--fade), visibility 0s linear var(--fade), transform 0s linear var(--fade);
}
.has-gallery .media-item.is-active {
  z-index: 1;
  opacity: 1;
  visibility: visible;
  transform: scale(1);
  transition: opacity var(--fade) cubic-bezier(0.45, 0, 0.2, 1), transform 6s cubic-bezier(0.3, 0, 0.4, 1);
}
.gallery-controls {
  position: absolute;
  z-index: 3;
  top: var(--space-1);
  right: var(--space-1);
  display: flex;
  align-items: center;
  padding: 0.2rem;
  border-radius: var(--radius-pill);
  color: var(--color-on-dark);
  background: rgb(var(--dark-rgb) / 0.6);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}
.gallery-btn {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 50%;
  font-size: 1.6rem;
  line-height: 1;
  color: inherit;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.3s var(--ease);
}
.gallery-btn span { margin-top: -0.15em; }
.gallery-btn:hover { background: rgb(var(--light-rgb) / 0.18); }
.gallery-count { min-width: 3.4em; font-family: var(--font-caps); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.08em; text-align: center; font-variant-numeric: tabular-nums; }
.gallery-controls :focus-visible { outline-color: var(--color-on-dark); outline-offset: -2px; }
@media (hover: hover) and (pointer: fine) {
  .gallery-controls { top: var(--space-2); right: var(--space-2); }
  .gallery-btn { width: 2.25rem; height: 2.25rem; }
}
@media (prefers-reduced-motion: reduce) {
  .has-gallery .media-item,
  .has-gallery .media-item.is-active { transition: none; }
}
.project-body { padding: var(--space-2) 0 0; }
.project-meta { margin-bottom: 0.25rem; font-size: var(--text-sm); color: var(--color-muted); }
.project-title { margin-bottom: var(--space-1); font-size: var(--text-xl); }
.project-detail { display: grid; grid-template-rows: 1fr; }
.project-detail-inner { min-height: 0; overflow: hidden; color: var(--color-muted); }
.project-detail-inner p { margin-bottom: var(--space-1); }
.project-location { font-size: var(--text-sm); }

/* Hover/reveal: only on devices with a real pointer. Touch devices get the stacked card above. */
@media (hover: hover) and (pointer: fine) {
  .project-card { aspect-ratio: 4 / 5; cursor: default; }
  .is-wide .project-card { aspect-ratio: 16 / 11; }
  .project-media { position: absolute; inset: 0; aspect-ratio: auto; }
  .project-body {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    max-height: 100%;
    overflow-y: auto;
    padding: var(--space-5) var(--space-3) var(--space-3);
    color: var(--color-on-dark);
    background: linear-gradient(to top, var(--overlay) 45%, rgb(var(--dark-rgb) / 0.6) 75%, rgb(var(--dark-rgb) / 0));
    transition: background-color 0.5s var(--ease);
  }
  .project-card:hover .project-body,
  .project-card:focus-visible .project-body { background-color: rgb(var(--dark-rgb) / 0.35); }
  .project-meta { color: var(--color-on-dark-muted); }
  .project-title { margin-bottom: 0; }
  .project-detail { grid-template-rows: 0fr; transition: grid-template-rows 0.6s var(--ease-out); }
  .project-detail-inner {
    color: var(--color-on-dark-muted);
    opacity: 0;
    transition: opacity 0.4s var(--ease);
  }
  .project-detail-inner > :first-child { margin-top: var(--space-2); }
  .project-card:focus-visible { outline-offset: -3px; }

  .project-card:hover img,
  .project-card:focus-visible img { transform: scale(1.05); }
  .project-card:hover .project-detail,
  .project-card:focus-visible .project-detail { grid-template-rows: 1fr; }
  .project-card:hover .project-detail-inner,
  .project-card:focus-visible .project-detail-inner { opacity: 1; transition-delay: 0.15s; }
}

/* ---------- PEB construction (docs/specs/2026-10-24-client-feedback-peb-qr.md) ---------- */
/* Same cream page background as the other sections (user, 2026-10-24; a sand band was tried first). */
/* Features: numbered hairline columns (1 on phones, 2 on tablets, 4 on laptops), same rhythm as the About stats */
.peb-features {
  display: grid;
  grid-template-columns: 1fr;
  margin: 0 0 var(--space-5);
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-line);
}
.peb-feature { display: grid; align-content: start; gap: 0.6rem; padding: var(--space-3) 0; border-bottom: 1px solid rgb(var(--dark-rgb) / 0.15); }
.peb-feature-num {
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--color-accent);
}
.peb-feature-title { margin: 0; font-size: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.2; }
.peb-feature-text { max-width: 34ch; margin: 0; color: var(--color-muted); }
@media (min-width: 640px) {
  .peb-features { grid-template-columns: repeat(2, 1fr); column-gap: var(--space-4); }
}
@media (min-width: 1024px) {
  .peb-features { grid-template-columns: repeat(4, 1fr); column-gap: 0; }
  .peb-feature { padding: var(--space-3) var(--space-3) var(--space-4); border-bottom: 0; border-left: 1px solid rgb(var(--dark-rgb) / 0.15); }
  .peb-feature:first-child { padding-left: 0; border-left: 0; }
}
.peb-features > .reveal:nth-child(2) { transition-delay: 0.08s; }
.peb-features > .reveal:nth-child(3) { transition-delay: 0.16s; }
.peb-features > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* Gallery: 1 column on phones, 2 from 640px, 3 from 1024px with the first image spanning 2 columns and 2 rows */
.peb-gallery { display: grid; grid-template-columns: 1fr; gap: var(--space-3) var(--space-2); margin: 0; padding: 0; list-style: none; }
.peb-figure { display: flex; flex-direction: column; height: 100%; margin: 0; }
.peb-media { position: relative; aspect-ratio: 4 / 3; overflow: hidden; background: var(--color-surface); }
.peb-media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s var(--ease-out); }
.peb-caption {
  margin-top: 0.75rem;
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
@media (min-width: 640px) { .peb-gallery { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1024px) {
  .peb-gallery { grid-template-columns: repeat(3, 1fr); }
  .peb-shot.is-lead { grid-column: span 2; grid-row: span 2; }
  .peb-shot.is-lead .peb-media { flex: 1; aspect-ratio: auto; min-height: 0; }
}
@media (hover: hover) and (pointer: fine) {
  .peb-shot:hover .peb-media img { transform: scale(1.04); }
}
/* Touch devices: rounded photo corners, like the mobile project cards */
@media (hover: none), (pointer: coarse) { .peb-media { border-radius: 1rem; } }
@media (prefers-reduced-motion: reduce) { .peb-media img { transition: none; } }
.peb-cta { margin: var(--space-4) 0 0; }

/* ---------- About (editorial split): sticky label | lead, body, values, stats row and services (label pinned until the section ends) ---------- */
.about-grid { display: grid; gap: var(--space-3); }
.about-label .eyebrow { margin-bottom: var(--space-2); }
.about-label h2 { margin: 0; font-size: clamp(2rem, 1.4rem + 2vw, 3rem); font-weight: 400; letter-spacing: -0.025em; }
@media (min-width: 1024px) {
  /* Same top spacing as Contact (user, 2026-10-24): after the header "About" link the heading sits just under the
     header instead of 150px below it. The section is ~2.5 screens tall, so it still scrolls. */
  .about { padding-top: clamp(1.25rem, 4vh, 2.5rem); }
  .about-grid { grid-template-columns: minmax(12rem, 1fr) 3fr; gap: var(--space-5); align-items: start; }
  .about-label { position: sticky; top: calc(var(--header-height) + var(--space-3)); }
}

.about-lead {
  max-width: 22em;
  margin: 0 0 var(--space-4);
  font-family: var(--font-display);
  font-size: clamp(1.625rem, 1.1rem + 2vw, 2.75rem);
  font-weight: 300;
  letter-spacing: -0.02em;
  line-height: 1.2;
}
.about-accent { font-style: normal; white-space: nowrap; color: var(--color-accent); } /* phrase stays on one line (one line mask) */

.about-body { max-width: 52rem; font-size: var(--text-lg); color: var(--color-muted); }
.about-body p { margin: 0 0 var(--space-2); break-inside: avoid; }
@media (min-width: 768px) { .about-body { columns: 2; column-gap: var(--space-4); } }

/* Core values: spaced caps separated by small accent-coloured dots */
.about-values {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem 0;
  margin: var(--space-4) 0 0;
  padding: 0;
  list-style: none;
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  text-transform: uppercase;
}
.about-values li { display: inline-flex; align-items: center; }
/* Dot after each value (not before), so a wrapped line never starts with a dot */
.about-values li:not(:last-child)::after {
  content: "";
  width: 4px;
  height: 4px;
  margin: 0 0.9rem;
  border-radius: 50%;
  background: var(--color-accent);
}

/* Stats: one hairline row of 4 (2 x 2 on phones), light Oswald numbers */
.stats {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  margin: var(--space-5) 0 0;
  padding: 0;
  list-style: none;
  border-top: 1px solid var(--color-border);
  border-bottom: 1px solid var(--color-border);
}
.stat { display: flex; flex-direction: column; gap: 0.6rem; padding: var(--space-3) var(--space-2); border-left: 1px solid var(--color-border); }
.stat:nth-child(2n + 1) { padding-left: 0; border-left: 0; }
.stat:nth-child(n + 3) { border-top: 1px solid var(--color-border); }
@media (min-width: 768px) {
  .stats { grid-template-columns: repeat(4, 1fr); }
  .stat, .stat:nth-child(n) { padding: var(--space-4) var(--space-3); border-top: 0; border-left: 1px solid var(--color-border); }
  .stat:first-child { padding-left: 0; border-left: 0; }
}
.stat-value {
  font-family: var(--font-condensed);
  font-size: clamp(2.5rem, 1.6rem + 3vw, 4.5rem);
  font-weight: 300;
  letter-spacing: 0;
  line-height: 1;
  font-variant-numeric: tabular-nums;
}
.stat-label {
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.stats > .reveal:nth-child(2) { transition-delay: 0.08s; }
.stats > .reveal:nth-child(3) { transition-delay: 0.16s; }
.stats > .reveal:nth-child(4) { transition-delay: 0.24s; }

/* What we do: numbered hairline rows; phones stack the description under the title */
.about-services { margin-top: var(--space-5); }
.about-services h3 {
  margin: 0 0 var(--space-3);
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: var(--tracking-caps);
  line-height: 1.6;
  text-transform: uppercase;
  color: var(--color-muted);
}
.service-list { margin: 0; padding: 0; list-style: none; border-bottom: 1px solid var(--color-border); }
.service {
  display: grid;
  grid-template-columns: 2.5rem 1fr;
  gap: 0.35rem var(--space-2);
  align-items: baseline;
  padding: var(--space-3) 0;
  border-top: 1px solid var(--color-border);
}
.service-num {
  grid-row: span 2;
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  font-variant-numeric: tabular-nums;
  color: var(--color-muted);
  transition: color 0.4s var(--ease);
}
.service-title {
  font-family: var(--font-display);
  font-size: var(--text-xl);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.2;
  transition: transform 0.5s var(--ease-out);
}
.service-text { color: var(--color-muted); }
@media (min-width: 768px) {
  .service { grid-template-columns: 3rem 1fr 1.4fr; gap: var(--space-3); }
  .service-num { grid-row: auto; }
}
@media (hover: hover) and (pointer: fine) {
  .service:hover .service-num { color: var(--color-accent); }
  .service:hover .service-title { transform: translateX(4px); }
}
.service-list > .reveal:nth-child(2) { transition-delay: 0.06s; }
.service-list > .reveal:nth-child(3) { transition-delay: 0.12s; }
.service-list > .reveal:nth-child(4) { transition-delay: 0.18s; }
.service-list > .reveal:nth-child(5) { transition-delay: 0.24s; }

/* ---------- Contact ---------- */
.contact-inner { display: grid; gap: var(--space-5); }
/* Laptops: both columns share the row height; the visiting card sits at the bottom of the left column and the form
   stretches, so the card's bottom edge lines up with the form card's bottom edge (top edges line up with the eyebrow). */
/*
 * Laptops (2026-10-24, user: the section did not fit the screen): the section fills the screen below the header and
 * centres its content, instead of a fixed 150px top padding, so the heading, the card and the whole form (Send button
 * included) are in view after the header "Contact" link on 1280x720 and up. Taller content simply scrolls.
 */
@media (min-width: 1024px) {
  .contact {
    display: flex;
    align-items: center;
    min-height: calc(100vh - var(--header-height));
    min-height: calc(100svh - var(--header-height));
    padding-block: clamp(1.25rem, 4vh, 2.5rem) clamp(2rem, 6vh, 4rem);
  }
  .contact > .container { width: 100%; }
  .contact-inner { grid-template-columns: 2fr 3fr; gap: var(--space-6); align-items: stretch; }
  .contact-info { display: flex; flex-direction: column; }
  .contact-info .vcard { margin-top: auto; }
  .contact-info .contact-intro { margin-bottom: var(--space-4); } /* min gap above the card (beats .contact-intro margin: 0) */
}

/* Left column: light headline, calm intro, hairline list of details (same idea as About "What we do") */
/* Headline size follows the column width (13cqi) so "Let's build / something lasting." always sits on 2 lines */
.contact-info { container-type: inline-size; }
.contact-info h2 {
  margin: 0 0 var(--space-3);
  font-size: clamp(2.25rem, 13cqi, 4.5rem);
  font-weight: 400;
  letter-spacing: -0.03em;
  line-height: 1.05;
}
.contact-intro {
  max-width: 34ch;
  margin: 0;
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  color: var(--color-muted);
}
.contact-details {
  display: grid;
  grid-template-columns: 5.5rem 1fr;
  margin: var(--space-4) 0 0;
  border-bottom: 1px solid var(--color-border);
}
.contact-details dt,
.contact-details dd {
  display: flex;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  padding: 0.35rem 0;
  border-top: 1px solid var(--color-border);
}
.contact-details dt {
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.contact-details dd {
  flex-wrap: wrap;
  column-gap: var(--space-3);
  font-size: clamp(1rem, 0.97rem + 0.15vw, 1.0625rem);
  line-height: 1.5;
  overflow-wrap: anywhere;
}
/* Links are 44px tall so they are easy to tap; quiet underline that turns the accent colour */
.contact-details a {
  display: inline-flex;
  align-items: center;
  min-height: 2.75rem;
  text-decoration: underline;
  text-decoration-color: rgb(var(--dark-rgb) / 0.3);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  transition: color 0.3s var(--ease), text-decoration-color 0.3s var(--ease);
}
.contact-details a:hover,
.contact-details a:focus-visible { color: var(--color-accent); text-decoration-color: currentColor; }

/* Visiting card (docs/specs/2026-10-11-visiting-card.md): a real card shape (7:4, grows only if the text needs it).
   Two faces in one grid cell share its size. The details side (.vcard-back) shows first; .is-flipped turns the
   card to the brand side. Type and gaps scale with the card width (cqi). */
.vcard {
  position: relative;
  max-width: 32rem;
  margin-top: var(--space-4);
  perspective: 1600px;
  cursor: pointer;
  container-type: inline-size;
  -webkit-tap-highlight-color: transparent;
}
.vcard-inner { display: grid; transform-style: preserve-3d; transition: transform 0.8s cubic-bezier(0.65, 0, 0.35, 1); }
.vcard.no-turn .vcard-inner { transition: none; } /* starts on the brand side without animating */
.vcard.is-flipped .vcard-inner { transform: rotateY(180deg); }
.vcard-face {
  grid-area: 1 / 1;
  width: 100%; /* with aspect-ratio, a stretched grid item would otherwise take its width from its height */
  min-width: 0;
  border-radius: 0.6rem;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
}
/* Details side: white card stock with a wine edge, logo and name, a short wine rule, then the details with icons */
.vcard-back {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(0.6rem, 3.5cqi, 1.25rem);
  aspect-ratio: 7 / 4;
  padding: clamp(1rem, 6cqi, 2rem) clamp(1.1rem, 7cqi, 2.25rem) clamp(1rem, 6cqi, 2rem) calc(clamp(1.1rem, 7cqi, 2.25rem) + 6px);
  background:
    linear-gradient(to right, var(--color-accent) 0 6px, transparent 6px),
    linear-gradient(135deg, #ffffff, #fbf8f2);
  border: 1px solid var(--color-border);
  box-shadow:
    0 1px 1px rgb(var(--dark-rgb) / 0.06),
    0 6px 12px -6px rgb(var(--dark-rgb) / 0.12),
    0 28px 48px -24px rgb(var(--dark-rgb) / 0.28);
}
.vcard-head { display: grid; gap: 0.35rem; justify-items: start; }
.vcard-mark { width: auto; height: clamp(1rem, 5cqi, 1.5rem); }
.vcard-firm {
  margin: 0;
  font-family: var(--font-caps);
  font-size: clamp(0.625rem, 2.6cqi, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.vcard-head::after { content: ""; width: 2rem; height: 2px; margin-top: 0.35rem; background: var(--color-accent); }
.vcard .contact-details { display: grid; grid-template-columns: 1fr; gap: clamp(0.2rem, 1.4cqi, 0.45rem); margin: 0; border: 0; }
/* Each row: icon column, then the value (wraps under itself, never under the icon) */
.vcard .contact-details dd {
  display: grid;
  grid-template-columns: 1.05em 1fr;
  align-items: start;
  column-gap: 0.7rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  font-size: clamp(0.8125rem, 3.4cqi, 1rem);
  line-height: 1.5;
  color: var(--color-text);
  overflow-wrap: normal;
}
.vcard-icon { width: 1.05em; height: 1.05em; margin-top: 0.22em; color: var(--color-accent); }
.vcard-val { display: flex; flex-wrap: wrap; gap: 0 1.1rem; min-width: 0; }
/* Links: quiet until hovered; the hit area grows to at least 24px tall (WCAG 2.5.8) without moving the text */
.vcard .contact-details a {
  min-height: 1.5rem;
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 1px no-repeat;
  transition: color 0.3s var(--ease), background-size 0.4s var(--ease-out);
}
.vcard .contact-details a:hover,
.vcard .contact-details a:focus-visible { color: var(--color-accent); background-size: 100% 1px; }
/* Keyboard access without visible wording: a visually hidden button; the whole card shows the focus ring */
.vcard:has(.vcard-flip:focus-visible) .vcard-face { outline: 2px solid var(--color-focus); outline-offset: 3px; }
/* Brand side: decorative, never takes clicks (the details side handles them) */
.vcard-front {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: clamp(0.35rem, 2cqi, 0.6rem);
  padding: var(--space-3);
  text-align: center;
  color: var(--color-on-accent);
  background:
    radial-gradient(120% 90% at 0% 0%, rgb(255 255 255 / 0.1), rgb(255 255 255 / 0) 60%),
    var(--color-accent);
  box-shadow: 0 6px 12px -6px rgb(var(--dark-rgb) / 0.2), 0 28px 48px -24px rgb(var(--dark-rgb) / 0.45);
  transform: rotateY(180deg);
  pointer-events: none;
}
.vcard-front-mark { width: auto; height: clamp(1.5rem, 7cqi, 2.5rem); margin-bottom: 0.3rem; }
.vcard-front-name { margin: 0; font-family: var(--font-condensed); font-size: clamp(1.25rem, 7cqi, 2.25rem); font-weight: 500; letter-spacing: 0.06em; line-height: 1.1; text-transform: uppercase; }
.vcard-front-tag { margin: 0; font-size: clamp(0.8125rem, 3.2cqi, 0.9375rem); font-style: italic; color: var(--color-highlight); }
.vcard-front-place {
  margin: 0;
  padding-top: 0.5rem;
  border-top: 1px solid rgb(var(--light-rgb) / 0.35);
  font-family: var(--font-caps);
  font-size: clamp(0.625rem, 2.6cqi, 0.75rem);
  font-weight: 500;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}
@media (prefers-reduced-motion: reduce) {
  .vcard-inner,
  .vcard.is-flipped .vcard-inner { transform: none; transition: none; }
  .vcard-front { transform: none; opacity: 0; transition: opacity 0.3s var(--ease); }
  .vcard.is-flipped .vcard-front { opacity: 1; }
}

/* Letterhead card: white paper with a thin border and soft shadow, so it reads as one form */
.contact-form {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.75rem 2rem;
  align-content: start;
  align-self: start; /* phones and tablets: only as tall as its content */
  padding: clamp(1.5rem, 1rem + 2.5vw, 3rem);
  background: var(--color-paper);
  border: 1px solid var(--color-border);
  border-radius: 0.75rem;
  box-shadow: 0 1px 2px rgb(var(--dark-rgb) / 0.04), 0 24px 48px -28px rgb(var(--dark-rgb) / 0.22);
}
.form-letterhead {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-bottom: var(--space-3);
  border-bottom: 1px solid var(--color-border);
}
.form-from { display: grid; gap: 0.6rem; }
.form-mark { width: auto; height: 1.1rem; }
.form-to {
  margin: 0;
  font-family: var(--font-caps);
  font-size: var(--text-xs);
  font-weight: 500;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-muted);
}
.form-title { margin: 0; font-size: clamp(1.5rem, 1.2rem + 1vw, 2rem); font-weight: 400; letter-spacing: -0.02em; line-height: 1.15; }
@media (max-width: 479px) { .form-letterhead { flex-direction: column; } }
.form-footer {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-2) var(--space-3);
  padding-top: var(--space-3);
  border-top: 1px solid var(--color-border);
}
/* Laptops: stretched to the left column's height; any extra space goes between the rows, so the footer stays at the bottom */
@media (min-width: 1024px) {
  .contact-form { align-self: stretch; align-content: space-between; gap: 1.25rem 2rem; padding: 2.25rem 2.5rem; }
  .form-letterhead { padding-bottom: var(--space-2); }
}
/* Short laptop screens (720-760px tall): a little tighter still, so the Send button stays in view */
@media (min-width: 1024px) and (max-height: 760px) {
  .contact-form { gap: 1rem 2rem; padding: 1.75rem 2.25rem; }
  .contact-info h2 { margin-bottom: var(--space-2); }
}
/* Fields in one row line up on their underlines, even if one label wraps */
@media (min-width: 640px) { .contact-form .field { align-self: end; } }
@media (min-width: 640px) {
  .contact-form { grid-template-columns: repeat(2, 1fr); }
  .field-full { grid-column: 1 / -1; }
}

/* ---------- Hero (intro mode: photo grows to full screen; content.js hero.mode = "intro") ---------- */
.hero { position: relative; }
.hero-media { position: absolute; inset: 0; z-index: 0; overflow: hidden; background: var(--color-dark); }
.hero-media img { width: 100%; height: 100%; object-fit: cover; }
.hero-media::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(var(--dark-rgb) / 0.6), rgb(var(--dark-rgb) / 0) 35%),
    linear-gradient(to top, rgb(var(--dark-rgb) / 0.85), rgb(var(--dark-rgb) / 0.2) 60%);
}
.hero--intro { color: var(--color-on-dark); }
.hero--intro .hero-inner { position: relative; z-index: 1; }
.hero--intro .hero-top,
.hero--intro .eyebrow,
.hero--intro .hero-text,
.hero--intro .wheel-suffix,
.hero--intro .btn-primary { background: var(--color-on-dark); color: var(--color-dark); }
.hero--intro :focus-visible { outline-color: var(--color-on-dark); }
.has-intro-hero .site-header:not(.is-scrolled) { color: var(--color-on-dark); }
.has-intro-hero .site-header:not(.is-scrolled) .brand-mark--dark { display: none; }
.has-intro-hero .site-header:not(.is-scrolled) .brand-mark--light { display: block; }
.has-intro-hero .site-header:not(.is-scrolled) .nav-toggle { color: var(--color-on-dark); border-color: currentColor; }
.has-intro-hero .site-header :focus-visible { outline-color: currentColor; }
/* Menu open: the header turns cream, so back to the dark mark and toggle */
.has-intro-hero.nav-open .site-header { color: var(--color-text); }
.has-intro-hero.nav-open .site-header .brand-mark--dark { display: block; }
.has-intro-hero.nav-open .site-header .brand-mark--light { display: none; }
.has-intro-hero.nav-open .site-header .nav-toggle { color: var(--color-text); }

/* ---------- Featured slider (senawa) ---------- */
/* One screen minus the fixed header, so the name strip is never cut off below the fold */
.slider {
  position: relative;
  height: calc(100vh - var(--header-height));
  height: calc(100svh - var(--header-height));
  min-height: 32rem;
  max-height: 64rem;
  margin-bottom: clamp(0.5rem, 0.8vw, 0.75rem);
  overflow: hidden;
  color: var(--color-on-dark);
  background: var(--color-dark);
  touch-action: pan-y;
  user-select: none;
}
@media (max-width: 767px) { .slider { height: 85svh; min-height: 30rem; } }
/* Never taller than the screen (landscape phones are only ~375px high) */
@media (max-height: 600px) { .slider { height: calc(100svh - var(--header-height)); min-height: 0; } }
.slides { position: absolute; inset: 0; }
/* Crossfade without a dark dip: the incoming slide fades in on top (z-index 1) while the outgoing one
   stays fully visible underneath, and only hides once the fade has finished (the delayed transitions). */
.slide {
  --fade: 1.4s;
  position: absolute;
  inset: 0;
  z-index: 0;
  margin: 0;
  container-type: size;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0s linear var(--fade), visibility 0s linear var(--fade);
}
.slide.is-active { z-index: 1; opacity: 1; visibility: visible; transition: opacity var(--fade) cubic-bezier(0.45, 0, 0.2, 1); }
/* Slow zoom only while shown; it resets while the slide is hidden */
.slide img {
  transform: scale(1.08);
  transition: transform 0s linear var(--fade);
  -webkit-user-drag: none;
}
.slide.is-active img { transform: scale(1); transition: transform 8s cubic-bezier(0.3, 0, 0.4, 1); }
.slide::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, rgb(var(--dark-rgb) / 0.7), rgb(var(--dark-rgb) / 0) 45%),
    linear-gradient(to top, rgb(var(--dark-rgb) / 0.9), rgb(var(--dark-rgb) / 0) 45%);
}
.slide-caption { position: absolute; z-index: 1; left: 0; right: 0; top: var(--space-4); }
/* Captions: outgoing fade out fast; incoming kicker then title rise in once the new photo is showing */
.slide-kicker,
.slide-title { opacity: 0; transform: translateY(1.25rem); transition: opacity 0.4s var(--ease), transform 0s linear 0.4s; }
.slide.is-active .slide-kicker,
.slide.is-active .slide-title { opacity: 1; transform: none; transition: opacity 0.9s var(--ease-out) 0.35s, transform 1.1s var(--ease-out) 0.35s; }
.slide.is-active .slide-title { transition-delay: 0.45s; }
.slide-kicker { margin: 0 0 var(--space-1); font-family: var(--font-caps); font-size: var(--text-xs); font-weight: 500; letter-spacing: var(--tracking-caps); text-transform: uppercase; color: var(--color-on-dark); }
.slide-title {
  max-width: 14ch;
  margin: 0;
  font-family: var(--font-display);
  font-size: clamp(2rem, min(1.2rem + 5vw, 12svh), 6.5rem);
  font-weight: 500;
  letter-spacing: var(--tracking-tight);
  line-height: 0.95;
}
.slider-ui { position: absolute; z-index: 2; left: 0; right: 0; bottom: 0; padding-bottom: var(--space-3); }
.slider-names {
  display: flex;
  gap: var(--space-5);
  margin: 0;
  padding: 0;
  list-style: none;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: none;
}
.slider-names::-webkit-scrollbar { display: none; }
/* Names: large and readable; the active one is full cream with a line that fills over the slide time */
.slider-name {
  display: block;
  min-height: 2.75rem;
  padding: 0.25rem 0 0;
  border: 0;
  font: inherit;
  font-family: var(--font-display);
  font-size: var(--text-lg);
  font-weight: 500;
  letter-spacing: -0.01em;
  text-align: left;
  white-space: nowrap;
  color: rgb(var(--light-rgb) / 0.7);
  background: none;
  cursor: pointer;
  scroll-snap-align: start;
  transition: color 0.4s var(--ease);
}
.slider-name small { display: block; margin-top: 0.2rem; font-family: var(--font-caps); font-size: var(--text-xs); font-weight: 500; letter-spacing: 0.1em; text-transform: uppercase; }
.slider-name:hover,
.slider-name[aria-current="true"] { color: var(--color-on-dark); }
.slider-name-line { position: relative; display: block; height: 2px; margin-top: 0.75rem; overflow: hidden; background: rgb(var(--light-rgb) / 0.25); }
.slider-name-line span { position: absolute; inset: 0; background: var(--color-on-dark); transform: scaleX(0); transform-origin: left; }
.slider.is-running .slider-name[aria-current="true"] .slider-name-line span { animation: slider-progress var(--slide-ms, 6000ms) linear forwards; }
.slider.is-paused .slider-name-line span { animation-play-state: paused; }
/* Autoplay stopped (visitor took over, or reduced motion): the line stays full under the active name */
.slider.is-stopped .slider-name[aria-current="true"] .slider-name-line span { animation: none; transform: none; }
@keyframes slider-progress { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.slider :focus-visible { outline-color: var(--color-on-dark); }

/* ---------- Statement band (wama) ---------- */
.statement {
  display: grid;
  place-items: center;
  min-height: 100vh;
  min-height: 100svh;
  overflow: hidden;
  text-align: center;
  color: var(--color-on-dark);
  background: var(--color-dark);
}
@media (max-width: 767px) { .statement { min-height: 70svh; } }
@media (orientation: landscape) and (max-height: 520px) { .statement { min-height: auto; padding-block: var(--space-5); } }
.statement-word {
  margin: 0;
  font-family: var(--font-condensed);
  font-size: clamp(4rem, min(20vw, 40svh), 24rem);
  font-weight: 600;
  letter-spacing: -0.01em;
  line-height: 0.9;
  white-space: nowrap;
}
.statement-caption { max-width: 32ch; margin: var(--space-4) auto 0; font-size: var(--text-lg); color: var(--color-on-dark-muted); }

/* ---------- Why us (bloom): stacked below 1024px, pinned split layout above ---------- */
.why-inner { display: grid; gap: var(--space-5); }
.why-text h2 { font-size: clamp(2.25rem, 1.2rem + 3vw, 4rem); }
.why-list { margin: var(--space-4) 0 0; padding: 0; list-style: none; border-bottom: 1px solid var(--color-border); }
.why-item { padding: var(--space-3) 0; border-top: 1px solid var(--color-border); transition: opacity 0.5s var(--ease); }
.why-item-img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; margin-bottom: var(--space-3); background: var(--color-surface); }
.why-head { display: flex; align-items: baseline; gap: var(--space-3); }
.why-num { min-width: 2ch; font-size: var(--text-sm); font-variant-numeric: tabular-nums; color: var(--color-muted); }
.why-title { margin: 0; font-size: clamp(1.375rem, 1.1rem + 1vw, 2rem); }
.why-body { display: grid; grid-template-rows: 1fr; transition: grid-template-rows 0.6s var(--ease-out); }
.why-body-inner { min-height: 0; overflow: hidden; }
.why-body p { max-width: 40ch; margin: var(--space-1) 0 0 calc(2ch + var(--space-3)); color: var(--color-muted); }
.why-media { display: none; }
/* Pinned split layout only where the screen is wide and tall enough (motion.js uses the same query) */
@media (min-width: 1024px) and (min-height: 700px) {
  .why { display: flex; align-items: center; min-height: 100vh; padding-block: calc(var(--header-height) + var(--space-3)) var(--space-4); }
  .why-inner { grid-template-columns: 1fr 1fr; align-items: center; gap: var(--space-6); }
  .why-item { padding: 1.1rem 0; }
  .why-item-img { display: none; }
  .why-media { position: relative; display: block; height: min(78vh, 46rem); overflow: hidden; background: var(--color-surface); }
  .why-media-img {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0;
    transform: scale(1.08);
    transition: opacity 0.8s var(--ease), transform 1.4s var(--ease-out);
  }
  .why-media-img.is-active { opacity: 1; transform: none; }
  /* Scroll-driven state (motion.js adds .is-scrubbed): one item open at a time */
  /* Inactive items are dimmed by colour, not opacity, so they keep AA contrast (--color-dim = 3.8:1 for large titles). */
  .why.is-scrubbed .why-item:not(.is-active) .why-title { color: var(--color-dim); }
  .why-title { transition: color 0.5s var(--ease); }
  .why.is-scrubbed .why-body { grid-template-rows: 0fr; }
  .why.is-scrubbed .why-item.is-active .why-body { grid-template-rows: 1fr; }
}
