:root {
  --paper: #eee9df;
  --ink: #121212;
  --red: #d7261e;
  --yellow: #f2b90f;
  --blue: #1f3fbf;
  --body-font: 'Golos Text', system-ui, sans-serif;
  --heading-font: 'Oswald', 'Arial Narrow', sans-serif;
  --radius-card: clamp(1.25rem, 2vw, 1.875rem);
  --radius-inner: .95rem;
  --radius-field: .75rem;
  --radius-pill: 999px;
  --surface-line: rgb(18 18 18 / 18%);
  --surface-border: rgb(18 18 18 / 58%);
  --surface-shadow: 0 10px 28px rgb(18 18 18 / 8%);
}

*, *::before, *::after { box-sizing: border-box; }
html { background: var(--paper); color: var(--ink); scroll-padding-top: 76px; }
body { margin: 0; font-family: var(--body-font); -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, textarea, select { font: inherit; }
:focus-visible { outline: 3px solid var(--blue); outline-offset: 4px; }
::selection { background: var(--red); color: var(--paper); }

.festival-page a { text-decoration: none; }
.festival-page a[href^="./application/"] { -webkit-tap-highlight-color: transparent; }
.festival-page a:hover { text-decoration: underline; text-underline-offset: .18em; }
.festival-brand { display: block; flex-shrink: 0; pointer-events: auto; }
.festival-brand img { display: block; width: 70px; height: auto; }
.desktop-nav {
  display: flex;
  padding: .2rem;
  border-radius: var(--radius-pill);
}
.desktop-nav a,
.festival-button,
.festival-chip,
#poster button {
  border-radius: var(--radius-pill);
}

.festival-page [data-card],
.directions-overview {
  border-radius: var(--radius-card);
  box-shadow: var(--surface-shadow);
}

.festival-page [data-card] { border: 1.5px solid var(--surface-border); }
.direction-kicker {
  border-radius: calc(var(--radius-card) - 2px) calc(var(--radius-card) - 2px) 0 0;
}
.direction-logo, #poster canvas { border-radius: var(--radius-inner); }
.direction-tag { border: 1px solid var(--surface-border); }
#poster :is(input, select) { border-radius: var(--radius-field); }
.festival-footer { border-radius: var(--radius-card) var(--radius-card) 0 0; }
.scene-progress div { border-radius: var(--radius-pill); }

.fixed-lines {
  container-type: inline-size;
  inline-size: 100%;
  margin: 0;
  font: 700 var(--title-max)/1.16 var(--heading-font);
  text-transform: uppercase;
}
.fixed-lines > span {
  display: block;
  white-space: nowrap;
  font-size: min(var(--title-max), var(--title-scale));
}
.hero-title { --title-max: 3.25rem; --title-scale: 11.55cqi; }
.hero-title > span:last-child { color: var(--red); }
.about-title { --title-max: 4.65rem; --title-scale: 13.05cqi; }
.age-title { --title-max: 3.75rem; --title-scale: 10.85cqi; }
.directions-title { --title-max: 7.5rem; --title-scale: 15.35cqi; }
.participants-title { --title-max: 4.65rem; --title-scale: 14.45cqi; }
.parks-title { --title-max: 4.65rem; --title-scale: 16.5cqi; }

.festival-callout {
  padding: .7rem .9rem;
  border-inline-start: .3rem solid var(--yellow);
  border-radius: var(--radius-field);
  background: rgb(242 185 15 / 15%);
  font: 600 1.15rem/1.3 var(--heading-font);
  text-transform: uppercase;
}

.age-grid,
.program-steps {
  display: grid;
  gap: .5rem;
}
.age-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.age-tile,
.program-steps > li,
.festival-list {
  border: 1px solid var(--surface-line);
  border-radius: var(--radius-inner);
  background: rgb(255 253 247 / 40%);
}
.age-tile {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: .5rem .6rem;
  overflow-wrap: anywhere;
}
.festival-list { padding: 0 .85rem; }
.festival-list > :last-child { border-block-end: 0 !important; }
.program-steps {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  padding: 0;
  margin: 0;
  list-style: none;
}
.program-steps > li {
  display: grid;
  grid-template-columns: .75rem minmax(0, 1fr);
  gap: .65rem;
  padding: .65rem .7rem;
}
.program-marker {
  width: .75rem;
  height: .75rem;
  margin-top: .3rem;
  border-radius: .25rem;
}
.mobile-nav { display: none; }
.festival-page .apply-live { text-decoration: underline; text-underline-offset: .18em; }
.no-script { padding: 1rem; }
.scene-background { background: var(--paper); }
.scene-background::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 74% 30%, var(--red) 0 11vmin, transparent 11.15vmin),
    linear-gradient(-26deg, transparent 49.5%, var(--ink) 49.6% 50.3%, transparent 50.4%);
  opacity: .85;
}
.scene-background canvas { display: block; position: relative; }
.scene-background:not(.scene-ready) canvas { visibility: hidden; }
.scene-ready::before { display: none; }
.scene-background:not(.scene-ready) ~ .scene-progress { display: none; }
.festival-page #apply > div { min-height: 100svh; }

@media (max-width: 1150px) {
  .desktop-nav { display: none; }
  .mobile-nav {
    display: block;
    position: relative;
    margin-inline-start: auto;
    pointer-events: auto;
  }
  .mobile-nav summary {
    cursor: pointer;
    list-style: none;
    padding: 9px 11px;
    border: 0;
    border-radius: var(--radius-pill);
    background: var(--paper);
    font: 600 .875rem var(--body-font);
  }
  .mobile-nav summary::-webkit-details-marker { display: none; }
  .mobile-nav nav {
    width: min(16rem, 75vw);
    position: absolute;
    inset-inline-end: 0;
    top: calc(100% + 6px);
    display: grid;
    max-height: calc(100dvh - 6rem);
    overflow-y: auto;
    padding: .4rem;
    background: var(--paper);
    border-radius: var(--radius-inner);
    box-shadow: 0 8px 20px #12121224;
  }
  .mobile-nav nav a { padding: .6rem .65rem; border-radius: var(--radius-field); }
}

@media (max-width: 700px) {
  .festival-page .festival-header { gap: 6px !important; padding: 10px 12px !important; }
  .festival-brand img { width: 53px; }
  .mobile-nav { position: static; }
  .mobile-nav nav { width: auto; inset-inline: 12px; }
  .festival-page .festival-header > div > a { font-size: 13px !important; padding-inline: 9px !important; }
  .festival-page .scene-progress { display: none !important; }
  .festival-page main > section { padding-inline: 14px !important; }
  .festival-page main > section[data-k] { min-height: min(122svh, 950px) !important; }
  .festival-page #top .hero-layout { padding-top: 82px !important; }
  .festival-page #directions > div { padding-inline: 16px !important; transform: none !important; }
  .festival-page .direction-screen h3 { font-size: clamp(2.125rem, 10vw, 3.25rem) !important; }
  .festival-page #participants [data-card],
  .festival-page #program [data-card] { overflow-wrap: anywhere; }
  .program-steps { grid-template-columns: 1fr; }
  .festival-page #poster { padding-block: 84px 40px !important; }
  .festival-page #poster > div { padding-inline: 16px !important; }
  .festival-page #apply { height: 170svh !important; }
  .festival-page #apply > div { height: auto !important; }
  .festival-page #apply [data-card] { padding: 20px !important; }
}

@media (max-width: 360px) {
  .age-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (prefers-reduced-motion: reduce) {
  .festival-page main > section[data-k]:not(#top) { min-height: auto !important; height: auto !important; padding-block: 84px 36px !important; }
  .festival-page #apply > div { min-height: 0; height: auto !important; position: static !important; }
  .festival-page #top { min-height: 100svh !important; }
}
