/* ==========================================================================
   Working into Old Age — site styles
   Palette and type are set once here in :root. Change them here only.
   ========================================================================== */

:root {
  --ink: #0f0f0e;          /* near-black */
  --ink-2: #1b1b19;
  --paper: #eeebe5;        /* off-white */
  --paper-2: #e3dfd7;
  --stone: #7d7a72;        /* muted text */
  --stone-light: #a5a198;
  --net: #56635d;          /* muted net green */
  --rope: #9a8762;         /* muted rope ochre */
  --rule: rgba(15, 15, 14, 0.14);
  --rule-dark: rgba(238, 235, 229, 0.16);

  --serif-display: "Cormorant Garamond", "Cormorant", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --serif-text: "Source Serif 4", "Songti SC", "Noto Serif SC", "Source Han Serif SC", Georgia, serif;
  --sans: "Inter", "PingFang SC", "Hiragino Sans GB", "Noto Sans SC", "Helvetica Neue", Arial, sans-serif;

  --gutter: clamp(20px, 5vw, 72px);
  --section: clamp(96px, 13vw, 200px);
  --measure: 34rem;
}

/* Chinese page: serif stack led by Chinese faces, slightly larger leading */
:root:lang(zh-Hans) {
  --serif-display: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "Cormorant Garamond", serif;
  --serif-text: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", "Source Serif 4", serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--serif-text);
  font-size: clamp(17px, 1.05vw + 10px, 19px);
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}
:lang(zh-Hans) body { line-height: 1.95; letter-spacing: 0.02em; }

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
p { margin: 0 0 1.2em; }
h1, h2, h3 { margin: 0; font-weight: 300; }
::selection { background: var(--ink); color: var(--paper); }

.visually-hidden {
  position: absolute !important; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}
.skip { position: absolute; left: -999px; top: 0; z-index: 100; background: var(--ink); color: var(--paper); padding: 10px 14px; font-family: var(--sans); font-size: 13px; }
.skip:focus { left: 8px; top: 8px; }
:focus-visible { outline: 1px solid currentColor; outline-offset: 4px; }

/* Small uppercase labels ---------------------------------------------------- */
.label {
  font-family: var(--sans);
  font-size: 11px;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
:lang(zh-Hans) .label { letter-spacing: 0.3em; font-size: 12px; }

/* ==========================================================================
   Header / navigation
   ========================================================================== */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  padding: 22px var(--gutter);
  color: var(--paper);
  transition: background-color .5s ease, color .5s ease, padding .5s ease, border-color .5s ease;
  border-bottom: 1px solid transparent;
}
.site-header.is-solid {
  background: rgba(238, 235, 229, 0.94);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: var(--ink);
  padding-top: 14px; padding-bottom: 14px;
  border-bottom-color: var(--rule);
}
.brand { font-family: var(--sans); font-size: 11px; font-weight: 500; letter-spacing: 0.24em; text-transform: uppercase; white-space: nowrap; }
.brand span { opacity: .55; margin-left: .9em; letter-spacing: .18em; }

.nav { display: flex; align-items: center; gap: clamp(16px, 2.2vw, 34px); }
.nav a { font-family: var(--sans); font-size: 11px; letter-spacing: 0.2em; text-transform: uppercase; opacity: .78; transition: opacity .25s; }
:lang(zh-Hans) .nav a { letter-spacing: .24em; font-size: 12px; }
.nav a:hover, .nav a[aria-current] { opacity: 1; }
.lang { display: flex; gap: 10px; padding-left: clamp(16px, 2vw, 28px); border-left: 1px solid currentColor; border-color: rgba(128,128,128,.4); }
.lang a { opacity: .5; }
.lang a[aria-current="true"] { opacity: 1; }

.menu-btn {
  display: none; background: none; border: 0; color: inherit; cursor: pointer;
  font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; padding: 8px 0;
}

@media (max-width: 960px) {
  .menu-btn { display: block; }
  .nav {
    position: fixed; inset: 0; z-index: -1;
    flex-direction: column; justify-content: center; align-items: flex-start;
    gap: 22px; padding: 0 var(--gutter);
    background: var(--ink); color: var(--paper);
    opacity: 0; visibility: hidden; transition: opacity .4s ease, visibility .4s;
  }
  .nav a { font-family: var(--serif-display); font-size: 34px; letter-spacing: 0; text-transform: none; opacity: .9; font-weight: 300; }
  .lang { border: 0; padding: 26px 0 0; gap: 26px; }
  .lang a { font-family: var(--sans); font-size: 12px; letter-spacing: .22em; text-transform: uppercase; }
  body.menu-open .nav { opacity: 1; visibility: visible; }
  body.menu-open .site-header { color: var(--paper); background: transparent; border-color: transparent; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body.menu-open { overflow: hidden; }
}

/* ==========================================================================
   Hero
   ========================================================================== */
/* Letterboxed hero: the still fills the space above, the title sits on black below. */
.hero {
  position: relative;
  height: 100vh; height: 100svh;
  min-height: 560px;
  display: flex; flex-direction: column;
  color: var(--paper);
  background: var(--ink);
  overflow: hidden;
}
.hero picture {
  position: relative; flex: 1 1 auto; min-height: 0; overflow: hidden;
  margin-top: clamp(58px, 6vw, 72px);           /* black bar under the navigation */
}
.hero picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 45% 32%;
  animation: hero-in 1.8s cubic-bezier(.2,.6,.2,1) both;
}
@keyframes hero-in { from { opacity: 0; transform: scale(1.03); } to { opacity: 1; transform: none; } }
.hero-inner {
  position: relative; z-index: 1; flex: 0 0 auto;
  padding: clamp(22px, 3vw, 40px) var(--gutter) clamp(22px, 3vw, 38px);
  animation: rise 1.4s .35s cubic-bezier(.2,.6,.2,1) both;
}
.hero-title-row { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px 40px; flex-wrap: wrap; }
@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

.hero .byline { margin-bottom: clamp(10px, 1.2vw, 16px); opacity: .7; }
.title {
  font-family: var(--serif-display);
  font-weight: 300;
  font-size: clamp(44px, 6.6vw, 118px);
  line-height: .95;
  letter-spacing: -0.012em;
  margin: 0;
}
.title-alt {
  display: block;
  padding-bottom: .35em;
  font-family: "Songti SC", "Noto Serif SC", "Source Han Serif SC", "STSong", serif;
  font-weight: 400;
  font-size: clamp(18px, 1.9vw, 30px);
  letter-spacing: .55em; margin-right: -.55em;
  opacity: .8;
}
:lang(zh-Hans) .title { letter-spacing: .16em; font-size: clamp(50px, 7vw, 120px); line-height: 1.05; font-weight: 400; }
:lang(zh-Hans) .title-alt { letter-spacing: .02em; margin-right: 0; font-size: clamp(20px, 2.3vw, 36px); font-weight: 300; font-family: "Cormorant Garamond", Georgia, serif; }

.hero-meta {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 14px 32px;
  margin-top: clamp(18px, 2.4vw, 32px);
  padding-top: 16px;
  border-top: 1px solid var(--rule-dark);
}
.hero-meta .facts { display: flex; flex-wrap: wrap; gap: 8px 28px; opacity: .85; }
.year { font-family: var(--serif-display); font-size: clamp(22px, 2vw, 28px); letter-spacing: .06em; line-height: 1; }

.wip {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 8px 14px 8px 12px;
  border: 1px solid rgba(238,235,229,.5);
  font-family: var(--sans); font-size: 10.5px; font-weight: 500; letter-spacing: .26em; text-transform: uppercase;
}
.wip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--rope); box-shadow: 0 0 0 0 rgba(154,135,98,.6); animation: pulse 3.2s ease-in-out infinite; }
@keyframes pulse { 0%,100% { opacity: .55; } 50% { opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .hero picture img, .hero-inner, .wip::before { animation: none; }
}

/* ==========================================================================
   Sections
   ========================================================================== */
.section { padding: var(--section) var(--gutter); }
.section + .section { padding-top: 0; }
.section.dark { background: var(--ink); color: var(--paper); }
.section.tone { background: var(--paper-2); }
.dark + .section, .tone + .section, .bleed + .section { padding-top: var(--section); }

.sec-head {
  display: grid; grid-template-columns: 3.2em 1fr; align-items: baseline;
  padding-bottom: 16px; margin-bottom: clamp(40px, 6vw, 88px);
  border-bottom: 1px solid var(--rule);
}
.dark .sec-head { border-color: var(--rule-dark); }
.sec-head .num { color: var(--stone); }
.dark .sec-head .num { color: var(--stone-light); }

.cols { display: grid; grid-template-columns: repeat(12, 1fr); column-gap: clamp(16px, 2.4vw, 40px); }
.col-aside { grid-column: 1 / span 4; }
.col-main { grid-column: 6 / span 6; }
@media (max-width: 860px) {
  .col-aside, .col-main { grid-column: 1 / -1; }
  .col-aside { margin-bottom: 48px; }
}

.lede {
  font-family: var(--serif-display);
  font-weight: 300; font-style: italic;
  font-size: clamp(28px, 3.3vw, 50px);
  line-height: 1.16;
  letter-spacing: -.005em;
  max-width: 17em;
  margin: 0 0 clamp(40px, 6vw, 80px);
}
:lang(zh-Hans) .lede { font-style: normal; font-weight: 400; line-height: 1.5; letter-spacing: .06em; font-size: clamp(26px, 2.8vw, 42px); }
.prose { max-width: var(--measure); }
.prose p:first-of-type::first-letter { }

/* Film facts */
.facts-list { margin: 0; font-family: var(--sans); font-size: 13px; line-height: 1.5; }
.facts-list div { display: grid; grid-template-columns: 9.5em 1fr; gap: 12px; padding: 12px 0; border-top: 1px solid var(--rule); }
.facts-list div:last-child { border-bottom: 1px solid var(--rule); }
.facts-list dt { color: var(--stone); letter-spacing: .14em; text-transform: uppercase; font-size: 10.5px; padding-top: 2px; }
.facts-list dd { margin: 0; }
:lang(zh-Hans) .facts-list dt { letter-spacing: .2em; font-size: 12px; padding-top: 0; }

/* Full-bleed still */
.bleed { margin: 0; position: relative; background: var(--ink); }
.bleed img { width: 100%; aspect-ratio: 2.39 / 1; object-fit: cover; }
@media (max-width: 640px) { .bleed img { aspect-ratio: 4 / 3; } }
.bleed figcaption { position: absolute; left: var(--gutter); bottom: 18px; color: var(--paper); opacity: .7; }

/* Pull-quote between sections */
.epigraph { text-align: center; padding: var(--section) var(--gutter); }
.epigraph p {
  font-family: var(--serif-display); font-weight: 300; font-style: italic;
  font-size: clamp(26px, 3vw, 44px); line-height: 1.25; margin: 0 auto; max-width: 20em;
}
.epigraph .zh { font-family: "Songti SC", "Noto Serif SC", serif; font-style: normal; font-size: clamp(17px, 1.5vw, 21px); letter-spacing: .32em; margin-top: 22px; opacity: .6; }
:lang(zh-Hans) .epigraph p { font-style: normal; font-weight: 400; letter-spacing: .12em; }
:lang(zh-Hans) .epigraph .en { font-family: "Cormorant Garamond", Georgia, serif; font-style: italic; letter-spacing: 0; font-size: clamp(18px, 1.6vw, 23px); margin-top: 20px; opacity: .6; }

/* Trailer */
.trailer { margin-top: clamp(64px, 9vw, 130px); }
.trailer-frame {
  position: relative; aspect-ratio: 2.39 / 1; width: 100%;
  background: var(--ink-2);
  display: grid; place-items: center; text-align: center;
  color: var(--paper);
  outline: 1px dashed rgba(238,235,229,.28); outline-offset: -14px;
}
.trailer-frame iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.trailer-frame .play { width: 58px; height: 58px; border: 1px solid rgba(238,235,229,.5); border-radius: 50%; display: grid; place-items: center; margin: 0 auto 18px; }
.trailer-frame .play::after { content: ""; border-left: 11px solid rgba(238,235,229,.8); border-top: 7px solid transparent; border-bottom: 7px solid transparent; margin-left: 4px; }
.trailer-frame small { display: block; margin-top: 8px; color: var(--stone-light); font-family: var(--sans); font-size: 12px; letter-spacing: .04em; text-transform: none; }
@media (max-width: 640px) { .trailer-frame { aspect-ratio: 16 / 9; } }

/* Placeholders — everything the director still has to fill in */
.ph {
  color: var(--stone);
  font-style: normal;
  border-bottom: 1px dashed currentColor;
}
.dark .ph { color: var(--stone-light); }
.ph-block {
  border: 1px dashed rgba(15,15,14,.3);
  padding: clamp(22px, 3vw, 36px);
  color: var(--stone);
  font-family: var(--sans); font-size: 14px; line-height: 1.7;
}
.ph-block .label { display: block; margin-bottom: 14px; color: var(--rope); }
.ph-block p:last-child { margin-bottom: 0; }

/* Gallery */
.gallery { display: grid; grid-template-columns: repeat(2, 1fr); gap: clamp(10px, 1.4vw, 22px); }
.gallery a { position: relative; display: block; overflow: hidden; background: var(--ink-2); cursor: zoom-in; }
.gallery a:nth-child(5n + 1) { grid-column: 1 / -1; }
.gallery img { width: 100%; aspect-ratio: 2.39 / 1; object-fit: cover; transition: transform 1.4s cubic-bezier(.2,.6,.2,1), opacity .6s; }
.gallery a:hover img { transform: scale(1.02); }
@media (max-width: 640px) {
  .gallery { grid-template-columns: 1fr; }
}
.gallery-note { margin-top: 22px; color: var(--stone); }

/* Lightbox */
.lightbox {
  width: 100vw; height: 100vh; max-width: none; max-height: none; margin: 0; padding: 0; border: 0;
  background: rgba(10,10,9,.97); color: var(--paper);
}
.lightbox::backdrop { background: rgba(10,10,9,.97); }
.lightbox[open] { display: grid; grid-template-rows: auto 1fr auto; }
.lb-bar { display: flex; justify-content: space-between; align-items: center; padding: 18px var(--gutter); }
.lb-stage { display: grid; place-items: center; padding: 0 var(--gutter); min-height: 0; }
.lb-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.lb-nav { display: flex; justify-content: space-between; padding: 18px var(--gutter) 26px; }
.lightbox button { background: none; border: 0; color: inherit; cursor: pointer; font-family: var(--sans); font-size: 11px; letter-spacing: .22em; text-transform: uppercase; padding: 8px 0; opacity: .75; }
.lightbox button:hover { opacity: 1; }

/* Director */
.portrait-ph {
  aspect-ratio: 4 / 5; width: 100%; max-width: 360px;
  border: 1px dashed rgba(15,15,14,.3);
  display: grid; place-items: center; text-align: center; padding: 24px;
  color: var(--stone);
}
.portrait-ph img { width: 100%; height: 100%; object-fit: cover; }
.name {
  font-family: var(--serif-display); font-weight: 300;
  font-size: clamp(40px, 5vw, 76px); line-height: 1; margin: 0 0 10px;
}
.name-sub { color: var(--stone); margin-bottom: clamp(30px, 4vw, 52px); display: block; }

/* Credits */
.credits { text-align: center; max-width: 44rem; margin: 0 auto; }
.credits .film { font-family: var(--serif-display); font-weight: 300; font-size: clamp(30px, 3.2vw, 46px); margin-bottom: 6px; }
.credits .film-alt { opacity: .6; margin-bottom: clamp(48px, 6vw, 80px); display: block; }
.credit { margin: 0 0 30px; }
.credit dt { color: var(--stone-light); margin-bottom: 6px; }
.credit dd { margin: 0; font-family: var(--serif-display); font-size: clamp(22px, 2vw, 28px); font-weight: 400; line-height: 1.3; }
:lang(zh-Hans) .credit dd { font-size: clamp(19px, 1.7vw, 24px); }
.credits-note { margin-top: 56px; color: var(--stone-light); font-family: var(--sans); font-size: 12.5px; line-height: 1.7; }

/* Contact */
.contact-line { font-family: var(--serif-display); font-weight: 300; font-size: clamp(30px, 4vw, 60px); line-height: 1.1; margin: 0 0 18px; word-break: break-word; }
.contact-line a { border-bottom: 1px solid var(--rule); transition: border-color .3s; }
.contact-line a:hover { border-color: currentColor; }
.contact-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 32px; margin-top: clamp(40px, 6vw, 80px); padding-top: 28px; border-top: 1px solid var(--rule); }
.contact-grid .label { display: block; color: var(--stone); margin-bottom: 10px; }
.contact-grid p { font-family: var(--sans); font-size: 14px; margin: 0; }

/* Footer */
.site-footer {
  background: var(--ink); color: var(--stone-light);
  padding: 48px var(--gutter);
  display: flex; flex-wrap: wrap; justify-content: space-between; gap: 18px 40px;
  font-family: var(--sans); font-size: 12px; letter-spacing: .04em;
}
.site-footer .label { color: var(--paper); opacity: .8; }

/* Scroll reveal (added by JS; content is visible without JS) */
.js .reveal { opacity: 0; transform: translateY(18px); transition: opacity 1.1s cubic-bezier(.2,.6,.2,1), transform 1.1s cubic-bezier(.2,.6,.2,1); }
.js .reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .js .reveal { opacity: 1; transform: none; transition: none; } }

/* Small helpers */
.nowrap { white-space: nowrap; }
@media (max-width: 520px) { .hide-sm { display: none; } }
@media (max-width: 960px) {
  :lang(zh-Hans) .nav a { font-family: var(--serif-display); font-size: 30px; letter-spacing: .12em; }
  :lang(zh-Hans) .lang a { font-family: var(--sans); font-size: 12px; letter-spacing: .22em; }
}
#credits { scroll-margin-top: 64px; }
