:root {
  color-scheme: dark;
  --bg: #050609;
  --panel: #111318;
  --text: #f7f8fb;
  --muted: #a8abb4;
  --accent: #ff3157;
  --line: rgba(255, 255, 255, 0.12);
  --page: min(1440px, calc(100vw - 48px));
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "SF Pro Display", "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; background: var(--bg); }
body { margin: 0; min-width: 320px; background: var(--bg); color: var(--text); }
button, input { font: inherit; }
a { color: inherit; text-decoration: none; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; }

.film-header {
  position: fixed;
  z-index: 20;
  top: 0;
  left: 0;
  right: 0;
  height: 68px;
  padding: 0 max(32px, calc((100vw - 1440px) / 2));
  display: flex;
  align-items: center;
  gap: 36px;
  background: linear-gradient(180deg, rgba(5, 6, 9, .98) 0%, rgba(5, 6, 9, .72) 68%, transparent 100%);
}

.film-brand { display: inline-flex; align-items: baseline; gap: 8px; white-space: nowrap; }
.film-brand strong { color: #e50914; font-size: 24px; font-weight: 900; letter-spacing: -.055em; }
.film-brand span { color: white; font-size: 12px; font-weight: 750; letter-spacing: .24em; }
.film-nav { display: flex; align-items: center; gap: 24px; color: rgba(255,255,255,.76); font-size: 13px; }
.film-nav a { transition: color .2s ease; }
.film-nav a:hover { color: white; }
.header-actions { margin-left: auto; display: flex; align-items: center; gap: 20px; }
.journal-link { color: rgba(255,255,255,.7); font-size: 12px; }
.film-search { width: 36px; height: 36px; display: flex; align-items: center; gap: 8px; padding: 0 10px; border: 1px solid transparent; background: transparent; transition: width .28s ease, border-color .28s ease, background .28s ease; }
.film-search:focus-within { width: min(230px, 30vw); border-color: rgba(255,255,255,.42); background: rgba(0,0,0,.55); }
.film-search input { width: 100%; border: 0; outline: 0; color: white; background: transparent; }
.film-search input::placeholder { color: #a7a9b0; }

.film-hero { position: relative; min-height: min(780px, 78svh); display: flex; align-items: flex-end; overflow: hidden; scroll-margin-top: 68px; }
.hero-image { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; object-position: center; opacity: .9; }
.hero-shade { position: absolute; inset: 0; background: linear-gradient(90deg, rgba(5,6,9,.94) 0%, rgba(5,6,9,.68) 31%, rgba(5,6,9,.12) 63%, rgba(5,6,9,.05) 100%), linear-gradient(0deg, var(--bg) 0%, transparent 44%, rgba(5,6,9,.28) 100%); }
.hero-copy { position: relative; z-index: 1; width: var(--page); margin: 0 auto; padding: 0 0 clamp(76px, 8vw, 118px); }
.eyebrow { margin: 0 0 14px; color: #d5d6dc; font-size: 11px; font-weight: 800; letter-spacing: .22em; }
.hero-copy h1 { max-width: 650px; margin: 0; font-size: clamp(44px, 5.2vw, 78px); line-height: .98; letter-spacing: -.05em; text-wrap: balance; }
.hero-meta { margin: 20px 0 0; color: #e1e2e6; font-size: 13px; font-weight: 650; letter-spacing: .035em; }
.hero-description { max-width: 520px; margin: 13px 0 0; color: #d1d2d8; font-size: clamp(15px, 1.2vw, 18px); line-height: 1.55; }
.hero-actions { display: flex; gap: 10px; margin-top: 26px; }
.primary-action, .quiet-action { min-height: 48px; display: inline-flex; align-items: center; justify-content: center; gap: 10px; padding: 0 24px; border-radius: 999px; border: 0; font-weight: 750; cursor: pointer; }
.primary-action { color: #08090b; background: white; }
.quiet-action { color: white; background: rgba(109,109,110,.62); backdrop-filter: blur(12px); }
.primary-action:hover, .quiet-action:hover { transform: scale(1.025); }

.film-catalog { position: relative; z-index: 2; width: var(--page); margin: -34px auto 0; padding: 0 0 110px; scroll-margin-top: 76px; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin-bottom: 28px; }
.section-heading h2 { margin: 0; font-size: clamp(27px, 3vw, 42px); letter-spacing: -.04em; }
.film-count { color: var(--muted); font-size: 14px; }
.film-rail { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(300px, 36%); gap: 18px; overflow-x: auto; padding: 2px 2px 24px; scroll-snap-type: x mandatory; scrollbar-width: none; }
.film-rail::-webkit-scrollbar { display: none; }
.film-card { min-width: 0; scroll-snap-align: start; cursor: pointer; }
.film-card-poster { position: relative; aspect-ratio: 16 / 9; overflow: hidden; border-radius: 8px; background: var(--panel); box-shadow: 0 16px 50px rgba(0,0,0,.3); }
.film-card-poster img { width: 100%; height: 100%; display: block; object-fit: cover; transition: transform .45s ease, filter .45s ease; }
.film-card:hover img { transform: scale(1.035); filter: brightness(.78); }
.film-card-play { position: absolute; inset: 0; display: grid; place-items: center; color: white; font-size: 26px; opacity: 0; transition: opacity .25s ease; }
.film-card-play span { display: grid; place-items: center; width: 62px; height: 62px; border-radius: 50%; background: rgba(0,0,0,.6); backdrop-filter: blur(8px); }
.film-card:hover .film-card-play, .film-card:focus-visible .film-card-play { opacity: 1; }
.film-card-copy { padding: 16px 2px 0; }
.film-card-copy h3 { margin: 0; font-size: 19px; letter-spacing: -.02em; }
.film-card-copy p { margin: 7px 0 0; color: var(--muted); font-size: 13px; }
.watch-progress { position: absolute; left: 0; right: 0; bottom: 0; height: 3px; background: rgba(255,255,255,.18); }
.watch-progress span { display: block; height: 100%; background: var(--accent); }
.empty-state { color: var(--muted); }

.film-footer { width: var(--page); min-height: 120px; margin: 0 auto; border-top: 1px solid var(--line); display: flex; align-items: center; justify-content: space-between; color: var(--muted); font-size: 13px; letter-spacing: .08em; }
.watch-layer { position: fixed; z-index: 100; inset: 0; min-height: 100dvh; overflow-y: auto; background: #000; }
.watch-topbar { position: fixed; z-index: 2; inset: 0 0 auto; min-height: 64px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 12px; padding: 10px max(16px, env(safe-area-inset-left)); background: linear-gradient(#000, transparent); }
.watch-topbar strong { max-width: 50vw; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.watch-topbar [data-fullscreen] { justify-self: end; }
.player-button { border: 0; color: white; background: transparent; cursor: pointer; }
.video-stage { min-height: min(80dvh, 900px); display: grid; place-items: center; background: #000; }
.video-stage video { display: block; width: 100%; height: min(80dvh, 900px); object-fit: contain; background: #000; }
.watch-info { width: min(980px, calc(100% - 40px)); margin: 0 auto; padding: 34px 0 80px; }
.watch-info h2 { margin: 0 0 12px; font-size: clamp(30px, 5vw, 64px); letter-spacing: -.04em; }
.watch-info > p:last-child { color: var(--muted); line-height: 1.6; }
body.is-watching { overflow: hidden; }

@media (max-width: 760px) {
  :root { --page: calc(100vw - 32px); }
  .film-header { height: 60px; padding: 0 16px; gap: 14px; }
  .film-brand strong { font-size: 21px; }
  .film-brand span { font-size: 10px; }
  .film-nav, .journal-link { display: none; }
  .header-actions { margin-left: auto; }
  .film-search { width: 42px; padding: 0 12px; }
  .film-search input { position: absolute; inset: 60px 16px auto; width: calc(100vw - 32px); height: 44px; padding: 0 16px; border-radius: 4px; background: #16181e; visibility: hidden; opacity: 0; }
  .film-search:focus-within input { visibility: visible; opacity: 1; }
  .film-search:focus-within { width: 42px; border-color: transparent; background: transparent; }
  .film-hero { min-height: 72svh; }
  .hero-image { object-position: 62% center; }
  .hero-shade { background: linear-gradient(0deg, var(--bg) 4%, rgba(5,6,9,.72) 35%, rgba(5,6,9,.05) 75%, rgba(5,6,9,.3)); }
  .hero-copy { padding-bottom: 68px; }
  .hero-copy h1 { max-width: 94%; font-size: clamp(39px, 11vw, 54px); }
  .hero-description { max-width: 92%; font-size: 15px; }
  .film-catalog { margin-top: -26px; }
  .film-rail { grid-auto-columns: 84%; gap: 12px; }
  .film-card-play { opacity: 1; font-size: 18px; }
  .film-card-play span { width: 48px; height: 48px; }
  .film-footer { flex-direction: column; justify-content: center; gap: 12px; }
  .watch-topbar { grid-template-columns: auto 1fr auto; font-size: 13px; }
  .video-stage, .video-stage video { height: 72dvh; min-height: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; }
}
