/* PAZL — site styles
   Tokens first, then layout primitives, then page sections.
   Fonts: Syne (display), Syne Mono (labels), Inter (reading). */

:root {
  /* White theme. --ink is the page ground, --paper the type colour (names kept from the dark build). */
  --ink: #ffffff;
  --paper: #0b0b0b;
  --soft: #3a3936;
  --muted: #6f6c67;
  --line: #e4e2dd;
  --line-soft: #efede9;
  --tile: #f4f3f0;
  --faint: #c9c6bf;
  --bone: #e9e7e2;
  --bone-ink: #141414;
  /* discipline colours, taken from the four pieces of the mark */
  --c-music: #777776;
  --c-fashion: #c7c6c1;
  --c-tech: #f2f1f0;
  --c-art: #ffffff;

  --font-display: 'Syne', system-ui, sans-serif;
  --font-mono: 'Syne Mono', ui-monospace, monospace;
  --font-body: 'Inter', system-ui, -apple-system, sans-serif;

  --gutter: 32px;
  --nav-h: 60px;
  --max: 1440px;
}

@media (max-width: 820px) {
  :root { --gutter: 20px; }
}

/* ---------- base ---------- */

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

html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

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

body {
  margin: 0;
  background: var(--ink);
  color: var(--paper);
  font-family: var(--font-body);
  font-size: 14px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img { display: block; max-width: 100%; height: auto; background: var(--line-soft); }

a { color: inherit; text-decoration: none; }
a:hover { color: var(--muted); }

h1, h2, h3, p, dl, dd, ol, ul { margin: 0; }
ol, ul { padding: 0; list-style: none; }

button { font: inherit; color: inherit; background: none; border: 0; padding: 0; }

:focus-visible { outline: 2px solid var(--paper); outline-offset: 4px; }

.skip {
  position: absolute; left: var(--gutter); top: -60px;
  padding: 10px 14px; background: var(--paper); color: var(--ink);
  font-family: var(--font-mono); font-size: 12px; z-index: 50;
}
.skip:focus { top: 12px; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* ---------- type ---------- */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--muted);
}

.h-hero {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(34px, 5.6vw, 82px);
  line-height: 0.98;
  letter-spacing: -0.035em;
  text-transform: uppercase;
  max-width: 15ch;
}

.h-section {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(32px, 4.5vw, 60px);
  line-height: 0.98;
  letter-spacing: -0.03em;
  text-transform: uppercase;
}

.h-item {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: -0.01em;
  text-transform: uppercase;
}

.lede { font-size: 17px; line-height: 1.5; color: var(--soft); max-width: 46ch; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.ul { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.btn {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 20px;
  border: 1px solid var(--paper);
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--paper);
  transition: background 0.15s ease, color 0.15s ease;
}
.btn:hover { background: var(--paper); color: var(--ink); }
.btn--solid { background: var(--paper); color: var(--ink); }
.btn--solid:hover { background: var(--soft); color: #ffffff; }

/* ---------- layout ---------- */

.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

.section { padding-top: 44px; padding-bottom: 44px; border-bottom: 1px solid var(--line-soft); }
.section--tight { padding-top: 32px; padding-bottom: 32px; }
.section--last { border-bottom: 0; }
.stack { display: flex; flex-direction: column; gap: 16px; }
.stack--lg { gap: 28px; }

@media (max-width: 820px) {
  .section { padding-top: 40px; padding-bottom: 40px; }
}

/* ---------- wordmark band ---------- */

.band {
  background: var(--bone);
  color: var(--bone-ink);
  padding: 10px var(--gutter) 12px;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  position: relative;
  overflow: hidden;
}
.band > * { position: relative; z-index: 1; }
/* wireframe puzzle globe turning behind the mark */
.band__stage { position: relative; width: clamp(140px, 15vw, 160px); aspect-ratio: 796 / 789; }
.band__globe {
  position: absolute; z-index: 0; inset: 0; width: 100%; height: 100%;
  margin: 0; background: transparent; opacity: 0.42; pointer-events: none;
}
@media (prefers-reduced-motion: no-preference) {
  .band__globe { animation: globe-spin 80s linear infinite; will-change: transform; }
}
@keyframes globe-spin { to { transform: rotate(360deg); } }
/* tagline under the nav on the home page */
.tape { background: var(--ink); color: var(--paper); border-bottom: 1px solid var(--line); padding: 12px 0 11px; }
.tape__text { margin: 0; font-family: var(--font-display); font-weight: 600; font-size: clamp(14px, 1.6vw, 20px); letter-spacing: 0.16em; text-transform: uppercase; }

.band__line {
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(12px, 1.2vw, 14px);
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}
.band__mark {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(30px, 4.4vw, 54px);
  line-height: 1;
  letter-spacing: -0.03em;
  text-transform: uppercase;
  text-align: center;
}
.band__logo--small { width: auto; height: clamp(44px, 5vw, 64px); background: transparent; }
.nav__mark, .footer__mark { height: 24px; width: auto; background: transparent; vertical-align: -6px; margin-right: 10px; }
.nav__mark { height: 36px; margin-right: 12px; }
.footer__mark { height: 22px; }
.footer__tag { margin-top: 6px; font-family: var(--font-display); font-weight: 600; font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; color: var(--muted); }
.band--compact .band__mark { font-size: clamp(26px, 3.6vw, 40px); }

/* pieces assembling on the home page */
.assemble { position: absolute; z-index: 1; inset: 0; margin: auto; width: 62%; height: 56.8%; }
.assemble__piece { position: absolute; left: 0; top: 0; width: 100%; height: 100%; background: transparent; }
@media (prefers-reduced-motion: no-preference) {
  .assemble__piece { animation: piece-in 1.15s cubic-bezier(0.16, 0.9, 0.24, 1) var(--d, 0s) both; will-change: transform, opacity; }
  .assemble { animation: mark-settle 0.55s ease-out 1.5s both; }
  .assemble ~ .band__mark { animation: fade-up 0.8s ease-out 1.05s both; }
  .assemble ~ .band__line { animation: fade-up 0.8s ease-out 1.25s both; }
}
@keyframes piece-in {
  from { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; }
  30% { opacity: 1; }
  to { transform: none; opacity: 1; }
}
@keyframes mark-settle {
  0% { transform: scale(1); }
  40% { transform: scale(1.04); }
  100% { transform: scale(1); }
}
@keyframes fade-up {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: none; }
}

/* ---------- nav ---------- */

.nav {
  position: sticky;
  top: 0;
  z-index: 20;
  background: var(--ink);
  border-bottom: 1px solid var(--line);
}
.nav__inner {
  min-height: var(--nav-h);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 24px;
}
.nav__brand {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 24px;
  display: inline-flex; align-items: center;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav__links { display: flex; gap: 28px; font-family: var(--font-display); font-weight: 600; font-size: 13px; letter-spacing: 0.08em; text-transform: uppercase; }
.nav__links a[aria-current="page"] { text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }

.nav__toggle {
  display: none;
  position: relative;
  width: 44px; height: 44px;
}
.nav__toggle span {
  position: absolute; right: 10px; width: 24px; height: 1px;
  background: var(--paper);
  transition: transform 0.2s ease, top 0.2s ease;
}
.nav__toggle span:first-child { top: 18px; }
.nav__toggle span:last-child { top: 25px; }

@media (max-width: 820px) {
  .nav__toggle { display: block; }
  .nav__links {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--ink);
    border-bottom: 1px solid var(--line);
  }
  .nav__links a { padding: 16px var(--gutter); border-top: 1px solid var(--line-soft); font-size: 15px; }
  .nav.is-open .nav__links { display: flex; }
  .nav.is-open .nav__toggle span:first-child { top: 21.5px; transform: rotate(45deg); }
  .nav.is-open .nav__toggle span:last-child { top: 21.5px; transform: rotate(-45deg); }
}

/* ---------- home: hero ---------- */

/* Hero: the eyebrow runs across the top; below it the puzzle globe sits in a column on the left, as tall as the copy beside it. */
.hero { padding-top: 16px; padding-bottom: 16px; }
.hero__eyebrow { margin-bottom: 20px; }
.hero__row { display: flex; align-items: stretch; gap: clamp(24px, 4vw, 56px); }
.hero__text { position: relative; z-index: 1; justify-content: center; min-width: 0; }
.hero .lede { font-size: 15px; }
/* the wireframe puzzle globe turns slowly behind the copy, at the right */
.hero__orbit { --globe: clamp(200px, 24vw, 340px); flex: 0 0 var(--globe); width: var(--globe); align-self: center; aspect-ratio: 1 / 1; pointer-events: none; } /* main.js sets --globe to the copy's height so both columns match */
.hero__globe { display: block; width: 100%; height: 100%; object-fit: contain; background: transparent; opacity: 0.6; pointer-events: none; }
.reg { font-size: 0.42em; font-weight: 600; letter-spacing: 0; vertical-align: top; position: relative; top: 0.18em; margin-left: 0.08em; }
.drop[hidden] { display: none; }
@media (prefers-reduced-motion: no-preference) { .hero__globe { animation: globe-spin 80s linear infinite; will-change: transform; } }
/* The headline slides in from the left on load; the rest of the hero stays put. */
@keyframes hero-slide { from { opacity: 0; transform: translateX(-48px); } to { opacity: 1; transform: none; } }
@media (prefers-reduced-motion: no-preference) { .hero .h-hero { animation: hero-slide 0.9s cubic-bezier(0.16, 0.9, 0.24, 1) 0.12s both; } }
.motion-off .hero .h-hero { animation: none; }
@media (max-width: 820px) {
  .hero__row { display: block; position: relative; }
  .hero__orbit { position: absolute; z-index: 0; left: -24px; top: 50%; transform: translateY(-50%); width: 200px; height: 200px; }
  .hero__globe { opacity: 0.26; }
}

/* Looping film from the project's GIF, converted to MP4. Plays muted when on screen; the poster
   shows until then, with JavaScript off, or when the visitor prefers reduced motion. */
.project__media .loop { max-width: 760px; }
.loop__video { display: block; width: 100%; height: auto; background: var(--line-soft); }
.project__media .loop:hover .loop__video { opacity: 0.92; }

/* ---------- home: selected work feed ---------- */

.feed-head { padding-top: 20px; padding-bottom: 20px; }

.project {
  display: grid;
  grid-template-columns: 280px minmax(0, 1fr) 280px;
  gap: 32px;
  padding: 44px var(--gutter);
  align-items: start;
  border-bottom: 1px solid var(--line-soft);
}
.project__caption { position: sticky; top: calc(var(--nav-h) + 32px); display: flex; flex-direction: column; gap: 10px; }
.project__caption .muted { max-width: 240px; }
.project__caption .ul { font-size: 13px; margin-top: 6px; }
.project__media { display: flex; justify-content: center; }
.project__media a { display: block; width: 100%; max-width: 560px; }
.project__media img { width: 100%; }
.project__media a:hover img { opacity: 0.92; }

/* Rolling image sequence: a GIF-like loop built from real images.
   Frames stack in a 4:5 box; the script toggles .is-on. Without JS, or with
   reduced motion, only the first frame shows. */
.roll { position: relative; aspect-ratio: 4 / 5; overflow: hidden; background: var(--line-soft); }
.roll img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity 0.25s ease; }
.roll img.is-on { opacity: 1; }
/* Landscape roll (diptychs): same width as the films, no 4:5 crop */
.project__media .roll--wide { max-width: 760px; aspect-ratio: 1612 / 1000; }
.roll--wide img { object-fit: contain; background: var(--ink); }
.roll img:first-child { opacity: 1; }
.roll.is-live img:first-child:not(.is-on) { opacity: 0; }
.project__media .roll:hover img { opacity: 0; }
.project__media .roll:hover img.is-on { opacity: 0.92; }
.roll__count {
  position: absolute; right: 12px; bottom: 12px; z-index: 2;
  padding: 4px 8px; background: rgba(11, 11, 11, 0.72); color: #ffffff;
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.1em;
}

@media (max-width: 820px) {
  .project { grid-template-columns: minmax(0, 1fr); gap: 20px; padding: 56px var(--gutter); }
  .project__caption { position: static; }
  .project__spacer { display: none; }
}

.feed-foot { padding: 44px var(--gutter); display: flex; justify-content: center; border-bottom: 1px solid var(--line-soft); }


/* ---------- home: expertise ---------- */

.pillars { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px; margin-top: 56px; }
.pillars--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 32px; }
@media (max-width: 1000px) { .pillars--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.pillar { display: flex; flex-direction: column; gap: 14px; padding-top: 20px; border-top: 1px solid var(--line); }
.pillar h3 { font-family: var(--font-display); font-weight: 600; font-size: 24px; line-height: 1.1; letter-spacing: -0.02em; text-transform: uppercase; }
.pillar p { color: var(--soft); max-width: 34ch; }
.pillar__num { display: flex; align-items: center; gap: 8px; }
.pillar__ico { width: 16px; height: 16px; stroke: var(--paper); stroke-width: 1; }
.pillar:nth-child(1) .pillar__ico { fill: var(--c-music); } .pillar:nth-child(2) .pillar__ico { fill: var(--c-art); } .pillar:nth-child(3) .pillar__ico { fill: var(--c-tech); } .pillar:nth-child(4) .pillar__ico { fill: var(--c-fashion); }
/* motion control: the footer button adds .motion-off to <html> */
.motion-off *, .motion-off *::before, .motion-off *::after { animation-play-state: paused !important; }
.motion-btn { background: none; border: 0; padding: 0; font: inherit; color: inherit; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1px; }
.pillar .tags { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--muted); line-height: 1.8; }

@media (max-width: 820px) {
  .pillars { grid-template-columns: minmax(0, 1fr); gap: 32px; }
}

/* ---------- home: studio ---------- */

.studio { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: start; }
.studio .h-section { max-width: 14ch; }
.studio__body { display: flex; flex-direction: column; gap: 18px; font-size: 16px; line-height: 1.6; color: var(--soft); max-width: 52ch; }
.studio__body .lead { color: var(--paper); font-size: 18px; }
.studio__body .btn { align-self: flex-start; margin-top: 8px; }

@media (max-width: 820px) {
  .studio { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- home: clients ---------- */

.clients { margin-top: 12px; }
.clients__placeholder {
  border: 1px dashed var(--faint);
  padding: 32px;
  min-height: 120px;
  display: flex; justify-content: center; align-items: center;
  text-align: center;
}
.clients__list {
  display: flex; flex-wrap: wrap; gap: 10px 28px;
  font-family: var(--font-display); font-weight: 500; font-size: 20px; letter-spacing: -0.01em; text-transform: uppercase;
}

/* ---------- home: client ticker ---------- */

.ticker {
  overflow: hidden;
  margin-left: calc(-1 * var(--gutter)); margin-right: calc(-1 * var(--gutter));
  padding: 12px 0;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
  mask-image: linear-gradient(90deg, transparent, #000 7%, #000 93%, transparent);
}
.ticker__track { display: flex; width: max-content; animation: ticker 110s linear infinite; will-change: transform; }
.ticker:hover .ticker__track, .ticker:focus-within .ticker__track { animation-play-state: paused; }
.ticker__set {
  display: flex; align-items: center; flex: none;
  gap: clamp(44px, 6vw, 96px); list-style: none; margin: 0; padding: 0 clamp(22px, 3vw, 48px);
}
.ticker__set li { flex: none; display: flex; align-items: center; height: 80px; }
.ticker__set img { display: block; height: 40px; width: auto; max-width: 220px; object-fit: contain; background: transparent; }
.ticker__set li[data-size="mid"] img { height: 56px; max-width: 200px; }
.ticker__set li[data-size="tall"] img { height: 76px; max-width: 160px; }
@keyframes ticker { to { transform: translateX(-50%); } }
@media (max-width: 720px) {
  .ticker__track { animation-duration: 50s; }
  .ticker__set li { height: 60px; }
  .ticker__set img { height: 30px; max-width: 160px; }
  .ticker__set li[data-size="mid"] img { height: 42px; max-width: 150px; }
  .ticker__set li[data-size="tall"] img { height: 58px; max-width: 120px; }
}
@media (prefers-reduced-motion: reduce) {
  .ticker { -webkit-mask-image: none; mask-image: none; }
  .ticker__track { animation: none; width: auto; }
  .ticker__set { flex-wrap: wrap; row-gap: 20px; }
  .ticker__set[aria-hidden="true"] { display: none; }
}

/* ---------- home: contact ---------- */

.contact .h-hero { max-width: 14ch; }
.contact .btn { align-self: flex-start; }

/* ---------- footer ---------- */

.footer { padding: 40px var(--gutter) 28px; border-top: 1px solid var(--line); }
.footer__grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 32px; align-items: start; }
.footer__brand { font-family: var(--font-display); font-weight: 600; font-size: 14px; letter-spacing: 0.06em; text-transform: uppercase; }
.footer__links { display: flex; gap: 20px; flex-wrap: wrap; font-size: 13px; }
.footer__legal { margin-top: 32px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

@media (max-width: 820px) {
  .footer__grid { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}

/* ---------- work index ---------- */

.index-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }
.index-head .h-section { letter-spacing: -0.035em; }
.index-count { font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.08em; text-transform: uppercase; color: var(--muted); }

.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 40px; font-size: 13px; }
.pill {
  min-height: 44px;
  padding: 10px 16px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  line-height: 1;
  transition: color 0.15s ease, border-color 0.15s ease;
}
.pill:hover { color: var(--paper); }
.pill[aria-pressed="true"] { color: var(--paper); border-color: var(--paper); }

.grid-work { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 40px 24px; margin-top: 40px; }
.card { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card.is-hidden { display: none; }
.card__media { aspect-ratio: 4 / 5; background: var(--line-soft); overflow: hidden; }
.card__media img { width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s ease; }
.card:hover .card__media img { opacity: 0.92; }
.card__tile {
  aspect-ratio: 4 / 5;
  background: var(--tile);
  border: 1px solid var(--line);
  padding: 20px;
  display: flex; flex-direction: column; justify-content: space-between;
}
.card__tile .eyebrow { color: var(--muted); }
.card__tile .ghost { font-family: var(--font-display); font-weight: 600; font-size: 28px; line-height: 1.05; letter-spacing: -0.02em; color: var(--faint); text-transform: uppercase; }
.card__text { display: flex; flex-direction: column; gap: 4px; }
.card__text h3 { font-family: var(--font-display); font-weight: 600; font-size: 18px; line-height: 1.2; letter-spacing: -0.01em; text-transform: uppercase; }
.card:hover .card__text h3 { color: var(--muted); }
.empty { padding: 72px 0; text-align: center; color: var(--muted); display: none; }
.empty.is-visible { display: block; }

@media (max-width: 1000px) { .grid-work { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 620px) { .grid-work { grid-template-columns: minmax(0, 1fr); } }

/* ---------- project page ---------- */

.ph { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; align-items: end; padding-top: 44px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.ph .h-section { letter-spacing: -0.035em; }
.meta { display: grid; grid-template-columns: 96px minmax(0, 1fr); gap: 8px 16px; font-size: 13px; }
.meta dt { font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }

.case { display: grid; grid-template-columns: 320px minmax(0, 1fr); gap: 48px; align-items: start; padding-top: 44px; padding-bottom: 44px; }
.case__text { position: sticky; top: calc(var(--nav-h) + 32px); display: flex; flex-direction: column; gap: 14px; }
.case__text p { font-size: 15px; line-height: 1.55; max-width: 36ch; }
.case__text .muted { font-size: 14px; }
.gallery { display: flex; flex-direction: column; gap: 24px; align-items: center; }
.gallery > * { width: 100%; max-width: 760px; }
.gallery--two { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.gallery--three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 24px; }
.gallery .video {
  aspect-ratio: 16 / 9; background: var(--tile); border: 1px solid var(--line);
  padding: 20px; display: flex; flex-direction: column; justify-content: space-between;
}
.gallery .video .ghost { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; text-transform: uppercase; }
.gallery .video:hover { border-color: var(--paper); color: var(--paper); }
.gallery .embed { margin: 0; display: flex; flex-direction: column; gap: 10px; }
.gallery .embed iframe { display: block; width: 100%; aspect-ratio: 16 / 9; border: 0; background: var(--tile); }
.gallery .embed .film { display: block; width: 100%; height: auto; background: #000; }
.gallery .embed__link, .gallery .loop-link { position: relative; display: block; overflow: hidden; background: #000; }
.gallery .embed__link { aspect-ratio: 16 / 9; }
.gallery .embed__link img { display: block; width: 100%; height: 100%; object-fit: cover; transition: opacity 0.15s ease; }
.gallery .loop-link video { display: block; width: 100%; height: auto; }
.gallery .embed__link:hover img, .gallery .loop-link:hover video { opacity: 0.85; }
.embed__play { position: absolute; left: 16px; bottom: 14px; padding: 8px 12px; background: rgba(0,0,0,.55); color: #fff; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; pointer-events: none; }
.gallery .embed figcaption { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 13px; }

.credits { padding-top: 56px; padding-bottom: 72px; border-top: 1px solid var(--line-soft); }
.credits dl { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 32px; max-width: 760px; margin-top: 24px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.06em; text-transform: uppercase; }
.credits dt { color: var(--muted); }

.pager { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; padding-top: 56px; padding-bottom: 96px; border-top: 1px solid var(--line-soft); }
.pager a { display: flex; flex-direction: column; gap: 8px; }
.pager a:last-child { text-align: right; align-items: flex-end; }
.pager .big { font-family: var(--font-display); font-weight: 600; font-size: 24px; letter-spacing: -0.02em; text-transform: uppercase; }

@media (max-width: 820px) {
  .ph, .case, .gallery--two, .gallery--three { grid-template-columns: minmax(0, 1fr); }
  .case__text { position: static; }
  .credits dl { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- studio page ---------- */

.studio-intro { padding-top: 44px; padding-bottom: 40px; border-bottom: 1px solid var(--line-soft); }
.studio-intro .lede { max-width: 72ch; }
.bio--wide { max-width: 80ch; }
.founder { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; align-items: center; padding-top: 40px; padding-bottom: 48px; border-bottom: 1px solid var(--line-soft); }
.founder__photo { display: flex; flex-direction: column; gap: 14px; }
.founder__photo img { width: 100%; max-width: 440px; }
.founder__text { display: flex; flex-direction: column; gap: 16px; max-width: 56ch; }
.founder__text .bio { margin-top: 8px; }
.founder__text .h-section { letter-spacing: -0.035em; }
.founder__text .lede { font-size: 17px; }
.bio { display: flex; flex-direction: column; gap: 16px; font-size: 15px; line-height: 1.6; color: var(--soft); }

.cols3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 48px; padding-top: 44px; padding-bottom: 44px; border-bottom: 1px solid var(--line-soft); }
.cols3 > div { display: flex; flex-direction: column; gap: 18px; }
.cols3 p { font-size: 15px; line-height: 1.7; color: var(--soft); }
.services li { padding: 12px 0; border-top: 1px solid var(--line); display: flex; gap: 16px; font-family: var(--font-display); font-weight: 500; font-size: 20px; line-height: 1.2; letter-spacing: -0.01em; }
.services li:last-child { border-bottom: 1px solid var(--line); }
.services .n { font-family: var(--font-mono); font-size: 11px; color: var(--muted); padding-top: 6px; }

.contact-page { display: grid; grid-template-columns: minmax(0, 1fr); gap: 64px; align-items: start; padding-top: 44px; padding-bottom: 64px; }
.contact-page__text { display: flex; flex-direction: column; gap: 24px; }
.contact-page__text .email { font-family: var(--font-display); font-weight: 600; font-size: clamp(28px, 3.6vw, 48px); line-height: 1.05; letter-spacing: -0.03em; overflow-wrap: anywhere; }

.form { display: flex; flex-direction: column; gap: 18px; max-width: 520px; margin-top: 8px; }
.form__row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.form label { display: flex; flex-direction: column; gap: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; color: var(--muted); }
.form input, .form textarea {
  font: 14px var(--font-body);
  color: var(--paper);
  background: transparent;
  border: 0;
  border-bottom: 1px solid var(--faint);
  border-radius: 0;
  padding: 10px 0;
  min-height: 44px;
}
.form textarea { resize: vertical; min-height: 96px; }
.form input:focus, .form textarea:focus { outline: 0; border-bottom-color: var(--paper); }
.form button { align-self: flex-start; }
.form__note { font-size: 12px; color: var(--muted); }

@media (max-width: 820px) {
  .founder, .cols3, .contact-page { grid-template-columns: minmax(0, 1fr); gap: 40px; }
  .founder__photo { position: static; }
  .form__row { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- 404 ---------- */

.notfound { min-height: 60vh; display: flex; flex-direction: column; justify-content: center; gap: 20px; padding-top: 96px; padding-bottom: 96px; }
.notfound .btn { align-self: flex-start; }

/* ---------- home: full-bleed variant (film covers the panel, caption layered on top) ----------
   Remove the "project--cover" class from the articles in index.html to go back to the split layout. */

.project--cover {
  display: block;
  position: relative;
  isolation: isolate;
  min-height: clamp(480px, 80vh, 860px);
  padding: 0;
  border-bottom: 0;
  background: var(--line-soft);
  color: #fff;
}
.project--cover + .project--cover { border-top: 1px solid rgba(255, 255, 255, 0.12); }
.project--cover .project__media { position: absolute; inset: 0; display: block; z-index: 0; overflow: hidden; }
.project--cover .project__media .loop,
.project--cover .project__media .roll,
.project--cover .project__media .roll--wide { display: block; width: 100%; height: 100%; max-width: none; aspect-ratio: auto; }
.project--cover .loop__video { width: 100%; height: 100%; object-fit: cover; }
.project--cover .roll--wide img { object-fit: cover; background: none; }
.project--cover .project__media .loop:hover .loop__video { opacity: 1; }
.project--cover .project__media .roll:hover img.is-on { opacity: 1; }
.project--cover .project__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.66) 100%);
  pointer-events: none;
}
.project--cover .project__caption {
  position: absolute; left: 0; right: 0; bottom: 0; top: auto; z-index: 1;
  padding: 0 var(--gutter) clamp(32px, 5vh, 56px);
  gap: 8px;
}
.project--cover .project__caption .eyebrow { color: rgba(255, 255, 255, 0.72); }
.project--cover .project__caption .muted { color: rgba(255, 255, 255, 0.8); max-width: 44ch; }
.project--cover .h-item { font-size: clamp(32px, 4.5vw, 60px); line-height: 0.98; max-width: 16ch; }
.project--cover .project__caption .ul { color: #fff; margin-top: 10px; }
.project--cover .project__spacer { display: none; }
.project--cover .roll__count { position: absolute; top: 24px; right: var(--gutter); left: auto; bottom: auto; color: rgba(255, 255, 255, 0.7); z-index: 1; }
/* a project can carry a still for phones; the loop stays on larger screens */
.loop__still { display: none; }
@media (max-width: 720px) {
  .project--cover .loop__still { display: block; position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: 53% 50%; }
  .project--cover .loop:has(.loop__still) .loop__video { display: none; }
  .project--cover:has(.loop__still) { min-height: 0; height: 125vw; } /* a wider tile so the still's title fits */
  .project--cover.project--wide { min-height: 0; height: 125vw; } /* a loop whose title card needs the width on phones */
  .project--cover.project--wide .loop__video { object-position: 53% 50%; }
  .project--cover { min-height: clamp(440px, 74vh, 680px); }
  .project--cover .project__caption { padding-bottom: 28px; }
}

/* fine film grain over the upscaled footage; hides softness, adds texture */
.project--cover .project__media::before {
  content: "";
  position: absolute; inset: -20%;
  z-index: 1;
  pointer-events: none;
  opacity: 0.16;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='220' height='220'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 0 0.5  0 0 0 1 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
  background-size: 220px 220px;
}
@media (prefers-reduced-motion: no-preference) {
  .project--cover .project__media::before { animation: grain 0.6s steps(3) infinite; }
}
@keyframes grain {
  0% { transform: translate(0, 0); }
  33% { transform: translate(-3%, 2%); }
  66% { transform: translate(2%, -3%); }
  100% { transform: translate(0, 0); }
}
.project--cover .loop__video, .project--cover .roll--wide img { filter: contrast(1.04) saturate(1.05); }

/* alternate caption position: top-left, so the eight panels don't all read the same */
.project--cover.project--top .project__caption { top: 0; bottom: auto; padding-top: clamp(32px, 5vh, 56px); padding-bottom: 0; }
.project--cover.project--top .project__media::after { background: linear-gradient(0deg, rgba(0, 0, 0, 0) 42%, rgba(0, 0, 0, 0.3) 70%, rgba(0, 0, 0, 0.62) 100%); }

/* ---------- header pieces: hover, tilt, click ---------- */

.band { perspective: 1100px; }
.assemble { touch-action: manipulation; transform-style: preserve-3d; transition: transform 0.25s ease-out; }
.assemble.is-done, .assemble.is-done .assemble__piece { animation: none; }
.assemble__piece { transition: transform 0.4s cubic-bezier(0.2, 0.8, 0.2, 1), filter 0.4s ease; pointer-events: none; }
/* cursor: a pixel-art pointing hand everywhere, by choice; text fields keep the I-beam.
   The PNGs are 16×16 art drawn at 2 px per pixel (32 px at 1x, 64 px at 2x); hotspot is the fingertip. */
html, body, body * {
  cursor: url(../img/cursor-hand.png) 14 0, pointer;
  cursor: -webkit-image-set(url(../img/cursor-hand.png) 1x, url(../img/cursor-hand@2x.png) 2x) 14 0, pointer;
  cursor: image-set(url(../img/cursor-hand.png) 1x, url(../img/cursor-hand@2x.png) 2x) 14 0, pointer;
}
.form input, .form textarea { cursor: text; }

/* hovering the mark pulls the four pieces apart; the piece under the cursor comes out furthest */
.assemble.is-hover .assemble__piece,
.assemble[data-hover] .assemble__piece {
  transform: translate(calc(var(--hx) * 1.5), calc(var(--hy) * 1.5)) rotate(var(--hr));
  filter: drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18));
}
.assemble[data-hover] .assemble__piece { filter: saturate(0.6) brightness(0.97) drop-shadow(0 10px 14px rgba(0, 0, 0, 0.18)); }
.assemble[data-hover="music"] .assemble__piece[data-piece="music"],
.assemble[data-hover="fashion"] .assemble__piece[data-piece="fashion"],
.assemble[data-hover="tech"] .assemble__piece[data-piece="tech"],
.assemble[data-hover="art"] .assemble__piece[data-piece="art"] {
  transform: translate(calc(var(--hx) * 2.4), calc(var(--hy) * 2.4)) rotate(calc(var(--hr) * 1.5)) scale(1.08);
  filter: saturate(1.1) drop-shadow(0 20px 24px rgba(0, 0, 0, 0.3));
  z-index: 2;
}
.assemble.is-leaving .assemble__piece { transition-duration: 0.9s; }
.assemble.is-leaving .assemble__piece[data-piece="music"] { transform: translate(-70%, -60%) rotate(-20deg); opacity: 0; }
.assemble.is-leaving .assemble__piece[data-piece="art"] { transform: translate(70%, -56%) rotate(18deg); opacity: 0; }
.assemble.is-leaving .assemble__piece[data-piece="tech"] { transform: translate(-68%, 60%) rotate(16deg); opacity: 0; }
.assemble.is-leaving .assemble__piece[data-piece="fashion"] { transform: translate(68%, 58%) rotate(-18deg); opacity: 0; }
.assemble__keys { position: absolute; inset: 0; display: grid; grid-template-columns: 1fr 1fr; grid-template-rows: 1fr 1fr; }
.assemble__key { opacity: 0; border: 0; background: transparent; padding: 0; margin: 0; font: inherit; color: inherit; }
.assemble__key:focus-visible { opacity: 1; outline: 2px solid var(--bone-ink); outline-offset: -2px; border-radius: 6px; font-family: var(--font-mono); font-size: 11px; letter-spacing: 0.1em; text-transform: uppercase; }
.assemble__label {
  position: absolute; left: var(--gutter); top: 10px; z-index: 2; min-height: 22px; margin: 0;
  display: flex; align-items: center; gap: 8px;
  font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.1em; text-transform: uppercase;
  opacity: 0; transform: translateY(4px); transition: opacity 0.25s ease, transform 0.25s ease;
}
.assemble__label.is-on { opacity: 1; transform: none; }
.assemble__dot { width: 10px; height: 10px; border-radius: 50%; background: var(--dot, #999); box-shadow: inset 0 0 0 1px rgba(0, 0, 0, 0.25); }

/* ---------- discipline chips on project panels ---------- */

.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 2px 0 0; padding: 0; }
.chip {
  display: inline-flex; align-items: center; gap: 7px;
  padding: 5px 10px 5px 8px;
  border: 1px solid rgba(255, 255, 255, 0.28); border-radius: 999px;
  background: rgba(0, 0, 0, 0.28); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  font-family: var(--font-mono); font-size: 10px; letter-spacing: 0.12em; text-transform: uppercase; color: #fff;
  transition: background 0.3s ease, border-color 0.3s ease, transform 0.3s ease;
}
.chip__ico { width: 15px; height: 15px; fill: var(--c, #fff); filter: drop-shadow(0 1px 1px rgba(0, 0, 0, 0.35)); }
.chip[data-piece="music"] { --c: var(--c-music); }
.chip[data-piece="fashion"] { --c: var(--c-fashion); }
.chip[data-piece="tech"] { --c: var(--c-tech); }
.chip[data-piece="art"] { --c: var(--c-art); }
.chip.is-flash { background: var(--c); border-color: var(--c); color: #0b0b0b; transform: scale(1.06); }
.chip.is-flash .chip__ico { fill: #0b0b0b; filter: none; }
.project.is-target { outline: 3px solid var(--c-target, #fff); outline-offset: -3px; }

@media (prefers-reduced-motion: reduce) {
  .assemble, .assemble__piece, .chip { transition: none; }
}

.press-list { line-height: 1.8; }
.press-list .muted { white-space: normal; }

/* All Work jigsaw: pieces are absolutely placed by jigsaw.js; the clip lives on .piece__clip so the lift shadow survives it */
.jigsaw__hint { margin-top: 12px; font-size: 13px; }
.jigsaw { position: relative; margin-top: 32px; aspect-ratio: 6 / 4; }
.piece { position: absolute; display: block; transition: transform 0.25s ease, filter 0.25s ease; will-change: transform; z-index: 1; }
.piece__clip { position: absolute; inset: 0; overflow: hidden; background: var(--line-soft); }
.piece__clip img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: var(--focus, 50% 50%); transform: translateY(var(--shift, 0)) scale(var(--zoom, 1)); transition: transform 0.4s ease; }
.piece__cap { position: absolute; left: 16.67%; right: 16.67%; bottom: 16.67%; margin: 0 6% 6%; padding: 10px 12px 11px; color: #fff; display: flex; flex-direction: column; gap: 3px; background: rgba(0,0,0,0.72); backdrop-filter: blur(4px); opacity: 0; transition: opacity 0.2s ease; pointer-events: none; z-index: 2; }
.piece__cap .eyebrow { color: rgba(255,255,255,0.75); }
.piece__cap strong { font-family: var(--font-display); font-weight: 600; font-size: clamp(12px, 1.1vw, 16px); line-height: 1.15; letter-spacing: -0.01em; text-transform: uppercase; }
.piece__desc { font-size: 11px; line-height: 1.35; color: rgba(255,255,255,0.8); }
.piece:hover, .piece:focus-visible { z-index: 20; transform: translateY(-10px) scale(1.07); filter: drop-shadow(0 24px 28px rgba(0,0,0,0.35)); outline: none; }
.piece:hover .piece__cap, .piece:focus-visible .piece__cap { opacity: 1; }
.piece:hover .piece__clip img { transform: translateY(var(--shift, 0)) scale(calc(var(--zoom, 1) * 1.04)); }
.expand { position: fixed; inset: 0; z-index: 50; background: rgba(0,0,0,0.78); display: flex; align-items: center; justify-content: center; padding: 24px; opacity: 0; transition: opacity 0.2s ease; }
.expand.is-open { opacity: 1; }
.expand[hidden] { display: none; }
.expand__panel { position: relative; display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(260px, 0.8fr); gap: 32px; width: min(1100px, 100%); max-height: 90vh; background: var(--ink); color: var(--paper); padding: 32px; box-sizing: border-box; transform: scale(0.96); transition: transform 0.2s ease; }
.expand.is-open .expand__panel { transform: none; }
.expand__img { width: 100%; max-height: calc(90vh - 64px); object-fit: contain; background: var(--line-soft); }
.expand__text { display: flex; flex-direction: column; gap: 12px; align-self: center; }
.expand__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(24px, 3vw, 40px); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.expand__link { align-self: flex-start; margin-top: 8px; }
.expand__close { position: absolute; top: 10px; right: 14px; background: none; border: 0; font-size: 28px; line-height: 1; color: inherit; }
body.is-expanded { overflow: hidden; }
@media (max-width: 820px) { .expand__panel { grid-template-columns: minmax(0, 1fr); padding: 20px; overflow: auto; } .expand__img { max-height: 50vh; } .piece__cap { padding: 8px 10px 9px; } .piece__desc { display: none; } }

/* All Work timeline: text | dashed spine | falling piece */
.drops { list-style: none; margin: 40px 0 0; padding: 0; position: relative; }
.drops::before { content: ""; position: absolute; left: 50%; top: 0; bottom: 0; border-left: 2px dashed var(--paper); opacity: 0.55; transform: translateX(-1px); }
.drop { display: grid; grid-template-columns: minmax(0, 1fr) 80px minmax(0, 1fr); align-items: center; gap: 0 24px; min-height: 380px; }
.drop__text { justify-self: end; text-align: right; max-width: 40ch; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; opacity: 0; transform: translateX(-24px); transition: opacity 0.6s ease 0.25s, transform 0.6s ease 0.25s; }
.drop__title { font-family: var(--font-display); font-weight: 600; font-size: clamp(22px, 2.6vw, 36px); line-height: 1; letter-spacing: -0.03em; text-transform: uppercase; }
.drop__desc { max-width: 36ch; }
.drop__spine { position: relative; height: 100%; min-height: 380px; }
.drop__year { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%) rotate(90deg); transform-origin: center; background: var(--ink); padding: 8px 10px; font-family: var(--font-mono); font-size: 12px; letter-spacing: 0.12em; text-transform: uppercase; white-space: nowrap; }
.piece--drop { position: relative; width: min(100%, 440px); aspect-ratio: 1 / 1; justify-self: start; margin: 0; opacity: 0; transform: translateY(-120px) rotate(-7deg); transition: transform 0.8s cubic-bezier(0.2, 0.9, 0.2, 1), opacity 0.5s ease, filter 0.25s ease; }
.piece--drop .piece__clip { background: var(--line-soft); }
.piece__depth { position: absolute; inset: 0; background: var(--slot, #C9C6BF); transform: translate(12px, 14px); }
.drops { --slot: #C9C6BF; }
.piece--drop .piece__cap { display: none; }
.drop.is-placed .piece--drop { opacity: 1; transform: none; }
.drop.is-placed .drop__text { opacity: 1; transform: none; }
.piece--drop:hover, .piece--drop:focus-visible { transform: translateY(-10px) scale(1.04); filter: drop-shadow(0 24px 28px rgba(0,0,0,0.3)); }
.placed { margin-top: 96px; display: flex; flex-direction: column; gap: 8px; }
.placed + .jigsaw { margin-top: 32px; }
@media (max-width: 820px) {
  .drops::before { left: 19px; }
  .drop { grid-template-columns: 40px minmax(0, 1fr); grid-template-areas: "spine piece" "spine text"; gap: 16px 20px; min-height: 0; padding: 32px 0; }
  .drop__spine { grid-area: spine; min-height: 0; }
  .drop__year { left: 50%; top: 24px; transform: translate(-50%, 0) rotate(90deg); }
  .piece--drop { grid-area: piece; width: min(100%, 360px); }
  .drop__text { grid-area: text; justify-self: start; text-align: left; align-items: flex-start; transform: translateX(24px); }
}
