/* =============================================================================
 * Daena Foundation — Template A
 * THEME: Shab (Night) · Cinematic Night
 *
 * The intro's film language carried through every page: the film-ink ground
 * with a static grain and vignette instead of wallpaper, stage-lit stills,
 * gold hairlines and outlined gold buttons. Cormorant for display and labels,
 * Spectral for English text, Vazirmatn for Persian.
 *
 * No framework, no build step, no dependencies. Logical properties throughout,
 * so the Persian right-to-left view needs no second stylesheet.
 * ========================================================================== */

@import url("./fonts.css");
@import url("./tokens.css");
@import url("./themes.css");
/*
 * motifs.css is deliberately not imported. It is 23 KB of tileable background
 * patterns whose six classes — .motif-girih, .motif-ripple and the rest —
 * appear on no page of this site, and half its rules key off [data-theme],
 * which no page carries either. Imported, it was render-blocking on every
 * page for nothing, and the slowest of the four. shared/brand/motifs.mjs
 * still generates it and docs/MOTIFS.md still records what it is for; the
 * day something uses one, import it back.
 */

/* --------------------------------------------------------------- reset --- */

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

/* A component rule with display:grid/flex overrides the UA [hidden] rule,
   which silently un-hides anything the script hides. This must win. */
[hidden] { display: none !important; }

/* The masthead stays on screen (sticky, or fixed over a hero), so in-page
   links and keyboard focus land below it rather than under it. */
html { -webkit-text-size-adjust: 100%; scroll-padding-block-start: calc(var(--bar-h) + 1px); }

img, svg { max-inline-size: 100%; block-size: auto; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
p { margin: 0 0 1rem; }
ul, ol { margin: 0; padding-inline-start: 1.3rem; }

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

.skip-link {
  position: absolute; inset-block-start: -100%; inset-inline-start: 1rem; z-index: 100;
  padding: 0.75rem 1rem; background: var(--color-accent); color: var(--color-accent-ink);
  text-decoration: none;
}
.skip-link:focus { inset-block-start: 0.75rem; }

.visually-hidden {
  position: absolute; inline-size: 1px; block-size: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip-path: inset(50%); white-space: nowrap; border: 0;
}

/* ------------------------------------------------------------- system --- */

:root {
  --ink: var(--color-bg);                 /* #06060A */
  --paper: var(--color-ink);              /* #F2EDE1 */
  --body: #D9D0BF;
  --muted: var(--color-ink-muted);        /* #A89F8F */
  --gold: var(--color-accent);            /* #E4C06A */
  --gold-lit: var(--color-accent-hover);  /* #F0D79A */
  --line: color-mix(in srgb, var(--gold) 30%, transparent);
  --line-faint: color-mix(in srgb, var(--gold) 14%, transparent);
  --ease: cubic-bezier(.22, .61, .36, 1);
  /* None of the four stacks below names a Persian face, and none needs to.
     'Vazirmatn' used to sit second in each of them, which read like a
     sensible fallback and was dead weight: Persian text is pinned to its own
     stack at the foot of this file, so the fallback never drew a Persian
     letter. What it did instead was make Chrome fetch the Latin cut of
     Vazirmatn while Spectral was still swapping in — 33.6 KB that rendered
     nothing at all on an event page and on the policies page. The one Persian
     word an English page shows is the language toggle, and that is settled
     where the toggle is styled. */
  --font-text: 'Spectral', Georgia, serif;
  --font-display: 'Cormorant Garamond', Georgia, serif;
  /* Labels are small, uppercase and widely tracked: a date line, a status
     chip, the month rail, the nav. Cormorant is a display serif with very thin
     strokes, and at 10–12px in gold on black those labels went spidery —
     "SATURDAY 17 OCTOBER · 12:00 PM" was hard to read at any distance.
     Spectral is the text face the site already sets its paragraphs in: drawn
     for the screen, with sturdier stems and full-height figures, so a label
     holds up small. It is a serif, so it keeps company with the Cormorant
     headings rather than arguing with them — a sans was tried here first and
     read as a different design. Cormorant keeps every heading and every price. */
  --font-label: 'Spectral', Georgia, serif;
  /* The masthead alone. Cinzel: Roman inscriptional capitals, drawn from the
     letters cut into stone rather than written with a pen, and made for titles
     at exactly this size. A geometric sans was tried here first and read as a
     different website; this one belongs to the same tradition as the Cormorant
     headings beneath it while being unmistakably another voice. Nowhere else
     on the site, so it stays a nameplate. */
  --font-nav: 'Cinzel', Georgia, serif;
  --bar-h: 4.25rem;
}

body {
  margin: 0; background: var(--ink); color: var(--body);
  font: 300 1.0625rem/1.7 var(--font-text);
  -webkit-font-smoothing: antialiased; overflow-x: clip;
}
:lang(fa) body, body:lang(fa) { line-height: 1.9; }
/* tokens.css sets every [lang="fa"] element to --leading-relaxed (1.75),
   under the spec's 1.8 floor for Persian text, so a Persian block of text
   takes the page's 1.9 back. Zero specificity, like the rule it answers:
   a component's own line-height still wins, and inline runs are left alone,
   since their block sets the line. */
:where(p, li, dd, dt, label, legend, small, figcaption, blockquote)[lang="fa"] { line-height: 1.9; }

/* Film grain and vignette: texture instead of wallpaper. Static, so reduced
   motion changes nothing; the intro hides this and keeps its moving grain. */
body::before, body::after { content: ""; position: fixed; inset: 0; pointer-events: none; z-index: 60; }
body::before { background: radial-gradient(120% 90% at 50% 40%, transparent 55%, rgb(0 0 0 / .45) 100%); z-index: 59; }
body::after {
  opacity: .035; 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");
}

h1, h2, h3, h4 { margin: 0; color: var(--paper); font-family: var(--font-display); font-weight: 500; line-height: 1.08; }
:lang(fa) :is(h1, h2, h3, h4), :is(h1, h2, h3, h4):lang(fa) { line-height: 1.4; }
a { color: inherit; text-underline-offset: 0.25em; }

/*
 * The gold line above a title — the date, the section, the kind of thing this
 * is. At 0.78rem in small capitals with a wide letter-spacing it was legible
 * and quiet; a little more of it reads as deliberate rather than as fine
 * print, which is what a date on a panel should be. The Persian goes up with
 * it: it is not in capitals and has no letter-spacing, so it needs the size
 * more, not less.
 */
.label { margin: 0; font: 600 0.84rem/1.35 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--gold); }
.label:lang(fa) { font: 500 .96rem/1.8 var(--font-text); }
.rule-hair { display: block; inline-size: 64px; block-size: 1px; margin-block: 1rem 1.25rem; background: linear-gradient(to right, var(--gold), transparent); }
[dir="rtl"] .rule-hair { background: linear-gradient(to left, var(--gold), transparent); }

/* -------------------------------------------------------------- layout --- */

.wrap { inline-size: min(100% - 2.5rem, 1320px); margin-inline: auto; }
.wrap--narrow { inline-size: min(100% - 2.5rem, 680px); margin-inline: auto; }

/* ------------------------------------------------ names and isolates --- */

bdi { unicode-bidi: isolate; }

/* ------------------------------------------------------------ buttons --- */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .6em;
  min-block-size: 44px; padding: .85rem 1.9rem; border: 1px solid var(--gold); border-radius: 0; text-align: center;
  background: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--gold-lit);
  font: 600 0.8rem/1.2 var(--font-label); letter-spacing: .11em; text-transform: uppercase; text-decoration: none; cursor: pointer;
  transition: background-color .45s var(--ease), color .45s var(--ease);
}
/*
 * The last letter's own spacing, given back.
 *
 * letter-spacing puts the gap AFTER every character including the last, so
 * centred text carries one gap of dead space on its trailing edge and sits
 * half a gap to the left of the middle. On "CONFIRM YOUR REGISTRATION",
 * wrapped to two lines inside a gold frame, both lines were visibly off
 * centre. Indenting by the same amount moves the text back by half of it,
 * which is exactly the error. Persian is not tracked out, so it is exempt.
 */
.btn:lang(en) { text-indent: .11em; }
.btn:lang(fa) { font: 500 .95rem/1.4 var(--font-text); text-indent: 0; }
.btn:hover, .btn:focus-visible { background: var(--gold); color: var(--ink); }
.btn--solid { background: var(--gold); color: var(--ink); }
.btn--block { inline-size: 100%; }
.btn[aria-disabled="true"] { opacity: .45; pointer-events: none; }
.link {
  display: inline-flex; align-items: center; min-block-size: 44px; padding: 0; border: 0; background: none; cursor: pointer;
  font: italic 500 1.05rem/1.3 var(--font-display); color: var(--gold-lit); text-decoration: none;
  box-shadow: inset 0 -1px 0 var(--line);
}
.link:lang(fa) { font: 400 1rem/1.8 var(--font-text); }
.link:hover, .link:focus-visible { color: var(--gold); }

/* --------------------------------------------------------------- chips --- */

.chip {
  display: inline-flex; align-items: center; min-block-size: 1.7rem; padding: .2rem .8rem; border: 1px solid currentColor; border-radius: 999px;
  font: 600 0.74rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--gold);
}
.chip:lang(fa) { font: 500 .8rem/1 var(--font-text); }
.chip--on-sale { color: var(--color-success); } .chip--few-left { color: var(--color-warning); }
.chip--sold-out { color: var(--color-danger); }
.chip--past { color: var(--muted); }

/* --------------------------------------------------------------- seats --- */

.seats { font-size: 0.86rem; color: var(--color-ink-muted); margin: 0; font-variant-numeric: lining-nums tabular-nums; }
.seats__bar { display: block; inline-size: 100%; min-inline-size: 8rem; block-size: 2px; margin-block-start: 0.5rem; background: var(--color-rule); }
.seats__fill { display: block; block-size: 100%; background: var(--color-festival); }

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

.masthead { position: sticky; inset-block-start: 0; z-index: 40; transition: background-color .5s var(--ease), border-color .5s var(--ease); border-block-end: 1px solid transparent; }
.masthead--over { position: fixed; inset-inline: 0; }

/*
 * A scrim under the bar, while the bar is still transparent.
 *
 * Both bars sit over a picture until the hero has passed, and the words of the
 * page scrolled straight through them: "The season · 1405–1406" crossed
 * "Daena Foundation", and on the film "Gatherings of the Iranian Year" ran
 * through the whole menu. There was a gradient, but it was 72% at the very top
 * and gone by the bar's lower edge — which is exactly where the collisions
 * happened.
 *
 * It now starts nearly solid, holds most of its weight to the bar's foot, and
 * fades out over a little more below it, so a line passing underneath is
 * veiled rather than read. It is drawn in a pseudo-element so it can extend
 * past the header's own box, sits behind the bar's contents, and takes no
 * pointer events. Once the hero has passed, .is-solid covers it anyway.
 */
:is(.masthead--over, .masthead--film)::before {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-start: 0;
  block-size: calc(100% + 2.75rem);
  background: linear-gradient(to bottom,
    color-mix(in srgb, var(--ink) 94%, transparent) 0%,
    color-mix(in srgb, var(--ink) 86%, transparent) 45%,
    color-mix(in srgb, var(--ink) 62%, transparent) 72%,
    transparent 100%);
  pointer-events: none;
  z-index: -1;
  /*
   * At rest the bar keeps most of its ground rather than none of it.
   *
   * This was 0: the scrim appeared only while a line of the hero was
   * physically crossing the bar, so a page sitting still put the wordmark,
   * the menu and the language switch on raw photograph. Measured on the
   * Nowruz page, whose still is sunlit blossom, the language switch came out
   * at 1.6:1 against the 4.5 it needs — and that is the only way into
   * Persian on the whole site. On Gahanbar's dark Persepolis it measured
   * 16.9, which is why nobody saw it: whether the bar could be read depended
   * on which photograph was behind it, so a brighter still for a new festival
   * would have made it unreadable with nothing changed and nothing said.
   *
   * .6 is enough to carry the type over any still the Foundation is likely to
   * use and light enough that the picture still reads through it. The first
   * scroll still takes it to full, and .is-solid still removes it once the
   * bar has a ground of its own.
   */
  opacity: .6;
  transition: opacity .4s var(--ease);
}
.masthead.is-scrolled::before { opacity: 1; }
.masthead.is-solid::before { opacity: 0; }
.masthead.is-solid { background: color-mix(in srgb, var(--ink) 94%, transparent); border-block-end-color: var(--line-faint); backdrop-filter: blur(10px); }
/* Only app.js can tell when the hero has passed, so without it the bar is
   solid from the start rather than letting the page scroll through it. */
/* The language button works only through app.js, so without it — script off,
   or the file never arriving, which the early script notices after 2.5s — it
   is not offered, as the sound and share buttons are not. A button that does
   nothing tells a reader that Persian is there and cannot be had. */
html:not(.js) .lang-toggle { display: none; }
html:not(.js) .masthead--over { background: color-mix(in srgb, var(--ink) 94%, transparent); border-block-end-color: var(--line-faint); backdrop-filter: blur(10px); }
.masthead__inner { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 2rem; min-block-size: var(--bar-h); }
/*
 * The bar is one row before the typefaces arrive, not only after.
 *
 * It wrapped to two rows while the fallback face was drawing it — Georgia is
 * wider than Cinzel and not letter-spaced — and unwrapped when Cinzel landed,
 * around two and a half seconds in. On the pages whose bar is sticky rather
 * than fixed, that pulled the whole document up by 32px under the reader:
 * measured CLS 0.275 on checkout and 0.234 on policies, both in Google's
 * "poor" band, and both on a page where somebody is trying to pay.
 *
 * So the row is held to one at every width, which is what the comment below
 * always claimed and the rule only did from 701px up. The bar already sheds
 * its offsite links and long call-to-action label under 701px (further down),
 * which is why one row fits: checked at 320, 360, 390, 430, 700 and 760px,
 * one row, no overflow, no sideways scroll. The film's own bar is excluded —
 * it reserves two rows on the narrowest phones on purpose.
 */
.masthead:not(.masthead--film) :is(.masthead__inner, .nav) { flex-wrap: nowrap; }
.masthead:not(.masthead--film) .masthead__inner { block-size: var(--bar-h); }
.masthead:not(.masthead--film) :is(.wordmark, .masthead__tools) { flex: none; }
/* A 44px target however small its type, the name centred in it: the
   Foundation's name in the page's language. */
.wordmark { display: inline-flex; align-items: center; min-block-size: 44px; text-decoration: none; margin-inline-end: auto; }
.wordmark__name { flex: none; white-space: nowrap; color: var(--gold); }
.wordmark__name:lang(en) { font: 600 0.84rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; }
.wordmark__name:lang(fa) { font: 700 1.15rem/1 'Vazirmatn', sans-serif; }
.nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem 1.7rem; }
.nav a { display: inline-flex; align-items: center; justify-content: center; min-block-size: 44px; min-inline-size: 24px; text-decoration: none; color: var(--paper); font: 600 0.76rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; }
.nav a:lang(fa) { font: 500 .92rem/1 var(--font-text); }
/*
 * The gold marks the section you are in, whichever page of it you are on.
 *
 * aria-current changed from "page" to "true" on the pages inside the Events
 * section — because a screen reader saying "Events, current page" while you
 * are on Policies, or on a registration form, is simply untrue. The selectors
 * here still read "page" alone, so the mark disappeared from twenty-three
 * pages: every gathering, every form, the payment step and the confirmation.
 *
 * Both halves are wanted and they are different halves. "page" and "true" say
 * different things to a screen reader and should; to the eye they mean the
 * same thing — you are in here — which is what the underline has always
 * meant. So the eye's cue takes any aria-current and the reader's keeps its
 * precision.
 */
.nav a:hover, .nav a[aria-current]:not([aria-current="false"]) { color: var(--gold); }
.nav a.nav__cta { color: var(--gold); }
.nav__cta-short { display: none; }
/* The bar's own controls (the intro's sound, the language switch), kept together at its end. */
.masthead__tools { display: flex; flex: none; align-items: center; gap: .75rem; }
/*
 * The switch names its own Persian face, rather than falling through to it.
 *
 * It used to be set in --font-text, which read 'Spectral', 'Vazirmatn',
 * Georgia: the Latin "English" came out in Spectral and the Persian "فارسی"
 * fell through to Vazirmatn, because Spectral has no Persian glyphs. That
 * fallthrough was the only thing holding the button's look, and it broke the
 * moment Vazirmatn was taken out of the Latin stacks — where it was fetching
 * 33.6 KB to render no glyphs at all on two page types, which is a saving
 * worth keeping. The button then fell to the device's own Arabic face, next
 * to a wordmark set in Cinzel, and read as a mistake.
 *
 * Naming both faces here keeps the button exactly as it was drawn and leaves
 * the saving where it was made. It is also the honest way round: this is the
 * one control on the site that is deliberately written in the language it
 * leads to, so it is the one control that genuinely needs both.
 */
.lang-toggle { min-block-size: 44px; min-inline-size: 44px; padding: .4rem 1rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--paper); cursor: pointer; font: 500 .85rem/1 'Spectral', 'Vazirmatn', Georgia, serif; }
.lang-toggle:hover { border-color: var(--gold); color: var(--gold); }
/*
 * The language switch keeps Vazirmatn, and the 45 KB that comes with it.
 *
 * That face is fetched on every page of the site to draw five letters —
 * فارسی, on this button, and nothing else — which on the policies page makes
 * it the single heaviest thing there. It was therefore scoped to the system
 * Persian stack while the page is in English, which saved 45 to 58 KB a page
 * and moved LCP by about a quarter of a second.
 *
 * It was put back because it looked worse, which the client saw at once and
 * is the right call: this is the one control that gets a Persian reader into
 * their own language, and it is in the masthead of every page. A gateway
 * drawn in the device's fallback face, next to a wordmark set in Cinzel,
 * reads as a mistake.
 *
 * The saving is still available without the cost: a subset of Vazirmatn
 * carrying only these five letters and their contextual forms is 2 to 4 KB.
 * It wants fonttools, which is not on the build machine; docs/ records it.
 */
/* The bar keeps to one row at every width: an 'over' bar is fixed, so a
   second row would sit on the page. Narrower, it sheds what the page or the
   footer already offers. (The intro's film bar has its own rules in intro.css.) */
@media (max-width: 960px) {
  .masthead:not(.masthead--film) :is(.masthead__inner, .nav) { column-gap: 1.25rem; }
}
/* A wide screen: the bar runs edge to edge, the wordmark at its start, the
   links centred on the page (on the intro, under the centred title), and
   the bar's own controls at its end. */
@media (min-width: 1280px) {
  .masthead .masthead__inner { display: grid; grid-template-columns: 1fr auto 1fr; inline-size: auto; margin-inline: clamp(1.5rem, 3vw, 3.5rem); column-gap: 2rem; }
  .masthead .wordmark { justify-self: start; margin-inline-end: 0; }
  .masthead .nav { justify-self: center; }
  .masthead .masthead__tools { justify-self: end; }
}
/* The call to action names a gathering, and a name is data: however long the
   next one's, the full label gives way (ending in an ellipsis) before the bar
   takes a second row. Below 701px the short label takes over. */
@media (min-width: 701px) {
  .masthead:not(.masthead--film) :is(.masthead__inner, .nav) { flex-wrap: nowrap; }
  .masthead:not(.masthead--film) :is(.wordmark, .masthead__tools, .nav a) { flex: none; }
  .masthead:not(.masthead--film) .nav { min-inline-size: 0; }
  .masthead:not(.masthead--film) .nav a.nav__cta { flex: 0 1 auto; min-inline-size: 0; }
  .masthead:not(.masthead--film) .nav__cta-full { min-inline-size: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
}
@media (max-width: 700px) {
  .masthead .nav__offsite { display: none; }
  .wordmark__more { display: none; }
  .masthead :is(.masthead__inner, .nav) { column-gap: 1rem; }
  /* The call to action keeps its place, in the few words a phone has room
     for: "Reserve", "Full", "Season". */
  .nav__cta-full { display: none; }
  .nav__cta-short { display: inline; }
}
/* The smallest phones (under the 360px the site is designed to): the same
   row, packed closer. The intro's bar takes two rows here, and reserves them. */
@media (max-width: 359px) {
  .masthead:not(.masthead--film) :is(.masthead__inner, .nav) { column-gap: .6rem; }
  .masthead:not(.masthead--film) .nav a { letter-spacing: .2em; }
  .masthead:not(.masthead--film) .lang-toggle { padding-inline: .7rem; }
}

/*
 * The payment and confirmation pages, before the script has run.
 *
 * Both are written with the full summary in the markup and the "nothing to
 * pay for" message hidden, which is right for the journey that reaches them
 * from the form and right with no JavaScript at all. It is wrong for anyone
 * arriving cold — from a bookmark, a shared link, a second tab — because the
 * page then paints the whole summary and the script takes it away again a
 * second later, throwing the footer 775px up the screen. Measured layout
 * shift on a throttled phone: 0.37, in Google's "poor" band, on the page
 * where somebody is trying to pay.
 *
 * So the decision is made before the first paint instead. The same inline
 * head script that settles the language asks whether there is a booking in
 * this browser and marks the document; these two rules then paint the right
 * state immediately. The script later sets the hidden attributes itself and
 * agrees with what is already on screen, so nothing moves.
 */
html.no-booking :is([data-checkout-body], [data-success-body]) { display: none !important; }
/* !important because the state to paint is written as the `hidden` attribute,
   and the rule at the top of this file makes that attribute absolute on
   purpose. This is the one place that has to answer it. */
html.no-booking :is([data-checkout-empty], [data-success-empty])[hidden] { display: block !important; }
/* Back from Stripe's page: the payment is confirmed before anything else is
   shown (EARLY_BOOKING; app.js, initSuccess, takes the class off when it is). */
html.paying :is([data-success-body], [data-success-empty]) { display: none !important; }
html.paying [data-success-waiting][hidden] { display: block !important; }

/* Paying on Stripe's page (the checkout, with Stripe connected). */
.pay__secure { display: flex; gap: .65rem; align-items: flex-start; margin: 0 0 1.1rem; color: var(--muted); font-size: .92rem; line-height: 1.6; }
.pay__secure svg { flex: none; inline-size: 1.15rem; block-size: 1.15rem; margin-block-start: .2rem; fill: none; stroke: var(--gold); stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round; }
.pay__unpaid { margin: 0 0 1.1rem; padding: .85rem 1rem; border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); background: color-mix(in srgb, var(--gold) 7%, transparent); }
.pay__unpaid p { margin: 0; }
.pay__confirming { display: flex; gap: 1rem; align-items: center; padding-block: 2rem; }
.pay__confirming p { margin: 0; }
.pay__spinner { flex: none; inline-size: 1.6rem; block-size: 1.6rem; border: 2px solid color-mix(in srgb, var(--gold) 25%, transparent); border-block-start-color: var(--gold); border-radius: 50%; animation: pay-spin .9s linear infinite; }
@keyframes pay-spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .pay__spinner { animation-duration: 3s; } }

/* -------------------------------------------------------------- stage --- */
/* A hero: a still, stage-lit (scrim toward the words), with the words over it. */

/* overflow lives on .stage__still, not .stage: the still's drift (the 1.05
   scale below) needs clipping, but the words that sit over it — and a menu
   they open, such as the calendar dropdown — must not be. .stage keeps
   isolation so the still and its scrim (both negative z-index) still stack
   under .stage__words without a stacking context leak. */
.stage { position: relative; min-block-size: min(88vh, 860px); display: grid; align-items: end; isolation: isolate; }
.stage__still { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.stage__still img { inline-size: 100%; block-size: 100%; object-fit: cover; animation: stage-drift 18s var(--ease) both; }
@keyframes stage-drift { from { transform: scale(1); } to { transform: scale(1.05); } }
/* The season's pictures, one after another (listing.mjs: stageSlides). */
.stage__slide { position: absolute; inset: 0; margin: 0; opacity: 0; transition: opacity .8s var(--ease); }
.stage__slide[data-active] { opacity: 1; }
.stage__slide img { animation: none; }
.stage__slide[data-active] img { animation: stage-drift 4s linear both; }
/* At the far edge of the picture, level with the hero's buttons, placed
   against the picture itself so nothing moves it as the words come in. */
.stage__controls {
  position: absolute; z-index: 1; inset-inline-end: clamp(1.25rem, 6vw, 6rem); inset-block-end: clamp(2.5rem, 7vh, 5rem);
  display: inline-flex; align-items: center; gap: .9rem; min-block-size: 2.9rem;
}
.stage__controls[hidden] { display: none; }
.stage__now { margin: 0; font: 600 .7rem/1.4 var(--font-label); letter-spacing: .14em; text-transform: uppercase; color: var(--paper); text-shadow: 0 1px 8px rgb(0 0 0 / .6); }
.stage__now :lang(fa) { font: 500 .85rem/1.6 var(--font-text); letter-spacing: 0; text-transform: none; }
.stage__dots { display: flex; gap: 0; }
.stage__dot { display: grid; place-items: center; inline-size: 24px; block-size: 24px; padding: 0; border: 0; background: transparent; cursor: pointer; }
.stage__dot::before { content: ""; inline-size: 7px; block-size: 7px; border-radius: 50%; background: color-mix(in srgb, var(--paper) 45%, transparent); transition: background-color .3s var(--ease), transform .3s var(--ease); }
.stage__dot[aria-pressed="true"]::before { background: var(--gold); transform: scale(1.3); }
.stage__dot:focus-visible, .stage__pause:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 50%; }
.stage__pause { display: grid; place-items: center; inline-size: 32px; block-size: 32px; padding: 0; border: 1px solid color-mix(in srgb, var(--paper) 35%, transparent); border-radius: 50%; background: rgb(6 6 10 / .35); color: var(--paper); cursor: pointer; }
.stage__pause-mark { inline-size: 9px; block-size: 10px; border-inline: 3px solid currentColor; }
.stage__pause[aria-pressed="true"] .stage__pause-mark { inline-size: 0; block-size: 0; border-inline: 0; border-block: 5px solid transparent; border-inline-start: 8px solid currentColor; }
@media (max-width: 40rem) { .stage__now { display: none; } .stage__controls { min-block-size: 2.2rem; } }
/* On a wide screen the row is allowed past the words' column, so the
   controls stay on the line of the buttons rather than dropping under them. */

.stage::after { content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(to right, rgb(6 6 10 / .92) 0%, rgb(6 6 10 / .6) 42%, rgb(6 6 10 / .12) 100%), linear-gradient(to top, var(--ink) 0%, rgb(6 6 10 / .55) 32%, rgb(6 6 10 / 0) 60%); }
[dir="rtl"] .stage::after { background: linear-gradient(to left, rgb(6 6 10 / .92) 0%, rgb(6 6 10 / .6) 42%, rgb(6 6 10 / .12) 100%), linear-gradient(to top, var(--ink) 0%, rgb(6 6 10 / .55) 32%, rgb(6 6 10 / 0) 60%); }
.stage__words { padding: calc(var(--bar-h) + 3rem) clamp(1.25rem, 6vw, 6rem) clamp(2.5rem, 7vh, 5rem); max-inline-size: min(52rem, 100%); }

/* ------------------------------------------------------------- reveal --- */
/* Hidden only when script runs (html.js) and motion is welcome. The reveal
   owns a block's opacity and transform only until app.js marks it
   .is-settled, once it has arrived; after that the block's own transitions,
   if it has any, apply again. Hover effects belong on a block's children
   (Task 3's panels put theirs on the still), never on the block itself. */

.js [data-reveal]:not(.is-settled) { transition: opacity .7s var(--ease), transform .7s var(--ease); }
.js [data-reveal]:not(.is-in) { opacity: 0; transform: translateY(12px); }
/* A block holding an in-page link's target is shown at once: the jump
   measures where the block is, and one still 12px low would rise 12px under
   the bar after landing. */
.js [data-reveal]:is(:target, :has(:target)) { opacity: 1; transform: none; transition: none; }

/* Paper has no scroll to reveal on: every block, at once. */
@media (prefers-reduced-motion: reduce) {
  .stage__still img { animation: none; }
  /* !important only to beat tokens.css, which shortens every transition to
     0.01ms under reduced motion rather than removing it. */
  [data-reveal], .js [data-reveal]:not(.is-in) { opacity: 1; transform: none; transition: none !important; }
}

/* ------------------------------------------------------------- season --- */
/* The listing: a stage for the next gathering, a month rail, then one wide
   panel per gathering with its still alternating sides. */

.season__title { font-size: clamp(2.6rem, 6vw, 4.8rem); margin: .8rem 0 1rem; }
.season__title em { font-style: italic; color: var(--gold); }
.season__lead { max-inline-size: 46ch; color: var(--body); margin: 0 0 1.6rem; }
.season__actions { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.8rem; margin: 0; }

.season-rail { display: flex; flex-wrap: wrap; gap: .25rem 2.2rem; padding: .6rem clamp(1.25rem, 6vw, 6rem); border-block: 1px solid var(--line-faint); position: sticky; inset-block-start: var(--bar-h); z-index: 30; background: color-mix(in srgb, var(--ink) 92%, transparent); backdrop-filter: blur(8px); }
.season-rail a { display: inline-flex; align-items: center; min-block-size: 44px; text-decoration: none; color: var(--muted); font: 600 0.74rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; }
.season-rail a:lang(fa) { font: 500 .9rem/1 var(--font-text); }
.season-rail a:hover, .season-rail a:focus-visible { color: var(--gold); }
.season-rail__past { margin-inline-start: auto; }
.season__anchor { display: block; }
/* An in-page jump lands just below the rail, and so does a link reached from
   the keyboard where a browser scrolls it to the nearest edge (Chrome centres
   it instead). html's scroll padding already keeps both clear of the bar, so
   this adds the rail's one row: its links, padding and rules. */
.season { --rail-h: calc(44px + 1.2rem + 2px); }
.season__list, .season__anchor, .panel, .past, :is(.season__list, .past) a { scroll-margin-block-start: var(--rail-h); }

.panel { position: relative; display: grid; grid-template-columns: 1.25fr 1fr; min-block-size: clamp(300px, 34vw, 460px); border-block-end: 1px solid var(--line-faint); }
.panel--flip { grid-template-columns: 1fr 1.25fr; }
.panel--flip .panel__still { order: 2; }
.panel__still { position: relative; margin: 0; overflow: hidden; }
.panel__still img { position: absolute; inset: 0; inline-size: 100%; block-size: 100%; object-fit: cover; filter: brightness(.82) saturate(.96); transition: transform 1.4s var(--ease), filter 1.4s var(--ease); }
.panel:hover .panel__still img, .panel:focus-within .panel__still img { transform: scale(1.04); filter: brightness(1) saturate(1.04); }
.panel__words { display: flex; flex-direction: column; justify-content: center; padding: clamp(1.6rem, 4vw, 3.4rem); }
.panel__title { font-size: clamp(2rem, 3.2vw, 2.7rem); margin: .6rem 0 .6rem; }
.panel__title:lang(fa) { font-size: clamp(1.75rem, 2.8vw, 2.4rem); }
.panel__title a { text-decoration: none; }
/* The title's link covers the whole panel, so the panel is one link. Its
   overlay sits above the still, so the focus ring goes on the overlay: an
   outline on the panel itself would paint under the still. */
.panel__title a::after { content: ""; position: absolute; inset: 0; z-index: 1; }
.panel__title a:focus-visible { outline: none; }
.panel__title a:focus-visible::after { outline: 2px solid var(--color-focus); outline-offset: -4px; }
.panel__tag { margin: 0; color: var(--body); max-inline-size: 42ch; }
.panel__meta { display: flex; flex-wrap: wrap; align-items: center; gap: .6rem 1.4rem; margin: 1.2rem 0 0; font: italic 500 1rem/1.3 var(--font-display); color: var(--body); }
.panel__meta:lang(fa) { font: 400 .95rem/1.6 var(--font-text); }
.panel__price { margin-inline-start: auto; font: 500 1.5rem/1 var(--font-display); color: var(--paper); font-style: normal; }
.panel__price small { font: 600 0.74rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--muted); margin-inline-end: .4rem; }
.panel__price small:lang(fa) { font: 400 .8rem/1 var(--font-text); }
.panel--quiet { grid-template-columns: 1fr; min-block-size: 0; background: linear-gradient(to right, color-mix(in srgb, var(--paper) 3%, transparent), transparent); }
[dir="rtl"] .panel--quiet { background: linear-gradient(to left, color-mix(in srgb, var(--paper) 3%, transparent), transparent); }
.panel--quiet .panel__words { padding-block: clamp(2rem, 5vw, 3.4rem); max-inline-size: 52rem; }

/* Dimmed on its contents, not on the section: the section reveals, and the
   reveal owns its opacity (ending at 1). */
.past { padding: clamp(3rem, 6vw, 5rem) clamp(1.25rem, 6vw, 6rem); }
.past > * { opacity: .8; }
.past__title { font-size: 1.8rem; margin-block-end: 1.2rem; }
.past__list { list-style: none; margin: 0; padding: 0; }
.past__list a { display: grid; grid-template-columns: 14rem 1fr auto; gap: 1rem; padding-block: .9rem; border-block-start: 1px solid var(--line-faint); text-decoration: none; color: var(--body); }
.past__name { font: 500 1.2rem/1.3 var(--font-display); color: var(--paper); }
.past__name:lang(fa) { font: 500 1.05rem/1.7 var(--font-text); }

@media (max-width: 820px) {
  .panel, .panel--flip { grid-template-columns: 1fr; }
  .panel--flip .panel__still { order: 0; }
  .panel__still { aspect-ratio: 16 / 9; }
  .past__list a { grid-template-columns: 1fr; gap: .2rem; }
}
/* On a phone the rail wraps to two rows, too much to keep on screen under
   the bar, so it scrolls away with the hero and the jumps land under the bar. */
@media (max-width: 700px) {
  .season-rail { position: static; column-gap: 1.6rem; }
  .season__list, .season__anchor, .panel, .past, :is(.season__list, .past) a { scroll-margin-block-start: 0; }
}
@media (prefers-reduced-motion: reduce) {
  .panel__still img { transition: none; }
  .panel:is(:hover, :focus-within) .panel__still img { transform: none; }
}

/* -------------------------------------------------------------- event --- */
/* A gathering's own page: a stage for the hero, the story and its evening on
   the left, the ticket card on the right, and what to expect below. */

.stage--event { min-block-size: min(80vh, 760px); }
/* The words sit on the same line as the masthead and the body below. */
.stage--event .stage__words { inline-size: min(100% - 2.5rem, 1320px); max-inline-size: none; margin-inline: auto; padding-inline: 0; }
/* No still (a day of remembrance): a dark ground with a faint light, no scrim. */
.stage--plain { min-block-size: 56vh; background: radial-gradient(80% 90% at 20% 30%, color-mix(in srgb, var(--paper) 5%, transparent), transparent 70%); }
[dir="rtl"] .stage--plain { background: radial-gradient(80% 90% at 80% 30%, color-mix(in srgb, var(--paper) 5%, transparent), transparent 70%); }
.stage--plain::after { display: none; }
.event__title { font-size: clamp(2.8rem, 6.5vw, 5rem); margin: .8rem 0 .7rem; }
.event__title:lang(fa) { font-size: clamp(2.4rem, 5.6vw, 4.2rem); }
.event__when { margin: 0; max-inline-size: 48rem; font: italic 500 1.28rem/1.5 var(--font-display); color: var(--body); }
.event__when [lang="fa"] { font: 400 1.02rem/1.9 var(--font-text); }
/* The venue wraps as a whole where it can, rather than splitting its name. */
.event__venue { display: inline-block; }
.event__status { margin: 1rem 0 0; }
.event__actions { display: flex; flex-wrap: wrap; align-items: center; gap: .8rem 1.6rem; margin-block-start: 1.4rem; }

/* ------------------------------------------------- calendar and share --- */

.cal { position: relative; }
.cal__menu { position: absolute; inset-block-start: calc(100% + .4rem); inset-inline-start: 0; z-index: 20; min-inline-size: 15rem; max-inline-size: calc(100vw - 2rem); margin: 0; padding: .4rem 0; list-style: none; background: #0D0C12; border: 1px solid var(--line); box-shadow: 0 18px 40px rgb(0 0 0 / .5); }
/* app.js measures the open menu against the viewport (in whichever reading
   direction the page is in) and adds these when it would otherwise run off
   the bottom or the inline-end edge: .cal--up opens upward from the toggle,
   .cal--end anchors to the toggle's inline-end instead of its inline-start.
   max-inline-size above is the hard backstop if even that is not room enough. */
.cal--up .cal__menu { inset-block-start: auto; inset-block-end: calc(100% + .4rem); }
.cal--end .cal__menu { inset-inline-start: auto; inset-inline-end: 0; }
.cal__menu a { display: flex; align-items: center; min-block-size: 44px; padding: 0 1rem; color: var(--paper); text-decoration: none; font-size: .95rem; }
.cal__menu a:hover, .cal__menu a:focus-visible { background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold-lit); }
.share { display: inline-flex; align-items: center; gap: .5rem; min-block-size: 44px; padding: 0 .9rem; border: 1px solid var(--line); border-radius: 999px; background: none; color: var(--gold-lit); cursor: pointer; font: 500 .9rem/1 var(--font-text); }
.share svg { inline-size: 1rem; block-size: 1rem; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.share:hover, .share:focus-visible { border-color: var(--gold); }
.share__status { flex-basis: 100%; margin: 0; min-block-size: 1.2em; font-size: .85rem; color: var(--body); word-break: break-all; }

.event__body { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(18rem, 1fr); gap: clamp(2rem, 5vw, 4.5rem); padding-block: clamp(1.5rem, 3vw, 2.5rem) clamp(2.5rem, 6vw, 4.5rem); align-items: start; }
.event__story > * + * { margin-block-start: clamp(2.5rem, 5vw, 3.5rem); }
.event__story p { max-inline-size: 64ch; }
.event__lede { margin-block-end: 1.2rem; font: italic 500 clamp(1.3rem, 2.2vw, 1.6rem)/1.35 var(--font-display); color: var(--paper); }
.event__lede [lang="fa"] { font: 500 1.15rem/1.9 var(--font-text); }
.event__aka { font-size: .9rem; color: var(--muted); }
/*
 * An aside, as a panel rather than a fade.
 *
 * It used to be a gold rule down the starting edge over a wash that faded to
 * nothing: the edge it began at was clear, and the other three dissolved into
 * the page, so the block had no shape and the text looked as though it had
 * simply been indented. It now has an even tint and a hairline all round, with
 * the starting edge kept heavier and brighter to mark it as an aside — the
 * usual way a callout is drawn, and legible on this ground.
 *
 * border-inline-start follows the reading direction on its own, so the heavy
 * edge is the left in English and the right in Persian with no override.
 */
.note {
  display: block;
  margin: 1.2rem 0 0;
  padding: .95rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--gold) 18%, transparent);
  border-inline-start: 3px solid color-mix(in srgb, var(--gold) 60%, transparent);
  border-radius: 2px;
  background: color-mix(in srgb, var(--gold) 6%, transparent);
  color: var(--body);
  font-size: .95rem;
}

.timeline { list-style: none; margin: 1.2rem 0 0; padding-block: 0; padding-inline: 1.8rem 0; position: relative; }
.timeline::before { content: ""; position: absolute; inset-block: .5rem; inset-inline-start: .3rem; inline-size: 1px; background: linear-gradient(var(--gold), color-mix(in srgb, var(--gold) 10%, transparent)); }
.timeline li { position: relative; padding-block-end: 1.3rem; }
.timeline li:last-child { padding-block-end: 0; }
.timeline li::before { content: ""; position: absolute; inset-inline-start: -1.8rem; inset-block-start: .45rem; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--ink); border: 1px solid var(--gold); box-shadow: 0 0 12px color-mix(in srgb, var(--gold) 55%, transparent); }
.timeline time { display: block; font: 500 1.05rem/1.4 var(--font-label); letter-spacing: .06em; color: var(--gold-lit); font-variant-numeric: lining-nums tabular-nums; }
.timeline time:lang(fa) { font: 500 1rem/1.6 var(--font-text); letter-spacing: 0; }
.timeline__title { display: block; font: 500 1.3rem/1.35 var(--font-display); color: var(--paper); }
.timeline__title [lang="fa"] { font: 500 1.1rem/1.8 var(--font-text); }

.where__card { display: grid; gap: 2rem; align-items: start; margin-block-start: 1rem; }
/* The opening: the story, with the poster standing beside it.
   The poster's track is sized here rather than on the figure: a percentage
   width inside an `auto` track is circular, and the text column collapsed to
   one word per line. */
.event__opening { display: grid; grid-template-columns: minmax(0, 1fr) clamp(170px, 20vw, 250px); gap: clamp(1.5rem, 3vw, 2.5rem); align-items: start; }
.event__opening > div > * + * { margin-block-start: 1rem; }
.event__opening .keepsake { inline-size: 100%; }
.where__venue { font-size: 1.6rem; margin-block-end: .3rem; }
.where__address { color: var(--body); }
.where__links { display: flex; flex-wrap: wrap; gap: .4rem 1.4rem; margin: 0; }
.keepsake { margin: 0; inline-size: min(280px, 36vw); border: 1px solid var(--line); padding: 6px; background: color-mix(in srgb, var(--gold) 4%, transparent); }
.keepsake img { inline-size: 100%; block-size: auto; }

/* The booking card: a double gold hairline and a faint wash at the top. On a
   desktop it stays in view beside the story, but only while all of it fits
   the window: how tall it is depends on the gathering's tiers, and a pinned
   card taller than the window would hide its own button. app.js measures it
   and marks it is-pinned; without script it sits in the page. It never
   scrolls inside itself. */
.ticket { position: relative; border: 1px solid var(--line); padding: 1.7rem; background: linear-gradient(180deg, color-mix(in srgb, var(--gold) 7%, transparent), transparent 60%); }
.ticket::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line-faint); pointer-events: none; }
@media (min-width: 981px) {
  .ticket.is-pinned { position: sticky; inset-block-start: calc(var(--bar-h) + 1.5rem); }
}
.ticket__title { font-size: 1.7rem; margin: .5rem 0 .6rem; }
/* The margin was carried by .ticket__other, the line that gave the date in the
   other calendar. That line has gone — each language keeps one calendar now —
   so the hours would otherwise sit straight on the rule above the first tier. */
.ticket__when { margin: 0 0 1.25rem; font: italic 500 1.18rem/1.45 var(--font-display); color: var(--body); }
.ticket__when [lang="fa"] { font: 400 .98rem/1.9 var(--font-text); }
.ticket__tiers { list-style: none; margin: 0 0 1rem; padding: 0; }
.ticket__tiers li { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; padding-block: .7rem; border-block-start: 1px solid var(--line-faint); }
.ticket__tiers b { font-weight: 400; color: var(--paper); }
.ticket__tiers small { display: block; font-size: .78rem; line-height: 1.5; color: var(--muted); }
.ticket__price { flex: none; font: 500 1.25rem/1.2 var(--font-display); color: var(--paper); }
.ticket__price [lang="fa"] { font: 500 1rem/1.8 var(--font-text); }
.ticket__action { margin: 1.3rem 0 0; }
.ticket__small { font-size: .78rem; line-height: 1.6; color: var(--muted); margin: 1rem 0 0; }
.ticket__small [lang="fa"] { line-height: 1.9; }

.expect { padding-block: 0 clamp(3rem, 6vw, 5rem); }
.expect__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr)); gap: 1.4rem 2rem; margin: 1.2rem 0 0; }
.expect__grid > div { border-block-start: 1px solid var(--line); padding-block-start: .9rem; }
.expect__grid dt { font: 600 0.74rem/1.2 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--gold); margin-block-end: .5rem; }
.expect__grid dt [lang="fa"] { font: 500 .9rem/1.8 var(--font-text); }
.expect__grid dd { margin: 0; color: var(--body); }

@media (max-width: 980px) {
  .event__body { grid-template-columns: 1fr; }
}
@media (max-width: 620px) {
  .where__card { grid-template-columns: 1fr; }
  /* A phone reads the story first, then meets the poster under it. */
  .event__opening { grid-template-columns: 1fr; justify-items: center; }
  .event__opening .keepsake { inline-size: min(260px, 72vw); }
  .keepsake { inline-size: min(220px, 70vw); }
}

/* ------------------------------------------------------------ booking --- */
/* Register, payment and confirmation: a slim band over a dimmed still, with
   the step and the title over it, then the form or the ticket. The still is
   shown at 45% over the ink and the scrim deepens to the ink under the
   words, so they always sit on well over half ink (spec D8). Its hairline
   foot takes the gathering's accent. */

.wrap--booking { inline-size: min(100% - 2.5rem, 1080px); margin-inline: auto; }

.band-hero { position: relative; display: grid; align-items: end; min-block-size: 34vh; isolation: isolate; border-block-end: 1px solid color-mix(in srgb, var(--color-festival) 40%, transparent); }
.band-hero__still { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.band-hero__still img { inline-size: 100%; block-size: 100%; object-fit: cover; opacity: .45; animation: stage-drift 18s var(--ease) both; }
.band-hero::after { content: ""; position: absolute; inset: 0; z-index: -1; background: linear-gradient(to top, var(--ink) 0%, rgb(6 6 10 / .55) 45%, rgb(6 6 10 / .1) 100%); }
/* No still (a day of remembrance): the dark ground with a faint light. */
.band-hero--plain { background: radial-gradient(70% 120% at 20% 20%, color-mix(in srgb, var(--paper) 5%, transparent), transparent 70%); }
[dir="rtl"] .band-hero--plain { background: radial-gradient(70% 120% at 80% 20%, color-mix(in srgb, var(--paper) 5%, transparent), transparent 70%); }
.band-hero--plain::after { display: none; }
.band-hero__words { padding-block: clamp(2.5rem, 6vh, 3.5rem) clamp(1.6rem, 4vh, 2.4rem); }
.band-hero__title { margin: 1rem 0 0; font-size: clamp(2.4rem, 5.4vw, 3.8rem); }
.band-hero__meta { margin: .5rem 0 0; font: italic 500 1.15rem/1.45 var(--font-display); color: var(--body); }
.band-hero__meta [lang="fa"] { font: 400 1rem/1.9 var(--font-text); }

/* The steps: the one you are on in gold, those behind you in the body
   colour, a hairline between. */
.steps { display: flex; flex-wrap: wrap; align-items: center; row-gap: .3rem; margin: 0; padding: 0; list-style: none; }
.steps li { display: flex; align-items: center; font: 600 0.74rem/1.4 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.steps li:lang(fa) { font: 500 .9rem/1.8 var(--font-text); }
/* A flex item, so it sets its own line: tokens.css would give it 1.75. */
.steps li > [lang="fa"] { line-height: 1.8; }
.steps li + li::before { content: ""; inline-size: 1.8rem; block-size: 1px; margin-inline: .9rem; background: var(--line); }
.steps li:has(~ li[aria-current="step"]) { color: var(--body); }
.steps li[aria-current="step"] { color: var(--gold); }
/* A phone keeps the three on one line. */
@media (max-width: 560px) {
  .steps li { font-size: .6rem; letter-spacing: .18em; }
  .steps li + li::before { inline-size: .9rem; margin-inline: .55rem; }
}

.booking__body { padding-block: clamp(1.5rem, 4vw, 2.5rem) clamp(3rem, 7vw, 5rem); }
.booking__body--empty { padding-block-start: clamp(2rem, 5vw, 3rem); }
.booking__back { margin: 0 0 1rem; }
.booking__lede { margin: 0 0 1.6rem; max-inline-size: 46ch; font: italic 500 clamp(1.2rem, 2vw, 1.4rem)/1.45 var(--font-display); color: var(--paper); }
.booking__lede [lang="fa"] { font: 400 1.08rem/1.9 var(--font-text); }
.booking__small { margin: 1rem 0 0; font-size: .82rem; line-height: 1.6; color: var(--muted); }
/* Terms in full English, and the Persian note that says so (fragments.mjs). */
:is(.booking__small, .form__small, .ticket__small) > p { margin: 0; }
:is(.booking__small, .form__small, .ticket__small) > p + p { margin-block-start: .35rem; }
:is(.booking__small, .form__small, .ticket__small) [lang="fa"] { line-height: 1.9; }
.booking__onward { margin: 2rem 0 0; }

/* ---------------------------------------------------------------- form --- */
/* The fields, with a ticket beside them on a desktop that stays in view and
   carries the total and the one button; on a phone it closes the form. */

.form { display: grid; gap: clamp(2.5rem, 5vw, 4.5rem); align-items: start; }
@media (min-width: 981px) {
  .form { grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem); }
  .form__summary { position: sticky; inset-block-start: calc(var(--bar-h) + 1.5rem); }
}
.form__fields { display: grid; gap: 2rem; min-inline-size: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 2rem 1.75rem; align-items: start; }
@media (max-width: 620px) { .grid-2 { grid-template-columns: 1fr; } }

/*
 * Two fields side by side keep their boxes on one line.
 *
 * Each field is its own little grid — label, help, box, error — and each was
 * laid out alone, so the box sat directly under whatever was above it. Where
 * one explanation wrapped to two lines and the other did not, as "Email" and
 * "Mobile" do at most widths, one box sat a line lower than the other and the
 * pair read as two unrelated things.
 *
 * Subgrid hands both fields the parent's rows, so the help row is as tall as
 * the taller of the two explanations and both boxes land on the same line
 * whatever is written above them. Four rows, always, which is why fieldMarkup
 * emits an empty help line rather than leaving it out.
 *
 * Behind @supports because the fallback is the behaviour this replaces: on a
 * browser without subgrid the pair looks exactly as it did before, which is
 * untidy rather than broken.
 */
@supports (grid-template-rows: subgrid) {
  @media (min-width: 621px) {
    .grid-2 > .field {
      grid-row: span 4;
      grid-template-rows: subgrid;
    }
  }
}

.field { display: grid; gap: .3rem; align-content: start; }
.field--number { max-inline-size: 13rem; }
/* Labels and legends are the site's labels: small, tracked, gold. */
.field > label, .form legend, .pay legend { padding: 0; font: 600 0.76rem/1.5 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--gold); font-variant-numeric: lining-nums; }
:is(.field > label, .form legend, .pay legend):lang(fa) { font: 500 .92rem/1.8 var(--font-text); }
/* The asterisk says "you cannot leave this out", so it is not gold like the
   rest of the label: it borrows the same red the error messages use. */
.req { color: var(--color-danger); font-weight: 700; }
.help { margin: 0; font-size: .85rem; line-height: 1.55; color: var(--muted); }
.help:lang(fa) { line-height: 1.8; }

/* Quiet ruled inputs on the ink, in the text face; the rule turns gold under
   the pointer and on focus, and the focus ring is the site's. :where keeps
   these at a class's weight, so the select's and the checkbox's own rules
   below win over them. */
.field :where(input:not([type="checkbox"]), select, textarea) {
  inline-size: 100%; min-block-size: 44px; padding: .35rem .1rem; margin: 0;
  border: 0; border-block-end: 1px solid var(--line); border-radius: 0;
  background: transparent; color: var(--paper); font: 400 1.05rem/1.5 var(--font-text);
  transition: border-color .3s var(--ease);
}
.field :where(input:not([type="checkbox"]), select, textarea):hover { border-block-end-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.field :where(input:not([type="checkbox"]), select, textarea):focus { border-block-end-color: var(--gold); }
/* A focused field is marked on its own underline, not boxed.
   A rectangle drawn around a field that is otherwise a single hairline reads
   as a foreign object on this page. The focus is still unmistakable — the rule
   doubles in weight, lifts to the lit gold and carries a soft glow — which is
   what WCAG asks for (2.4.11: a change of at least 2px with enough contrast),
   and the e2e run measures the change rather than looking for an outline.
   Buttons and links keep the outline: they have no underline to thicken. */
.field :is(input:not([type="checkbox"]), select, textarea):focus-visible {
  outline: none;
  border-block-end-width: 2px;
  border-block-end-color: var(--gold-lit);
  box-shadow: 0 1px 10px -2px color-mix(in srgb, var(--gold) 55%, transparent);
}
/* A checkbox has no underline of its own, so it keeps a ring — on its own
   shape, which is square, so it does not read as a stray rectangle. */
.field input[type="checkbox"]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 3px; }
.field ::placeholder { color: color-mix(in srgb, var(--muted) 70%, transparent); opacity: 1; }
/* A fixed height that scrolls, not a corner to drag: the form keeps its shape. */
.field textarea {
  block-size: 6.5rem; resize: none; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--gold) 45%, transparent) transparent;
}
.field select { appearance: none; padding-inline-end: 2rem; cursor: pointer;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.5l5 5 5-5' fill='none' stroke='%23E4C06A' stroke-width='1.4'/%3E%3C/svg%3E") no-repeat right .25rem center; }
[dir="rtl"] .field select { background-position: left .25rem center; }
.field select option { background: var(--color-surface); color: var(--paper); }

.field[data-invalid="true"] :where(input:not([type="checkbox"]), select, textarea) { border-block-end: 2px solid var(--color-danger); }
.field__error { margin: 0; font-size: .88rem; line-height: 1.5; color: var(--color-danger); }
.field__error:lang(fa) { line-height: 1.8; }
.field__error:empty { display: none; }

/* A checkbox drawn in gold: a hairline box, a gold tick. Its label is the
   44px target beside it. */
.form__consent { display: grid; gap: .25rem; }
.field--check { grid-template-columns: auto 1fr; align-items: start; gap: 1rem; }
.field--check input {
  appearance: none; display: grid; place-content: center; flex: none;
  inline-size: 22px; block-size: 22px; margin: 11px 0 0; border: 1px solid var(--gold); border-radius: 0;
  background: transparent; cursor: pointer;
}
.field--check input::before { content: ""; inline-size: 12px; block-size: 12px; background: var(--gold); transform: scale(0); transition: transform .2s var(--ease);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%); }
.field--check input:checked { background: color-mix(in srgb, var(--gold) 12%, transparent); }
.field--check input:checked::before { transform: scale(1); }
.field--check[data-invalid="true"] input { border-color: var(--color-danger); }
.field--check label { display: block; min-block-size: 44px; padding-block: 10px; font-size: 1rem; line-height: 1.5; color: var(--body); cursor: pointer; }
.field--check label:lang(fa) { line-height: 1.8; }
/* The terms box's link to the terms, beside its label. */
.field__link { font-size: .98rem; }

/* Already registered, above the form (app.js, guardRecorded): its sentence,
   then its two actions side by side with room between them, and room under
   the box before the form begins. */
.note--recorded { display: grid; gap: 1rem; margin-block: 1.2rem 2.25rem; padding: 1.1rem 1.4rem; }
.note--recorded p { margin: 0; }
.note--recorded p:last-child { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem 1.75rem; }

/* Ticket types as ruled rows; the chosen one lit, with a gold rule down its
   leading edge and its name in gold. */
.form fieldset { margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.form legend { margin-block-end: .7rem; }

/* Confirm it's you: the code by email, under the email and mobile
   (booking.mjs verifyBlock, app.js initVerify), one step at a time
   (data-stage). The address it goes to; Send code; then the code box and
   Confirm side by side at one height, 44px, with Send again as a quiet line
   beneath them. */
.verify { gap: .55rem; }
.verify__live { display: grid; gap: .9rem; justify-items: start; }
.verify__live > * { max-inline-size: 100%; }

.verify__row { display: flex; flex-wrap: wrap; align-items: center; gap: .75rem; }
.verify__row--code { align-items: stretch; }
.verify__row .btn { min-block-size: 44px; padding-block: 0; padding-inline: 1.25rem; }
.field .verify__row--code .verify__code {
  flex: 0 0 auto; inline-size: 8.75rem; min-block-size: 44px; padding: 0 .6rem;
  border: 1px solid var(--line); background: color-mix(in srgb, var(--paper) 3%, transparent);
  text-align: center; text-indent: .3em; font-size: 1.15rem; letter-spacing: .3em; font-variant-numeric: tabular-nums lining-nums;
}
.field .verify__row--code .verify__code:hover { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.field .verify__row--code .verify__code:focus,
.field .verify__row--code .verify__code:focus-visible {
  border-width: 1px; border-color: var(--gold-lit);
  box-shadow: 0 0 0 1px var(--gold-lit), 0 0 14px -4px color-mix(in srgb, var(--gold) 70%, transparent);
}
.field[data-invalid="true"] .verify__row--code .verify__code { border: 1px solid var(--color-danger); }
.verify__code::placeholder { letter-spacing: .3em; }

/* Once a code is sent, Send again is a line under the box, not a second
   button beside Confirm: one thing to press at a time. */
.verify__row--send { gap: .2rem .3rem; }
.verify__again { font-size: .9rem; color: var(--muted); }
.verify[data-stage="sent"] .verify__row .verify__send {
  min-block-size: 44px; padding: 0 .15rem; border: 0; background: none; color: var(--gold-lit);
  font: 400 .9rem/1.5 var(--font-text); letter-spacing: 0; text-transform: none; text-indent: 0;
  text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: .22em;
}
.verify[data-stage="sent"] .verify__row .verify__send:hover { background: none; color: var(--gold); }
.verify[data-stage="sent"] .verify__row .verify__send:disabled,
.verify[data-stage="sent"] .verify__row .verify__send:disabled:hover { opacity: 1; color: var(--muted); text-decoration: none; background: none; }
.verify .btn:disabled { opacity: .5; cursor: default; }
.verify .btn:disabled:hover { background: color-mix(in srgb, var(--ink) 40%, transparent); color: var(--gold-lit); }

.verify__done { margin: 0; font-size: 1rem; font-weight: 600; color: var(--gold-lit); overflow-wrap: anywhere; }
.verify__status { margin: 0; font-size: .88rem; line-height: 1.55; color: var(--muted); overflow-wrap: anywhere; }
.verify__status:lang(fa), .verify__status :lang(fa) { line-height: 1.8; }
.verify__status:empty { display: none; }
.verify__status[data-tone="bad"] { color: var(--color-danger); }
.tier-option { display: grid; grid-template-columns: auto 1fr auto; gap: 1.1rem; align-items: center; min-block-size: 44px; padding: 1rem 1.1rem; border-block-start: 1px solid var(--line-faint); border-inline-start: 2px solid transparent; cursor: pointer; transition: background-color .35s var(--ease), border-color .35s var(--ease); }
.tier-option:last-of-type { border-block-end: 1px solid var(--line-faint); }
.tier-option:hover { background: color-mix(in srgb, var(--gold) 4%, transparent); }
.tier-option:has(input:checked) { border-inline-start-color: var(--gold); background: linear-gradient(to right, color-mix(in srgb, var(--gold) 9%, transparent), transparent 80%); }
[dir="rtl"] .tier-option:has(input:checked) { background: linear-gradient(to left, color-mix(in srgb, var(--gold) 9%, transparent), transparent 80%); }
.tier-option input { appearance: none; display: grid; place-content: center; inline-size: 20px; block-size: 20px; margin: 0; border: 1px solid var(--line); border-radius: 50%; background: transparent; cursor: pointer; transition: border-color .3s var(--ease); }
.tier-option input::before { content: ""; inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--gold); transform: scale(0); transition: transform .2s var(--ease); }
.tier-option input:checked { border-color: var(--gold); }
.tier-option input:checked::before { transform: scale(1); }
.tier-option b { display: block; font: 500 1.25rem/1.3 var(--font-display); color: var(--paper); transition: color .35s var(--ease); }
.tier-option b:lang(fa) { font: 500 1.02rem/1.8 var(--font-text); }
.tier-option:has(input:checked) b { color: var(--gold); }
.tier-option small { display: block; margin-block-start: .15rem; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.tier-option__price { font: 500 1.35rem/1.2 var(--font-display); color: var(--paper); }

/* A count per option, on a gathering that offers several (booking.mjs:
   ticketLines). The same ruled rows as the single choice — the name, the
   price — with a minus and a plus either side of the count, and an option
   with seats on it lit the way a chosen one is. On a narrow screen the count
   goes under the name, beside the price, rather than squeezing the name to a
   word a line. Logical properties throughout, so the Persian page mirrors. */
.tier-line {
  display: grid; grid-template-columns: minmax(0, 1fr) auto auto;
  grid-template-areas: "name price step" "err err err";
  gap: 0 1.1rem; align-items: center; padding: .7rem 1.1rem;
  border-block-start: 1px solid var(--line-faint); border-inline-start: 2px solid transparent;
  transition: background-color .35s var(--ease), border-color .35s var(--ease);
}
.tier-line:last-of-type { border-block-end: 1px solid var(--line-faint); }
.tier-line[data-taken] { border-inline-start-color: var(--gold); background: linear-gradient(to right, color-mix(in srgb, var(--gold) 9%, transparent), transparent 80%); }
[dir="rtl"] .tier-line[data-taken] { background: linear-gradient(to left, color-mix(in srgb, var(--gold) 9%, transparent), transparent 80%); }
.tier-line__name { grid-area: name; min-inline-size: 0; }
.tier-line__name b { display: block; font: 500 1.25rem/1.3 var(--font-display); color: var(--paper); transition: color .35s var(--ease); }
.tier-line__name b:lang(fa) { font: 500 1.02rem/1.8 var(--font-text); }
.tier-line[data-taken] .tier-line__name b { color: var(--gold); }
.tier-line__name small { display: block; margin-block-start: .15rem; font-size: .82rem; line-height: 1.5; color: var(--muted); }
.tier-line__price { grid-area: price; font: 600 1.15rem/1.2 var(--font-text); color: var(--paper); white-space: nowrap; }
.tier-line__price small { font-size: .78rem; font-weight: 400; color: var(--muted); }
.tier-line .field__error { grid-area: err; margin-block-start: .35rem; }

/* A ticket whose last day has passed (fragments.mjs: untilLine; app.js:
   endTicket). Still listed, so a guest who heard about the early bird learns
   it has ended rather than wondering where it went: the name and price drawn
   faint, the price struck through, the controls out of reach, and the line
   saying when it ended kept in the muted ink every note is written in. */
:is(.ticket__tiers li, .tier-option, .tier-line)[data-ended] :is(b, .ticket__price, .tier-option__price, .tier-line__price) { color: var(--muted); }
:is(.ticket__tiers li, .tier-option, .tier-line)[data-ended] :is(.ticket__price, .tier-option__price, .tier-line__price) { text-decoration: line-through; text-decoration-thickness: 1px; }
.tier-option[data-ended] { cursor: not-allowed; }
.tier-option[data-ended]:hover { background: none; }
.tier-option[data-ended] input, .tier-line[data-ended] .stepper { opacity: .45; cursor: not-allowed; }
.until { display: block; }

/* One slim pill, − count +, rather than two large circles either side of a
   ruled figure: three objects per row, down five rows, read as heavier than
   the names and prices they serve. The pill is drawn at 34px, inside a
   44px touch target per button (the fingertip the e2e check holds every
   control to), so it looks light and is no harder to press. A button at a
   limit is aria-disabled, not disabled, so it keeps the focus and says why
   when pressed; it is drawn faint. A row with seats on it lights its pill. */
.stepper {
  grid-area: step; position: relative; display: inline-flex; align-items: center;
  block-size: 44px; isolation: isolate;
}
.stepper::before {
  content: ""; position: absolute; z-index: -1; inset-block: 5px; inset-inline: 6px;
  border: 1px solid var(--line); border-radius: 999px;
  background: color-mix(in srgb, var(--paper) 3%, transparent);
  transition: border-color .3s var(--ease), background-color .3s var(--ease);
}
.tier-line[data-taken] .stepper::before { border-color: color-mix(in srgb, var(--gold) 55%, transparent); }
.tier-line[data-invalid="true"] .stepper::before { border-color: var(--color-danger); }
.stepper__btn {
  display: grid; place-items: center; inline-size: 44px; block-size: 44px; padding: 0; margin: 0;
  border: 0; border-radius: 50%; background: transparent;
  color: var(--muted); font: 400 1.05rem/1 var(--font-text); cursor: pointer;
  transition: color .25s var(--ease);
}
.stepper__btn span { display: grid; place-items: center; inline-size: 24px; block-size: 24px; border-radius: 50%; transition: background-color .25s var(--ease); }
/* Hover only where there is a pointer to hover with: on a phone the last
   button tapped kept its tint, as though it were still being pressed. */
@media (hover: hover) {
  .stepper__btn:hover { color: var(--gold); }
  .stepper__btn:hover span { background: color-mix(in srgb, var(--gold) 14%, transparent); }
}
.stepper__btn:active span { background: color-mix(in srgb, var(--gold) 20%, transparent); }
.stepper__btn:focus-visible { outline: none; }
.stepper__btn:focus-visible span { outline: 2px solid var(--color-focus); outline-offset: 2px; color: var(--paper); }
.stepper__btn[aria-disabled="true"] { opacity: .35; cursor: default; }
.stepper__btn[aria-disabled="true"]:hover { color: var(--muted); }
.stepper__btn[aria-disabled="true"]:hover span { background: transparent; }
.stepper input {
  inline-size: 2.4ch; min-inline-size: 28px; min-block-size: 34px; padding: 0; margin: 0 -.4rem;
  border: 0; border-radius: 0; background: transparent;
  color: var(--paper); font: 500 1.05rem/1 var(--font-text); text-align: center;
  font-variant-numeric: tabular-nums;
}
.stepper input:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; border-radius: 4px; }
@media (max-width: 30rem) {
  .tier-line { grid-template-columns: minmax(0, 1fr) auto; grid-template-areas: "name name" "price step" "err err"; padding-inline: .8rem; }
  .tier-line__price { padding-block-start: .3rem; }
  .stepper { padding-block-start: .3rem; }
}

/* The seats in all: a figure the counts add up to, read rather than typed. */
.field--total input[readonly], .field--total input[readonly]:hover {
  padding-inline: 0; border-block-end-color: transparent; cursor: default;
  font: 500 1.5rem/1.3 var(--font-text); color: var(--paper);
}
/* And under the total, the lines that make it. */
.form__lines { margin: .45rem 0 0; padding: 0; list-style: none; font-size: .88rem; line-height: 1.6; color: var(--muted); }
.form__lines li:lang(fa) { line-height: 1.8; }

.form__small { margin: 0; font-size: .82rem; line-height: 1.6; color: var(--muted); max-inline-size: 64ch; }

/* The ticket beside the form: the gathering, the total, and the button. */
.form__summary .ticket__when { margin-block-end: 1.2rem; }
.form__total { padding-block-start: 1rem; border-block-start: 1px solid var(--line-faint); }
.total-price { margin: .3rem 0 .2rem; font: 500 2.2rem/1.1 var(--font-display); color: var(--paper); }

/* The error summary stays unmistakable: a red frame and red words. */
/* A form that has gone wrong should be clear, not alarming. The box used to
   be a saturated pink rectangle of large underlined links, which read louder
   than the form it was describing. It is now a quiet panel with a red edge:
   the colour marks it, the text stays the size of the rest of the form, and
   the links underline only when pointed at or focused. */
.error-summary { padding: 1rem 1.15rem; border: 1px solid color-mix(in srgb, var(--color-danger) 45%, transparent); border-inline-start: 3px solid var(--color-danger); border-radius: 2px; background: color-mix(in srgb, var(--color-danger) 6%, transparent); }
.error-summary h2 { margin: 0 0 .35rem; font: 600 .74rem/1.5 var(--font-label); letter-spacing: .1em; text-transform: uppercase; color: var(--color-danger); }
.error-summary h2:lang(fa) { font: 500 .92rem/1.8 var(--font-text); letter-spacing: 0; }
.error-summary ul { margin: 0; padding-inline-start: 1rem; color: var(--body); }
.error-summary li { margin-block-start: .1rem; }
.error-summary li::marker { color: color-mix(in srgb, var(--color-danger) 70%, transparent); }
.error-summary a { display: inline-block; padding-block: .3rem; font-size: .93rem; line-height: 1.5; color: var(--body); text-decoration: none; }
.error-summary a:hover, .error-summary a:focus-visible { color: var(--color-danger); text-decoration: underline; text-underline-offset: .2em; }
.error-summary a:lang(fa) { line-height: 1.8; }

/* ------------------------------------------------------------- summary --- */
/* The booking's details as ruled rows: a tracked key, its value. */

.summary { display: grid; margin-block-start: 1rem; }
.summary__row { display: flex; justify-content: space-between; align-items: baseline; gap: 1.25rem; padding-block: .75rem; border-block-start: 1px solid var(--line-faint); color: var(--paper); font-size: 1rem; }
.summary__row > :first-child { flex: none; font: 600 0.74rem/1.5 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--muted); }
.summary__row > :first-child:lang(fa) { font: 500 .9rem/1.8 var(--font-text); }
.summary__row > :last-child { min-inline-size: 0; text-align: end; overflow-wrap: anywhere; }
.summary__row strong { font-weight: 400; }
.summary__total { align-items: center; border-block-start-color: var(--line); padding-block-start: 1rem; }
.summary__total > :last-child { font: 500 2.2rem/1.1 var(--font-display); }

/* ------------------------------------------------------------- payment --- */

/* Never mistaken for a real payment: a gold hairline box, doubled like the
   ticket's, in plain words above it. */
.demo-banner { position: relative; margin: 0 0 1.6rem; padding: 1rem 1.4rem; border: 1px solid var(--gold); background: color-mix(in srgb, var(--gold) 9%, transparent); color: var(--paper); text-align: center; font: 400 1rem/1.55 var(--font-text); }
.demo-banner::before { content: ""; position: absolute; inset: 4px; border: 1px solid var(--line-faint); pointer-events: none; }
.demo-banner:lang(fa) { line-height: 1.9; }
/* The seats held while the guest pays, counted down (app.js, initCheckout):
   the words on one side, the minutes and seconds on the other in figures of
   one width, so the clock does not shuffle as it ticks; red for the last two
   minutes. Time's up puts the payment away and offers to start again. */
.pay__hold {
  display: grid; gap: .35rem; margin: 0 0 1.75rem; padding: 1rem 1.25rem;
  border: 1px solid color-mix(in srgb, var(--gold) 35%, transparent);
  background: color-mix(in srgb, var(--gold) 7%, transparent);
}
.pay__hold p { margin: 0; }
.pay__hold-row { display: flex; align-items: center; justify-content: space-between; gap: .5rem 1.25rem; flex-wrap: wrap; }
.pay__hold-said { color: var(--paper); font-size: 1rem; line-height: 1.4; }
.pay__clock { font: 600 1.6rem/1 var(--font-text); letter-spacing: .02em; color: var(--gold-lit); font-variant-numeric: tabular-nums lining-nums; }
.pay__hold-help { color: var(--muted); font-size: .88rem; line-height: 1.55; }
.pay__hold-help:lang(fa), .pay__hold-help :lang(fa) { line-height: 1.8; }
.pay__hold[data-urgent="true"] { border-color: color-mix(in srgb, var(--color-danger) 55%, transparent); background: color-mix(in srgb, var(--color-danger) 8%, transparent); }
.pay__hold[data-urgent="true"] .pay__clock { color: var(--color-danger); }
.pay__hold--over { gap: .6rem; border-color: color-mix(in srgb, var(--color-danger) 55%, transparent); background: color-mix(in srgb, var(--color-danger) 8%, transparent); }
.pay__hold--over .pay__hold-said { font-weight: 600; }
.pay__hold--over .btn { margin-block-start: .35rem; }
.pay__form .field__error { margin-block: 1rem 0; }
.pay__form { margin-block-start: 1.5rem; }
.pay__form fieldset { margin: 0; padding: 1.4rem 0 0; border: 0; border-block-start: 1px solid var(--line-faint); min-inline-size: 0; }
.pay legend { float: inline-start; inline-size: 100%; margin-block-end: .4rem; }
.pay .help { clear: both; margin-block-end: .6rem; }

/* ------------------------------------------------------------- success --- */
/* The reference on an invitation: the ticket's frame, centred, a gold seal,
   the reference set large and tracked. */

.ticket--invite { container-type: inline-size; margin-block-start: .5rem; padding: clamp(1.25rem, 5vw, 2.8rem); text-align: center; }
.ticket__seal { inline-size: 52px; block-size: 52px; margin: 0 auto 1.2rem; color: var(--gold); }
/* The reference stays on one line, "DAE-MEH-686536", at any width: its size
   follows the card's (a container unit), up to 2rem; the vw size is for a
   browser without container units. */
/*
 * The payment page's reference keeps the same face as the confirmation's.
 *
 * The Persian rule below pins everything inside a Persian page to Vazirmatn
 * and exempts .ticket__ref by name. .pay__ref was given the same lang="en" on
 * its isolate and it changed nothing, because the paragraph is still pinned
 * and the child inherits it — so the same booking reference was drawn in two
 * different faces on two consecutive screens.
 */
.pay__ref, .pay__ref bdi[lang="en"] { font-family: var(--font-mono); }

/* The check-in QR under the reference: near-black squares on the site's soft
   gold — dark on light, as a code must be to be read by every telephone at
   the door (qr.mjs) — and black on white when printed. */
.ticket__qr { display: grid; justify-items: center; gap: .6rem; margin: 0 0 1.6rem; }
.ticket__qr-code { inline-size: min(100%, 12.5rem); aspect-ratio: 1; background: #E4C06A; }
.ticket__qr-code svg { display: block; inline-size: 100%; block-size: 100%; }
.ticket__qr-code .qr-ground { fill: #E4C06A; }
.ticket__qr-code .qr-ink { fill: #06060A; }
@media print {
  .ticket__qr-code, .ticket__qr-code .qr-ground { background: #fff; fill: #fff; }
  .ticket__qr-code .qr-ink { fill: #000; }
}
.ticket__qr figcaption { max-inline-size: 22rem; text-align: center; font-size: .88rem; line-height: 1.55; color: var(--muted); }
.ticket__ref { margin: .5rem 0 1.4rem; font: 600 2rem/1.2 var(--font-display); font-size: clamp(1.2rem, 6.2vw, 2rem); font-size: clamp(1.1rem, 8.6cqi, 2rem); letter-spacing: .12em; white-space: nowrap; color: var(--gold-lit); font-variant-numeric: lining-nums; }
.ticket--invite .summary { text-align: start; }
.ticket__cal { justify-content: center; margin: 1rem 0 0; }
.ticket--invite + .note { margin-block-start: 2rem; }

/* ------------------------------------------------------------ policies --- */
/* The terms, set as a page of type: one ruled section each. */

.policies { padding-block: clamp(3rem, 7vw, 5.5rem); }
.policies__title { font-size: clamp(2.6rem, 6vw, 4.2rem); }
.policy { margin-block-start: clamp(2.2rem, 5vw, 3.2rem); padding-block-start: 1.5rem; border-block-start: 1px solid var(--line-faint); }
/* The first sits under the title's gold rule, which does its ruling. */
.policy:first-of-type { margin-block-start: 1.5rem; padding-block-start: 0; border-block-start: 0; }
.policy__title { margin-block-end: .8rem; font-size: clamp(1.6rem, 3vw, 2.1rem); }
.policy p { margin: 0; max-inline-size: 62ch; font-size: 1.08rem; color: var(--body); }
.policy p:lang(fa) { line-height: 1.9; }

@media (prefers-reduced-motion: reduce) {
  .band-hero__still img { animation: none; }
}

/* ------------------------------------------------------------- footer --- */

.foot { position: relative; margin-block-start: 0; padding-block: 3.5rem 3rem; border-block-start: 1px solid var(--line-faint); background: var(--ink); font-size: .92rem; color: var(--muted); }
.foot__motto { margin: 0 0 2.6rem; text-align: center; font: italic 500 1.3rem/1.5 var(--font-display); letter-spacing: .02em; color: var(--gold); }
.foot__motto:lang(fa) { font: 500 1.35rem/1.9 'Vazirmatn', sans-serif; font-style: normal; }
.foot__credit { margin-block-start: var(--space-6); font-size: .8rem; color: var(--muted); }
.foot__legal { margin-block-start: var(--space-6); font-size: var(--text-xs); }

/*
 * The About section's backdrop and crest, on the home page (the "foundation"
 * section of tools/pages/intro.mjs). They live here, not in intro.css, so the
 * film's own sources stay as they are (tools/check-ownership.mjs); both are
 * decoration on the section that is already there, and add no markup.
 *
 * The backdrop is a royal library at night (shared/media/scenes), lit at its
 * two edges and black in the middle, where the words are. It is sized by the
 * section's width, so its columns frame the crest, the title and the mission,
 * and it has faded to the ink before the six pillars. The crest is the
 * Foundation's own emblem (tools/build-emblem.mjs), its calligraphy turned
 * gold to read on the ink. The heading beneath it names the Foundation, so it
 * is not read out. A browser without image-set() keeps the JPEG and the PNG.
 */
.foundation::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background:
    linear-gradient(180deg, var(--ink) 0, transparent 7%, transparent calc(43vw - 14rem), var(--ink) 43vw),
    radial-gradient(ellipse 34% 30% at 50% 22%, color-mix(in srgb, var(--ink) 60%, transparent), transparent 70%),
    url("../scenes/about-library.jpg") center top / 100% auto no-repeat;
  background:
    linear-gradient(180deg, var(--ink) 0, transparent 7%, transparent calc(43vw - 14rem), var(--ink) 43vw),
    radial-gradient(ellipse 34% 30% at 50% 22%, color-mix(in srgb, var(--ink) 60%, transparent), transparent 70%),
    image-set(url("../scenes/about-library.webp") type("image/webp"), url("../scenes/about-library.jpg") type("image/jpeg")) center top / 100% auto no-repeat;
}
.foundation__lead::before {
  content: ""; display: block; inline-size: clamp(150px, 16vw, 220px); aspect-ratio: 480 / 417; margin: 0 auto 1.6rem;
  background: url("../emblem/daena-emblem.png") center / contain no-repeat;
  background: image-set(url("../emblem/daena-emblem.webp") type("image/webp"), url("../emblem/daena-emblem.png") type("image/png")) center / contain no-repeat;
  filter: drop-shadow(0 0 22px color-mix(in srgb, var(--gold) 28%, transparent));
}
@media (max-width: 700px) {
  /* A band across the top: the two columns either side of the crest. */
  .foundation::before {
    background: linear-gradient(180deg, transparent 0, transparent 30vw, var(--ink) 46vw), url("../scenes/about-library-1000.jpg") center top / 100% auto no-repeat;
    background: linear-gradient(180deg, transparent 0, transparent 30vw, var(--ink) 46vw), image-set(url("../scenes/about-library-1000.webp") type("image/webp"), url("../scenes/about-library-1000.jpg") type("image/jpeg")) center top / 100% auto no-repeat;
  }
  .foundation__lead::before { inline-size: 140px; }
}

/*
 * The footer's scene: the Derafsh Kaviani over an ancient Iranian plain at
 * night (footScene() in tools/lib/layout.mjs). The picture is lit on its left,
 * where the banner flies, and dark on its right.
 *
 * Below 1280px it is a band above the footer's words, the whole picture on a
 * tablet and cropped to the banner on a phone, so no word ever sits on the
 * banner. From 1280px it lies behind the whole footer and the words move to
 * its dark right. There it is sized by the width of the screen, never the
 * height of the footer: stretched to a tall footer, the banner grew under the
 * first column. The picture does not turn with the page in Persian, so neither
 * do the words: this block says left, not start, on purpose.
 */
.foot { isolation: isolate; overflow: hidden; }
.foot__scene { position: relative; z-index: -1; display: block; margin-block: -3.5rem 1.5rem; pointer-events: none; }
.foot__scene img { display: block; inline-size: 100%; block-size: auto; }
.foot__scene::after { content: ""; position: absolute; inset: 0; background: linear-gradient(180deg, transparent 55%, var(--ink) 100%); }
@media (max-width: 700px) {
  .foot__scene img { block-size: 62vw; object-fit: cover; object-position: left center; }
}
@media (min-width: 1280px) {
  /* No wider than its 2000px file, its right side fading into the ink, so an
     ultrawide screen shows the banner at its true size and no hard edge. */
  .foot__scene { position: absolute; inset: 0 auto auto 0; inline-size: min(100%, 2000px); margin: 0;
    -webkit-mask-image: linear-gradient(90deg, #000 72%, transparent); mask-image: linear-gradient(90deg, #000 72%, transparent); }
  .foot__scene::after {
    background:
      linear-gradient(180deg, color-mix(in srgb, var(--ink) 55%, transparent) 0%, transparent 18%, transparent 80%, var(--ink) 100%),
      linear-gradient(90deg, transparent 0%, transparent 31%, color-mix(in srgb, var(--ink) 50%, transparent) 40%, color-mix(in srgb, var(--ink) 62%, transparent) 100%);
  }
  /* A screen so wide that the picture is taller than the footer: it fades out
     at the foot of the page rather than being cut off there. */
  .foot::after { content: ""; position: absolute; inset: auto 0 0; z-index: -1; block-size: 6rem; background: linear-gradient(180deg, transparent, var(--ink)); pointer-events: none; }
  /* The words start just past the banner, wherever the banner ends: it fills
     the left 34% of the picture, and the picture is as wide as the screen up
     to 2000px, while .wrap is centred and at most 1320px. A share of .wrap
     alone crushed the four columns into a sliver on a wide screen. Every %
     here is of the footer's width. */
  .foot__scene + .foot__body { padding-left: max(0px, calc(min(100%, 2000px) * 0.34 + 2.5rem - (100% - min(100% - 2.5rem, 1320px)) / 2)); }
  .foot__scene + .foot__body .foot__cols { grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 2rem; }
}
.foot h2 { font: 600 0.74rem/1 var(--font-label); letter-spacing: .11em; text-transform: uppercase; color: var(--gold); margin-block-end: 1rem; }
.foot h2:lang(fa) { font: 600 .92rem/1.6 var(--font-text); }
.foot__cols { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 220px), 1fr)); gap: 2.5rem; }
.foot ul { list-style: none; padding: 0; }
.foot li + li { margin-block-start: 0.5rem; }
/* Each link is a 44px target, its text centred in it. A link's row
   carries its own air, so the gap beside it gives way. */
.foot__cols a { display: inline-flex; align-items: center; min-block-size: 44px; }
.foot__cols li:has(> a) + li, .foot__cols li + li:has(> a) { margin-block-start: 0; }
.foot__social a { gap: 0.6rem; text-decoration: none; }
.foot__social a:hover { color: var(--color-accent); }
.foot__social svg {
  inline-size: 1.15rem; block-size: 1.15rem;
  fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linejoin: round; stroke-linecap: round;
}
.foot__social svg .fill { fill: currentColor; stroke: none; }

/* -------------------------------------------------- language switching --- */

/*
 * The hidden half asks for no typeface of its own.
 *
 * Every page carries both languages and shows one. The half that is not shown
 * is display:none — and Chrome still resolved a font for it and fetched the
 * file: an English page pulled down the Latin cut of Vazirmatn, 33.6 KB, to
 * set paragraphs no one could see. (Proven by taking the hidden paragraphs
 * out of a page: the request goes with them.) Inheriting means the hidden
 * half asks for whatever its parent already has, which is always a face the
 * page has fetched anyway. The moment a reader switches language these rules
 * swap over and the half now on screen takes its proper face.
 */
[data-lang="en"] [lang="fa"].alt { display: none; font-family: inherit; }
[data-lang="fa"] [lang="en"].alt { display: none; font-family: inherit; }

/* ---------------------------------------------------------- persian type --- */

/* Persian is a joined script: letter-spacing severs the joins between its
   letters. Tracking is a Latin device, so any run in Persian drops it —
   whether it carries lang="fa" itself or inherits it from the page. It has to
   beat every component rule that tracks an English label, hence !important,
   as with [hidden] above. English runs inside a Persian page keep their
   tracking by carrying lang="en". */
:lang(fa) { letter-spacing: 0 !important; }

/* An English run isolated inside a Persian line (a venue, a Gregorian date)
   is set in the English text face: tokens.css gives the Persian element
   Vazirmatn, whose Latin is the face Spectral replaces. Zero specificity, so
   a component's own face still wins. */
:where([lang="fa"]) > :where(bdi[lang="en"]) { font-family: var(--font-text); }

/* -------------------------------------------------------------- sticky --- */
/* z-index 70: above the film grain and vignette (body::before/::after, 59–60)
   and every one of the intro's own fixed layers (masthead 40, progress 45,
   rail 5), so the bar is never darkened or hidden under them.

   Off screen, the bar is also visibility:hidden, not just translated away:
   app.js pairs this with `inert`, but a transform alone still leaves the
   bar in the keyboard's Tab order and a screen reader's map with nothing
   to show for it. The visibility change is delayed until the slide-out
   finishes, so sliding away is still seen; showing it drops the delay, so
   it is interactive the instant it starts sliding in. */

.sticky-cta { display: none; }
@media (max-width: 700px) {
  .sticky-cta {
    position: fixed; z-index: 70; inset-inline: 10px; inset-block-end: calc(10px + env(safe-area-inset-bottom));
    display: flex; align-items: center; justify-content: space-between; gap: .8rem; max-block-size: 64px;
    padding-block: .45rem; padding-inline: 1rem .5rem; border: 1px solid var(--line); border-radius: 10px;
    background: color-mix(in srgb, #0C0B10 84%, transparent); backdrop-filter: blur(10px);
    transform: translateY(140%); visibility: hidden; pointer-events: none;
    transition: transform .45s var(--ease), visibility 0s linear .45s;
  }
  .sticky-cta.is-shown {
    transform: none; visibility: visible; pointer-events: auto;
    transition: transform .45s var(--ease), visibility 0s;
  }
  .sticky-cta__text { margin: 0; min-inline-size: 0; }
  .sticky-cta__name { display: block; font: 500 1rem/1.2 var(--font-display); color: var(--paper); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
  .sticky-cta__name:lang(fa) { font: 500 .95rem/1.5 var(--font-text); }
  .sticky-cta small { display: block; font-size: .72rem; color: var(--muted); }
  .sticky-cta__btn { flex: none; padding-inline: 1.1rem; }
}
/* Keyboard focus and in-page jumps keep clear of the bar at the foot, as
   they do of the masthead at the top: its most (64px), its 10px lift, the
   safe area and 10px to spare. Only on a page that has the bar, and set
   whether or not it is shown yet, since a scroll can bring it up. */
@media (max-width: 700px) {
  html:has(.sticky-cta) { scroll-padding-block-end: calc(64px + 20px + env(safe-area-inset-bottom)); }
}
/* .sticky-cta.is-shown carries its own transition (to drop the visibility
   delay), so it needs naming here too: a plain .sticky-cta of lower
   specificity would lose to it and keep transitioning once shown. */
@media (max-width: 700px) and (prefers-reduced-motion: reduce) { .sticky-cta, .sticky-cta.is-shown { transition: none; } }

/* A booking that is already confirmed: shown in place of the payment form. */
.pay__done { display: grid; gap: var(--space-4); justify-items: start; }
.pay__done p { margin: 0; }
.pay__ref { font-family: var(--font-mono); letter-spacing: 0.08em; color: var(--color-accent); }

/* ------------------------------------------------------------- figures ---
   Cormorant's default figures are old-style: 1 sits low, 2 and 0 are x-height,
   3 and 7 descend. In a date or a time that reads as a wobble — "Saturday, 11
   July 2026 · 11:00 am" came out with digits at three different heights. Every
   line that carries a number asks for full-height, evenly spaced figures.

   This sits at the end of the stylesheet on purpose. The `font:` shorthand
   resets font-variant-numeric to normal, so a rule placed before the one that
   sets `font:` is silently undone — which is exactly what happened the first
   time this was written. */
:is(.event__when, .ticket__when, .panel__meta, .panel__price, .seats, .summary__row,
    .label, time, .ticket__ref, .pay__total, .timeline time, .season-rail a,
    .expect__grid dd, .where__address, [data-total], [data-unit-price], [data-fill]) {
  font-variant-numeric: lining-nums tabular-nums;
}

/* -------------------------------------------------------- Persian face ---
   Persian always leads with its own typeface.

   Most rules name a stack that starts with a Latin serif — 'Spectral' or
   'Cormorant Garamond' — which is right for an English line and wrong for a
   Persian one: the browser would fall back glyph by glyph, so the letters
   came from one face while the Persian digits came from whichever other face
   happened to carry them. «۱۱ جایگاه از ۱۴۰» was set in two faces at once.
   Naming the Persian stack first settles it, and it is why those Latin stacks
   carry no Persian face of their own: this rule reaches every Persian word
   before they do.

   Last in the file, after the `font` shorthands that would otherwise win.

   A booking reference is the exception: it is a Latin code and keeps the
   display face.

   Scoped to the Persian page. On an English one every Persian word is hidden
   but the language toggle, which app.js marks lang="fa" so the label reads as
   what it is — and that one word, pinned here, cost 45 KB of Arabic face on
   every page of the site. The toggle is set where it is styled instead. */
[data-lang="fa"] :is([lang="fa"], [lang="fa"] *):not([lang="en"]):not(.ticket__ref) {
  font-family: 'Vazirmatn', 'IRLotus', Tahoma, sans-serif;
}

/* A Persian line carries a little more size than its English twin: Vazirmatn
   sits smaller on the same em, and these lines are mostly numbers. */
.event__when [lang="fa"] { font-size: 1.12rem; }
.ticket__when [lang="fa"] { font-size: 1.06rem; }
.seats [lang="fa"] { font-size: .95rem; font-weight: 400; }

/* ----------------------------------------------- data lines and prices ---
   Cormorant is a display face. It is beautiful at a heading's size and wrong
   for a price, a date, a time or an address: the strokes are thin and the
   figures small beside the capitals, so "$50" and "Saturday, 30 January 2027"
   read faint and uncertain — exactly the lines a guest must not misread.

   These move to Spectral, the text face, upright. Spectral ships no italic,
   so an italic here would be a slanted fake. Cormorant keeps every heading,
   title and name. Last in the file, after the `font` shorthands. */
:is(.event__when, .ticket__when, .panel__meta, .band-hero__meta, .where__address,
    .ticket__price, .panel__price, .tier-option__price, .total-price,
    .summary__total, .pay__total, [data-total], [data-unit-price]) {
  font-family: var(--font-text);
  font-style: normal;
}
/* A price is the one number on the page that is a decision. No tracking: a
   price is written inside a <bdi>, which would inherit it, and a tracked <bdi>
   then loses that tracking in Persian mode, where nothing is tracked. */
:is(.ticket__price, .panel__price, .tier-option__price, .total-price, [data-total]) {
  font-weight: 600;
}

/* The month rail's Persian labels are short words — «مهر», «تیر» — and came
   out 16px wide against the 24px minimum a target needs (WCAG 2.5.8). */
.season-rail a { min-inline-size: 2.5rem; justify-content: center; }

/* A link offered beside a consent box is secondary to the box's own words,
   and is set smaller to say so. Both languages: the size is on the link, not
   on one script's rule. */
/* .link is an inline-flex box 44px tall with its rule drawn along the bottom,
   which left the underline floating well below the words. Beside a consent box
   this is an ordinary text link: underlined where a link is underlined, close
   to the text, and padded just enough to stay a 24px target. */
.field__link {
  display: inline-block; min-block-size: 0; margin-block-start: .3rem; padding-block: .2rem;
  font: 400 .85rem/1.5 var(--font-text); color: var(--gold-lit);
  box-shadow: none;
  text-decoration: underline;
  text-decoration-color: color-mix(in srgb, var(--gold) 50%, transparent);
  text-underline-offset: .18em;
}
.field__link:hover, .field__link:focus-visible { text-decoration-color: var(--gold-lit); }
.field--check .field__error { margin-block-start: .3rem; }

/* The ceiling, said once and quietly, under the field it belongs to. */
.help--ceiling { margin-block-start: .15rem; font-size: .78rem; color: var(--muted); }

/* ------------------------------------------------- the form's measure ---
   A name is a short thing to type, and a field that runs the full width of a
   1440px screen invites a line nobody writes. The paired fields are already
   two-up (.grid-2); these are the ones that stand alone — the guest rows, the
   number of guests, the notes — so they are given the same measure instead of
   the whole column. */
.form__fields > .field > :is(input:not([type="checkbox"]), select, textarea) {
  max-inline-size: 34rem;
}

/* Persian sets a touch smaller here: Vazirmatn runs larger on the same em. */
.field__link:lang(fa) { font-size: .78rem; }

/* ------------------------------------------------------- the masthead ---
   The wordmark and the navigation take the masthead's own face. Persian keeps
   Vazirmatn, which the stack names next. */
/* The masthead's own face, in capitals. Small capitals were tried here — a
   full-height initial with the rest cut down — and the client preferred the
   plain setting. */
.wordmark__name:lang(en), .nav a:lang(en) {
  font-family: var(--font-nav);
  font-weight: 600;
  letter-spacing: .1em;
}
.nav a:lang(en) { font-size: .92rem; }
.wordmark__name:lang(en) { font-size: 1rem; letter-spacing: .13em; }

/* A menu item under the pointer says so with a rule drawn under it, not only
   with a change of colour: colour alone is easy to miss on a dark ground, and
   is no help to a reader who cannot separate gold from parchment. The rule
   grows from the centre, and the page you are on keeps it. */
.nav a { position: relative; }
.nav a::after {
  content: "";
  position: absolute;
  inset-inline: 0;
  inset-block-end: .6rem;
  block-size: 1px;
  background: var(--gold);
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .3s var(--ease);
}
.nav a:is(:hover, :focus-visible)::after,
/*
 * "false" is a value, and [aria-current] matches it.
 *
 * Every page of the public site marks exactly one link, so this read
 * correctly there — and the desk marks all of them, true on the screen being
 * shown and false on the others, which lit the whole menu gold and underlined
 * at once. The desk no longer writes "false" at all (the attribute is
 * removed, which is what it means), and this says so as well, because a
 * stylesheet should not depend on nobody ever writing the word.
 */
.nav a[aria-current]:not([aria-current="false"])::after { transform: scaleX(1); }
.nav a[aria-current]:not([aria-current="false"]) { color: var(--gold); }
@media (prefers-reduced-motion: reduce) {
  .nav a::after { transition: none; }
}

/* --------------------------------------------------- the sound button ---
   The soundtrack's control, on the pages outside the film.

   Its twin on the film is styled in intro.css, which only that page loads —
   so when the button was given to every other page it arrived with no styling
   at all and the icon drew itself the full height of the masthead. These are
   the same 44px rules, in the stylesheet every page does load. */
.sound {
  display: inline-grid;
  place-items: center;
  inline-size: 44px;
  block-size: 44px;
  flex: none;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 50%;
  background: color-mix(in srgb, var(--ink) 50%, transparent);
  color: var(--gold-lit);
  cursor: pointer;
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.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(--gold); }
.sound[aria-pressed="true"] { background: var(--gold); color: var(--ink); border-color: var(--gold); }
/* ------------------------------------------------------ the Donate button ---
   The way to give, in the bar's own controls on every page: a small pill
   outlined in gold, the same height as the language switch beside it, so it
   reads as one of the bar's controls rather than as the page's call to
   action. Filled in gold under the pointer, and on the donation page itself. */
.donate-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex: none;
  min-block-size: 44px;
  padding: 0 .95rem;
  border: 1px solid var(--gold);
  border-radius: 999px;
  color: var(--gold);
  text-decoration: none;
  white-space: nowrap;
  transition: background-color .3s var(--ease), color .3s var(--ease);
}
.donate-btn:lang(en), .donate-btn :lang(en) { font: 600 .72rem/1 var(--font-label); letter-spacing: .1em; text-transform: uppercase; }
.donate-btn :lang(fa) { font: 500 .85rem/1 'Vazirmatn', sans-serif; }
.donate-btn:hover, .donate-btn:focus-visible, .donate-btn[aria-current="page"] { background: var(--gold); color: var(--ink); }
@media (prefers-reduced-motion: reduce) { .donate-btn { transition: none; } }
/*
 * Room for it, at every width, in one row.
 *
 * The bar was already full on a phone and at the narrow end of a laptop, and
 * the pill is about 70px more. Measured in both languages from 320 to 1440px,
 * what gives way is what the page or the footer already offers:
 *   - up to 960px, About and Manifesto (daena.org's own pages, which the
 *     footer and the Foundation's section reach), as they already did on a
 *     phone; and on the film's bar, the wordmark, as it already did below
 *     820px — the film is the home page;
 *   - up to 700px, the controls pack closer, and up to 430px the bar's own
 *     edge comes in to 12px and Home stands down (the wordmark is the way
 *     home, as it already was under 385px);
 *   - under 360px, the width the site is designed to, the ambient music's
 *     button stands down as well. Nothing else plays there, and the film's
 *     page keeps its own.
 */
@media (max-width: 960px) {
  .masthead:not(.masthead--film) .nav__offsite { display: none; }
  .masthead--film .wordmark { display: none; }
  .masthead--film .masthead__tools { margin-inline-start: auto; }
}
@media (max-width: 700px) {
  .donate-btn { padding-inline: .45rem; }
  .donate-btn:lang(en), .donate-btn :lang(en) { font-size: .66rem; letter-spacing: .08em; }
  .donate-btn :lang(fa) { font-size: .8rem; }
  .masthead:not(.masthead--film) :is(.masthead__inner, .nav) { column-gap: .6rem; }
  .masthead:not(.masthead--film) .masthead__tools { gap: .4rem; }
  .masthead:not(.masthead--film) .lang-toggle { padding-inline: .5rem; font-size: .8rem; }
}
@media (max-width: 430px) {
  .masthead:not(.masthead--film) .masthead__inner { inline-size: calc(100% - 1.5rem); }
  .masthead:not(.masthead--film) .nav a[href$="index.html"]:not(.nav__offsite) { display: none; }
}
@media (max-width: 359px) {
  .masthead:not(.masthead--film) .sound { display: none; }
}

/* The audio element is a control the page drives, never one it shows. */
.masthead audio { display: none; }

/* The menu was made larger for a desktop; a phone has the wordmark, two links,
   the sound button and the language switch to fit in one row, so it takes a
   size down rather than wrapping to two. */
@media (max-width: 700px) {
  .nav a:lang(en) { font-size: .78rem; }
  .wordmark__name:lang(en) { font-size: .86rem; letter-spacing: .1em; }
  .masthead :is(.masthead__inner, .nav) { column-gap: .85rem; }
  .masthead__tools { gap: .5rem; }
}

/* On the smallest phones there is not room for the wordmark, two links, the
   sound button and the language switch. The wordmark is itself the way home —
   it has always linked there — so the Home item stands down rather than the
   bar taking a second row. */
@media (max-width: 384px) {
  .nav a[aria-current="page"][href$="index.html"],
  .nav a[href$="index.html"]:not(.nav__offsite) { display: none; }
}

/* The poster is a link now, so it says so: it lifts a little and its frame
   lights under the pointer, and the caption underneath names the action for
   anyone who does not hover. */
.keepsake__link { display: block; text-decoration: none; }
.keepsake__link img { display: block; transition: transform .35s var(--ease); }
.keepsake { transition: border-color .3s var(--ease); }
.keepsake:hover, .keepsake:focus-within { border-color: var(--gold); }
.keepsake:hover .keepsake__link img { transform: scale(1.015); }
@media (prefers-reduced-motion: reduce) {
  .keepsake__link img { transition: none; }
  .keepsake:hover .keepsake__link img { transform: none; }
}

/* Nearly full: under a twentieth of the room left. The count and the bar take
   the warning colour, so "7 of 200 places left" cannot be read as calmly as
   "143 of 200". Colour is not the only cue — the number itself says it — but
   it is the one a quick reader sees. */
.seats[data-low] { color: var(--color-danger); font-weight: 600; }
.seats[data-low] .seats__fill { background: var(--color-danger); }

/* ------------------------------------------------- the film's side rail ---
 * On a laptop, the film's contents disappeared on one scene.
 *
 * intro.css hides the rail while "Through the Year" is the scene being read,
 * because that scene runs its cards to the screen's edges and the rail would
 * sit on top of them. That is true at 1000px and under, where the row scrolls
 * sideways. Above it the cards are a centred grid with a clear margin either
 * side — nothing to step aside from — and the rail vanished all the same,
 * leaving the whole right of the screen empty and no way to see where in the
 * film you were.
 *
 * The one-line fix belongs in intro.css, which is the film author's file and
 * ours only for typography (tools/check-ownership.mjs). So it is written
 * here, in our own stylesheet, where it can be read as what it is: an
 * override, not an edit of their work. daena.css loads first, so it carries
 * the weight to win on specificity rather than on order.
 * -------------------------------------------------------------------------- */
@media (min-width: 1001px) {
  body[data-page="intro"] .film-rail:has([href="#year"][aria-current="true"]) {
    opacity: 1;
    visibility: visible;
  }
}

/* -------------------------------------------- the rail on the first scene ---
 * The film opens on its title, and the chapter rail was already standing
 * beside it — a list of eight things to skip to, offered before anybody has
 * seen the thing they would be skipping. It belongs to the film once the film
 * is running, not to its first frame.
 *
 * intro.js marks the chapter being read with aria-current on that chapter's
 * own link, so the opening scene names itself and nothing else has to be
 * added to know when we are on it. Hidden rather than removed, and with
 * visibility rather than display, so it keeps its place and fades in with the
 * same transition intro.css already gives it — the rail arrives, it does not
 * appear from nowhere.
 *
 * Written here rather than in intro.css, which is the film author's file and
 * ours only for typography (tools/check-ownership.mjs). daena.css loads
 * first, so it carries the weight to win on specificity rather than on order.
 * -------------------------------------------------------------------------- */
body[data-page="intro"] .film-rail:has([href="#opening"][aria-current="true"]) {
  opacity: 0;
  visibility: hidden;
}

/* ------------------------------------------------------- a country code ---
 * Shown beside the box and never typed. Every number the Foundation holds is
 * a New York one, and asking a guest to type "+1" in front of it is one more
 * thing to get wrong — so it sits in the field, in the muted colour, and the
 * box beside it wants exactly ten figures.
 * -------------------------------------------------------------------------- */
/* ------------------------------------------------- a box with a prefix ---
 * "+1" beside the telephone box.
 *
 * It used to be a flex item of its own with its own underline, centred in its
 * own height: a smaller "+1" floating above the line the number sat on, with
 * a gap in the rule between the two. The underline now belongs to the pair,
 * and both the prefix and the box are drawn in the field's own face at the
 * field's own size, so "+1" and "(631) 562-8336" sit on one line over one
 * rule — which is what a prefix is.
 * ------------------------------------------------------------------------ */

.field__withprefix {
  display: flex;
  align-items: center;
  gap: .45rem;
  /*
   * A telephone number reads left to right, country code first.
   *
   * On the Persian page the field runs right to left, so the "+1" was laid
   * out at the far right of the box and the number began to its left — a
   * country code AFTER the number it belongs to, which is not how anybody
   * writes or dials one. The pair is held left to right whichever way the
   * page runs; the label and the help line above it are unaffected, because
   * they are not in here.
   */
  direction: ltr;
  min-block-size: 44px;
  border-block-end: 1px solid var(--line);
  transition: border-color .3s var(--ease);
}
.field__withprefix:hover { border-block-end-color: color-mix(in srgb, var(--gold) 60%, transparent); }
/* The rule answers the box inside it, exactly as a bare field's own does. */
.field__withprefix:focus-within {
  border-block-end-width: 2px;
  border-block-end-color: var(--gold-lit);
  box-shadow: 0 1px 10px -2px color-mix(in srgb, var(--gold) 55%, transparent);
}
.field[data-invalid="true"] .field__withprefix { border-block-end: 2px solid var(--color-danger); }

.field__prefix {
  flex: none;
  padding-block: .35rem;
  color: var(--muted);
  /* The field's own face, size and leading: anything else and the two runs
     of figures sit on different lines. */
  font: 400 1.05rem/1.5 var(--font-text);
  font-variant-numeric: lining-nums tabular-nums;
  white-space: nowrap;
}

/* The box inside gives up its own rule to the pair, and its focus marks. */
.field .field__withprefix :is(input, .field__masked) { flex: 1 1 auto; min-inline-size: 0; }
.field .field__withprefix input {
  border-block-end: 0;
  box-shadow: none;
}
.field .field__withprefix input:focus,
.field .field__withprefix input:focus-visible,
.field .field__withprefix input:hover {
  border-block-end: 0;
  box-shadow: none;
}

/* ---------------------------------------------- the shape, still showing ---
 * The grey template behind the number: "(455" typed, "_) ___-____" to go.
 * The ghost is laid under the box, drawn in the same face at the same size
 * with the same padding, and the part already typed is drawn in nothing at
 * all — so what the eye reads there is the real box, through it.
 * ------------------------------------------------------------------------ */

.field__masked { position: relative; display: block; }
.field__masked > input { position: relative; background: transparent; }
.field__ghost {
  position: absolute;
  inset-block: 0;
  inset-inline-start: 0;
  inline-size: 100%;
  display: flex;
  align-items: center;
  padding: .35rem .1rem;
  font: 400 1.05rem/1.5 var(--font-text);
  font-variant-numeric: lining-nums tabular-nums;
  color: color-mix(in srgb, var(--muted) 70%, transparent);
  white-space: pre;
  overflow: hidden;
  pointer-events: none;
  /* Empty, it must take no room and show nothing. */
  user-select: none;
}
.field__ghost span { color: transparent; }

@media (prefers-reduced-motion: reduce) {
  .field__withprefix { transition: none; }
}

/*
 * On paper.
 *
 * The night theme is pale ink on a ground the browser does not print, so a
 * guest printing a gathering's page for its programme and its directions got
 * white sheets: the words were there, at about 1.5:1 against the paper. In
 * print the ground goes and the ink turns dark — the same variables, rebound
 * (html:root outranks both :root above and .theme-night) — and what only
 * works on a screen is left off: the sound, share and language buttons, the
 * menu, the phone's bar, the film rail, the full-bleed still behind the
 * title, and the grain and vignette laid over everything.
 *
 * Last in the file, so that it has the last word over the rules above it
 * that share its specificity (.stage--event's height was one).
 */
@media print {
  html:root {
    color-scheme: light;
    --ink: #FFFFFF;
    --paper: #111111;
    --body: #222222;
    --muted: #555555;
    --gold: #6B5212;
    --gold-lit: #6B5212;
    --color-bg: #FFFFFF;
    --color-surface: #FFFFFF;
    --color-surface-raised: #FFFFFF;
    --color-ink: #111111;
    --color-ink-muted: #555555;
    --color-accent: #6B5212;
    --color-rule: #CCCCCC;
    /* The light palette's own status colours (tokens.css). */
    --color-success: #2E7D52;
    --color-warning: #8A3D0C;
    --color-danger: #8C1C3A;
  }
  body { background: #FFFFFF; color: var(--body); }
  body::before, body::after { content: none; }
  .js [data-reveal] { opacity: 1 !important; transform: none !important; transition: none !important; }
  .masthead { position: static; background: none; border: 0; }
  /* The title band is a frame for the still: without it, its height and the
     dark wash that kept pale words readable over a photograph are left
     holding dark words over nothing. */
  .stage, .stage--event, .stage--plain { min-block-size: 0; background: none; }
  .stage::after { content: none; }
  .stage__words { padding-block: 1.5rem 1rem; }
  :is(.masthead__tools, .nav, .sound, .share, .lang-toggle, .sticky-cta, .film-rail, .stage__still, .event__actions, [data-cal], .skip-link) {
    display: none !important;
  }
  :is(.ticket, .where__card, .note, .evening, .expect) { break-inside: avoid; }
  h1, h2, h3 { break-after: avoid; }
}

/* The home page's chapter rail, kept out of sight until the film's own
   script has started (it adds .film-live and shows the rail as the reader
   scrolls). Before that it drew for an instant on the opening screen and
   vanished. If the script never comes, the early `js` class is taken away
   after 2.5s (layout.mjs) and the rail is there, so nobody loses the way. */
.js:not(.film-live) .film-rail { opacity: 0; visibility: hidden; }

/* ----------------------------------------------------------- live note --- */
/* A page open while the website changed (app.js: initLiveSite): a small bar
   under the masthead, offering to refresh — or saying the gathering is no
   longer on the website. Above the grain and the phone's bar (70), never in
   the way of reading: narrow, and only one at a time. */
.live-note {
  position: fixed; z-index: 72; inset-inline: 0; margin-inline: auto;
  inset-block-start: calc(var(--bar-h) + .6rem);
  inline-size: fit-content; max-inline-size: calc(100% - 32px);
  display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: .4rem 1rem;
  padding: .55rem .6rem .55rem 1.1rem;
  border: 1px solid color-mix(in srgb, var(--gold) 45%, transparent); border-radius: 10px;
  background: color-mix(in srgb, #0C0B10 92%, transparent); backdrop-filter: blur(10px);
  box-shadow: 0 12px 30px rgb(0 0 0 / .45);
  color: var(--body); font-size: .95rem;
}
.live-note:focus { outline: 2px solid var(--gold); outline-offset: 2px; }
.live-note__words { margin: 0; }
.live-note__action {
  display: inline-flex; align-items: center; min-block-size: 40px; padding: .35rem 1rem;
  border: 1px solid var(--gold); border-radius: 6px; background: none; color: var(--gold-lit);
  font: 600 .78rem/1.2 var(--font-label); letter-spacing: .08em; text-transform: uppercase; text-decoration: none; cursor: pointer;
}
.live-note__action:lang(fa), .live-note__action :lang(fa) { font: 500 .92rem/1.4 var(--font-text); letter-spacing: 0; text-transform: none; }
.live-note__action:hover, .live-note__action:focus-visible { background: var(--gold); color: var(--ink); }
@media print { .live-note { display: none; } }

/* The page for an address the site does not have (tools/pages/not-found.mjs). */
.not-found__ways { display: flex; flex-wrap: wrap; align-items: center; gap: 1rem 1.6rem; margin-block-start: 2rem !important; }

/* The Zoroastrian date beside a Gregorian one: the same line, quieter. */
.date-alt { opacity: .78; font-size: .86em; white-space: nowrap; }
/* In a narrow column every Zoroastrian date takes its own line, so the list
   lines up rather than breaking wherever the Gregorian date happens to end. */
.past__date .date-alt,
.ticket__when .date-alt { display: block; margin-block-start: .1em; }

/* A card's date: a touch larger than other labels, now that it is shorter. */
.label--when { font-size: .9rem; }
.label--when:lang(fa) { font-size: 1.02rem; }
@media (max-width: 420px) {
  /* A phone keeps the card's date at the usual size, and lets the bracket wrap. */
  .label--when { font-size: .84rem; }
  .label--when:lang(fa) { font-size: .96rem; }
  .date-alt { white-space: normal; }
}

/* The food, in its own card under the booking box. With a food card beside it
   the booking box stays in place rather than pinning, so the card never slides
   under it. */
.event__side { display: grid; gap: clamp(1.25rem, 2.5vw, 1.75rem); align-content: start; }
.event__side .ticket.is-pinned { position: relative; inset-block-start: auto; }
.menu-card { position: relative; border: 1px solid var(--line); padding: 1.7rem; }
.menu-card::before { content: ""; position: absolute; inset: 5px; border: 1px solid var(--line-faint); pointer-events: none; }
.menu-card__title { margin-block-end: 1.1rem; }
/* Each group under a heading in the booking box's white serif ("Six ways
   in"), a size smaller because there are several; the gold label above
   them is the card's own, as "Take a seat" is the box's. */
.menu-card__group + .menu-card__group { margin-block-start: 1.4rem; }
.menu-card__course { margin: 0 0 .75rem; font-size: 1.35rem; line-height: 1.2; color: var(--paper); }
.menu-card__dishes { list-style: none; margin: 0; padding: 0; display: grid; gap: .55rem; }
.menu-card__dishes--pictured { grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: .9rem 1.1rem; }
.dish { display: flex; align-items: center; gap: .8rem; min-inline-size: 0; }
.dish__img { flex: none; inline-size: 64px; block-size: 64px; object-fit: cover; border: 1px solid var(--line-faint); background: color-mix(in srgb, var(--gold) 6%, transparent); }
.dish__name { line-height: 1.35; }

/* ------------------------------------------------------- the donation page ---
   The amounts are choices drawn as tiles, the radio itself laid over each
   one, unseen, so the whole tile is what is pressed and the keyboard moves
   between them as it does between any radios. A chosen tile is lit in gold,
   as a chosen ticket option is. Each tile is as wide as its label and
   44px high, in one row that wraps on a phone: six equal columns squeezed
   "Another amount" onto two lines and made every tile taller with it. */
.amounts { display: grid; gap: .7rem; margin: 0; padding: 0; border: 0; min-inline-size: 0; }
.amounts legend { padding: 0; margin-block-end: .2rem; }
.amounts__list { display: flex; flex-wrap: wrap; gap: .5rem; }
.amount { position: relative; display: block; min-inline-size: 0; }
.amount input {
  position: absolute; inset: 0; inline-size: 100%; block-size: 100%; margin: 0;
  appearance: none; opacity: 0; cursor: pointer;
}
.amount__face {
  display: flex; align-items: center; justify-content: center; text-align: center;
  min-inline-size: 4.5rem; min-block-size: 44px; block-size: 100%; padding: .35rem 1rem; white-space: nowrap;
  border: 1px solid var(--line); color: var(--paper);
  font: 500 1.2rem/1.2 var(--font-display);
  transition: border-color .3s var(--ease), background-color .3s var(--ease), color .3s var(--ease);
}
.amount__face :lang(en) { font: 500 1rem/1.25 var(--font-display); }
.amount__face :lang(fa) { font: 500 .95rem/1.6 var(--font-text); }
.amount .amount__face bdi { font: 500 1.15rem/1.2 var(--font-display); font-variant-numeric: lining-nums; }
.amount:hover .amount__face { border-color: color-mix(in srgb, var(--gold) 60%, transparent); }
.amount input:checked + .amount__face { border-color: var(--gold); background: color-mix(in srgb, var(--gold) 12%, transparent); color: var(--gold-lit); box-shadow: inset 0 0 0 1px var(--gold); }
.amount input:focus-visible + .amount__face { outline: 2px solid var(--gold); outline-offset: 2px; }
.amounts[data-invalid="true"] .amount__face { border-color: color-mix(in srgb, var(--color-danger) 70%, transparent); }
@media (prefers-reduced-motion: reduce) { .amount__face { transition: none; } }
.donate__other { max-inline-size: 16rem; }
.donate__lede { max-inline-size: 52ch; }
.foot__give { margin-block-start: .4rem; }
