:root {
  --route-highlight: #ffe600;
  color-scheme: dark;
  font-family: "Helvetica Neue", sans-serif;
  color: #fff;
  background: #000;
  -webkit-font-smoothing: antialiased;
}

* { box-sizing: border-box; }
body { margin: 0; }
button, input, select, textarea { font-family: inherit; }

.festival-background, .festival-film, .festival-shade { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.festival-background { z-index: 0; background: #000; }
.festival-film { object-fit: cover; opacity: 1; }
.directory-rain { position: fixed; inset: 0; width: 100%; height: 100%; opacity: .5; pointer-events: none; }
.festival-shade { background: linear-gradient(180deg, rgba(0, 0, 0, .52) 0%, rgba(0, 0, 0, .24) 35%, rgba(0, 0, 0, .24) 65%, rgba(0, 0, 0, .50) 100%); }

.directory {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100svh;
  padding: 32px clamp(24px, 3.2vw, 64px) 36px;
}

h1 {
  margin: 0;
  text-align: center;
  font-size: clamp(16px, 1.45vw, 23px);
  font-weight: 400;
  line-height: 1.5;
  text-wrap: balance;
}

.route-map {
  position: relative;
  flex: 1;
  min-height: 560px;
  margin-top: 12px;
}

.routes {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
  pointer-events: none;
}

.routes path { fill: none; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.rail-line { stroke: rgba(255, 255, 255, .48); stroke-width: 3.5; }
.rail-flow { stroke: url(#route-light); stroke-width: 4.5; stroke-dasharray: .22 2; }
.rail-reveal { stroke: #fff; stroke-width: 15; stroke-dasharray: 1; stroke-dashoffset: var(--rail-offset, 0); }

/* Reuse the landing page's asset, native alpha and exact responsive widths. */
.directory-flower {
  position: absolute;
  z-index: 1;
  top: 50%;
  left: 50%;
  width: 94px;
  height: auto;
  transform: translate(-50%, -50%);
  animation: directory-flower-spin 3s linear infinite;
  pointer-events: none;
}

.destination {
  position: absolute;
  z-index: 2;
  display: block;
  width: 24%;
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
  outline-offset: 10px;
  border-radius: 2px;
}

.destination--watch, .destination--events { top: 12%; }
.destination--festivals, .destination--research { top: 79%; }
.destination--watch, .destination--festivals { left: 0; }
.destination--events, .destination--research { right: 0; }
.destination--watch, .destination--festivals { width: 24%; }
.destination--watch, .destination--festivals { text-align: right; }
.destination--watch .destination-description, .destination--festivals .destination-description { margin-left: auto; }
.destination[aria-disabled="true"] { cursor: default; }
.destination:focus-visible { outline: 1px solid #fff; }
.destination-copy { display: block; }
.destination-title {
  display: flex;
  align-items: center;
  gap: clamp(8px, .7vw, 12px);
  font-size: clamp(18px, 1.9vw, 30px);
  font-weight: 500;
  line-height: 1.2;
  transition: color 180ms ease;
}
.destination-description {
  display: block;
  max-width: 31ch;
  margin-top: 8px;
  font-size: 14px;
  font-weight: 400;
  line-height: 1.5;
  text-wrap: pretty;
}
.station {
  position: absolute;
  top: 4px;
  width: 20px;
  height: 20px;
  border: 2px solid #fff;
  border-radius: 50%;
  background: #000;
  transition: background-color 180ms ease, border-color 180ms ease;
}
.destination--watch .station, .destination--festivals .station { right: -34px; }
.destination--events .station, .destination--research .station { left: -34px; }
.destination[href]:hover .station,
.destination[href]:focus-visible .station { background: var(--route-highlight); border-color: var(--route-highlight); }
.destination[href]:hover .destination-title,
.destination[href]:focus-visible .destination-title { color: var(--route-highlight); }

.directory-control {
  position: fixed;
  z-index: 3;
  bottom: max(8px, env(safe-area-inset-bottom));
  display: grid;
  place-items: center;
  width: 40px;
  height: 40px;
  padding: 10px;
  border: 0;
  background: transparent;
  color: #fff;
  opacity: .7;
  cursor: pointer;
}
.directory-control[hidden] { display: none; }
.ambient-toggle { right: max(52px, calc(env(safe-area-inset-right) + 44px)); }
.fullscreen-toggle { right: max(8px, env(safe-area-inset-right)); }
.directory-control svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.5; }
.directory-control:hover, .directory-control:focus-visible { color: var(--route-highlight); opacity: 1; }
.directory-control:focus-visible { outline: 1px solid currentColor; outline-offset: -3px; }
.play-symbol { display: none; }
.ambient-toggle[data-paused="true"] .pause-symbol { display: none; }
.ambient-toggle[data-paused="true"] .play-symbol { display: block; }

/* Slow language fades and destination arrivals share the motion control. */
h1 { position: relative; display: grid; align-items: start; min-height: 2.2em; font-weight: 300; }
.intro-language { grid-area: 1 / 1; opacity: 0; }
.intro-language:first-child { opacity: 1; }
html[data-story="preparing"] .intro-language { opacity: 0; }
html[data-story] .destination-title { opacity: 0; transform: translateY(8px); }
html[data-story] .station { opacity: 0; transform: scale(.7); }
html[data-story] .destination-description { opacity: 0; transform: translateY(5px); }
.destination-title { transition: color 180ms ease, opacity 1000ms ease, transform 1400ms cubic-bezier(.22, 1, .36, 1); }
.destination-description { transition: opacity 1400ms ease, transform 1400ms cubic-bezier(.22, 1, .36, 1); }
.station { transition: background-color 180ms ease, border-color 180ms ease, opacity 900ms ease, transform 1400ms cubic-bezier(.22, 1, .36, 1); }
.destination--watch .destination-title, .destination--festivals .destination-title { justify-content: flex-end; }
.destination-label { min-width: 0; }
.property-flower { flex: none; width: 1em; height: 1em; object-fit: contain; animation: property-flower-spin 3s linear infinite; }
@keyframes directory-flower-spin { to { transform: translate(-50%, -50%) rotate(360deg); } }
@keyframes property-flower-spin { to { transform: rotate(360deg); } }
html[data-motion="paused"] .directory-flower, html[data-motion="paused"] .property-flower { animation-play-state: paused; }
html[data-story] .destination.is-revealed .destination-title,
html[data-story] .destination.is-revealed .station { opacity: 1; transform: none; }
html[data-story="descriptions"] .destination-description,
html[data-story="complete"] .destination-description { opacity: 1; transform: none; }
html[data-story="complete"] .destination-title,
html[data-story="complete"] .station { opacity: 1; transform: none; }
html[data-story="preparing"] .rail-reveal { --rail-offset: 1; }
html[data-story]:not([data-story="complete"]) .destination:not(.is-revealed) { pointer-events: none; }

@media (max-width: 760px) {
  .directory { padding: 24px 24px 36px; }
  h1 { max-width: 38ch; margin: 0 auto; font-size: 16px; }
  .route-map { min-height: 640px; margin-top: 16px; }
  .destination { width: 44%; }
  .destination--watch, .destination--festivals { text-align: left; }
  .destination--watch .destination-title, .destination--festivals .destination-title { justify-content: flex-start; }
  .destination-title { gap: 7px; }
  .destination--watch, .destination--events { top: 5%; }
  .destination--festivals, .destination--research { top: 77%; }
  .destination-title { font-size: clamp(18px, 3.7vw, 24px); }
  .destination-description { display: none; }
  .route-map { min-height: 480px; }
  .destination .station { left: calc(50% - 9px); right: auto; width: 18px; height: 18px; }
  .destination--watch .station, .destination--events .station { top: auto; bottom: -30px; }
  .destination--festivals .station, .destination--research .station { top: -30px; }
}

@media (max-width: 520px) {
  .directory-flower { width: 82px; }
}

@media (max-width: 359px) {
  .directory { padding-inline: 18px; }
  h1 { font-size: 15px; }
}

@media (prefers-reduced-motion: reduce) {
  .routes path, .station, .destination-title, .destination-description, .festival-film, h1 { transition: none; }
  html[data-story] h1, html[data-story] .destination-title, html[data-story] .destination-description, html[data-story] .station { opacity: 1; transform: none; }
  .directory-flower, .property-flower { animation: none; }
  .rail-flow { display: none; }
}

/* The parent keeps the player started by Enter; this frame supplies the overlays. */
:root.has-entry-film, .has-entry-film body, .has-entry-film .festival-background { background: transparent; }
.has-entry-film .festival-film { display: none; }
