/* /films: the studio catalogue, laid out like a streaming home page.
   Billboard, horizontal rails, cards that lift and open on hover, a detail sheet, a player.
   Same brand as site.css: ink and gold, Playfair over Source Sans, glass, grain, no drawn lines. */

.films-page { background: #120F0B; }

/* ---------- billboard ---------- */
.bb { position: relative; min-height: min(92vh, 860px); display: flex; align-items: flex-end; overflow: hidden; isolation: isolate; }
.bb-art { position: absolute; inset: 0; z-index: -2; }
.bb-art img { width: 100%; height: 100%; object-fit: cover; object-position: 60% 40%; }
@media (prefers-reduced-motion: no-preference) {
  .bb-art img { animation: bbdrift 40s var(--ease) infinite alternate; transform-origin: 70% 40%; }
  @keyframes bbdrift { from { transform: scale(1.04) translate3d(0,0,0); } to { transform: scale(1.14) translate3d(-2%, 1%, 0); } }
}
.bb-shade {
  position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, rgba(18,15,11,0.92) 0%, rgba(18,15,11,0.62) 34%, rgba(18,15,11,0) 68%),
    linear-gradient(180deg, rgba(18,15,11,0.55) 0%, rgba(18,15,11,0) 22%, rgba(18,15,11,0) 58%, #120F0B 100%);
}
.bb-inner { position: relative; z-index: 1; padding-bottom: clamp(56px, 12vh, 120px); padding-top: 120px; }
.bb-kicker { display: inline-flex; align-items: center; gap: 8px; font: 700 13px/1 var(--body); letter-spacing: 0.24em; text-transform: uppercase; color: var(--gold); margin-bottom: 14px; }
.bb-kicker img { width: auto; height: 19px; filter: drop-shadow(0 0 8px rgba(247,189,46,0.5)); }
.bb-title {
  font: 600 clamp(52px, 8.6vw, 124px)/0.92 var(--display); letter-spacing: -0.02em; max-width: 9ch;
  color: #FFF6E2; text-shadow: 0 6px 40px rgba(0,0,0,0.55), 0 0 60px rgba(247,189,46,0.18);
}
.bb-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 14px; margin-top: 18px; font: 600 16px/1.2 var(--body); color: var(--muted); }
.bb-meta .new, .card-meta .new { color: #7FD08A; font-weight: 700; }
.bb-meta .chip { border: 1px solid rgba(232,226,214,0.45); border-radius: 4px; padding: 3px 7px; font-size: 12.5px; letter-spacing: 0.04em; }
.bb-syn { margin-top: 16px; max-width: 46ch; font-size: clamp(17px, 1.5vw, 20px); line-height: 1.55; color: var(--paper); text-shadow: 0 2px 16px rgba(0,0,0,0.7); }
.bb-cta { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-top: 26px; }
.bb-cta .btn { min-height: 50px; padding: 0 26px; font-size: 17px; border-radius: 8px; }
.bb-cta .btn svg { width: 22px; height: 22px; }

/* ---------- rails ---------- */
.rows { position: relative; z-index: 2; margin-top: -60px; padding-bottom: 80px; }
.row { margin-bottom: clamp(26px, 4vw, 44px); }
.row-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 16px; margin-bottom: 4px; }
.row-head h2 { font: 600 clamp(20px, 2vw, 26px)/1.2 var(--body); letter-spacing: 0; color: var(--paper-2); }
.row-note { font-size: 14.5px; color: var(--faint); }

.rail { position: relative; }
.track {
  --gap: 10px;
  display: flex; gap: var(--gap);
  overflow-x: auto; overscroll-behavior-x: contain; scroll-snap-type: x mandatory; scroll-behavior: smooth;
  scrollbar-width: none;
  padding: 26px max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
  scroll-padding-inline: max(var(--gutter), calc((100vw - var(--wrap)) / 2 + var(--gutter)));
}
.track::-webkit-scrollbar { display: none; }

.rail-btn {
  position: absolute; top: 26px; bottom: 26px; z-index: 6; width: clamp(40px, 4vw, 56px);
  display: grid; place-items: center; border: 0; cursor: pointer; color: #fff;
  background: rgba(18,15,11,0.55); opacity: 0; transition: opacity 0.25s var(--ease), background 0.2s;
}
.rail-btn.prev { left: 0; border-radius: 0 8px 8px 0; }
.rail-btn.next { right: 0; border-radius: 8px 0 0 8px; }
.rail-btn svg { width: 30px; height: 30px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; transition: transform 0.2s var(--ease); }
.rail-btn:hover { background: rgba(18,15,11,0.8); }
.rail-btn:hover svg { transform: scale(1.2); }
.rail:hover .rail-btn, .rail-btn:focus-visible { opacity: 1; }
@media (hover: none) { .rail-btn { display: none; } }

/* ---------- cards ---------- */
.fcard {
  --w: clamp(230px, 23vw, 300px);
  position: relative; flex: 0 0 var(--w); aspect-ratio: 16 / 9;
  border-radius: 8px; overflow: hidden; scroll-snap-align: start;
  background: var(--ink-2);
  box-shadow: 0 10px 24px rgba(0,0,0,0.4);
  transition: transform 0.35s var(--ease), box-shadow 0.35s var(--ease);
  transform-origin: center;
}
.fcard.wide { --w: clamp(300px, 42vw, 560px); }
.fcard.tall { --w: clamp(150px, 15vw, 210px); aspect-ratio: 2 / 3; }
.fcard img { width: 100%; height: 100%; object-fit: cover; transition: transform 0.8s var(--ease), filter 0.35s; }
.fcard::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(180deg, transparent 45%, rgba(10,8,5,0.9)); opacity: 0.55; transition: opacity 0.35s; }
.card-hit { position: absolute; inset: 0; z-index: 3; background: none; border: 0; padding: 0; cursor: pointer; border-radius: inherit; }
.card-info { position: absolute; left: 0; right: 0; bottom: 0; z-index: 4; padding: 12px 14px 12px; pointer-events: none; }
.card-info .ic, .card-info .ic-play, .card-info [data-save] { pointer-events: auto; }
.card-title { font: 700 15.5px/1.25 var(--body); color: #fff; text-shadow: 0 2px 10px rgba(0,0,0,0.8); }
.card-meta { font-size: 13px; line-height: 1.35; color: var(--muted); margin-top: 2px; opacity: 0; transform: translateY(6px); transition: opacity 0.3s, transform 0.3s var(--ease); }
.card-acts { display: flex; gap: 8px; margin-bottom: 10px; opacity: 0; transform: translateY(8px); transition: opacity 0.3s, transform 0.3s var(--ease); }
.card-acts .ic-more { margin-left: auto; }

.fcard:hover, .fcard:focus-within { transform: scale(1.07); z-index: 5; box-shadow: 0 22px 50px rgba(0,0,0,0.65), 0 0 0 1px rgba(247,189,46,0.35), 0 0 40px rgba(247,189,46,0.16); }
.fcard:hover img, .fcard:focus-within img { transform: scale(1.06); }
.fcard:hover::after, .fcard:focus-within::after { opacity: 1; }
.fcard:hover .card-meta, .fcard:focus-within .card-meta,
.fcard:hover .card-acts, .fcard:focus-within .card-acts { opacity: 1; transform: none; }
.track .fcard:first-child:hover, .track .fcard:first-child:focus-within { transform-origin: left center; }
.track .fcard:last-child:hover, .track .fcard:last-child:focus-within { transform-origin: right center; }
@media (hover: none) { .card-meta { opacity: 1; transform: none; } .card-acts { opacity: 1; transform: none; } }

/* round icon buttons */
.ic {
  width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; cursor: pointer;
  color: #fff; background: rgba(26,23,18,0.6); border: 2px solid rgba(232,226,214,0.6);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px);
  transition: border-color 0.2s, background 0.2s, transform 0.2s var(--ease);
}
.ic:hover { border-color: #fff; transform: scale(1.08); }
.ic svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; stroke-linejoin: round; }
.ic-play { background: var(--gold); border-color: var(--gold); color: #1A1305; }
.ic-play svg { fill: currentColor; stroke: none; }
.ic-play:hover { background: #FFD25C; border-color: #FFD25C; }
.ic-lg { width: 50px; height: 50px; }
.ic .tick { display: none; }
.ic.on .plus { display: none; }
.ic.on .tick { display: inline; }
.ic.on { border-color: var(--gold); color: var(--gold); }

/* badges */
.badge-new, .badge-soon {
  position: absolute; top: 10px; left: 10px; z-index: 4; pointer-events: none;
  font: 700 11.5px/1 var(--body); letter-spacing: 0.12em; text-transform: uppercase;
  padding: 6px 9px; border-radius: 4px;
}
.badge-new { background: var(--gold); color: #1A1305; box-shadow: 0 6px 18px rgba(247,189,46,0.35); }
.badge-soon { background: rgba(18,15,11,0.72); color: var(--gold); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.remind { display: inline-flex; align-items: center; gap: 6px; margin-top: 8px; font: 700 13px/1 var(--body); color: var(--gold); opacity: 0; transition: opacity 0.3s; }
.remind svg { width: 16px; height: 16px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linejoin: round; }
.fcard:hover .remind, .fcard:focus-within .remind { opacity: 1; }
@media (hover: none) { .remind { opacity: 1; } }

/* the big numeral on comic panels, the way a ranked row carries its number */
.panel-no {
  position: absolute; right: 10px; top: 2px; z-index: 4; pointer-events: none;
  font: 600 64px/1 var(--display); color: rgba(255,246,226,0.9);
  text-shadow: 0 4px 20px rgba(0,0,0,0.7), 0 0 30px rgba(247,189,46,0.3);
}

/* the fund card */
.fcard.fund img { filter: brightness(0.45) saturate(0.9); }
.fund-face { position: absolute; inset: 0; z-index: 4; pointer-events: none; display: grid; align-content: center; justify-items: center; gap: 10px; padding: 16px; text-align: center; }
.fund-face p { font: 600 clamp(22px, 2vw, 28px)/1.1 var(--display); color: #FFF6E2; }
.fund-face .btn { min-height: 38px; padding: 0 18px; font-size: 14.5px; border-radius: 8px; }

/* ---------- dialogs ---------- */
dialog { border: 0; padding: 0; color: var(--paper); background: transparent; max-width: none; max-height: none; }
dialog::backdrop { background: rgba(8,6,4,0.78); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.sheet-x {
  position: absolute; top: 14px; right: 14px; z-index: 5; width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; cursor: pointer; border: 0; color: #fff; background: rgba(18,15,11,0.8);
}
.sheet-x svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 2.4; stroke-linecap: round; }

.sheet {
  width: min(880px, calc(100vw - 24px)); margin: 32px auto; border-radius: 12px; overflow: hidden;
  background: var(--ink-2); box-shadow: 0 40px 120px rgba(0,0,0,0.7), 0 0 0 1px rgba(255,255,255,0.08);
}
.sheet[open] { animation: sheetin 0.35s var(--ease) both; }
@keyframes sheetin { from { opacity: 0; transform: translateY(24px) scale(0.97); } to { opacity: 1; transform: none; } }
.sheet-art { position: relative; aspect-ratio: 16 / 9; overflow: hidden; }
.sheet-art img { width: 100%; height: 100%; object-fit: cover; }
.sheet-art::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 35%, var(--ink-2) 100%); }
.sheet-over { position: absolute; left: clamp(18px, 4vw, 44px); right: 18px; bottom: clamp(14px, 3vw, 34px); z-index: 2; }
.sheet-over h2 { font: 600 clamp(34px, 5vw, 60px)/1 var(--display); color: #FFF6E2; text-shadow: 0 4px 30px rgba(0,0,0,0.6); }
.sheet-over .bb-cta { margin-top: 16px; }
.sheet-body { display: grid; grid-template-columns: 1.7fr 1fr; gap: 28px; padding: 8px clamp(18px, 4vw, 44px) 24px; }
.sheet-syn { margin-top: 14px; font-size: 17px; line-height: 1.6; }
.sheet-facts { margin: 14px 0 0; display: grid; gap: 10px; font-size: 14.5px; }
.sheet-facts dt { display: inline; color: var(--faint); }
.sheet-facts dt::after { content: ": "; }
.sheet-facts dd { display: inline; margin: 0; color: var(--paper); }
.sheet-facts a { color: var(--gold); }
.sheet-more { padding: 6px clamp(18px, 4vw, 44px) 36px; }
.sheet-more h3 { font: 700 21px/1.2 var(--body); margin-bottom: 14px; }
.sheet-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.mini { display: block; border-radius: 8px; overflow: hidden; background: var(--ink-3); text-decoration: none; transition: transform 0.25s var(--ease); }
.mini:hover { transform: translateY(-3px); }
.mini img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }
.mini span { display: block; padding: 12px 14px 16px; font-size: 14px; line-height: 1.45; color: var(--muted); }
.mini strong { display: block; color: var(--paper-2); font-size: 15.5px; margin-bottom: 3px; }
@media (max-width: 680px) {
  .sheet { margin: 0; width: 100vw; min-height: 100dvh; border-radius: 0; }
  .sheet-body { grid-template-columns: 1fr; gap: 0; }
  .sheet-grid { grid-template-columns: 1fr; }
}

.player { width: 100vw; height: 100dvh; margin: 0; background: #000; }
.player[open] { display: grid; place-items: center; }
.player-frame { width: min(100vw, calc(100dvh * 16 / 9)); aspect-ratio: 16 / 9; }
.player-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* ---------- phones ---------- */
@media (max-width: 720px) {
  .bb { min-height: 78vh; }
  .bb-art img { object-position: 64% 40%; }
  .bb-shade { background: linear-gradient(180deg, rgba(18,15,11,0.5) 0%, rgba(18,15,11,0) 26%, rgba(18,15,11,0.35) 52%, #120F0B 96%); }
  .bb-inner { text-align: center; }
  .bb-title { margin-inline: auto; }
  .bb-meta, .bb-cta { justify-content: center; }
  .bb-syn { margin-inline: auto; font-size: 16.5px; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
  .bb-cta .btn { flex: 1 1 0; max-width: 200px; }
  .rows { margin-top: -30px; }
  .track { padding-block: 12px; }
  .fcard { --w: 62vw; }
  .fcard.wide { --w: 84vw; }
  .fcard.tall { --w: 38vw; }
  .fcard:hover, .fcard:focus-within { transform: none; }
  .row-note { display: block; width: 100%; font-size: 13.5px; }
}

/* flex children must be allowed to shrink or the hero pushes past a phone screen */
.bb-inner { width: 100%; min-width: 0; }
@media (max-width: 720px) {
  .bb-art img { object-position: 44% 0%; }
  .bb-meta { font-size: 14.5px; gap: 4px 10px; }
}
