/* ==========================================================================
   UPSEA shared styles
   Loaded by every page before its own stylesheet. Holds the design tokens,
   base typography, layout helpers, top bar, header + mobile menu, footer,
   and the reusable components (buttons, page hero, section heads, cards,
   badges, chips, gallery grid, lightbox, back-to-top, scroll reveal).
   Page-specific layout lives in each page's own CSS file.
   ========================================================================== */

:root {
  /* Brand */
  --yellow: #f4b400;
  --yellow-600: #dba200;
  --yellow-100: #fff4cc;
  --gold-text: #8f6400;          /* yellow-family text that passes AA on white and on --bg-soft */
  --purple: #7b5cb7;
  --purple-600: #6646a3;
  --purple-700: #4f3485;
  --purple-50: #f5f1fc;
  --night: #1d1433;              /* deep brand purple-black: footer, hero overlays */
  --night-2: #2a1f47;

  /* Neutrals */
  --ink: #1c1a24;
  --muted: #5d5869;
  --line: #e9e5f0;
  --bg: #ffffff;
  --bg-soft: #faf8fd;

  /* Shape + depth */
  --radius-lg: 22px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow-sm: 0 1px 2px rgba(29, 20, 51, .06), 0 2px 8px rgba(29, 20, 51, .05);
  --shadow: 0 4px 12px rgba(29, 20, 51, .06), 0 16px 40px rgba(29, 20, 51, .09);
  --shadow-lg: 0 10px 30px rgba(29, 20, 51, .12), 0 30px 60px rgba(29, 20, 51, .14);

  /* Layout */
  --container: 1200px;
  --gutter: clamp(16px, 4vw, 32px);
  --header-h: 76px;

  /* Motion + type */
  --ease: cubic-bezier(.2, .8, .2, 1);
  /* Springs (Apple-style): critically damped for UI, a light bounce only after a flick.
     Browsers without linear() keep these cubic-bezier stand-ins. */
  --spring: cubic-bezier(.2, .9, .3, 1);
  --spring-bounce: cubic-bezier(.3, 1.25, .55, 1);
  --spring-time: .54s;
  --bounce-time: .45s;
  --font: "Poppins", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

@supports (transition-timing-function: linear(0, 1)) {
  :root {
    /* sampled from real spring physics: damping 1.0 / response .4s, and damping .8 / response .35s */
    --spring: linear(0, 0.0492, 0.1573, 0.285, 0.4111, 0.5253, 0.6236, 0.7054, 0.7718, 0.8247, 0.8663, 0.8987, 0.9236, 0.9427, 0.9571, 0.9681, 0.9763, 0.9824, 0.987, 0.9904, 0.993, 0.9948, 0.9962, 0.9972, 1);
    --spring-bounce: linear(0, 0.0465, 0.1553, 0.2912, 0.4315, 0.5623, 0.6765, 0.771, 0.846, 0.9032, 0.945, 0.9742, 0.9935, 1.0054, 1.0119, 1.0147, 1.0151, 1.014, 1.0122, 1.0101, 1.008, 1.0061, 1.0044, 1.0031, 1);
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;               /* safety net against sideways scrolling on phones */
}

img, video, svg { max-width: 100%; height: auto; display: block; }

h1, h2, h3, h4 {
  margin: 0 0 .5em;
  line-height: 1.2;
  font-weight: 700;
  letter-spacing: -.01em;
  color: var(--ink);
  text-wrap: balance;
}
/* Size-specific tracking: large type tightens, small type stays open */
h1 { line-height: 1.08; letter-spacing: -.028em; }
h2 { line-height: 1.12; letter-spacing: -.022em; }
h3 { letter-spacing: -.014em; }
p, li, figcaption { text-wrap: pretty; }

p { margin: 0 0 1em; }

a { color: var(--purple-600); text-underline-offset: 3px; }
a:hover { color: var(--purple-700); }

:focus-visible {
  outline: 3px solid var(--purple);
  outline-offset: 3px;
  border-radius: 6px;
}

::selection { background: var(--yellow); color: var(--night); }

/* keep the keyboard focus ring visible on the yellow top bar and on dark areas */
.topbar :focus-visible { outline-color: var(--night); }
.page-hero :focus-visible,
.site-footer :focus-visible,
.lightbox :focus-visible { outline-color: #fff; }

.skip-link {
  position: absolute;
  left: 16px;
  top: -100px;
  z-index: 1000;
  padding: 10px 18px;
  border-radius: 999px;
  background: var(--night);
  color: #fff;
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { top: 12px; color: #fff; }

/* `hidden` must win over component display rules (used by the date switch in site.js) */
[hidden] { display: none !important; }

.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0);
  white-space: nowrap; border: 0;
}

/* ---------- Layout helpers ---------- */
.container {
  width: min(100% - 2 * var(--gutter), var(--container));
  margin-inline: auto;
}

.section { padding-block: clamp(56px, 8vw, 104px); }
.section--tight { padding-block: clamp(40px, 5vw, 64px); }
.section--soft { background: var(--bg-soft); }

.grid {
  display: grid;
  gap: var(--gap, clamp(18px, 2.4vw, 28px));
  grid-template-columns: repeat(auto-fill, minmax(min(var(--min, 280px), 100%), 1fr));
}

.text-center { text-align: center; }

/* ---------- Section heading ---------- */
.section-head { max-width: 720px; margin: 0 0 clamp(28px, 4vw, 48px); }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 0 0 12px;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--gold-text);
}
.eyebrow::before,
.section-head--center .eyebrow::after {
  content: "";
  width: 28px;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
}
.eyebrow--light { color: var(--yellow); }

.section-title {
  margin: 0 0 12px;
  font-size: clamp(28px, 3.6vw, 42px);
  font-weight: 800;
  letter-spacing: -.02em;
}

.section-lead {
  margin: 0;
  color: var(--muted);
  font-size: clamp(15px, 1.4vw, 17px);
}

/* ---------- Top bar ---------- */
.topbar {
  background: var(--yellow);
  color: var(--night);
  font-size: 13px;
  font-weight: 600;
}
.topbar__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  min-height: 36px;
}
.topbar__title { margin: 0; }
.topbar__links {
  display: flex;
  gap: 22px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.topbar a {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: inherit;
  text-decoration: none;
}
.topbar a:hover { color: inherit; text-decoration: underline; }
.topbar i { font-size: 15px; }

@media (max-width: 720px) {
  .topbar__inner { justify-content: center; text-align: center; }
  .topbar__links { display: none; }
}

/* ---------- Header + navigation ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 255, 255, .72);
  -webkit-backdrop-filter: saturate(180%) blur(20px);
  backdrop-filter: saturate(180%) blur(20px);
  border-bottom: 1px solid transparent;
  transition: box-shadow .3s var(--ease), border-color .3s var(--ease), background-color .3s var(--ease);
}
/* Scroll edge: the hairline and soft shadow appear only once content slides underneath */
.site-header.is-scrolled {
  background: rgba(255, 255, 255, .78);
  border-bottom-color: rgba(29, 20, 51, .08);
  box-shadow: 0 8px 30px rgba(29, 20, 51, .07);
}
@supports not ((-webkit-backdrop-filter: blur(1px)) or (backdrop-filter: blur(1px))) {
  .site-header, .site-header.is-scrolled { background: rgba(255, 255, 255, .97); }
}

.header-inner {
  position: relative;
  display: flex;
  align-items: center;
  gap: 20px;
  min-height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-right: auto;
  flex-shrink: 0;
  color: var(--ink);
  text-decoration: none;
}
.brand:hover { color: var(--ink); }
.brand img { height: 56px; width: auto; transition: transform var(--spring-time) var(--spring); }
.brand:active img { transform: scale(.95); transition-duration: .08s; }
.brand__text {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding-left: 12px;
  border-left: 2px solid var(--yellow);
  line-height: 1.1;
}
.brand__name { font-size: 22px; font-weight: 800; letter-spacing: .06em; color: var(--night); }
.brand__tag { font-size: 10.5px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }

.site-nav ul {
  display: flex;
  align-items: center;
  gap: 2px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-nav a {
  position: relative;
  display: block;
  padding: 10px 12px;
  border-radius: 999px;
  color: var(--ink);
  font-size: 15px;
  font-weight: 500;
  text-decoration: none;
  white-space: nowrap;
  transition: color .2s, background-color .2s;
  -webkit-tap-highlight-color: transparent;
}
.site-nav a:hover { color: var(--purple-700); }
.site-nav a:active { background: var(--purple-50); transition-duration: 0s; }
.site-nav a[aria-current="page"] { color: var(--purple-700); font-weight: 600; }
.site-nav a[aria-current="page"]::after {
  content: "";
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 3px;
  height: 2px;
  border-radius: 2px;
  background: var(--yellow);
}

.site-header .header-cta { flex-shrink: 0; }

.site-header .nav-toggle {
  display: none;
  align-items: center;
  justify-content: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: transform var(--spring-time) var(--spring), background-color .2s;
}
.site-header .nav-toggle:active { transform: scale(.92); background: var(--purple-50); transition-duration: .08s; }
.site-header .nav-toggle__bars { position: relative; display: block; width: 20px; height: 14px; margin: 0; background: none; border-radius: 0; transform: none; opacity: 1; }
.site-header .nav-toggle__bars span {
  position: absolute;
  display: block;
  margin: 0;
  left: 0;
  width: 100%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  transition: transform var(--spring-time) var(--spring), opacity .2s;
}
.site-header .nav-toggle__bars span:nth-child(1) { top: 0; }
.site-header .nav-toggle__bars span:nth-child(2) { top: 6px; }
.site-header .nav-toggle__bars span:nth-child(3) { top: 12px; }
.site-header.nav-open .nav-toggle__bars span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.site-header.nav-open .nav-toggle__bars span:nth-child(2) { opacity: 0; }
.site-header.nav-open .nav-toggle__bars span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1240px) {
  .site-header .header-cta { display: none; }
}

@media (max-width: 1100px) {
  :root { --header-h: 68px; }
  .site-header .nav-toggle { display: inline-flex; }

  .site-nav {
    position: absolute;
    top: 100%;
    left: calc(-1 * var(--gutter));
    right: calc(-1 * var(--gutter));
    max-height: calc(100vh - var(--header-h));
    max-height: calc(100dvh - var(--header-h));
    overflow-y: auto;
    overscroll-behavior: contain;
    background: #fff;   /* solid: a blur can't reach through the frosted header, and see-through text behind menu items reads as clutter */
    border-bottom: 1px solid rgba(29, 20, 51, .08);
    box-shadow: 0 24px 40px rgba(29, 20, 51, .14);
    /* closed: tucked into the menu button (top right); opens and closes along the same path */
    visibility: hidden;
    opacity: 0;
    transform: translateY(-8px) scale(.97);
    transform-origin: top right;
    pointer-events: none;
    transition: opacity .2s var(--ease), transform var(--spring-time) var(--spring), visibility 0s linear var(--spring-time);
  }
  .site-header.nav-open { background: #fff; }   /* the header and its open menu read as one surface above the dimmed page */
  .site-header.nav-open .site-nav {
    visibility: visible;
    opacity: 1;
    transform: none;
    pointer-events: auto;
    transition: opacity .2s var(--ease), transform var(--spring-time) var(--spring), visibility 0s;
  }

  /* dim the page behind the open menu (tapping it closes the menu) */
  body::before {
    content: "";
    position: fixed;
    inset: 0;
    z-index: 99;
    background: rgba(29, 20, 51, .32);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .3s var(--ease), visibility 0s linear .3s;
  }
  body.nav-open::before {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity .3s var(--ease), visibility 0s;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 6px var(--gutter) 18px;
  }
  .site-nav li + li { border-top: 1px solid var(--line); }
  .site-nav a {
    padding: 14px 4px;
    border-radius: 0;
    font-size: 16px;
  }
  .site-nav a[aria-current="page"]::after {
    left: auto;
    right: 6px;
    top: 50%;
    bottom: auto;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    transform: translateY(-50%);
  }
}

@media (max-width: 1100px) {
  .brand img { height: 48px; }
  .brand__name { font-size: 20px; }
}

@media (max-width: 420px) {
  .brand { gap: 10px; }
  .brand img { height: 44px; }
  .brand__tag { display: none; }
}

/* ---------- Buttons ---------- */
.btn {
  --btn-bg: var(--yellow);
  --btn-fg: var(--night);
  --btn-bd: transparent;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 48px;
  padding: 12px 24px;
  border: 2px solid var(--btn-bd);
  border-radius: 999px;
  background: var(--btn-bg);
  color: var(--btn-fg);
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  white-space: nowrap;
  letter-spacing: .01em;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  touch-action: manipulation;
  transition: transform var(--spring-time) var(--spring), box-shadow .25s var(--ease),
              background-color .2s, color .2s, border-color .2s;
}
.btn:hover { color: var(--btn-fg); }
/* press feedback: the button dips the instant it is pressed and springs back on release */
.btn:active { transform: scale(.97); box-shadow: none; transition-duration: .08s, .08s, .2s, .2s, .2s; }
.btn i { font-size: 1.15em; line-height: 1; }

.btn--secondary { --btn-bg: var(--purple); --btn-fg: #fff; }
.btn--outline { --btn-bg: transparent; --btn-fg: var(--purple-700); --btn-bd: var(--purple); }
.btn--light { --btn-bg: #fff; --btn-fg: var(--purple-700); }
.btn--ghost-light { --btn-bg: transparent; --btn-fg: #fff; --btn-bd: rgba(255, 255, 255, .75); }

/* hover effects only where there is a real pointer, so nothing stays stuck after a tap on a phone */
@media (hover: hover) and (pointer: fine) {
  .btn:hover { transform: translateY(-2px); box-shadow: 0 10px 24px rgba(29, 20, 51, .16); }
  .btn:active { transform: translateY(0) scale(.97); box-shadow: none; }
  .btn--primary:hover { --btn-bg: var(--yellow-600); }
  .btn--secondary:hover { --btn-bg: var(--purple-600); }
  .btn--outline:hover { --btn-bg: var(--purple); --btn-fg: #fff; }
  .btn--light:hover { --btn-bg: var(--yellow); --btn-fg: var(--night); }
  .btn--ghost-light:hover { --btn-bg: rgba(255, 255, 255, .14); --btn-bd: #fff; }
  .site-nav a:hover { background: var(--purple-50); }
  .brand:hover img { transform: scale(1.04); }
  .link-arrow:hover i { transform: translateX(3px); }
}
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: 14px; }
.btn--block { width: 100%; }

.link-arrow {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-weight: 600;
  text-decoration: none;
}
.link-arrow i { transition: transform var(--spring-time) var(--spring); }

/* ---------- Page hero (inner pages) ---------- */
.page-hero {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-block: clamp(52px, 8vw, 104px) clamp(48px, 7vw, 88px);
  color: #fff;
  background: linear-gradient(135deg, var(--night) 0%, var(--purple-700) 58%, var(--purple) 100%);
}
.page-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    radial-gradient(620px 300px at 88% 10%, rgba(244, 180, 0, .26), transparent 62%),
    radial-gradient(520px 260px at 6% 115%, rgba(255, 255, 255, .09), transparent 60%);
}
.page-hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 4px;
  background: var(--yellow);
}
/* Optional photo behind the gradient: style="--hero-image: url('h3.jpg')" */
.page-hero--image {
  background:
    linear-gradient(120deg, rgba(29, 20, 51, .92) 0%, rgba(79, 52, 133, .78) 60%, rgba(123, 92, 183, .55) 100%),
    var(--hero-image) center / cover no-repeat;
}
@media (max-width: 768px) {
  /* on phones the text spans the whole photo, so the overlay is darker everywhere */
  .page-hero--image {
    background:
      linear-gradient(160deg, rgba(29, 20, 51, .94) 0%, rgba(58, 38, 102, .9) 55%, rgba(79, 52, 133, .84) 100%),
      var(--hero-image) center / cover no-repeat;
  }
}
.page-hero h1 {
  max-width: 820px;
  margin: 0 0 14px;
  color: #fff;
  font-size: clamp(34px, 5.4vw, 60px);
  font-weight: 800;
  letter-spacing: -.028em;
  line-height: 1.06;
}
.page-hero p:not(.eyebrow) {
  max-width: 640px;
  margin: 0;
  color: rgba(255, 255, 255, .86);
  font-size: clamp(15px, 1.5vw, 18px);
}

.crumbs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin: 0 0 18px;
  padding: 0;
  list-style: none;
  font-size: 13px;
  color: rgba(255, 255, 255, .7);
}
.crumbs li + li::before { content: "/"; margin-right: 8px; opacity: .6; }
.crumbs [aria-current="page"] { color: rgba(255, 255, 255, .88); }
.crumbs a { color: #fff; text-decoration: none; }
.crumbs a:hover { color: var(--yellow); }

/* ---------- Cards ---------- */
.card {
  position: relative;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow-sm);
  transition: transform var(--spring-time) var(--spring), box-shadow .3s var(--ease), border-color .3s;
}
.card--hover { -webkit-tap-highlight-color: transparent; }
.card--hover:active { transform: scale(.985); transition-duration: .1s; }
@media (hover: hover) and (pointer: fine) {
  .card--hover:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow);
    border-color: transparent;
  }
  .card--hover:active { transform: translateY(-2px) scale(.985); }
  .card--hover:hover .card__media img { transform: scale(1.04); }
  .card--hover:hover .card__media--poster img { transform: scale(1.02); }
}

.card__media {
  position: relative;
  aspect-ratio: var(--ratio, 4 / 3);
  overflow: hidden;
  background: var(--purple-50);
}
.card__media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}

/* Posters keep their full artwork visible (no cropping of dates and logos) */
.card__media--poster { --ratio: 4 / 5; background: #f1edf7; }
.card__media--poster img { object-fit: contain; }

.card__badge { position: absolute; top: 14px; left: 14px; z-index: 1; }

.card__body {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 8px;
  padding: 20px 22px 22px;
}
.card__title { margin: 0; font-size: 18px; font-weight: 700; line-height: 1.3; }
.card__text { margin: 0; color: var(--muted); font-size: 15px; }

.card__meta {
  display: grid;
  gap: 6px;
  margin: 0;
  padding: 0;
  list-style: none;
  color: var(--muted);
  font-size: 14px;
}
.card__meta li { display: flex; align-items: flex-start; gap: 8px; }
.card__meta i { flex-shrink: 0; color: var(--purple); font-size: 16px; line-height: 1.35; }

.card__actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: auto;
  padding-top: 12px;
}

/* ---------- Badges + chips ---------- */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 12px;
  border-radius: 999px;
  background: var(--yellow-100);
  color: var(--gold-text);
  font-size: 12px;
  font-weight: 600;
  line-height: 1.5;
  letter-spacing: .02em;
}
.badge--solid { background: var(--yellow); color: var(--night); }
.badge--purple { background: var(--purple-50); color: var(--purple-700); }
.badge--muted { background: #f1f0f4; color: var(--muted); }

.chips {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin: 0 0 clamp(24px, 3vw, 36px);
  padding: 0;
  list-style: none;
}
.chip {
  display: inline-flex;
  align-items: center;
  min-height: 42px;
  padding: 8px 20px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  color: var(--ink);
  font-size: 14px;
  font-weight: 500;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, border-color .2s, color .2s, transform var(--spring-time) var(--spring);
}
.chip:active { transform: scale(.95); transition-duration: .2s, .2s, .2s, .08s; }
@media (hover: hover) and (pointer: fine) {
  .chip:hover { border-color: var(--purple); color: var(--purple-700); }
}
.chip[aria-current="page"],
.chip.is-active { background: var(--purple); border-color: var(--purple); color: #fff; }

/* ---------- Gallery grid (photos open in the lightbox) ---------- */
.gallery-grid {
  display: grid;
  gap: clamp(12px, 1.6vw, 20px);
  grid-template-columns: repeat(auto-fill, minmax(min(260px, 100%), 1fr));
}
.gallery-item {
  position: relative;
  margin: 0;
  overflow: hidden;
  border-radius: var(--radius);
  background: var(--purple-50);
  box-shadow: var(--shadow-sm);
}
.gallery-item a { display: block; aspect-ratio: var(--ratio, 1 / 1); color: #fff; }
.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform .6s var(--ease);
}
.gallery-item:hover img { transform: scale(1.05); }
.gallery-item figcaption {
  position: absolute;
  inset: auto 0 0 0;
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 10px;
  padding: 40px 16px 14px;
  background: linear-gradient(to top, rgba(29, 20, 51, .88), rgba(29, 20, 51, 0));
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  line-height: 1.35;
  pointer-events: none;
}
.gallery-item figcaption .badge { flex-shrink: 0; }

/* ---------- Lightbox (built by site.js) ----------
   Full-screen photo viewer. site.js grows the photo out of the tapped
   thumbnail on a spring, lets it be dragged sideways (next / previous) or
   down (close), and sets --lb-d: 0 = viewer fully shown, 1 = backdrop and
   controls faded out. The photo is always shown whole, never cropped. */
.lightbox {
  --lb-d: 1;
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  color: #fff;
  visibility: hidden;
}
.lightbox.is-open,
.lightbox.is-closing { visibility: visible; }
.lightbox.is-closing { pointer-events: none; }
.lightbox::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(10, 7, 20, .96);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  opacity: calc(1 - var(--lb-d));
}
.lightbox > * { position: relative; z-index: 1; }
.lightbox__bar,
.lightbox__foot,
.lightbox__prev,
.lightbox__next { opacity: calc(1 - var(--lb-d) * 1.5); }

.lightbox__bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 12px clamp(12px, 3vw, 24px);
}
.lightbox__count {
  margin: 0;
  padding: 6px 14px;
  border-radius: 999px;
  background: rgba(255, 255, 255, .1);
  color: rgba(255, 255, 255, .85);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: .04em;
  font-variant-numeric: tabular-nums;
}
.lightbox__count:empty { visibility: hidden; }

.lightbox__stage {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 0;
  padding: 0 clamp(12px, 7vw, 96px);
  touch-action: pinch-zoom;          /* one finger drags the photo; two fingers still zoom */
  cursor: grab;
  -webkit-user-select: none;
  user-select: none;
}
.lightbox.is-dragging .lightbox__stage { cursor: grabbing; }
.lightbox__figure {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  height: 100%;
  margin: 0;
}
.lightbox__img {
  display: block;
  width: auto;
  height: auto;
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .55);
  transform-origin: 50% 50%;
  transition: opacity .25s var(--ease);
  -webkit-user-drag: none;
  user-select: none;
}
.lightbox.is-loading .lightbox__img { opacity: 0; }
.lightbox__spinner {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 40px;
  height: 40px;
  margin: -20px 0 0 -20px;
  border: 3px solid rgba(255, 255, 255, .2);
  border-top-color: var(--yellow);
  border-radius: 50%;
  opacity: 0;
  transition: opacity .2s;
  animation: lightbox-spin .8s linear infinite;
  pointer-events: none;
}
.lightbox.is-loading .lightbox__spinner { opacity: 1; transition-delay: .15s; }
@keyframes lightbox-spin { to { transform: rotate(360deg); } }

.lightbox__foot {
  display: grid;
  justify-items: center;
  gap: 12px;
  padding: 14px clamp(12px, 3vw, 24px) max(16px, env(safe-area-inset-bottom));
}
.lightbox__caption {
  max-width: 760px;
  margin: 0;
  color: #fff;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.45;
  letter-spacing: .005em;
  text-align: center;
  text-wrap: balance;
}
.lightbox__caption:empty { display: none; }

.lightbox__thumbs {
  display: flex;
  gap: 8px;
  max-width: 100%;
  margin: 0;
  padding: 4px 2px 6px;
  list-style: none;
  overflow-x: auto;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, .25) transparent;
}
.lightbox__thumb {
  flex: 0 0 auto;
  height: 60px;
  padding: 0;
  border: 2px solid transparent;
  border-radius: 8px;
  background: rgba(255, 255, 255, .06);
  overflow: hidden;
  opacity: .5;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: opacity .2s, border-color .2s, transform var(--spring-time) var(--spring);
}
.lightbox__thumb img { width: auto; height: 100%; max-width: none; }
.lightbox__thumb:active { transform: scale(.94); transition-duration: .2s, .2s, .08s; }
.lightbox__thumb[aria-current="true"] { opacity: 1; border-color: var(--yellow); transform: translateY(-2px); }

.lightbox__btn {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 50%;
  background: rgba(255, 255, 255, .1);
  color: #fff;
  font-size: 26px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition: background-color .2s, border-color .2s, transform var(--spring-time) var(--spring);
}
.lightbox__btn:active { transform: scale(.9); background: rgba(255, 255, 255, .22); transition-duration: .2s, .2s, .08s; }
.lightbox__btn[hidden] { display: none; }
.lightbox__prev,
.lightbox__next { position: absolute; top: 50%; z-index: 1; margin-top: -24px; }
.lightbox__prev { left: clamp(8px, 2vw, 24px); }
.lightbox__next { right: clamp(8px, 2vw, 24px); }
body.lightbox-open { overflow: hidden; }

@media (hover: hover) and (pointer: fine) {
  .lightbox__btn:hover { background: rgba(255, 255, 255, .22); border-color: rgba(255, 255, 255, .3); }
  .lightbox__thumb:hover { opacity: .85; }
}

@media (max-width: 767px) {
  .lightbox__stage { padding: 0 8px; }
  .lightbox__img { border-radius: 8px; }
  .lightbox__thumbs { display: none; }
  /* arrows sit in the bottom corners, beside the caption, so they never cover the photo */
  .lightbox__prev,
  .lightbox__next { position: fixed; top: auto; bottom: max(14px, env(safe-area-inset-bottom)); margin: 0; }
  .lightbox__prev { left: 12px; }
  .lightbox__next { right: 12px; }
  .lightbox.has-nav .lightbox__foot { min-height: 76px; align-content: center; padding-inline: 72px; }
  .lightbox__caption { font-size: 14px; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: relative;
  padding-top: clamp(56px, 7vw, 88px);
  background: var(--night);
  color: rgba(255, 255, 255, .75);
  font-size: 15px;
}
.site-footer::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 4px;
  background: linear-gradient(90deg, var(--yellow), var(--purple));
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.5fr 1fr 1fr 1.2fr;
  gap: 40px;
}
.footer-brand img {
  width: auto;
  height: 92px;
  padding: 12px 18px;
  border-radius: 18px;
  background: #fff;
  box-shadow: 0 0 0 4px rgba(244, 180, 0, .35), 0 16px 40px rgba(0, 0, 0, .35);
}
.site-footer .footer-brand p { max-width: 340px; margin: 18px 0 0; color: inherit; }
.site-footer h2 {
  margin: 0 0 16px;
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.footer-links {
  display: grid;
  gap: 10px;
  margin: 0;
  padding: 0;
  list-style: none;
}
.site-footer a {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: rgba(255, 255, 255, .86);
  text-decoration: none;
  overflow-wrap: anywhere;
  transition: color .2s;
}
.site-footer a:hover { color: var(--yellow); }
.footer-links i { flex-shrink: 0; color: var(--yellow); font-size: 18px; }
.site-footer .footer-bottom {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 8px 24px;
  margin-top: clamp(40px, 5vw, 64px);
  padding-block: 22px;
  border-top: 1px solid rgba(255, 255, 255, .12);
  color: rgba(255, 255, 255, .6);
  font-size: 14px;
}
.site-footer .footer-bottom p { margin: 0; color: inherit; }

@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr 1fr; }
  .footer-brand { grid-column: 1 / -1; }
}
@media (max-width: 520px) {
  .footer-grid { grid-template-columns: 1fr; gap: 32px; }
}

/* ---------- Back to top (built by site.js) ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 90;
  display: grid;
  place-items: center;
  width: 46px;
  height: 46px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--purple);
  color: #fff;
  font-size: 22px;
  box-shadow: var(--shadow);
  cursor: pointer;
  opacity: 0;
  visibility: hidden;
  transform: translateY(12px) scale(.9);
  -webkit-tap-highlight-color: transparent;
  transition: opacity .25s var(--ease), transform var(--spring-time) var(--spring), visibility .25s, background-color .2s;
}
.to-top.is-visible { opacity: 1; visibility: visible; transform: none; }
.to-top.is-visible:active { transform: scale(.9); transition-duration: .25s, .08s, .25s, .2s; }
@media (hover: hover) and (pointer: fine) {
  .to-top:hover { background: var(--purple-600); }
}

/* ---------- Scroll reveal ----------
   site.js marks elements already on screen as visible first, then adds
   .reveal-ready, so nothing above the fold flickers and nothing is hidden
   if the script fails to load. Stagger with style="--delay: .1s". */
.reveal-ready .reveal:not(.is-visible) { opacity: 0; transform: translateY(24px); }
.reveal-ready .reveal {
  transition: opacity .8s var(--ease), transform .8s var(--ease);
  transition-delay: var(--delay, 0s);
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
  .reveal-ready .reveal:not(.is-visible) { opacity: 1; transform: none; }
}

/* ---------- Accessibility preferences ---------- */
@media (prefers-reduced-transparency: reduce) {
  .site-header, .site-header.is-scrolled { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lightbox::before { background: #0e0a1a; -webkit-backdrop-filter: none; backdrop-filter: none; }
  body::before { background: rgba(29, 20, 51, .55); }
}
@media (prefers-contrast: more) {
  :root { --muted: #3d3949; --line: #8f88a0; }
  .site-header, .site-header.is-scrolled { background: #fff; -webkit-backdrop-filter: none; backdrop-filter: none; border-bottom: 2px solid var(--ink); }
  .btn { --btn-bd: currentColor; }
  .card, .chip { border-color: var(--ink); }
  .lightbox::before { background: #000; -webkit-backdrop-filter: none; backdrop-filter: none; }
  .lightbox__btn, .lightbox__count { background: #000; border: 2px solid #fff; color: #fff; }
}

/* ---------- Print ---------- */
@media print {
  .topbar, .site-header, .site-footer, .to-top, .lightbox { display: none !important; }
  body { color: #000; }
}
