/* Spooky Games (/spooky/). A static, hand-edited page: the hub build never touches it,
   and the hub's design laws (one aura, no cursor toys) are deliberately not in force here. */

@font-face {
  font-family: "Archivo Black";
  src: url("/assets/fonts/archivo-black-latin.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "Fraunces";
  src: url("/assets/fonts/fraunces-italic-latin.woff2") format("woff2");
  font-style: italic;
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Inter";
  src: url("/assets/fonts/inter-latin-v20.woff2") format("woff2");
  font-weight: 100 900;
  font-display: swap;
}
@font-face {
  font-family: "Space Grotesk";
  src: url("/assets/fonts/space-grotesk-latin-v22.woff2") format("woff2");
  font-weight: 300 700;
  font-display: swap;
}

:root {
  color-scheme: dark;
  --night: #07060c;
  --bone: #f4ede1;
  --dim: #a7a1b6;
  --scene-h: clamp(560px, 100svh, 1080px);
}

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

html {
  background: var(--night);
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--night);
  color: var(--bone);
  font: 400 1rem/1.5 Inter, system-ui, sans-serif;
  overflow-x: clip;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

.skip {
  position: absolute;
  left: 12px;
  top: -80px;
  z-index: 60;
  padding: 0.75em 1.1em;
  border-radius: 8px;
  background: #16121f;
  color: #fff;
  font: 600 0.9rem/1 "Space Grotesk", sans-serif;
  text-decoration: none;
}
.skip:focus { top: 12px; }

:focus-visible {
  outline: 2px solid #ffb35c;
  outline-offset: 4px;
}

/* ---------- fixed layers ---------- */

.weather {
  position: fixed;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.grain {
  position: fixed;
  inset: -50%;
  z-index: 7;
  pointer-events: none;
  opacity: 0.055;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='240' height='240'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.8' numOctaves='3' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 1 0 0 0 0 1 0 0 0 0 1 0 0 0 .9 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  animation: grain 0.9s steps(6) infinite;
}

@keyframes grain {
  0% { transform: translate(0, 0); }
  17% { transform: translate(-3%, 2%); }
  33% { transform: translate(2%, -4%); }
  50% { transform: translate(-4%, -1%); }
  67% { transform: translate(3%, 3%); }
  83% { transform: translate(-1%, -3%); }
  100% { transform: translate(1%, 1%); }
}

/* ---------- the opening: Alex's painted graveyard, kept alive ---------- */

/* The painting is shown whole whenever the screen allows (the opening is exactly as tall
   as the picture), and only cropped top and bottom on screens wider than the picture. */
.hero {
  position: relative;
  width: 100%;
  aspect-ratio: 1672 / 941;
  max-height: 100svh;
  overflow: hidden;
  background: #0a0b1d;
}

/* when a screen is wider than the picture, the crop comes off the ground, not the title */
.hero-stage {
  position: absolute;
  left: 0;
  top: 30%;
  width: 100%;
  aspect-ratio: 1672 / 941;
  translate: 0 -30%;
}

.hero::after {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 2;
  height: 9%;
  background: linear-gradient(180deg, rgba(7, 6, 12, 0), var(--night));
  pointer-events: none;
}

.hero-stage picture,
.hero-stage img,
.hero-fx {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.hero-fx { pointer-events: none; }
.hero .t { display: none; }

.sky-front {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: block;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

/* the painted letters breathe with the candles */
.title-light {
  position: absolute;
  left: 18%;
  top: 3%;
  width: 65%;
  height: 58%;
  background: radial-gradient(closest-side, rgba(255, 160, 50, 0.34), rgba(255, 112, 20, 0.12) 62%, transparent);
  mix-blend-mode: screen;
  animation: candle 3.1s infinite;
}

.glow.moon {
  background: radial-gradient(closest-side, rgba(225, 235, 255, 0.32), rgba(180, 200, 255, 0.1) 55%, transparent);
  animation: breathe 7s ease-in-out infinite;
}

@keyframes candle {
  0%, 100% { opacity: 0.86; }
  8% { opacity: 0.68; }
  11% { opacity: 0.96; }
  23% { opacity: 0.78; }
  37% { opacity: 1; }
  41% { opacity: 0.7; }
  55% { opacity: 0.92; }
  70% { opacity: 0.8; }
  83% { opacity: 1; }
  90% { opacity: 0.74; }
}

/* the painted graves are the way in: candlelight on the stone, and something leaves it */
.graveyard {
  position: absolute;
  inset: 0;
}

.grave {
  position: absolute;
  left: calc(var(--wx) * 1%);
  top: calc(var(--wy) * 1%);
  width: calc(var(--ww) * 1%);
  height: calc(var(--wh) * 1%);
  border-radius: 46% 46% 6px 6px / 26% 26% 6px 6px;
}
.grave::before {
  content: "";
  position: absolute;
  inset: -10% -16%;
  border-radius: 50%;
  background: radial-gradient(closest-side at 50% 60%, rgba(255, 178, 72, 0.6), rgba(255, 120, 30, 0.2) 55%, transparent);
  mix-blend-mode: screen;
  opacity: 0;
  transition: opacity 0.45s;
  pointer-events: none;
}
.grave::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: 55%;
  width: 70%;
  height: 110%;
  translate: -50% 0;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(225, 233, 255, 0.55), rgba(200, 215, 255, 0.12) 60%, transparent);
  filter: blur(6px);
  opacity: 0;
  pointer-events: none;
}
.grave:hover::before,
.grave:focus-visible::before {
  opacity: 1;
  animation: candle 2.2s infinite;
}
.grave:hover::after,
.grave:focus-visible::after { animation: wisp 1.8s ease-out infinite; }
.grave:focus-visible { outline-offset: 3px; }

@keyframes wisp {
  0% { opacity: 0; transform: translateY(25%) scale(0.55, 0.35); }
  30% { opacity: 0.6; }
  100% { opacity: 0; transform: translateY(-75%) scale(1.15, 1.35); }
}

/* fog, drifting over the painted fog */
.fog {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  height: 44%;
  overflow: hidden;
  pointer-events: none;
}
.fog::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  width: 200%;
  background-image: var(--fog-a, none);
  background-repeat: repeat-x;
  background-size: 50% 100%;
  animation: fog-drift 95s linear infinite;
}
.fog-back { z-index: 1; opacity: 0.4; }
.fog-front { z-index: 2; height: 24%; opacity: 0.34; }
.fog-front::before {
  background-image: var(--fog-b, none);
  animation-duration: 62s;
  animation-direction: reverse;
}

@keyframes fog-drift { to { transform: translateX(-50%); } }

/* phones and tall windows get the tall painting */
@media (max-aspect-ratio: 3/4) {
  .hero,
  .hero-stage { aspect-ratio: 941 / 1672; }
  .hero-stage {
    top: 32%;
    translate: 0 -32%;
  }
  .hero .w { display: none; }
  .hero .t { display: block; }
  .title-light {
    left: 5%;
    top: 15%;
    width: 90%;
    height: 32%;
  }
  .grave {
    left: calc(var(--tx) * 1%);
    top: calc(var(--ty) * 1%);
    width: calc(var(--tw) * 1%);
    height: calc(var(--th) * 1%);
  }
}

/* the song */
.sound {
  position: fixed;
  right: max(16px, env(safe-area-inset-right));
  bottom: max(16px, env(safe-area-inset-bottom));
  z-index: 8;
  display: inline-flex;
  align-items: center;
  gap: 0.55em;
  padding: 0.7em 1.05em 0.7em 0.9em;
  border: 1px solid rgba(255, 170, 80, 0.35);
  border-radius: 999px;
  background: rgba(12, 9, 18, 0.72);
  color: #e9e2d6;
  font: 700 0.74rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  cursor: pointer;
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  transition: border-color 0.3s, box-shadow 0.3s, color 0.3s;
}
.sound[hidden] { display: none; }
.sound svg {
  width: 1.35em;
  height: 1.35em;
  fill: currentColor;
}
.sound .wave {
  opacity: 0.35;
  transition: opacity 0.3s;
}
.sound.is-on {
  border-color: rgba(255, 170, 80, 0.75);
  color: #ffc87a;
  box-shadow: 0 0 22px rgba(255, 140, 40, 0.28);
}
.sound.is-on .wave { opacity: 1; }
.sound:hover { border-color: rgba(255, 190, 110, 0.9); }

/* ---------- the trailer: one moment from each game, with sound ---------- */

.trailer {
  position: relative;
  z-index: 3;
  padding: clamp(36px, 7vh, 88px) clamp(16px, 6vw, 96px) clamp(48px, 9vh, 110px);
  background: var(--night);
}

.trailer-frame {
  position: relative;
  max-width: 1120px;
  margin: 0 auto;
  aspect-ratio: 16 / 9;
  border: 1px solid rgba(255, 150, 60, 0.34);
  background: #000;
  box-shadow: 0 0 70px rgba(255, 110, 20, 0.14), 0 30px 80px rgba(0, 0, 0, 0.6);
}

.trailer-video {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  background: #000;
}

.trailer-play {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  padding: 0;
  border: 0;
  background: radial-gradient(closest-side, rgba(0, 0, 0, 0) 55%, rgba(0, 0, 0, 0.4));
  cursor: pointer;
}
.trailer-play[hidden] { display: none; }

.trailer-disc {
  display: grid;
  width: clamp(76px, 9vw, 116px);
  aspect-ratio: 1;
  place-items: center;
  border: 2px solid rgba(255, 172, 84, 0.9);
  border-radius: 50%;
  background: rgba(12, 8, 16, 0.55);
  box-shadow: 0 0 34px rgba(255, 120, 30, 0.55), inset 0 0 18px rgba(255, 120, 30, 0.35);
  -webkit-backdrop-filter: blur(4px);
  backdrop-filter: blur(4px);
  transition: scale 0.3s cubic-bezier(0.2, 0.8, 0.2, 1), box-shadow 0.3s;
  animation: breathe 3.6s ease-in-out infinite;
}

.trailer-disc svg {
  width: 40%;
  translate: 7% 0;
  fill: #ffc36e;
  filter: drop-shadow(0 0 6px rgba(255, 140, 40, 0.85));
}

.trailer-play:hover .trailer-disc,
.trailer-play:focus-visible .trailer-disc {
  scale: 1.08;
  box-shadow: 0 0 50px rgba(255, 130, 40, 0.85), inset 0 0 22px rgba(255, 130, 40, 0.45);
}

/* ---------- the five scenes ---------- */

.scene {
  position: relative;
  height: var(--scene-h);
  overflow: hidden;
  background: var(--night);
}

.stage {
  position: absolute;
  z-index: 0;
  left: var(--fx, 50%);
  top: var(--fy, 50%);
  width: max(100%, calc(var(--scene-h) * 16 / 9));
  aspect-ratio: 16 / 9;
  translate: calc(var(--fx, 50%) * -1) calc(var(--fy, 50%) * -1);
}

.stage picture,
.stage img,
.fx,
.dark {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.stage img { object-fit: cover; }
.fx { pointer-events: none; }

.dark {
  background: #020104;
  opacity: 0;
  pointer-events: none;
}

.js .scene .stage {
  scale: 1.14;
  transition: scale 2.8s cubic-bezier(0.15, 0.8, 0.2, 1);
}
.js .scene.is-lit .stage { scale: 1.035; }
.js .dark { opacity: 1; }
.js .scene.is-lit .dark { animation: lights-on 2s linear forwards; }

@keyframes lights-on {
  0% { opacity: 1; }
  9% { opacity: 0.5; }
  12% { opacity: 0.94; }
  21% { opacity: 0.32; }
  24% { opacity: 0.82; }
  38% { opacity: 0.18; }
  100% { opacity: 0; }
}

.scene::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(180deg, var(--night) 0%, rgba(7, 6, 12, 0.5) 7%, rgba(7, 6, 12, 0) 20%, rgba(7, 6, 12, 0) 56%, rgba(7, 6, 12, 0.72) 84%, var(--night) 100%),
    var(--side, none),
    radial-gradient(140% 120% at 50% 45%, transparent 55%, rgba(4, 3, 8, 0.55) 100%);
}
.copy-right { --side: linear-gradient(270deg, rgba(7, 6, 12, 0.8) 0%, rgba(7, 6, 12, 0.46) 28%, rgba(7, 6, 12, 0) 54%); }
.copy-left { --side: linear-gradient(90deg, rgba(7, 6, 12, 0.8) 0%, rgba(7, 6, 12, 0.46) 28%, rgba(7, 6, 12, 0) 54%); }

.copy {
  position: absolute;
  z-index: 3;
  bottom: clamp(44px, 10svh, 120px);
  width: min(40vw, 37rem);
}
.copy-right .copy { right: clamp(24px, 6vw, 120px); }
.copy-left .copy { left: clamp(24px, 6vw, 120px); }

.genre {
  display: flex;
  align-items: center;
  gap: 0.8em;
  margin: 0 0 1rem;
  color: var(--accent);
  font: 600 0.86rem/1.25 "Space Grotesk", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  text-shadow: 0 1px 12px rgba(0, 0, 0, 0.8);
}
.genre::before {
  content: "";
  flex: none;
  width: 2.4em;
  height: 1px;
  background: currentColor;
  opacity: 0.75;
}

.scene-title {
  margin: 0;
  color: #f7f0e4;
  font: 400 clamp(2.6rem, 5.3vw, 6rem)/0.92 "Archivo Black", "Arial Black", sans-serif;
  letter-spacing: -0.01em;
  text-wrap: balance;
  text-shadow: 0 2px 0 rgba(0, 0, 0, 0.35), 0 18px 48px rgba(0, 0, 0, 0.65);
}
#curfew .scene-title { font-size: clamp(2.3rem, 4.5vw, 5.1rem); }

.line {
  max-width: 30ch;
  margin: 1.05rem 0 1.7rem;
  color: #f3eadc;
  font: italic 560 clamp(1.3rem, 2.05vw, 1.95rem)/1.2 Fraunces, Georgia, serif;
  font-variation-settings: "opsz" 72;
  text-wrap: balance;
  text-shadow: 0 2px 18px rgba(0, 0, 0, 0.75);
}

.play {
  display: inline-flex;
  align-items: center;
  gap: 0.75em;
  padding: 1em 1.65em;
  border: 1px solid color-mix(in srgb, var(--accent) 72%, transparent);
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 20%, rgba(10, 8, 16, 0.55));
  color: #fff;
  font: 700 0.84rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.16em;
  text-decoration: none;
  text-transform: uppercase;
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  transition: background 0.3s, box-shadow 0.3s, scale 0.3s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.play .arrow { transition: translate 0.3s cubic-bezier(0.2, 0.8, 0.2, 1); }
.play:hover,
.play:focus-visible {
  background: color-mix(in srgb, var(--accent) 38%, rgba(10, 8, 16, 0.5));
  box-shadow: 0 0 34px color-mix(in srgb, var(--accent) 55%, transparent), inset 0 0 12px color-mix(in srgb, var(--accent) 30%, transparent);
  scale: 1.04;
}
.play:hover .arrow,
.play:focus-visible .arrow { translate: 5px 0; }
.play:active { scale: 0.97; }

.js .scene .copy > * {
  opacity: 0;
  translate: 0 28px;
  transition: opacity 1s ease, translate 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}
.js .scene.is-lit .copy > * { opacity: 1; translate: 0 0; }
.js .scene.is-lit .copy > :nth-child(1) { transition-delay: 0.5s; }
.js .scene.is-lit .copy > :nth-child(2) { transition-delay: 0.62s; }
.js .scene.is-lit .copy > :nth-child(3) { transition-delay: 0.8s; }
.js .scene.is-lit .copy > :nth-child(4) { transition-delay: 0.96s; }

/* lights in the pictures */

.glow {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  width: calc(var(--r) * 2%);
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  mix-blend-mode: screen;
}
.glow.warm {
  background: radial-gradient(closest-side, rgba(255, 214, 140, 0.9), rgba(255, 140, 40, 0.42) 38%, rgba(255, 90, 10, 0.1) 70%, transparent);
  animation: flicker 2.6s infinite;
}
.glow.warm:nth-child(2n) { animation-duration: 3.3s; animation-delay: -1.2s; }
.glow.warm:nth-child(3n) { animation-duration: 1.9s; animation-delay: -0.4s; }
.glow.steady { animation: breathe 5s ease-in-out infinite; }
.glow.torch {
  background: radial-gradient(closest-side, rgba(255, 244, 210, 0.95), rgba(255, 205, 130, 0.38) 40%, transparent);
  animation: breathe 3.2s ease-in-out infinite;
}
.glow.eye {
  background: radial-gradient(closest-side, rgba(240, 252, 255, 1), rgba(130, 205, 255, 0.72) 32%, rgba(60, 140, 255, 0.16) 68%, transparent);
  animation: eye-pulse 2.8s ease-in-out infinite;
}
.glow.jelly {
  background: radial-gradient(closest-side, rgba(180, 255, 250, 0.8), rgba(40, 220, 230, 0.32) 45%, transparent);
  animation: breathe 4.2s ease-in-out infinite;
}
.glow.jelly + .glow.jelly { animation-delay: -1.7s; }
.glow.head {
  background: radial-gradient(closest-side, rgba(255, 248, 215, 0.95), rgba(255, 205, 120, 0.48) 28%, rgba(255, 160, 60, 0.13) 60%, transparent);
  animation: failing-bulb 7.5s infinite;
}

@keyframes flicker {
  0%, 100% { opacity: 0.9; scale: 1; }
  10% { opacity: 0.58; scale: 0.94; }
  14% { opacity: 1; scale: 1.05; }
  30% { opacity: 0.74; }
  47% { opacity: 0.96; scale: 1.02; }
  52% { opacity: 0.55; scale: 0.95; }
  66% { opacity: 0.9; }
  80% { opacity: 0.7; }
}
@keyframes breathe {
  0%, 100% { opacity: 0.6; scale: 0.92; }
  50% { opacity: 1; scale: 1.06; }
}
@keyframes eye-pulse {
  0%, 100% { opacity: 0.7; scale: 0.9; }
  45%, 55% { opacity: 1; scale: 1.14; }
}
@keyframes failing-bulb {
  0%, 60%, 63.5%, 66%, 87%, 90%, 100% { opacity: 1; }
  61.5% { opacity: 0.18; }
  65% { opacity: 0.4; }
  88.5% { opacity: 0.45; }
}

/* OLLY OLLY: the tall one is only there when you're not looking at it */
.haunt {
  position: absolute;
  inset: 0;
  background: url("/spooky/art/olly-olly-960.webp") 0 0 / 100% 100% no-repeat;
  translate: -9.5% 0;
  -webkit-mask-image: radial-gradient(8.5% 34% at 95.5% 33%, #000 64%, transparent 100%);
  mask-image: radial-gradient(8.5% 34% at 95.5% 33%, #000 64%, transparent 100%);
  opacity: 0;
}

/* STARSTRUCK: somebody is always taking a picture */
.flashes {
  position: absolute;
  inset: 0;
}
.flash {
  position: absolute;
  width: 2.4%;
  aspect-ratio: 1;
  border-radius: 50%;
  translate: -50% -50%;
  background: radial-gradient(closest-side, #fff, rgba(225, 238, 255, 0.75) 30%, rgba(170, 195, 255, 0.16) 62%, transparent);
  mix-blend-mode: screen;
  animation: flash 0.46s ease-out forwards;
}
.flash::before,
.flash::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 50%;
  width: 300%;
  height: 2px;
  translate: -50% -50%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.9), transparent);
}
.flash::after { rotate: 90deg; }

@keyframes flash {
  0% { opacity: 0; scale: 0.3; }
  12% { opacity: 1; scale: 1.15; }
  100% { opacity: 0; scale: 0.85; }
}

/* We Were Promised Morning: it almost comes */
.dawn {
  position: absolute;
  left: -15%;
  right: -15%;
  top: -14%;
  height: 54%;
  background: radial-gradient(50% 50% at 50% 56%, rgba(255, 190, 142, 0.95), rgba(255, 128, 122, 0.5) 38%, rgba(160, 96, 176, 0.18) 64%, transparent 78%);
  mix-blend-mode: screen;
  opacity: 0;
  animation: false-dawn 15s linear infinite;
  animation-delay: 1.5s;
}

@keyframes false-dawn {
  0% { opacity: 0; }
  14% { opacity: 0.06; }
  28% { opacity: 0.22; }
  40% { opacity: 0.56; }
  45% { opacity: 0.7; }
  47.5% { opacity: 0.74; }
  49.5% { opacity: 0.05; }
  52%, 100% { opacity: 0; }
}

/* BELFRY: you only see what makes a sound */
.echo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.56;
}

/* FETCH: the pet */
.pet {
  position: fixed;
  left: 0;
  top: 0;
  z-index: 5;
  width: 70px;
  height: 70px;
  margin: -35px 0 0 -35px;
  pointer-events: none;
  opacity: 0;
  filter: drop-shadow(0 0 14px rgba(140, 210, 255, 0.85)) drop-shadow(0 8px 12px rgba(0, 0, 0, 0.55));
  transition: opacity 0.5s;
  will-change: transform;
}
.pet.is-out { opacity: 1; }
.pet svg { display: block; width: 100%; height: 100%; overflow: visible; }

/* ---------- the end ---------- */

.end {
  position: relative;
  z-index: 3;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 1.2rem 2.8rem;
  padding: 40px 20px 88px;
  font: 600 0.78rem/1 "Space Grotesk", sans-serif;
  letter-spacing: 0.22em;
  text-transform: uppercase;
}
.pumpkin {
  position: absolute;
  z-index: 3;
  width: var(--pw, 64px);
  aspect-ratio: 100 / 84;
  pointer-events: none;
}
.pumpkin::before {
  content: "";
  position: absolute;
  inset: -90% -80% -40%;
  background: radial-gradient(closest-side, rgba(255, 150, 40, 0.42), rgba(255, 100, 20, 0.14) 55%, transparent);
  animation: candle 2.7s infinite;
}
.pumpkin::after {
  content: "";
  position: absolute;
  inset: 0;
  background: url("/spooky/pumpkin.svg") center / contain no-repeat;
  filter: drop-shadow(0 0 6px rgba(255, 140, 30, 0.45));
}
.end-pumpkin {
  position: relative;
  left: auto;
  bottom: auto;
  flex: 0 0 100%;
  max-width: 64px;
  margin: 0 auto 1.4rem;
  --pw: 64px;
}
.end a {
  color: var(--dim);
  text-decoration: none;
  transition: color 0.3s, text-shadow 0.3s;
}
.end a:hover,
.end a:focus-visible {
  color: #ffc06a;
  text-shadow: 0 0 14px rgba(255, 140, 40, 0.7);
}

/* ---------- phones: the picture, then the words ---------- */

@media (max-width: 760px) {
  .scene {
    height: auto;
    padding-top: calc(100vw * 9 / 16);
  }
  .stage {
    left: 0;
    top: 0;
    width: 100%;
    translate: none;
  }
  .scene::after {
    background:
      linear-gradient(180deg, var(--night) 0%, rgba(7, 6, 12, 0) 12%),
      linear-gradient(0deg, var(--night) 0%, rgba(7, 6, 12, 0) 34%) bottom / 100% calc(100vw * 9 / 16 * 0.55) no-repeat;
    top: 0;
    bottom: auto;
    height: calc(100vw * 9 / 16);
  }
  .copy,
  .copy-right .copy,
  .copy-left .copy {
    position: relative;
    inset: auto;
    width: auto;
    padding: 18px 20px 64px;
  }
  .scene-title { font-size: clamp(2.4rem, 11vw, 3.4rem); }
  #curfew .scene-title { font-size: clamp(2rem, 9vw, 2.8rem); }
  .pet { width: 44px; height: 44px; margin: -22px 0 0 -22px; }
}

/* ---------- less motion ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .grain,
  .fog::before,
  .title-light,
  .trailer-disc,
  .glow,
  .pumpkin::before,
  .grave:hover::before,
  .grave:focus-visible::before,
  .grave:hover::after,
  .grave:focus-visible::after { animation: none !important; }
  .dawn { display: none; }
  .js .scene .stage { scale: 1.035; transition: none; }
  .js .scene .copy > * { opacity: 1; translate: none; transition: none; }
  .js .dark,
  .js .scene.is-lit .dark { display: none; }
  .echo { display: none; }
}
