/* Greycard: the grey card and the light around it. Greycard White ground, Ink type, Card Grey
   only for the square, and one device: a spectrum line that runs behind the square (the mark)
   and slides out from behind frames. Layout: header · opener · scope feature + contact sheet ·
   ink footer. One deliberate light theme. */

:root {
  color-scheme: light;
  --bg: #e1e1e1;        /* Greycard White: every white in the identity */
  --ink: #0e0f10;
  --mute: #55595d;
  --line: #c6c7c8;
  --well: #d4d5d5;      /* image wells while loading */
  --card: #707170;      /* the grey card: the square only */
  --card-ink: #e1e1e1;
  --film: #0d0e0f;
  --spectrum: linear-gradient(90deg, #e2362c 0%, #f28a24 16.6%, #f5d23a 33.3%, #46b85a 50%, #22b0d6 66.6%, #2c5fd4 83.3%, #7a3cc6 100%);
  --pad: max(16px, 2.2vw);
  --gap: clamp(14px, 1.8vw, 28px);
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; overflow-x: clip; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--sans);
  font-stretch: 100%;
  font-variant-numeric: tabular-nums;
  -webkit-font-smoothing: antialiased;
}
body::before { content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px); z-index: 45; background: var(--bg); }
img, video { display: block; width: 100%; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }
::selection { background: var(--ink); color: var(--bg); }

.label { font-size: 12px; line-height: 1.4; letter-spacing: .01em; color: var(--mute); }
.wide { font-stretch: 125%; }
.g12 { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); }
main { padding-inline: var(--pad); }

/* ---------- header: the mark on the left, the menu on the right ---------- */
.hd {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  padding-block: 16px; padding-inline: var(--pad);
  background: var(--bg); border-bottom: 1px solid transparent; transition: border-color .3s;
}
.hd.is-scrolled { border-bottom-color: var(--line); }
.mark { display: block; flex: none; overflow: visible; }
.brand { display: inline-flex; align-items: center; gap: 4px; }
.brand__name { font-stretch: 125%; font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.nav { display: flex; gap: clamp(18px, 2.4vw, 36px); }
.nav a { color: var(--mute); transition: color .2s; }
.nav a:hover, .nav a.is-on { color: var(--ink); }
.nav a.is-on { text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }

/* ---------- the line: slides out from behind a frame (hover), one module thick ---------- */
.lit { position: relative; --arm: calc(var(--gap) - 4px); --t: 6px; }
.lit::before, .lit::after {
  content: ""; position: absolute; top: 50%; z-index: 0; pointer-events: none;
  width: var(--arm); height: var(--t); background: var(--spectrum); background-size: 200% 100%;
  transform: translateY(-50%) scaleX(0); transition: transform .5s var(--ease);
}
.lit::before { right: 100%; transform-origin: right center; background-position: 0 0; }
.lit::after { left: 100%; transform-origin: left center; background-position: 100% 0; }
.lit > * { position: relative; z-index: 1; }
.lit--edge { --arm: var(--pad); --t: 8px; }
.feat .lit { --arm: var(--pad); --t: 8px; }
@media (hover: hover) and (pointer: fine) {
  .t:hover .lit::before, .t:hover .lit::after,
  .lit--edge:hover::before, .lit--edge:hover::after,
  .next:hover .lit::before, .next:hover .lit::after { transform: translateY(-50%) scaleX(1); }
}

/* ---------- lead (page openers) ---------- */
.lead { padding-block: clamp(48px, 9vw, 140px) clamp(36px, 5vw, 80px); align-items: end; }
.lead .display { grid-column: 1 / span 9; }
.lead__meta { grid-column: 10 / span 3; margin: 0; }
.display {
  margin: 0; font-stretch: 125%; font-weight: 500; letter-spacing: -.025em; line-height: 1.04;
  font-size: clamp(28px, 4.4vw, 68px); text-wrap: balance;
}
.display .soft { color: var(--mute); }
.facts { display: grid; grid-template-columns: auto 1fr; gap: 0 16px; margin: 0; }
.facts > div { display: contents; }
.facts dt, .facts dd { margin: 0; padding: 7px 0; border-top: 1px solid var(--line); }
.facts dd { text-align: right; }

/* ---------- work: scope feature + contact sheet ---------- */
.feat { display: block; margin-bottom: clamp(56px, 7vw, 110px); }
.feat .t__frame { aspect-ratio: 2.39 / 1; }
.sheet { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: clamp(40px, 4.4vw, 72px) var(--gap); }
.sheet--two { grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: clamp(40px, 4.4vw, 72px); }
.sheet--two .t__title { font-size: clamp(18px, 1.5vw, 22px); }

/* the reel opens Home, playing on its own */
.reel-wrap { margin-bottom: clamp(56px, 7vw, 110px); }

.t { display: block; min-width: 0; }
.t__frame { position: relative; overflow: hidden; aspect-ratio: 16 / 9; background: var(--well); }
.t__frame img, .t__frame video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.t__frame img { transition: transform 1.4s var(--ease), filter .6s var(--ease); }
.t__frame video { opacity: 0; transition: opacity .45s var(--ease); }
.t__frame.is-playing video { opacity: 1; }
.t:hover .t__frame img { transform: scale(1.02); }
/* playhead: the spectrum fills from the left as the loop plays */
.t__bar { position: absolute; left: 0; bottom: 0; height: 3px; width: 0; background: var(--spectrum); background-size: 100vw 100%; opacity: 0; transition: opacity .3s; z-index: 2; }
.t__frame.is-playing .t__bar { opacity: 1; }

.t__cap { padding-top: 12px; }
.t__title { font-stretch: 112%; font-weight: 500; font-size: 17px; letter-spacing: -.01em; }
.feat .t__title { font-size: clamp(19px, 1.7vw, 26px); }

/* ---------- case page ---------- */
.case-head { padding-block: clamp(32px, 5vw, 72px) clamp(28px, 4vw, 52px); }
.back { display: inline-block; margin-bottom: clamp(28px, 4vw, 56px); color: var(--mute); transition: color .2s; }
.back:hover { color: var(--ink); }
.case-title {
  margin: 8px 0 0; font-stretch: 125%; font-weight: 500; letter-spacing: -.035em; line-height: .98;
  font-size: clamp(40px, 7vw, 112px); text-wrap: balance;
}
.slate { display: grid; grid-template-columns: repeat(var(--n, 5), minmax(0, 1fr)); gap: 0 var(--gap); margin: clamp(28px, 4vw, 48px) 0 0; border-top: 1px solid var(--ink); }
.slate > div { padding-top: 10px; min-width: 0; }
.slate dt { margin: 0; }
.slate dd { margin: 2px 0 0; }

.hero { position: relative; overflow: hidden; aspect-ratio: 16 / 9; max-width: 100%; background: var(--film); }
.hero > img, .hero > video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.play {
  position: absolute; left: 16px; bottom: 16px; z-index: 2;
  display: inline-flex; align-items: center; gap: 9px; padding: 10px 16px 10px 13px;
  background: var(--bg); color: var(--ink);
  font-size: 13px; font-weight: 500; transition: transform .2s var(--ease);
}
.play::before { content: ""; width: 0; height: 0; border-left: 8px solid currentColor; border-top: 5px solid transparent; border-bottom: 5px solid transparent; }
.play:hover { transform: scale(1.04); }
.hero.is-film .play { display: none; }

.copy { padding-block: clamp(44px, 6vw, 96px); }
.copy p { grid-column: 4 / span 6; margin: 0; font-size: clamp(18px, 1.55vw, 23px); line-height: 1.45; max-width: 40em; }

.gal { row-gap: var(--gap); align-items: start; padding-top: var(--gap); }
.gal figure { margin: 0; min-width: 0; }
.gal figcaption { padding-top: 10px; }
.g--full { grid-column: 1 / -1; }
.g--l { grid-column: 1 / span 6; }
.g--r { grid-column: 7 / span 6; }
.g--mid { grid-column: 3 / span 8; }
.gal video { aspect-ratio: 16 / 9; object-fit: cover; background: var(--film); }

/* project facts: last, after the work */
.credits { padding-top: clamp(72px, 10vw, 160px); }
.credits h2 { grid-column: 1 / span 3; margin: 0; font-weight: 400; }
.credits__body { grid-column: 4 / span 6; min-width: 0; }
.credits__intro { margin: 0 0 clamp(28px, 3vw, 44px); font-size: clamp(17px, 1.4vw, 21px); line-height: 1.45; max-width: 40em; }
.credits dl { margin: 0; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.credits dt, .credits dd { margin: 0; padding: 9px 0; border-top: 1px solid var(--line); }
.credits__note { margin: 18px 0 0; max-width: 60ch; }

.next { display: grid; margin-top: clamp(80px, 10vw, 160px); padding-top: 16px; border-top: 1px solid var(--ink); align-items: end; }
.next__txt { grid-column: 1 / span 5; }
.next__title { display: block; margin: 10px 0 4px; font-stretch: 125%; font-weight: 500; letter-spacing: -.025em; line-height: 1.02; font-size: clamp(28px, 3.4vw, 54px); transition: color .3s; }
.next__img { grid-column: 7 / span 6; }
.next__frame { aspect-ratio: 16 / 9; overflow: hidden; background: var(--well); }
.next__img img { width: 100%; height: 100%; object-fit: cover; transition: transform 1.4s var(--ease); }
.next:hover .next__img img { transform: scale(1.03); }
.next:hover .next__title { color: var(--mute); }

/* ---------- R&D ---------- */
/* Collage: mixed sizes on the 12-column grid, edges staggered on purpose; the wall study sits as one tight block. */
.lab { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: var(--gap); align-items: end; grid-auto-flow: dense; }
.lab__item { margin: 0; min-width: 0; }
.lab__media { background: var(--well); overflow: hidden; }
.lab__media img, .lab__media video { display: block; width: 100%; height: auto; pointer-events: none; user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; }
.lab__item--hero  { grid-column: 1 / 9; }
.lab__item--side  { grid-column: 9 / 13; }
.lab__item--group { grid-column: 1 / 13; margin-block: clamp(32px, 5vw, 88px); }
.lab__item--small { grid-column: 1 / 4; align-self: start; }
.lab__item--large { grid-column: 4 / 10; }
.lab__item--end   { grid-column: 10 / 13; }
.lab__group { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 4px; }

/* ---------- studio ---------- */
.cols { padding-top: clamp(56px, 8vw, 120px); align-items: start; }
.cols > div { grid-column: span 3; min-width: 0; }
.cols ul { list-style: none; margin: 10px 0 0; padding: 0; }
.cols li { padding: 7px 0; border-top: 1px solid var(--line); overflow-wrap: anywhere; }
.cols a:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- home: what we do, four lines on the rule ---------- */
.strip { margin-bottom: clamp(48px, 6vw, 96px); }
.strip__item { grid-column: span 3; min-width: 0; padding-top: 10px; border-top: 1px solid var(--ink); transition: color .2s; }
.strip__name { display: block; margin-top: 6px; font-stretch: 112%; font-weight: 500; font-size: clamp(17px, 1.4vw, 21px); letter-spacing: -.01em; }
.strip__name span { display: inline-block; color: var(--mute); transition: transform .3s var(--ease); }
.strip__item:hover .strip__name span { transform: translateX(4px); color: var(--ink); }
.facts dd a:hover { text-decoration: underline; text-underline-offset: 3px; }

/* ---------- services: one block per line of work ---------- */
.svc { padding-block: clamp(40px, 5vw, 80px); border-top: 1px solid var(--ink); align-items: start; scroll-margin-top: 72px; }
.svc__head { grid-column: 1 / span 4; min-width: 0; }
.svc__name { margin: 8px 0 0; font-stretch: 125%; font-weight: 500; letter-spacing: -.025em; line-height: 1.04; font-size: clamp(26px, 3.2vw, 48px); }
.svc__body { grid-column: 5 / span 8; min-width: 0; }
.svc__line { margin: 0 0 clamp(20px, 2.4vw, 32px); font-size: clamp(18px, 1.5vw, 22px); line-height: 1.45; max-width: 40em; }
.svc__points { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: var(--gap); }
.svc__points li { padding: 8px 0; border-top: 1px solid var(--line); }
.svc__steps { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: clamp(20px, 2.4vw, 32px) var(--gap); margin-top: clamp(32px, 4vw, 56px); }
.step { min-width: 0; padding-top: 10px; border-top: 1px solid var(--ink); }
.step__title { margin: 8px 0 8px; font-stretch: 112%; font-weight: 500; font-size: clamp(17px, 1.4vw, 20px); letter-spacing: -.01em; line-height: 1.2; }
.step p { margin: 0; color: var(--mute); max-width: 32em; }
.svc__cta { margin: clamp(24px, 3vw, 40px) 0 0; }
.svc__cta a { font-stretch: 112%; font-weight: 500; text-decoration: underline; text-underline-offset: 5px; text-decoration-thickness: 1px; }
.svc__cta a:hover { color: var(--mute); }
@media (max-width: 1000px) {
  .strip__item { grid-column: span 6; }
  .svc__head, .svc__body { grid-column: 1 / -1; }
  .svc__body { margin-top: 16px; }
}
@media (max-width: 640px) {
  .strip__item { grid-column: 1 / -1; }
  .svc__points, .svc__steps { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- footer: ink band (Card Grey stays on the square only) ---------- */
.ft {
  margin-top: clamp(100px, 12vw, 200px); background: var(--ink); color: var(--card-ink);
  padding-block: clamp(56px, 7vw, 110px) calc(24px + env(safe-area-inset-bottom, 0px));
  padding-inline: var(--pad);
}
.ft .label { color: #9a9ea3; }
.ft__brand { display: inline-flex; align-items: center; gap: 10px; }
.ft__mail {
  display: inline-block; margin: 10px 0 clamp(56px, 8vw, 120px);
  font-stretch: 125%; font-weight: 500; letter-spacing: -.025em; line-height: 1.04;
  font-size: clamp(26px, 4.6vw, 72px); overflow-wrap: anywhere; user-select: all;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .14em; text-decoration-color: rgba(225,225,225,.35);
  transition: text-decoration-color .3s;
}
.ft__mail:hover { text-decoration-color: var(--card-ink); }
.ft__row { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px 24px; padding-top: 12px; border-top: 1px solid rgba(225,225,225,.2); font-size: 13px; }
.ft__row nav { display: flex; flex-wrap: wrap; gap: 18px; }
.ft__row a:hover, .ft__row button:hover { text-decoration: underline; text-underline-offset: 4px; }

/* ---------- reveal: visible at rest; below-the-fold blocks get .is-pre from JS ---------- */
.rv { transition: opacity .9s var(--ease), transform .9s var(--ease); }
.rv.is-pre { opacity: 0; transform: translateY(16px); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .rv, .rv.is-pre { opacity: 1; transform: none; transition: none; }
  .t__frame img, .next__img img, .lit::before, .lit::after { transition: none; }
}

/* ---------- tablet / phone ---------- */
@media (max-width: 1000px) {
  .sheet { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .lead .display, .lead__meta { grid-column: 1 / -1; }
  .lead__meta { max-width: 420px; margin-top: 12px; }
  .copy p, .credits__body, .credits h2 { grid-column: 1 / -1; }
  .cols > div { grid-column: span 6; }
}
@media (max-width: 640px) {
  .nav { gap: 16px; }
  .sheet, .sheet--two { grid-template-columns: minmax(0, 1fr); }
  .feat .t__frame { aspect-ratio: 16 / 9; }
  .slate { grid-template-columns: repeat(2, minmax(0, 1fr)); row-gap: 14px; }
  .g--l, .g--r, .g--mid { grid-column: 1 / -1; }
  .next__txt, .next__img { grid-column: 1 / -1; }
  .next__img { order: -1; }
  .cols > div { grid-column: 1 / -1; }
  .lab { grid-template-columns: repeat(6, minmax(0, 1fr)); }
  .lab__item--hero, .lab__item--group, .lab__item--large { grid-column: 1 / -1; }
  .lab__item--side  { grid-column: 3 / 7; }
  .lab__item--small { grid-column: 1 / 4; align-self: end; }
  .lab__item--end   { grid-column: 4 / 7; }
  .lab__group { gap: 3px; }
}
