/* Self-hosted (SIL OFL): no third-party request, and the preloads in the page head get them in before first paint. */
/* ds-allow-hardcode on each rule: @font-face must name its family literally, a custom property is not valid there. */
@font-face { font-family: "Bebas Neue"; font-weight: 400; font-display: swap; src: url(fonts/bebas-neue-400.woff2) format("woff2"); } /* ds-allow-hardcode */
@font-face { font-family: Lato; font-weight: 400; font-display: swap; src: url(fonts/lato-400.woff2) format("woff2"); } /* ds-allow-hardcode */
@font-face { font-family: Lato; font-weight: 700; font-display: swap; src: url(fonts/lato-700.woff2) format("woff2"); } /* ds-allow-hardcode */
@font-face { font-family: Lato; font-weight: 900; font-display: swap; src: url(fonts/lato-900.woff2) format("woff2"); } /* ds-allow-hardcode */

:root {
  /* Colour: Royal Films navy and gold on a deep cinema-dark surface. */
  --bg: #050b1c;
  --bg-veil: #050b1cf2;
  --bg-veil-soft: #050b1cb8;
  --bg-fade: #050b1c99;
  --bg-fade-soft: #050b1c33;
  --surface: #0c1630;
  --surface-2: #142244;
  --surface-deep: #0a1430;
  --line: #24345c;
  --hairline: #ffffff12;
  --dot: #ffffff40;
  --text: #f2f5fb;
  --text-soft: #dbe3f3;
  --muted: #a3b0cc;
  --navy: #002e73;
  --blue: #5aa2e0;
  --on-blue: #04132b;
  --gold: #ffd658;
  --gold-hover: #ffe38a;
  --on-gold: #1a1400;
  --scrim: #02050fcc;
  --caption: #030814f2;
  --shadow: #000000aa;
  /* Space and size */
  --sp-2: 2px; --sp-4: 4px; --sp-6: 6px; --sp-8: 8px; --sp-10: 10px; --sp-12: 12px;
  --sp-14: 14px; --sp-16: 16px; --sp-20: 20px; --sp-24: 24px; --sp-28: 28px;
  --sp-40: 40px; --sp-48: 48px; --sp-64: 64px;
  --control: 44px; --control-sm: 36px; --logo-h: 34px;
  --radius: 10px; --radius-sm: 4px; --radius-lg: 16px; --pill: 999px;
  --focus-w: 3px; --blur: 10px; --blur-sm: 4px;
  --gutter: clamp(var(--sp-16), 4vw, 48px);
  --radius-card: 12px; --radius-hero: 24px;
  --loc-col: 200px;
  --dialog-w: 920px; --dialog-gap: 32px; --textarea-min: 120px;
  /* Type */
  --fs-12: 12px; --fs-13: 13px; --fs-14: 14px; --fs-15: 15px; --fs-16: 16px;
  --fs-20: 20px; --fs-22: 22px; --fs-24: 24px; --fs-26: 26px; --fs-28: 28px; --fs-30: 30px;
  --body: Lato, system-ui, sans-serif;
  --display: "Bebas Neue", "Arial Narrow", sans-serif;
  color-scheme: dark;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: var(--fs-16)/1.5 var(--body);
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, p { margin: 0; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gold); }

:focus-visible { outline: var(--focus-w) solid var(--gold); outline-offset: var(--sp-2); }

.sr-only {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: var(--sp-16); flex-wrap: wrap;
  padding: var(--sp-12) var(--gutter);
  background: linear-gradient(var(--bg-veil), var(--bg-veil-soft));
  backdrop-filter: blur(var(--blur));
  border-bottom: 1px solid var(--hairline);
}
.topbar .logo img { height: var(--logo-h); width: auto; }
.topbar .spacer { flex: 1; }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--sp-8);
  min-height: var(--control); padding: 0 var(--sp-20);
  border: 1px solid var(--line); border-radius: var(--pill);
  background: var(--surface-2); color: var(--text);
  font-weight: 700; text-decoration: none; white-space: nowrap;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:hover { border-color: var(--blue); }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--gold); border-color: var(--gold); color: var(--on-gold); }
.btn.primary:hover { background: var(--gold-hover); }
.btn.ghost { background: transparent; }
.btn.small { min-height: var(--control-sm); padding: 0 var(--sp-12); font-size: var(--fs-14); }
.btn[aria-pressed="true"] { border-color: var(--gold); color: var(--gold); }

.field {
  min-height: var(--control); padding: 0 var(--sp-14); width: 100%;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
textarea.field { padding: var(--sp-10) var(--sp-14); min-height: var(--textarea-min); resize: vertical; }
label.stack { display: grid; gap: var(--sp-6); font-weight: 700; font-size: var(--fs-14); }

.badge {
  display: inline-block; padding: var(--sp-2) var(--sp-8); border-radius: var(--radius-sm);
  font-size: var(--fs-12); font-weight: 900; letter-spacing: .04em; text-transform: uppercase;
  background: var(--gold); color: var(--on-gold);
}
.badge.blue { background: var(--blue); color: var(--on-blue); }
.badge.mute { background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); }

.poster {
  position: relative; aspect-ratio: 2 / 3; overflow: hidden;
  border-radius: var(--radius); background: var(--surface-2);
}
.poster img { width: 100%; height: 100%; object-fit: cover; }
/* Titles without artwork get a typographic poster instead of a broken image. */
.poster.blank {
  display: grid; place-items: center; padding: var(--sp-14); text-align: center;
  background: linear-gradient(160deg, var(--navy), var(--surface-deep) 70%);
  font: var(--fs-26)/1 var(--display); letter-spacing: .03em; color: var(--gold);
}

dialog {
  border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 0;
  background: var(--surface); color: var(--text);
  width: min(var(--dialog-w), calc(100vw - var(--dialog-gap))); max-height: calc(100dvh - var(--dialog-gap));
}
dialog::backdrop { background: var(--scrim); backdrop-filter: blur(var(--blur-sm)); }
dialog[open] { animation: rise .22s ease-out; }
.dialog-head {
  display: flex; align-items: center; gap: var(--sp-12); justify-content: space-between;
  padding: var(--sp-16) var(--sp-20); border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface); z-index: 2;
}
.dialog-head h2 { font: var(--fs-28)/1 var(--display); letter-spacing: .03em; }
.dialog-body { padding: var(--sp-20); }

/* Theater picker, used by the billboard and the theater dashboard. */
.loc-grid { display: grid; gap: var(--sp-16); grid-template-columns: repeat(auto-fill, minmax(var(--loc-col), 1fr)); }
.loc-city { display: grid; gap: var(--sp-6); align-content: start; }
.loc-city h3 { font-size: var(--fs-15); color: var(--gold); }
.loc-city button {
  text-align: left; min-height: var(--control); padding: var(--sp-6) var(--sp-10);
  border: 1px solid transparent; border-radius: var(--sp-8); background: transparent;
}
.loc-city button:hover { background: var(--surface-2); }
.loc-city button[aria-pressed="true"] { border-color: var(--gold); background: var(--surface-2); }

.empty { padding: var(--sp-48) var(--gutter); color: var(--muted); text-align: center; }

@keyframes rise { from { opacity: 0; transform: translateY(var(--sp-10)); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
}
