/* hauntedcollapsecus.com: colours are the game's own palette */
:root {
  --bg: #0b0614;
  --bg-2: #120a2e;
  --panel: #170d2b;
  --panel-2: #1f1240;
  --line: #2a1745;
  --text: #e8e4ff;
  --muted: #cdb4f9;
  --dim: #8d80b8;
  --yellow: #ffe066;
  --pink: #ff7ab6;
  --green: #3ddc97;
  --ink: #1a0f2e;
  --radius: 14px;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body {
  font: 17px/1.6 -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  overflow-x: hidden;
}
img { max-width: 100%; }
a { color: var(--yellow); }
.pixel, .logo, .nav-logo, h2 img, .tagline img, .btn img, .haunts img, .mascot, .bat {
  image-rendering: pixelated;
}

.skip { position: absolute; left: -999px; top: 8px; background: var(--yellow); color: var(--ink); padding: 8px 14px; border-radius: 8px; z-index: 10; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--yellow); outline-offset: 3px; border-radius: 6px; }

/* ---------- top bar ---------- */
.nav {
  position: sticky; top: 0; z-index: 5;
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 10px max(16px, env(safe-area-inset-left)) 10px max(16px, env(safe-area-inset-right));
  background: rgba(11, 6, 20, .86);
  backdrop-filter: blur(8px); -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--line);
}
.nav-home { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; }
.nav-home img:first-child { width: 27px; height: 27px; image-rendering: pixelated; }
.nav-logo { height: 18px; width: auto; }
.nav nav { display: flex; align-items: center; gap: 18px; font-size: 15px; }
.nav nav a { color: var(--muted); text-decoration: none; }
.nav nav a:hover { color: var(--text); }
.nav nav a.nav-play { color: var(--ink); background: var(--yellow); font-weight: 800; padding: 6px 14px; border-radius: 9px; }
@media (max-width: 560px) {
  .nav-logo { display: none; }
  .nav nav { gap: 14px; }
}

/* ---------- hero ---------- */
.hero {
  position: relative; overflow: hidden; isolation: isolate;
  min-height: min(760px, 92vh);
  display: grid; place-items: center;
  padding: 56px 16px 210px;
  background: linear-gradient(180deg, var(--bg-2) 0%, #26104a 62%, #0c0618 100%);
  text-align: center;
}
.sky { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; z-index: -2; }
.moon {
  position: absolute; z-index: -2; top: 8%; right: 9%;
  width: clamp(64px, 9vw, 110px); aspect-ratio: 1; border-radius: 50%;
  background:
    radial-gradient(circle at 34% 40%, rgba(200, 195, 150, .55) 0 11%, transparent 12%),
    radial-gradient(circle at 63% 66%, rgba(200, 195, 150, .5) 0 7%, transparent 8%),
    #f5f3ce;
  box-shadow: 0 0 60px rgba(245, 243, 206, .55);
}
.house {
  position: absolute; z-index: -1; left: 50%; bottom: -2px; transform: translateX(-50%);
  width: max(1000px, 100%); height: auto; pointer-events: none;
}
.bat { position: absolute; z-index: -1; width: 40px; height: auto; top: 18%; left: -60px; animation: fly 19s linear infinite; }
.bat-2 { width: 30px; top: 30%; animation-duration: 26s; animation-delay: -11s; }
@keyframes fly {
  0%   { transform: translate(0, 0); }
  25%  { transform: translate(28vw, -24px); }
  50%  { transform: translate(56vw, 10px); }
  75%  { transform: translate(84vw, -18px); }
  100% { transform: translate(calc(100vw + 120px), 0); }
}
.hero-inner { position: relative; max-width: 760px; }
.mascot { width: 92px; height: auto; animation: bob 3.2s ease-in-out infinite; filter: drop-shadow(0 0 18px rgba(201, 216, 245, .35)); }
@keyframes bob { 50% { transform: translateY(-12px); } }
h1 { margin: 6px 0 0; line-height: 0; }
.logo { width: min(640px, 88vw); height: auto; filter: drop-shadow(0 6px 0 rgba(0, 0, 0, .35)); }
.tagline { margin: 18px 0 0; line-height: 0; }
.tagline img { width: min(420px, 78vw); height: auto; }
.pitch { font-size: clamp(18px, 2.4vw, 22px); color: var(--text); margin: 22px auto 0; max-width: 32em; }
.pitch strong { color: var(--yellow); }
.actions { margin: 28px 0 0; }
.note { color: var(--dim); font-size: 14px; margin: 14px auto 0; max-width: 34em; }

/* chunky pixel button */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--yellow); border: 4px solid var(--ink); border-radius: 12px;
  padding: 16px 30px; box-shadow: 0 6px 0 #a8862a, 0 0 34px rgba(255, 224, 102, .35);
  transition: transform .08s ease, box-shadow .08s ease;
}
.btn img { height: 27px; width: auto; display: block; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #a8862a, 0 0 44px rgba(255, 224, 102, .5); }
.btn:active { transform: translateY(4px); box-shadow: 0 2px 0 #a8862a; }

/* ---------- screenshot band ---------- */
.shot-band { padding: 0 16px; margin-top: -120px; position: relative; z-index: 1; }
.screen { margin: 0 auto; max-width: 980px; }
.screen img, .steps img, .gallery img {
  display: block; width: 100%; height: auto;
  border: 3px solid var(--line); border-radius: var(--radius);
  box-shadow: 0 0 70px rgba(123, 44, 191, .35);
  background: #000;
}

/* ---------- sections ---------- */
.section { max-width: 1100px; margin: 0 auto; padding: 84px 16px 0; }
h2 { margin: 0 0 10px; line-height: 0; text-align: center; }
h2 img { height: 27px; width: auto; max-width: 92vw; }
.intro { text-align: center; color: var(--muted); max-width: 36em; margin: 14px auto 30px; }

.steps { list-style: none; padding: 0; margin: 34px 0 0; display: grid; gap: 22px; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.steps li { background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius); padding: 14px 14px 18px; }
.steps img { border-width: 2px; border-radius: 10px; box-shadow: none; }
.steps h3 { display: flex; align-items: center; gap: 10px; margin: 14px 4px 4px; font-size: 21px; color: var(--yellow); text-transform: uppercase; letter-spacing: .04em; }
.steps h3 span { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; background: var(--pink); color: var(--ink); font-size: 17px; }
.steps p { margin: 0 4px; color: var(--text); }

.haunts { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(138px, 1fr)); }
.haunts li {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 16px 10px 14px;
  transition: transform .15s ease, border-color .15s ease;
}
.haunts li:hover { transform: translateY(-4px); border-color: #4c3579; }
.haunts img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 10px; }
.haunts li:hover img { animation: bob 1s ease-in-out infinite; }
.haunts b { font-size: 15px; letter-spacing: .03em; text-transform: uppercase; }
.haunts span { font-size: 13px; color: var(--dim); }
.haunts .locked b { color: #6f639e; }

.floors { list-style: none; padding: 0; margin: 0; display: grid; gap: 10px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); counter-reset: none; }
.floors li {
  display: grid; grid-template-columns: 26px 1fr; grid-template-rows: auto auto; column-gap: 14px; align-items: center;
  background: var(--panel); border: 2px solid var(--line); border-radius: 12px; padding: 12px 14px; font-weight: 600;
}
.floors i { grid-row: 1 / 3; width: 22px; height: 32px; border-radius: 6px 6px 3px 3px; background: var(--door); box-shadow: 0 0 14px var(--door); position: relative; }
.floors i::after { content: ""; position: absolute; right: 4px; top: 15px; width: 3px; height: 3px; background: var(--ink); }
.floors span { font-size: 12px; font-weight: 500; color: var(--dim); text-transform: uppercase; letter-spacing: .06em; }
.floors .wing { border-color: #3d1d6b; background: linear-gradient(135deg, var(--panel), #241040); }
.floors .wing span { color: var(--pink); }
.d1 { --door: #b366ff; } .d2 { --door: #3ddc97; } .d3 { --door: #4cc9f0; } .d4 { --door: #ff9f1c; }
.d5 { --door: #ff4d6d; } .d6 { --door: #7bd93b; } .d7 { --door: #ff5fd0; } .d8 { --door: #ffd60a; }
.d9 { --door: #2ee6d6; } .d10 { --door: #ff5c8a; } .d11 { --door: #ff2ed1; } .d12 { --door: #ff7a1a; }
.d13 { --door: #ff2d55; } .d14 { --door: #2f7dff; }

.gallery-wrap { padding-top: 70px; }
.gallery {
  display: grid; grid-auto-flow: column; grid-auto-columns: min(78%, 520px); gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 14px;
  scrollbar-color: #4c3579 transparent;
}
.gallery img { scroll-snap-align: start; border-width: 2px; box-shadow: none; }

.cta { text-align: center; padding: 90px 16px 20px; }
.cta h2 img { height: 24px; }
.cta p { margin: 26px 0 0; }
.cta p.note { margin: 18px auto 0; }

/* ---------- footer ---------- */
.foot { text-align: center; color: var(--dim); font-size: 14px; padding: 60px 16px 40px; border-top: 1px solid var(--line); margin-top: 70px; }
.foot p { margin: 6px 0; }
.foot a { color: var(--muted); }
.copy { color: #6f639e; }

/* ---------- support / privacy pages ---------- */
.doc {
  max-width: 720px; margin: 36px auto 0;
  background: var(--panel); border: 2px solid var(--line); border-radius: var(--radius);
  padding: 30px 26px 24px; box-shadow: 0 0 60px rgba(123, 44, 191, .22);
}
.doc h1 { color: var(--yellow); font-size: 30px; line-height: 1.2; margin: 0 0 4px; }
.doc h2 { color: var(--pink); font-size: 20px; line-height: 1.3; margin: 28px 0 6px; text-align: left; }
.doc h3 { color: var(--muted); font-size: 17px; margin: 18px 0 2px; }
.doc ol { padding-left: 22px; }
.doc .date { color: var(--muted); margin-top: 0; font-size: 15px; }
@media (max-width: 560px) { .doc { margin: 20px 12px 0; padding: 24px 18px 20px; } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; scroll-behavior: auto !important; }
  .bat { display: none; }
}
