:root {
  --black: #0B0B0B;
  --panel: #161616;
  --white: #F4F4F1;
  --grey: #ABABA6;
  --line: #2C2C2C;
  --red: #E5484D; /* the one accent */
  --on-red: #0B0B0B;
  --gutter: clamp(16px, 4vw, 48px);
  --gap: clamp(72px, 11vw, 160px);
  --display: "Anton", Impact, "Arial Narrow", sans-serif;
  --body: "Archivo", system-ui, -apple-system, "Segoe UI", sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--black);
  color: var(--white);
  font-family: var(--body);
  font-size: 1.0625rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a {
  color: inherit;
  text-decoration-line: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
  transition: color 0.12s;
}
a:hover { color: var(--red); }

em { font-style: normal; color: var(--red); }

h1, h2, h3 { margin: 0; font-family: var(--display); font-weight: 400; text-transform: uppercase; letter-spacing: 0.005em; }

h2 { font-size: clamp(3.25rem, 10vw, 8.5rem); line-height: 1.02; }

p { margin: 0; }

button {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--line);
  border-radius: 0;
  background: transparent;
  color: var(--white);
  font: inherit;
  font-size: 0.9375rem;
  font-weight: 500;
  cursor: pointer;
  transition: border-color 0.12s, color 0.12s, transform 0.08s;
}
button:hover { border-color: var(--white); }
button:active { transform: scale(0.98); }

:focus-visible { outline: 2px solid var(--red); outline-offset: 3px; }

.wrap { width: 100%; max-width: 1320px; margin-inline: auto; padding-inline: var(--gutter); }

.skip {
  position: absolute;
  top: -100px;
  left: var(--gutter);
  z-index: 3;
  padding: 10px 14px;
  background: var(--white);
  color: var(--black);
  text-decoration: none;
}
.skip:focus { top: 12px; }

.meta { font-size: 0.9375rem; color: var(--grey); }

/* Hero: the trailer plays on .screen, then cuts to .title */

.hero {
  position: relative;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100dvh;
  padding-inline: var(--gutter);
  overflow: hidden;
}

.bar { display: flex; justify-content: flex-end; gap: 24px; padding-block: 20px; font-size: 0.9375rem; }
.bar a { text-decoration: none; }

.screen {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0 var(--gutter) 88px;
  text-align: center;
  visibility: hidden;
}

.cut {
  max-width: 16ch;
  font-family: var(--display);
  font-size: clamp(2.75rem, 10vw, 9rem);
  line-height: 1.08;
  text-transform: uppercase;
}
.cut[data-size="long"] { max-width: 24ch; font-size: clamp(2.125rem, 6.6vw, 6rem); }

.title { align-self: center; }

/* Sized so the name runs the full width of the screen */
.title h1 { font-size: min(calc((100vw - 2 * var(--gutter)) / 2.62), 54dvh); line-height: 1; }

.title-meta {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 32px;
  margin-top: clamp(8px, 1.5vw, 20px);
  font-size: clamp(1rem, 1.6vw, 1.25rem);
  color: var(--grey);
}
.title-meta a { color: var(--white); }
.title-meta a:hover { color: var(--red); }

.controls {
  position: relative;
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 12px 24px;
  padding-block: 20px 24px;
}

.genres { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.genres-label { margin-right: 8px; font-size: 0.9375rem; color: var(--grey); }
.genres button[aria-pressed="true"] { border-color: var(--red); color: var(--red); }

.skip-trailer { display: none; border-color: var(--white); }

.hero[data-state="playing"] .screen { visibility: visible; }
.hero[data-state="playing"] .title,
.hero[data-state="playing"] .bar { visibility: hidden; }
.hero[data-state="playing"] .skip-trailer { display: block; }

/* If script.js never runs, the title still shows up */
.intro .hero .title,
.intro .hero .bar { visibility: hidden; animation: failsafe 0s linear 10s forwards; }

@keyframes failsafe { to { visibility: visible; } }

@keyframes hard-cut {
  from { transform: scale(1.05); }
  to { transform: scale(1); }
}
.is-cutting { animation: hard-cut 0.14s ease-out; }

/* Sections cut in as they arrive */

.reveal [data-reveal] { opacity: 0; transform: translateY(16px); transition: opacity 0.16s linear, transform 0.2s cubic-bezier(0.2, 0, 0, 1); }
.reveal [data-reveal].is-in { opacity: 1; transform: none; }

/* The plot */

.plot { padding-block: var(--gap); }
.plot h2 { max-width: 13ch; }
.plot-text { display: grid; gap: 16px; max-width: 58ch; margin-top: clamp(32px, 5vw, 64px); margin-left: auto; }
.lede { font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 600; line-height: 1.35; }

/* Now showing */

.showing { padding-block: 0 var(--gap); }
.showing-grid { display: grid; gap: 32px; margin-top: clamp(32px, 5vw, 64px); }
.showing-text h3 { font-size: clamp(2.25rem, 5vw, 4rem); line-height: 1.05; color: var(--red); }
.showing-text .meta { margin-top: 8px; }
.showing-text p:not(.meta) { max-width: 44ch; margin-top: 20px; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 52px;
  margin-top: 28px;
  padding: 0 24px;
  background: var(--red);
  color: var(--on-red);
  font-weight: 700;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.12s, transform 0.08s;
}
.button:hover { background: var(--white); color: var(--on-red); }
.button:active { transform: scale(0.98); }

.still { display: block; border: 1px solid var(--line); }
.still img { display: block; width: 100%; height: auto; filter: grayscale(1) contrast(1.05); transition: filter 0.2s; }
.still:hover img { filter: none; }

/* Filmography */

.films { padding-block: 0 var(--gap); }
.film-list { margin: clamp(32px, 5vw, 64px) 0 0; padding: 0; list-style: none; }
.film-list li {
  display: grid;
  grid-template-columns: 4.5rem minmax(0, 1fr);
  gap: 2px 16px;
  align-items: baseline;
  padding-block: 20px;
  border-top: 1px solid var(--line);
}
.year, .status { color: var(--grey); }
.status { grid-column: 2; }
.status-now { color: var(--red); }
.film { font-family: var(--display); font-size: clamp(1.875rem, 4.6vw, 3.75rem); line-height: 1.1; text-transform: uppercase; }

/* Reviews */

.reviews { padding-block: 0 var(--gap); }
.reviews figure { margin: 0; }
.reviews blockquote { margin: 0; }
.review-grid { display: grid; gap: 40px; margin-top: clamp(32px, 5vw, 64px); }
.review-big blockquote { font-family: var(--display); font-size: clamp(2.5rem, 6.6vw, 6rem); line-height: 1.08; text-transform: uppercase; }
.review-side { display: grid; gap: 32px; align-content: end; }
.review-side blockquote { font-size: clamp(1.25rem, 2vw, 1.5rem); line-height: 1.35; }
.reviews figcaption { margin-top: 8px; color: var(--grey); }
.reviews > .meta { margin-top: 40px; }

/* Bloopers */

.bloopers { padding-block: var(--gap); background: var(--panel); }
.take { display: grid; gap: 16px; margin-top: clamp(32px, 5vw, 64px); }
.take-number { font-family: var(--display); font-size: clamp(3rem, 8vw, 6.5rem); line-height: 1; text-transform: uppercase; color: var(--red); }
.take h3 { font-family: var(--body); font-size: clamp(1.25rem, 2.2vw, 1.625rem); font-weight: 600; line-height: 1.3; text-transform: none; letter-spacing: 0; }
.take p:not(.take-number) { max-width: 52ch; margin-top: 12px; }
.bloopers .meta { margin-top: 40px; }

/* Casting */

.casting { padding-block: var(--gap); }
.casting p { margin-top: clamp(20px, 3vw, 32px); }
.email {
  display: inline-block;
  margin-top: 12px;
  font-size: clamp(1.25rem, 5.4vw, 4.5rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.02em;
  text-decoration-thickness: 2px;
  overflow-wrap: anywhere;
}

/* Credits */

.credits { padding-block: var(--gap); border-top: 1px solid var(--line); text-align: center; }
.credits h2 { font-size: clamp(2rem, 4vw, 3rem); }
.credits dl { display: grid; gap: 10px; margin: 40px 0 0; }
.credits dl div { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 24px; }
.credits dt { text-align: right; color: var(--grey); }
.credits dd { margin: 0; text-align: left; }
.credits .meta { margin-top: 40px; }

/* Footer, then the scene after the credits */

.foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 4px 24px;
  padding-block: 24px;
  border-top: 1px solid var(--line);
  font-size: 0.9375rem;
  color: var(--grey);
}

.stinger { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 60dvh var(--gutter) 30dvh; text-align: center; }
.stinger p { font-family: var(--display); font-size: clamp(2.75rem, 9vw, 8rem); line-height: 1.08; text-transform: uppercase; }

@media (min-width: 720px) {
  .film-list li { grid-template-columns: 6rem minmax(0, 1fr) auto; gap: 24px; }
  .status { grid-column: auto; text-align: right; }
}

@media (min-width: 900px) {
  body { font-size: 1.125rem; }
  .showing-grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: end; }
  .review-grid { grid-template-columns: minmax(0, 7fr) minmax(0, 5fr); gap: 64px; }
  .take { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); gap: 56px; align-items: start; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .is-cutting { animation: none; }
  button, a, .button, .still img { transition: none; }
}
