/* ==========================================================================
   Robotic Donut — film page stylesheet
   Shared by /films/*.html. Mirrors the design system in /index.html
   (dark studio look, copper accent, Archivo display + Inter body).
   ========================================================================== */

/* ---------- Self-hosted variable fonts ---------- */
@font-face {
  font-family: 'Archivo';
  src: url('/assets/fonts/archivo-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'Inter';
  src: url('/assets/fonts/inter-latin.woff2') format('woff2');
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------- Tokens ---------- */
:root {
  --bg: #0a0908;
  --bg-2: #121110;
  --bg-3: #1a1715;
  --ink: #f5f1ea;
  --fg: var(--ink);
  --muted: #9b938a;
  --faint: #8a8279;
  --accent: #cf9b6e; /* copper, pulled from the Scissors key art */
  --accent-hot: #e8893b; /* ember, from The Workout */
  --line: rgba(245, 241, 234, 0.1);
  --line-strong: rgba(245, 241, 234, 0.18);
  --max: 1240px;
  --gutter: 28px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

/* ---------- Base ---------- */
* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', Arial,
    sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

img {
  max-width: 100%;
}

h1,
h2,
h3 {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  margin: 0;
  line-height: 0.98;
  letter-spacing: -0.01em;
}

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

.eyebrow {
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 12px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  margin: 0 0 18px;
}

/* ---------- Accessibility utilities ---------- */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}
.skip-link {
  position: fixed;
  top: 10px;
  left: 10px;
  z-index: 10000;
  background: var(--ink);
  color: var(--bg);
  padding: 10px 16px;
  border-radius: 8px;
  font-size: 13px;
  font-weight: 600;
  transform: translateY(-150%);
  transition: transform 0.2s var(--ease);
}
.skip-link:focus {
  transform: translateY(0);
}
a:focus-visible,
button:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 4px;
}

/* ---------- Film-grain overlay ---------- */
.grain {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 9000;
  opacity: 0.045;
  mix-blend-mode: screen;
  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.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grainShift 0.6s steps(2) infinite;
}
@keyframes grainShift {
  0% { transform: translate(0, 0); }
  100% { transform: translate(-4%, 3%); }
}

/* ---------- Nav (same markup/behaviour as index.html) ---------- */
header.nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px var(--gutter);
  transition: background 0.4s var(--ease), border-color 0.4s var(--ease),
    padding 0.4s var(--ease);
  border-bottom: 1px solid transparent;
}
header.nav.scrolled {
  background: rgba(10, 9, 8, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  padding: 12px var(--gutter);
}
.nav-logo {
  display: flex;
  align-items: center;
  gap: 11px;
  /* No hero bumper on film pages, so the wordmark is always visible */
  opacity: 1;
  transition: opacity 0.5s var(--ease);
}
.nav-logo img {
  height: 26px;
  width: auto;
  display: block;
}
.nav-links {
  display: flex;
  gap: 30px;
  align-items: center;
  font-size: 13px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.nav-links a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.nav-links a:hover {
  color: var(--ink);
}
.nav-links a.cta {
  color: var(--ink);
  border: 1px solid var(--line-strong);
  padding: 8px 16px;
  border-radius: 100px;
}
.nav-links a.cta:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
@media (max-width: 720px) {
  .nav-links a:not(.cta) {
    display: none;
  }
}

/* ---------- Film page scaffolding ---------- */
main.film-page {
  position: relative;
  padding: 140px 0 110px;
  min-height: 70vh;
}
main.film-page::before {
  /* warm vignette, quieter than the index hero */
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(90% 60% at 20% 0%, rgba(207, 155, 110, 0.08), transparent 60%),
    radial-gradient(70% 50% at 100% 100%, rgba(232, 137, 59, 0.05), transparent 55%);
  pointer-events: none;
  z-index: -1;
}

/* Breadcrumb / back */
.crumbs {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin: 0 0 34px;
  font-size: 12.5px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--faint);
}
.crumbs a {
  color: var(--muted);
  transition: color 0.25s var(--ease);
}
.crumbs a:hover {
  color: var(--ink);
}
.crumbs span[aria-hidden] {
  color: var(--faint);
}
.crumbs [aria-current] {
  color: var(--accent);
}

/* ---------- Two-column hero ---------- */
.film-hero {
  display: grid;
  grid-template-columns: minmax(260px, 420px) minmax(0, 1fr);
  gap: clamp(36px, 6vw, 80px);
  align-items: start;
}
@media (max-width: 900px) {
  .film-hero {
    grid-template-columns: 1fr;
    gap: 36px;
  }
}

/* Poster column */
.film-poster {
  position: sticky;
  top: 100px;
}
@media (max-width: 900px) {
  .film-poster {
    position: static;
    max-width: 380px;
  }
}
.poster {
  position: relative;
  aspect-ratio: 2 / 3;
  max-width: 100%;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, 0.95);
}
.poster img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}
/* Typographic placeholder poster for unreleased films (same as index.html) */
.poster.tbd {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 28px;
  background: radial-gradient(120% 80% at 50% 30%, var(--bg-3), var(--bg)), var(--bg);
}
.poster.tbd::after {
  content: '';
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
  opacity: 0.05;
  pointer-events: none;
}
.poster.tbd .tbd-title {
  font-family: 'Archivo', sans-serif;
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(34px, 5vw, 56px);
  line-height: 0.92;
  letter-spacing: -0.01em;
}
.poster.tbd .tbd-mark {
  width: 76px;
  height: auto;
  object-fit: contain;
  margin-bottom: 22px;
  opacity: 0.5;
}
.poster.tbd .tbd-note {
  margin-top: 18px;
  font-size: 12px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--faint);
}

.badge {
  position: absolute;
  top: 14px;
  left: 14px;
  z-index: 2;
  font-family: 'Archivo', sans-serif;
  font-weight: 800;
  font-size: 10.5px;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  padding: 6px 11px;
  border-radius: 100px;
  background: rgba(10, 9, 8, 0.7);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
  border: 1px solid var(--line-strong);
  color: var(--ink);
}
.badge.live {
  background: var(--accent);
  color: #1a1006;
  border-color: transparent;
}
.badge.fest {
  background: var(--accent-hot);
  color: #1a0e04;
  border-color: transparent;
}

/* Details column */
.film-details {
  min-width: 0;
}
.film-details .eyebrow {
  margin-bottom: 20px;
}
.film-details h1 {
  font-size: clamp(42px, 7.2vw, 92px);
  text-transform: uppercase;
  margin: 0 0 26px;
  overflow-wrap: anywhere;
}
.film-details h1 .yr {
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 500;
  font-size: 15px;
  letter-spacing: 0.1em;
  color: var(--faint);
  margin-top: 14px;
  line-height: 1;
}

/* Festival laurel line (e.g. Official Selection) */
.laurel {
  display: flex;
  align-items: center;
  gap: 14px;
  margin: 0 0 28px;
  padding: 12px 16px;
  border: 1px solid rgba(232, 137, 59, 0.35);
  border-radius: 8px;
  background: rgba(232, 137, 59, 0.07);
  font-family: 'Archivo', sans-serif;
  line-height: 1.25;
  max-width: 560px;
}
.laurel::before {
  content: '';
  flex: 0 0 auto;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--accent-hot);
  box-shadow: 0 0 10px var(--accent-hot);
}
.laurel .laurel-k {
  display: block;
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--accent-hot);
}
.laurel .laurel-v {
  display: block;
  font-size: 14px;
  font-weight: 600;
  color: var(--ink);
  margin-top: 3px;
  text-decoration: none;
  transition: color 0.25s var(--ease);
}
a.laurel-v:hover {
  color: var(--accent-hot);
}
.laurel .laurel-d {
  display: block;
  margin-top: 5px;
  font-family: 'Inter', sans-serif;
  font-size: 13px;
  font-weight: 400;
  color: var(--muted);
}
.laurel-art {
  display: block;
  width: min(100%, 260px);
  height: auto;
  margin: 0 0 22px;
  opacity: 0.92;
  filter: drop-shadow(0 2px 10px rgba(0, 0, 0, 0.6));
}

.logline {
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: clamp(19px, 2.2vw, 24px);
  line-height: 1.35;
  letter-spacing: -0.005em;
  color: var(--ink);
  margin: 0 0 22px;
  max-width: 640px;
}
.synopsis {
  max-width: 640px;
}
.synopsis p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 16.5px;
  line-height: 1.65;
}
.synopsis p strong {
  color: var(--ink);
  font-weight: 600;
}

/* Section labels inside the details column */
.film-details h2 {
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--accent);
  line-height: 1.3;
  margin: 44px 0 16px;
}

/* Credits */
.credits {
  margin: 0;
  display: grid;
  grid-template-columns: max-content minmax(0, 1fr);
  column-gap: 26px;
  row-gap: 12px;
  max-width: 640px;
  font-size: 15px;
}
.credits dt {
  font-size: 11.5px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
  padding-top: 3px;
}
.credits dd {
  margin: 0;
  color: var(--ink);
  line-height: 1.5;
}
@media (max-width: 480px) {
  .credits {
    grid-template-columns: 1fr;
    row-gap: 4px;
  }
  .credits dd {
    margin-bottom: 10px;
  }
}

/* Pill buttons (press / IMDb) */
.film-links {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  padding-top: 4px;
}
.film-links a {
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  padding: 8px 14px;
  border-radius: 100px;
  border: 1px solid var(--line-strong);
  color: var(--ink);
  transition: all 0.25s var(--ease);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}
.film-links a:hover {
  background: var(--ink);
  color: var(--bg);
  border-color: var(--ink);
}
.film-links a.primary {
  background: var(--accent);
  color: #1a1006;
  border-color: transparent;
}
.film-links a.primary:hover {
  background: #e2b489;
}

/* Where to watch / Coming soon */
.watch {
  margin-top: 44px;
  padding: 26px 28px;
  border-radius: 12px;
  border: 1px solid var(--line);
  background: linear-gradient(120deg, var(--bg-2), var(--bg-3));
  max-width: 640px;
}
.watch h2 {
  margin: 0 0 12px;
}
.watch p {
  margin: 0 0 18px;
  color: var(--muted);
  font-size: 15px;
}
.watch p:last-child {
  margin-bottom: 0;
}
.watch .film-links {
  padding-top: 0;
}
.watch .film-links a.primary {
  font-size: 13.5px;
  padding: 11px 20px;
}
.watch.soon {
  border-color: rgba(207, 155, 110, 0.25);
}

/* Back link */
.back {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-top: 48px;
  font-family: 'Archivo', sans-serif;
  font-weight: 600;
  font-size: 14px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  border-bottom: 1px solid var(--line-strong);
  padding-bottom: 4px;
  transition: color 0.25s var(--ease), border-color 0.25s var(--ease);
}
.back:hover {
  color: var(--accent);
  border-color: var(--accent);
}

/* ---------- Footer ---------- */
footer {
  border-top: 1px solid var(--line);
  padding: 50px 0 60px;
}
.footer-grid {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
}
footer img {
  height: 34px;
  width: auto;
  opacity: 0.85;
}
.footer-links {
  display: flex;
  gap: 26px;
  font-size: 13px;
  color: var(--muted);
  flex-wrap: wrap;
}
.footer-links a:hover {
  color: var(--ink);
}
.copyright {
  margin-top: 30px;
  font-size: 12.5px;
  color: var(--faint);
}

/* ---------- Small screens ---------- */
@media (max-width: 560px) {
  :root {
    --gutter: 20px;
  }
  main.film-page {
    padding: 110px 0 80px;
  }
  .film-details h1 {
    margin-bottom: 20px;
  }
  .watch {
    padding: 22px 20px;
  }
}

/* ---------- Reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-delay: 0ms !important;
    transition-duration: 0.001ms !important;
  }
  html {
    scroll-behavior: auto;
  }
  .grain {
    animation: none;
  }
}
