/* THE HOURGLASS — matched to the official poster.
   Layout: intro reel → hero framed as an hourglass (as on the poster) → three chapters:
   The Film, Cast & Crew, Behind the Scenes → poster-style "Directed by" footer.
   Single dark look by design: deep navy-black, steel outlines, blood red, cold white. */
:root {
  --ink: #05090c;          /* outside the glass */
  --navy: #0b1a22;         /* inside the glass */
  --navy-2: #102430;       /* raised surface */
  --steel: #7d97a5;        /* hourglass outline */
  --line: #1f3540;         /* hairlines */
  --white: #eef2f3;        /* credits text */
  --fog: #a8b8c0;          /* muted text */
  --red: #d4181c;          /* title red */
  --red-dk: #8f1014;       /* drips */

  --f-cond: "Oswald", "Arial Narrow", "Roboto Condensed", Impact, sans-serif;
  --f-body: "Barlow", "Helvetica Neue", Arial, sans-serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --wrap: 1180px;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; background: var(--ink); }
body {
  margin: 0;
  background: radial-gradient(ellipse 120% 60% at 50% 0%, var(--navy) 0%, var(--ink) 70%) fixed, var(--ink);
  color: var(--white);
  font-family: var(--f-body);
  font-size: 1.0625rem;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
body.is-intro { overflow: hidden; }
img { max-width: 100%; display: block; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
::selection { background: var(--red); color: var(--white); }
.logo { display: block; height: auto; }

.wrap {
  max-width: var(--wrap); margin: 0 auto;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}

/* Shared label style: the poster's small condensed caps ("STARRING", "LEAD GRIP") */
.eyebrow, .chapter__no, .nav a, .glass__label, .facts dt, .person .role,
.still figcaption, .exhibit figcaption, .poster figcaption, .rules h3, .subhead,
.hero__vert, .hero__credit, .foot__dir span, .foot__meta, .lightbox p, .btn {
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .08em;
}

/* ---------- INTRO REEL ---------- */
.intro {
  position: fixed; inset: 0; z-index: 100; background: #000;
  display: grid; place-items: center; overflow: hidden;
  transition: opacity 1.4s ease, visibility 0s linear 1.4s;
}
.intro.is-done { opacity: 0; visibility: hidden; }
.intro video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
  filter: saturate(.55) contrast(1.1) brightness(.8);
  transition: filter 2.5s ease;
}
.intro.show-title video { filter: saturate(.3) contrast(1.1) brightness(.3) hue-rotate(-10deg); }
.intro::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: radial-gradient(ellipse at center, transparent 35%, rgba(5,9,12,.9) 100%);
}
.intro__title {
  position: relative; z-index: 2; text-align: center; opacity: 0;
  display: grid; justify-items: center; gap: .5rem;
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
  transition: opacity 2s ease;
}
.intro.show-title .intro__title { opacity: 1; }
.intro__title small {
  display: block; font-family: var(--f-cond); text-transform: uppercase;
  font-size: clamp(.95rem, 2.2vw, 1.35rem); letter-spacing: .12em; font-weight: 500; color: var(--white);
  text-shadow: 0 2px 6px #000, 0 0 24px #000;
}
.intro__title small.intro__genre { font-weight: 300; font-size: clamp(.85rem, 1.7vw, 1.1rem); color: var(--fog); }
.intro__title h1 { margin: .8rem 0 0; }
.intro__title h1 .logo { width: min(640px, 82vw); filter: drop-shadow(0 4px 18px rgba(0,0,0,.9)); }
.intro__contest {
  margin: .9rem 0 0; font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .1em;
  font-size: clamp(.95rem, 2vw, 1.25rem); color: var(--white); text-shadow: 0 2px 6px #000;
}
.intro__contest a { text-decoration-color: var(--red); text-underline-offset: 5px; }

.btn, .btn-ghost {
  font-family: var(--f-cond); text-transform: uppercase; cursor: pointer;
  font-size: clamp(.9rem, 2.2vw, 1.05rem); letter-spacing: .2em; font-weight: 500;
  color: var(--white); background: var(--red); border: 1px solid var(--red);
  padding: .95rem clamp(1.4rem, 4vw, 2.6rem); max-width: 100%;
  transition: background .25s, border-color .25s;
}
.btn:hover, .btn-ghost:hover { background: var(--red-dk); border-color: var(--white); }
.intro__enter { margin-top: 1.6rem; }

/* ---------- HEADER ---------- */
body::before {
  content: ""; position: fixed; inset: 0 0 auto; height: env(safe-area-inset-top, 0px);
  z-index: 10; background: var(--ink);
}
.site-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  background: rgba(5,9,12,.88); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--line);
}
.site-head .wrap { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding-block: 12px; }
.brand .logo { height: 34px; width: auto; }
.nav { display: flex; gap: clamp(14px, 3vw, 36px); flex-wrap: wrap; justify-content: flex-end; }
.nav a { font-size: .95rem; text-decoration: none; color: var(--white); transition: color .2s; }
.nav a:hover { color: var(--red); }

/* ---------- HERO: the poster's hourglass frame ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: clamp(640px, 94vh, 1000px);
  display: flex; flex-direction: column; justify-content: flex-end;
  border-bottom: 1px solid var(--line);
}
.hero__bg {
  position: absolute; inset: 0; z-index: -2;
  background: url("assets/img/dock-dusk.jpg?v=20261022b") center 62% / cover no-repeat;
  filter: saturate(.45) brightness(.62) contrast(1.15);
}
.hero::before { /* cool navy grade over the photo, like the poster's window light */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(to bottom, rgba(11,26,34,.15) 0%, rgba(11,26,34,.55) 50%, var(--navy) 92%),
    linear-gradient(rgba(20,60,80,.28), rgba(20,60,80,.28));
}
.hero__side { position: absolute; top: 0; bottom: 0; width: 50%; height: 100%; z-index: 0; pointer-events: none; }
.hero__side--l { left: 0; }
.hero__side--r { right: 0; }
.hero__side path { fill: var(--ink); stroke: var(--steel); stroke-width: 2; vector-effect: non-scaling-stroke; }
.hero__vert {
  position: absolute; z-index: 1; left: calc(var(--gutter-l) + 4px); bottom: 34%;
  margin: 0; writing-mode: vertical-rl; transform: rotate(180deg);
  font-size: clamp(.95rem, 1.6vw, 1.35rem); font-weight: 300; letter-spacing: .06em; text-transform: none; color: var(--white);
}
.hero__inner {
  position: relative; z-index: 1; text-align: center;
  display: grid; justify-items: center; gap: .6rem;
  padding: 0 var(--gutter-r) clamp(56px, 8vw, 96px) var(--gutter-l);
}
.eyebrow { margin: 0; font-size: clamp(.95rem, 2vw, 1.25rem); font-weight: 400; color: var(--white); text-shadow: 0 2px 8px #000; }
.hero h1 { margin: .3rem 0 0; }
.hero h1 .logo { width: min(620px, 78vw); filter: drop-shadow(0 6px 22px rgba(0,0,0,.8)); }
.hero__tag { margin: .4rem 0 0; font-family: var(--f-cond); font-weight: 300; font-size: clamp(1.3rem, 3vw, 2rem); letter-spacing: .04em; color: var(--white); }
.hero__credit { margin: .2rem 0 0; font-size: clamp(.9rem, 1.8vw, 1.15rem); color: var(--fog); }

/* Hourglass with countdown, sitting in the waist of the frame */
.glass-wrap { position: absolute; z-index: 1; left: 50%; top: 50%; transform: translate(-50%, -62%); display: grid; justify-items: center; }
.glass { width: 46px; height: 82px; position: relative; animation: turn 60s linear infinite; }
.glass__frame { position: absolute; inset: 0; border-top: 3px solid var(--steel); border-bottom: 3px solid var(--steel); }
.glass__bulb { position: absolute; left: 4px; right: 4px; height: 36px; overflow: hidden; background: rgba(238,242,243,.08); }
.glass__bulb--top { top: 3px; clip-path: polygon(0 0, 100% 0, 54% 100%, 46% 100%); }
.glass__bulb--bot { bottom: 3px; clip-path: polygon(46% 0, 54% 0, 100% 100%, 0 100%); }
.glass__sand { position: absolute; left: 0; right: 0; background: var(--red); }
.glass__bulb--top .glass__sand { bottom: 0; height: 100%; animation: drain 60s linear infinite; }
.glass__bulb--bot .glass__sand { bottom: 0; height: 0; animation: fill 60s linear infinite; }
.glass__stream { position: absolute; left: 50%; top: 39px; width: 1px; height: 6px; margin-left: -.5px; background: var(--red); animation: stream 60s linear infinite; }
.glass__label { margin: 8px 0 0; font-size: 1.05rem; letter-spacing: .12em; color: var(--white); font-variant-numeric: tabular-nums; text-shadow: 0 2px 6px #000; }
@keyframes drain { 0% { height: 100% } 96% { height: 0 } 100% { height: 0 } }
@keyframes fill  { 0% { height: 0 } 96% { height: 100% } 100% { height: 100% } }
@keyframes stream { 0%, 95% { opacity: 1 } 96%, 100% { opacity: 0 } }
@keyframes turn { 0%, 96% { transform: rotate(0) } 100% { transform: rotate(180deg) } }

/* ---------- CHAPTERS ---------- */
.chapter { padding-block: clamp(72px, 10vw, 130px); border-bottom: 1px solid var(--line); scroll-margin-top: 60px; }
.chapter__head { display: grid; gap: .5rem; margin-bottom: clamp(36px, 5vw, 60px); }
.chapter__no { margin: 0; font-size: 1rem; font-weight: 500; letter-spacing: .18em; color: var(--red); }
.chapter h2 {
  margin: 0; font-family: var(--f-cond); font-weight: 400; text-transform: uppercase;
  font-size: clamp(2rem, 5vw, 3.6rem); line-height: 1.08; letter-spacing: .02em; text-wrap: balance;
}
.lede { max-width: 60ch; font-size: 1.2rem; margin: 0; }
.muted { color: var(--fog); }

/* Film: copy + rules beside the poster */
.film-intro { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, .8fr); gap: clamp(32px, 6vw, 80px); align-items: start; }
.film-intro > * { min-width: 0; }
.film-intro__text { display: grid; gap: 2.2rem; }
.rules { background: var(--navy-2); border: 1px solid var(--line); border-top: 3px solid var(--red); padding: clamp(22px, 3vw, 34px); }
.rules h3 { margin: 0 0 1.2rem; font-size: 1rem; font-weight: 500; color: var(--fog); }
.rules ol { list-style: none; margin: 0; padding: 0; display: grid; gap: 1rem; counter-reset: r; }
.rules li { counter-increment: r; display: grid; grid-template-columns: 2.2rem minmax(0, 1fr); font-family: var(--f-cond); font-weight: 300; font-size: 1.35rem; line-height: 1.3; letter-spacing: .02em; }
.rules li::before { content: counter(r, upper-roman) "."; color: var(--red); font-weight: 500; }
.rules li.faint { color: var(--fog); }
.poster { margin: 0; display: grid; gap: .6rem; }
.poster button { all: unset; display: block; cursor: zoom-in; border: 1px solid var(--line); box-shadow: 0 24px 60px rgba(0,0,0,.6); }
.poster button:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }
.poster img { width: 100%; height: auto; }
.poster figcaption { font-size: .9rem; color: var(--fog); text-align: center; }

.facts {
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  margin: clamp(48px, 7vw, 88px) 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line);
}
.facts div { padding: 22px 16px; display: grid; gap: .3rem; text-align: center; }
.facts div + div { border-left: 1px solid var(--line); }
.facts dt { font-size: .9rem; color: var(--fog); }
.facts dd { margin: 0; font-family: var(--f-cond); font-weight: 400; text-transform: uppercase; font-size: 1.45rem; line-height: 1.25; letter-spacing: .03em; }

/* Stills */
.stills { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 10px; }
.still { margin: 0; position: relative; overflow: hidden; background: #000; }
.still button { all: unset; display: block; width: 100%; height: 100%; cursor: zoom-in; }
.still img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 3 / 2; filter: saturate(.6) brightness(.85) contrast(1.08); }
.still figcaption {
  position: absolute; left: 0; right: 0; bottom: 0; padding: 36px 14px 12px;
  background: linear-gradient(to top, rgba(5,9,12,.92), transparent);
  font-size: .95rem; color: var(--white);
}
.still--a { grid-column: span 4; grid-row: span 2; }
.still--a img { aspect-ratio: auto; height: 100%; }
.still--b, .still--c, .still--d, .still--e, .still--f { grid-column: span 2; }
.subhead { font-size: 1rem; font-weight: 500; color: var(--fog); margin: clamp(48px, 6vw, 72px) 0 20px; padding-top: 24px; border-top: 1px solid var(--line); }
.house.house--three { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.house .still img { aspect-ratio: 4 / 3; filter: saturate(.45) brightness(.72) contrast(1.1); }

/* Cast & crew: poster credit style, small label over a big condensed name */
.cast { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 210px), 1fr)); gap: clamp(22px, 3vw, 34px); }
.person { margin: 0; display: grid; gap: .8rem; align-content: start; }
.portrait { aspect-ratio: 4 / 5; max-width: 100%; background: var(--navy-2); border: 1px solid var(--line); overflow: hidden; }
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.person figcaption { display: grid; gap: .25rem; }
.person .name { order: 2; font-family: var(--f-cond); font-weight: 400; text-transform: uppercase; font-size: 1.45rem; line-height: 1.15; letter-spacing: .03em; }
.person .role { order: 1; font-size: .85rem; line-height: 1.35; color: var(--fog); }
.person .role b { color: var(--red); font-weight: 500; }
.person .role + .role { order: 3; }

/* Behind the scenes */
.board { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 280px), 1fr)); gap: 18px; align-items: start; }
.exhibit { margin: 0; background: var(--navy-2); border: 1px solid var(--line); padding: 10px 10px 14px; }
.exhibit button { all: unset; display: block; width: 100%; cursor: zoom-in; }
.exhibit img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; filter: saturate(.8) contrast(1.05); }
.exhibit figcaption { display: grid; gap: .2rem; margin-top: 10px; font-size: .95rem; }
.exhibit figcaption span:first-child { color: var(--red); font-weight: 500; }
.exhibit figcaption span:last-child { font-family: var(--f-body); text-transform: none; letter-spacing: 0; font-size: 1rem; color: var(--white); }

/* Lightbox */
.lightbox { border: 0; padding: 0; background: transparent; max-width: 96vw; max-height: 92vh; }
.lightbox::backdrop { background: rgba(5,9,12,.94); }
.lightbox img { max-width: 96vw; max-height: 84vh; object-fit: contain; }
.lightbox p { font-size: 1rem; color: var(--white); margin: 10px 0 0; text-align: center; }
.lightbox .btn-ghost { position: fixed; top: calc(16px + env(safe-area-inset-top, 0px)); right: calc(16px + env(safe-area-inset-right, 0px)); padding: .6rem 1rem; }

/* Footer: poster's "Directed by" line over a red ridge */
.site-foot { position: relative; padding-block: 72px calc(56px + env(safe-area-inset-bottom, 0px)); text-align: center; overflow: hidden; }
.site-foot::before {
  content: ""; position: absolute; left: 0; right: 0; top: 0; height: 60px;
  background: radial-gradient(ellipse 45% 100% at 50% 0%, rgba(143,16,20,.55), transparent 70%);
}
.site-foot .wrap { position: relative; display: grid; justify-items: center; gap: 1.4rem; }
.foot__dir { margin: 0; font-family: var(--f-cond); text-transform: uppercase; font-size: clamp(1.4rem, 3.5vw, 2rem); letter-spacing: .05em; }
.foot__dir span { font-size: .55em; margin-right: .5em; color: var(--fog); }
.foot__logo { width: min(260px, 60vw); }
.foot__meta { margin: 0; font-size: .95rem; color: var(--fog); }
.foot__meta a { text-decoration-color: var(--red); text-underline-offset: 4px; }
.linkish { all: unset; cursor: pointer; text-decoration: underline; text-decoration-color: var(--red); text-underline-offset: 4px; }
.linkish:hover { color: var(--white); }

/* Responsive */
@media (max-width: 860px) {
  .film-intro { grid-template-columns: minmax(0, 1fr); }
  .poster { max-width: 420px; justify-self: center; }
  .facts { grid-template-columns: minmax(0, 1fr); }
  .facts div + div { border-left: 0; border-top: 1px solid var(--line); }
  .stills { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .still--a { grid-column: span 2; grid-row: auto; }
  .still--a img { aspect-ratio: 3 / 2; }
  .still--b, .still--c, .still--d, .still--e, .still--f { grid-column: span 1; }
  .house.house--three { grid-template-columns: minmax(0, 1fr); }
  .hero__side { width: 34%; }
  .hero__vert { display: none; }
}
@media (max-width: 520px) {
  .site-head .brand { display: none; }
  .site-head .wrap { justify-content: center; }
  .nav { justify-content: center; gap: 16px; }
  .nav a { font-size: .82rem; letter-spacing: .06em; }
  .hero__side { width: 26%; }
}

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

/* Hero rows: top bulb holds the hourglass at the waist, bottom bulb holds the title */
.hero { display: grid; grid-template-rows: 1fr 1fr; min-height: clamp(720px, 96vh, 1040px); }
.glass-wrap { position: relative; left: auto; top: auto; transform: none; grid-row: 1; align-self: end; justify-self: center; padding-bottom: 14px; }
.hero__inner { grid-row: 2; align-self: center; padding-block: 24px 40px; }
.hero { grid-template-columns: minmax(0, 1fr); }
.glass-wrap, .hero__inner { grid-column: 1; width: 100%; }
.glass-wrap { width: auto; }
.hero__inner { align-self: end; padding-block: 24px clamp(48px, 7vw, 80px); }

/* Intro video gets the same cool grey grade as the hero photo */
.intro video { filter: saturate(.45) brightness(.62) contrast(1.15); }
.intro.show-title video { filter: saturate(.4) brightness(.45) contrast(1.15); }
.intro::before {
  content: ""; position: absolute; inset: 0; z-index: 1; pointer-events: none;
  background:
    linear-gradient(to bottom, rgba(11,26,34,.15) 0%, rgba(11,26,34,.45) 100%),
    linear-gradient(rgba(20,60,80,.28), rgba(20,60,80,.28));
}
.intro::after { z-index: 1; background: radial-gradient(ellipse at center, transparent 55%, rgba(5,9,12,.6) 100%); }

/* Lighter grey grade (about 20% more see-through) on the hero and the intro video */
.hero__bg { filter: saturate(.5) brightness(.7) contrast(1.12); }
.hero::before {
  background:
    linear-gradient(to bottom, rgba(11,26,34,.12) 0%, rgba(11,26,34,.44) 50%, var(--navy) 94%),
    linear-gradient(rgba(20,60,80,.22), rgba(20,60,80,.22));
}
.intro video { filter: saturate(.5) brightness(.7) contrast(1.12); }
.intro::before {
  background:
    linear-gradient(to bottom, rgba(11,26,34,.12) 0%, rgba(11,26,34,.36) 100%),
    linear-gradient(rgba(20,60,80,.22), rgba(20,60,80,.22));
}

/* Social links */
.socials { display: grid; justify-items: center; gap: .6rem; }
.socials__handle { margin: 0; font-family: var(--f-cond); font-size: 1.05rem; letter-spacing: .06em; color: var(--white); }
.socials__links { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; }
.socials__links a {
  display: inline-flex; align-items: center; gap: .5rem; text-decoration: none;
  font-family: var(--f-cond); text-transform: uppercase; letter-spacing: .1em; font-size: .9rem;
  color: var(--white); border: 1px solid var(--line); padding: .55rem .95rem; transition: border-color .2s, color .2s;
}
.socials__links a:hover { border-color: var(--red); color: var(--red); }
.socials__links svg { width: 20px; height: 20px; }

/* Nav as tabs sitting on the header's bottom line */
.site-head .wrap { align-items: flex-end; padding-block: 10px 0; }
.site-head .brand { align-self: center; padding-bottom: 10px; }
.nav { gap: 6px; flex-wrap: nowrap; }
.nav a {
  position: relative; bottom: -1px;
  padding: .6rem 1.1rem .55rem; font-size: .92rem; letter-spacing: .08em;
  color: var(--fog); background: var(--navy-2);
  border: 1px solid var(--line); border-bottom-color: var(--line);
  border-radius: 6px 6px 0 0;
  transition: color .2s, background .2s, border-color .2s;
}
.nav a:hover { color: var(--white); background: #16303d; }
.nav a.is-active {
  color: var(--white); background: var(--ink);
  border-color: var(--line); border-top: 2px solid var(--red); border-bottom-color: var(--ink);
}
@media (max-width: 520px) {
  .site-head .wrap { justify-content: center; padding-top: 8px; }
  .nav { gap: 4px; width: 100%; justify-content: center; }
  .nav a { flex: 1 1 0; text-align: center; padding: .55rem .3rem .5rem; font-size: .74rem; letter-spacing: .04em; }
}

/* Replay intro button, right of the header tabs */
.site-head .nav { margin-left: auto; }
.replay {
  display: inline-flex; align-items: center; gap: .45rem; align-self: center;
  margin-bottom: 10px; padding: .45rem .8rem;
  font: inherit; font-size: .8rem; letter-spacing: .08em; text-transform: uppercase;
  color: var(--fog); background: transparent; cursor: pointer;
  border: 1px solid var(--line); border-radius: 6px;
  transition: color .2s, border-color .2s;
}
.replay:hover, .replay:focus-visible { color: var(--white); border-color: var(--red); }
.replay svg { width: 16px; height: 16px; }
.foot__credit { font-size: .85rem; margin-top: -.8rem; }
@media (max-width: 860px) {
  .replay span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .replay { padding: .45rem; }
}
@media (max-width: 520px) {
  .site-head .wrap { gap: 6px; }
  .replay { margin-bottom: 6px; }
}
