/* ==========================================================================
   components.css — every discrete UI piece.
   ========================================================================== */

/* --- Header --------------------------------------------------------------- */
.site-header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  display: flex; align-items: center;
  background: color-mix(in srgb, var(--surface) 82%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color var(--dur) var(--ease-out),
              background-color var(--dur) var(--ease-out);
}
.site-header[data-scrolled="true"] {
  border-bottom-color: var(--rule);
  background: color-mix(in srgb, var(--surface) 94%, transparent);
}
@supports not (backdrop-filter: blur(1px)) {
  .site-header { background: var(--surface); }
}

.site-header__inner {
  width: 100%; max-width: var(--measure-content);
  margin-inline: auto; padding-inline: var(--space-gutter);
  display: flex; align-items: center; justify-content: space-between;
  gap: var(--space-5);
}

.wordmark {
  font-family: var(--font-display);
  font-size: var(--step-0);
  font-weight: var(--weight-medium);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  white-space: nowrap;
}
.wordmark:hover { color: var(--accent); }

/* --- Nav ------------------------------------------------------------------ */
.nav { display: flex; align-items: center; gap: clamp(1rem, 2.2vw, 2.5rem); }
.nav__link {
  position: relative;
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--text-muted);
  padding-block: var(--space-2);
  transition: color var(--dur-fast) var(--ease-out);
}
.nav__link::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0;
  height: 1px; background: var(--accent-graphic);
  transform: scaleX(0); transform-origin: left;
  transition: transform var(--dur) var(--ease-out);
}
.nav__link:hover, .nav__link:focus-visible { color: var(--text); }
.nav__link:hover::after, .nav__link:focus-visible::after { transform: scaleX(1); }
.nav__link[aria-current="page"] { color: var(--text); }
.nav__link[aria-current="page"]::after { transform: scaleX(1); }

/* Hamburger — three bars that morph into a cross. */
.nav-toggle {
  display: none;
  width: 44px; height: 44px;   /* 44px minimum touch target */
  margin-inline-end: calc(var(--space-2) * -1);
  place-items: center;
}
.nav-toggle__box { position: relative; width: 22px; height: 14px; }
.nav-toggle__bar {
  position: absolute; left: 0; width: 100%; height: 1.5px;
  background: var(--text); border-radius: 2px;
  transition: transform var(--dur) var(--ease-out),
              opacity var(--dur-fast) linear, top var(--dur) var(--ease-out);
}
.nav-toggle__bar:nth-child(1) { top: 0; }
.nav-toggle__bar:nth-child(2) { top: 6.25px; }
.nav-toggle__bar:nth-child(3) { top: 12.5px; }
[aria-expanded="true"] .nav-toggle__bar:nth-child(1) { top: 6.25px; transform: rotate(45deg); }
[aria-expanded="true"] .nav-toggle__bar:nth-child(2) { opacity: 0; }
[aria-expanded="true"] .nav-toggle__bar:nth-child(3) { top: 6.25px; transform: rotate(-45deg); }

@media (max-width: 47.99em) {
  .nav-toggle { display: grid; }
  .nav {
    position: fixed; inset: var(--header-h) 0 auto 0;
    z-index: var(--z-drawer);
    flex-direction: column; align-items: stretch;
    gap: 0;
    padding: var(--space-4) var(--space-gutter) var(--space-6);
    background: var(--surface);
    border-bottom: 1px solid var(--rule);
    box-shadow: var(--shadow-lg);
    /* Collapsed by default; visibility keeps it out of the tab order. */
    transform: translateY(-101%);
    visibility: hidden;
    transition: transform var(--dur) var(--ease-out),
                visibility 0s linear var(--dur);
  }
  .nav[data-open="true"] {
    transform: translateY(0); visibility: visible;
    transition: transform var(--dur) var(--ease-out), visibility 0s;
  }
  .nav__link {
    font-size: var(--step-2);
    text-transform: none;
    letter-spacing: var(--tracking-normal);
    padding-block: var(--space-4);
    border-bottom: 1px solid var(--ink-100);
    color: var(--text);
  }
  .nav__link::after { display: none; }
}

/* --- Buttons -------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: var(--space-3);
  min-height: 44px;
  padding: var(--space-3) var(--space-6);
  border: 1px solid var(--rule-strong);
  border-radius: 999px;
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  background: transparent; color: var(--text);
  transition: background-color var(--dur) var(--ease-out),
              color var(--dur) var(--ease-out),
              border-color var(--dur) var(--ease-out),
              transform var(--dur-fast) var(--ease-out);
}
.btn:hover {
  background: var(--surface-inverse); color: var(--text-on-inverse);
  border-color: var(--surface-inverse);
}
.btn:active { transform: translateY(1px); }
.btn__arrow { transition: transform var(--dur) var(--ease-out); }
.btn:hover .btn__arrow { transform: translateX(4px); }

.btn--accent { border-color: var(--accent); color: var(--accent); }
.btn--accent:hover { background: var(--accent); border-color: var(--accent);
                     color: var(--white); }
.on-inverse .btn { border-color: var(--ink-700); color: var(--text-on-inverse); }
.on-inverse .btn:hover { background: var(--accent-on-inverse);
                         border-color: var(--accent-on-inverse); color: var(--ink-900); }

/* --- Hero ----------------------------------------------------------------- */
.hero { position: relative; padding-block: clamp(3rem, 2rem + 6vw, 7rem)
                                          clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.hero__heading {
  font-size: var(--step-6);
  font-weight: var(--weight-thin);
  line-height: 1.02;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  max-width: 26ch;
}
/* The mint full stop — the one place the raw brand colour is used large. */
.hero__heading .dot { color: var(--accent-graphic); }

.hero__media {
  margin-block-start: clamp(2rem, 1rem + 5vw, 4.5rem);
  position: relative;
}
.hero__media img {
  width: 100%; aspect-ratio: 2880 / 1512; object-fit: cover;
  border-radius: var(--radius-lg);
  background: var(--surface-sunken);
}
.hero__scroll {
  display: flex; align-items: center; gap: var(--space-3);
  margin-block-start: var(--space-6);
  color: var(--text-subtle);
}
.hero__scroll-line {
  display: block; width: 56px; height: 1px; background: var(--rule);
  position: relative; overflow: hidden;
}
.hero__scroll-line::after {
  content: ""; position: absolute; inset: 0;
  background: var(--accent-graphic);
  animation: sweep 2.4s var(--ease-in-out) infinite;
}
@keyframes sweep {
  0%   { transform: translateX(-100%); }
  60%, 100% { transform: translateX(100%); }
}

/* --- Project cards -------------------------------------------------------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 300px), 1fr));
  gap: var(--space-6) var(--space-5);
}

.card { display: flex; flex-direction: column; gap: var(--space-4); }
.card__media {
  position: relative; overflow: hidden;
  border-radius: var(--radius);
  background: var(--surface-sunken);
  aspect-ratio: 4 / 3;
}
.card__media img {
  width: 100%; height: 100%; object-fit: cover;
  transition: transform var(--dur-slow) var(--ease-out),
              filter var(--dur) var(--ease-out);
}
.card:hover .card__media img,
.card:focus-visible .card__media img { transform: scale(1.04); }

/* Mint wash that wipes up on hover. */
.card__media::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top,
    color-mix(in srgb, var(--accent-graphic) 22%, transparent), transparent 60%);
  opacity: 0; transition: opacity var(--dur) var(--ease-out);
}
.card:hover .card__media::after { opacity: 1; }

.card__title {
  font-family: var(--font-display);
  font-size: var(--step-2); font-weight: var(--weight-light);
  letter-spacing: var(--tracking-tight);
}
.card:hover .card__title { color: var(--accent); }
.card__category {
  font-size: var(--step--1); color: var(--text-subtle);
  letter-spacing: var(--tracking-wide); text-transform: uppercase;
}
.card__question {
  font-size: var(--step-0); color: var(--text-muted);
  max-width: 34ch; text-wrap: pretty;
}

/* --- Narrative sections (homepage scroll story) --------------------------- */
.narrative { padding-block: clamp(3rem, 2rem + 5vw, 7rem); }
.narrative__heading {
  font-size: var(--step-4);
  font-weight: var(--weight-thin);
  line-height: var(--leading-snug);
  max-width: 34ch;
  margin-block-end: clamp(1.5rem, 1rem + 2.5vw, 3rem);
}
.narrative:nth-of-type(even) .narrative__heading { margin-inline-start: auto;
                                                   text-align: right; }

/* Uniform gallery: auto-fits, so 3 images or 5 images both look intentional
   and nothing is ever orphaned on its own row awkwardly. */
.gallery {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 240px), 1fr));
}
.gallery--2 { grid-template-columns: repeat(auto-fit, minmax(min(100%, 320px), 1fr)); }
.gallery figure { margin: 0; }
.gallery img {
  width: 100%; aspect-ratio: 1; object-fit: cover;
  border-radius: var(--radius);
  background: var(--surface-sunken);
}
.gallery--wide img { aspect-ratio: 16 / 10; }
.gallery--single img { aspect-ratio: 3 / 2; }

/* Filmstrip: reproduces the original's narrow/wide/narrow rhythm
   (345 / 713 px at a constant height) as proportional fr units, so the
   cadence survives at every width instead of only at 980px.
   Below 48em it becomes a scroll-snapping strip. */
.strip {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 345fr;
  gap: var(--space-4);
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scrollbar-width: thin;
  padding-block-end: var(--space-3);
  overscroll-behavior-x: contain;
}
.strip > * { scroll-snap-align: center; min-width: 62vw; }
.strip img { width: 100%; aspect-ratio: 345 / 815; object-fit: cover;
             border-radius: var(--radius); background: var(--surface-sunken); }
.strip > *:nth-child(even) img { aspect-ratio: 713 / 815; }

@media (min-width: 48em) {
  .strip {
    grid-auto-flow: row;
    grid-template-columns: 345fr 713fr 345fr 713fr 344fr 713fr;
    overflow-x: visible;
  }
  .strip > * { min-width: 0; }
  .strip img { height: clamp(320px, 42vw, 560px); aspect-ratio: auto; }
}

/* --- Work index ----------------------------------------------------------- */
.work-group { padding-block: clamp(2.5rem, 1.5rem + 4vw, 5rem); }
.work-group__header {
  display: flex; align-items: baseline; gap: var(--space-4);
  margin-block-end: var(--space-6);
  padding-block-end: var(--space-4);
  border-bottom: 1px solid var(--rule);
}
.work-group__title {
  font-size: var(--step--1); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; font-weight: var(--weight-medium);
  color: var(--text);
}
.work-group__count { font-size: var(--step--1); color: var(--text-subtle);
                     margin-inline-start: auto; font-variant-numeric: tabular-nums; }

/* --- Case study ----------------------------------------------------------- */
.case-hero { padding-block: clamp(2.5rem, 2rem + 4vw, 5rem) var(--space-6); }
.case-hero__eyebrow {
  display: flex; align-items: center; gap: var(--space-3);
  margin-block-end: var(--space-5);
}
.case-hero__title {
  font-size: var(--step-5); font-weight: var(--weight-thin);
  letter-spacing: -0.03em;
}
.case-hero__question {
  font-size: var(--step-2); font-weight: var(--weight-light);
  color: var(--text-muted); max-width: 40ch;
  margin-block-start: var(--space-4); text-wrap: pretty;
}

/* Metadata as a real definition list — screen readers get the label/value
   pairing, and it collapses to one column on a phone. */
.case-meta {
  display: grid; gap: var(--space-5) var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 200px), 1fr));
  padding-block: var(--space-6);
  border-block: 1px solid var(--rule);
  margin-block: clamp(2rem, 1rem + 3vw, 3.5rem);
}
.case-meta dt {
  font-size: var(--step--1); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-subtle);
  margin-block-end: var(--space-2);
}
.case-meta dd {
  font-size: var(--step-0); color: var(--text);
  /* The source separates team roles with runs of spaces, which HTML would
     collapse. This preserves them without resorting to &nbsp;. */
  white-space: pre-wrap;
}

.case-body { max-width: var(--measure-prose); }
.case-body p + p { margin-block-start: var(--space-4); }

.case-links { display: flex; flex-wrap: wrap; gap: var(--space-4);
              margin-block-start: var(--space-6); }

/* Case-study boards: tall stitched exports. Full-bleed-ish, lazy, and given
   an intrinsic size by the build step so they reserve space and cause no
   layout shift as they stream in. */
.boards { display: flex; flex-direction: column; gap: clamp(1rem, 0.5rem + 2vw, 2.5rem); }
.board { margin: 0; }
.board img {
  width: 100%; border-radius: var(--radius);
  background: var(--surface-sunken);
}
.board--zoomable img { cursor: zoom-in; }
.board figcaption { margin-block-start: var(--space-3); font-size: var(--step--1);
                    color: var(--text-subtle); }

/* Prev / next */
.pager {
  display: grid; gap: var(--space-5);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 280px), 1fr));
  padding-block: var(--space-8);
  border-top: 1px solid var(--rule);
}
.pager__item { display: flex; flex-direction: column; gap: var(--space-2); }
.pager__item--next { text-align: right; }
.pager__label { font-size: var(--step--1); letter-spacing: var(--tracking-wider);
                text-transform: uppercase; color: var(--text-subtle); }
.pager__title { font-family: var(--font-display); font-size: var(--step-2);
                font-weight: var(--weight-light); }
.pager__item:hover .pager__title { color: var(--accent); }

/* --- Bucket grid ---------------------------------------------------------- */
/* Masonry where supported, a balanced column grid everywhere else. */
.bucket-grid {
  display: grid; gap: var(--space-4);
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 260px), 1fr));
  grid-auto-rows: 1px;   /* JS assigns row spans from each image's real ratio */
}
.bucket-item { margin: 0; overflow: hidden; border-radius: var(--radius);
               background: var(--surface-sunken); }
.bucket-item img { width: 100%; height: 100%; object-fit: cover; cursor: zoom-in;
                   transition: transform var(--dur-slow) var(--ease-out); }
.bucket-item:hover img { transform: scale(1.03); }
/* Fallback before JS measures, and if JS never runs. */
.bucket-grid:not([data-masonry="on"]) { grid-auto-rows: auto; }
.bucket-grid:not([data-masonry="on"]) .bucket-item img { aspect-ratio: 4 / 5; }

/* --- Lightbox ------------------------------------------------------------- */
.lightbox {
  position: fixed; inset: 0; z-index: var(--z-lightbox);
  display: grid; place-items: center;
  padding: var(--space-4);
  background: rgb(11 11 11 / 0.94);
  border: 0;
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out);
}
.lightbox[open] { opacity: 1; pointer-events: auto; }
.lightbox::backdrop { background: rgb(11 11 11 / 0.94); }
.lightbox__img {
  max-width: min(96vw, 1600px); max-height: 92vh;
  width: auto; height: auto; object-fit: contain;
  border-radius: var(--radius);
}
.lightbox__close {
  position: absolute; top: var(--space-4); right: var(--space-4);
  width: 44px; height: 44px; display: grid; place-items: center;
  color: var(--white); font-size: var(--step-2); line-height: 1;
  border: 1px solid rgb(255 255 255 / 0.25); border-radius: 999px;
}
.lightbox__close:hover { background: rgb(255 255 255 / 0.12); }
.lightbox__counter {
  position: absolute; bottom: var(--space-4); left: 50%;
  transform: translateX(-50%);
  color: var(--ink-300); font-size: var(--step--1);
  font-variant-numeric: tabular-nums;
}
.lightbox__nav {
  position: absolute; top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px; display: grid; place-items: center;
  color: var(--white); font-size: var(--step-2);
  border: 1px solid rgb(255 255 255 / 0.25); border-radius: 999px;
}
.lightbox__nav:hover { background: rgb(255 255 255 / 0.12); }
.lightbox__nav--prev { left: var(--space-4); }
.lightbox__nav--next { right: var(--space-4); }
@media (max-width: 30em) { .lightbox__nav { display: none; } }

/* --- Footer / Connect ----------------------------------------------------- */
.site-footer { padding-block: var(--space-9) var(--space-6); }
.site-footer__lede {
  font-size: var(--step-2); font-weight: var(--weight-light);
  color: var(--text-muted-on-inverse); max-width: 42ch;
}
.site-footer__cta {
  font-size: var(--step-5); font-weight: var(--weight-thin);
  letter-spacing: -0.03em; margin-block: var(--space-5) var(--space-7);
}
.site-footer__cta a:hover { color: var(--accent-on-inverse); }
.site-footer__grid {
  display: grid; gap: var(--space-7);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr));
  padding-block-start: var(--space-7);
  border-top: 1px solid var(--rule-on-inverse);
}
.site-footer__label {
  font-size: var(--step--1); letter-spacing: var(--tracking-wider);
  text-transform: uppercase; color: var(--text-subtle-on-inverse);
  margin-block-end: var(--space-3);
}
.site-footer__list { display: flex; flex-direction: column; gap: var(--space-2);
                     list-style: none; margin: 0; padding: 0; }
.site-footer__list a { color: var(--text-muted-on-inverse); }
.site-footer__list a:hover { color: var(--accent-on-inverse); }
.site-footer__bottom {
  display: flex; flex-wrap: wrap; gap: var(--space-4);
  align-items: center; justify-content: space-between;
  margin-block-start: var(--space-8);
  padding-block-start: var(--space-5);
  border-top: 1px solid var(--rule-on-inverse);
  font-size: var(--step--1); color: var(--text-subtle-on-inverse);
}

/* --- Back to top ---------------------------------------------------------- */
.to-top {
  position: fixed; right: var(--space-5); bottom: var(--space-5);
  z-index: calc(var(--z-header) - 1);
  width: 44px; height: 44px; display: grid; place-items: center;
  background: var(--surface-inverse); color: var(--text-on-inverse);
  border-radius: 999px; box-shadow: var(--shadow);
  opacity: 0; transform: translateY(8px); pointer-events: none;
  transition: opacity var(--dur) var(--ease-out), transform var(--dur) var(--ease-out);
}
.to-top[data-visible="true"] { opacity: 1; transform: none; pointer-events: auto; }
.to-top:hover { background: var(--accent); }

/* --- Missing-asset notice -------------------------------------------------
   Shown by site.js only if the images have not been fetched yet, so a fresh
   unzip explains itself instead of looking broken. */
.asset-notice {
  position: fixed; inset-inline: var(--space-4); bottom: var(--space-4);
  z-index: var(--z-lightbox);
  max-width: 560px; margin-inline: auto;
  padding: var(--space-4) var(--space-5);
  background: var(--surface-inverse); color: var(--text-on-inverse);
  border-radius: var(--radius-lg); box-shadow: var(--shadow-lg);
  font-size: var(--step--1); line-height: var(--leading-normal);
  display: flex; gap: var(--space-4); align-items: flex-start;
}
.asset-notice code { font-family: var(--font-mono); color: var(--accent-on-inverse); }
.asset-notice button { color: var(--ink-300); font-size: var(--step-1);
                       line-height: 1; margin-inline-start: auto; }

/* ==========================================================================
   Accent system
   --------------------------------------------------------------------------
   One colour, #00FF97, with jobs rather than decoration:
     · marks the start of a section      (.accent-rule)
     · numbers the work                  (.card__index)
     · reports reading position          (.progress)
     · carries the two inverted bands    (.band__*)
     · signals every interactive state   (hover / focus / current)
   On white it steps down to --accent (#00663C, 6.1:1). On black it is the
   raw mint. Both are the same token ramp, so it reads as one colour.
   ========================================================================== */

/* Short rule that opens a section. */
.accent-rule {
  display: block; width: 56px; height: 2px;
  background: var(--accent-graphic);
  border: 0; margin: 0 0 var(--space-5);
}
.accent-rule--sm { width: 32px; height: 2px; margin-block-end: var(--space-4); }

/* Section headers: a mint segment leading the hairline. */
.work-group__header { position: relative; }
.work-group__header::before {
  content: ""; position: absolute; left: 0; bottom: -1px;
  width: 56px; height: 2px; background: var(--accent-graphic);
}

/* Project numerals on the work index. */
.card__index {
  font-family: var(--font-mono);
  font-size: var(--step--1);
  color: var(--accent);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--tracking-wide);
}
.card:hover .card__index { color: var(--mint-600); }

/* Reading-position bar. Earns its place on case studies, where a single
   stitched board can run past 3,000px. */
.progress {
  position: fixed; top: 0; left: 0; z-index: calc(var(--z-header) + 2);
  height: 2px; width: 0;
  background: var(--accent-graphic);
  transition: width 90ms linear;
  will-change: width;
}
@media (prefers-reduced-motion: reduce) { .progress { transition: none; } }

/* --- Inverted band contents ---------------------------------------------- */
.band__statement {
  font-size: var(--step-5);
  font-weight: var(--weight-thin);
  line-height: var(--leading-snug);
  letter-spacing: var(--tracking-tight);
  max-width: 30ch;
}
/* The accented clause — one phrase per band, never a whole sentence. */
.band__statement em {
  font-style: normal;
  color: var(--accent-on-inverse);
}
.band__meta {
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wider);
  text-transform: uppercase;
  color: var(--text-subtle-on-inverse);
  margin-block-end: var(--space-5);
}

/* Oversized mint glyph, bled off the right edge. Decorative only. */
.band__glyph {
  position: absolute; right: -0.08em; bottom: -0.34em;
  font-family: var(--font-display);
  font-size: clamp(14rem, 34vw, 32rem);
  font-weight: var(--weight-thin);
  line-height: 1;
  color: var(--accent-graphic);
  opacity: 0.09;
  pointer-events: none;
  user-select: none;
}

/* --- Solid accent button (on dark) --------------------------------------- */
.btn--solid {
  background: var(--accent-graphic);
  border-color: var(--accent-graphic);
  color: var(--ink-900);
}
.btn--solid:hover {
  background: var(--white); border-color: var(--white); color: var(--ink-900);
}
.on-inverse .btn--solid { color: var(--ink-900); }
.on-inverse .btn--solid:hover { background: var(--white); border-color: var(--white); }

/* --- Stronger accent on card hover --------------------------------------- */
.card__media::after {
  background: linear-gradient(to top,
    color-mix(in srgb, var(--accent-graphic) 42%, transparent), transparent 55%);
}
.card__media { border-bottom: 2px solid transparent;
               transition: border-color var(--dur) var(--ease-out); }
.card:hover .card__media { border-bottom-color: var(--accent-graphic); }

/* Accent the eyebrow separator on case studies. */
.case-hero__eyebrow > span[aria-hidden] { color: var(--accent-graphic); }

/* Metadata labels get a small mint tick. */
.case-meta dt { position: relative; padding-inline-start: var(--space-4); }
.case-meta dt::before {
  content: ""; position: absolute; left: 0; top: 0.42em;
  width: 8px; height: 2px; background: var(--accent-graphic);
}

/* Footer: the CTA gets the accent permanently, not only on hover. */
.site-footer__cta a { color: var(--text-on-inverse); }
.site-footer__cta a:hover { color: var(--accent-on-inverse); }
.site-footer__label { color: var(--text-subtle-on-inverse); }

/* ==========================================================================
   Interest sprites
   --------------------------------------------------------------------------
   The small placed objects from the original homepage — each one an interest,
   each one a link to the project it belongs to.

   On the Wix site these were positioned in percentages of the ENTIRE page
   (left: 20.34%; top: 63.97%), which is why they only lined up at the one
   window width they were dragged into place at. Here each sprite is anchored
   inside a single narrative section, offset from the layout gutter, and sized
   with clamp(). Its relationship to the content beside it therefore holds at
   every viewport instead of one.
   ========================================================================== */
.narrative {
  position: relative;
  /* Contains the sprites and their hover labels. `clip` rather than `hidden`
     so no scroll container is created; the clip margin lets the drop shadow
     bleed without contributing to scrollWidth. */
  overflow-x: clip;
  overflow-clip-margin: 40px;
}
@supports not (overflow: clip) {
  .narrative { overflow-x: hidden; }
}

.sprite {
  position: absolute;
  z-index: 2;
  width: var(--sprite-size, clamp(80px, 12vw, 175px));
  top: var(--sprite-top, 10%);
  display: block;
  line-height: 0;
  /* Never let a sprite intercept a drag-select of the text underneath. */
  -webkit-user-select: none; user-select: none;
}
.sprite--right { right: 0; }
.sprite--left  { left:  0; }

/* Deliberately NO negative bleed. These are cut-out objects, so clipping one
   at the column edge reads as a mistake rather than a crop. Keeping them
   inside the content column also means they sit on the same axis as the type
   at every viewport — which is the whole point of redoing them. */

.sprite img {
  width: 100%; height: auto;
  filter: drop-shadow(0 12px 24px rgb(0 0 0 / 0.14));
  transition: transform var(--dur-slow) var(--ease-out),
              filter var(--dur) var(--ease-out);
}

/* Idle drift. Two sprites use a longer period so they never sync up. */
@media (prefers-reduced-motion: no-preference) {
  .sprite img { animation: float var(--sprite-period, 7s) var(--ease-in-out) infinite; }
  .sprite:nth-of-type(even) img { --sprite-period: 9.5s; animation-direction: reverse; }
}
@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50%      { transform: translateY(-11px) rotate(-2.2deg); }
}

/* Hover: lift, straighten, and pick up the accent. */
.sprite:hover img, .sprite:focus-visible img {
  animation-play-state: paused;
  transform: translateY(-14px) scale(1.07) rotate(0deg);
  filter: drop-shadow(0 18px 30px rgb(0 0 0 / 0.20))
          drop-shadow(0 0 0 2px var(--accent-graphic));
}

/* Name the interest on hover — it's a link, so say where it goes. */
.sprite__label {
  position: absolute; left: 50%; bottom: -1.9em;
  transform: translateX(-50%) translateY(4px);
  white-space: nowrap;
  font-size: var(--step--1);
  letter-spacing: var(--tracking-wide);
  text-transform: uppercase;
  color: var(--accent);
  opacity: 0; pointer-events: none;
  transition: opacity var(--dur) var(--ease-out),
              transform var(--dur) var(--ease-out);
}
.sprite:hover .sprite__label, .sprite:focus-visible .sprite__label {
  opacity: 1; transform: translateX(-50%) translateY(0);
}

/* Below 60em the narrative columns get tight and a floating object would
   crowd the type, so the sprites shrink and tuck to the edge. Under 34em
   they step out of the flow entirely rather than overlap the copy. */
@media (max-width: 59.99em) {
  .sprite { --sprite-size: clamp(62px, 14vw, 104px); top: var(--sprite-top-sm, 2%); }
  .sprite--right { right: 0; }
  .sprite--left  { left: 0; }
}
@media (max-width: 33.99em) {
  .sprite { display: none; }
}
/* Release fixes: keep the supplied visual system; correct media fit and controls. */
.narrative--objects .gallery img { object-fit:contain; padding:clamp(12px,3vw,32px); background:var(--surface-inverse); }
.hero__media img { object-position:center 24%; }
main .site-footer__list a { color:var(--text-muted); }
main .site-footer__list a:hover { color:var(--accent); }
.supplementary { margin-block:var(--space-8); border-block:1px solid var(--rule); padding-block:var(--space-5); }
.supplementary summary { cursor:pointer; font-size:var(--step-1); }
.supplementary summary span { float:right; font-size:var(--step--1); color:var(--text-muted); }
.supplementary__grid { display:grid; grid-template-columns:repeat(auto-fit,minmax(min(100%,300px),1fr)); gap:var(--space-5); margin-block-start:var(--space-6); align-items:start; }
.supplementary__grid img { width:100%; height:auto; }
.animated-visual,.project-film video { width:100%; height:auto; background:var(--surface-inverse); border-radius:var(--radius); }
.project-film { margin-block:var(--space-8); }
.project-film h2,.project-film p { margin-block:var(--space-5); }
.grayporter-preview { margin-block:var(--space-7); }
.grayporter-preview img { max-height:65vh; width:100%; object-fit:contain; background:var(--surface-sunken); }
body:has(.lightbox[open]) { overflow:hidden; }
.lightbox { width:100vw; height:100dvh; max-width:100vw; max-height:100dvh; margin:0; padding:64px 64px 62px; }
.lightbox:not([open]) { display:none; }
.lightbox__stage { width:100%; height:100%; overflow:auto; overscroll-behavior:contain; display:flex; align-items:center; justify-content:center; }
.lightbox__img { max-width:100%; max-height:100%; cursor:zoom-in; }
.lightbox__stage.is-zoomed { display:block; }
.lightbox__stage.is-zoomed .lightbox__img { max-width:none; max-height:none; width:var(--natural-w); height:auto; margin:0 auto; cursor:zoom-out; }
.lightbox__zoom { position:absolute; top:16px; left:16px; padding:10px 18px; color:#fff; border:1px solid #ffffff66; border-radius:30px; min-height:44px; font-size:13px; }
.lightbox__caption { color:#ddd; position:absolute; bottom:18px; left:70px; right:70px; text-align:center; font-size:12px; }
.lightbox__counter { top:24px; bottom:auto; }
.lightbox__nav { display:grid; }
.lightbox__nav[hidden] { display:none; }
[role=button]:focus-visible { outline:2px solid var(--accent); outline-offset:5px; }
@media(max-width:47.99em){.lightbox{padding:70px 12px 72px}.lightbox__nav{top:auto;bottom:12px;transform:none}.lightbox__caption{bottom:23px;font-size:10px}.lightbox__stage.is-zoomed .lightbox__img{width:var(--natural-w)}.nav__link{min-height:48px}}
@media(prefers-reduced-motion:reduce){html{scroll-behavior:auto}.hero__scroll-line:after{animation:none}}
