/* ============================================================================
   CrowdSorcery — case study template (v2)
   Shared by every page in /work. Each page only holds its CASE settings.
   ============================================================================ */
.wrap { max-width: var(--max); margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }
.chapter { padding-top: clamp(96px, 12vw, 170px); }
.chapter__label { display: flex; gap: 14px; align-items: center; color: var(--ember-lt); margin-bottom: 36px; }
.chapter__label::after { content: ""; flex: 0 0 56px; height: 1px; background: var(--ember); opacity: 0.6; }

/* ── Cold open ────────────────────────────────────────────────────────── */
.open { position: relative; min-height: max(600px, 100vh); min-height: max(600px, 100svh); display: flex; align-items: flex-end; background: var(--bg-deep); overflow: hidden; }
.open__media, .open__media video, .open__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.open__shade { position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(29,29,31,1) 0%, rgba(29,29,31,0.94) 30%, rgba(18,18,19,0.6) 52%, rgba(18,18,19,0.2) 75%, rgba(18,18,19,0.6) 100%); }
.open__body { position: relative; width: 100%; padding-bottom: clamp(40px, 7vh, 80px); }
.open__title { font-size: clamp(64px, 11vw, 168px); margin: 16px 0 20px; }
.open__logline { max-width: 620px; font-size: clamp(17px, 1.5vw, 22px); line-height: 1.55; color: var(--text-2); }
.credits { margin-top: clamp(32px, 5vh, 56px); padding-top: 22px; border-top: 1px solid var(--line);
  display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; }
.credits dt { color: var(--muted); margin-bottom: 8px; }
.credits dd { font-size: 15px; color: #fff; font-weight: 400; }
@media (max-width: 760px) { .credits { grid-template-columns: repeat(2, minmax(0, 1fr)); } }

/* ── 01 The ask ───────────────────────────────────────────────────────── */
.ask__q { font-size: clamp(34px, 4.6vw, 68px); line-height: 1.06; max-width: 18ch; text-wrap: balance; }
.ask__q::before { content: "“"; color: var(--ember); }
.ask__q::after  { content: "”"; color: var(--ember); }
.ask__cap { margin-top: 22px; color: var(--muted); }
.notes { margin-top: clamp(48px, 6vw, 80px); display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(20px, 3vw, 48px); }
.note { border-top: 1px solid var(--line); padding-top: 20px; }
.note__n { color: var(--ember-lt); }
.note h3 { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 24px; letter-spacing: -0.02em; margin: 12px 0 10px; }
.note p { color: var(--text-2); line-height: 1.6; font-size: 15.5px; }
.ask__context { margin-top: clamp(48px, 6vw, 72px); max-width: 640px; font-size: 18px; line-height: 1.7; color: var(--text-2); }
@media (max-width: 760px) { .notes { grid-template-columns: 1fr; } }

/* ── 02 The crowd ─────────────────────────────────────────────────────── */
.crowd { position: relative; margin-top: 36px; height: clamp(460px, 72vh, 760px); overflow: hidden; background: var(--bg-deep); border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.crowd__field { position: absolute; inset: 0; }
.crowd__tile { position: absolute; top: 0; left: 0; border-radius: 8px; overflow: hidden; opacity: 0; transition: opacity 1.4s ease; box-shadow: 0 12px 40px rgba(0,0,0,0.5); will-change: transform; }
.crowd__tile img { width: 100%; height: 100%; object-fit: cover; filter: saturate(0.85); }
.crowd__shade { position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(0deg, rgba(18,18,19,0.96) 0%, rgba(18,18,19,0.4) 40%, rgba(18,18,19,0.15) 70%, rgba(18,18,19,0.5) 100%); }
.crowd__stats { position: absolute; left: 0; right: 0; bottom: 0; }
.stats { display: grid; grid-template-columns: repeat(var(--n, 4), minmax(0,1fr)); gap: 24px; padding-bottom: clamp(28px, 4vw, 48px); }
.stat__v { font-family: var(--display); font-style: italic; font-weight: 600; font-size: clamp(44px, 6vw, 92px); letter-spacing: -0.04em; line-height: 1;
  background: var(--gradient); -webkit-background-clip: text; background-clip: text; color: transparent; }
.stat__l { margin-top: 10px; color: var(--text-2); }
.crowd__cap { position: absolute; top: 24px; right: var(--gutter); color: var(--text-3); }
@media (max-width: 760px) { .stats { grid-template-columns: repeat(2, minmax(0,1fr)); row-gap: 28px; } }

/* ── 03 The cut ───────────────────────────────────────────────────────── */
.cut__head { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; align-items: end; }
.cut__head h2 { font-size: clamp(40px, 5vw, 76px); }
.cut__head p { color: var(--text-2); font-size: 17px; line-height: 1.7; max-width: 440px; justify-self: end; }
@media (max-width: 760px) { .cut__head { grid-template-columns: 1fr; } .cut__head p { justify-self: start; } }
.rail { margin-top: 44px; display: grid; grid-auto-flow: column; grid-auto-columns: clamp(170px, calc((min(100vw, 1440px) - 2 * var(--gutter) - 100px) / 6), 270px); gap: 20px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding-left: var(--gutter); padding: 0 var(--gutter) 18px; scrollbar-width: thin; scrollbar-color: #444 transparent; }
.rail__wrap { max-width: var(--max); margin: 0 auto; }
.clip { scroll-snap-align: start; text-align: left; }
.clip__frame { position: relative; aspect-ratio: 9 / 16; border-radius: 12px; overflow: hidden; background: #000; }
.clip__frame img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s cubic-bezier(.2,.7,.2,1); }
.clip:hover .clip__frame img { transform: scale(1.04); }
.clip__frame::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, rgba(0,0,0,0.55), rgba(0,0,0,0) 40%); }
.clip__play { position: absolute; left: 14px; bottom: 14px; z-index: 1; width: 46px; height: 46px; border-radius: 50%;
  background: var(--gradient); display: grid; place-items: center; transition: transform 0.25s ease; }
.clip:hover .clip__play { transform: scale(1.08); }
.clip__play svg { width: 16px; height: 16px; margin-left: 3px; fill: #1D1D1F; }
.clip__name { margin-top: 14px; font-size: 16px; font-weight: 500; }
.clip__label { margin-top: 6px; color: var(--muted); }

/* Player overlay */
.player { position: fixed; inset: 0; z-index: 100; display: none; align-items: center; justify-content: center; background: rgba(10,10,11,0.94); padding: 24px; }
.player.open { display: flex; }
.player__box { position: relative; height: min(86vh, 900px); aspect-ratio: 9 / 16; max-width: 92vw; }
.player__box.is-landscape { height: auto; width: min(92vw, 1280px); aspect-ratio: 16 / 9; }
.player__box video, .player__box iframe { width: 100%; height: 100%; border: 0; border-radius: 12px; background: #000; }
.player__close { position: absolute; top: 18px; right: 22px; width: 44px; height: 44px; border-radius: 50%; border: 1px solid rgba(255,255,255,0.3); font-size: 22px; line-height: 1; }
.player__caption { position: absolute; left: 24px; bottom: 22px; color: var(--text-2); }

/* ── End credits ──────────────────────────────────────────────────────── */
.roll { text-align: center; }
.roll__list { margin: 0 auto; max-width: 720px; display: grid; gap: 22px; }
.roll__row { display: grid; grid-template-columns: 1fr 1fr; gap: 28px; align-items: baseline; }
.roll__role { text-align: right; color: var(--muted); }
.roll__by { text-align: left; font-size: 16px; }
@media (max-width: 600px) { .roll__row { grid-template-columns: 1fr; gap: 6px; } .roll__role, .roll__by { text-align: center; } }

/* ── Quote ────────────────────────────────────────────────────────────── */
.quote blockquote { font-family: var(--display); font-style: italic; font-weight: 500; font-size: clamp(26px, 3vw, 42px); line-height: 1.3; max-width: 34ch; letter-spacing: -0.02em; }
.quote cite { display: block; margin-top: 24px; font-style: normal; color: var(--text-2); }

/* ── Up next ──────────────────────────────────────────────────────────── */
.next { position: relative; display: block; width: 100%; margin-top: 36px; border-radius: 14px; overflow: hidden; aspect-ratio: 21 / 9; }
@media (max-width: 760px) { .next { aspect-ratio: 4 / 3; } }
.next img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; transition: transform 1.2s cubic-bezier(.2,.7,.2,1); }
.next:hover img { transform: scale(1.03); }
.next::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, rgba(10,10,11,0.88), rgba(10,10,11,0.2) 65%); }
.next__body { position: absolute; z-index: 1; left: clamp(22px, 3vw, 44px); bottom: clamp(22px, 3vw, 44px); }
.next__body .display { font-size: clamp(40px, 6vw, 88px); margin: 12px 0 10px; }
.next__body .mono { color: var(--text-2); }
.next__arrow { position: absolute; z-index: 1; right: clamp(22px, 3vw, 44px); bottom: clamp(22px, 3vw, 44px); width: 56px; height: 56px; border-radius: 50%; background: var(--gradient); color: #1D1D1F; display: grid; place-items: center; font-size: 22px; }

/* ── Crowd band variants: background video, or numbers only ────────────── */
.crowd__video { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.crowd--plain { height: auto; padding-top: clamp(48px, 6vw, 80px); background: var(--bg); }
.crowd--plain .crowd__stats { position: static; }
.crowd--plain .crowd__shade { display: none; }

/* ── Laurels (cold open) ──────────────────────────────────────────────── */
.laurels { display: flex; gap: 28px; flex-wrap: wrap; align-items: center; margin-top: 28px; }
.laurels img { height: clamp(54px, 6vw, 80px); width: auto; opacity: 0.9; }

/* ── The cut: one wide film ───────────────────────────────────────────── */
.film { display: block; width: calc(100% - 2 * var(--gutter)); max-width: calc(var(--max) - 2 * var(--gutter)); margin: 44px auto 0; text-align: left; }
.film .clip__frame { aspect-ratio: 16 / 9; }
.film .clip__play { width: 72px; height: 72px; left: 50%; top: 50%; bottom: auto; transform: translate(-50%, -50%); }
.film:hover .clip__play { transform: translate(-50%, -50%) scale(1.08); }
.film .clip__play svg { width: 22px; height: 22px; }

/* ── Press ────────────────────────────────────────────────────────────── */
.press { display: grid; grid-template-columns: repeat(var(--n, 3), minmax(0, 1fr)); gap: clamp(20px, 3vw, 44px); }
.press__item { border-top: 1px solid var(--line); padding-top: 24px; display: flex; flex-direction: column; gap: 18px; }
.press__pub { font-family: var(--display); font-style: italic; font-weight: 600; font-size: 22px; letter-spacing: -0.02em; }
.press__quote { color: var(--text-2); line-height: 1.65; font-size: 15.5px; flex: 1; }
.press__link { color: var(--ember-lt); }
.press__link:hover { color: #fff; }
@media (max-width: 860px) { .press { grid-template-columns: 1fr; } }
