/* ==========================================================================
   Case-study single — "The Director's Cut" (production dossier)
   The room behind the exhibition hall: the exhibit's dossier is opened.
   Screening stage (hero) → registrar's card → the cut (reel index + reels on
   a film spine) → end credits (deliverables) → now showing (neighbours) → a
   new case file (CTA). Loaded after cinema.css + cinema-pages.css.
   Markup: template-parts/cinema/case-study-dossier.php
   ========================================================================== */

.csd .mono { direction: ltr; }
.csd-index__sum .mono, .csd-card__label .mono, .csd-folder__label small, .csd-note__tag { text-align: right; }
.csd {
  --wall: #0e0a08;
  --paper: #efe7db;
  --paper-2: #e3d8c8;
  --ink: #1c1511;
  --ink-2: #54473d;
  --ink-gold: #8a5f2c;
  --stamp: #9f4d3e;
  --spot: 255, 210, 150;
  --film: #18120e;
  --hole: #090605;
  --manila: #b98a4e;
}

/* ---------- Hero: the screening stage ---------- */
.csd-hero { min-height: 0; justify-content: flex-start; padding: calc(var(--header-h) + clamp(44px, 6.5vh, 84px)) 0 clamp(52px, 6vw, 88px); background: var(--wall); }
.csd-hero__bg {
  position: absolute; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(40% 50% at 26% 34%, rgba(var(--spot), .075), transparent 70%),
    radial-gradient(60% 50% at 80% 0%, rgba(var(--spot), .05), transparent 65%),
    repeating-linear-gradient(90deg, rgba(255, 236, 214, .017) 0 1px, transparent 1px 180px),
    linear-gradient(180deg, #130e0b 0%, #0e0a08 70%, #0b0807 100%);
}
/* polished floor under the card */
.csd-hero::before {
  content: ""; position: absolute; inset: auto 0 0; height: clamp(90px, 14vh, 150px); z-index: -1; pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(255, 236, 214, .02)), repeating-linear-gradient(90deg, rgba(0, 0, 0, .14) 0 1px, transparent 1px 140px);
  -webkit-mask-image: linear-gradient(transparent, #000); mask-image: linear-gradient(transparent, #000);
}
.csd-hero__lamp {
  position: absolute; top: 0; left: 6%; width: 46%; height: 82%;
  background: conic-gradient(from 180deg at 50% 0%, transparent 158deg, rgba(var(--spot), .05) 170deg, rgba(var(--spot), .085) 180deg, rgba(var(--spot), .05) 190deg, transparent 202deg);
  -webkit-mask-image: linear-gradient(#000 10%, transparent 100%); mask-image: linear-gradient(#000 10%, transparent 100%);
}
.csd-hero__inner { position: relative; z-index: 2; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.08fr); align-items: center; gap: clamp(32px, 5vw, 88px); }
.csd-hero__copy { position: relative; min-width: 0; }
.csd-crumbs { margin-bottom: 22px; }
.csd-crumbs li { min-width: 0; }
.csd-crumbs [aria-current] { max-width: 30ch; overflow: hidden; white-space: nowrap; text-overflow: ellipsis; }
.csd-file { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 14px; }
.csd-file__code { padding: 5px 10px; border-radius: 6px; border: 1px solid rgba(224, 169, 95, .35); background: rgba(224, 169, 95, .06); color: var(--gold-l); font-size: 10.5px; letter-spacing: .18em; direction: ltr; }
.csd-file__kind { color: var(--text-2); font-size: 14px; font-weight: 800; }
.csd-chip { max-width: 100%; margin-top: 16px; line-height: 1.75; white-space: normal; }
.csd-chip .ico { flex: none; }
.csd-title { margin-top: 16px; font-size: clamp(2.05rem, min(1rem + 3.3vw, 7.6vh), 4.25rem); line-height: 1.32; }
.csd-lead { max-width: 58ch; }
.csd-hero__cta { margin-top: 30px; }

/* the stage: track light → monitor → transport bar */
.csd-stage { position: relative; isolation: isolate; min-width: 0; padding-top: 40px; }
.csd-stage::before {
  content: ""; position: absolute; top: 0; left: 50%; width: 92px; height: 12px; margin-left: -46px; border-radius: 4px 4px 8px 8px;
  background: linear-gradient(180deg, #2b2420, #120e0c); box-shadow: 0 1px 0 rgba(255, 236, 214, .08) inset, 0 8px 18px -6px rgba(0, 0, 0, .9);
}
.csd-stage__beam {
  position: absolute; z-index: -1; top: 6px; left: 50%; width: 170%; height: 125%; translate: -50% 0; pointer-events: none;
  background: conic-gradient(from 180deg at 50% 0%, transparent 161deg, rgba(var(--spot), .06) 171deg, rgba(var(--spot), .12) 180deg, rgba(var(--spot), .06) 189deg, transparent 199deg);
  -webkit-mask-image: linear-gradient(#000 20%, transparent 96%); mask-image: linear-gradient(#000 20%, transparent 96%);
  animation: csd-flicker 9s steps(1, end) infinite;
}
.csd-screen {
  position: relative; overflow: hidden; border-radius: 16px; background: #0b0908;
  border: 1px solid rgba(255, 236, 214, .14);
  box-shadow: 0 0 0 9px rgba(255, 236, 214, .025), 0 70px 100px -56px rgba(0, 0, 0, .98), 0 26px 44px -26px rgba(0, 0, 0, .9), 0 0 120px -50px rgba(var(--spot), .35);
  transform: perspective(1800px) rotateY(5deg) rotateX(1.5deg); transform-origin: 70% 50%;
  transition: transform 1.2s var(--ease-out);
}
.csd-stage:hover .csd-screen { transform: perspective(1800px) rotateY(0deg); }
.csd-screen__bar { display: flex; align-items: center; gap: 7px; height: 38px; padding-inline: 14px; border-bottom: 1px solid rgba(255, 236, 214, .08); background: linear-gradient(180deg, #1d1612, #120e0b); direction: ltr; }
.csd-screen__bar > i { flex: none; width: 10px; height: 10px; border-radius: 50%; background: var(--terra); }
.csd-screen__bar > i:nth-child(2) { background: var(--gold); }
.csd-screen__bar > i:nth-child(3) { background: var(--teal); }
.csd-screen__url { flex: 1; min-width: 0; height: 22px; margin-inline: 12px 10px; padding-inline: 12px; overflow: hidden; border-radius: 999px; background: rgba(255, 236, 214, .05); color: var(--text-2); font: 500 11.5px/22px var(--mono); letter-spacing: .04em; text-align: center; white-space: nowrap; text-overflow: ellipsis; }
.csd-screen__live { display: inline-flex; align-items: center; gap: 6px; font-size: 9.5px; letter-spacing: .18em; color: var(--text-2); }
.csd-screen__live .rec-dot { width: 6px; height: 6px; }
.csd-screen__view { position: relative; aspect-ratio: 16 / 10; overflow: hidden; background: #0b0908; }
.csd-screen__view img { width: 100%; height: 100%; object-fit: cover; object-position: 50% 0; animation: csd-pan 30s ease-in-out 1.5s infinite; }
.csd-screen__blank { display: grid; place-items: center; width: 100%; height: 100%; background: radial-gradient(circle at 50% 45%, rgba(224, 169, 95, .12), transparent 60%), repeating-linear-gradient(135deg, rgba(255, 236, 214, .03) 0 2px, transparent 2px 12px), #110d0b; }
.csd-screen__blank svg { width: 72px; height: 72px; opacity: .55; }
.csd-screen .frame-corners { inset: 52px 14px 14px; opacity: .4; }
.csd-transport { display: flex; align-items: center; gap: 14px; margin: 18px 6% 0; padding: 9px 16px; border-radius: 999px; border: 1px solid var(--line); background: rgba(255, 236, 214, .025); direction: ltr; }
.csd-transport__play { display: inline-flex; align-items: center; gap: 8px; color: var(--gold-l); font-size: 10px; letter-spacing: .2em; }
.csd-transport__play i { width: 0; height: 0; border-left: 8px solid var(--gold); border-block: 5px solid transparent; }
.csd-transport__track { position: relative; flex: 1; height: 3px; border-radius: 3px; background: rgba(255, 236, 214, .1); }
.csd-transport__track::before { content: ""; position: absolute; inset: 0; border-radius: inherit; background: var(--grad-fire); transform-origin: left; animation: csd-fill 30s linear 1.5s infinite; transform: scaleX(0); }
.csd-transport__track i { position: absolute; top: 50%; left: 0; width: 11px; height: 11px; margin: -5.5px 0 0 -5.5px; border-radius: 50%; background: var(--gold-l); box-shadow: 0 0 0 3px rgba(224, 169, 95, .2), 0 0 14px rgba(224, 169, 95, .7); animation: csd-head 30s linear 1.5s infinite; }
.csd-transport__reels { color: var(--muted); font-size: 10px; letter-spacing: .2em; }

/* registrar's card (museum index card) */
.csd-hero__card { position: relative; z-index: 2; margin-top: clamp(40px, 5vw, 68px); }
.csd-card {
  position: relative; padding: 18px clamp(22px, 3vw, 40px) 22px; padding-inline-start: clamp(46px, 4.6vw, 70px);
  color: var(--ink); border-radius: 4px;
  background: linear-gradient(180deg, #f5eee3, var(--paper) 45%, var(--paper-2));
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .06), 0 44px 70px -42px rgba(0, 0, 0, .95), 0 14px 26px -14px rgba(0, 0, 0, .7);
}
/* red margin rule of an index card */
.csd-card::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: clamp(30px, 3vw, 46px); width: 1px; background: rgba(194, 58, 53, .32); }
.csd-card__hole { position: absolute; top: 50%; inset-inline-start: clamp(9px, 1vw, 16px); width: 14px; height: 14px; margin-top: -7px; border-radius: 50%; background: var(--wall); box-shadow: inset 0 2px 3px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .6); }
.csd-card__head { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 6px 20px; padding-bottom: 10px; border-bottom: 1.5px solid rgba(194, 58, 53, .4); }
.csd-card__head .mono { color: var(--ink-gold); font-size: 10px; font-weight: 700; letter-spacing: .18em; direction: ltr; }
.csd-card__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 210px), 1fr)); column-gap: clamp(20px, 2.6vw, 40px); margin: 0; }
.csd-card__cell { padding: 14px 0 10px; border-bottom: 1px dashed rgba(28, 21, 17, .18); }
.csd-card__cell dt { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 10px; color: var(--ink-2); font-size: 13px; font-weight: 800; }
.csd-card__code { color: var(--ink-gold); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; direction: ltr; }
.csd-card__cell dd { margin: 6px 0 0; color: var(--ink); font-size: 16px; font-weight: 800; line-height: 1.85; text-align: start; }
.csd-card__credits { display: flex; align-items: flex-start; gap: 14px 22px; padding-top: 16px; }
.csd-card__label { flex: none; display: grid; gap: 2px; padding-top: 4px; color: var(--ink-2); font-size: 13px; font-weight: 800; }
.csd-card__label .mono { color: var(--ink-gold); font-size: 9.5px; font-weight: 700; letter-spacing: .16em; direction: ltr; }
.csd-stamps { display: flex; flex-wrap: wrap; gap: 10px 12px; }
.csd-stamps li {
  padding: 4px 12px 5px; border-radius: 4px; border: 1.5px solid rgba(159, 77, 62, .78);
  color: var(--stamp); background: rgba(159, 77, 62, .04); box-shadow: inset 0 0 0 2px rgba(239, 231, 219, .9), inset 0 0 0 3px rgba(159, 77, 62, .28);
  font-size: 13.5px; font-weight: 900; line-height: 1.7; rotate: var(--r, 0deg);
}

/* ---------- The cut: reel index + reels on a film spine ---------- */
.csd-cut {
  isolation: isolate; overflow: clip; padding-top: clamp(56px, 6vw, 96px);
  border-top: 1px solid var(--line);
  background: radial-gradient(50% 36% at 88% 0%, rgba(var(--spot), .045), transparent 70%), linear-gradient(180deg, #0b0807, #090605 60%, #0b0807);
}
.csd-cut__slate { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(36px, 4vw, 60px); color: var(--muted); }
.csd-cut__slate .mono { flex: none; font-size: 10.5px; letter-spacing: .22em; }
.csd-cut__slate .mono:first-child { color: var(--gold); }
.csd-cut__rule { flex: 1; height: 10px; background: radial-gradient(circle, rgba(255, 236, 214, .14) 0 2px, transparent 2.5px) 0 50% / 14px 10px repeat-x; }
.csd-cut__grid { display: grid; grid-template-columns: minmax(0, 300px) minmax(0, 1fr); align-items: start; gap: clamp(28px, 3.6vw, 64px); }
.csd-cut__grid.is-single { grid-template-columns: minmax(0, 1fr); max-width: 980px; margin-inline: auto; }

.csd-index { position: sticky; top: calc(var(--header-h) + 24px); display: grid; gap: 14px; }
.csd-index__panel { overflow: hidden; border-radius: 16px; border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(255, 236, 214, .04), rgba(255, 236, 214, .012)); }
/* film edge along the top of the index */
.csd-index__panel::before { content: ""; display: block; height: 14px; background: radial-gradient(circle, var(--hole) 0 2.6px, transparent 3px) 4px 50% / 14px 100% repeat-x, var(--film); border-bottom: 1px solid rgba(255, 236, 214, .06); }
.csd-index__sum { display: grid; gap: 4px; padding: 16px 18px 12px; list-style: none; cursor: pointer; }
.csd-index__sum::-webkit-details-marker { display: none; }
.csd-index__sum .mono { color: var(--gold); font-size: 10px; letter-spacing: .22em; }
.csd-index__title { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-size: 16.5px; font-weight: 900; }
.csd-index__count { padding: 2px 10px; border-radius: 999px; border: 1px solid var(--line-2); color: var(--muted); font-size: 12px; font-weight: 700; }
.csd-index__panel nav { padding: 0 8px 10px; }
.csd-index__panel nav a { display: grid; grid-template-columns: 40px minmax(0, 1fr); align-items: baseline; gap: 6px; padding: 9px 10px; border-radius: 10px; color: var(--text-2); font-size: 14px; line-height: 1.8; transition: color .3s, background-color .3s; }
.csd-index__panel nav a:hover { color: var(--text); background: rgba(255, 236, 214, .04); }
.csd-index__panel nav a.is-current { color: var(--text); background: rgba(224, 169, 95, .08); box-shadow: inset -2px 0 0 var(--gold); }
.csd-index__no { color: var(--muted); font-size: 10px; letter-spacing: .12em; direction: ltr; text-align: start; }
.csd-index__panel nav a.is-current .csd-index__no { color: var(--gold-l); }
.csd-index__cta { width: 100%; }

/* native projects: call sheet (method) */
.csd-call { padding: 20px 20px 22px; border-radius: 16px; border: 1px solid var(--line-2); background: rgba(255, 236, 214, .025); }
.csd-call__tag { display: flex; align-items: center; justify-content: space-between; gap: 10px; color: var(--gold); font-size: 13px; font-weight: 800; }
.csd-call__tag .mono { color: var(--muted); font-size: 10px; letter-spacing: .2em; }
.csd-call__title { margin-top: 8px; font-size: 18px; font-weight: 900; line-height: 1.6; }
.csd-call__list { display: grid; gap: 10px; margin-top: 14px; counter-reset: csd-call; }
.csd-call__list li { position: relative; display: grid; gap: 2px; padding-inline-start: 34px; counter-increment: csd-call; }
.csd-call__list li::before { content: counter(csd-call, persian); position: absolute; top: 2px; inset-inline-start: 0; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; background: var(--gold); color: #1a0d08; font-size: 12px; font-weight: 900; }
.csd-call__list strong { font-size: 15px; font-weight: 800; }
.csd-call__list span { color: var(--text-2); font-size: 13.5px; }

.csd-reels { position: relative; min-width: 0; padding-inline-start: 80px; }
/* the film spine: sprocket holes on both edges, a lit core */
.csd-spine {
  position: absolute; inset-block: 6px 0; inset-inline-start: 14px; width: 36px; border-radius: 4px; pointer-events: none;
  background:
    repeating-linear-gradient(180deg, var(--hole) 0 8px, transparent 8px 18px) 5px 0 / 6px 100% no-repeat,
    repeating-linear-gradient(180deg, var(--hole) 0 8px, transparent 8px 18px) calc(100% - 5px) 0 / 6px 100% no-repeat,
    linear-gradient(90deg, transparent 15px, rgba(224, 169, 95, .14) 15px 21px, transparent 21px),
    var(--film);
  box-shadow: inset 0 0 0 1px rgba(255, 236, 214, .05);
  -webkit-mask-image: linear-gradient(#000 85%, transparent); mask-image: linear-gradient(#000 85%, transparent);
}
.csd-reel {
  --accent: var(--gold);
  position: relative; margin-bottom: clamp(28px, 3vw, 44px); padding: clamp(24px, 2.8vw, 40px) clamp(22px, 3vw, 44px) clamp(26px, 3vw, 42px);
  border-radius: 18px; border: 1px solid var(--line);
  background: linear-gradient(165deg, rgba(255, 236, 214, .04), rgba(255, 236, 214, .012) 55%, rgba(255, 236, 214, .02));
  box-shadow: 0 40px 70px -50px rgba(0, 0, 0, .9);
}
.csd-reel::before { content: ""; position: absolute; top: -1px; inset-inline: 28px; height: 2px; border-radius: 2px; background: linear-gradient(90deg, transparent, var(--accent), transparent); opacity: .55; }
/* frame-line marker connecting the reel to the spine */
.csd-reel::after { content: ""; position: absolute; top: clamp(50px, 3.6vw, 62px); inset-inline-start: -34px; width: 34px; height: 1px; background: linear-gradient(90deg, var(--accent), transparent); opacity: .5; }
[dir="rtl"] .csd-reel::after, :root:not([dir="ltr"]) .csd-reel::after { background: linear-gradient(270deg, var(--accent), transparent); }
.csd-reel__head { display: flex; align-items: center; gap: 14px; }
.csd-reel__badge { position: absolute; z-index: 1; top: clamp(22px, 2.4vw, 34px); inset-inline-start: -86px; display: grid; place-items: center; width: 56px; height: 56px; }
.csd-reel__can {
  position: absolute; inset: 0; border-radius: 50%; border: 2px solid var(--accent);
  background:
    radial-gradient(circle at 50% 50%, #0b0807 0 12px, transparent 12.5px),
    radial-gradient(circle at 50% 19%, var(--hole) 0 6px, transparent 6.5px),
    radial-gradient(circle at 77% 66%, var(--hole) 0 6px, transparent 6.5px),
    radial-gradient(circle at 23% 66%, var(--hole) 0 6px, transparent 6.5px),
    conic-gradient(from 20deg, #3b2f27, #7d6141, #3b2f27, #5f4a33, #3b2f27, #74593c, #3b2f27);
  box-shadow: 0 0 0 5px #0b0807, 0 0 26px -6px var(--accent);
  transition: rotate 2.2s var(--ease-out) .2s;
}
.csd-reel.is-in .csd-reel__can, .reveal-all .csd-reel__can { rotate: 240deg; }
.csd-reel__badge b { position: relative; color: var(--text); font-size: 12.5px; font-weight: 900; line-height: 1; }
.csd-reel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; }
.csd-reel__code { padding: 4px 9px; border-radius: 6px; border: 1px solid var(--line-2); color: var(--muted); font-size: 10px; letter-spacing: .16em; direction: ltr; }
.csd-reel__eyebrow { color: var(--accent); font-size: 14px; font-weight: 800; }
.csd-reel__title { margin-top: 12px; font-size: clamp(1.5rem, 1.02rem + 1.45vw, 2.4rem); font-weight: 900; line-height: 1.5; text-wrap: balance; }
.csd-reel__logline { max-width: 64ch; margin-top: 16px; padding-inline-start: 18px; border-inline-start: 2px solid var(--accent); color: var(--text); font-size: clamp(1.05rem, .98rem + .32vw, 1.22rem); font-weight: 500; line-height: 2.05; text-wrap: pretty; }
.csd-reel__body { max-width: 72ch; margin-top: 20px; }
.csd-reel__body > p { color: var(--text-2); font-size: 16px; line-height: 2.1; text-wrap: pretty; }
.csd-reel__body > * + * { margin-top: 14px; }
.csd-reel__body > .csd-shots, .csd-reel__body > .csd-screens, .csd-reel__body > .csd-note { margin-top: 24px; }
.csd-reel__sub { margin-top: 24px; font-size: 1.15rem; font-weight: 900; line-height: 1.6; }
.csd-reel__quote { padding: 14px 18px; border-radius: 12px; border: 1px solid var(--line-2); color: var(--text); background: rgba(224, 169, 95, .05); }
.csd-reel__body a:not(.link-arrow) { color: var(--gold-l); border-bottom: 1px solid rgba(224, 169, 95, .35); }
.csd-reel--conflict { border-color: rgba(224, 122, 92, .2); background: radial-gradient(70% 60% at 100% 0%, rgba(210, 106, 78, .07), transparent 70%), linear-gradient(165deg, rgba(255, 236, 214, .04), rgba(255, 236, 214, .012) 55%); }
.csd-reel--conflict .csd-reel__code { color: var(--terra-l); border-color: rgba(224, 122, 92, .45); background: rgba(210, 106, 78, .06); }

/* shot list */
.csd-shots { overflow: hidden; border-radius: 12px; border: 1px solid var(--line-2); background: rgba(9, 6, 5, .55); }
.csd-shots__head { display: flex; justify-content: space-between; gap: 12px; padding: 8px 16px; border-bottom: 1px solid var(--line); background: repeating-linear-gradient(135deg, rgba(255, 236, 214, .03) 0 6px, transparent 6px 12px); }
.csd-shots__head .mono { color: var(--muted); font-size: 9.5px; letter-spacing: .22em; }
.csd-shots__list li { display: grid; grid-template-columns: 70px minmax(0, 1fr); align-items: baseline; gap: 12px; padding: 12px 16px; }
.csd-shots__list li + li { border-top: 1px dashed rgba(255, 236, 214, .08); }
.csd-shots__no { color: var(--accent); font-size: 9.5px; letter-spacing: .12em; direction: ltr; text-align: start; }
.csd-shots__txt { color: var(--text); font-size: 15.5px; line-height: 1.95; }

/* continuity note (evidence scope) — paper slip with a clip */
.csd-note {
  position: relative; max-width: 560px; margin-top: 22px; padding: 22px 24px 18px; border-radius: 3px; color: var(--ink); rotate: -.7deg;
  background: linear-gradient(180deg, rgba(194, 58, 53, .28), rgba(194, 58, 53, .28)) 0 40px / 100% 1px no-repeat, linear-gradient(180deg, #f7f0e5, var(--paper));
  box-shadow: 0 26px 40px -26px rgba(0, 0, 0, .9), 0 6px 14px -8px rgba(0, 0, 0, .6);
}
.csd-note__clip { position: absolute; top: -14px; inset-inline-end: 22px; width: 16px; height: 44px; border: 2.5px solid #b8b0a3; border-radius: 9px; box-shadow: 0 2px 3px rgba(0, 0, 0, .4); }
.csd-note__clip::after { content: ""; position: absolute; inset: 7px 2px 3px; border: 2px solid #9d958a; border-radius: 6px; border-top-color: transparent; }
.csd-note__tag { color: var(--ink-gold); font-size: 9.5px; font-weight: 700; letter-spacing: .2em; }
.csd-note__title { margin-top: 12px; font-size: 15.5px; line-height: 1.8; }
.csd-note__title strong { font-weight: 900; }
.csd-note__text { margin-top: 4px; color: var(--ink-2); font-size: 14.5px; line-height: 2; }

/* device stage (screenshots inside a reel) */
.csd-screens { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 22px; }
.csd-device { min-width: 0; margin: 0; }
.csd-device--desk { flex: 1 1 320px; }
.csd-device--phone { flex: 0 1 clamp(150px, 26%, 230px); }
.csd-device__frame { position: relative; overflow: hidden; border-radius: 12px; border: 1px solid var(--line-2); background: #0b0908; box-shadow: 0 40px 60px -40px rgba(0, 0, 0, .95); }
.csd-device__bar { display: flex; align-items: center; gap: 6px; height: 26px; padding-inline: 12px; background: #15100d; border-bottom: 1px solid rgba(255, 236, 214, .06); direction: ltr; }
.csd-device__bar i { width: 8px; height: 8px; border-radius: 50%; background: rgba(255, 236, 214, .16); }
.csd-device__view img { width: 100%; height: auto; }
.csd-device--phone .csd-device__frame { border-radius: 30px; border: 7px solid #1a1512; box-shadow: 0 0 0 1px rgba(255, 236, 214, .14), 0 40px 60px -36px rgba(0, 0, 0, .95); }
.csd-device--phone .csd-device__frame::before { content: ""; position: absolute; top: 8px; left: 50%; z-index: 1; width: 34%; height: 14px; margin-left: -17%; border-radius: 999px; background: #0b0807; }
.csd-device figcaption { display: flex; align-items: baseline; gap: 8px; margin-top: 12px; color: var(--text-2); font-size: 13.5px; line-height: 1.9; }
.csd-device figcaption .mono { flex: none; color: var(--gold); font-size: 9.5px; letter-spacing: .14em; direction: ltr; }

/* native: logline + prose reel */
.csd-verdict { display: flex; align-items: flex-start; gap: 16px; margin-bottom: 28px; padding: 22px 24px; border-radius: 18px; border: 1px solid rgba(224, 169, 95, .28); background: rgba(224, 169, 95, .05); }
.csd-verdict__icon { flex: none; display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; background: var(--grad-fire); color: #1a0d08; }
.csd-verdict__label { display: flex; gap: 10px; align-items: baseline; color: var(--gold); font-size: 13px; font-weight: 800; }
.csd-verdict__label .mono { color: var(--muted); font-size: 9.5px; letter-spacing: .2em; }
.csd-verdict__text { margin-top: 6px; color: var(--text); font-size: 16.5px; line-height: 2; }
.csd-prose { max-width: none; margin: 16px 0 0; }
.csd-reels__end { display: flex; align-items: center; gap: 14px; margin-top: 8px; color: var(--muted); font-size: 10px; letter-spacing: .3em; }
.csd-reels__end::before, .csd-reels__end::after { content: ""; flex: 1; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.csd-reels__end::after { background: linear-gradient(270deg, transparent, var(--line-2)); }

/* ---------- End credits (deliverables) ---------- */
.csd-credits { isolation: isolate; overflow: clip; text-align: center; background: #060404; border-top: 1px solid var(--line); }
.csd-credits__bars { position: absolute; inset: 0; z-index: -1; pointer-events: none; background: radial-gradient(46% 55% at 50% 0%, rgba(var(--spot), .075), transparent 72%), linear-gradient(180deg, #000 0, transparent 12%, transparent 88%, #000 100%); }
.csd-credits__roll { max-width: 880px; margin-inline: auto; }
.csd-credits__studio { color: var(--muted); font-size: 10.5px; letter-spacing: .34em; }
.csd-credits__kicker { justify-content: center; margin: 24px 0 0; }
.csd-credits__title { margin-top: 10px; font-size: clamp(2rem, 1.1rem + 2.6vw, 3.4rem); font-weight: 900; line-height: 1.38; text-wrap: balance; }
.csd-credits__list { display: grid; gap: 2px; margin-top: clamp(34px, 4vw, 56px); }
.csd-credits__list li { display: grid; grid-template-columns: minmax(0, 1fr) 22px minmax(0, 1fr); align-items: center; gap: 16px; padding: 11px 0; }
.csd-credits__role { justify-self: end; color: var(--gold); font-size: 10px; letter-spacing: .22em; direction: ltr; }
.csd-credits__dot { justify-self: center; width: 6px; height: 6px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 12px rgba(224, 169, 95, .8); opacity: .75; }
.csd-credits__name { justify-self: start; color: var(--text); font-size: clamp(1.02rem, .96rem + .3vw, 1.2rem); font-weight: 800; line-height: 1.85; text-align: start; }
.csd-credits__fin { display: flex; align-items: center; justify-content: center; gap: 18px; margin-top: clamp(40px, 4.4vw, 60px); color: var(--muted); font-size: 11px; letter-spacing: .6em; }
.csd-credits__fin span { width: 90px; height: 1px; background: linear-gradient(90deg, transparent, var(--line-2)); }
.csd-credits__fin span:last-child { background: linear-gradient(270deg, transparent, var(--line-2)); }
.csd-post { max-width: 640px; margin: clamp(40px, 4vw, 56px) auto 0; padding: 26px 28px; border-radius: 18px; border: 1px dashed var(--line-2); text-align: start; }
.csd-post__tag { display: flex; gap: 10px; align-items: baseline; color: var(--gold); font-size: 13px; font-weight: 800; }
.csd-post__tag .mono { color: var(--muted); font-size: 9.5px; letter-spacing: .2em; }
.csd-post__title { margin-top: 8px; font-size: 1.35rem; font-weight: 900; line-height: 1.6; }
.csd-post__text { margin-top: 8px; color: var(--text-2); line-height: 2; }
.csd-post .btn { margin-top: 16px; }

/* ---------- Now showing (neighbouring exhibits) ---------- */
.csd-next {
  isolation: isolate; overflow: clip; padding-block: clamp(64px, 7vw, 108px); border-top: 1px solid var(--line);
  background: radial-gradient(40% 70% at 20% 0%, rgba(var(--spot), .05), transparent 70%), radial-gradient(40% 70% at 80% 0%, rgba(var(--spot), .05), transparent 70%), var(--wall);
}
.csd-next__head { display: flex; align-items: center; gap: 16px; margin-bottom: clamp(26px, 3vw, 40px); color: var(--muted); }
.csd-next__head .mono { flex: none; font-size: 10.5px; letter-spacing: .22em; }
.csd-next__head .mono:first-child { color: var(--gold); }
.csd-next__rule { flex: 1; height: 1px; background: var(--line-2); }
.csd-next__grid { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: stretch; gap: clamp(16px, 2.2vw, 30px); }
.csd-trailer {
  position: relative; display: grid; grid-template-columns: minmax(0, 44%) minmax(0, 1fr) auto; align-items: center; gap: 18px; padding: 14px;
  border-radius: 18px; border: 1px solid var(--line-2); background: rgba(255, 236, 214, .025);
  transition: transform .5s var(--ease-out), border-color .4s, background-color .4s;
}
.csd-trailer:hover { transform: translateY(-4px); border-color: rgba(224, 169, 95, .45); background: rgba(224, 169, 95, .04); }
.csd-trailer__screen { position: relative; overflow: hidden; aspect-ratio: 3 / 2; border-radius: 10px; background: #0b0908; box-shadow: 0 0 0 1px rgba(255, 236, 214, .1), 0 24px 34px -24px rgba(0, 0, 0, .9); }
.csd-trailer__screen img { width: 100%; height: 100%; object-fit: cover; object-position: top center; transition: transform 1.2s var(--ease-out); }
.csd-trailer:hover .csd-trailer__screen img { transform: scale(1.05); }
.csd-trailer__blank { display: grid; place-items: center; width: 100%; height: 100%; background: #110d0b; }
.csd-trailer__blank svg { width: 40px; height: 40px; opacity: .5; }
.csd-trailer__code { position: absolute; bottom: 8px; inset-inline-start: 8px; padding: 3px 7px; border-radius: 5px; background: rgba(9, 6, 5, .8); color: var(--gold-l); font-size: 8.5px; letter-spacing: .14em; direction: ltr; }
.csd-trailer__meta { display: grid; gap: 3px; min-width: 0; }
.csd-trailer__meta small { color: var(--muted); font-size: 12.5px; font-weight: 700; }
.csd-trailer__meta strong { overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; font-size: 17px; font-weight: 900; line-height: 1.65; }
.csd-trailer__dom { justify-self: start; color: var(--muted); font-size: 11px; }
.csd-trailer__go { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 50%; border: 1px solid var(--line-2); color: var(--gold-l); transition: background-color .3s, color .3s; }
.csd-trailer:hover .csd-trailer__go { background: var(--gold); color: #1a0d08; }
.csd-trailer--prev .csd-trailer__go .ico { transform: scaleX(-1); }
.csd-door {
  display: grid; justify-items: center; align-content: center; gap: 6px; min-width: 156px; padding: 26px 22px 20px; text-align: center;
  border-radius: 90px 90px 14px 14px; border: 1px solid var(--line-2);
  background: linear-gradient(180deg, rgba(var(--spot), .09), rgba(255, 236, 214, .02) 70%);
  transition: border-color .4s, transform .5s var(--ease-out);
}
.csd-door:hover { transform: translateY(-4px); border-color: rgba(224, 169, 95, .5); }
.csd-door__arch .ico { width: 26px; height: 26px; color: var(--gold); }
.csd-door__code { color: var(--muted); font-size: 9.5px; letter-spacing: .2em; }
.csd-door__name { font-size: 14.5px; font-weight: 800; line-height: 1.7; }

/* ---------- CTA: a new case file ---------- */
.csd-cta__visual { min-height: 380px; }
.csd-folder { position: relative; width: min(100%, 390px); aspect-ratio: 5 / 4; perspective: 1200px; }
.csd-folder__back { position: absolute; inset: 9% 0 0; border-radius: 6px 6px 12px 12px; background: linear-gradient(180deg, #a77a42, #8c6434); box-shadow: 0 50px 70px -36px rgba(0, 0, 0, .98); }
.csd-folder__tab { position: absolute; bottom: 100%; inset-inline-start: 9%; padding: 7px 16px 5px; border-radius: 9px 9px 0 0; background: #a77a42; color: #3a2612; font-size: 9.5px; font-weight: 700; letter-spacing: .16em; white-space: nowrap; direction: ltr; }
.csd-folder__sheet {
  position: absolute; inset: 13% 7% 12%; display: grid; grid-template-columns: 36% minmax(0, 1fr); align-items: start; gap: 8%; padding: 9% 8%;
  border-radius: 3px; background: linear-gradient(180deg, #f7f0e5, var(--paper)); box-shadow: 0 12px 22px -12px rgba(0, 0, 0, .7);
  translate: 0 22%; transition: translate 1.6s var(--ease-out) .35s;
}
.csd-folder__photo { display: grid; place-items: center; aspect-ratio: 3 / 4; background: radial-gradient(circle at 50% 45%, rgba(224, 169, 95, .25), transparent 65%), #1a1410; box-shadow: 0 0 0 5px #fffaf3, 0 3px 10px rgba(0, 0, 0, .35); rotate: -4deg; }
.csd-folder__photo svg { width: 48%; height: auto; }
.csd-folder__lines { display: grid; gap: 11px; padding-top: 6px; }
.csd-folder__lines i { height: 6px; border-radius: 3px; background: rgba(28, 21, 17, .14); }
.csd-folder__lines i:nth-child(2) { width: 82%; }
.csd-folder__lines i:nth-child(3) { width: 92%; }
.csd-folder__lines i:nth-child(4) { width: 58%; }
.csd-folder__front {
  position: absolute; inset: 36% 0 0; display: grid; align-items: end; justify-items: start; padding: 7%;
  border-radius: 4px 4px 12px 12px; transform-origin: 50% 100%;
  background: linear-gradient(180deg, #d4a867, #b98a4e 55%, #a77a42);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .3), 0 -12px 26px -14px rgba(0, 0, 0, .7);
  transition: transform 1.6s var(--ease-out) .2s;
}
.csd-folder__label { display: grid; gap: 3px; padding: 10px 16px; border-radius: 3px; background: var(--paper); color: var(--ink); box-shadow: 0 4px 10px -4px rgba(0, 0, 0, .4); }
.csd-folder__label b { font-size: 15.5px; font-weight: 900; line-height: 1.6; }
.csd-folder__label small { color: var(--ink-gold); font-size: 8.5px; font-weight: 700; letter-spacing: .16em; direction: ltr; }
.csd-folder__stamp { position: absolute; top: 44%; inset-inline-end: 7%; padding: 5px 14px; border-radius: 6px; border: 2.5px solid #c23a35; color: #c23a35; font-size: 18px; font-weight: 900; line-height: 1.6; rotate: -9deg; opacity: 0; scale: 1.6; transition: opacity .35s 1.3s, scale .55s var(--ease-snap) 1.3s; }
.csd-folder.is-in .csd-folder__sheet, .reveal-all .csd-folder__sheet { translate: 0 0; }
.csd-folder.is-in .csd-folder__front, .reveal-all .csd-folder__front { transform: rotateX(18deg); }
.csd-folder.is-in .csd-folder__stamp, .reveal-all .csd-folder__stamp { opacity: .9; scale: 1; }
.csd-folder.is-in .csd-folder__sheet { animation: csd-sheet 7s ease-in-out 2.2s infinite alternate; }

/* ---------- Motion ---------- */
@keyframes csd-pan { 0%, 14% { object-position: 50% 0; } 50%, 64% { object-position: 50% 100%; } 100% { object-position: 50% 0; } }
@keyframes csd-fill { from { transform: scaleX(0); } to { transform: scaleX(1); } }
@keyframes csd-head { from { left: 0; } to { left: 100%; } }
@keyframes csd-flicker { 0%, 100% { opacity: 1; } 41% { opacity: .82; } 42% { opacity: 1; } 77% { opacity: .9; } 78% { opacity: 1; } }
@keyframes csd-sheet { from { translate: 0 0; } to { translate: 0 -5%; } }
.js .csd-stage .csd-screen { opacity: 0; }
.is-ready .csd-stage .csd-screen { opacity: 1; transition: opacity 1.2s var(--ease-out) .35s, transform 1.2s var(--ease-out); }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .csd-hero__inner { grid-template-columns: minmax(0, 1fr); }
  .csd-hero__copy { max-width: 760px; }
  .csd-stage { width: 100%; max-width: 760px; }
  .csd-screen, .csd-stage:hover .csd-screen { transform: none; }
  .csd-hero__lamp { left: 0; width: 100%; height: 100%; opacity: .6; }
  .csd-cut__grid { grid-template-columns: minmax(0, 1fr); }
  .csd-index { position: static; grid-template-columns: minmax(0, 1fr) auto; align-items: start; }
  .csd-index:not(:has(.csd-index__panel)) { grid-template-columns: minmax(0, 1fr); }
  .csd-index__cta { width: auto; }
  .csd-next__grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .csd-door { grid-column: 1 / -1; grid-row: 2; grid-template-columns: auto auto 1fr; justify-items: start; align-items: center; gap: 12px; min-width: 0; padding: 14px 20px; border-radius: 14px; text-align: start; }
  .csd-door .csd-door__name { justify-self: end; }
}
@media (max-width: 860px) {
  .csd-index { grid-template-columns: minmax(0, 1fr); }
  .csd-index__cta { width: 100%; }
  .csd-next__grid { grid-template-columns: minmax(0, 1fr); }
  .csd-door { grid-row: auto; }
  .csd-card__credits { flex-direction: column; gap: 10px; }
}
@media (max-width: 640px) {
  .csd-hero { padding-top: calc(var(--header-h) + 44px); }
  .csd-title { font-size: clamp(1.9rem, 1rem + 5.6vw, 2.6rem); }
  .csd-hero__cta .btn { flex: 1 1 100%; }
  .csd-stage { padding-top: 26px; }
  .csd-stage::before { width: 70px; margin-left: -35px; height: 10px; }
  .csd-screen { border-radius: 12px; box-shadow: 0 0 0 5px rgba(255, 236, 214, .025), 0 50px 70px -44px rgba(0, 0, 0, .98); }
  .csd-screen__bar { height: 32px; padding-inline: 10px; }
  .csd-screen__live { display: none; }
  .csd-screen .frame-corners { display: none; }
  .csd-transport { margin-inline: 0; padding: 8px 12px; gap: 10px; }
  .csd-card { padding: 16px 16px 18px; padding-inline-start: 34px; }
  .csd-card::before { inset-inline-start: 22px; }
  .csd-card__hole { display: none; }
  .csd-cut__slate .mono:last-child { display: none; }
  .csd-reels { padding-inline-start: 0; }
  .csd-spine, .csd-reel::after { display: none; }
  .csd-reel { padding: 22px 18px 24px; border-radius: 16px; }
  .csd-reel__badge { position: relative; top: auto; inset-inline-start: auto; flex: none; width: 46px; height: 46px; }
  .csd-reel__can { box-shadow: 0 0 22px -6px var(--accent); background: radial-gradient(circle at 50% 50%, #0b0807 0 10px, transparent 10.5px), radial-gradient(circle at 50% 19%, var(--hole) 0 5px, transparent 5.5px), radial-gradient(circle at 77% 66%, var(--hole) 0 5px, transparent 5.5px), radial-gradient(circle at 23% 66%, var(--hole) 0 5px, transparent 5.5px), conic-gradient(from 20deg, #3b2f27, #7d6141, #3b2f27, #5f4a33, #3b2f27, #74593c, #3b2f27); }
  .csd-reel__badge b { font-size: 11px; }
  .csd-reel__code { white-space: nowrap; letter-spacing: .08em; }
  .csd-reel__title { font-size: clamp(1.35rem, 1rem + 2.6vw, 1.7rem); }
  .csd-reel__logline { padding-inline-start: 14px; font-size: 1.04rem; }
  .csd-reel__body > p { font-size: 15.5px; }
  .csd-shots__list li { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 14px; }
  .csd-note { padding: 20px 18px 16px; rotate: -.5deg; }
  .csd-device--phone { flex-basis: 46%; margin-inline: auto; }
  .csd-credits__list li { grid-template-columns: minmax(0, 1fr); gap: 2px; padding: 12px 0; border-bottom: 1px solid var(--line); }
  .csd-credits__role, .csd-credits__name { justify-self: center; text-align: center; }
  .csd-credits__dot { display: none; }
  .csd-trailer { grid-template-columns: minmax(0, 40%) minmax(0, 1fr); gap: 14px; padding: 10px; }
  .csd-trailer__go { display: none; }
  .csd-trailer__meta strong { font-size: 15.5px; }
  .csd-door { grid-template-columns: auto 1fr; }
  .csd-door__code { display: none; }
  .csd-cta__visual { min-height: 0; justify-items: center; }
  .csd-folder { width: min(100%, 320px); margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .csd-screen__view img, .csd-stage__beam, .csd-transport__track::before, .csd-transport__track i, .csd-folder__sheet { animation: none !important; }
  .csd-transport__track::before { transform: scaleX(.35); }
  .csd-transport__track i { left: 35%; }
  .csd-reel__can, .csd-folder__sheet, .csd-folder__front, .csd-folder__stamp { transition: none !important; }
  .js .csd-stage .csd-screen { opacity: 1; }
  .csd-folder__sheet { translate: 0 0; }
  .csd-folder__front { transform: rotateX(18deg); }
  .csd-folder__stamp { opacity: .9; scale: 1; }
}
