:root {
  --festival-blue: #12375a;
  --festival-blue-dark: #081d32;
  --festival-cream: #f4ead2;
  --festival-yellow: #ffcc18;
  --festival-orange: #ff5c35;
  --festival-white: #fffdf6;
  --festival-ink: #101820;
  --festival-line: rgba(16, 24, 32, .22);
  --safe-bottom: env(safe-area-inset-bottom, 0px);
  --hero-desktop-position: 45% 18%;
  --hero-mobile-position: 45% 35%;
  color-scheme: light dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--festival-blue-dark);
  color: var(--festival-white);
  font-family: "DM Sans", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.dialog-open { overflow: hidden; }
img { max-width: 100%; }
a { color: inherit; }
button, input, textarea { font: inherit; }
button, a { -webkit-tap-highlight-color: transparent; }
button:focus-visible, a:focus-visible, input:focus-visible, textarea:focus-visible {
  outline: 3px solid var(--festival-yellow);
  outline-offset: 3px;
}
.eyebrow {
  margin: 0;
  color: var(--festival-orange);
  font: 800 .68rem/1.2 "DM Sans", sans-serif;
  letter-spacing: .16em;
  text-transform: uppercase;
}

.event-nav {
  position: relative;
  z-index: 20;
  min-height: 3.75rem;
  display: flex;
  align-items: center;
  gap: .75rem;
  padding: .65rem 1rem;
  background: var(--festival-cream);
  color: var(--festival-ink);
  border-bottom: 3px solid var(--festival-orange);
}
.event-brand {
  color: var(--festival-blue-dark);
  text-decoration: none;
  font: 900 .78rem/1 "DM Sans", sans-serif;
  letter-spacing: .12em;
  white-space: nowrap;
}
.event-brand span { color: var(--festival-orange); }
.event-stamp { display: none; }
.poster-button,
.back-to-show {
  min-height: 2.75rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--festival-ink);
  background: var(--festival-yellow);
  color: var(--festival-ink);
  text-decoration: none;
  font: 800 .7rem/1 "DM Sans", sans-serif;
  letter-spacing: .08em;
  padding: .65rem .8rem;
}
.event-nav .poster-button { margin-left: auto; }
.back-to-show { margin-left: auto; background: transparent; border-color: transparent; padding-inline: .25rem; }

.loading-screen {
  position: fixed;
  z-index: 100;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 1.5rem;
  background: var(--festival-blue);
  transition: opacity .35s ease, visibility .35s ease;
}
.loading-screen.is-complete { opacity: 0; visibility: hidden; }
.loading-poster { width: min(31rem, 100%); text-align: left; }
.loading-poster strong {
  display: block;
  margin: 1rem 0 1.4rem;
  color: var(--festival-yellow);
  font: 900 clamp(3.2rem, 19vw, 6.8rem)/.73 "Barlow Condensed", sans-serif;
  letter-spacing: -.045em;
}
.loading-track { width: 100%; height: .35rem; background: rgba(255,255,255,.2); }
.loading-track i { display: block; width: 0; height: 100%; background: var(--festival-orange); transition: width .2s ease; }
.loading-poster > span:last-of-type { display: block; margin-top: .55rem; font: 700 .7rem/1 monospace; }
.loading-poster a { display: inline-block; margin-top: 1.4rem; font-size: .76rem; }

.slideshow-stage {
  position: relative;
  min-height: calc(100svh - 3.75rem);
  overflow: hidden;
  background: var(--festival-blue);
  isolation: isolate;
}
.hero-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: var(--hero-mobile-position);
  filter: saturate(1.08) contrast(1.04);
  transition: opacity .25s ease, transform .8s ease;
}
.hero-image.is-changing { opacity: .45; transform: scale(1.015); }
.hero-scrim {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(0deg, rgba(8,29,50,.98) 0%, rgba(8,29,50,.87) 35%, rgba(8,29,50,.08) 76%),
    linear-gradient(100deg, rgba(18,55,90,.18), rgba(255,92,53,.08));
}
.poster-marks { position: absolute; inset: 1rem 1rem auto; display: flex; justify-content: space-between; font: 800 .58rem/1 monospace; letter-spacing: .14em; }
.hero-copy { position: absolute; z-index: 2; left: 0; right: 0; bottom: 6.7rem; padding: 1rem; }
.hero-kicker { margin: 0 0 .8rem; color: var(--festival-yellow); font: 800 .62rem/1.3 "DM Sans", sans-serif; letter-spacing: .13em; }
.hero-kicker b { color: var(--festival-white); border-left: 1px solid rgba(255,255,255,.45); margin-left: .6rem; padding-left: .65rem; }
.hero-copy h1 { margin: 0; text-transform: uppercase; font-family: "Barlow Condensed", Impact, sans-serif; letter-spacing: -.04em; }
.hero-copy h1 span { display: block; font-size: clamp(2.6rem, 15vw, 5rem); font-weight: 800; line-height: .72; color: var(--festival-cream); }
.hero-copy h1 strong { display: block; font-size: clamp(4.7rem, 23vw, 8rem); font-weight: 900; line-height: .76; color: var(--festival-yellow); text-shadow: .08em .06em 0 var(--festival-orange); white-space: nowrap; }
.hero-copy h1 small { display: block; margin-top: 1rem; font-size: clamp(1.1rem, 5.6vw, 1.8rem); font-weight: 800; line-height: .95; letter-spacing: .01em; }
.sound-credit { display: inline-block; margin: .7rem 0 0; padding: .35rem .5rem; border: 1px solid rgba(255,204,20,.7); color: var(--festival-yellow); font: 900 .64rem/1 "DM Sans", sans-serif; letter-spacing: .13em; }
.capture-credit { margin: .55rem 0 0; color: rgba(255,255,255,.82); font: 800 .58rem/1.2 "DM Sans", sans-serif; letter-spacing: .16em; }
.hero-deck { display: none; }
.desktop-qr { display: none; }
.slideshow-controls { position: absolute; z-index: 3; left: 1rem; right: 1rem; bottom: 1.15rem; display: flex; align-items: center; gap: .5rem; }
.slideshow-controls button {
  width: 2.8rem;
  height: 2.8rem;
  border: 1px solid rgba(255,255,255,.65);
  background: rgba(8,29,50,.74);
  color: #fff;
  font-weight: 800;
}
.slide-progress { flex: 1; height: 2px; margin-left: .3rem; background: rgba(255,255,255,.28); }
.slide-progress i { display: block; height: 100%; width: 3.33%; background: var(--festival-yellow); transition: width .25s ease; }
.slideshow-controls > span { font: 700 .58rem/1 monospace; white-space: nowrap; }
.feature-strip { display: grid; background: var(--festival-cream); color: var(--festival-ink); }
.feature-strip > div { display: grid; grid-template-columns: 2rem 1fr; gap: .4rem; padding: .9rem 1rem; border-bottom: 1px solid var(--festival-line); }
.feature-strip > div > span { color: var(--festival-orange); font: 900 .7rem/1 "Barlow Condensed", sans-serif; }
.feature-strip p { margin: 0; }
.feature-strip strong, .feature-strip small { display: block; }
.feature-strip strong { font: 800 .72rem/1.2 "DM Sans", sans-serif; letter-spacing: .08em; }
.feature-strip small { margin-top: .25rem; color: rgba(16,24,32,.62); font-size: .65rem; }

.mobile-action-rail {
  position: fixed;
  z-index: 40;
  left: .65rem;
  right: .65rem;
  bottom: calc(.65rem + var(--safe-bottom));
  min-height: 3.25rem;
  display: grid;
  grid-template-columns: 1fr 1fr;
  background: var(--festival-yellow);
  color: var(--festival-ink);
  box-shadow: 0 1rem 3rem rgba(0,0,0,.35);
}
.mobile-action-rail a, .mobile-action-rail button { display: grid; place-items: center; min-height: 3.25rem; border: 0; border-right: 1px solid rgba(16,24,32,.3); background: transparent; color: inherit; text-decoration: none; font: 900 .68rem/1 "DM Sans", sans-serif; letter-spacing: .08em; }
.event-footer { display: flex; flex-direction: column; gap: .55rem; padding: 1.3rem 1rem calc(6rem + var(--safe-bottom)); background: var(--festival-blue-dark); font: 700 .6rem/1.4 "DM Sans", sans-serif; letter-spacing: .08em; }
.event-footer a { color: var(--festival-yellow); }

.poster-dialog {
  width: min(28rem, calc(100% - 2rem));
  max-height: calc(100svh - 2rem);
  border: 3px solid var(--festival-ink);
  border-radius: 0;
  padding: 1.25rem;
  background: var(--festival-cream);
  color: var(--festival-ink);
  box-shadow: .7rem .7rem 0 var(--festival-orange);
}
.poster-dialog::backdrop { background: rgba(8,29,50,.88); backdrop-filter: blur(5px); }
.poster-dialog h2 { margin: .6rem 0; font: 900 3.7rem/.78 "Barlow Condensed", sans-serif; color: var(--festival-blue); }
.poster-dialog img { display: block; width: min(18rem, 100%); margin: 1rem auto; border: .8rem solid white; }
.dialog-close { float: right; width: 2.75rem; height: 2.75rem; border: 2px solid var(--festival-ink); background: transparent; color: inherit; font-size: 1.5rem; }
.copy-gallery-link { width: 100%; min-height: 3rem; border: 2px solid var(--festival-ink); background: var(--festival-yellow); color: var(--festival-ink); font-weight: 900; }
.noscript-note { padding: 1rem; background: var(--festival-yellow); color: var(--festival-ink); }

/* Gallery */
.gallery-page { background: var(--festival-cream); color: var(--festival-ink); padding-bottom: calc(4.4rem + var(--safe-bottom)); }
.gallery-hero { position: relative; min-height: 42rem; background: var(--festival-blue); color: var(--festival-white); overflow: hidden; }
.gallery-hero__photo { position: absolute; inset: 0; background: url('../photos/display/DSC08287.jpg') var(--festival-blue) center/cover no-repeat; background-position: var(--hero-mobile-position); }
.gallery-hero::after { content: ""; position: absolute; inset: 0; background: linear-gradient(0deg, var(--festival-blue) 0%, rgba(18,55,90,.85) 36%, rgba(18,55,90,.02) 72%); }
.gallery-hero__copy { position: absolute; z-index: 2; left: 1rem; right: 1rem; bottom: 2rem; }
.gallery-hero h1 { margin: .9rem 0 1rem; font-family: "Barlow Condensed", sans-serif; letter-spacing: -.04em; text-transform: uppercase; }
.gallery-hero h1 span { display: block; color: var(--festival-cream); font-size: 4rem; line-height: .68; }
.gallery-hero h1 strong { display: block; color: var(--festival-yellow); font-size: 8.4rem; line-height: .74; text-shadow: .07em .055em 0 var(--festival-orange); }
.gallery-hero__copy > p:last-of-type { max-width: 25rem; margin: 0; font: 800 1.05rem/1.1 "Barlow Condensed", sans-serif; text-transform: uppercase; }
.gallery-total { display: flex; align-items: center; gap: .8rem; margin-top: 1.25rem; }
.gallery-total b { color: var(--festival-yellow); font: 900 2.8rem/1 "Barlow Condensed", sans-serif; }
.gallery-total span { font: 800 .58rem/1.25 "DM Sans", sans-serif; letter-spacing: .09em; }

.video-coming { position: relative; display: grid; min-height: 36rem; background: var(--festival-ink); color: var(--festival-white); overflow: hidden; }
.video-coming__image { min-height: 18rem; background: url('../photos/display/DSC07955.jpg') center/cover no-repeat; filter: saturate(1.08) contrast(1.1); }
.video-coming__copy { position: relative; padding: 1.6rem 1rem 2rem; background: var(--festival-blue-dark); }
.video-coming__copy::before { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(-12deg, transparent 0 24px, rgba(255,255,255,.04) 25px 26px); pointer-events: none; }
.video-coming h2 { position: relative; margin: .8rem 0 1rem; color: var(--festival-yellow); font: 900 clamp(4.5rem, 22vw, 8rem)/.72 "Barlow Condensed", sans-serif; letter-spacing: -.045em; text-shadow: .07em .055em 0 var(--festival-orange); }
.video-coming__copy > p:not(.eyebrow) { position: relative; max-width: 25rem; font-size: .85rem; line-height: 1.55; }
.video-coming__copy > span { position: relative; display: inline-block; margin-top: .8rem; padding: .5rem .65rem; border: 1px solid currentColor; font: 800 .6rem/1 "DM Sans", sans-serif; letter-spacing: .1em; }

.gallery-browser { padding: 3rem 0 1rem; }
.gallery-browser__header { padding: 0 1rem; display: flex; align-items: end; justify-content: space-between; gap: 1rem; }
.gallery-browser__header h2, .request-section h2 { margin: .7rem 0 0; color: var(--festival-blue); font: 900 clamp(3.3rem, 15vw, 6rem)/.75 "Barlow Condensed", sans-serif; letter-spacing: -.04em; }
.gallery-browser__header > p { margin: 0; color: var(--festival-orange); font: 800 .55rem/1.2 "DM Sans", sans-serif; text-align: right; letter-spacing: .08em; }
.gallery-filters { display: flex; gap: .45rem; overflow-x: auto; padding: 1.5rem 1rem 1rem; scrollbar-width: none; overscroll-behavior-inline: contain; }
.gallery-filters::-webkit-scrollbar { display: none; }
.gallery-filters button { flex: 0 0 auto; min-height: 2.75rem; border: 2px solid var(--festival-blue); background: transparent; color: var(--festival-blue); padding: .65rem .8rem; font: 800 .66rem/1 "DM Sans", sans-serif; letter-spacing: .05em; }
.gallery-filters button[aria-pressed="true"] { background: var(--festival-blue); color: var(--festival-white); box-shadow: .25rem .25rem 0 var(--festival-orange); }
.gallery-filters span { color: var(--festival-orange); }
.gallery-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .35rem; padding: .35rem; min-height: 20rem; }
.gallery-card { position: relative; margin: 0; background: var(--festival-blue); overflow: hidden; aspect-ratio: 4/5; }
.gallery-card:nth-child(5n+1), .gallery-card:nth-child(7n+3) { aspect-ratio: 1/1; }
.gallery-card[hidden] { display: none; }
.gallery-card button { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; padding: 0; background: transparent; color: white; cursor: zoom-in; }
.gallery-card img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s ease, opacity .25s ease; }
.gallery-card img[data-error="true"] { opacity: .15; }
.gallery-card button::after { content: attr(data-filename); position: absolute; left: .4rem; bottom: .4rem; padding: .3rem .4rem; background: rgba(8,29,50,.82); font: 700 .52rem/1 monospace; letter-spacing: .04em; opacity: 0; transition: opacity .2s ease; }
.gallery-card button:focus-visible::after, .gallery-card button:hover::after { opacity: 1; }
.gallery-card button:hover img { transform: scale(1.025); }

.request-section { display: grid; gap: 2rem; padding: 4rem 1rem; background: var(--festival-yellow); color: var(--festival-ink); border-top: .6rem solid var(--festival-orange); }
.request-section .eyebrow { color: var(--festival-blue); }
.request-section__intro > p:not(.eyebrow) { max-width: 35rem; font-size: .86rem; line-height: 1.65; }
.request-form { display: grid; gap: 1rem; }
.request-form label { display: grid; gap: .4rem; font: 800 .65rem/1.2 "DM Sans", sans-serif; letter-spacing: .08em; }
.request-form input, .request-form textarea { width: 100%; border: 2px solid var(--festival-ink); border-radius: 0; background: var(--festival-white); color: var(--festival-ink); padding: .8rem; font: 500 1rem/1.4 "DM Sans", sans-serif; }
.request-form textarea { resize: vertical; }
.check-label { grid-template-columns: 1.5rem 1fr !important; align-items: start; }
.check-label input { width: 1.35rem; height: 1.35rem; margin: 0; }
.request-submit { min-height: 3.25rem; border: 2px solid var(--festival-ink); background: var(--festival-blue); color: var(--festival-white); font-weight: 900; letter-spacing: .08em; box-shadow: .35rem .35rem 0 var(--festival-orange); }
.request-form > p { margin: .3rem 0 0; font-size: .7rem; line-height: 1.5; }
.event-footer--gallery { padding-bottom: calc(6rem + var(--safe-bottom)); }

.lightbox { position: fixed; z-index: 80; inset: 0; display: none; background: rgba(8,29,50,.96); color: white; }
.lightbox.is-open { display: grid; grid-template-columns: 3rem minmax(0,1fr) 3rem; align-items: center; }
.lightbox figure { margin: 0; min-width: 0; max-height: 100svh; display: grid; grid-template-rows: minmax(0,1fr) auto; }
.lightbox figure > img { width: 100%; height: min(72svh, 58rem); object-fit: contain; }
.lightbox figcaption { display: grid; gap: .45rem; padding: .7rem .25rem; font: 700 .6rem/1 monospace; }
.lightbox-actions { display: flex; gap: .4rem; overflow-x: auto; }
.lightbox-actions button, .lightbox-actions a { flex: 0 0 auto; min-height: 2.75rem; display: inline-flex; align-items: center; border: 1px solid white; background: transparent; color: white; padding: .6rem .7rem; text-decoration: none; font: 800 .62rem/1 "DM Sans", sans-serif; }
.lightbox-close, .lightbox-arrow { min-width: 2.75rem; min-height: 2.75rem; border: 1px solid rgba(255,255,255,.5); background: rgba(8,29,50,.8); color: white; }
.lightbox-close { position: absolute; z-index: 2; top: .65rem; right: .65rem; font-size: 1.6rem; }
.mobile-action-rail--gallery { grid-template-columns: repeat(4, 1fr); }
.gallery-toast { position: fixed; z-index: 120; left: 50%; bottom: calc(5rem + var(--safe-bottom)); transform: translate(-50%, 1rem); opacity: 0; pointer-events: none; background: var(--festival-blue-dark); color: white; padding: .75rem 1rem; font-size: .72rem; transition: .2s ease; }
.gallery-toast.is-visible { opacity: 1; transform: translate(-50%, 0); }

@media (min-width: 760px) {
  .event-nav { min-height: 4.5rem; padding: .75rem 1.75rem; }
  .event-stamp { display: block; margin-left: auto; font: 800 .6rem/1 monospace; letter-spacing: .12em; }
  .event-nav .poster-button { margin-left: 0; }
  .slideshow-stage { min-height: calc(100svh - 4.5rem); }
  .hero-image { object-position: var(--hero-desktop-position); }
  .hero-scrim { background: linear-gradient(270deg, var(--festival-blue-dark) 0%, rgba(8,29,50,.97) 32%, rgba(8,29,50,.22) 72%, rgba(255,92,53,.08)); }
  .hero-copy { width: min(52rem, 52%); left: auto; right: 1.2rem; bottom: 5.8rem; padding: 2rem; }
  .hero-copy h1 span { font-size: clamp(4rem, 7vw, 7rem); }
  .hero-copy h1 strong { font-size: clamp(7rem, 12vw, 12rem); }
  .hero-copy h1 small { font-size: clamp(1.8rem, 3vw, 3rem); }
  .hero-deck { display: block; max-width: 28rem; color: rgba(255,255,255,.7); }
  .poster-marks { inset: 1.5rem 2rem auto; }
  .desktop-qr { position: absolute; z-index: 4; right: 1.4rem; bottom: 1.4rem; display: flex; gap: .75rem; align-items: center; padding: .7rem; border: 1px solid rgba(255,255,255,.5); background: rgba(8,29,50,.88); }
  .desktop-qr img { width: 4.6rem; height: 4.6rem; background: white; }
  .desktop-qr p { margin: 0; }
  .desktop-qr strong, .desktop-qr span { display: block; }
  .desktop-qr strong { font: 900 .68rem/1.1 "DM Sans", sans-serif; }
  .desktop-qr span { margin-top: .25rem; font-size: .58rem; color: rgba(255,255,255,.65); }
  .slideshow-controls { right: auto; width: 31rem; left: 3.2rem; }
  .feature-strip { grid-template-columns: repeat(3, 1fr); }
  .feature-strip > div { border-right: 1px solid var(--festival-line); border-bottom: 0; padding: 1rem 2rem; }
  .mobile-action-rail { display: none; }
  .event-footer { flex-direction: row; justify-content: space-between; padding: 1.2rem 2rem; }

  .gallery-page { padding-bottom: 0; }
  .gallery-hero { min-height: 38rem; }
  .gallery-hero__photo { inset: 0 0 0 38%; background-position: var(--hero-desktop-position); }
  .gallery-hero::after { background: linear-gradient(90deg, var(--festival-blue) 0%, var(--festival-blue) 34%, rgba(18,55,90,.7) 58%, rgba(18,55,90,.05)); }
  .gallery-hero__copy { left: 3rem; right: auto; bottom: 3rem; width: 60%; }
  .gallery-hero h1 span { font-size: 6rem; }
  .gallery-hero h1 strong { font-size: 12rem; }
  .video-coming { grid-template-columns: 1.1fr .9fr; min-height: 34rem; }
  .video-coming__image { min-height: 34rem; }
  .video-coming__copy { display: flex; flex-direction: column; justify-content: center; padding: 3rem; }
  .gallery-browser { padding-top: 5rem; }
  .gallery-browser__header { padding-inline: 2rem; }
  .gallery-filters { padding-inline: 2rem; }
  .gallery-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .5rem; padding: .5rem; }
  .request-section { grid-template-columns: .9fr 1.1fr; padding: 5rem 3rem; }
  .lightbox.is-open { grid-template-columns: 5rem minmax(0,1fr) 5rem; }
  .lightbox figure > img { height: 82svh; }
  .event-footer--gallery { padding-bottom: 1.2rem; }
}

@media (min-width: 1180px) {
  .gallery-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .gallery-browser__header { padding-inline: 3rem; }
  .gallery-filters { padding-inline: 3rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
