*,
*::before,
*::after {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

:root {
  --bg: #000000;
  --fg: rgba(155, 205, 140, 0.92);
  --fg-dim: rgba(120, 165, 110, 0.55);
  --fg-bright: rgba(190, 235, 170, 0.98);
  --accent: rgba(130, 200, 115, 0.75);
  --panel: rgba(0, 0, 0, 0.55);
  --panel-border: rgba(150, 200, 135, 0.12);
  --font-display: 'Cormorant Garamond', 'Georgia', serif;
  --font-body: 'Outfit', system-ui, sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;
  --nav-height: 3.5rem;
  --content-max: 42rem;
  --section-gap: clamp(5rem, 12vh, 9rem);
}

html {
  font-size: 16px;
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
}

body {
  position: relative;
  font-family: var(--font-body);
  font-weight: 300;
  line-height: 1.7;
  color: var(--fg);
  background: var(--bg);
  overflow-x: hidden;
  overflow-x: clip;
  max-width: 100%;
  width: 100%;
  overscroll-behavior-x: none;
  touch-action: pan-y;
  -webkit-font-smoothing: antialiased;
}

#flashlight {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 150;
  --mx: -500px;
  --my: -500px;
  --beam-x: -500px;
  --beam-y: -500px;
  --char-mx: -500px;
  --char-my: -500px;
  --char-beam-x: -500px;
  --char-beam-y: -500px;
}

.flashlight-glow {
  position: absolute;
  inset: 0;
  mix-blend-mode: soft-light;
}

.flashlight-glow--cursor {
  background:
    radial-gradient(
      circle 95px at var(--mx) var(--my),
      rgba(180, 255, 150, 0.26) 0%,
      rgba(140, 220, 120, 0.11) 40%,
      transparent 74%
    ),
    radial-gradient(
      ellipse 280px 220px at var(--beam-x) var(--beam-y),
      rgba(150, 240, 130, 0.14) 0%,
      rgba(120, 200, 100, 0.055) 45%,
      transparent 76%
    );
}

.flashlight-glow--character {
  opacity: 0;
  background:
    radial-gradient(
      ellipse 580px 320px at var(--char-beam-x) var(--char-beam-y),
      rgba(170, 250, 150, 0.2) 0%,
      rgba(140, 220, 120, 0.08) 46%,
      transparent 78%
    );
  transition: opacity 0.15s ease;
}

body.has-character-lamp .flashlight-glow--character {
  opacity: 1;
}

.flashlight-cursor {
  position: absolute;
  left: var(--cursor-x, var(--mx));
  top: var(--cursor-y, var(--my));
  font-size: 1.35rem;
  line-height: 1;
  transform: translate(-10%, -60%) rotate(90deg) scaleY(-1);
  transform-origin: 20% 75%;
  filter: grayscale(1) brightness(1.5) drop-shadow(0 0 6px rgba(170, 255, 150, 0.45));
  user-select: none;
}

body.cursor-lamp-off .flashlight-glow--cursor {
  opacity: 0;
}

body.cursor-lamp-off .flashlight-cursor {
  filter: grayscale(1) brightness(1.15) drop-shadow(0 0 2px rgba(170, 255, 150, 0.2));
  opacity: 0.85;
}

@media (hover: none) {
  body,
  body * {
    cursor: auto;
  }

  #flashlight {
    display: none;
  }
}

@media (hover: hover) {
  body:not(.is-gated),
  body:not(.is-gated) * {
    cursor: none;
  }

  body.is-gated,
  body.is-gated * {
    cursor: auto;
  }

  body.is-gated .gate-submit {
    cursor: pointer;
  }
}

#shader-canvas {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

/* Password gate — shader trees stay the visual backbone */
.gate {
  position: fixed;
  inset: 0;
  z-index: 400;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding: 2rem 1.5rem;
  padding-bottom: max(6.5rem, 16vh);
  pointer-events: auto;
}

.gate-veil {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, transparent 0%, transparent 55%, rgba(0, 0, 0, 0.45) 78%, rgba(0, 0, 0, 0.7) 100%);
  pointer-events: none;
}

.gate-inner {
  position: relative;
  z-index: 1;
  width: min(28rem, 100%);
  text-align: center;
  animation: gate-rise 0.9s ease-out both;
}

.gate-form {
  display: flex;
  flex-direction: column;
  align-items: stretch;
  gap: 0.65rem;
  max-width: 18rem;
  margin: 0 auto;
}

.gate-label {
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(180, 220, 160, 0.55);
  text-align: left;
}

.gate-input {
  width: 100%;
  padding: 0.85rem 1rem;
  border: 1px solid rgba(160, 210, 140, 0.28);
  border-radius: 0;
  background: rgba(0, 0, 0, 0.55);
  color: var(--fg-bright);
  font-family: var(--font-mono);
  font-size: 0.95rem;
  letter-spacing: 0.08em;
  outline: none;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.gate-input:focus {
  border-color: rgba(180, 230, 150, 0.65);
  background: rgba(0, 0, 0, 0.72);
}

.gate-input.is-invalid {
  border-color: rgba(210, 120, 100, 0.7);
}

.gate-submit {
  margin-top: 0.55rem;
  padding: 0.85rem 1.2rem;
  border: 1px solid rgba(170, 220, 145, 0.45);
  background: rgba(20, 40, 18, 0.55);
  color: rgba(210, 245, 190, 0.95);
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.gate-submit:hover,
.gate-submit:focus-visible {
  background: rgba(40, 70, 35, 0.7);
  border-color: rgba(190, 240, 160, 0.75);
  color: #fff;
}

.gate-error {
  margin: 0.35rem 0 0;
  font-family: var(--font-mono);
  font-size: 0.68rem;
  letter-spacing: 0.06em;
  color: rgba(220, 150, 130, 0.9);
  text-align: left;
}

html.is-gated,
body.is-gated {
  overflow: hidden;
  overscroll-behavior: none;
  height: 100%;
}

body.is-gated {
  position: fixed;
  inset: 0;
  width: 100%;
  touch-action: none;
}

body.is-gated .site-nav,
body.is-gated .page,
body.is-gated .music-player,
body.is-gated #flashlight,
body.is-gated #wildlife,
body.is-gated .campfire,
body.is-gated .player-avatar,
body.is-gated .player-friend {
  visibility: hidden !important;
  pointer-events: none !important;
}

body.is-gated #flashlight,
body.is-gated .site-nav,
body.is-gated .music-player {
  display: none !important;
}

body:not(.is-gated) .gate {
  display: none;
}

@keyframes gate-rise {
  from {
    opacity: 0;
    transform: translateY(14px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.gate.is-shake .gate-inner {
  animation: gate-shake 0.4s ease;
}

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  25% { transform: translateX(-6px); }
  50% { transform: translateX(6px); }
  75% { transform: translateX(-4px); }
}

@media (max-width: 960px) {
  .gate {
    align-items: center;
    justify-content: center;
    padding: 0 1.5rem;
    padding-top: 50vh;
    box-sizing: border-box;
  }

  .gate-veil {
    background:
      linear-gradient(180deg, transparent 0%, transparent 45%, rgba(0, 0, 0, 0.35) 70%, rgba(0, 0, 0, 0.65) 100%);
  }
}

.site-nav {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1rem 2rem;
  background: rgba(0, 0, 0, 0.72);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--panel-border);
  box-sizing: border-box;
  min-height: var(--nav-height);
  transform: translate3d(0, var(--ios-toolbar-shift, 0px), 0);
  will-change: transform;
  /* Paint the area above the bar solid so iOS overscroll / address-bar
     transitions can never reveal page content above the menu. */
  box-shadow: 0 -120px 0 120px #000;
}

.nav-brand {
  font-family: var(--font-display);
  font-size: 1.1rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--fg-bright);
  text-decoration: none;
}

.nav-links {
  display: flex;
  gap: 1.75rem;
  list-style: none;
}

.nav-links a {
  font-family: var(--font-mono);
  font-size: 0.65rem;
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
  position: relative;
}

.nav-links a::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 1px;
  background: var(--fg-bright);
}

.nav-links a:hover,
.nav-links a.active {
  color: var(--fg-bright);
}

.nav-links a.active::after {
  width: 100%;
}

.page {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 100%;
  overflow-x: hidden;
  overflow-x: clip;
}

/* Wildlife — revealed by flashlight proximity;
   above panels so perched animals can sit on text boxes */
#wildlife {
  position: absolute;
  inset: 0;
  z-index: 5;
  pointer-events: none;
  overflow: visible;
}

.critter {
  position: absolute;
  left: var(--cx);
  top: var(--cy);
  width: var(--cw);
  line-height: 0;
  opacity: 0;
  color: rgba(190, 235, 170, 0.94);
  filter: drop-shadow(0 0 5px rgba(150, 230, 130, 0.22));
  transform: translateZ(0);
  z-index: 1;
  will-change: opacity;
  transition: opacity 0.08s linear;
}

.critter--on-panel {
  z-index: 6;
  filter: drop-shadow(0 0 6px rgba(150, 230, 130, 0.28));
}

.critter svg {
  width: 100%;
  height: auto;
  display: block;
}

.critter--flying-bat {
  overflow: visible;
  z-index: 4;
}

.critter--flying-bat svg {
  overflow: visible;
}

/* Guide bird — above the dancefloor on the left; scrolls with the crowd */
.critter--guide-bird {
  z-index: 8;
  overflow: visible;
}

.critter--guide-bird svg {
  overflow: visible;
}

.critter--guide-bird .guide-bird-body {
  transform-origin: 58px 108px;
  animation: guide-bird-hover 2.4s ease-in-out infinite;
}

.critter--guide-bird .guide-wing {
  transform-origin: 52px 105px;
  animation: guide-wing-flap 0.42s ease-in-out infinite;
}

.critter--guide-bird .guide-bubble {
  opacity: 0;
  transition: opacity 0.28s ease;
  transform-origin: 98px 100px;
}

.critter--guide-bird.is-speaking .guide-bubble {
  opacity: 1;
  animation: guide-bubble-pop 0.35s ease-out;
}

@keyframes guide-bird-hover {
  0%, 100% { transform: translate(0, 0) rotate(-2deg); }
  50% { transform: translate(4px, -5px) rotate(3deg); }
}

@keyframes guide-wing-flap {
  0%, 100% { transform: rotate(0deg); }
  50% { transform: rotate(-28deg); }
}

@keyframes guide-bubble-pop {
  from { opacity: 0; transform: scale(0.85) translateY(4px); }
  to { opacity: 1; transform: scale(1) translateY(0); }
}

/* Bat family — hangs from a panel, flees from flashlight */
.bat-family {
  position: absolute;
  z-index: 7;
  width: 7.5rem;
  opacity: 0;
  color: rgba(190, 235, 170, 0.94);
  filter: drop-shadow(0 0 5px rgba(150, 230, 130, 0.22));
  pointer-events: none;
  line-height: 0;
  --bat-x: 0px;
  --bat-y: 0px;
  left: var(--bat-x);
  top: var(--bat-y);
  will-change: opacity;
  transition: opacity 0.08s linear;
}

.bat-family svg {
  width: 100%;
  height: auto;
  display: block;
  overflow: visible;
}

.bat-family .bat {
  transform-origin: 50% 6%;
  animation: bat-sway 2.8s ease-in-out infinite;
}

.bat-family svg > g:nth-of-type(1) .bat {
  animation-duration: 2.8s;
}

.bat-family svg > g:nth-of-type(2) .bat {
  animation-duration: 3.2s;
  animation-delay: -0.6s;
}

.bat-family svg > g:nth-of-type(3) .bat {
  animation-duration: 2.5s;
  animation-delay: -1.2s;
}

.bat-family svg > g:nth-of-type(4) .bat {
  animation-duration: 3.4s;
  animation-delay: -0.3s;
}

@keyframes bat-sway {
  0%, 100% { transform: rotate(-6deg); }
  50% { transform: rotate(7deg); }
}

/* Every bat flees — slow scatter across the screen (~10s dissolve) */
.bat-family.is-fleeing {
  position: fixed;
  z-index: 140;
  opacity: 1 !important;
  transition: none;
  overflow: visible;
}

.bat-family.is-fleeing .bat {
  animation: bat-fly-1 10s ease-out forwards !important;
}

.bat-family.is-fleeing svg > g:nth-of-type(2) .bat {
  animation: bat-fly-2 10s ease-out 0.5s forwards !important;
}

.bat-family.is-fleeing svg > g:nth-of-type(3) .bat {
  animation: bat-fly-3 10s ease-out 1s forwards !important;
}

.bat-family.is-fleeing svg > g:nth-of-type(4) .bat {
  animation: bat-fly-4 10s ease-out 1.4s forwards !important;
}

@keyframes bat-fly-1 {
  0% { transform: rotate(-6deg) translate(0, 0) scale(1); opacity: 1; }
  12% { transform: rotate(-18deg) translate(-6vw, -10vh) scale(1.05); opacity: 1; }
  40% { transform: rotate(8deg) translate(-22vw, -28vh) scale(1); opacity: 1; }
  70% { transform: rotate(-28deg) translate(-38vw, -48vh) scale(0.8); opacity: 0.55; }
  100% { transform: rotate(-45deg) translate(-52vw, -72vh) scale(0.45); opacity: 0; }
}

@keyframes bat-fly-2 {
  0% { transform: rotate(4deg) translate(0, 0) scale(1); opacity: 1; }
  15% { transform: rotate(22deg) translate(8vw, -14vh) scale(1.08); opacity: 1; }
  42% { transform: rotate(-5deg) translate(28vw, -32vh) scale(0.98); opacity: 1; }
  72% { transform: rotate(30deg) translate(48vw, -20vh) scale(0.75); opacity: 0.5; }
  100% { transform: rotate(50deg) translate(70vw, -8vh) scale(0.4); opacity: 0; }
}

@keyframes bat-fly-3 {
  0% { transform: rotate(-2deg) translate(0, 0) scale(1); opacity: 1; }
  18% { transform: rotate(15deg) translate(10vw, 6vh) scale(1.05); opacity: 1; }
  45% { transform: rotate(-12deg) translate(35vw, 22vh) scale(0.95); opacity: 0.95; }
  75% { transform: rotate(25deg) translate(55vw, 40vh) scale(0.7); opacity: 0.45; }
  100% { transform: rotate(40deg) translate(75vw, 55vh) scale(0.4); opacity: 0; }
}

@keyframes bat-fly-4 {
  0% { transform: rotate(5deg) translate(0, 0) scale(1); opacity: 1; }
  14% { transform: rotate(-20deg) translate(-10vw, 4vh) scale(1.06); opacity: 1; }
  40% { transform: rotate(12deg) translate(-30vw, 18vh) scale(0.95); opacity: 1; }
  70% { transform: rotate(-35deg) translate(-48vw, 35vh) scale(0.72); opacity: 0.5; }
  100% { transform: rotate(-55deg) translate(-68vw, 50vh) scale(0.4); opacity: 0; }
}

.bat-family.is-gone {
  display: none;
}

/* Fox — bolts off when flashlight hits, never returns */
.critter--fox.is-fleeing {
  opacity: 1 !important;
  z-index: 12;
  transition: none;
  animation: fox-flee 4.7s ease-in forwards;
  filter: drop-shadow(0 0 6px rgba(160, 240, 140, 0.35));
}

.critter--fox.is-fleeing svg {
  overflow: visible;
  /* Face the run direction (right) */
  transform: scaleX(-1);
}

.critter--fox.is-fleeing .fox-run {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: fox-run-bob 0.32s ease-in-out infinite;
}

.critter--fox.is-fleeing .fox-leg {
  transform-box: fill-box;
  transform-origin: 50% 0%;
}

.critter--fox.is-fleeing .fox-leg-a {
  animation: fox-leg-a 0.32s ease-in-out infinite;
}

.critter--fox.is-fleeing .fox-leg-b {
  animation: fox-leg-b 0.32s ease-in-out infinite;
}

.critter--fox.is-fleeing .fox-leg-c {
  animation: fox-leg-c 0.32s ease-in-out infinite;
}

.critter--fox.is-fleeing .fox-tail {
  transform-box: fill-box;
  transform-origin: 0% 80%;
  animation: fox-tail-wag 0.32s ease-in-out infinite;
}

.critter--fox.is-gone {
  display: none !important;
}

@keyframes fox-flee {
  0% {
    transform: translate(0, 0);
    opacity: 1;
  }
  12% {
    transform: translate(3vw, -1vh);
    opacity: 1;
  }
  45% {
    transform: translate(22vw, 2vh);
    opacity: 1;
  }
  75% {
    transform: translate(42vw, 5vh);
    opacity: 0.55;
  }
  100% {
    transform: translate(62vw, 8vh);
    opacity: 0;
  }
}

@keyframes fox-run-bob {
  0%, 100% { transform: translateY(0) rotate(-2deg); }
  50% { transform: translateY(-3px) rotate(2deg); }
}

@keyframes fox-leg-a {
  0%, 100% { transform: rotate(28deg); }
  50% { transform: rotate(-32deg); }
}

@keyframes fox-leg-b {
  0%, 100% { transform: rotate(-26deg); }
  50% { transform: rotate(30deg); }
}

@keyframes fox-leg-c {
  0%, 100% { transform: rotate(22deg); }
  50% { transform: rotate(-28deg); }
}

@keyframes fox-tail-wag {
  0%, 100% { transform: rotate(-8deg); }
  50% { transform: rotate(10deg); }
}

@media (max-width: 960px) {
  #wildlife {
    display: none;
  }

  .critter--guide-bird {
    display: none !important;
  }
}

@media (hover: none) {
  #wildlife {
    display: none;
  }

  .critter--guide-bird {
    display: none !important;
  }
}

/* Hero */

.hero {
  position: relative;
  z-index: auto;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-end;
  padding: var(--nav-height) 2rem 5.5rem;
  text-align: center;
  overflow-anchor: none;
}

.hero-inner {
  position: relative;
  z-index: 3;
  max-width: 52rem;
  margin-top: auto;
  padding-top: 8.5rem;
  transform: translateY(3.5rem);
  overflow-anchor: none;
}

.hero-title {
  font-family: var(--font-display);
  font-size: clamp(3.5rem, 10vw, 7.5rem);
  font-weight: 300;
  line-height: 0.95;
  letter-spacing: -0.02em;
  color: var(--fg-bright);
  margin-bottom: 1.25rem;
}

.hero-date {
  font-family: var(--font-mono);
  font-size: clamp(0.85rem, 2.2vw, 1.05rem);
  font-weight: 400;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--fg-bright);
  margin-bottom: 0.75rem;
}

.hero-location {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(150, 200, 135, 0.78);
  margin-bottom: 3rem;
}

.hero-scroll {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 0.5rem;
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--fg-dim);
  text-decoration: none;
}

.hero-scroll:hover {
  color: var(--fg-bright);
}

.scroll-line {
  width: 1px;
  height: 2.5rem;
  background: linear-gradient(to bottom, var(--fg-dim), transparent);
}

/* Content sections */

.content {
  position: relative;
  z-index: auto;
  padding: 0 1.5rem 0;
}

.content-inner {
  max-width: var(--content-max);
  margin: 0 auto;
}

.section {
  margin-bottom: var(--section-gap);
  scroll-margin-top: calc(var(--nav-height) + 1rem);
}

.content .section:last-child {
  margin-bottom: 0;
}

.section-title {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.25rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--fg-bright);
  margin-bottom: 1.5rem;
  line-height: 1.3;
}

.section-title-note {
  font-weight: 300;
  letter-spacing: 0.08em;
  color: rgba(170, 210, 150, 0.72);
}

.section-body {
  font-size: 0.95rem;
  color: var(--fg);
}

.section-body p + p {
  margin-top: 1.25rem;
}

.section-body a {
  color: var(--fg-bright);
  text-decoration: underline;
  text-decoration-color: var(--panel-border);
  text-underline-offset: 3px;
}

.section-body a:hover {
  text-decoration-color: var(--fg-bright);
}

/* Panels */

.panel {
  position: relative;
  z-index: 3;
  background: var(--panel);
  border: 1px solid var(--panel-border);
  padding: 2rem 2.25rem;
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  overflow: visible;
}

.panel:hover {
  border-color: rgba(150, 200, 135, 0.22);
  background: rgba(0, 0, 0, 0.62);
}

/* Lineup */

.lineup {
  list-style: none;
  display: grid;
  gap: 0;
}

.lineup li {
  display: flex;
  align-items: baseline;
  gap: 1.25rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--panel-border);
  font-family: var(--font-body);
  font-size: 0.95rem;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: var(--fg);
}

.lineup li:first-child {
  border-top: 1px solid var(--panel-border);
}

.lineup li:hover {
  color: var(--fg-bright);
}

/* Packing list */

.packing-list {
  list-style: none;
  display: grid;
  gap: 0.5rem;
}

.packing-list li {
  display: flex;
  align-items: flex-start;
  gap: 0.75rem;
  font-size: 0.9rem;
  color: var(--fg);
}

.packing-list li::before {
  content: '—';
  color: var(--fg-dim);
  flex-shrink: 0;
}

/* CTA */

.cta-block {
  text-align: center;
  padding: 3rem 2rem;
  margin: 2rem 0;
}

.cta-button {
  display: inline-flex;
  align-items: center;
  gap: 0.75rem;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 400;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--bg);
  background: var(--fg-bright);
  border: none;
  padding: 1.1rem 2.5rem;
  text-decoration: none;
  cursor: pointer;
}

.cta-button:hover {
  background: rgba(220, 255, 200, 0.98);
}

.cta-button svg {
  width: 0.85rem;
  height: 0.85rem;
}

/* Awareness subsections */

.subsection {
  margin-top: 1.75rem;
  padding-top: 1.75rem;
  border-top: 1px solid var(--panel-border);
}

.subsection-title {
  margin-bottom: 0.6rem;
}

/* Outro */

.outro {
  position: relative;
  z-index: auto;
}

.outro-inner {
  position: relative;
  z-index: 3;
  max-width: 52rem;
  margin: 0 auto;
  padding: clamp(2.5rem, 6vh, 4rem) 2rem clamp(3rem, 8vh, 5rem);
  text-align: center;
}

.outro-spacer {
  height: 100vh;
  height: 100svh;
  position: relative;
}

.outro-scene {
  position: absolute;
  left: 32.5%;
  bottom: 36vh;
  width: min(62.9vw, 21.8rem);
  color: var(--fg-bright);
  opacity: 1;
  transform: translateX(-50%);
}

.outro-scene-stack {
  position: relative;
  width: 100%;
  overflow: visible;
}

.speaker-waves {
  position: absolute;
  left: 50%;
  top: 48%;
  width: 380%;
  height: 160%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  color: rgba(190, 235, 170, 0.95);
  opacity: 0;
  visibility: hidden;
  z-index: 3;
  overflow: visible;
  transition: opacity 0.4s ease, visibility 0.4s ease;
}

body.is-music-playing .speaker-waves {
  opacity: 1;
  visibility: visible;
}

.speaker-waves .swave-pulse {
  opacity: 0;
}

body.is-music-playing .speaker-waves-left .swave-pulse {
  animation: speaker-wave-left 3.6s ease-out infinite;
}

body.is-music-playing .speaker-waves-right .swave-pulse {
  animation: speaker-wave-right 3.6s ease-out infinite;
}

body.is-music-playing .swave-a .swave-pulse { animation-delay: 0s; }
body.is-music-playing .swave-b .swave-pulse { animation-delay: 0.35s; }
body.is-music-playing .swave-c .swave-pulse { animation-delay: 0.7s; }
body.is-music-playing .swave-d .swave-pulse { animation-delay: 1.05s; }
body.is-music-playing .swave-e .swave-pulse { animation-delay: 1.4s; }

@keyframes speaker-wave-left {
  0% {
    opacity: 0;
    transform: translateX(14px);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(-113px);
  }
}

@keyframes speaker-wave-right {
  0% {
    opacity: 0;
    transform: translateX(-14px);
  }
  16% {
    opacity: 1;
  }
  100% {
    opacity: 0;
    transform: translateX(113px);
  }
}



.outro-soundsystem {
  position: relative;
  z-index: 2;
  display: block;
  width: 57.5%;
  height: auto;
  margin-inline: auto;
  transform: scaleX(-1);
  /* Tint grayscale pictogram to theme green */
  filter: grayscale(1) sepia(0.9) hue-rotate(55deg) saturate(4.2) brightness(0.95) contrast(1.05);
}

.outro-dancers {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -4vh;
  width: 100%;
  height: 72vh;
  color: var(--fg-bright);
  pointer-events: none;
  overflow: visible;
  z-index: 2;
}

.outro-dancers .dancers > g.is-possessed {
  opacity: 0;
  pointer-events: none;
}

/* Controllable stick figure (arrow keys) */
.player-avatar {
  position: absolute;
  top: 0;
  left: 0;
  width: 5.2rem;
  height: 8.2rem;
  z-index: 160;
  color: var(--fg-bright);
  pointer-events: none;
  will-change: transform;
  transform-origin: center bottom;
  filter: drop-shadow(0 0 6px rgba(150, 230, 130, 0.35));
}

.game-speech {
  position: absolute;
  left: 50%;
  bottom: calc(100% - 0.35rem);
  transform: translateX(-50%);
  min-width: 7.5rem;
  max-width: 11.5rem;
  padding: 0.45rem 0.65rem 0.5rem;
  border: 1px solid rgba(160, 220, 140, 0.45);
  border-radius: 0.55rem;
  background: rgba(0, 0, 0, 0.72);
  color: rgba(200, 245, 180, 0.95);
  font-family: var(--font-mono);
  font-size: 0.62rem;
  font-weight: 400;
  letter-spacing: 0.02em;
  line-height: 1.35;
  text-align: center;
  white-space: normal;
  z-index: 2;
  opacity: 0;
  pointer-events: none;
  filter: none;
}

.game-speech::after {
  content: '';
  position: absolute;
  left: 50%;
  top: 100%;
  transform: translateX(-50%);
  border: 6px solid transparent;
  border-top-color: rgba(160, 220, 140, 0.45);
}

.has-speech > .game-speech {
  opacity: 1;
  animation: game-speech-in 0.35s ease-out;
}

.jam-figure .game-speech {
  bottom: calc(100% - 0.2rem);
  max-width: 12.5rem;
}

@keyframes game-speech-in {
  from { opacity: 0; transform: translateX(-50%) translateY(6px) scale(0.94); }
  to { opacity: 1; transform: translateX(-50%) translateY(0) scale(1); }
}

.player-avatar[hidden] {
  display: none !important;
}

.player-avatar.is-fading-out,
.player-friend.is-fading-out {
  opacity: 0 !important;
  transition: opacity 0.65s ease;
  animation: none !important;
}

/* 5s join — dance while walking into spaced floor spots */
body.is-joining-crowd .player-avatar.is-joining .player-figure,
body.is-joining-crowd .player-friend.is-joining .player-figure {
  animation: player-bob 0.34s ease-in-out infinite;
}

body.is-joining-crowd .player-avatar.is-joining .arm-l,
body.is-joining-crowd .player-friend.is-joining .arm-l {
  animation: player-arm-l 0.34s ease-in-out infinite;
}

body.is-joining-crowd .player-avatar.is-joining .arm-r,
body.is-joining-crowd .player-friend.is-joining .arm-r {
  animation: player-arm-r 0.34s ease-in-out infinite;
}

body.is-joining-crowd .player-avatar.is-joining .leg-l,
body.is-joining-crowd .player-friend.is-joining .leg-l {
  animation: player-leg-l 0.34s ease-in-out infinite;
}

body.is-joining-crowd .player-avatar.is-joining .leg-r,
body.is-joining-crowd .player-friend.is-joining .leg-r {
  animation: player-leg-r 0.34s ease-in-out infinite;
}

body.is-joining-crowd .player-avatar.is-joining,
body.is-joining-crowd .player-friend.is-joining {
  filter: drop-shadow(0 0 8px rgba(160, 240, 140, 0.45));
}

.player-svg {
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  transform-origin: center center;
}

.player-avatar .arm-l,
.player-avatar .arm-r,
.player-avatar .leg-l,
.player-avatar .leg-r {
  transform-box: fill-box;
  transform-origin: 50% 0%;
}

.player-avatar.is-walking .player-figure {
  animation: player-bob 0.36s ease-in-out infinite;
}

.player-avatar.is-walking .arm-l {
  animation: player-arm-l 0.36s ease-in-out infinite;
}

.player-avatar.is-walking .arm-r {
  animation: player-arm-r 0.36s ease-in-out infinite;
}

.player-avatar.is-walking .leg-l {
  animation: player-leg-l 0.36s ease-in-out infinite;
}

.player-avatar.is-walking .leg-r {
  animation: player-leg-r 0.36s ease-in-out infinite;
}

.player-avatar.is-dancing .player-figure {
  animation: player-dance-body 0.4s ease-in-out infinite;
}

.player-avatar.is-dancing .arm-l {
  animation: player-dance-arm-l 0.28s ease-in-out infinite;
}

.player-avatar.is-dancing .arm-r {
  animation: player-dance-arm-r 0.28s ease-in-out infinite;
}

.player-avatar.is-dancing .leg-l {
  animation: player-dance-leg-l 0.28s ease-in-out infinite;
}

.player-avatar.is-dancing .leg-r {
  animation: player-dance-leg-r 0.28s ease-in-out infinite;
}

.player-avatar.has-headlamp .player-lamp {
  opacity: 1;
  filter: drop-shadow(0 0 8px rgba(200, 255, 170, 1));
}

.player-avatar.has-headlamp {
  filter:
    drop-shadow(0 0 8px rgba(170, 255, 150, 0.55))
    drop-shadow(0 0 18px rgba(140, 230, 120, 0.35));
}

@keyframes player-bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-3px); }
}

@keyframes player-arm-l {
  0%, 100% { transform: rotate(28deg); }
  50% { transform: rotate(-32deg); }
}

@keyframes player-arm-r {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(32deg); }
}

@keyframes player-leg-l {
  0%, 100% { transform: rotate(-22deg); }
  50% { transform: rotate(26deg); }
}

@keyframes player-leg-r {
  0%, 100% { transform: rotate(22deg); }
  50% { transform: rotate(-26deg); }
}

@keyframes player-dance-body {
  0%, 100% { transform: translate(0, 0) rotate(-5deg); }
  25% { transform: translate(-2px, -5px) rotate(7deg); }
  50% { transform: translate(2px, -1px) rotate(-6deg); }
  75% { transform: translate(-1px, -6px) rotate(5deg); }
}

@keyframes player-dance-arm-l {
  0%, 100% { transform: rotate(48deg); }
  50% { transform: rotate(-55deg); }
}

@keyframes player-dance-arm-r {
  0%, 100% { transform: rotate(-48deg); }
  50% { transform: rotate(55deg); }
}

@keyframes player-dance-leg-l {
  0%, 100% { transform: rotate(-28deg); }
  50% { transform: rotate(32deg); }
}

@keyframes player-dance-leg-r {
  0%, 100% { transform: rotate(28deg); }
  50% { transform: rotate(-32deg); }
}

/* Friends woken from sleepers — trail the walker */
.player-friend {
  position: absolute;
  top: 0;
  left: 0;
  width: 3.9rem;
  height: 6.15rem;
  z-index: 159;
  color: var(--fg-bright);
  pointer-events: none;
  will-change: transform;
  transform-origin: center bottom;
  filter: drop-shadow(0 0 5px rgba(150, 230, 130, 0.3));
  opacity: 0;
  animation: friend-wake 2.2s ease-out forwards;
}

.player-friend .arm-l,
.player-friend .arm-r,
.player-friend .leg-l,
.player-friend .leg-r {
  transform-box: fill-box;
  transform-origin: 50% 0%;
}

.player-friend.is-walking .player-figure {
  animation: player-bob 0.36s ease-in-out infinite;
}

.player-friend.is-walking .arm-l {
  animation: player-arm-l 0.36s ease-in-out infinite;
}

.player-friend.is-walking .arm-r {
  animation: player-arm-r 0.36s ease-in-out infinite;
}

.player-friend.is-walking .leg-l {
  animation: player-leg-l 0.36s ease-in-out infinite;
}

.player-friend.is-walking .leg-r {
  animation: player-leg-r 0.36s ease-in-out infinite;
}

@keyframes friend-wake {
  0% {
    opacity: 0;
    filter: drop-shadow(0 0 0 transparent);
  }
  40% {
    opacity: 1;
    filter: drop-shadow(0 0 12px rgba(190, 255, 160, 0.7));
  }
  100% {
    opacity: 0.92;
    filter: drop-shadow(0 0 5px rgba(150, 230, 130, 0.3));
  }
}

.critter--sleepers.is-stirring {
  opacity: 1 !important;
  transition: none;
  overflow: visible;
}

.critter--sleepers.is-stirring svg {
  overflow: visible;
}

.critter--sleepers.is-stirring .riser {
  transform-box: fill-box;
  transform-origin: 50% 100%;
  animation: sleeper-rise 2.2s ease-in-out forwards;
}

.critter--sleepers.is-stirring .riser-b {
  animation-delay: 0.45s;
}

.critter--sleepers.is-stirring .bag {
  transform-box: fill-box;
  transform-origin: 50% 50%;
  animation: bag-settle 2.2s ease-out forwards;
}

.critter--sleepers.is-stirring .bag-b {
  animation-delay: 0.2s;
}

.critter--sleepers.is-stirring .zzz {
  animation: zzz-drift 2.2s ease-out forwards;
}

.critter--sleepers.is-waking {
  opacity: 0 !important;
  transition: opacity 1.4s ease;
}

/* Soft beacon when character control starts */
body.is-playing-walker .critter--sleepers.is-beckoning:not(.is-waking):not(.is-stirring) {
  filter:
    drop-shadow(0 0 8px rgba(180, 255, 160, 0.75))
    drop-shadow(0 0 24px rgba(150, 240, 130, 0.55))
    drop-shadow(0 0 48px rgba(130, 220, 110, 0.35));
  animation: sleeper-beacon 2.8s ease-in-out infinite;
}

@keyframes sleeper-beacon {
  0%, 100% {
    filter:
      drop-shadow(0 0 7px rgba(180, 255, 160, 0.55))
      drop-shadow(0 0 20px rgba(150, 235, 130, 0.4))
      drop-shadow(0 0 40px rgba(130, 215, 110, 0.22));
  }
  50% {
    filter:
      drop-shadow(0 0 12px rgba(190, 255, 170, 0.85))
      drop-shadow(0 0 30px rgba(160, 245, 140, 0.6))
      drop-shadow(0 0 56px rgba(140, 225, 120, 0.4));
  }
}

@keyframes sleeper-rise {
  0% {
    transform: rotate(78deg) translate(12px, 10px) scaleY(0.85);
    opacity: 0.85;
  }
  28% {
    transform: rotate(42deg) translate(6px, 6px) scaleY(0.92);
    opacity: 1;
  }
  55% {
    transform: rotate(14deg) translate(1px, 2px) scaleY(1);
  }
  78% {
    transform: rotate(-4deg) translate(0, 0);
  }
  100% {
    transform: rotate(0deg) translate(0, 0);
  }
}

@keyframes bag-settle {
  0% { opacity: 0.55; transform: scale(1); }
  50% { opacity: 0.35; transform: scale(0.96); }
  100% { opacity: 0.08; transform: scale(0.9) translateY(4px); }
}

@keyframes zzz-drift {
  0% { opacity: 0.75; transform: translate(0, 0); }
  60% { opacity: 0.35; transform: translate(6px, -10px); }
  100% { opacity: 0; transform: translate(12px, -18px); }
}

/* Campfire — lives in .page so it scrolls with content (unlike the fixed tree shader) */
.campfire {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 8;
  width: 3.8rem;
  height: 4.2rem;
  margin: 0;
  color: rgba(190, 235, 170, 0.98);
  opacity: 0;
  animation: campfire-ignite 0.7s ease-out forwards;
  pointer-events: none;
  will-change: transform;
  transform-origin: center bottom;
}

.ocarina-vol {
  position: absolute;
  left: 50%;
  top: calc(100% + 0.55rem);
  transform: translateX(-50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.2rem;
  width: 4.6rem;
  pointer-events: auto;
  z-index: 5;
  opacity: 0;
  animation: ocarina-vol-in 0.55s ease-out 0.15s forwards;
  color: rgba(190, 235, 170, 0.9);
  font-family: var(--font-mono);
  cursor: pointer;
}

.ocarina-vol-label {
  font-size: 0.55rem;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  opacity: 0.7;
  user-select: none;
}

.ocarina-vol-slider {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 3px;
  border-radius: 2px;
  background: rgba(150, 220, 140, 0.35);
  outline: none;
  cursor: pointer;
}

.ocarina-vol-slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(190, 255, 170, 0.95);
  border: 1px solid rgba(120, 180, 110, 0.7);
  box-shadow: 0 0 6px rgba(150, 230, 130, 0.45);
  cursor: pointer;
}

.ocarina-vol-slider::-moz-range-thumb {
  width: 11px;
  height: 11px;
  border-radius: 50%;
  background: rgba(190, 255, 170, 0.95);
  border: 1px solid rgba(120, 180, 110, 0.7);
  box-shadow: 0 0 6px rgba(150, 230, 130, 0.45);
  cursor: pointer;
}

@keyframes ocarina-vol-in {
  from { opacity: 0; transform: translateX(-50%) translateY(-4px); }
  to { opacity: 1; transform: translateX(-50%) translateY(0); }
}

.campfire-glow {
  position: absolute;
  left: 50%;
  top: 55%;
  width: min(220px, 70vw);
  height: min(200px, 55vw);
  transform: translate(-50%, -50%);
  background:
    radial-gradient(
      circle 55px at 50% 55%,
      rgba(180, 255, 150, 0.28) 0%,
      rgba(140, 220, 120, 0.12) 40%,
      transparent 72%
    ),
    radial-gradient(
      ellipse 140px 110px at 50% 50%,
      rgba(150, 240, 130, 0.16) 0%,
      rgba(120, 200, 100, 0.06) 45%,
      transparent 75%
    );
  mix-blend-mode: soft-light;
  pointer-events: none;
  z-index: 0;
}

.campfire-svg {
  position: relative;
  z-index: 1;
  width: 100%;
  height: 100%;
  display: block;
  overflow: visible;
  filter: drop-shadow(0 0 8px rgba(150, 230, 130, 0.45));
}

.fire-log {
  color: rgba(150, 200, 135, 0.75);
}

.fire-flame {
  transform-origin: 32px 54px;
  transform-box: fill-box;
}

.fire-flame-a {
  animation: flame-flicker-a 0.55s ease-in-out infinite;
  color: rgba(170, 235, 150, 0.95);
}

.fire-flame-b {
  animation: flame-flicker-b 0.42s ease-in-out infinite;
  color: rgba(200, 255, 180, 0.9);
}

.fire-flame-c {
  animation: flame-flicker-c 0.36s ease-in-out infinite;
  color: rgba(230, 255, 210, 0.88);
}

.fire-ember {
  animation: ember-rise 1.8s ease-out infinite;
  color: rgba(190, 255, 170, 0.95);
}

.fire-ember-b {
  animation-delay: 0.4s;
}

.fire-ember-c {
  animation-delay: 0.9s;
}

@keyframes campfire-ignite {
  from { opacity: 0; }
  to { opacity: 1; }
}

@keyframes flame-flicker-a {
  0%, 100% { transform: scaleY(1) scaleX(1) rotate(-2deg); }
  50% { transform: scaleY(1.12) scaleX(0.92) rotate(3deg); }
}

@keyframes flame-flicker-b {
  0%, 100% { transform: scaleY(1) translateX(0); }
  50% { transform: scaleY(1.18) translateX(1px); }
}

@keyframes flame-flicker-c {
  0%, 100% { transform: scaleY(0.95); opacity: 0.85; }
  50% { transform: scaleY(1.2); opacity: 1; }
}

@keyframes ember-rise {
  0% { transform: translate(0, 0); opacity: 0; }
  20% { opacity: 1; }
  100% { transform: translate(4px, -22px); opacity: 0; }
}

/* Jam session — seated musicians around the fire */
.jam-figure {
  position: absolute;
  top: 0;
  left: 0;
  width: 4.8rem;
  height: 6.4rem;
  z-index: 161;
  color: var(--fg-bright);
  pointer-events: none;
  filter: drop-shadow(0 0 6px rgba(150, 230, 130, 0.35));
}

.jam-figure .jam-svg {
  width: 100%;
  height: 100%;
  overflow: visible;
}

.jam-role-flute .jam-ocarina {
  color: rgba(210, 255, 190, 1);
  filter: drop-shadow(0 0 3px rgba(180, 255, 150, 0.45));
}

.jam-role-flute .jam-arms,
.jam-role-flute .jam-ocarina {
  transform-origin: 8px -6px;
  transform-box: fill-box;
  animation: ocarina-bob 1.6s ease-in-out infinite;
}

.jam-role-drum .stick-l {
  transform-origin: -2px -2px;
  transform-box: fill-box;
  animation: drum-hit-l 0.48s ease-in-out infinite;
}

.jam-role-drum .stick-r {
  transform-origin: 2px -2px;
  transform-box: fill-box;
  animation: drum-hit-r 0.48s ease-in-out infinite 0.24s;
}

.jam-role-drum .jam-drum {
  animation: drum-bounce 0.48s ease-in-out infinite;
}

.jam-role-listener .jam-arms {
  transform-origin: 0px -4px;
  transform-box: fill-box;
  animation: listener-sway 2.4s ease-in-out infinite;
}

.jam-figure .talk-bubble {
  opacity: 0;
  transition: opacity 0.2s ease;
}

.jam-figure.is-talking .talk-bubble {
  opacity: 1;
  animation: talk-pop 1.4s ease-out;
}

@keyframes ocarina-bob {
  0%, 100% { transform: rotate(-2deg) translateY(0); }
  50% { transform: rotate(3deg) translateY(1px); }
}

@keyframes drum-hit-l {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(-18deg); }
  55% { transform: rotate(8deg); }
}

@keyframes drum-hit-r {
  0%, 100% { transform: rotate(0deg); }
  40% { transform: rotate(16deg); }
  55% { transform: rotate(-6deg); }
}

@keyframes drum-bounce {
  0%, 100% { transform: scaleY(1); }
  50% { transform: scaleY(0.94); }
}

@keyframes listener-sway {
  0%, 100% { transform: rotate(-3deg); }
  50% { transform: rotate(4deg); }
}

@keyframes talk-pop {
  0% { opacity: 0; transform: translateY(4px) scale(0.7); }
  25% { opacity: 1; transform: translateY(0) scale(1); }
  80% { opacity: 1; }
  100% { opacity: 0; transform: translateY(-2px) scale(0.95); }
}

body.is-jam-session .player-avatar.jam-figure,
body.is-jam-session .jam-figure {
  animation: none;
}

body.has-ocarina.is-ocarina-playing .jam-role-flute .jam-ocarina {
  animation: ocarina-bob 0.55s ease-in-out infinite;
}

body.has-ocarina.is-ocarina-playing .jam-role-flute {
  filter: drop-shadow(0 0 10px rgba(180, 255, 160, 0.45));
}

.outro-dancers .dancer-body {
  transform-box: fill-box;
  transform-origin: center bottom;
  animation: none !important;
  transform: none;
}

body.is-music-playing .outro-dancers .dancer-body {
  animation: dance-wild 0.6s ease-in-out infinite !important;
}

body.is-music-playing .outro-dancers .dancers > g:nth-child(3n) .dancer-body {
  animation-duration: 0.51s !important;
  animation-delay: -0.1s;
}

body.is-music-playing .outro-dancers .dancers > g:nth-child(3n + 1) .dancer-body {
  animation-duration: 0.71s !important;
  animation-delay: -0.22s;
}

body.is-music-playing .outro-dancers .dancers > g:nth-child(3n + 2) .dancer-body {
  animation-duration: 0.54s !important;
  animation-delay: -0.05s;
}

body.is-music-playing .outro-dancers .dancers > g:nth-child(4n) .dancer-body {
  animation-name: dance-wild-alt !important;
}

@keyframes dance-wild {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(-1px, -4px) rotate(-8deg); }
  50% { transform: translate(1px, 0) rotate(6deg); }
  75% { transform: translate(-1px, -3px) rotate(-4deg); }
}

@keyframes dance-wild-alt {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  25% { transform: translate(2px, -3px) rotate(9deg); }
  50% { transform: translate(-1px, -1px) rotate(-7deg); }
  75% { transform: translate(1px, -5px) rotate(5deg); }
}

.outro-closing {
  font-family: var(--font-mono);
  font-size: clamp(1rem, 2.5vw, 1.35rem);
  font-weight: 400;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-bright);
  margin-bottom: 1rem;
}

.outro-tagline {
  font-family: var(--font-mono);
  font-size: clamp(0.8rem, 2vw, 0.95rem);
  font-weight: 400;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: rgba(150, 200, 135, 0.78);
}

.outro-scroll-arrow {
  display: block;
  width: clamp(1.6rem, 3.5vw, 2.2rem);
  height: auto;
  margin: 1.1rem auto 0;
  color: rgba(150, 200, 135, 0.85);
  animation: outro-arrow-blink 1.4s ease-in-out infinite;
}

@keyframes outro-arrow-blink {
  0%,
  100% {
    opacity: 0.15;
  }
  50% {
    opacity: 1;
  }
}

@media (prefers-reduced-motion: reduce) {
  .outro-scroll-arrow {
    animation: none;
    opacity: 0.85;
  }
}

/* Mobile nav */

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
  color: var(--fg-bright);
}

.nav-toggle span {
  display: block;
  width: 1.25rem;
  height: 1px;
  background: currentColor;
  margin: 5px 0;
}

@media (max-width: 1024px) and (pointer: coarse) {
  .site-nav {
    position: absolute;
    top: 0;
    transform: none;
    will-change: auto;
    box-shadow: none;
  }

  :root {
    --section-gap: clamp(3rem, 7vh, 5rem);
  }

  .hero {
    padding-inline: 1.5rem;
  }

  .content,
  .outro-inner {
    padding-inline: 1.25rem;
  }

  .panel {
    padding: 1.6rem 1.35rem;
  }
}

@media (max-width: 768px) {
  /* v10 mobile layout baseline — keep green theme + speaker waves */
  html,
  body {
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
  }

  .page {
    overflow-x: clip;
    max-width: 100%;
    width: 100%;
  }

  /* Wildlife / flashlight animals stay desktop-only */
  #wildlife,
  .bat-family {
    display: none !important;
  }

  .site-nav {
    padding: 0.75rem 1.25rem;
  }

  .nav-toggle {
    display: block;
  }

  .nav-links {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    flex-direction: column;
    gap: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--panel-border);
    padding: 1rem 0;
    max-height: calc(100svh - var(--nav-height));
    overflow-y: auto;
  }

  .nav-links.open {
    display: flex;
  }

  .nav-links li {
    padding: 0.75rem 2rem;
  }

  /* Restore v10 stacking (no wildlife layer on mobile) */
  .hero,
  .content,
  .outro {
    position: relative;
    z-index: 1;
    max-width: 100%;
    overflow-x: clip;
  }

  .hero-inner,
  .outro-inner {
    position: relative;
    z-index: auto;
    max-width: 100%;
  }

  .hero {
    padding: var(--nav-height) 1.25rem 3.5rem;
    /* Lock hero to initial layout viewport so URL-bar show/hide doesn't jump text */
    min-height: 100vh;
    min-height: 100svh;
    justify-content: flex-end;
    padding-top: var(--nav-height);
    padding-bottom: 2.35rem;
  }

  .hero-inner {
    margin-top: auto;
    padding-top: clamp(4.2rem, 20vh, 7.2rem);
    transform: translateY(-0.35rem);
  }

  .hero-title {
    font-size: clamp(2.45rem, 13vw, 4rem);
  }

  .hero-date {
    font-size: clamp(0.72rem, 2.8vw, 0.9rem);
  }

  .hero-location {
    font-size: clamp(0.68rem, 2.4vw, 0.82rem);
    margin-bottom: 1.95rem;
  }

  .content {
    padding: 0 1rem 0;
  }

  .section {
    --section-gap: clamp(2.5rem, 6vh, 4.5rem);
  }

  .panel {
    position: relative;
    z-index: auto;
    padding: 1.5rem 1.25rem;
    overflow: hidden;
    max-width: 100%;
  }

  .section-title {
    font-size: clamp(0.92rem, 3.4vw, 1.08rem);
    margin-bottom: 1rem;
  }

  .section-body {
    font-size: clamp(0.85rem, 2.8vw, 0.95rem);
    line-height: 1.6;
  }

  .lineup li {
    flex-wrap: wrap;
    gap: 0.35rem 0.7rem;
    font-size: clamp(0.68rem, 2.6vw, 0.8rem);
  }

  .packing-list li {
    font-size: clamp(0.82rem, 2.7vw, 0.9rem);
  }

  .outro-inner {
    padding: 2rem 1.25rem 2.5rem;
  }

  .outro-spacer {
    padding-bottom: 0;
    overflow: hidden;
    max-width: 100%;
  }

  .outro-scene {
    width: min(48vw, 16rem);
    max-width: calc(100% - 2rem);
  }

  .outro-scene-stack {
    overflow: hidden;
  }

  .outro-soundsystem {
    width: 52.9%;
  }

  /* Keep sine waves, sized for mobile so they don’t blow out the page */
  .speaker-waves {
    width: 160%;
    height: 140%;
    top: 48%;
  }

  .outro-dancers {
    bottom: 6vh;
    height: 58vh;
    overflow: hidden;
  }

  .music-player {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
    max-width: min(
      14.5rem,
      calc(100% - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
    );
    max-width: min(
      14.5rem,
      calc(100dvw - 1.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
    );
  }
}

/* Music player */

.music-player {
  position: fixed;
  left: max(1.25rem, env(safe-area-inset-left, 0px));
  bottom: max(1.25rem, env(safe-area-inset-bottom, 0px));
  z-index: 200;
  display: flex;
  align-items: center;
  gap: 0.75rem;
  width: max-content;
  max-width: min(
    16rem,
    calc(100% - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
  );
  max-width: min(
    16rem,
    calc(100dvw - 2.5rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px))
  );
  box-sizing: border-box;
  color: var(--fg-bright);
  pointer-events: auto;
}

/* Sits just above the music player, tail pointing down to it. */
.music-prompt {
  position: absolute;
  left: 0;
  bottom: calc(100% + 1.1rem);
  z-index: 5;
  width: max-content;
  max-width: min(24rem, calc(100vw - 2rem));
  padding: 1.1rem 1.5rem;
  border: 1px solid rgba(170, 230, 150, 0.48);
  border-radius: 0.9rem;
  background: rgba(0, 8, 0, 0.85);
  color: var(--fg-bright);
  font-family: var(--font-mono);
  font-size: 1.36rem;
  line-height: 1.35;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  text-align: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform: translateY(0.35rem);
  pointer-events: none;
  filter: drop-shadow(0 0 8px rgba(140, 220, 120, 0.18));
  transition:
    opacity 0.4s ease,
    transform 0.4s ease,
    visibility 0.4s;
}

.music-prompt::before,
.music-prompt::after {
  content: '';
  position: absolute;
  top: 100%;
  left: 1.8rem;
  width: 0;
  height: 0;
  border-left: 1rem solid transparent;
  border-right: 1rem solid transparent;
}

.music-prompt::before {
  border-top: 1.24rem solid rgba(170, 230, 150, 0.48);
}

.music-prompt::after {
  top: calc(100% - 0.16rem);
  border-top: 1.1rem solid rgba(0, 8, 0, 0.92);
}

.music-prompt.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateY(0) scale(1);
}

body.is-gated .music-prompt,
body.is-music-playing .music-prompt {
  opacity: 0;
  visibility: hidden;
}

.music-player.is-bottom-glow .music-toggle {
  animation: music-player-pulse 1.8s ease-in-out infinite;
}

@keyframes music-player-pulse {
  0%, 100% {
    box-shadow:
      0 0 0 0 rgba(160, 255, 140, 0),
      0 0 8px rgba(140, 220, 120, 0.15);
    border-color: rgba(150, 200, 135, 0.28);
  }
  50% {
    box-shadow:
      0 0 0 6px rgba(160, 255, 140, 0.12),
      0 0 22px rgba(150, 240, 130, 0.55);
    border-color: rgba(180, 240, 160, 0.75);
  }
}

body.is-music-playing .music-player.is-bottom-glow .music-toggle,
body.is-gated .music-player.is-bottom-glow .music-toggle {
  animation: none;
}

.music-toggle {
  flex-shrink: 0;
  width: 2rem;
  height: 2rem;
  display: grid;
  place-items: center;
  border: 1px solid rgba(150, 200, 135, 0.28);
  background: rgba(0, 0, 0, 0.55);
  color: var(--fg-bright);
  cursor: pointer;
  padding: 0;
  transition: border-color 0.2s ease, color 0.2s ease;
}

.music-toggle:hover {
  border-color: var(--fg-bright);
}

.music-toggle svg {
  width: 0.85rem;
  height: 0.85rem;
  grid-area: 1 / 1;
}

.music-toggle .music-icon-play {
  display: block;
}

.music-toggle .music-icon-pause {
  display: none;
}

.music-toggle.is-playing .music-icon-play {
  display: none;
}

.music-toggle.is-playing .music-icon-pause {
  display: block;
}

.music-meta {
  min-width: 0;
  flex: 1;
}

.music-title {
  display: block;
  font-family: var(--font-mono);
  font-size: 0.62rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--fg-dim);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.music-progress {
  margin-top: 0.35rem;
  height: 1px;
  background: rgba(150, 200, 135, 0.18);
  overflow: hidden;
}

.music-progress-bar {
  display: block;
  height: 100%;
  width: 0%;
  background: var(--fg-bright);
  transform-origin: left center;
}

@media (max-width: 720px) {
  .music-player {
    left: max(0.75rem, env(safe-area-inset-left, 0px));
    bottom: max(0.75rem, env(safe-area-inset-bottom, 0px));
  }
}

@media (max-width: 480px) {
  .site-nav {
    padding: 0.7rem 0.9rem;
  }

  .nav-brand {
    font-size: 0.9rem;
    letter-spacing: 0.1em;
  }

  .hero {
    padding-inline: 0.9rem;
    padding-top: var(--nav-height);
    padding-bottom: 2.15rem;
  }

  .hero-inner {
    padding-top: clamp(3.6rem, 18vh, 6rem);
    transform: translateY(-0.25rem);
  }

  .content {
    padding-inline: 0.75rem;
  }

  .panel {
    padding: 1.15rem 0.95rem;
  }

  .outro-inner {
    padding-inline: 0.95rem;
  }

  .music-player {
    gap: 0.45rem;
    max-width: calc(100% - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
    max-width: calc(100dvw - 1rem - env(safe-area-inset-left, 0px) - env(safe-area-inset-right, 0px));
  }

  .music-prompt {
    font-size: 1.2rem;
    padding: 1rem 1.3rem;
  }

  .music-title {
    font-size: 0.56rem;
    letter-spacing: 0.08em;
  }
}

@media (max-width: 380px) {
  .hero-title {
    font-size: clamp(2rem, 12vw, 2.6rem);
  }

  .music-meta {
    max-width: 7.5rem;
  }
}

@media (max-width: 768px) and (max-height: 760px) {
  .hero {
    padding-bottom: 1.4rem;
  }

  .hero-inner {
    padding-top: clamp(2.6rem, 14vh, 4.6rem);
    transform: translateY(-0.2rem);
  }

  .hero-title {
    font-size: clamp(2.05rem, 10.8vw, 2.9rem);
    margin-bottom: 0.7rem;
  }

  .hero-date {
    margin-bottom: 0.45rem;
  }

  .hero-location {
    margin-bottom: 1rem;
  }
}

@media (max-height: 500px) and (orientation: landscape) {
  .hero {
    min-height: 100svh;
    padding-top: calc(var(--nav-height) + 0.35rem);
    padding-bottom: 1.25rem;
  }

  .hero-inner {
    padding-top: 1.6rem;
    transform: translateY(0);
  }

  .hero-location {
    margin-bottom: 1rem;
  }
}
