/* Case study pages. Grid and rhythm measured from area17.com/clients/elevenlabs:
   12 columns, 16px gutters. Headings sit at column 1 (8 columns wide), body copy and
   quotes in columns 4-9, media either full width or left-aligned portraits (4:5). */
:root {
  --bg: #fff; --fg: #000; --muted: #949494; --line: rgba(0, 0, 0, 0.12); --panel: #f2f2f2;
  --pad: 20px; --gap: 16px; --ease: cubic-bezier(0.22, 1, 0.36, 1);
  --font: "Suisse Intl", "Inter Tight", Arial, sans-serif;
  --h2: clamp(30px, 3.2vw, 55px);
}
* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body { background: var(--bg); color: var(--fg); font: 500 16px/1.45 var(--font); -webkit-font-smoothing: antialiased; overflow-x: clip; }
a { color: inherit; text-decoration: none; }
img, video { display: block; width: 100%; height: 100%; object-fit: cover; }
.soft { color: var(--muted); }
.g { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); column-gap: var(--gap); padding: 0 var(--pad); }

/* Header, over the hero */
.top { position: absolute; z-index: 2; inset: 0 0 auto; display: grid; grid-template-columns: 1fr 1fr; column-gap: var(--gap); padding: 18px var(--pad); font-size: 14px; color: #fff; }
.top .soft { color: rgba(255, 255, 255, .7); }
.top nav { display: flex; flex-wrap: wrap; gap: 6px 22px; }
.top nav a { color: rgba(255, 255, 255, .7); transition: color .2s; }
.top nav a:hover, .top nav a[aria-current] { color: #fff; }

/* Hero: full-bleed film with the client logo centred on it */
.hero-film { position: relative; height: 80vh; min-height: 460px; overflow: hidden; background: #111; }
.hero-film::after { content: ""; position: absolute; inset: 0; background: radial-gradient(ellipse at center, rgba(0,0,0,.45), rgba(0,0,0,.15) 60%), linear-gradient(rgba(0,0,0,.35), rgba(0,0,0,0) 30%); }
.hero-film .logo { position: absolute; z-index: 1; inset: 0; display: grid; place-items: center; }
.hero-film .logo img { width: auto; height: auto; max-width: min(36vw, 420px); max-height: 18vh; object-fit: contain; }

/* UI-led cases: the screen recording sits inset on the brand colour */
.hero-film.ui { background: #1f2a5c; display: grid; place-items: center; padding: 90px var(--pad) 40px; }
.hero-film.ui::after { display: none; }
.hero-film.ui video { width: auto; height: 100%; max-width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-radius: 6px; box-shadow: 0 30px 80px rgba(0,0,0,.35); }

.intro { padding-top: 16px; }
.intro .who { grid-column: 1 / 3; font-size: 16px; }
.intro .when { grid-column: 3 / 5; font-size: 16px; color: var(--muted); }
.intro h1 { grid-column: 1 / 11; margin-top: 16px; font-weight: 500; font-size: clamp(40px, 5.6vw, 92px); line-height: .98; letter-spacing: -.04em; }
.intro .lede { grid-column: 4 / 10; margin-top: 140px; font-size: 20px; line-height: 1.4; }

/* Section index: a grey panel in the copy columns */
.toc { margin-top: 56px; }
.toc nav { grid-column: 4 / 10; background: var(--panel); border-radius: 8px; padding: 24px; }
.toc h2 { font: inherit; color: var(--muted); margin-bottom: 18px; }
.toc ol { list-style: none; }
.toc a { display: grid; grid-template-columns: 48px 1fr auto; padding: 9px 0; border-top: 1px solid var(--line); font-size: 18px; }
.toc a span:first-child, .toc a span:last-child { color: var(--muted); }
.toc a:hover span:last-child { color: var(--fg); }

/* Chapters: heading, full-width media, copy, quote, portrait */
.ch { padding-top: 280px; }
.ch h2 { grid-column: 1 / 9; font-weight: 500; font-size: var(--h2); line-height: 1.1; letter-spacing: -.025em; }
.ch h2 .n { color: var(--muted); margin-right: .35em; }
.full { margin: 80px var(--pad) 0; aspect-ratio: 16 / 9; overflow: hidden; background: var(--panel); }
.full.cine { aspect-ratio: 2.39 / 1; }
.body { margin-top: 120px; }
.body > div { grid-column: 4 / 10; display: grid; row-gap: 40px; font-size: 20px; line-height: 1.4; }

.quote { margin-top: 100px; }
.quote blockquote { grid-column: 4 / 10; font-size: clamp(26px, 2.1vw, 36px); line-height: 1.15; letter-spacing: -.02em; }
.quote figcaption { grid-column: 4 / 10; margin-top: 30px; display: grid; grid-template-columns: subgrid; font-size: 16px; }
.quote .face { grid-column: 1; width: 48px; height: 48px; border-radius: 50%; background: var(--panel); display: grid; place-items: center; color: var(--muted); }
.quote figcaption > span:last-child { grid-column: 2 / -1; }

.portrait { margin-top: 150px; }
.portrait figure { grid-column: 1 / 7; aspect-ratio: 4 / 5; overflow: hidden; background: var(--panel); }
.portrait.s5 figure { grid-column: 1 / 6; }
.portrait.s7 figure { grid-column: 1 / 8; }
.portrait .cap { grid-column: 7 / 10; align-self: end; font-size: 14px; color: var(--muted); }
.portrait.s5 .cap { grid-column: 6 / 9; }
.portrait.s7 .cap { grid-column: 8 / 11; }

.ui { background: #1f2a5c; }

/* Stats in the copy columns */
.stats { margin-top: 100px; }
.stat { grid-column: 4 / 7; border-top: 1px solid var(--line); padding-top: 16px; }
.stat + .stat { grid-column: 7 / 10; }
.stat b { display: block; font-weight: 500; font-size: clamp(56px, 6vw, 104px); line-height: .9; letter-spacing: -.05em; }
.stat p { margin-top: 14px; color: var(--muted); }

/* Credits */
.credits { padding-top: 280px; }
.credits h2 { grid-column: 1 / 4; font: inherit; color: var(--muted); }
.credits .cols { grid-column: 4 / 13; display: grid; grid-template-columns: repeat(3, 1fr); column-gap: var(--gap); border-top: 1px solid var(--line); padding-top: 16px; }
.credits h3 { font: inherit; margin-bottom: 10px; }
.credits ul { list-style: none; color: var(--muted); display: grid; row-gap: 4px; }

/* Up next: two cards, half the grid each */
.next { padding-top: 280px; row-gap: 40px; }
.next h2 { grid-column: 1 / 11; font-weight: 500; font-size: var(--h2); line-height: 1.1; letter-spacing: -.025em; }
.next a { grid-column: span 6; display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); column-gap: var(--gap); align-content: start; }
.next .m { grid-column: 1 / -1; aspect-ratio: 4 / 3; overflow: hidden; background: var(--panel); margin-bottom: 16px; }
.next .t { grid-column: 1 / 3; }
.next .y { grid-column: 3 / 5; color: var(--muted); }
.next p { grid-column: 1 / -1; margin-top: 8px; font-size: clamp(22px, 1.9vw, 32px); line-height: 1.15; letter-spacing: -.02em; }
.next a:hover p { color: var(--muted); }
figure img, figure video, .next .m img { transition: scale 1.4s var(--ease); }
figure:hover img, .next a:hover .m img { scale: 1.03; }

/* Site footer */
.site-foot { margin-top: 240px; padding: 0 var(--pad) 24px; font-size: 14px; }
.sf-cta { border-top: 1px solid var(--line); padding-top: 20px; }
.sf-cta p { color: var(--muted); }
.sf-cta a { display: inline-block; margin-top: 60px; font-size: clamp(32px, 5.6vw, 92px); line-height: .95; letter-spacing: -.04em; white-space: nowrap; transition: color .2s; }
.sf-cta a:hover { color: var(--muted); }
.sf-cols { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); column-gap: var(--gap); margin-top: 140px; }
.sf-cols h3 { font: inherit; color: var(--muted); margin-bottom: 10px; }
.sf-cols ul { list-style: none; display: grid; row-gap: 4px; }
.sf-cols a { transition: color .2s; }
.sf-cols a:hover { color: var(--muted); }
.sf-base { display: flex; justify-content: space-between; gap: 20px; margin-top: 80px; color: var(--muted); }

.rise { opacity: 0; translate: 0 24px; transition: opacity .9s var(--ease), translate .9s var(--ease); }
.rise.in { opacity: 1; translate: 0 0; }

@media (max-width: 900px) {
  :root { --gap: 10px; }
  .top nav { display: none; }
  .g > * { grid-column: 1 / -1 !important; }
  .hero-film { height: 64vh; }
  .hero-film .logo img { max-width: 56vw; }
  .hero-film.ui { height: auto; min-height: 0; padding-top: 80px; } .hero-film.ui video { width: 100%; height: auto; }
  .intro .when { margin-top: 2px; }
  .intro .lede { margin-top: 48px; font-size: 18px; }
  .ch, .credits, .next { padding-top: 140px; }
  .full { margin-top: 40px; }
  .full.cine { aspect-ratio: 4 / 3; }
  .body { margin-top: 48px; }
  .body > div { font-size: 18px; row-gap: 24px; }
  .quote, .stats { margin-top: 56px; }
  .quote figcaption { display: flex; gap: 14px; align-items: center; }
  .portrait { margin-top: 56px; }
  .portrait .cap { margin-top: 10px; }
  .stat + .stat { margin-top: 30px; }
  .credits h2 { margin-bottom: 14px; }
  .credits .cols { grid-template-columns: 1fr; row-gap: 24px; }
  .next a { grid-template-columns: 1fr 1fr; }
  .next .t { grid-column: 1; } .next .y { grid-column: 2; }
  .site-foot { margin-top: 140px; }
  .sf-cta a { margin-top: 24px; }
  .sf-cols { grid-template-columns: 1fr 1fr; row-gap: 40px; margin-top: 80px; }
  .sf-base { flex-direction: column; gap: 4px; margin-top: 60px; }
}

/* iPhone Safari can still pan sideways when body alone hides overflow */
html { overflow-x: clip; max-width: 100%; }
