/* =========================================================
   babasiev.com
   Palette: pure black, bone, ash, graphite. The stills bring the colour.
   Type: Big Shoulders Display (titles), Schibsted Grotesk (text).
   ========================================================= */

/* Fonts are self-hosted in /fonts so the site does not depend on Google */
@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/big-shoulders-display-latin-700-normal.woff2") format("woff2"); font-weight: 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Big Shoulders Display"; src: url("../fonts/big-shoulders-display-latin-900-normal.woff2") format("woff2"); font-weight: 900; font-style: normal; font-display: swap; }
@font-face { font-family: "Schibsted Grotesk"; src: url("../fonts/schibsted-grotesk-latin-wght-normal.woff2") format("woff2"); font-weight: 400 900; font-style: normal; font-display: swap; }

:root {
  --black: #000000;
  --bone: #ECE7DF;
  --ash: #9A948D;
  --graphite: #1A1918;
  --rule: rgba(236, 231, 223, 0.16);

  --display: "Big Shoulders Display", "Arial Narrow", "Helvetica Neue", Arial, sans-serif;
  --sans: "Schibsted Grotesk", "Helvetica Neue", Arial, sans-serif;

  --pad: clamp(1.25rem, 4.5vw, 4rem);
  --measure: 36rem;
  --gap-section: clamp(7rem, 18vh, 12rem);
}

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

html {
  background: var(--black);
  color: var(--bone);
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  margin: 0;
  background: var(--black);
  font-family: var(--sans);
  font-size: clamp(1rem, 0.3vw + 0.95rem, 1.1875rem);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

h1, h2, h3, p, dl, dd, ol, ul, blockquote { margin: 0; }
ol, ul { padding: 0; list-style: none; }
a { color: inherit; }

a:focus-visible {
  outline: 2px solid var(--bone);
  outline-offset: 4px;
}

.skip {
  position: absolute;
  left: var(--pad);
  top: -4rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  background: var(--bone);
  color: var(--black);
}
.skip:focus { top: 1rem; }

/* ---------- Stills and placeholders ---------- */

.still {
  position: relative;
  background-color: var(--graphite);
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

.still:not(.is-loaded) {
  background-image:
    radial-gradient(ellipse at 50% 40%, rgba(236, 231, 223, 0.07), transparent 65%),
    repeating-linear-gradient(0deg, rgba(255, 255, 255, 0.015) 0 1px, transparent 1px 3px);
}

.still:not(.is-loaded)::after {
  content: attr(data-label);
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: max-content;
  max-width: 80%;
  font-size: 0.8125rem;
  color: var(--ash);
  text-align: center;
}

/* ---------- Shared section type ---------- */

.section-title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.25rem, 11vw, 9rem);
  line-height: 0.84;
  margin-left: -0.03em;
}

.section-intro {
  max-width: 28ch;
  margin-top: 1.5rem;
  font-size: clamp(1.25rem, 1vw + 1rem, 1.625rem);
  font-weight: 500;
  line-height: 1.3;
  letter-spacing: -0.01em;
}

/* ---------- Navigation ---------- */

.nav {
  position: fixed;
  inset: 0 0 auto 0;
  z-index: 50;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  padding: 1.1rem var(--pad);
  mix-blend-mode: difference;
  color: #fff;
}

.nav a {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  text-decoration: none;
}

.nav__name { text-transform: uppercase; }
.nav__links { display: flex; gap: clamp(0.9rem, 3vw, 2.25rem); }
.nav__links a { opacity: 0.85; }
.nav__links a:hover { opacity: 1; text-decoration: underline; text-underline-offset: 0.3em; }

/* ---------- Opening ---------- */

.hero {
  position: relative;
  height: 100vh;
  height: 100svh;
  min-height: 32rem;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
}

.hero__still { position: absolute; inset: 0; }
.hero__video {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
}
.hero__still:not(.is-loaded)::after { top: 5.5rem; transform: translateX(-50%); }

.hero__shade {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.85) 0%, rgba(0, 0, 0, 0.2) 45%, rgba(0, 0, 0, 0.35) 100%);
}

.hero__content {
  position: relative;
  width: 100%;
  padding: 0 var(--pad) clamp(4.5rem, 10vh, 7rem);
}

.hero__name {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(4.5rem, min(26.5vw, 36vh), 30rem);
  line-height: 0.8;
  letter-spacing: -0.01em;
  margin-left: -0.04em;
}

.hero__line { display: block; overflow: hidden; padding-bottom: 0.04em; }
.hero__line > span { display: block; }

.hero__role {
  margin-top: 1.25rem;
  font-size: clamp(1.125rem, 1vw + 0.85rem, 1.5rem);
  font-weight: 600;
  letter-spacing: -0.01em;
}

/* The one orchestrated moment: the opening fades up from black, nothing else moves */
.js .hero { opacity: 0; }
.js.is-ready .hero { opacity: 1; transition: opacity 2.2s ease; }

/* ---------- About ---------- */

.about {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: end;
  padding: var(--gap-section) var(--pad);
}

.about__portrait { aspect-ratio: 4 / 5; width: 100%; }

.about__lead {
  max-width: 18ch;
  font-size: clamp(2.125rem, 4.4vw, 4.25rem);
  font-weight: 700;
  line-height: 1.02;
  letter-spacing: -0.03em;
  margin-bottom: 2.25rem;
}

.about__text p:not(.about__lead) {
  max-width: var(--measure);
  margin-top: 1rem;
  color: #CFC9C0;
}

/* ---------- Film index ---------- */

.index {
  position: relative;
  isolation: isolate;
  padding: var(--gap-section) var(--pad) clamp(5rem, 12vh, 8rem);
}
.index > .section-title,
.index > .section-intro { position: relative; z-index: 2; }

.index__list { position: relative; z-index: 6; margin-top: clamp(3rem, 8vh, 5rem); }

.index__list li + li { margin-top: clamp(0.5rem, 1.5vw, 1rem); }

.index__list a {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.9rem;
  text-decoration: none;
  color: var(--bone);
  transition: color 0.45s cubic-bezier(.2,.7,.1,1);
}

.index__title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 7.5vw, 6.5rem);
  line-height: 0.9;
}

.index__meta {
  transition: color 0.45s cubic-bezier(.2,.7,.1,1);
  flex-shrink: 0;
  padding-top: 0.6em;
  font-size: 0.9375rem;
  font-weight: 500;
  color: var(--ash);
}

/* Hover a title (or, on phones, scroll it to the middle of the screen):
   that film's still fills the section behind the titles and settles in */
.index__backdrop {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}
.index__backdrop::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(0, 0, 0, 0.75), rgba(0, 0, 0, 0) 70%);
}
.index__layer {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  opacity: 0;
  transform: scale(1.08);
  transition: opacity 1s cubic-bezier(.2,.7,.1,1), transform 1.8s cubic-bezier(.2,.7,.1,1);
}
.index__layer.is-on { opacity: 0.42; transform: scale(1); }

.index__list.has-active a,
.index__list.has-active .index__meta { color: rgba(236, 231, 223, 0.35); }
.index__list.has-active a.is-on { color: var(--bone); }
.index__list.has-active a.is-on .index__meta { color: var(--ash); }

/* ---------- Film: opening scene ---------- */

.film__scene { position: relative; }

.film__frame {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100svh;
}

.film__still { position: absolute; inset: 0; }
.film__still,
.film__shade { opacity: var(--reveal, 1); }

/* --dim is driven by scroll in main.js */
.film__shade {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(to top, rgba(0, 0, 0, 0.92) 0%, rgba(0, 0, 0, 0) 55%),
    rgba(0, 0, 0, var(--dim, 0.2));
}

.film__open {
  position: relative;
  z-index: 2;
  margin-top: -100vh;
  margin-top: -100svh;
  padding: 70vh var(--pad) 32vh;
  padding: 70svh var(--pad) 32svh;
}

.film__kind {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 1rem;
}
.film__count { color: var(--ash); font-weight: 500; }

.film__title {
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.75rem, 19.5vw, 13.5rem);
  line-height: 0.84;
  max-width: 9ch;
  margin-left: -0.03em;
}

.film__logline {
  max-width: 24ch;
  margin-top: clamp(1.5rem, 4vh, 2.5rem);
  font-size: clamp(1.375rem, 1.8vw + 0.8rem, 2.375rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

/* ---------- Film: poster, story, credits ---------- */

.film__detail {
  display: grid;
  grid-template-columns: minmax(0, 4fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  padding: clamp(5rem, 12vh, 8rem) var(--pad) clamp(3rem, 8vh, 5rem);
}

.film__poster {
  aspect-ratio: 2 / 3;
  width: 100%;
  position: sticky;
  top: 5.5rem;
}

.film__facts {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem clamp(2rem, 4vw, 3.5rem);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.375rem;
  line-height: 1.2;
}
.film__facts span {
  display: block;
  margin-bottom: 0.25rem;
  font-family: var(--sans);
  font-weight: 500;
  font-size: 0.8125rem;
  color: var(--ash);
}

.film__h {
  margin-top: clamp(2.5rem, 6vh, 3.5rem);
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.75rem;
  line-height: 1;
}

.film__text {
  max-width: var(--measure);
  margin-top: 0.9rem;
  color: #CFC9C0;
}

/* Credits set like an end roll: role on the left, name on the right */
.credits { margin-top: 1.25rem; }

.credits { margin-top: 1.5rem; }

.credits div {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 1.5rem;
  padding: 0.3rem 0;
  align-items: baseline;
}

.credits dt {
  text-align: right;
  font-size: 0.875rem;
  color: var(--ash);
}

.credits dd {
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.25rem;
  line-height: 1.2;
}

/* ---------- Film: stills ---------- */

.film__stills {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: clamp(0.75rem, 1.5vw, 1.25rem);
  padding: 0 var(--pad) var(--gap-section);
}

.film__still-a { grid-column: 1 / -1; aspect-ratio: 2.39 / 1; }
.film__still-b { aspect-ratio: 16 / 9; }
.film__still-c { aspect-ratio: 16 / 9; margin-top: clamp(1.5rem, 5vw, 4.5rem); }

/* ---------- On set ---------- */

.set {
  display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 7fr);
  gap: clamp(2.5rem, 6vw, 6rem);
  align-items: start;
  padding: var(--gap-section) var(--pad);
}

.set__text { position: sticky; top: 6rem; }

.set__lead {
  margin-top: 2rem;
  max-width: 22ch;
  font-size: clamp(1.5rem, 1.6vw + 1rem, 2.25rem);
  font-weight: 600;
  line-height: 1.15;
  letter-spacing: -0.02em;
}

.set__note {
  margin-top: 1.5rem;
  max-width: var(--measure);
  color: #CFC9C0;
}

.set__stills { display: grid; gap: clamp(1rem, 2vw, 1.75rem); }
.set__still--a { aspect-ratio: 4 / 5; width: 78%; }
.set__still--b { aspect-ratio: 3 / 2; width: 100%; margin-top: clamp(0rem, 4vw, 3rem); }

/* ---------- Interviews ---------- */

.iv {
  padding: var(--gap-section) var(--pad);
}

.iv__quote { margin-top: clamp(3rem, 8vh, 5rem); }

.iv__quote p {
  max-width: 22ch;
  font-size: clamp(1.875rem, 3.6vw, 3.5rem);
  font-weight: 700;
  line-height: 1.08;
  letter-spacing: -0.03em;
  text-indent: -0.42em;
}
.iv__quote p::before { content: "\201C"; }
.iv__quote p::after { content: "\201D"; }

.iv__quote cite {
  display: block;
  margin-top: 1.25rem;
  font-style: normal;
  font-size: 0.9375rem;
  color: var(--ash);
}

.iv__list { margin-top: clamp(3.5rem, 9vh, 6rem); }

.iv__item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 2fr);
  gap: 1.5rem;
  align-items: baseline;
  padding: 1rem 0;
  text-decoration: none;
}

.iv__source { font-family: var(--display); font-weight: 700; font-size: 1.375rem; }
.iv__headline { font-weight: 600; font-size: clamp(1.125rem, 0.8vw + 0.95rem, 1.5rem); line-height: 1.3; letter-spacing: -0.01em; }
.iv__date { font-size: 0.875rem; color: var(--ash); }
.iv__item:hover .iv__headline { text-decoration: underline; text-underline-offset: 0.25em; }

/* ---------- Contact ---------- */

.contact {
  padding: var(--gap-section) var(--pad) clamp(5rem, 12vh, 8rem);
}

.contact__title {
  max-width: 10ch;
  font-family: var(--display);
  font-weight: 900;
  text-transform: uppercase;
  font-size: clamp(3.5rem, 12vw, 10.5rem);
  line-height: 0.84;
  margin-left: -0.03em;
}

.contact__intro {
  margin-top: 1.75rem;
  max-width: 30ch;
  font-size: clamp(1.125rem, 0.8vw + 0.95rem, 1.375rem);
  font-weight: 500;
  color: #CFC9C0;
}

.contact__email {
  display: inline-block;
  margin-top: 2.5rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: clamp(2rem, 6.5vw, 5.5rem);
  line-height: 1;
  text-decoration: none;
  overflow-wrap: anywhere;
}
.contact__email:hover { text-decoration: underline; text-decoration-thickness: 3px; text-underline-offset: 0.12em; }

/* ---------- Footer ---------- */

.footer {
  padding: 2rem var(--pad) 2.5rem;
  font-size: 0.875rem;
  color: var(--ash);
}

/* ---------- Tablet and mobile ---------- */

@media (max-width: 900px) {
  .iv__item { grid-template-columns: 1fr; gap: 0.35rem; }
}

@media (max-width: 760px) {
  .nav { padding-top: 0.9rem; padding-bottom: 0.9rem; }
  .nav a { font-size: 1rem; }

  .about,
  .film__detail,
  .set { grid-template-columns: 1fr; }

  .about { align-items: start; }
  .about__portrait { width: 75%; }

  .index__list a { flex-direction: column; gap: 0.1rem; }
  .index__meta { padding-top: 0; }

  .film__open { padding-top: 56vh; padding-top: 56svh; padding-bottom: 26vh; padding-bottom: 26svh; }

  .film__poster { position: static; width: 62%; }

  .credits div { gap: 1rem; }

  /* Stills become a swipeable strip on phones */
  .film__stills {
    display: flex;
    gap: 0.75rem;
    overflow-x: auto;
    scroll-snap-type: x mandatory;
    scroll-padding-left: var(--pad);
    padding-right: var(--pad);
    scrollbar-width: none;
  }
  .film__stills::-webkit-scrollbar { display: none; }
  .film__stills > .still {
    flex: 0 0 86%;
    aspect-ratio: 16 / 9;
    margin-top: 0;
    scroll-snap-align: start;
  }

  .set__text { position: static; }
  .set__still--a { width: 85%; }
  .set__still--b { margin-top: 0; }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .index__layer, .index__list a, .index__meta { transition: none !important; }
  html { scroll-behavior: auto; }
  .js .hero { opacity: 1; transition: none !important; }
}

/* Credits: several names under one role, characters in grey */
.credits__name { display: block; }
.credits__as {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 0.875rem;
  color: var(--ash);
  white-space: nowrap;
}

/* Interview entries: title, the line, and where to open it */
.iv__body { display: block; }
.iv__body > span { display: block; }
.iv__line {
  margin-top: 0.5rem;
  max-width: 40ch;
  color: #CFC9C0;
  line-height: 1.45;
}
.iv__cta {
  margin-top: 0.6rem;
  font-family: var(--display);
  font-weight: 700;
  font-size: 1.125rem;
  letter-spacing: 0.02em;
  color: var(--ash);
}
.iv__item:hover .iv__cta { color: var(--bone); }
.iv__item { padding: 1.5rem 0; }
.iv__date { text-align: right; }
@media (max-width: 900px) { .iv__date { text-align: left; } }
