/* =============================================================================
 * Daena Foundation — the intro film
 *
 * Layered on daena.css, which already supplies the tokens, typefaces, reset,
 * masthead, footer and the language switch. This file adds only what the film
 * needs: the fixed stage and its scrim, the chapters that scroll through it,
 * and the solid ground the page lands on afterwards.
 *
 * TYPE RULES
 * 1. Persian is never letter-spaced (enforced site-wide at the end of
 *    daena.css). Tracking here only ever lands on English.
 * 2. No weight below 400: hairline strokes disintegrate over moving video.
 * 3. Persian line-height 1.8+ for text, 1.3+ for headings: its ascenders and
 *    descenders travel further than Latin ones.
 * 4. No opacity on text at rest. Contrast is set by colour, so it stays
 *    predictable; the only fades are the scroll-driven ones in intro.js.
 * 5. Contrast never depends on which frame is showing: a flat tint sets the
 *    floor and the gradients shape it.
 *
 * Logical properties throughout, so the Persian view mirrors on its own. The
 * few things they cannot mirror — gradient directions, sideways nudges — read
 * the direction tokens below.
 * ========================================================================== */

/* -------------------------------------------------------------- tokens --- */

:root {
  --film-ink: #06060A;          /* deeper than the site's ground: the scrim is tuned against it */
  --film-paper: var(--color-ink);
  --film-body: #DDD3C4;         /* Persian text over video */
  --film-body-en: #CFC5B6;      /* English text over video */
  --film-gold: var(--color-accent);
  --film-gold-lit: var(--color-accent-hover);
  --film-line: color-mix(in srgb, var(--film-gold) 30%, transparent);
  --film-fade: var(--motion-ease);
  --film-shadow: 0 1px 2px rgb(0 0 0 / 0.6), 0 10px 44px rgb(0 0 0 / 0.75);

  --film-toward-end: to right;  /* a gradient that starts where reading starts */
  --film-sign: 1;               /* +1 left to right, -1 right to left */
  --film-glow-x: 38%;           /* where a block's own scrim is centred */

  /* The fixed masthead's height: daena.css's one row of controls, at least
     --bar-h tall, and its 1px rule. Every room the film keeps clear of the bar
     derives from this one token, so the bar must hold to one row: the narrow
     rules below drop what does not fit, and under 360px, where even that
     takes two rows, the token grows to match. */
  --film-bar: calc(var(--bar-h) + 1px);
}
[dir="rtl"] {
  --film-toward-end: to left;
  --film-sign: -1;
  --film-glow-x: 62%;
}
@media (max-width: 359px) {
  :root { --film-bar: calc(44px + 0.75rem + 44px + 1px); }   /* two rows of 44px controls and the row gap */
}

/* ---------------------------------------------------------------- page --- */

/* clip, not hidden: `hidden` makes a scroll container, which breaks the
   fixed stage on some mobile browsers. The scroll padding lands in-page links
   (the rail, #reserve, #about) and keyboard focus clear of the fixed bar. */
html { overflow-x: clip; scroll-behavior: smooth; scroll-padding-block-start: var(--film-bar); }
body { background: var(--film-ink); overflow-x: clip; }
/* A browser without clip (Safari before 16) still never scrolls sideways. */
@supports not (overflow: clip) { body { overflow-x: hidden; } }
/* The film has its own moving grain and its own scrim, so the site's static
   grain and vignette (daena.css) stand down here. */
body[data-page="intro"]::after, body[data-page="intro"]::before { display: none; }

/* --------------------------------------------------------------- stage --- */

.film-stage {
  position: fixed; inset: 0; z-index: 0;
  background: var(--film-ink) center / cover no-repeat;
}
.film-stage__clip {
  position: absolute; inset: 0;
  inline-size: 100%; block-size: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.1s var(--film-fade);
}
.film-stage__clip.is-front { opacity: 1; }

/* The scrim. A flat tint guarantees a contrast floor on any frame; the eased
   gradients shape darkness where the words sit. Lightness ramps with alpha,
   so it reads as falloff rather than a grey veil. */
.film-stage::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-color: rgb(6 6 10 / 0.44);
  background-image:
    linear-gradient(var(--film-toward-end),
      hsl(240 20% 4% / 0.58) 0%,
      hsl(240 18% 5% / 0.34) 26%,
      hsl(240 16% 7% / 0.14) 48%,
      hsl(240 14% 9% / 0) 68%),
    linear-gradient(0deg,
      hsl(240 16% 3% / 0.93) 0%,
      hsl(240 15% 4% / 0.89) 8%,
      hsl(240 14% 6% / 0.81) 18%,
      hsl(240 13% 8% / 0.69) 30%,
      hsl(240 12% 11% / 0.54) 42%,
      hsl(240 11% 15% / 0.39) 55%,
      hsl(240 10% 19% / 0.25) 68%,
      hsl(240 9% 23% / 0.13) 82%,
      hsl(240 9% 27% / 0.04) 92%,
      hsl(240 9% 29% / 0) 100%);
}

.film-grain {
  /* Exactly the screen: the grain moves inside it, by its background, so it
     never reaches past an edge (a larger layer, moved, can widen the page). */
  position: fixed; inset: 0; z-index: 1; pointer-events: none;
  opacity: 0.045; mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='220' height='220'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 220px 220px;
  animation: film-grain 5s steps(4) infinite;
}
@keyframes film-grain {
  0%, 100% { background-position: 0 0; }
  25% { background-position: -37px 23px; }
  50% { background-position: 29px -41px; }
  75% { background-position: -19px -27px; }
}

.film-progress {
  position: fixed; z-index: 45; inset-block-start: 0; inset-inline: 0;
  block-size: 2px; pointer-events: none;
  transform: scaleX(var(--film-progress, 0));
  transform-origin: left;
  background: linear-gradient(var(--film-toward-end), var(--film-gold), color-mix(in srgb, var(--film-gold) 25%, transparent));
}
[dir="rtl"] .film-progress { transform-origin: right; }

/* ----------------------------------------------------------- masthead --- */

/* Over the film the masthead is a gradient, not a bar; past the film, where
   solid content would show through it, it becomes an opaque rail. */
.masthead--film {
  /* fixed over the film, and on top of the words that scroll under it */
  position: fixed; z-index: 40; inset-block-start: 0; inset-inline: 0;
  /* no-repeat: the gradient is sized to the padding box, so a repeat would
     start it again, dark, along the 1px rule underneath */
  background: linear-gradient(to bottom, color-mix(in srgb, var(--film-ink) 72%, transparent), transparent) no-repeat;
  border-block-end-color: transparent;
  backdrop-filter: none;
  transition: border-color 0.5s var(--film-fade);
}
.masthead--film.is-solid {
  background: color-mix(in srgb, var(--film-ink) 95%, transparent);
  border-block-end-color: color-mix(in srgb, var(--film-gold) 16%, transparent);
  backdrop-filter: blur(10px);
}
.masthead--film .wordmark,
.masthead--film .nav a { text-shadow: var(--film-shadow); }
.masthead--film .nav a:not(.nav__cta) { color: var(--film-paper); }

/* --------------------------------------------------------- sound button --- */

.sound { display: inline-grid; place-items: center; inline-size: 44px; block-size: 44px; border: 1px solid var(--line, rgb(228 192 106 / .3)); border-radius: 50%; background: color-mix(in srgb, var(--film-ink) 50%, transparent); color: var(--film-gold-lit); cursor: pointer; }
.sound svg { inline-size: 18px; block-size: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.sound:hover, .sound:focus-visible { border-color: var(--film-gold); }
.sound[aria-pressed="true"] { background: var(--film-gold); color: var(--film-ink); border-color: var(--film-gold); }

/* -------------------------------------------------------------- scenes --- */

/* The film is the sticky layer: the stage is fixed behind everything. The
   words are NOT pinned; they scroll normally through it, so every scrolled
   pixel moves the text and the page can never feel stuck. One screen per
   chapter, so a block is never cut off by the fold. */
.film { position: relative; z-index: 2; }
.film-scene {
  min-block-size: 108vh; min-block-size: 108dvh;
  padding-inline: clamp(22px, 7vw, 120px);
}
.film-scene--hero,
.film-scene--invite { min-block-size: 100vh; min-block-size: 100dvh; }
/* Each screen of the film begins under the fixed masthead. */
.film-scene__hold {
  min-block-size: 100vh; min-block-size: 100dvh;
  display: flex; align-items: center;
  padding-block-start: var(--film-bar);
}
/* The hero's words are centred in the room between the masthead and the
   scroll cue. Both are in flow, so neither can land on them: on a short
   screen the hold simply grows and the page scrolls. */
.film-scene--hero .film-scene__hold { flex-direction: column; padding-block-end: 0; }
/* The invitation carries the practical details, and the Year a card for
   each gathering, so on small screens each is taller than one; the padding
   keeps them off the edges as they grow. */
.film-scene--invite .film-scene__hold,
.film-scene--year .film-scene__hold { padding-block: clamp(92px, 12vh, 148px); }

/* Local scrim: darkness shaped exactly where the words are, so legibility
   never depends on the clip behind them. */
.film-block { position: relative; max-inline-size: min(46rem, 100%); }
.film-block::before {
  content: ""; position: absolute; z-index: -1;
  inset: -14% -10% -18% -10%;
  background: radial-gradient(ellipse 78% 68% at var(--film-glow-x) 55%,
    rgb(4 4 8 / 0.74) 0%, rgb(4 4 8 / 0.56) 42%, rgb(4 4 8 / 0.24) 68%, rgb(4 4 8 / 0) 84%);
  /* The ellipse is still well above clear where the box ends, at its foot
     and its sides, which drew a hard-edged dark rectangle over a bright
     frame. Faded out at those edges, inside the margin the insets leave
     around the words, so nothing under the text changes. */
  -webkit-mask-image: linear-gradient(to bottom, #000 90%, transparent),
    linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-composite: source-in;
  mask-image: linear-gradient(to bottom, #000 90%, transparent),
    linear-gradient(to right, transparent, #000 8%, #000 92%, transparent);
  mask-composite: intersect;
}
/* Opacity is set per frame from scroll position by intro.js, so there is no
   transition here: it would lag the scroll. Opaque unless the script says
   otherwise, so the words always show without it. */

.film-rule {
  display: block; inline-size: 64px; block-size: 1px; margin-block: 16px 20px;
  background: linear-gradient(var(--film-toward-end), var(--film-gold), transparent);
}

/* ---------------------------------------------------------- typography --- */

.film-title {
  margin: 0 0 18px; max-inline-size: 15ch;
  color: var(--film-paper); font-weight: 500; text-shadow: var(--film-shadow);
}
.film-title:lang(fa) { font-family: var(--font-fa-display); font-size: clamp(2.45rem, 6.3vw, 4.6rem); line-height: 1.34; }
.film-title:lang(en) { font-family: var(--font-display); font-size: clamp(2.7rem, 6.8vw, 5rem); line-height: 1.08; letter-spacing: 0.01em; }

.film-prose { margin: 0; text-wrap: pretty; text-shadow: var(--film-shadow); }
.film-prose:lang(fa) {
  max-inline-size: 44ch; color: var(--film-body);
  font-size: clamp(1.36rem, 2.1vw, 1.88rem); font-weight: 400; line-height: 1.82;
}
.film-prose:lang(en) {
  max-inline-size: 52ch; color: var(--film-body-en);
  font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.46rem, 2.2vw, 2rem); line-height: 1.58; letter-spacing: 0.015em;
}

.film-chapter__num { margin: 0; font-size: clamp(1.05rem, 1.4vw, 1.28rem); color: var(--film-gold); text-shadow: var(--film-shadow); }
.film-chapter__num:lang(fa) { font-weight: 500; }
.film-chapter__num:lang(en) { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.08em; }

/* ---------------------------------------------------------------- hero --- */

.film-hero { --film-glow-x: 50%; text-align: center; inline-size: min(56rem, 100%); margin: auto; }
.film-hero::before { inset: -22% -14% -24% -14%; }
.film-hero .film-rule { margin: 28px auto; }
.film-hero .film-prose { margin-inline: auto; }
.film-hero .film-prose:lang(fa) { max-inline-size: 40ch; }
.film-hero .film-prose:lang(en) { max-inline-size: 42ch; }

/* The Foundation's name over the title: gold, and in English small capitals. */
.film-hero__brand {
  margin: 0 0 26px; color: var(--film-gold); text-shadow: var(--film-shadow);
  font-size: clamp(1.14rem, 1.7vw, 1.4rem); font-weight: 500;
}
.film-hero__brand:lang(en) {
  font-family: var(--font-label); font-weight: 600;
  font-size: clamp(0.9rem, 1.2vw, 1.04rem); letter-spacing: 0.14em; text-transform: uppercase;
}

.film-hero__title { margin: 0; color: var(--film-paper); font-weight: 500; text-shadow: var(--film-shadow); text-wrap: balance; }
.film-hero__title:lang(en) {
  font-family: var(--font-display); font-size: clamp(3rem, 7.4vw, 6.4rem); line-height: 1.02; letter-spacing: 0.005em;
}
.film-hero__title:lang(fa) { font-family: var(--font-fa-display); font-size: clamp(2.6rem, 5.4vw, 5rem); line-height: 1.35; }

/* The next gathering, as a pointer to the invitation. */
.film-hero__next { margin: 34px 0 0; }
.film-hero__next a {
  display: inline-block; padding-block-end: 5px; text-decoration: none; text-shadow: var(--film-shadow);
  color: var(--film-gold-lit); font-size: clamp(1.08rem, 1.5vw, 1.3rem);
  border-block-end: 1px solid color-mix(in srgb, var(--film-gold) 40%, transparent);
  transition: color 0.4s var(--film-fade), border-color 0.4s var(--film-fade);
}
.film-hero__next a:lang(en) { font-family: var(--font-display); font-style: italic; font-weight: 500; letter-spacing: 0.03em; font-size: clamp(1.18rem, 1.6vw, 1.42rem); }
.film-hero__next a:hover { color: var(--film-gold); border-color: var(--film-gold); }

.film-cue {
  margin: 0 0 36px;
  text-align: center; color: var(--film-body); text-shadow: var(--film-shadow);
  font-size: clamp(0.98rem, 1.35vw, 1.14rem); font-weight: 500;
  animation: film-breathe 3.6s ease-in-out infinite;
}
.film-cue:lang(en) { font-family: var(--font-label); font-size: clamp(0.84rem, 1.15vw, 0.97rem); letter-spacing: 0.12em; text-transform: uppercase; }
.film-cue b { display: block; margin-block-start: 10px; font-size: clamp(1.28rem, 1.6vw, 1.5rem); font-weight: 400; line-height: 1; letter-spacing: normal; }
@keyframes film-breathe {
  0%, 100% { opacity: 0.5; transform: translateY(0); }
  50% { opacity: 0.95; transform: translateY(6px); }
}

/* ---------------------------------------------------------- invitation --- */

.film-invite { --film-glow-x: 50%; text-align: center; inline-size: min(60rem, 100%); max-inline-size: none; margin-inline: auto; }
.film-invite::before { inset: -20% -16% -22% -16%; }
.film-invite .film-title { max-inline-size: none; }
.film-invite .film-rule { margin: 22px auto; }
.film-invite .film-prose { margin-inline: auto; max-inline-size: 36ch; }

/* Reserve a seat, at the size the rest of the site gives that same action.
   This came out 298x72 against the 193x45 of .btn on every event page — 60%
   taller for the identical words, which read as a different design rather
   than as emphasis. */
.film-invite__cta {
  display: inline-block; margin-block-start: 36px; padding: 0.85rem 1.9rem;
  border: 1px solid var(--film-gold); color: var(--film-gold-lit);
  background: color-mix(in srgb, var(--film-ink) 55%, transparent);
  text-decoration: none; font-size: clamp(1rem, 1.2vw, 1.08rem); font-weight: 500;
  transition: background-color 0.45s var(--film-fade), color 0.45s var(--film-fade);
}
.film-invite__cta:lang(en) {
  font-family: var(--font-label); font-weight: 600; text-transform: uppercase;
  font-size: clamp(0.76rem, 1vw, 0.82rem); letter-spacing: 0.11em;
}
.film-invite__cta:hover { background: var(--film-gold); color: var(--film-ink); }

/* The next gathering: named under the invitation, when and where in a line
   each, then its action. The whole block keeps to one screen, so it fades
   in and out like the chapters (intro.js: TALL). */
.film-invite__next { margin: 32px 0 0; color: var(--film-gold); text-shadow: var(--film-shadow); font-size: clamp(1rem, 1.3vw, 1.12rem); font-weight: 500; }
.film-invite__next:lang(en) { font-family: var(--font-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; font-size: clamp(0.84rem, 1vw, 0.96rem); }
.film-invite__name { margin: 6px 0 0; color: var(--film-paper); font-weight: 500; text-shadow: var(--film-shadow); }
.film-invite__name:lang(en) { font-family: var(--font-display); font-style: italic; font-size: clamp(2rem, 4vw, 3rem); line-height: 1.12; letter-spacing: 0.02em; }
.film-invite__name:lang(fa) { font-family: var(--font-fa-display); font-size: clamp(1.9rem, 3.8vw, 2.9rem); line-height: 1.4; }
.film-invite__when, .film-invite__where { margin: 10px 0 0; color: var(--film-body); text-shadow: var(--film-shadow); font-size: clamp(1rem, 1.3vw, 1.14rem); line-height: 1.6; }
.film-invite__when:lang(en), .film-invite__where:lang(en) { font-family: var(--font-display); font-style: italic; font-weight: 500; font-size: clamp(1.14rem, 1.5vw, 1.32rem); color: var(--film-body-en); }
.film-invite__where { margin-block-start: 2px; }
.film-invite__where a { color: var(--film-gold-lit); text-decoration: none; border-block-end: 1px solid color-mix(in srgb, var(--film-gold) 40%, transparent); }
.film-invite__where a:hover { color: var(--film-gold); }
.film-invite__where + .film-invite__cta { margin-block-start: 26px; }

/* Calendar and share sit beside each other, not stacked: the invitation is
   long enough already, and a taller block never fades (intro.js: TALL) — it
   would sit lit at full opacity from the first frame. Where there is room
   they share the button's row, centred on it; on a phone they wrap under it,
   18px clear. */
.film-invite .cal,
.film-invite .share { display: inline-flex; vertical-align: middle; margin: 18px 6px; }
.film-invite .share__status { margin-block-start: 10px; }

.film-year__more a {
  color: var(--film-gold-lit); text-decoration: none;
  border-block-end: 1px solid color-mix(in srgb, var(--film-gold) 40%, transparent);
}
.film-year__more a:hover { color: var(--film-gold); }
.film-year__more { margin: 36px 0 0; font-size: clamp(1rem, 1.3vw, 1.14rem); }

/* ---------------------------------------------------------------- year --- */

/* The gatherings ahead, a card each: four to a row where there is room, a
   strip that scrolls sideways on narrower screens. */
.film-year { --film-glow-x: 50%; text-align: center; inline-size: min(68rem, 100%); max-inline-size: none; margin-inline: auto; }
.film-year::before { inset: -8% -6% -10% -6%; }
.film-year .film-title { max-inline-size: none; }
.film-year .film-rule { margin: 22px auto; }
.film-year .film-prose { margin-inline: auto; }
.film-year__list {
  list-style: none; margin: 44px 0 0; padding: 0; text-align: start;
  display: grid; gap: clamp(12px, 1.6vw, 22px); grid-template-columns: repeat(4, minmax(0, 1fr));
}
.film-year__card {
  display: flex; flex-direction: column; block-size: 100%; text-decoration: none; color: var(--film-paper);
  background: color-mix(in srgb, var(--film-ink) 80%, transparent);
  border: 1px solid color-mix(in srgb, var(--film-gold) 18%, transparent);
  transition: border-color 0.45s var(--film-fade), transform 0.45s var(--film-fade);
}
.film-year__card:hover, .film-year__card:focus-visible { border-color: var(--film-gold); transform: translateY(-3px); }
.film-year__still { display: block; aspect-ratio: 16 / 10; overflow: hidden; background: var(--film-ink); }
.film-year__still img {
  display: block; inline-size: 100%; block-size: 100%; object-fit: cover; filter: brightness(0.84);
  transition: transform 1.2s var(--film-fade), filter 1.2s var(--film-fade);
}
.film-year__card:hover img, .film-year__card:focus-visible img { transform: scale(1.05); filter: brightness(1); }
.film-year__words { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 14px 16px 18px; }
.film-year__when { color: var(--film-gold); font-size: 0.95rem; }
.film-year__when:lang(en) { font-family: var(--font-label); font-weight: 600; text-transform: uppercase; letter-spacing: 0.11em; font-size: 0.84rem; }
.film-year__name { font-family: var(--font-display); font-size: clamp(1.32rem, 1.7vw, 1.6rem); line-height: 1.2; }
.film-year__name:lang(fa) { font-family: var(--font-fa-display); font-size: clamp(1.2rem, 1.5vw, 1.45rem); line-height: 1.55; }
.film-year__state { padding: 2px 9px; border: 1px solid var(--film-line); border-radius: 999px; color: var(--film-body); font-size: 0.8rem; }
.film-year__state:lang(en) { font-family: var(--font-display); text-transform: uppercase; letter-spacing: 0.14em; font-size: 0.68rem; }
.film-year__more { margin-block-start: 34px; }

@media (max-width: 1000px) {
  .film-year__list {
    display: flex; overflow-x: auto; overscroll-behavior-inline: contain; scroll-snap-type: x mandatory;
    margin-inline: calc(-1 * clamp(22px, 7vw, 120px)); padding-inline: clamp(22px, 7vw, 120px); padding-block-end: 10px;
    scroll-padding-inline: clamp(22px, 7vw, 120px); scrollbar-width: none;
  }
  .film-year__list::-webkit-scrollbar { display: none; }
  .film-year__item { flex: 0 0 min(19rem, 72%); scroll-snap-align: start; }
}

/* --------------------------------------------------------- chapter rail --- */

.film-rail {
  position: fixed; z-index: 5; inset-block-start: 50%; inset-inline-end: clamp(18px, 2.4vw, 40px);
  transform: translateY(-50%);
  display: flex; flex-direction: column;
  padding-inline-end: 1px;
  transition: opacity 0.5s var(--film-fade), visibility 0.5s;
}
/* A ruler along the screen's edge, a tick for each scene: the rail reads as
   the film's contents, every scene named, the one on screen in gold. */
.film-rail::after {
  content: ""; position: absolute; inset-block: 18px; inset-inline-end: 0; inline-size: 1px;
  background: linear-gradient(to bottom, transparent, color-mix(in srgb, var(--film-paper) 22%, transparent) 12%, color-mix(in srgb, var(--film-paper) 22%, transparent) 88%, transparent);
}
.film-rail.is-gone { opacity: 0; visibility: hidden; }
/* The Year runs its cards to the screen's edges, where the rail sits: the
   rail steps aside while it is the scene being read. */
.film-rail:has([href="#year"][aria-current="true"]) { opacity: 0; visibility: hidden; }
.film-rail__item {
  display: flex; flex-direction: row-reverse; align-items: center; gap: 14px;
  min-block-size: 36px; text-decoration: none;
}
.film-rail__mark {
  display: block; inline-size: 12px; block-size: 1px;
  background: color-mix(in srgb, var(--film-paper) 45%, transparent);
  transition: inline-size 0.5s var(--film-fade), background-color 0.5s var(--film-fade), block-size 0.5s var(--film-fade);
}
.film-rail__label {
  font-size: 0.92rem; font-weight: 500; white-space: nowrap;
  color: var(--film-paper); text-shadow: var(--film-shadow);
  opacity: 0.5;
  transition: opacity 0.5s var(--film-fade), color 0.5s var(--film-fade);
}
.film-rail__label:lang(en) {
  font-family: var(--font-label); font-weight: 600; text-transform: uppercase;
  font-size: 0.76rem; letter-spacing: 0.11em;
}
.film-rail__item:hover .film-rail__label,
.film-rail__item:focus-visible .film-rail__label { opacity: 0.95; }
.film-rail__item:hover .film-rail__mark { inline-size: 20px; background: var(--film-gold); }
.film-rail__item[aria-current="true"] .film-rail__mark { inline-size: 32px; block-size: 2px; background: var(--film-gold); }
.film-rail__item[aria-current="true"] .film-rail__label { opacity: 1; color: var(--film-gold-lit); }
/* Where the screen is narrower the chapters' words come closer to the edge:
   the rail names only the scene on screen, and the rest on hover or focus. */
@media (max-width: 1180px) {
  .film-rail:not(:hover, :focus-within) .film-rail__item:not([aria-current="true"]) .film-rail__label { opacity: 0; }
}

/* ---------------------------------------------------------- foundation --- */

/* Below the film the page is reference material, on solid ground: it should
   never need a scrim to be read. */
.foundation {
  position: relative; z-index: 3;
  background: var(--film-ink);
  border-block-start: 1px solid color-mix(in srgb, var(--film-gold) 22%, transparent);
  padding: clamp(72px, 11vw, 140px) clamp(22px, 7vw, 120px);
}
.foundation__lead { max-inline-size: 60rem; margin-inline: auto; text-align: center; }
.foundation__lead .film-title { max-inline-size: none; margin-block-end: 22px; text-shadow: none; }
.foundation__mission { margin: 0 auto; max-inline-size: 46ch; color: var(--film-paper); }
.foundation__mission:lang(fa) { font-size: clamp(1.42rem, 2.3vw, 2.05rem); line-height: 1.85; }
.foundation__mission:lang(en) {
  max-inline-size: 52ch; font-family: var(--font-display); font-style: italic; font-weight: 500;
  font-size: clamp(1.5rem, 2.4vw, 2.1rem); line-height: 1.5;
}
.foundation__pillars {
  list-style: none; max-inline-size: 1180px; margin: clamp(48px, 7vw, 86px) auto 0; padding: 0;
  display: grid; gap: clamp(24px, 3.4vw, 46px);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 248px), 1fr));
}
.foundation__pillars li { border-block-start: 1px solid color-mix(in srgb, var(--film-gold) 26%, transparent); padding-block-start: 20px; }
.foundation__pillars h3 { margin: 0 0 10px; color: var(--film-paper); font-weight: 500; font-size: clamp(1.32rem, 1.8vw, 1.62rem); line-height: 1.4; }
.foundation__pillars h3:lang(en) { font-family: var(--font-display); font-size: clamp(1.5rem, 2vw, 1.8rem); line-height: 1.2; }
.foundation__pillars p { margin: 0; max-inline-size: 34ch; color: var(--film-body); font-size: clamp(1.08rem, 1.4vw, 1.24rem); line-height: 1.8; }
.foundation__pillars p:lang(en) { color: var(--film-body-en); line-height: 1.6; }
.foundation__more { margin: clamp(44px, 6vw, 72px) 0 0; text-align: center; }
.foundation__more a {
  display: inline-block; padding-block-end: 6px; text-decoration: none;
  color: var(--film-gold-lit); font-size: clamp(1.1rem, 1.5vw, 1.3rem);
  border-block-end: 1px solid color-mix(in srgb, var(--film-gold) 45%, transparent);
  transition: color 0.4s var(--film-fade), border-color 0.4s var(--film-fade);
}
.foundation__more a:hover { color: var(--film-gold); border-color: var(--film-gold); }

/* The shared footer, on the same solid ground as the Foundation above it. */
.foot { margin-block-start: 0; background: var(--film-ink); }

/* -------------------------------------------------------------- narrow --- */

@media (max-width: 820px) {
  .film-rail { display: none; }
  .film-scene { padding-inline: 22px; }
  /* A chapter runs a screen and a half here, to slow the pace. Its screen is
     centred in it, so the words are mid-screen while the scene is current. */
  .film-scene:not(.film-scene--hero, .film-scene--invite) {
    min-block-size: 150dvh;
    display: flex; flex-direction: column; justify-content: center;
  }
  .film-scene__hold { padding-block-end: clamp(60px, 10vh, 110px); }
  .film-block::before { inset: -10% -14% -14% -14%; }
  .film-title { max-inline-size: 13ch; }
  .film-prose:lang(fa) { max-inline-size: 38ch; }
  .film-prose:lang(en) { max-inline-size: 42ch; }
  /* The Year's strip runs to the screen's edges, which here are 22px away. */
  .film-year__list { margin-inline: -22px; padding-inline: 22px; scroll-padding-inline: 22px; }
  /* The intro is home, so the wordmark stands down and the options keep one
     row (with it, the row needs ~820px); the switch keeps to the far end.
     The sound button adds a fourth control to that row, so the gap between
     controls tightens too — still 44px targets, just packed closer. */
  .masthead--film .wordmark { display: none; }
  .masthead--film .masthead__tools { margin-inline-start: auto; }
  .masthead--film :is(.masthead__inner, .masthead__tools) { column-gap: .25rem; }
}
@media (max-width: 700px) {
  /* About and Manifesto lead away to daena.org, which the footer and the
     Foundation's own section still reach. The booking link, the listing and
     the switch keep the row. */
  .masthead--film .nav__offsite { display: none; }
}
/* Short screens (small phones, 720p laptops): the type stays large and the air
   between it gives way, so a block never outgrows the screen. */
@media (max-height: 760px) {
  .film-rule { margin-block: 12px 15px; }
  .film-prose:lang(fa) { line-height: 1.7; }
  .film-prose:lang(en) { line-height: 1.5; }
  .film-hero__brand { margin-block-end: 16px; }
  .film-hero__title:lang(en) { font-size: clamp(2.6rem, 6.2vw, 4.6rem); }
  .film-hero__title:lang(fa) { font-size: clamp(2.4rem, 5.4vw, 4.4rem); }
  .film-hero .film-rule { margin: 15px auto; }
  .film-hero__next { margin-block-start: 20px; }
  .film-invite .film-rule { margin: 15px auto; }
  .film-invite__cta { margin-block-start: 24px; padding: 16px 44px; }
  .film-block::before { inset: -10% -10% -12% -10%; }
}
/* A phone held sideways: the rail, centred on the screen, needs ~430px to sit
   clear of the masthead (more with more chapters). Below that it stands
   aside, as it does on a phone held upright; the page reads without it. A
   landscape phone can be wider than 820px (the portrait breakpoint above),
   so the wordmark and the row's gap are trimmed by height here too, to keep
   the sound button's row from wrapping. */
@media (max-height: 430px) {
  .film-rail { display: none; }
  .masthead--film .wordmark { display: none; }
  .masthead--film .masthead__tools { margin-inline-start: auto; }
  .masthead--film :is(.masthead__inner, .masthead__tools) { column-gap: .25rem; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .film-grain, .film-cue { animation: none; }
  .film-stage__clip { display: none; }
}

/* Save-data readers get the same stillness, but only intro.js can tell —
   navigator.connection.saveData has no media-query equivalent — so it marks
   the root with .film-still (it does the same under reduced motion, which
   the rule above already covers without JavaScript; this one is additional
   for save-data, not a replacement). */
.film-still .film-grain, .film-still .film-cue { animation: none; }

/* ------------------------------------------------------------- figures ---
   The same rule the rest of the site follows (daena.css): Cormorant's default
   figures are old-style, so "Saturday, 17 October 2026 · 12:00 pm" came out
   with digits at three different heights. Last in the file, because the `font`
   shorthand above resets font-variant-numeric. */
:is(.film-invite__when, .film-invite__where, .film-year__when, .film-year__state,
    .film-chapter__num, .film-hero__next, .film-cue) {
  font-variant-numeric: lining-nums tabular-nums;
}
