/* ==========================================================================
   Petra Pan Film · film.css  (film pages: mountain.html, body.html)
   Long scrolling page: big still with title, then sections.
   ========================================================================== */

:root {
  --side: clamp(20px, 4vw, 56px); /* left/right page margin */
  --measure: 38rem; /* comfortable reading width for long text */
}
html {
  scroll-behavior: smooth;
}

/* ---- Fixed header: stays at the top while scrolling ---- */
.topbar {
  position: fixed;
}

/* ---- Shared headings ---- */
.display {
  font: 600 clamp(3.2rem, 9vw, 7.5rem) / 0.88 var(--title-font);
  letter-spacing: -0.01em;
  text-transform: uppercase;
}
h2 {
  font: 600 clamp(2rem, 4.5vw, 3rem) / 0.95 var(--title-font);
  text-transform: uppercase;
}
h3.sub {
  margin-top: 1.2rem;
  font: 600 1.7rem/1 var(--title-font);
  text-transform: uppercase;
  text-align: left;
  color: var(--ink);
}

/* ---- Hero: full-screen still with title ---- */
.hero {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  min-height: 100svh;
  padding: 6rem var(--side) var(--side);
  overflow: hidden;
}
.hero > img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: cover;
  object-position: 50% 45%; /* which part of the still stays visible */
  animation: settle 2.4s ease-out both;
}
.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to bottom, #12121099, #12121000 9rem),
    linear-gradient(to right, #121210cc, #12121066 45%, #12121000 75%),
    linear-gradient(to top, #121210f2, #12121080 35%, #12121000 65%);
}
.hero-text,
.hero-laurels {
  position: relative;
  z-index: 1;
}
.hero-text {
  display: grid;
  gap: 1.1rem;
  max-width: 52rem;
}
.logline {
  max-width: 34rem;
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  line-height: 1.5;
  color: var(--soft);
}
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem 1.75rem;
  margin-top: 0.6rem;
  font-size: 0.95rem;
}
.actions a::after {
  content: " →";
}
/* links that open another site: the drawn arrow from base.css instead */
.actions a[target="_blank"]::after {
  content: "";
  display: inline-block;
  width: 0.95em;
  height: 0.95em;
  margin-left: 0.3em;
  vertical-align: -0.1em;
  background: currentColor;
  -webkit-mask: var(--out-arrow) center / contain no-repeat;
  mask: var(--out-arrow) center / contain no-repeat;
}
.soundtrack .actions {
  margin-top: 0;
}

/* ---- Laurels ---- */
.hero-laurels,
.laurel-row {
  display: flex;
  flex-wrap: wrap;
}
.hero-laurels {
  gap: 0.5rem 0.9rem;
  margin-top: 2.5rem;
}
.laurel-row {
  gap: 1rem 1.4rem;
  margin-top: 3rem;
}
.hero-laurels img,
.laurel-row img {
  opacity: 0.82; /* 1 = pure white */
}
.hero-laurels img {
  width: 5rem;
}
.laurel-row img {
  width: 6.5rem;
}

/* ---- Sections ---- */
section {
  padding: clamp(3.5rem, 8vw, 7rem) var(--side);
  scroll-margin-top: 56px; /* a jump to a section stops below the fixed header */
}
section + section {
  border-top: 1px solid var(--line);
}
.band {
  background: var(--panel);
}
.head {
  display: grid;
  gap: 0.9rem;
  margin-bottom: clamp(2rem, 4vw, 3rem);
}
/* two columns on wide screens: narrow side column + main column */
.split {
  display: grid;
  gap: 2.5rem 4.5rem;
}
.split > * {
  min-width: 0; /* long content never pushes the page wider than the screen */
}
@media (min-width: 900px) {
  .split {
    grid-template-columns: minmax(14rem, 1fr) minmax(0, 2.2fr);
  }
}
.side {
  display: grid;
  align-content: start;
  gap: 2rem;
}

/* covers and posters */
.poster,
.cover {
  width: 100%;
  box-shadow: 0 1.5rem 3rem #00000066;
}
.poster {
  max-width: 20rem;
}
.cover {
  max-width: 22rem;
}

/* ---- Label / value lists: facts, credits, soundtrack credits ---- */
.facts,
.credits {
  display: grid;
}
.facts {
  gap: 0.9rem;
  font-size: 0.95rem;
}
.credits {
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 16rem), 1fr));
  gap: 1.4rem 2.5rem;
  max-width: 72rem;
}
.credits.compact {
  max-width: none;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 1.2rem 2.5rem;
  margin-top: 0.8rem;
}
.credits > div {
  display: grid;
  align-content: start;
  gap: 0.2rem;
}
/* small uppercase labels (same look as .label in base.css) */
.facts dt,
.credits dt,
.stats span,
.quotes cite {
  font-size: 0.72rem;
  font-style: normal;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--faint);
}
.facts dd {
  color: var(--soft);
}

/* ---- Long text: synopsis, bio, soundtrack ---- */
.synopsis,
.bio,
.soundtrack {
  display: grid;
  align-content: start; /* paragraphs keep their spacing next to a taller column */
  gap: 1rem;
  max-width: var(--measure);
  color: var(--soft);
}
.synopsis {
  gap: 1.1rem;
  font-size: 1.08rem;
}
.synopsis > p:first-child {
  font-size: 1.25rem;
  line-height: 1.5;
  color: var(--ink);
}

/* ---- Sibling film box (after the synopsis): links two related films ---- */
.sibling-box {
  display: grid;
  gap: 0.35rem;
  margin-top: 0.75rem;
  padding: 1.1rem 1.25rem;
  border: 1px solid var(--line);
  border-left: 2px solid var(--accent);
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
  transition: background-color 0.2s;
}
.sibling-box:hover,
.sibling-box:focus-visible {
  background: #f2efe80a;
}
.sibling-box b {
  font: 600 1.6rem/1.1 var(--title-font);
  text-transform: uppercase;
  color: var(--ink);
}
.sibling-box b::after {
  content: "\2192";
  margin-left: 0.3em;
  color: var(--accent);
}
.sibling-box > span:last-child {
  color: var(--soft);
  font-size: 0.95rem;
}

/* ---- Trailer ----
   Frame shape: --ratio on .trailer-frame in the HTML (default 16 / 9). */
.trailer-frame {
  position: relative;
  max-width: 72rem;
  aspect-ratio: var(--ratio, 16 / 9);
  background: #000;
}
.trailer-frame iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}
/* data-trailer-fit="cover" (film.js): the video covers the box, centred,
   anything that sticks out is cut off */
.trailer-frame.cover {
  overflow: hidden;
}
.trailer-frame.cover iframe {
  inset: auto;
  left: 50%;
  top: 50%;
  translate: -50% -50%;
}

/* ---- Awards & festivals ---- */
.stats {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem 3rem;
  margin-bottom: 3rem;
}
.stats div {
  display: grid;
}
.stats b {
  font: 600 3.4rem/1 var(--title-font);
}
.awards {
  max-width: 60rem;
}
.awards li {
  display: grid;
  gap: 0.15rem 2rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--line);
}
@media (min-width: 760px) {
  .awards li {
    grid-template-columns: minmax(0, 1.1fr) minmax(0, 1.4fr) 3.5rem;
    align-items: baseline;
  }
}
.awards strong {
  font-weight: 500;
}
.awards .where {
  color: var(--soft);
}
.awards .year {
  color: var(--faint);
  font-variant-numeric: tabular-nums;
}
.festivals {
  display: grid;
  gap: 2.5rem 4rem;
  margin-top: 4rem;
}
@media (min-width: 900px) {
  .festivals {
    grid-template-columns: 1fr 1fr;
  }
}
.festivals h3 {
  margin-bottom: 1rem;
  font: 600 2rem/1 var(--title-font);
}
.festivals ul + h3 {
  margin-top: 2.5rem;
}
.festivals li,
.filmography li {
  border-bottom: 1px solid var(--line);
  color: var(--soft);
}
.festivals li {
  padding: 0.45rem 0;
}
.festivals b,
.filmography b {
  font-weight: 500;
  color: var(--ink);
}
.festivals i {
  font-style: normal;
  color: var(--faint);
}

/* ---- Press quotes: as many columns as fit ---- */
.quotes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 15rem), 1fr));
  gap: 2.5rem 3.5rem;
}
.quotes p {
  font: 400 clamp(1.6rem, 2.6vw, 2.1rem) / 1.1 var(--title-font);
}
.quotes cite {
  display: block;
  margin-top: 1rem;
}

/* ---- Stills gallery (filled by film.js) ----
   Frame shape: --ratio on the <ul> in the HTML (2 / 1, 16 / 9 …). */
.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 19rem), 1fr));
  gap: 0.5rem;
}
.gallery button {
  display: block;
  width: 100%;
  padding: 0;
  border: 0;
  aspect-ratio: var(--ratio, 16 / 9);
  overflow: hidden;
  background: #000;
  cursor: zoom-in;
}
.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.92;
  transition:
    transform 0.6s ease,
    opacity 0.3s;
}
.gallery button:hover img,
.gallery button:focus-visible img {
  transform: scale(1.03);
  opacity: 1;
}
.photo-credit {
  margin-top: 1rem;
  font-size: 0.8rem;
  color: var(--faint);
}

/* full-screen still view (created by film.js) */
.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: none;
  max-height: none;
  margin: 0;
  padding: 0;
  border: 0;
  background: #0b0b0aef;
  color: var(--ink);
}
.lightbox img {
  width: 100%;
  height: 100%;
  max-width: none;
  object-fit: contain;
  padding: 3.5rem var(--side);
}
.lb-btn {
  position: absolute;
  top: 50%;
  translate: 0 -50%;
  width: 3rem;
  height: 3rem;
  border: 1px solid #f2efe838;
  border-radius: 50%;
  background: #12121099;
  color: var(--ink);
  font-size: 1.2rem;
  cursor: pointer;
}
.lb-prev {
  left: 0.75rem;
}
.lb-next {
  right: 0.75rem;
}
.lb-close {
  top: 1.75rem;
  right: 0.75rem;
  translate: none;
}

/* ---- Interview: two columns on wide screens ---- */
.interview {
  max-width: 72rem;
  color: var(--soft);
}
@media (min-width: 1000px) {
  .interview {
    columns: 2;
    column-gap: 4rem;
  }
}
.interview h3 {
  margin: 1.8rem 0 0.6rem;
  break-after: avoid;
  font-size: 1.02rem;
  font-weight: 600;
  line-height: 1.4;
  text-align: left;
  color: var(--ink);
}
.interview h3:first-child {
  margin-top: 0;
}
.interview p + p {
  margin-top: 0.9rem;
}
.pull {
  margin: 2rem 0;
  padding-left: 1.2rem;
  border-left: 2px solid var(--eyebrow);
  break-inside: avoid;
  font: 400 1.9rem/1.1 var(--title-font);
  text-align: left;
  -webkit-hyphens: manual;
  hyphens: manual;
  color: var(--ink);
}

/* ---- Director ---- */
.list-label {
  margin-bottom: 0.6rem;
}
.filmography li {
  padding: 0.7rem 0;
  font-size: 0.95rem;
}

/* ---- Credits small print, contacts, page footer ---- */
.small-print {
  display: grid;
  gap: 1rem;
  max-width: 60rem;
  margin-top: 3rem;
  font-size: 0.9rem;
  color: var(--soft);
}
.small-print b {
  font-weight: 600;
  color: var(--ink);
}
.contacts {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 15rem), 1fr));
  gap: 2rem;
  max-width: 72rem;
  font-size: 0.95rem;
  color: var(--soft);
}
.contacts b {
  display: block;
  font-weight: 500;
  color: var(--ink);
}
.site-foot {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem 2rem;
  padding: 2rem var(--side) max(2rem, env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  font-size: 0.8rem;
  color: var(--faint);
}
.site-foot a {
  color: var(--soft);
}

/* ---- Phones ---- */
@media (max-width: 720px) {
  .hero-laurels {
    gap: 0.4rem 0.5rem;
    margin-top: 1.75rem;
  }
  .hero-laurels img {
    width: 3.6rem;
  }
  .laurel-row img {
    width: 4.6rem;
  }
  .stats b {
    font-size: 2.8rem;
  }
  .synopsis > p:first-child {
    font-size: 1.15rem;
    text-align: left; /* large first paragraph: no justification on narrow screens */
  }
  .gallery {
    grid-template-columns: 1fr 1fr;
    gap: 0.35rem;
  }
  .poster,
  .cover {
    max-width: none; /* poster and soundtrack cover: full width on phones */
  }
  /* hero links (Trailer, Awards, Press) in one row: tighter spacing,
     text scales a little with the screen width */
  .hero .actions {
    gap: 0.75rem 1rem;
    font-size: min(0.95rem, 3.7vw);
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  .hero > img {
    animation: none;
  }
}
