:root {
  --bg: #050914;
  --bg-deep: #01030a;
  --fg: #eef1ff;
  --accent: #3b6fff;
  --accent-glow: #7fd8ff;
  --muted: #6b7294;
  --font-display: "Helvetica Neue", Helvetica, Arial, sans-serif;
  --font-ui: "Rubik", "Helvetica Neue", Arial, sans-serif;
  --maxw: 1400px;
  --pad-x: 4rem;
}

* {
  box-sizing: border-box;
}

/* .split/.block--full set their own `display`, which otherwise beats the
   browser's default [hidden] rule on specificity ties — force it here. */
[hidden] {
  display: none !important;
}

/* Slow-drifting aurora wash behind everything — the dreamlike undertone.
   Fixed + behind content (z-index -2), so it never affects layout. */
body::before {
  content: "";
  position: fixed;
  inset: -10vh -10vw;
  z-index: -2;
  pointer-events: none;
  background:
    radial-gradient(45% 40% at 15% 20%, rgba(59, 111, 255, 0.28), transparent 60%),
    radial-gradient(40% 35% at 85% 15%, rgba(127, 216, 255, 0.16), transparent 60%),
    radial-gradient(55% 45% at 50% 90%, rgba(30, 20, 90, 0.35), transparent 65%),
    var(--bg-deep);
  background-color: var(--bg-deep);
  animation: drift 26s ease-in-out infinite alternate;
}

/* Fine film-grain layer on top of the aurora — keeps the surrealism from
   reading as a flat gradient, gives it texture like grain in a dark frame. */
body::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  opacity: 0.05;
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

@keyframes drift {
  0% { transform: translate3d(0, 0, 0) scale(1); }
  100% { transform: translate3d(-2%, 2%, 0) scale(1.06); }
}

@media (prefers-reduced-motion: reduce) {
  body::before {
    animation: none;
  }
}

/* Fluid root: font-size tracks the viewport HEIGHT (like the original
   Cargo site, whose root was ~1.44vh), so all rem-based type — headers
   and body — shrinks as the window gets shorter. The image columns still
   scale with width via the 1fr grid. ~16px at 800px tall. */
html {
  font-size: clamp(9px, 2vh, 24px);
}

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-display);
}

a {
  color: inherit;
  text-decoration: none;
}

img {
  display: block;
  max-width: 100%;
}

/* ---- BLOCKS ---- */
.block {
  padding: 0;
  margin: 0;
}

/* Two-column zig-zag block — each row is at least the viewport height
   (grows if the text is taller), so the media column scales with the
   window in both dimensions. */
.split {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: minmax(100vh, auto);
}

/* Narrower media column so a tall/portrait image (e.g. the poster) needs
   less cropping to cover its half — text gets the extra width instead. */
.split--media-narrow {
  grid-template-columns: 3fr 2fr;
}

/* Images stay full-bleed; text gets breathing room and centers vertically. */
.split__text {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 3rem var(--pad-x);
}

/* Media fills its half in both dimensions but is absolutely positioned so
   it never dictates the row height (which would defeat the 100vh row). */
.split__media {
  position: relative;
  overflow: hidden;
}

/* Reverse = media on the left, text on the right */
.split--reverse .split__text {
  grid-column: 2;
  grid-row: 1;
}

.split--reverse .split__media {
  grid-column: 1;
  grid-row: 1;
}

.split__media > img,
.split__media > .carousel {
  position: absolute;
  inset: 0;
}

.split__media > img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  background: #0a0e1c;
}

/* For images whose important content sits low in the frame (e.g. a
   poster with its title near the bottom) — crop the top instead of
   the default center crop. */
.media--anchor-bottom {
  object-position: bottom;
}

/* Full-width video block — centered within a full-height section; the
   video is capped to the viewport height so it never overflows. */
.block--full {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ---- TYPOGRAPHY ---- */
.description {
  font-size: 1.05rem;
  line-height: 1.5;
  margin: 0 0 1.5rem;
}

.description strong {
  font-weight: 700;
}

.specs {
  font-family: var(--font-ui);
  font-size: 0.85rem;
  letter-spacing: 0.03em;
  color: var(--muted);
  text-transform: uppercase;
  margin: 0 0 2rem;
}

/* Section headers share the big display style of the film title. */
.title,
.label {
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 4.2rem;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--fg);
  text-transform: uppercase;
  margin: 0 0 1.5rem;
  text-shadow: 0 0 40px rgba(127, 216, 255, 0.35);
}

/* space between stacked header/paragraph groups (e.g. logline + synopsis) */
.split__text .label:not(:first-child) {
  margin-top: 3rem;
}

.split__text p {
  font-size: 1.1rem;
  line-height: 1.6;
  margin: 0 0 1rem;
}

.text-link {
  color: var(--accent);
  font-weight: 700;
}

.selections {
  list-style: none;
  padding: 0;
  margin: 0;
}

.selections li {
  font-size: 1.1rem;
  line-height: 1.4;
  padding: 0.6rem 0;
  border-top: 1px solid #202544;
}

.selections li:last-child {
  border-bottom: 1px solid #202544;
}

/* ---- LINKS / NAV ---- */
.links {
  display: flex;
  gap: 1.5rem;
  flex-wrap: wrap;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  margin-top: 1.5rem;
}

.links a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.links a:hover {
  color: var(--accent-glow);
  text-shadow: 0 0 12px rgba(127, 216, 255, 0.6);
}

.arrow {
  display: inline-block;
}

/* Fixed footer nav — pinned to the bottom of the viewport, transparent
   background, above all content. */
.site-nav {
  position: fixed;
  left: 0;
  bottom: 0;
  z-index: 1000;
  display: flex;
  gap: 1.75rem;
  flex-wrap: wrap;
  padding: 1.5rem var(--pad-x);
  background: transparent;
  pointer-events: none;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 1.2rem;
  letter-spacing: 0.02em;
}

.site-nav a {
  color: var(--accent);
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  pointer-events: auto;
  transition: color 0.2s ease, text-shadow 0.2s ease;
}

.site-nav a:hover {
  color: var(--accent-glow);
  text-shadow: 0 0 12px rgba(127, 216, 255, 0.6);
}

/* ---- VIDEO ---- */
/* width caps at the value that makes a 16:9 box exactly 100vh tall
   (100 * 16/9 = 177.78vh), so tall content shrinks to fit short windows. */
.video-embed {
  position: relative;
  width: min(100%, 177.78vh);
  aspect-ratio: 16 / 9;
  background: #0a0e1c;
  overflow: hidden;
}

.video-embed iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Clickable label pinned to the top-right corner, over the video.
   White background, black header text; links to the video in a new tab. */
.video-label {
  position: absolute;
  top: 0;
  right: 0;
  z-index: 2;
  max-width: 70%;
  padding: 0.85rem 1.1rem;
  background: #eef1ff;
  color: #050914;
  font-family: var(--font-ui);
  font-weight: 700;
  font-size: 0.85rem;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  line-height: 1.25;
}

.video-label:hover {
  color: var(--accent);
}

/* ---- CAROUSEL ---- */
.carousel {
  position: relative;
  height: 100%;
  background: #0a0e1c;
}

.carousel__track {
  display: flex;
  height: 100%;
  overflow-x: auto;
  scroll-snap-type: x mandatory;
  scroll-behavior: smooth;
  scrollbar-width: none;
}

.carousel__track::-webkit-scrollbar {
  display: none;
}

.carousel__track img {
  flex: 0 0 100%;
  width: 100%;
  height: 100%;
  object-fit: cover;
  scroll-snap-align: start;
}

.carousel__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 44px;
  height: 44px;
  border: 0;
  background: rgba(5, 9, 20, 0.6);
  color: #eef1ff;
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
}

.carousel__btn:hover {
  background: var(--accent);
}

.carousel__btn--prev { left: 0.75rem; }
.carousel__btn--next { right: 0.75rem; }

/* ---- RESPONSIVE ---- */
@media (max-width: 860px) {
  /* Stop shrinking with the viewport once we stack; keep type readable. */
  html {
    font-size: 16px;
  }

  :root {
    --pad-x: 1.5rem;
  }

  /* Headers are too large for a phone at the desktop 4.5rem. */
  .title,
  .label {
    font-size: 2.5rem;
  }

  /* Slightly smaller body copy on phones. */
  .description,
  .split__text p,
  .selections li {
    font-size: 1rem;
  }

  /* Stack every split block into a single column, text first, at natural
     heights (no full-viewport panels on phones). */
  .split {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
  }

  .split--reverse .split__text,
  .split--reverse .split__media {
    grid-column: 1;
  }

  .split--reverse .split__text { grid-row: 1; }
  .split--reverse .split__media { grid-row: 2; }

  /* Media flows normally again (natural height, not absolute overlay). */
  .split__media > img,
  .split__media > .carousel {
    position: static;
  }

  .split__media > img {
    height: auto;
  }

  .block--full {
    min-height: 0;
  }

  .video-embed {
    width: 100%;
  }

  .carousel,
  .carousel__track {
    height: auto;
  }

  .carousel__track img {
    height: auto;
  }
}
