/* Balloon Media — styles taken from the Figma "High Fidelity Wireframes" page.
   Type: Outfit (Light 300 / Regular 400 / Medium 500). */

:root {
  --black: #000;
  --white: #fff;
  --grey: #97979d;
  --grey-dark: #6b6b70;
  --footer: #232323;
  --pink: #ff1cbf;
  --purple: #5a00e9;
  --cyan: #4acceb;
  --neon: #4df0ff;            /* menu links: a neon cyan that stands off the pink/violet glow */
  --neon-soft: rgb(77 240 255 / .55);   /* case-study titles at rest: the same cyan, pulled back */
  --gutter: 150px;
  --max: 1140px;
  --nav-h: 90px;
  --ease: cubic-bezier(.2, .7, .2, 1);
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --dur-hover: 200ms;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; scrollbar-gutter: stable; background: var(--black); }
body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: "Outfit", system-ui, sans-serif;
  font-weight: 400;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img, svg, video { display: block; max-width: 100%; }
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(--pink); outline-offset: 4px; }
a, button { -webkit-tap-highlight-color: transparent; }

.wrap { width: min(var(--max), 100% - 2 * var(--gutter)); margin-inline: auto; }
.eyebrow {
  margin: 0;
  font-size: 18px; font-weight: 500; line-height: 1.3;
  letter-spacing: .02em; text-transform: uppercase; color: var(--pink);
}
.visually-hidden { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* ---------- Nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  height: var(--nav-h);
  display: flex; align-items: center; justify-content: space-between;
  padding: 0 58px 0 65px;
  background: linear-gradient(to bottom, rgba(0,0,0,.85), rgba(0,0,0,0));
}
/* the solid backing fades in on its own layer: a gradient can't transition to a colour */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(0,0,0,.92);
  -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px);
  opacity: 0; transition: opacity 300ms ease;
}
.nav.is-solid::before, .cs-page .nav::before { opacity: 1; }
.menu-open .nav::before { opacity: 0; }
.nav__logo img { width: 72px; height: 48px; }
.burger { position: relative; width: 44px; height: 44px; z-index: 60; transition: transform 160ms var(--ease-out); }
.burger span {
  position: absolute; left: 2px; width: 40px; height: 3px; background: var(--white);
  transition: transform 300ms var(--ease-in-out), opacity 150ms ease;
}
.burger span:nth-child(1) { top: 8px; }
.burger span:nth-child(2) { top: 21px; }
.burger span:nth-child(3) { top: 34px; }
.menu-open .burger span:nth-child(1) { transform: translateY(13px) rotate(45deg); }
.menu-open .burger span:nth-child(2) { opacity: 0; }
.menu-open .burger span:nth-child(3) { transform: translateY(-13px) rotate(-45deg); }

.menu {
  position: fixed; inset: 0; z-index: 40;
  display: flex; flex-direction: column; justify-content: center; justify-content: safe center;
  padding: var(--nav-h) var(--gutter);
  background: var(--black);
  opacity: 0; visibility: hidden;
  transition: opacity 250ms var(--ease), visibility 0s 250ms;
  overflow: hidden auto; overscroll-behavior: contain;
}
.menu-open .menu { opacity: 1; visibility: visible; transition: opacity .4s var(--ease); }
.menu ul { list-style: none; margin: 0; padding: 0; position: relative; z-index: 1; }
.menu a {
  display: inline-block;
  font-size: clamp(48px, 8vw, 110px); font-weight: 500; line-height: 1.35;
  color: var(--neon);
  transform: translateY(20px); opacity: 0;
  /* closing: links hold still while the overlay fades, then reset out of sight */
  transition: color var(--dur-hover) ease, transform 0s 250ms, opacity 0s 250ms;
}
.menu-open .menu a { transform: none; opacity: 1; transition: color var(--dur-hover) ease, transform .5s var(--ease), opacity .5s var(--ease); }
.menu-open .menu li:nth-child(2) a { transition-delay: 0s, .05s, .05s; }
.menu-open .menu li:nth-child(3) a { transition-delay: 0s, .1s, .1s; }
.menu-open .menu li:nth-child(4) a { transition-delay: 0s, .15s, .15s; }
.menu a:hover, .menu a:focus-visible { color: var(--white); }
.menu .glow { opacity: .8; }

/* ---------- Animated gradient glow (driven by assets/js/glow.js) ---------- */
.glow { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
/* static fallback when JS is off; glow.js lays its moving canvas over it and the two crossfade */
.glow::before {
  content: ""; position: absolute; inset: 0;
  background:
    radial-gradient(40% 45% at 30% 64%, rgba(255,28,191,.85), rgba(255,28,191,0) 70%),
    radial-gradient(45% 45% at 66% 74%, rgba(90,0,233,.85), rgba(90,0,233,0) 70%),
    radial-gradient(22% 25% at 20% 44%, rgba(255,201,231,.35), rgba(255,201,231,0) 70%);
  transition: opacity 1s ease;
}
.glow.is-live::before { opacity: 0; }
/* over a video, the glow tints the footage instead of sitting behind it */
.glow--over { mix-blend-mode: screen; }
.glow canvas { position: absolute; inset: 0; width: 100%; height: 100%; transition: opacity 1s ease; }
@starting-style { .glow canvas { opacity: 0; } }
/* fine grain stops the dark gradients from banding */
.glow::after {
  content: ""; position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Opening scene: a pinned stage the visitor scrolls through ----------
   main.js turns scroll position into the timeline: title out, intro line in, then the film fading in and
   rising into place with the four statements passing over it. Everything here
   is the resting state; without JS the layers simply stack (see the html:not(.js) rules). */
.scene { position: relative; }
.js .scene { height: 260vh; }                       /* scroll length of the timeline, see main.js */
.scene__stage {
  position: sticky; top: 0; height: 100vh; height: 100svh;
  display: grid; place-items: center; text-align: center;
  overflow: hidden; isolation: isolate; background: #07030f;
}
.scene__glow { z-index: 0; }
.scene__title, .scene__line, .scene__statements { grid-area: 1 / 1; margin: 0; padding: 0 24px; }
.scene__title { z-index: 1; font-size: clamp(56px, 6.7vw, 96px); font-weight: 500; line-height: 1.1;
  animation: hero-in .9s var(--ease) 150ms backwards; }   /* backwards: once in, main.js owns it */
.scene__line { z-index: 1; max-width: 808px; font-size: 40px; font-weight: 500; line-height: 1.2; }
.scene__frame { position: absolute; inset: 0; z-index: 2; overflow: hidden; background: #000;
  /* soft top edge while the film rises in; main.js shrinks --edge to 0 as it arrives */
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 var(--edge, 0%));
          mask-image: linear-gradient(to bottom, transparent, #000 var(--edge, 0%)); }
.scene__frame video { width: 100%; height: 100%; object-fit: cover; }
.scene__frame::after { content: ""; position: absolute; inset: 0; background: rgba(0,0,0,.42); }
.scene__statements { z-index: 3; list-style: none; display: grid; place-items: center; }
.scene__statements li { grid-area: 1 / 1; max-width: 760px; font-size: 40px; font-weight: 500; line-height: 1.2;
  text-shadow: 0 2px 24px rgba(0,0,0,.35); }
/* layers main.js brings in start hidden; it writes their opacity and transform as you scroll */
.js .scene__line, .js .scene__frame, .js .scene__one { opacity: 0; }
.js .scene__line, .js .scene__statements li, .js .scene__title { will-change: transform, opacity; }
/* no JS: a plain stacked page instead of a pinned stage */
html:not(.js) .scene__stage { position: relative; height: auto; display: flex; flex-direction: column; gap: 20vh;
  padding: 30vh 24px 20vh; }
html:not(.js) .scene__frame { position: relative; inset: auto; width: min(1140px, 100%); aspect-ratio: 16 / 9;
  border-radius: 8px; order: 3; }
html:not(.js) .scene__statements { order: 4; gap: 12vh; }
html:not(.js) .scene__statements li { grid-area: auto; }

@keyframes hero-in { from { opacity: 0; transform: translateY(16px); filter: blur(4px); } }
@keyframes fade-in { from { opacity: 0; } }

/* the scroll cue's circle draws itself in, then the word appears inside it */
.scroll-cue {
  position: absolute; left: 50%; bottom: 7vh; translate: -50% 0; z-index: 4;
  width: 48px; height: 48px; display: grid; place-items: center;
  font-size: 11px; font-weight: 300;
  animation: bob 2.4s ease-in-out 1.9s infinite;
}
.scroll-cue svg { position: absolute; inset: 0; width: 100%; height: 100%; rotate: -90deg; }
.scroll-cue circle { fill: none; stroke: var(--pink); stroke-width: 1.5;
  stroke-dasharray: 141.4; stroke-dashoffset: 141.4; animation: cue-draw 1s var(--ease-out) 700ms forwards; }
.scroll-cue span { animation: fade-in 500ms ease 1.4s both; }
@keyframes cue-draw { to { stroke-dashoffset: 0; } }
@keyframes bob { 50% { transform: translateY(6px); } }

/* every background film (case-study frames) fades up once frames arrive */
video[data-bg] { opacity: 0; transition: opacity 1s ease; }
video[data-bg].is-playing { opacity: 1; }

/* ---------- Case study list ---------- */
/* clips sideways only: glows spill up and down into neighbouring sections instead of stopping on a line */
.section { position: relative; padding: 120px 0; overflow-x: clip; }
/* keeps section content painting above the side glows once a reveal settles */
.section > .wrap { position: relative; }
.cases__list { list-style: none; margin: 40px 0 0; padding: 0; }
.cases__list a {
  display: inline-flex; align-items: center; gap: 24px;
  font-size: clamp(40px, 5.6vw, 80px); font-weight: 500; line-height: 1.35;
  color: var(--neon-soft); transition: color var(--dur-hover) ease;   /* soft cyan at rest, white on hover */
}
.cases__list a::after {
  content: "→"; font-size: .5em; color: var(--pink);
  opacity: 0; transform: translateX(-12px); transition: opacity var(--dur-hover) var(--ease), transform var(--dur-hover) var(--ease);
}
.cases__list a:hover, .cases__list a:focus-visible { color: var(--white); }
.cases__list a:focus-visible::after { opacity: 1; transform: none; }
/* a radial gradient drawn to match a 520px disc under blur(110px), without the per-frame blur cost */
.side-glow { position: absolute; width: 1120px; height: 1120px; opacity: .35; pointer-events: none; will-change: transform; animation: float 29s ease-in-out infinite; }
.side-glow--r { animation-duration: 37s; animation-delay: -11s; }
@keyframes float {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(90px, 60px) scale(1.12); }
  66% { transform: translate(30px, -70px) scale(.92); }
}
.side-glow--l { left: -620px; top: -300px;
  background: radial-gradient(closest-side, rgba(255,28,191,.94), rgba(255,28,191,.77) 27%, rgba(255,28,191,.61) 37%, rgba(255,28,191,.41) 46%, rgba(255,28,191,.25) 56%, rgba(255,28,191,.13) 66%, rgba(255,28,191,.02) 86%, rgba(255,28,191,0)); }
.side-glow--r { right: -620px; top: calc(40% - 300px);
  background: radial-gradient(closest-side, rgba(74,108,255,.94), rgba(74,108,255,.77) 27%, rgba(74,108,255,.61) 37%, rgba(74,108,255,.41) 46%, rgba(74,108,255,.25) 56%, rgba(74,108,255,.13) 66%, rgba(74,108,255,.02) 86%, rgba(74,108,255,0)); }

/* ---------- Testimonials ---------- */
.quotes { display: grid; gap: 96px; margin-top: 118px; }
.quote { display: grid; grid-template-columns: 548px 1fr; gap: 23px 98px; align-items: center; }
.quote--flip { grid-template-columns: 1fr 548px; }
.quote--flip .quote__media { order: 2; }
.quote__media { position: relative; aspect-ratio: 548 / 312; border-radius: 8px; overflow: hidden; isolation: isolate;
  background: #111; }
.quote__media img { width: 100%; height: 100%; object-fit: cover; filter: grayscale(1) contrast(1.08); }
/* black-and-white portraits with a live film grain over them */
.quote__media::after {
  content: ""; position: absolute; inset: -50%; pointer-events: none; opacity: .24; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
  animation: grain 1s steps(6) infinite;
}
@keyframes grain {
  0%, 100% { transform: translate(0, 0); }  17% { transform: translate(-3%, 2%); }  33% { transform: translate(2%, -4%); }
  50% { transform: translate(-4%, -2%); }  67% { transform: translate(4%, 3%); }  83% { transform: translate(-2%, 4%); }
}
.play {
  position: absolute; left: 16px; bottom: 16px; z-index: 1;
  width: 48px; height: 48px; border-radius: 50%;
  transition: transform 160ms var(--ease-out), opacity 300ms ease;
}
/* fades in when main.js confirms its film exists (removing [hidden]) */
@starting-style { .play { opacity: 0; } }
.play[hidden] { display: none; }
.quote__body img.dots { width: 12px; height: 12px; margin-bottom: 16px; }
.quote blockquote { margin: 0 0 16px; font-size: 28px; font-weight: 500; line-height: 1.3; max-width: 454px; }
.quote cite { display: block; font-style: normal; font-size: 18px; font-weight: 300; line-height: 1.3; }
.quote cite span { display: block; color: var(--grey); }

/* ---------- Brands ---------- */
.brands h2 { margin: 0 0 62px; text-align: center; font-size: 40px; font-weight: 500; line-height: 1.2; }
.grad-text {
  background: linear-gradient(145deg, var(--cyan) 20%, var(--pink) 70%, #ffc9e7 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.brands { isolation: isolate; padding-block: 160px; }
.brands .glow { z-index: -1; opacity: .6;
  -webkit-mask-image: radial-gradient(ellipse 70% 62% at 50% 55%, #000 30%, transparent 78%);
          mask-image: radial-gradient(ellipse 70% 62% at 50% 55%, #000 30%, transparent 78%); }
.brands__grid {
  --gap-x: 72px;
  list-style: none; margin: 0 auto; padding: 0;
  max-width: calc(var(--cols, 4) * 190px + (var(--cols, 4) - 1) * var(--gap-x));   /* 3 across sits tighter than 4 */
  display: flex; flex-wrap: wrap; justify-content: center; gap: 56px var(--gap-x);
  opacity: .75;
}
/* full rows of --cols (set by build.py), a short last row centred */
.brands__grid li { flex: 0 0 calc((100% - (var(--cols, 4) - 1) * var(--gap-x)) / var(--cols, 4));
  height: 88px; display: grid; place-items: center; }
.brands__grid img { max-width: 132px; max-height: 40px; width: auto; height: auto; }
.brands__grid img.tall { max-height: 58px; }
.brands__grid img.wide { max-width: 168px; }        /* long single-line wordmarks (Marussia) */

/* ---------- Services ---------- */
.services__cols {
  margin: 64px 0 0; padding: 0; list-style: none;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px 71px;
  font-size: 16px; font-weight: 300; line-height: 1.5;
}
.services__group h3 { margin: 0 0 16px; font-size: 13px; font-weight: 500; letter-spacing: .12em;
  text-transform: uppercase; color: var(--neon-soft); }
.services__group ul { margin: 0; padding: 0; list-style: none; }

/* ---------- Studio page ---------- */
.studio__more { display: inline-block; margin-top: 40px; color: var(--neon-soft); text-decoration: none; }
.studio__more:hover { color: var(--white); }
.spanel { position: relative; min-height: 62vh; display: grid; place-items: center; overflow: hidden;
  isolation: isolate; color: var(--white); text-align: center;
  background: radial-gradient(120% 90% at 30% 80%, #b0129a 0%, transparent 60%),
              radial-gradient(100% 90% at 75% 70%, #5a00e9 0%, transparent 65%), #0b0614; }
.spanel:nth-child(even) { background-position: 100% 0; }
.spanel img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.spanel::after { content: ""; position: absolute; inset: 0; z-index: -1; background: rgba(0,0,0,.45); }
.spanel__text { max-width: 520px; padding: 0 24px; }
.spanel__text p { margin: 0; font-size: clamp(20px, 2.2vw, 28px); font-weight: 400; line-height: 1.35; }
.spanel__text .btn { margin-top: 28px; }
.spanel--hero { min-height: 72vh; }
.spanel--hero h1 { margin: 0; font-size: clamp(44px, 6vw, 80px); font-weight: 500; }

/* ---------- Studio ---------- */
.studio__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 80px; margin-top: 48px; align-items: end; }
.studio__grid p { margin: 0; }
.studio__lead { font-size: 40px; font-weight: 500; line-height: 1.2; }
.studio__detail { font-size: 18px; font-weight: 300; line-height: 1.6; color: #d6d6da; }
.studio__detail strong { display: block; margin-top: 24px; color: var(--white); font-weight: 500; }
.link-arrow { display: inline-flex; gap: 8px; margin-top: 12px; color: var(--pink); font-weight: 500;
  text-decoration: underline; text-decoration-color: transparent; text-underline-offset: 4px;
  transition: text-decoration-color var(--dur-hover) ease; }
.link-arrow:hover { text-decoration-color: currentColor; }

/* ---------- Challenge / contact ---------- */
/* on the home page "Set us a challenge" continues straight on from Our Studio: no background of its own,
   so the studio glow carries down into it. Case pages end in white content, so there it keeps a black band. */
.challenge { position: relative; padding: 160px 0 140px; overflow-x: clip; isolation: isolate; color: var(--white); }
.cs-page .challenge { background: var(--black); overflow: hidden; }
#studio { padding-bottom: 0; }
#studio + .challenge { padding-top: 96px; }
.challenge .glow { z-index: -1; top: 30%;
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 35%);
          mask-image: linear-gradient(to bottom, transparent, #000 35%); }
.challenge h2 {
  margin: 32px 0 48px; max-width: 900px;
  font-size: clamp(48px, 6.7vw, 96px); font-weight: 500; line-height: 1.3;
  min-height: 2.6em;
}
.challenge h2 .swap { display: inline-block; transition: opacity 450ms var(--ease-out), transform 450ms var(--ease-out), filter 450ms var(--ease-out); }
.challenge h2 .swap.is-out { opacity: 0; transform: translateY(-12px); filter: blur(2px); transition-duration: 250ms; }
.challenge h2 .swap.is-pre { opacity: 0; transform: translateY(12px); filter: blur(2px); transition: none; }
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center;
  height: 44px; padding: 0 24px; border-radius: 999px;
  background: var(--pink); color: var(--white); font-size: 16px; font-weight: 400;
  transition: transform 160ms var(--ease-out);
}
/* the hover glow lives on its own layer so only opacity animates */
.btn::after {
  content: ""; position: absolute; inset: 0; border-radius: inherit; pointer-events: none;
  box-shadow: 0 8px 24px rgba(255,28,191,.4);
  opacity: 0; transition: opacity 200ms ease;
}
.contact-lines { display: flex; flex-wrap: wrap; gap: 12px 40px; margin-top: 40px; font-size: 18px; font-weight: 300; }
.contact-lines a { transition: color var(--dur-hover) ease; }
.contact-lines a:hover { color: var(--pink); }

/* ---------- Hover (pointer devices only) and press feedback ---------- */
@media (hover: hover) and (pointer: fine) {
  .cases__list a:hover::after { opacity: 1; transform: none; }
  .play:hover, .media-frame:hover .play { transform: scale(1.1); }
  .btn:hover { transform: translateY(-2px); }
  .btn:hover::after { opacity: 1; }
  .lightbox__close:hover { background-color: rgba(255,255,255,.1); }
}
/* after the hover block so a press always wins; quick in, softer release */
.btn:active { transform: scale(0.97); transition-duration: 100ms; }
.play:active, .media-frame .play:active, .burger:active, .lightbox__close:active { transform: scale(0.95); transition-duration: 100ms; }
.media-frame:has(> .play:not([hidden])) { cursor: pointer; }

/* ---------- Footer ---------- */
.footer {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  padding: 36px 64px; background: var(--footer);
  font-size: 12px; color: #bdbdc2;
}

/* ---------- Reveal on scroll ---------- */
/* hidden only while JS runs: build.py's head() adds .js, and takes it away again if main.js fails to load */
.js .reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s var(--ease), transform .9s var(--ease);
  transition-delay: calc(var(--i, 0) * 60ms); }   /* --i staggers items in a group (build.py) */
.js .reveal.is-in { opacity: 1; transform: none; }

/* ---------- Video lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 100; display: grid; place-items: center;
  padding: 24px; background: rgba(0,0,0,.9);
  opacity: 0; transition: opacity 200ms var(--ease-out);   /* exit */
}
.lightbox.is-open { opacity: 1; transition-duration: 250ms; }  /* enter */
.lightbox:not(.is-open) { pointer-events: none; }
.lightbox[hidden] { display: none; }
.lightbox video {
  width: min(1140px, 100%); max-height: 85vh; border-radius: 8px; background: #000;
  aspect-ratio: 16 / 9; height: auto; object-fit: contain;
  transform: scale(0.96); transition: transform 200ms var(--ease-out);
}
.lightbox.is-open video { transform: none; transition-duration: 250ms; }
/* z-index: while the video scales it forms its own layer, which would otherwise paint over this corner */
.lightbox__close {
  position: absolute; top: 20px; right: 20px; z-index: 1; width: 48px; height: 48px;
  display: grid; place-items: center; border-radius: 50%;
  font-size: 40px; line-height: 1;
  transition: background-color 150ms ease, transform 160ms var(--ease-out);
}

/* ================= Case study page ================= */
.cs-hero { position: relative; padding: 170px 0 0; text-align: center; }
.cs-hero::before {
  content: ""; position: absolute; inset: 0 0 auto 0; height: 720px; z-index: -1;
  background: linear-gradient(to bottom, #000 30%, #3b0a55 100%);
}
.cs-hero h1 { margin: 0 0 64px; font-size: clamp(44px, 5.6vw, 80px); font-weight: 500; line-height: 1.2; }
.cs-page { background: var(--white); color: #111; }
.cs-page .cs-hero { color: var(--white); }
/* the dark band ends part-way down the hero film at every width, so the intro below always sits on white */
.cs-page .cs-hero::before { height: auto; inset: 0 0 45% 0; }
.cs-hero, .cs-body { isolation: isolate; }

.media-frame {
  position: relative; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: radial-gradient(120% 120% at 30% 20%, #3b1a6b 0%, #14061f 55%, #0b0412 100%);
  box-shadow: 0 30px 60px rgba(0,0,0,.25);
}
.media-frame video, .media-frame img { width: 100%; height: 100%; object-fit: cover; }
/* two square social loops side by side instead of one 16:9 film */
.media-frame--pair { aspect-ratio: auto; max-width: 960px; margin-inline: auto; display: grid; grid-template-columns: 1fr 1fr;
  gap: 16px; background: none; box-shadow: none; border-radius: 0; overflow: visible; }
.media-frame--pair video { aspect-ratio: 1; height: auto; border-radius: 8px; background: #fff;
  box-shadow: 0 30px 60px rgba(0,0,0,.25); }
.media-frame--pair video[data-bg] { opacity: 1; }   /* the poster shows straight away, even where autoplay is blocked */
/* stills and testimonial photos fade in as they load (main.js adds .is-loading) */
.media-frame > img, .quote__media > img { transition: opacity 500ms ease; }
img.is-loading { opacity: 0; }
.media-frame .play { left: 50%; top: 50%; bottom: auto; translate: -50% -50%; width: 64px; height: 64px; }
.media-frame__label {
  position: absolute; left: 20px; bottom: 16px; font-size: 13px; font-weight: 300; color: rgba(255,255,255,.6);
}

.cs-body { padding: 96px 0 40px; }
.cs-intro { max-width: 760px; margin: 0 auto; text-align: center; font-size: 21px; font-weight: 300; line-height: 1.6; }
.cs-block { margin-top: 140px; text-align: center; }
.cs-block .eyebrow { margin-bottom: 48px; }
.cs-block p.lead { max-width: 760px; margin: 0 auto; font-size: 21px; font-weight: 300; line-height: 1.6; }
.cs-sub { margin: 56px auto 12px; max-width: 760px; font-size: 28px; font-weight: 500; line-height: 1.3; }
.cs-block .cs-sub + p.lead { margin-top: 0; }

.stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; margin-top: 64px; }
.stills .media-frame { aspect-ratio: 4 / 3; box-shadow: none; }

/* creative execution, copied from the Figma: a 1185 x 193 "process" block (a little wider than the text column),
   dots 36px, low row 175px down, high row 19px down, copy 18px Light centred on its dot, ending ~38px above a
   low dot or starting ~12px below a high one. main.js draws the line and brings each step in as you scroll. */
.steps { position: relative; width: min(1185px, 100vw - 32px); height: 193px; margin: 112px 0 0 50%; translate: -50% 0; }
.steps svg.wave { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible;
  clip-path: inset(-20px calc(100% - var(--reveal, 1) * 100%) -20px 0); }
.steps ol { position: absolute; inset: 0; list-style: none; margin: 0; padding: 0; }
.steps li { position: absolute; top: 0; bottom: 0; left: calc(var(--x) * 100%); width: 0; }
.steps .dot { position: absolute; left: 0; translate: -50% -50%; width: 36px; height: 36px; border-radius: 50%;
  background: var(--purple); }
.steps li[data-row="lo"] .dot { top: 175px; }
.steps li[data-row="hi"] .dot { top: 19px; }
.steps li > span:last-child { position: absolute; left: 0; translate: -50% 0; width: max-content; max-width: 22vw;
  text-align: center; font-size: 18px; font-weight: 300; line-height: 1.3; color: #302f34; }
.steps li[data-row="lo"] > span:last-child { bottom: 74px; }
.steps li[data-row="hi"] > span:last-child { top: 49px; }

.stat { margin-top: 140px; text-align: center; }
/* AHC result, as in the Figma: three portrait story formats in thin pink keylines, a caption, the 92, then a
   full-width wall of the delivered assets */
.stories { display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; max-width: 760px; margin: 80px auto 0; }
.story { position: relative; aspect-ratio: 9 / 16; overflow: hidden; }
.story img { width: 100%; height: 100%; object-fit: cover; }
.story::after { content: ""; position: absolute; inset: 10px; border: 1px solid #d9a3bf; pointer-events: none; }
.stories__caption { margin: 24px 0 0; font-size: 16px; font-weight: 300; }
.stat--tight { margin-top: 96px; }
.stat--tight .stat__label { font-weight: 500; }
.mosaic { width: 100vw; margin: 120px 0 0 50%; translate: -50% 0; }
.mosaic img { width: 100%; display: block; }
.stat__num { font-size: clamp(96px, 14vw, 200px); font-weight: 500; line-height: 1; color: var(--pink); }
.stat__label { font-size: 21px; font-weight: 300; }
.stat__title { margin: 0 0 24px; font-size: 28px; font-weight: 500; }

.cs-pager { display: flex; justify-content: space-between; gap: 24px; margin-top: 140px; padding: 40px 0 80px; font-size: 28px; font-weight: 500; }
.cs-pager a { color: #555; transition: color var(--dur-hover) ease; }
.cs-pager a:hover { color: #000; }
.cs-pager span { color: var(--pink); }

/* ================= Typography: balanced headlines, no orphaned last words ================= */
.scene__title, .cs-hero h1, .brands h2, .cs-sub, .stat__title { text-wrap: balance; }
.scene__line, .scene__statements li, .challenge h2, .studio__lead, .quote blockquote, .cs-intro, .cs-block p.lead, .studio__detail { text-wrap: pretty; }

/* ================= Responsive ================= */
@media (max-width: 1200px) {
  :root { --gutter: 64px; }
  .quote, .quote--flip { grid-template-columns: 1fr 1fr; gap: 24px 56px; }
}
@media (max-width: 800px) {
  :root { --gutter: 24px; --nav-h: 72px; }
  .nav { padding: 0 16px 0 20px; }
  .nav__logo img { width: 60px; height: 40px; }
  .menu { padding: var(--nav-h) 24px; }
  .scene__line, .scene__statements li { font-size: 28px; }
  .section { padding: 88px 0; }
  .eyebrow { font-size: 15px; }
  .quotes { gap: 64px; margin-top: 56px; }
  .quote, .quote--flip { grid-template-columns: 1fr; }
  .quote--flip .quote__media { order: 0; }
  .quote blockquote { font-size: 24px; }
  .brands h2 { font-size: 30px; margin-bottom: 32px; }
  .brands { padding-block: 112px; }
  .brands__grid { --gap-x: 24px; row-gap: 32px; }
  /* phones: two across (--cols-sm from build.py) */
  .brands__grid li { flex-basis: calc((100% - (var(--cols-sm, 2) - 1) * var(--gap-x)) / var(--cols-sm, 2)); height: 72px; }
  .brands__grid img { max-width: 108px; max-height: 34px; }
  .brands__grid img.tall { max-height: 48px; }
  .brands__grid img.wide { max-width: 132px; }
  .services__cols { grid-template-columns: repeat(3, 1fr); gap: 0 14px; margin-top: 28px; }
  /* phones: keep the three stages side by side, just smaller */
  .services__group h3 { margin-bottom: 10px; font-size: 10px; letter-spacing: .06em; }
  .services__group ul { font-size: 13px; line-height: 1.35; }
  .services__group li { margin-bottom: 7px; }
  .studio__grid { grid-template-columns: 1fr; gap: 32px; }
  .studio__lead { font-size: 28px; }
  .challenge { padding: 112px 0 96px; }
  #studio + .challenge { padding-top: 72px; }
  .contact-lines { flex-direction: column; font-size: 16px; gap: 0; margin-block: 34px -6px; }
  .contact-lines a { padding-block: 6px; }   /* taller tap targets, same visual spacing */
  .footer { padding: 28px 24px; }
  .cs-hero { padding-top: 120px; }
  .cs-hero h1 { margin-bottom: 40px; }
  .cs-intro, .cs-block p.lead { font-size: 18px; }
  .cs-block, .stat, .cs-pager { margin-top: 88px; }
  .stills { grid-template-columns: 1fr 1fr; gap: 12px; }
  .steps li > span:last-child { font-size: 16px; }
  .cs-pager { font-size: 18px; }
}
@media (max-width: 600px) {
  /* phones: no wave; two steps per row, read left to right, an odd last step centred */
  .steps { width: auto; height: auto; margin: 48px 0 0; translate: none; }
  .steps svg.wave { display: none; }
  .steps ol { position: static; display: flex; flex-wrap: wrap; justify-content: center; gap: 44px 24px;
    max-width: 520px; margin-inline: auto; }
  .steps li { position: static; width: auto; flex: 0 0 calc(50% - 12px); display: flex; flex-direction: column;
    align-items: center; gap: 14px; }
  .steps .dot, .steps li > span:last-child { position: static; translate: none; }
  .steps .dot { width: 20px; height: 20px; }
  .steps li > span:last-child { width: auto; max-width: none; }
}
@media (max-height: 520px) {
  /* landscape phones: all four menu links fit without clipping */
  .menu a { font-size: clamp(32px, 11vh, 48px); }
  .menu { padding-block: var(--nav-h) 24px; }
}
/* a printout shows every section, including ones never scrolled into view */
@media print {
  .js .reveal, .steps li { opacity: 1 !important; transform: none !important; transition: none; }
  .steps svg.wave { clip-path: none; }
}

/* ================= Reduced motion: keep fades, drop movement =================
   Last in the file so it overrides every rule above at equal specificity. */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .side-glow, .quote__media::after { animation: none; }
  .scene__title { animation: fade-in 600ms ease 150ms both; }
  .scroll-cue { animation: none; }
  .scroll-cue circle { animation: none; stroke-dashoffset: 0; }
  .scroll-cue span { animation: fade-in 600ms ease 700ms both; }
  .menu a, .cases__list a::after, .lightbox video { transform: none; }
  .js .reveal { transform: none; transition: opacity 400ms ease; }
}

/* ---------- v2 ---------- */
/* opening: one line and the reel button over the film */
.scene__one { grid-area: 1 / 1; max-width: 820px; display: grid; justify-items: center; gap: 32px; }
.scene__one p { margin: 0; font-size: 40px; font-weight: 500; line-height: 1.2; text-wrap: balance; }
.btn--reel { cursor: pointer; border: 0; font: inherit; }

/* desktop: the four links sit in the bar; the burger is for phones */
.nav__links { display: none; }
@media (min-width: 801px) {
  .nav__links { display: flex; gap: 40px; margin: 0 0 0 auto; padding: 0; list-style: none; font-size: 16px; }
  .nav__links a { color: var(--neon); transition: color var(--dur-hover) ease; }
  .nav__links a:hover, .nav__links a:focus-visible { color: var(--white); }
  .burger { display: none; }
}

/* case studies as picture cards */
.cases__list { display: grid; grid-template-columns: 1fr 1fr; gap: 56px 40px; }
.cases__list .case-card { display: block; font-size: inherit; line-height: 1; color: var(--neon-soft); transition: color var(--dur-hover) ease; }
.case-card__media { position: relative; display: block; aspect-ratio: 16 / 9; border-radius: 8px; overflow: hidden;
  background: radial-gradient(120% 90% at 30% 80%, #b0129a 0%, transparent 60%), #0b0614; }
.case-card__media img, .case-card__media video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  transition: transform 600ms var(--ease-out), opacity 300ms ease; }
.case-card__media video { opacity: 0; }
.case-card.is-looping video { opacity: 1; }
.case-card:hover .case-card__media img, .case-card:hover .case-card__media video { transform: scale(1.03); }
.case-card__title { display: block; margin-top: 18px; font-size: clamp(24px, 2.6vw, 36px); font-weight: 500; line-height: 1.2; }
.case-card:hover, .case-card:focus-visible { color: var(--white); }
.cases__list a::after { content: none; }

/* a quote without a photo */
.quote--solo { grid-template-columns: 1fr; justify-items: center; text-align: center; }
.quote--solo blockquote { max-width: 760px; font-size: clamp(28px, 3.4vw, 44px); }

/* who we are */
.team__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 40px; margin: 48px 0 0; padding: 0; list-style: none; }
.team__grid img { width: 100%; aspect-ratio: 4 / 5; object-fit: cover; border-radius: 8px; margin-bottom: 12px; }
.team__grid strong { display: block; font-weight: 500; }
.team__grid span { font-weight: 300; color: var(--neon-soft); }

@media (max-width: 800px) {
  .scene__one p { font-size: 28px; }
  .cases__list { grid-template-columns: 1fr; gap: 40px; }
}
