:root {
  --night: #0b0614;
  --night-2: #140a24;
  --purple: #2a1045;
  --violet: #6b2fa8;
  --lilac: #b98cff;
  --orange: #ff7a1a;
  --pumpkin: #ffa53c;
  --candle: #ffd27a;
  --slime: #8bff5e;
  --bone: #f6ead2;
  --muted: #c9b8dd;
  --card: rgba(30, 14, 52, 0.88);
  --line: rgba(255, 165, 60, 0.28);
  --radius: 22px;
  --font-spooky: "Creepster", "Impact", cursive;
  --font-body: "Fredoka", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; scroll-padding-top: 84px; }
body {
  font-family: var(--font-body);
  color: var(--bone);
  background:
    radial-gradient(1200px 700px at 80% -10%, rgba(255, 140, 40, 0.22), transparent 60%),
    radial-gradient(900px 600px at 0% 30%, rgba(107, 47, 168, 0.35), transparent 60%),
    radial-gradient(900px 700px at 100% 75%, rgba(107, 47, 168, 0.28), transparent 60%),
    linear-gradient(180deg, var(--night-2) 0%, var(--night) 40%, #07040d 100%);
  background-color: var(--night);
  min-height: 100vh;
  overflow-x: hidden;
  line-height: 1.6;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; cursor: pointer; }
a, button { -webkit-tap-highlight-color: transparent; touch-action: manipulation; }
/* Nothing may poke out sideways (the tilted ticker, the moon glow, the fog). On phones even a few
   extra pixels make the whole page wider than the screen: it drifts sideways, the menu button gets
   cut off and pinned things like the mascot jitter while scrolling. */
main, footer { overflow-x: clip; }
@supports not (overflow: clip) { main, footer { overflow-x: hidden; } }
strong { color: var(--pumpkin); }

/* ---------- Ambient ---------- */
#embers { position: fixed; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 1; }
.lightning {
  position: fixed; inset: 0; pointer-events: none; z-index: 2;
  background: radial-gradient(circle at 70% 10%, rgba(220, 200, 255, 0.55), transparent 60%);
  opacity: 0; will-change: opacity; /* keep its layer ready so a flash doesn't have to build it first */
}

.bats { position: fixed; inset: 0; pointer-events: none; z-index: 3; overflow: hidden; }
.bat { position: absolute; width: 54px; aspect-ratio: 2 / 1; color: #34195a; left: -80px; will-change: transform; }
.bat svg { display: block; width: 100%; height: 100%; animation: flap 0.28s ease-in-out infinite alternate; will-change: transform; }
@keyframes flap { from { transform: scaleY(1); } to { transform: scaleY(0.35); } }
.b1 { top: 14%; animation: fly 16s linear infinite; }
.b2 { top: 28%; width: 34px; animation: fly 22s linear 4s infinite; }
.b3 { top: 8%;  width: 42px; animation: fly 19s linear 9s infinite; }
.b4 { top: 46%; width: 28px; animation: fly 26s linear 2s infinite; }
.b5 { top: 20%; width: 64px; animation: fly 30s linear 14s infinite; }
@keyframes fly {
  0%   { transform: translate(0, 0) rotate(-4deg); }
  25%  { transform: translate(28vw, -6vh) rotate(6deg); }
  50%  { transform: translate(55vw, 4vh) rotate(-6deg); }
  75%  { transform: translate(82vw, -8vh) rotate(4deg); }
  100% { transform: translate(115vw, 2vh) rotate(-2deg); }
}

/* ---------- Nav ---------- */
.nav {
  position: fixed; top: 0; left: 0; right: 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 12px clamp(16px, 4vw, 48px);
}
/* the bar's background fades in on its own layer, so scrolling past the top only changes opacity */
.nav::before {
  content: ""; position: absolute; inset: 0; z-index: -1; pointer-events: none;
  background: rgba(11, 6, 20, 0.94);
  box-shadow: 0 1px 0 var(--line), 0 10px 30px rgba(0, 0, 0, 0.4);
  opacity: 0; transition: opacity 0.3s;
}
.nav.scrolled::before { opacity: 1; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-spooky); font-size: 26px; letter-spacing: 1px; color: var(--pumpkin); text-shadow: 0 0 18px rgba(255, 122, 26, 0.6); }
.brand img { width: 42px; height: 42px; border-radius: 50%; object-fit: cover; border: 2px solid var(--orange); box-shadow: 0 0 16px rgba(255, 122, 26, 0.6); }
.nav-links { display: flex; gap: 28px; font-weight: 500; }
.nav-links a { position: relative; color: var(--muted); transition: color 0.2s; }
.nav-links a::after { content: ""; position: absolute; left: 0; right: 0; bottom: -4px; height: 2px; background: var(--orange); transform: scaleX(0); transition: transform 0.25s; border-radius: 2px; }
.nav-links a:hover { color: var(--bone); }
.nav-links a:hover::after { transform: scaleX(1); }
.nav-right { display: flex; align-items: center; gap: 10px; }
.nav-socials { display: flex; gap: 8px; }
.mini { width: 40px; height: 40px; border-radius: 50%; background: var(--bone); display: grid; place-items: center; transition: transform 0.2s, box-shadow 0.2s; }
.mini img { width: 30px; height: 30px; }
.mini:hover { transform: translateY(-2px) rotate(-8deg); box-shadow: 0 0 18px rgba(255, 165, 60, 0.7); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  font-weight: 700; font-size: 17px; padding: 14px 26px; border-radius: 999px;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
  user-select: none;
}
.btn img { width: 26px; height: 26px; }
.btn-sm { padding: 10px 20px; font-size: 15px; }
.btn-pumpkin {
  color: #2a0f00;
  background: linear-gradient(180deg, #ffc067 0%, var(--orange) 70%, #e55a00 100%);
  box-shadow: 0 6px 0 #9a3a00, 0 0 30px rgba(255, 122, 26, 0.55);
}
.btn-pumpkin:hover { transform: translateY(-3px); box-shadow: 0 9px 0 #9a3a00, 0 0 46px rgba(255, 122, 26, 0.85); }
.btn-pumpkin:active { transform: translateY(3px); box-shadow: 0 2px 0 #9a3a00, 0 0 20px rgba(255, 122, 26, 0.6); }
.btn-ghost { color: var(--bone); border: 2px solid rgba(185, 140, 255, 0.55); background: rgba(107, 47, 168, 0.22); }
.btn-ghost img { background: var(--bone); border-radius: 50%; padding: 2px; }
.btn-ghost:hover { transform: translateY(-3px); background: rgba(107, 47, 168, 0.45); box-shadow: 0 0 30px rgba(185, 140, 255, 0.45); }

/* ---------- Hero ---------- */
.hero { position: relative; z-index: 4; padding: 110px clamp(16px, 4vw, 48px) 120px; max-width: 1280px; margin: 0 auto; }
.moon-glow { position: absolute; top: 40px; right: 6%; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 190, 90, 0.35), transparent 65%); will-change: transform, opacity; animation: breathe 6s ease-in-out infinite; pointer-events: none; }
@keyframes breathe { 50% { transform: scale(1.12); opacity: 0.7; } }

.banner-frame {
  position: relative; border-radius: var(--radius); padding: 6px;
  background: linear-gradient(135deg, var(--orange), var(--violet) 50%, var(--orange));
  box-shadow: 0 0 60px rgba(255, 122, 26, 0.35), 0 30px 80px rgba(0, 0, 0, 0.6);
}
.banner-frame img { border-radius: calc(var(--radius) - 6px); width: 100%; aspect-ratio: 3 / 1; object-fit: cover; }
.web { position: absolute; width: 90px; height: 90px; color: rgba(246, 234, 210, 0.55); z-index: 2; pointer-events: none; }
.web-tl { top: -14px; left: -14px; }
.web-tr { top: -14px; right: -14px; transform: scaleX(-1); }

.hero-grid { display: grid; grid-template-columns: 1.25fr 1fr; gap: 40px; align-items: center; margin-top: 56px; }
.eyebrow { display: inline-block; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; font-size: 14px; color: var(--candle); background: rgba(255, 122, 26, 0.12); border: 1px solid var(--line); padding: 6px 14px; border-radius: 999px; margin-bottom: 16px; }
.drip {
  font-family: var(--font-spooky); font-weight: 400; letter-spacing: 2px; line-height: 1.02;
  color: var(--pumpkin);
  text-shadow: 0 3px 0 #7a2c00, 0 0 28px rgba(255, 122, 26, 0.55);
}
h1.drip { animation: flicker 7s infinite; }
@keyframes flicker { 0%, 92%, 100% { opacity: 1; } 93% { opacity: 0.6; } 94% { opacity: 1; } 96% { opacity: 0.75; } }
h1.drip { font-size: clamp(48px, 7vw, 88px); }
h1.drip span { color: var(--slime); text-shadow: 0 3px 0 #1d5a0c, 0 0 30px rgba(139, 255, 94, 0.5); }
h2.drip { font-size: clamp(42px, 6vw, 72px); }
.lead { font-size: 19px; color: var(--muted); margin: 22px 0 30px; max-width: 580px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 16px; }

.cauldron-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px;
  box-shadow: 0 20px 60px rgba(0, 0, 0, 0.45), inset 0 1px 0 rgba(255, 255, 255, 0.06);
}
.card-label { font-size: 13px; font-weight: 600; letter-spacing: 2px; text-transform: uppercase; color: var(--lilac); margin-bottom: 12px; }
.countdown { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 26px; }
.tomb {
  background: linear-gradient(180deg, #4b3a5e, #2b1f3a); border-radius: 40px 40px 10px 10px;
  text-align: center; padding: 16px 4px 10px; border: 1px solid rgba(185, 140, 255, 0.25);
  box-shadow: inset 0 -6px 0 rgba(0, 0, 0, 0.25);
}
.tomb span { display: block; font-family: var(--font-spooky); font-size: clamp(30px, 4vw, 42px); color: var(--bone); line-height: 1; text-shadow: 0 0 14px rgba(255, 165, 60, 0.5); }
.tomb small { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.countdown.live { grid-template-columns: 1fr; }
.live-msg { font-family: var(--font-spooky); font-size: 40px; color: var(--slime); text-align: center; text-shadow: 0 0 24px rgba(139, 255, 94, 0.6); }
.ca {
  width: 100%; display: flex; align-items: center; justify-content: space-between; gap: 12px;
  background: rgba(0, 0, 0, 0.35); border: 1px dashed rgba(255, 165, 60, 0.5); border-radius: 14px;
  padding: 12px 12px 12px 16px; color: var(--bone); font: inherit; cursor: pointer; transition: border-color 0.2s, background 0.2s;
}
.ca:hover { border-color: var(--orange); background: rgba(255, 122, 26, 0.08); }
.ca code { font-family: ui-monospace, Consolas, monospace; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ca-copy { flex-shrink: 0; font-weight: 700; font-size: 14px; background: var(--orange); color: #2a0f00; padding: 6px 14px; border-radius: 999px; }

.social-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 16px; margin-top: 56px; }
.social {
  display: flex; align-items: center; gap: 12px; padding: 10px 22px 10px 10px; border-radius: 999px;
  background: var(--card); border: 1px solid var(--line); font-weight: 600; font-size: 17px;
  transition: transform 0.25s, box-shadow 0.25s, border-color 0.25s;
}
.social .ico { width: 52px; height: 52px; border-radius: 50%; background: var(--bone); display: grid; place-items: center; transition: transform 0.4s; }
.social .ico img { width: 40px; height: 40px; }
.social:hover { transform: translateY(-4px); border-color: var(--orange); box-shadow: 0 0 34px rgba(255, 122, 26, 0.45); }
.social:hover .ico { transform: rotate(-14deg) scale(1.08); }

.spider { position: absolute; top: 0; z-index: 5; display: flex; flex-direction: column; align-items: center; animation: dangle 7s ease-in-out infinite; transform-origin: top center; pointer-events: none; }
.spider .thread { width: 1px; height: 120px; background: linear-gradient(rgba(246, 234, 210, 0), rgba(246, 234, 210, 0.6)); }
.spider .body { font-size: 28px; margin-top: -4px; filter: drop-shadow(0 0 6px rgba(0, 0, 0, 0.8)); }
.s1 { left: 4%; }
.s2 { right: 24%; animation-delay: -3s; animation-duration: 9s; }
.s2 .thread { height: 70px; }
/* straight up-and-down only: rotating the spider while it hangs over the banner made the browser redraw the banner every frame */
@keyframes dangle { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(40px); } }

.fog { position: absolute; left: 50%; bottom: 0; width: 100vw; height: 200px; transform: translateX(-50%); overflow: hidden; pointer-events: none; }
.fog-a, .fog-b {
  position: absolute; bottom: -40px; width: 200%; height: 200px;
  background: radial-gradient(ellipse at 20% 60%, rgba(200, 180, 230, 0.16), transparent 50%),
              radial-gradient(ellipse at 60% 70%, rgba(200, 180, 230, 0.12), transparent 50%),
              radial-gradient(ellipse at 90% 60%, rgba(200, 180, 230, 0.14), transparent 50%);
  animation: drift 40s linear infinite; will-change: transform;
}
.fog-b { animation-duration: 60s; animation-direction: reverse; opacity: 0.7; bottom: -70px; }
@keyframes drift { from { transform: translateX(0); } to { transform: translateX(-50%); } }

/* ---------- Marquee ---------- */
.marquee {
  position: relative; z-index: 4; overflow: hidden; transform: rotate(-2deg); margin: 0 -20px;
  background: linear-gradient(90deg, var(--orange), #ff9a2e, var(--orange));
  border-block: 3px solid #12081c; box-shadow: 0 0 40px rgba(255, 122, 26, 0.45);
}
.marquee-track { display: flex; width: max-content; animation: scroll 28s linear infinite; will-change: transform; }
.marquee span { white-space: nowrap; font-family: var(--font-spooky); font-size: 30px; letter-spacing: 2px; color: #1a0a26; padding: 12px 0; }
.marquee i { font-style: normal; }
@keyframes scroll { to { transform: translateX(-50%); } }

/* ---------- Sections ---------- */
.section { position: relative; z-index: 4; padding: 110px clamp(16px, 4vw, 48px); max-width: 1200px; margin: 0 auto; }
.section-head { text-align: center; margin-bottom: 56px; }

.about-grid { display: grid; grid-template-columns: 1fr 1.1fr; gap: 64px; align-items: center; }
.portal { position: relative; aspect-ratio: 1; max-width: 480px; width: 100%; margin: 0 auto; }
.portal img { position: relative; z-index: 1; width: 100%; height: 100%; object-fit: cover; border-radius: 50%; border: 6px solid #12081c; }
.portal-ring {
  position: absolute; inset: -14px; border-radius: 50%;
  background: conic-gradient(var(--orange), var(--violet), var(--slime), var(--violet), var(--orange));
  animation: spin 10s linear infinite; will-change: transform;
  box-shadow: 0 0 80px rgba(255, 122, 26, 0.5);
}
@keyframes spin { to { transform: rotate(360deg); } }
.float-emoji { position: absolute; z-index: 2; font-size: 48px; animation: bob 4s ease-in-out infinite; will-change: transform; }
.e1 { top: 4%; left: -2%; }
.e2 { bottom: 2%; right: -4%; font-size: 60px; animation-delay: -1.3s; }
.e3 { top: 10%; right: 0; animation-delay: -2.4s; }
@keyframes bob { 50% { transform: translateY(-16px) rotate(8deg); } }
.about-copy p { color: var(--muted); font-size: 18px; margin: 22px 0 26px; }
.chips { list-style: none; display: flex; flex-wrap: wrap; gap: 10px; }
.chips li { background: rgba(107, 47, 168, 0.28); border: 1px solid rgba(185, 140, 255, 0.35); padding: 8px 16px; border-radius: 999px; font-weight: 500; }

.coven-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.char-card {
  background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 16px 26px;
  text-align: center; transition: transform 0.35s, box-shadow 0.35s;
}
.char-card:hover { transform: translateY(-10px) rotate(-1deg); box-shadow: 0 24px 60px rgba(0, 0, 0, 0.5), 0 0 40px rgba(255, 122, 26, 0.3); }
.char-img {
  aspect-ratio: 4 / 5; border-radius: 16px; margin-bottom: 18px;
  background-image: url("assets/img/mascot.jpg"); background-size: 290% auto; background-repeat: no-repeat;
  box-shadow: inset 0 -60px 60px -20px rgba(11, 6, 20, 0.85);
  transition: background-size 0.5s;
}
.char-card:hover .char-img { background-size: 310% auto; }
.c-shib { background-position: 4% 62%; }
.c-doge { background-position: 46% 58%; }
.c-pepe { background-position: 88% 62%; }
.char-card h3 { font-family: var(--font-spooky); font-weight: 400; font-size: 32px; letter-spacing: 1px; color: var(--pumpkin); }
.char-card:nth-child(3) h3 { color: var(--slime); }
.char-card:nth-child(2) h3 { color: var(--lilac); }
.char-card p { color: var(--muted); margin-top: 6px; }

.tomb-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; }
.gravestone {
  position: relative; text-align: center; padding: 44px 16px 30px;
  background: linear-gradient(180deg, #5a4a6e 0%, #3a2c4d 60%, #2a1f3a 100%);
  border-radius: 120px 120px 14px 14px; border: 2px solid rgba(185, 140, 255, 0.25);
  box-shadow: inset 0 -10px 0 rgba(0, 0, 0, 0.25), 0 20px 40px rgba(0, 0, 0, 0.45);
  transition: transform 0.3s;
}
.gravestone::after { content: ""; position: absolute; left: -10%; right: -10%; bottom: -14px; height: 22px; background: radial-gradient(ellipse, #1e3b12 30%, transparent 70%); }
.gravestone:hover { transform: translateY(-8px) rotate(1.5deg); }
.g-ico { font-size: 40px; display: block; margin-bottom: 6px; }
.gravestone strong { display: block; font-family: var(--font-spooky); font-weight: 400; font-size: clamp(34px, 4vw, 46px); color: var(--bone); letter-spacing: 1px; text-shadow: 0 0 18px rgba(255, 165, 60, 0.45); }
.gravestone small { color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: 1.5px; font-size: 13px; }

.steps { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; counter-reset: s; }
.step { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 48px 22px 26px; }
.step-n {
  position: absolute; top: -26px; left: 22px; width: 54px; height: 54px; border-radius: 50%;
  display: grid; place-items: center; font-family: var(--font-spooky); font-size: 30px; color: #2a0f00;
  background: radial-gradient(circle at 35% 30%, #ffd08a, var(--orange) 60%, #c44a00);
  box-shadow: 0 0 24px rgba(255, 122, 26, 0.7);
}
.step h3 { font-size: 21px; font-weight: 700; margin-bottom: 8px; }
.step p { color: var(--muted); }

.timeline { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; position: relative; }
.timeline::before { content: ""; position: absolute; top: 36px; left: 12%; right: 12%; height: 3px; background: repeating-linear-gradient(90deg, var(--orange) 0 14px, transparent 14px 26px); opacity: 0.6; }
.phase { position: relative; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 28px 26px; text-align: center; }
.phase-moon { display: grid; place-items: center; width: 72px; height: 72px; margin: -64px auto 14px; font-size: 44px; background: var(--night); border: 2px solid var(--line); border-radius: 50%; box-shadow: 0 0 30px rgba(255, 190, 90, 0.35); }
.phase h3 { font-size: 21px; color: var(--candle); margin-bottom: 12px; }
.phase ul { list-style: none; color: var(--muted); display: grid; gap: 8px; }
.phase li::before { content: "🦇 "; }
.roadmap .timeline { margin-top: 40px; }

.join-card {
  position: relative; text-align: center; padding: 70px clamp(20px, 5vw, 60px);
  border-radius: 32px; border: 2px solid var(--line);
  background: radial-gradient(600px 300px at 50% 0%, rgba(255, 122, 26, 0.25), transparent 70%), var(--card);
  box-shadow: 0 0 80px rgba(107, 47, 168, 0.35);
}
.join-card p { color: var(--muted); font-size: 19px; max-width: 560px; margin: 18px auto 0; }
.join-card .social-row { margin-top: 36px; }

/* ---------- Footer ---------- */
.footer { position: relative; z-index: 4; text-align: center; padding: 60px 20px 40px; border-top: 1px solid var(--line); background: linear-gradient(180deg, transparent, rgba(0, 0, 0, 0.5)); }
.pumpkins { font-size: 34px; letter-spacing: 12px; margin-bottom: 14px; animation: flicker 5s infinite; }
.brand-foot { font-family: var(--font-spooky); font-size: 40px; color: var(--pumpkin); text-shadow: 0 0 20px rgba(255, 122, 26, 0.5); }
.disclaimer { max-width: 720px; margin: 14px auto; color: #8e7fa3; font-size: 14px; }
.copy { color: #6d6082; font-size: 13px; }

/* ---------- Toast & click candy ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 140%); z-index: 100;
  background: #1a0d2c; border: 1px solid var(--orange); color: var(--bone); font-weight: 600;
  padding: 14px 22px; border-radius: 999px; box-shadow: 0 0 30px rgba(255, 122, 26, 0.45);
  transition: transform 0.35s cubic-bezier(.2, 1.4, .4, 1); white-space: nowrap; max-width: calc(100vw - 32px);
}
.toast.show { transform: translate(-50%, 0); }
.candy { position: fixed; z-index: 90; pointer-events: none; font-size: 24px; animation: pop 1s ease-out forwards; }
@keyframes pop { to { transform: translate(var(--dx), var(--dy)) rotate(var(--rot)); opacity: 0; } }

/* ---------- Easter egg: Candy Rush ---------- */
.egg { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; line-height: 1; }
.float-emoji.egg { font-size: 60px; }
.egg:focus-visible { animation: wiggle 0.5s ease-in-out infinite; outline: none; }
@media (hover: hover) { .egg:hover { animation: wiggle 0.5s ease-in-out infinite; } }
@keyframes wiggle { 0%, 100% { transform: rotate(0) scale(1.1); } 25% { transform: rotate(-14deg) scale(1.15); } 75% { transform: rotate(14deg) scale(1.15); } }
.pumpkins .egg { font-size: 34px; display: inline-block; }
.hint { color: #6d6082; font-size: 13px; font-style: italic; margin-bottom: 6px; }

.game { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; padding: 16px; background: rgba(7, 4, 13, 0.94); animation: fade-in 0.25s ease; }
.game[hidden], .game-screen[hidden], .g-newbest[hidden] { display: none; }
@keyframes fade-in { from { opacity: 0; } }
.game-card {
  position: relative; width: min(560px, 100%); border-radius: 26px; padding: 14px;
  background: linear-gradient(180deg, #1e0f33, #120822); border: 2px solid var(--orange);
  box-shadow: 0 0 60px rgba(255, 122, 26, 0.4);
}
.game-close {
  position: absolute; top: -14px; right: -14px; z-index: 3; width: 40px; height: 40px; border-radius: 50%;
  border: 2px solid var(--orange); background: #1a0d2c; color: var(--bone); font-size: 18px; cursor: pointer;
}
.game-close:hover { background: var(--orange); color: #2a0f00; }
.game-hud { display: flex; justify-content: space-between; align-items: center; padding: 4px 10px 12px; font-weight: 600; font-size: 18px; }
.game-hud b { font-family: var(--font-spooky); font-weight: 400; font-size: 26px; color: var(--pumpkin); letter-spacing: 1px; }
#g-lives { font-size: 22px; letter-spacing: 2px; }
.g-lives-wrap { display: flex; flex-direction: column; align-items: center; gap: 2px; line-height: 1.1; }
.g-drops { font-size: 12px; letter-spacing: 4px; color: #ff6b6b; }
.g-drops.bump { animation: drop-bump 0.35s ease; }
@keyframes drop-bump { 50% { transform: scale(1.5); } }
.game-stage { position: relative; border-radius: 16px; overflow: hidden; }
#game-canvas { display: block; width: 100%; touch-action: none; cursor: none; }
.game-screen {
  position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 12px; padding: 20px; text-align: center; background: rgba(11, 6, 20, 0.72);
}
.game-screen .eyebrow { margin-bottom: 0; }
.game-screen h2.drip { font-size: clamp(44px, 10vw, 64px); }
.g-legend { list-style: none; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; max-width: 420px; }
.g-legend li { background: rgba(107, 47, 168, 0.3); border: 1px solid rgba(185, 140, 255, 0.35); padding: 6px 12px; border-radius: 999px; font-size: 15px; }
.g-legend li.bad { border-color: rgba(255, 90, 90, 0.5); background: rgba(160, 30, 30, 0.25); }
.g-how { color: var(--muted); font-size: 15px; margin-bottom: 4px; }
.g-final { font-size: 20px; }
.g-final b { font-family: var(--font-spooky); font-weight: 400; font-size: 44px; color: var(--slime); vertical-align: -4px; }
.g-newbest { color: var(--candle); font-weight: 700; animation: flicker 2s infinite; }
.g-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 6px; }
/* Pumpy waving on the start screen / tumbling on the game-over screen (only when the game area is tall enough) */
.g-pumpy { display: none; height: 104px; width: auto; max-width: none; margin-bottom: -6px; }
.roomy .g-pumpy { display: block; }
.g-save { font-size: 14px; color: var(--muted); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; margin-top: 2px; }
.g-save:hover { color: var(--bone); }
.g-save[hidden] { display: none; }
body.game-open { overflow: hidden; }
body.game-open main *, body.game-open .bats, body.game-open .bats *, body.game-open .footer * { animation-play-state: paused !important; }

/* ---------- Game discoverability ---------- */
.nav-links .nav-play { color: var(--slime); font-weight: 600; }
.nav-links .nav-play::after { background: var(--slime); }

.play-chip {
  margin-top: 22px; background: rgba(139, 255, 94, 0.08); border: 1px dashed rgba(139, 255, 94, 0.5);
  color: var(--bone); font: inherit; font-weight: 500; font-size: 15px; padding: 9px 16px; border-radius: 999px; cursor: pointer;
  transition: background 0.2s, border-color 0.2s, transform 0.2s;
}
.play-chip u { color: var(--slime); text-underline-offset: 3px; }
.play-chip:hover { background: rgba(139, 255, 94, 0.16); border-color: var(--slime); transform: translateY(-2px); }

.float-emoji.egg::after {
  content: ""; position: absolute; inset: -8px; border-radius: 50%;
  border: 3px solid var(--slime); animation: ping 1.8s ease-out infinite; pointer-events: none;
}
@keyframes ping { from { transform: scale(0.7); opacity: 0.9; } to { transform: scale(1.5); opacity: 0; } }
.egg-tip {
  position: absolute; z-index: 3; right: -6%; bottom: calc(2% + 92px);
  background: var(--slime); color: #0f2a05; border: 0; font: inherit; font-weight: 700; font-size: 15px;
  padding: 8px 14px; border-radius: 14px; cursor: pointer; white-space: nowrap;
  box-shadow: 0 6px 20px rgba(139, 255, 94, 0.35); animation: bob 4s ease-in-out -1.3s infinite;
}
.egg-tip::after { content: ""; position: absolute; right: 30px; bottom: -8px; border: 8px solid transparent; border-bottom: 0; border-top-color: var(--slime); }
.egg-tip:hover { filter: brightness(1.1); }
.hint-link { color: var(--slime); font-style: normal; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; padding: 10px 4px; margin: -10px -4px; } /* bigger tap area, same look */
.hint-link:hover { animation: none; }

.teaser-card {
  display: grid; grid-template-columns: 1.2fr 1fr; gap: 40px; align-items: center;
  padding: clamp(28px, 5vw, 56px); border-radius: 32px;
  background: radial-gradient(500px 300px at 85% 50%, rgba(139, 255, 94, 0.14), transparent 70%), var(--card);
  border: 2px solid rgba(139, 255, 94, 0.35); box-shadow: 0 0 60px rgba(139, 255, 94, 0.12);
}
.teaser-copy h2.drip { color: var(--slime); text-shadow: 0 3px 0 #1d5a0c, 0 0 28px rgba(139, 255, 94, 0.45); }
.teaser-copy p { color: var(--muted); font-size: 18px; margin: 16px 0 20px; }
.teaser-legend { justify-content: flex-start; margin-bottom: 28px; }
.btn-play { font-size: 20px; padding: 16px 34px; }
.teaser-scene {
  position: relative; aspect-ratio: 4 / 5; width: 100%; max-width: 340px; justify-self: center; overflow: hidden; cursor: pointer;
  border-radius: 22px; border: 2px solid var(--line); font: inherit;
  background: radial-gradient(circle at 75% 18%, #ffcf7a 0 11%, rgba(255, 190, 90, 0.25) 12%, transparent 35%),
              linear-gradient(180deg, #2a1045, #140a24 70%, #07040d);
}
.drop { position: absolute; top: -50px; font-size: 34px; animation: fall 3s linear infinite; will-change: transform; }
.d1 { left: 18%; }
.d2 { left: 42%; animation-delay: -0.6s; animation-duration: 2.6s; }
.d3 { left: 66%; animation-delay: -1.4s; }
.d4 { left: 30%; animation-delay: -2.1s; animation-duration: 3.4s; }
.d5 { left: 78%; animation-delay: -2.6s; animation-duration: 2.8s; }
@keyframes fall { from { transform: translateY(0) rotate(0); } to { transform: translateY(480px) rotate(200deg); } }
.scene-bucket { position: absolute; left: 50%; bottom: 14px; font-size: 64px; transform: translateX(-50%); animation: slide 3s ease-in-out infinite alternate; }
@keyframes slide { from { transform: translateX(-110%); } to { transform: translateX(10%); } }
.scene-play {
  position: absolute; left: 50%; top: 50%; width: 76px; height: 76px; margin: -38px 0 0 -38px; border-radius: 50%;
  display: grid; place-items: center; padding-left: 6px; font-size: 30px; color: #2a0f00;
  background: radial-gradient(circle at 35% 30%, #ffd08a, var(--orange) 60%, #c44a00);
  box-shadow: 0 0 0 8px rgba(255, 122, 26, 0.25), 0 0 40px rgba(255, 122, 26, 0.7); transition: transform 0.2s;
}
.teaser-scene:hover .scene-play { transform: scale(1.12); }

@media (max-width: 980px) {
  .teaser-card { grid-template-columns: 1fr; }
  .teaser-scene { max-width: 300px; aspect-ratio: 1; }
}
@media (max-width: 640px) {
  .egg-tip { right: 0; font-size: 14px; bottom: calc(2% + 76px); }
  .btn-play { width: 100%; }
  .play-chip { font-size: 14px; }
}

/* ---------- Mascot ---------- */
.mascot {
  --s: 0.62; --dir: 1;
  position: fixed; left: 0; bottom: calc(6px + env(safe-area-inset-bottom, 0px)); z-index: 45;
  width: calc(200px * var(--s)); height: calc(266px * var(--s));
  pointer-events: none; will-change: transform;
}
.mascot-body {
  position: absolute; left: 50%; bottom: 0; width: 200px; height: 266px; margin-left: -100px;
  transform-origin: 50% 100%; transform: scale(calc(var(--s) * var(--dir)), var(--s));
}
.mascot-body img { pointer-events: auto; cursor: pointer; -webkit-user-drag: none; user-select: none; }
.rig, .rig-inner { position: absolute; inset: 0; transform-origin: 50% 100%; }
/* parts moved every frame while walking get their own layers, so walking never repaints the whole character */
.rig, .leg, .arm-l, .arm-r, .head { will-change: transform; }
.rig-inner { animation: rig-breathe 2.8s ease-in-out infinite; }
@keyframes rig-breathe { 50% { transform: scaleY(1.025); } }
.p { position: absolute; display: block; }
.tail  { left: 4px; top: 172px; width: 64px; transform-origin: 100% 40%; /* base tucked behind the robe, only the tip pokes out */ animation: wag 0.9s ease-in-out infinite alternate; }
.walking .tail { animation-duration: 0.32s; }
@keyframes wag { from { rotate: -8deg; } to { rotate: 12deg; } }
.leg   { transform-origin: 50% 8%; }
.leg-l { left: 44px; top: 168px; width: 52px; }
.leg-r { left: 104px; top: 175px; width: 52px; }
.torso { left: 10px; top: 70px; width: 179px; height: 160px; }
/* near arm (with bucket) sits on the left shoulder in front of the robe; far arm hangs behind the robe */
.arm-l { left: 26px; top: 110px; width: 57px; height: 122px; transform-origin: 71% 11%; }
.arm-l img { position: absolute; left: 0; top: 0; width: 57px; }
.arm-l .bucket { left: -8px; top: 100px; width: 72px; }
.arm-r { left: 128px; top: 114px; width: 52px; transform-origin: 39% 13%; }
.head  { left: 40px; top: 6px; width: 120px; height: 118px; transform-origin: 50% 90%; }
/* every face is on the page already (decoded once); changing expression just flips which one is visible */
.head img { position: absolute; left: 0; top: 0; width: 100%; }
/* hide only the unused faces; the current one inherits from the body, so it also hides while a pose plays */
.head img:not(.on) { visibility: hidden; }

.pose { visibility: hidden; position: absolute; left: 50%; bottom: 2px; transform: translateX(-50%); max-width: none; }
.posing .rig { visibility: hidden; }
.posing .pose.on { visibility: visible; }
.mascot[data-pose="peek"] .pose { left: 0; transform: none; }
.mascot[data-pose="jump"] .pose { animation: pose-jump 0.6s ease-in-out infinite alternate; }
@keyframes pose-jump { to { translate: 0 -18px; } }
.mascot[data-pose="wave"] .pose { animation: pose-sway 0.8s ease-in-out infinite alternate; transform-origin: 50% 100%; }
@keyframes pose-sway { from { rotate: -3deg; } to { rotate: 3deg; } }
.tumble .pose { animation: tumble 1s ease-out; }
@keyframes tumble { 0% { rotate: 0deg; } 60% { rotate: 380deg; translate: 0 -30px; } 100% { rotate: 360deg; } }

.mascot-bubble {
  position: absolute; left: 0; bottom: calc(266px * var(--s) + 10px);
  width: max-content; max-width: min(240px, 70vw); padding: 10px 14px; border-radius: 16px;
  background: var(--bone); color: #1a0a26; font-weight: 600; font-size: 15px; line-height: 1.35;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45), 0 0 0 3px rgba(255, 122, 26, 0.6);
  opacity: 0; transform: translateY(8px) scale(0.9); transform-origin: 20% 100%;
  transition: opacity 0.2s, transform 0.25s cubic-bezier(.2, 1.4, .4, 1); pointer-events: none;
}
.mascot-bubble::after { content: ""; position: absolute; left: 24px; bottom: -9px; border: 9px solid transparent; border-bottom: 0; border-top-color: var(--bone); }
.mascot-bubble.show { opacity: 1; transform: none; pointer-events: auto; }
.mascot-bubble.clickable { cursor: pointer; background: var(--slime); }
.mascot-bubble.clickable::after { border-top-color: var(--slime); }
.bubble-left .mascot-bubble { left: auto; right: 0; transform-origin: 80% 100%; }
.bubble-left .mascot-bubble::after { left: auto; right: 24px; }

.zzz { position: absolute; left: 60%; bottom: calc(240px * var(--s)); display: none; font-family: var(--font-spooky); color: var(--lilac); pointer-events: none; }
.sleeping .zzz { display: block; }
.zzz i { position: absolute; font-style: normal; opacity: 0; animation: zzz 2.4s ease-out infinite; }
.zzz i:nth-child(1) { font-size: 16px; }
.zzz i:nth-child(2) { font-size: 22px; animation-delay: 0.8s; }
.zzz i:nth-child(3) { font-size: 30px; animation-delay: 1.6s; }
@keyframes zzz { 0% { opacity: 0; transform: translate(0, 0); } 20% { opacity: 1; } 100% { opacity: 0; transform: translate(26px, -50px); } }
.sleeping .rig-inner { animation-duration: 4.5s; }
body.game-open .mascot { display: none; }


/* ---------- Reveal ---------- */
.reveal { opacity: 0; transform: translateY(40px); transition: opacity 0.8s ease, transform 0.8s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .nav-links { display: none; }
  .hero-grid, .about-grid { grid-template-columns: minmax(0, 1fr); } /* minmax(0,…) lets the column shrink to the screen instead of to its widest child */
  .about-grid { gap: 48px; }
  .tomb-grid, .steps { grid-template-columns: repeat(2, 1fr); }
  .steps { row-gap: 46px; }
  .coven-grid { grid-template-columns: repeat(3, 1fr); gap: 16px; }
  .timeline { grid-template-columns: 1fr; gap: 64px; }
  .timeline::before { display: none; }
}
@media (max-width: 640px) {
  .nav-socials { display: none; }
  .brand span { font-size: 22px; }
  .hero { padding-top: 92px; }
  .banner-frame img { aspect-ratio: auto; }
  .web { width: 60px; height: 60px; }
  .lead { font-size: 17px; }
  .cta-row .btn { flex: 1 1 100%; }
  .coven-grid { grid-template-columns: 1fr; }
  .char-img { aspect-ratio: 5 / 4; }
  .c-shib { background-position: 4% 66%; }
  .c-doge { background-position: 46% 62%; }
  .c-pepe { background-position: 88% 66%; }
  .tomb-grid { gap: 14px; }
  .gravestone { padding: 34px 10px 24px; }
  .steps { grid-template-columns: 1fr; }
  .social { flex: 1 1 calc(50% - 8px); gap: 8px; padding-right: 10px; font-size: 14px; white-space: nowrap; }
  .social .ico { width: 42px; height: 42px; }
  .social .ico img { width: 32px; height: 32px; }
  .marquee span { font-size: 22px; }
  .section { padding-top: 80px; padding-bottom: 80px; }
  .float-emoji { font-size: 36px; }
  .float-emoji.egg { font-size: 48px; }
  .e2 { right: 2%; } /* keep the secret game pumpkin fully on screen */
  .s2 { display: none; }
}

/* Touch screens: a tap leaves :hover stuck on, so drop the lift/wiggle hover effects and give a press effect instead */
@media (hover: none) {
  .btn:hover, .mini:hover, .social:hover, .social:hover .ico, .char-card:hover, .gravestone:hover,
  .play-chip:hover, .teaser-scene:hover .scene-play { transform: none; }
  .char-card:hover .char-img { background-size: 290% auto; }
  .btn:active, .social:active, .play-chip:active, .mini:active { transform: scale(0.96); }
}
@media (max-width: 420px) {
  .nav { padding: 10px 14px; }
  .brand { gap: 8px; }
  .brand img { width: 36px; height: 36px; }
  .brand span { font-size: 19px; }
  .btn-sm { padding: 9px 15px; font-size: 14px; }
  .mascot-bubble { font-size: 13px; padding: 8px 12px; max-width: min(210px, 64vw); }
  .hero { padding-left: 16px; padding-right: 16px; }
  .cauldron-card { padding: 20px 16px; }
  .countdown { gap: 6px; }
  .tomb small { font-size: 10px; letter-spacing: 0.5px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .bats, #embers { display: none; }
  .reveal { opacity: 1; transform: none; }
}
