/* ---------- Tokens ---------- */
:root {
  --paper: #EEF0F5;
  --ink: #14163A;
  --ultra: #2A36D1;
  --signal: #FF5B2E;
  --mist: #C8CEE6;
  --ink-soft: #4A4D6E;

  --f-display: "Archivo", system-ui, sans-serif;
  --f-text: "Newsreader", Georgia, serif;
  --f-seq: "IBM Plex Mono", ui-monospace, monospace;

  --wrap: 1320px;
  --gut: clamp(16px, 4vw, 48px);
  --band: clamp(72px, 9vw, 144px);
  --ease-out: cubic-bezier(.16, 1, .3, 1);

  color-scheme: light;
}

/* Section themes: each band sets its own background, text and block colours */
.t-paper  { --bg: var(--paper);  --fg: var(--ink);   --block: var(--ultra);  --em: var(--ultra);  --soft: var(--ink-soft); }
.t-ultra  { --bg: var(--ultra);  --fg: #fff;         --block: var(--signal); --em: #fff;          --soft: #D5D8F6; }
.t-signal { --bg: var(--signal); --fg: var(--ink);   --block: var(--ink);    --em: var(--ink);    --soft: #3B1608; }
.t-ink    { --bg: var(--ink);    --fg: var(--paper); --block: var(--ultra);  --em: var(--signal); --soft: #B4B8D6; }
.t-mist   { --bg: var(--mist);   --fg: var(--ink);   --block: var(--signal); --em: var(--ultra);  --soft: #34375A; }
.t-paper, .t-ultra, .t-signal, .t-ink, .t-mist { background: var(--bg); color: var(--fg); }

/* ---------- Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--f-display);
  font-size: 1rem;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-underline-offset: .18em; text-decoration-thickness: 1.5px; }
h1, h2, h3, p, figure, dl, dd { margin: 0; }
.wrap { max-width: var(--wrap); margin-inline: auto; padding-inline: var(--gut); }
.band { padding-block: var(--band); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }

:focus-visible { outline: 3px solid var(--signal); outline-offset: 3px; }
.t-signal :focus-visible, .t-ultra :focus-visible { outline-color: var(--ink); }
.t-ultra :focus-visible { outline-color: #fff; }

.skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  background: var(--ink); color: var(--paper); padding: .75rem 1rem; font-weight: 600;
}
.skip:focus { top: 16px; }

/* Placeholder text: visible, soft highlight until real copy arrives */
.tbd {
  background: color-mix(in srgb, var(--em, var(--ultra)) 14%, transparent);
  -webkit-box-decoration-break: clone; box-decoration-break: clone;
  padding: 0 .15em; border-radius: 2px;
}

/* ---------- Header ---------- */
.site-header { position: relative; z-index: 10; }
.site-header .wrap {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between;
  gap: .25rem 2rem; padding-block: 16px;
}
.wordmark {
  font-weight: 700; font-stretch: 87.5%; font-size: 1.0625rem; text-decoration: none;
  padding-block: .5rem;
}
.nav { display: flex; gap: 1.5rem; }
.nav a { text-decoration: none; font-size: .9375rem; font-weight: 500; padding-block: .5rem; }
.nav a:hover, .wordmark:hover { text-decoration: underline; }

/* ---------- Image areas ---------- */
.frame { position: relative; background: var(--bg); overflow: hidden; }
.frame img { width: 100%; height: 100%; object-fit: cover; }
.ph {
  display: flex; align-items: flex-end; width: 100%;
  padding: 14px 16px;
  background:
    repeating-linear-gradient(135deg,
      color-mix(in srgb, var(--fg) 9%, transparent) 0 1.5px,
      transparent 1.5px 11px),
    var(--bg);
  outline: 1.5px dashed color-mix(in srgb, var(--fg) 35%, transparent);
  outline-offset: -1.5px;
  font-size: .8125rem; font-weight: 500; line-height: 1.35;
  color: color-mix(in srgb, var(--fg) 80%, transparent);
}

/* Portrait cutouts (or silhouette placeholders) */
.cut, .frame .cut { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: contain; object-position: 50% 100%; }
.cut-ph { display: flex; align-items: flex-end; }
.sil { width: 100%; height: 100%; fill: var(--sil, rgba(20, 22, 58, .5)); }

/* Offset colour block behind an image */
.media { position: relative; display: block; padding: 0 7% 7% 0; text-decoration: none; }
.media-block { position: absolute; top: 12%; left: 12%; right: 0; bottom: 0; background: var(--block); }
.media.flip { padding: 0 0 7% 7%; }
.media.flip .media-block { left: 0; right: 12%; }

/* ---------- Hero ---------- */
.hero { position: relative; overflow: hidden; padding-top: 0; padding-bottom: clamp(32px, 4vw, 56px); }
.hero-grid { display: grid; gap: 56px; padding-top: clamp(32px, 6vw, 80px); }
.hero-title {
  font-weight: 800; font-stretch: 68%;
  font-size: clamp(2.75rem, 6.4vw, 6.25rem);
  line-height: .94; letter-spacing: -.005em;
}
.hl { display: block; }
.w { display: inline-block; white-space: nowrap; }
.into { font-weight: 300; font-stretch: 112%; }
.ch { position: relative; }
.ch.enc { color: transparent; }
.ch.enc::after {
  content: attr(data-b);
  position: absolute; left: 0; right: 0; top: .3em;
  text-align: center; font-family: var(--f-seq); font-weight: 500; font-stretch: 100%;
  font-size: .5em; line-height: 1; color: var(--signal);
}
.hero-sub {
  max-width: 33rem; margin-top: 2rem;
  font-family: var(--f-text); font-size: clamp(1.125rem, 1.5vw, 1.3125rem); line-height: 1.55;
  color: var(--soft);
}

.cast { position: relative; width: 100%; max-width: 680px; margin-inline: auto; aspect-ratio: 1 / 1; }
.cast-fig { position: absolute; aspect-ratio: 4 / 5; }
.cast-1 { left: 0;   bottom: 9%;  width: 45%; z-index: 1; }
.cast-2 { left: 27%; bottom: 0;   width: 48%; z-index: 3; }
.cast-3 { right: 0;  bottom: 17%; width: 42%; z-index: 2; }
.cast-block { position: absolute; inset: 32% 0 0 0; background: var(--pc); }
.cast-name {
  position: absolute; top: calc(32% + 10px); left: 12px; z-index: 2;
  font-size: .8125rem; font-weight: 600; color: var(--pc-fg);
}
.cast-3 .cast-name { left: auto; right: 12px; }

.hero-seq {
  margin-top: clamp(40px, 5vw, 64px);
}
.hero-seq-inner {
  border-top: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
  padding-top: 16px; display: grid; gap: 6px;
}
.seq {
  font-family: var(--f-seq); font-weight: 500; font-size: .75rem;
  letter-spacing: .12em; word-spacing: .35em; line-height: 1.8;
  color: var(--soft); overflow-wrap: anywhere;
}
.seq-note { font-size: .875rem; color: var(--soft); }

/* ---------- Recognition strip ---------- */
.creds { padding-block: clamp(48px, 6vw, 80px); }
.creds-list { list-style: none; margin-block: 0; padding-block: 0; display: grid; gap: 28px 40px; }
.creds-list a { text-decoration: none; display: block; }
.cred-title { display: block; font-weight: 800; font-stretch: 75%; font-size: clamp(1.75rem, 2.8vw, 2.5rem); line-height: 1; }
.cred-detail { display: block; margin-top: .4rem; color: var(--soft); }
.creds-list a:hover .cred-title { text-decoration: underline; text-decoration-thickness: 2px; }

/* ---------- Section heads ---------- */
.section-head { display: grid; gap: 1rem; max-width: 46rem; }
.section-title { font-weight: 800; font-stretch: 72%; font-size: clamp(2.5rem, 5.5vw, 4.5rem); line-height: .95; }
.section-lede { font-family: var(--f-text); font-size: 1.1875rem; line-height: 1.55; color: var(--soft); max-width: 36rem; }
.work-head { padding-top: var(--band); padding-bottom: 0; }

/* ---------- Project features ---------- */
.feature { padding-block: var(--band); }
.feature-grid { display: grid; gap: 40px; align-items: center; }
.feature-line { font-weight: 600; color: var(--em); margin-bottom: .75rem; }
.feature-title { font-weight: 800; font-stretch: 68%; font-size: clamp(2.75rem, 6vw, 5.75rem); line-height: .92; }
.feature-title a { text-decoration: none; }
.feature-title a:hover { text-decoration: underline; text-decoration-thickness: 3px; }
.feature-sum { font-family: var(--f-text); font-size: 1.1875rem; line-height: 1.55; margin-top: 1.25rem; max-width: 34rem; }

.stat { margin-top: 2rem; display: grid; gap: .35rem; }
.stat-v { font-weight: 800; font-size: clamp(2.25rem, 4vw, 3.25rem); line-height: 1; font-variant-numeric: lining-nums tabular-nums; }
.stat-l { color: var(--soft); font-size: .9375rem; max-width: 24rem; }
.award { margin-top: 1.5rem; font-weight: 600; display: flex; gap: .6rem; align-items: baseline; }
.award svg { flex: none; width: 1em; height: 1em; transform: translateY(.12em); }

.team-mini { list-style: none; padding: 0; margin: 1.75rem 0 0; display: flex; flex-wrap: wrap; gap: .5rem 1.25rem; font-size: .9375rem; }
.team-mini li { display: flex; align-items: center; gap: .5rem; }
.dot { width: 12px; height: 12px; border-radius: 50%; background: var(--pc); box-shadow: 0 0 0 1.5px var(--fg); flex: none; }

.btn {
  display: inline-flex; align-items: center; min-height: 48px; padding: 0 1.5rem; margin-top: 2rem;
  border-radius: 999px; background: var(--fg); color: var(--bg);
  font-weight: 600; text-decoration: none;
  transition: background-color .2s ease;
}
.btn:hover { background: var(--em); }
.t-signal .btn:hover, .t-ultra .btn:hover { background: color-mix(in srgb, var(--fg) 82%, var(--bg)); }

/* ---------- People ---------- */
.people-grid { display: grid; gap: 72px 32px; margin-top: clamp(48px, 6vw, 80px); }
.person { scroll-margin-top: 24px; }
.person-fig { position: relative; aspect-ratio: 4 / 5; }
.person-fig .media-block { top: 24%; left: 0; right: 0; background: var(--pc); }
.person-name { font-weight: 800; font-stretch: 70%; font-size: clamp(2.5rem, 4vw, 3.5rem); line-height: .95; margin-top: 1.5rem; }
.person-focus { font-weight: 600; color: var(--em); margin-top: .6rem; }
.person-bio { font-family: var(--f-text); font-size: 1.125rem; line-height: 1.55; margin-top: .9rem; }
.person-work { margin-top: 1.25rem; font-size: .9375rem; }
.person-work dt { color: var(--soft); }
.person-work dd { display: flex; flex-wrap: wrap; gap: .25rem .9rem; margin-top: .25rem; }
.person-work a { font-weight: 600; }

/* ---------- Supporting work ---------- */
.support-list { list-style: none; padding: 0; margin: clamp(40px, 5vw, 64px) 0 0; border-top: 2px solid var(--fg); }
.support-item {
  display: grid; gap: 20px 40px; padding-block: 36px;
  border-bottom: 1px solid color-mix(in srgb, var(--fg) 30%, transparent);
}
.support-thumb { display: block; max-width: 320px; text-decoration: none; }
.support-line { font-weight: 600; color: var(--em); }
.support-title { font-weight: 800; font-stretch: 72%; font-size: clamp(2rem, 3.4vw, 2.75rem); line-height: 1; margin-top: .3rem; }
.support-title a { text-decoration: none; }
.support-title a:hover { text-decoration: underline; }
.support-sum { font-family: var(--f-text); font-size: 1.125rem; line-height: 1.55; margin-top: .75rem; max-width: 36rem; }
.support-link { display: inline-flex; align-items: center; min-height: 44px; margin-top: .5rem; font-weight: 600; }

.figs { display: grid; grid-template-columns: repeat(auto-fit, minmax(7.5rem, 1fr)); gap: 20px 28px; }
.fig-v { display: block; font-weight: 800; font-stretch: 75%; font-size: clamp(2.75rem, 6vw, 4.5rem); line-height: 1; font-variant-numeric: lining-nums; }
.fig-l { display: block; color: var(--soft); font-size: .9375rem; margin-top: .3rem; }
.support-item .figs { align-self: start; }
.support-item .fig-v { font-size: 2.25rem; }

/* ---------- Contact & footer ---------- */
.contact-title { font-weight: 800; font-stretch: 66%; font-size: clamp(3.5rem, 11vw, 9.5rem); line-height: .88; }
.contact-mail {
  display: inline-block; margin-top: 2rem;
  font-family: var(--f-text); font-size: clamp(1.375rem, 3vw, 2.25rem); overflow-wrap: anywhere;
}
.contact-place { margin-top: 1rem; color: var(--soft); }

.site-footer { padding-block: 32px; font-size: .875rem; }
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 12px 32px; justify-content: space-between; }
.site-footer nav { display: flex; gap: 1.5rem; }
.site-footer a { text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- Project page ---------- */
.p-hero { position: relative; padding-top: 0; padding-bottom: var(--band); }
.back { margin-top: clamp(16px, 3vw, 40px); display: inline-flex; align-items: center; gap: .5rem; min-height: 44px; margin-bottom: clamp(24px, 4vw, 48px); font-weight: 600; text-decoration: none; }
.back:hover { text-decoration: underline; }
.back svg { width: 1.1em; height: 1.1em; }
.p-hero-grid { display: grid; gap: 48px; }
.p-line { font-weight: 600; color: var(--em); margin-bottom: .75rem; }
.p-title { font-weight: 800; font-stretch: 64%; font-size: clamp(3rem, 8vw, 7.25rem); line-height: .9; }
.p-sum { font-family: var(--f-text); font-size: clamp(1.1875rem, 1.8vw, 1.4375rem); line-height: 1.5; margin-top: 1.5rem; max-width: 36rem; }
.facts {
  display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 20px 24px;
  margin-top: 2.5rem; padding-top: 1.25rem; max-width: 36rem;
  border-top: 1.5px solid color-mix(in srgb, var(--fg) 40%, transparent);
}
.facts dt { font-size: .8125rem; color: var(--soft); }
.facts dd { font-weight: 600; margin-top: .15rem; }

.p-result { padding-block: clamp(64px, 8vw, 120px); }
.p-result-v { display: block; font-weight: 800; font-stretch: 62%; font-size: clamp(4rem, 14vw, 12rem); line-height: .86; font-variant-numeric: lining-nums; }
.p-result-l { display: block; margin-top: 1.25rem; font-family: var(--f-text); font-size: clamp(1.125rem, 1.8vw, 1.375rem); max-width: 30rem; }
.p-result .fig-v { font-size: clamp(3.5rem, 9vw, 7rem); font-stretch: 62%; }

.p-body-grid { display: grid; gap: 56px; }
.contrib-title { font-weight: 700; font-size: 1.125rem; }
.contrib-list { list-style: none; padding: 0; margin: 1rem 0 0; display: grid; gap: 1rem; }
.contrib-list li { display: grid; grid-template-columns: auto 1fr; gap: .1rem .6rem; align-items: center; }
.contrib-list a { font-weight: 600; text-decoration: none; }
.contrib-list a:hover { text-decoration: underline; }
.contrib-role { grid-column: 2; color: var(--soft); font-size: .9375rem; }

.p-section + .p-section { margin-top: clamp(48px, 6vw, 80px); }
.p-section h2 { font-weight: 800; font-stretch: 76%; font-size: clamp(1.875rem, 3vw, 2.5rem); line-height: 1; margin-bottom: 1.1rem; }
.p-section p { font-family: var(--f-text); font-size: 1.1875rem; line-height: 1.65; max-width: 38rem; }
.p-section p + p { margin-top: 1em; }

.gallery { display: grid; gap: 20px; margin-top: clamp(40px, 5vw, 64px); }
.gallery figcaption { margin-top: .6rem; font-size: .875rem; color: var(--soft); }

.p-video { margin-top: clamp(48px, 6vw, 80px); max-width: 38rem; }
.p-video video { display: block; width: 100%; height: auto; max-height: 80svh; background: var(--ink); }
.p-video figcaption { margin-top: .6rem; font-size: .875rem; color: var(--soft); }

.p-next { display: block; text-decoration: none; padding-block: clamp(72px, 10vw, 150px); }
.p-next-label { display: block; font-weight: 600; color: var(--em); }
.p-next-title { display: block; margin-top: .5rem; font-weight: 800; font-stretch: 64%; font-size: clamp(3rem, 9vw, 8rem); line-height: .9; }
.p-next:hover .p-next-title { text-decoration: underline; text-decoration-thickness: 4px; }

.missing { min-height: 100svh; display: grid; align-content: center; gap: 1.5rem; }

/* ---------- Larger screens ---------- */
@media (min-width: 760px) {
  .creds-list { grid-template-columns: repeat(3, 1fr); }
  .people-grid { grid-template-columns: repeat(3, 1fr); }
  .person:nth-child(2) { margin-top: 88px; }
  .person:nth-child(3) { margin-top: 32px; }
  .support-item { grid-template-columns: 220px minmax(0, 1fr) minmax(0, 18rem); }
  .gallery { grid-template-columns: repeat(12, 1fr); gap: 24px; }
  .gallery figure:nth-child(4n+1), .gallery figure:nth-child(4n+4) { grid-column: span 7; }
  .gallery figure:nth-child(4n+2), .gallery figure:nth-child(4n+3) { grid-column: span 5; }
  .gallery figure:nth-child(4n+2) { margin-top: 64px; }
}
@media (min-width: 960px) {
  .hero-grid { grid-template-columns: 1.15fr 1fr; align-items: end; }
  .feature-grid { grid-template-columns: 7fr 5fr; gap: 72px; }
  .feature.flip .feature-grid { grid-template-columns: 5fr 7fr; }
  .feature.flip .media { order: 2; }
  .p-hero-grid { grid-template-columns: 1fr 1fr; gap: 64px; align-items: end; }
  .p-body-grid { grid-template-columns: 4fr 8fr; gap: 80px; }
  .contrib { position: sticky; top: 32px; }
}

/* ---------- Motion (only when the visitor hasn't asked for less) ---------- */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
  ::view-transition-group(*) { animation-duration: .55s; animation-timing-function: cubic-bezier(.16, 1, .3, 1); }
  ::view-transition-old(root), ::view-transition-new(root) { animation-duration: .3s; }

  /* Hero: one orchestrated entrance, after the headline starts decoding */
  .js .cast-fig { animation: rise 1.1s var(--ease-out) both; animation-delay: calc(500ms + var(--i) * 140ms); }
  .js .cast-block { animation: slide 1.1s var(--ease-out) both; animation-delay: calc(400ms + var(--i) * 140ms); }
  .js .hero-sub, .js .hero-seq { animation: fade .9s ease both; animation-delay: 1.4s; }

  /* Scroll reveals: images uncover upward, colour blocks settle into place */
  .js .rv .frame { transition: clip-path 1.1s var(--ease-out); }
  .js .rv:not(.in) .frame { clip-path: inset(100% 0 0 0); }
  .js .rv .media-block { transition: transform 1.2s var(--ease-out), opacity .6s ease; }
  .js .rv:not(.in) .media-block { transform: translate3d(-24px, 24px, 0); opacity: 0; }
}
@keyframes rise  { from { transform: translate3d(0, 48px, 0); opacity: 0; } }
@keyframes slide { from { transform: translate3d(-28px, 0, 0); opacity: 0; } }
@keyframes fade  { from { opacity: 0; } }
.person-fig .frame { position: absolute; inset: 0; }
@media (max-width: 959px) {
  .cast { aspect-ratio: 5 / 4; }
}
