/* Little Haunt site theme — mirrors the in-game hub: flat day-park sky,
   cream candy cards, Baloo 2 display + Fredoka body. Flat colours only. */

@font-face {
  font-family: "Fredoka";
  font-weight: 300 700;
  font-style: normal;
  font-display: swap;
  src: url("Fredoka-latin.woff2") format("woff2");
}
@font-face {
  font-family: "Baloo 2";
  font-weight: 800;
  font-style: normal;
  font-display: swap;
  src: url("Baloo2-800.woff2") format("woff2");
}

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

:root {
  --sky: #8CBEE6;
  --sky-deep: #6FABDD;
  --ink: #232C4E;
  --ink-soft: #44528A;
  --cream: #FFF6E8;
  --cream-line: #EADFCB;
  --green: #3FD8A4;
  --green-edge: #1E9A70;
  --green-ink: #06402c;
  --gold: #FFC53D;
  --gold-ink: #4d3400;
  --pink: #FF6FA9;
  --pink-edge: #C93A78;
  --pink-ink: #4d0630;
  --purple: #9B6BFF;
  --purple-edge: #6A3DD8;
  --red: #FF5A5A;
}

html, body { min-height: 100%; }

html { overflow-x: hidden; }

body {
  background: var(--sky);
  color: var(--ink);
  font-family: "Fredoka", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-weight: 500;
  overflow-x: hidden;
  text-align: center;
}

h1, h2, h3, .display {
  font-family: "Baloo 2", "Fredoka", system-ui, sans-serif;
  font-weight: 800;
}

a { color: var(--purple-edge); }

img { max-width: 100%; height: auto; }

.wrap {
  position: relative;
  max-width: 860px;
  width: 100%;
  margin: 0 auto;
  padding: 0 22px;
}

/* ---------- hero ---------- */

.hero {
  position: relative;
  overflow: hidden;
  padding: 56px 0 0;
}
.hero .wrap { position: relative; z-index: 2; }

.cloud {
  position: absolute;
  background: #FFFFFF;
  opacity: 0.85;
  border-radius: 999px;
  pointer-events: none;
  animation: cloud-drift linear infinite;
}
.cloud::before, .cloud::after {
  content: "";
  position: absolute;
  background: inherit;
  border-radius: 50%;
}
.cloud::before { width: 55%; height: 160%; left: 12%; bottom: 18%; }
.cloud::after  { width: 42%; height: 120%; right: 14%; bottom: 25%; }
.cloud.c1 { width: 150px; height: 44px; top: 9%;  left: -160px; animation-duration: 52s; }
.cloud.c2 { width: 100px; height: 32px; top: 22%; left: -110px; animation-duration: 74s; animation-delay: -30s; opacity: 0.7; }
.cloud.c3 { width: 190px; height: 52px; top: 4%;  left: -200px; animation-duration: 95s; animation-delay: -60s; opacity: 0.6; }
@keyframes cloud-drift {
  to { transform: translateX(calc(100vw + 260px)); }
}

.hero-ghost {
  width: min(210px, 52vw);
  animation: bob 3.4s ease-in-out infinite;
  filter: drop-shadow(0 10px 0 rgba(35, 44, 78, 0.12));
}
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-13px); }
}

.hero h1 {
  margin-top: 4px;
  font-size: clamp(42px, 9.5vw, 76px);
  letter-spacing: 1.5px;
  color: var(--cream);
  text-shadow: 0 4px 0 rgba(35, 44, 78, 0.4);
}

.tag {
  margin-top: 6px;
  font-size: clamp(16px, 3.4vw, 21px);
  color: var(--ink);
  font-weight: 600;
}

.coins {
  margin: 14px auto 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  flex-wrap: wrap;
  max-width: 100%;
  gap: 8px;
  color: var(--gold-ink);
  background: var(--gold);
  border: 2px solid rgba(77, 52, 0, 0.25);
  padding: 6px 16px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 14.5px;
}
.coins img { width: 24px; height: 24px; animation: coinspin 2.6s linear infinite; }
@keyframes coinspin { to { transform: rotateY(360deg); } }

/* candy store buttons — same construction as the in-game .btn */
.stores {
  position: relative;
  z-index: 3;
  margin-top: 30px;
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
}
.store {
  position: relative;
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 196px;
  padding: 14px 26px 16px;
  border: none;
  border-radius: 20px;
  --ring: #FFF6E8;
  --edge: #6A3DD8;
  --face: #9B6BFF;
  background: var(--face);
  color: var(--cream);
  text-decoration: none;
  box-shadow: 0 0 0 3px var(--ring), 0 6px 0 var(--edge);
}
a.store { cursor: pointer; transition: transform 0.12s ease, box-shadow 0.12s ease; }
a.store:hover { transform: translateY(-2px); box-shadow: 0 0 0 3px var(--ring), 0 8px 0 var(--edge); }
a.store:active { transform: translateY(3px); box-shadow: 0 0 0 3px var(--ring), 0 3px 0 var(--edge); }
a.store:focus-visible { outline: 3px solid var(--gold); outline-offset: 4px; }
.store.play-store {
  --face: #FF6FA9;
  --edge: #C93A78;
}
.store .name {
  font-family: "Baloo 2", "Fredoka", sans-serif;
  font-weight: 800;
  font-size: 19px;
  text-shadow: 0 1px 0 rgba(0, 0, 0, 0.2);
}
@media (max-width: 480px) {
  .stores { gap: 12px; }
  .store { min-width: 148px; padding: 12px 16px 14px; }
  .store .name { font-size: 17px; }
  .coins { font-size: 13px; padding: 5px 12px; }
}

.soon {
  font-size: 11.5px;
  font-weight: 700;
  padding: 3px 12px;
  border-radius: 999px;
  background: var(--green);
  color: var(--green-ink);
  border: 1px solid var(--green-edge);
  letter-spacing: 0.05em;
}
.soon.live { background: var(--gold); color: var(--gold-ink); border-color: rgba(77, 52, 0, 0.35); }

/* layered park scene along the hero's bottom, straight from the game art.
   Hills live in a clipped band so only their tops show above the ground —
   the raw layers are much taller than the horizon they draw. */
.scene {
  position: relative;
  height: clamp(150px, 24vw, 230px);
  margin-top: 30px;
  pointer-events: none;
}
.scene img { position: absolute; bottom: 0; }
.scene .hills-band {
  position: absolute;
  left: 0; right: 0;
  bottom: 14%;
  height: 62%;
  overflow: hidden;
}
.scene .hills-band img {
  position: absolute;
  bottom: auto;
  left: 50%;
  transform: translateX(-50%);
  max-width: none;
}
.scene .hills-far  { top: -4%; width: max(1200px, 115vw); }
.scene .hills-mid  { top: 38%; width: max(1300px, 125vw); }
.scene .ground {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  height: 16%;
  background: #7FC46C;
  border-top: 6px solid #5FA84F;
}
.scene .pine1    { left: 3%;  width: clamp(70px, 12vw, 120px);  bottom: 12%; }
.scene .pine2    { right: 5%; width: clamp(78px, 13vw, 130px);  bottom: 12%; }
.scene .bigbush1 { left: 16%; width: clamp(54px, 9vw, 92px);    bottom: 11%; }
.scene .bench    { right: 19%; width: clamp(60px, 10vw, 104px); bottom: 11%; }
.scene .lamp     { left: 31%; width: clamp(26px, 4.5vw, 46px);  bottom: 12%; }
.scene .bush1    { right: 33%; width: clamp(40px, 7vw, 70px);   bottom: 10%; }
.scene .flowers1 { left: 44%; width: clamp(40px, 7vw, 72px);    bottom: 9%; }
.scene .flowers2 { right: 8%;  width: clamp(38px, 6.5vw, 66px); bottom: 9%; }
.scene .bush2    { left: 7%;  width: clamp(40px, 7vw, 70px);    bottom: 9%; }

/* ---------- sections ---------- */

main { padding-bottom: 10px; }

section { margin-top: 46px; }

.section-title {
  font-size: clamp(24px, 5vw, 32px);
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(35, 44, 78, 0.35);
  letter-spacing: 0.5px;
}

.card {
  background: var(--cream);
  border-radius: 22px;
  padding: 24px 26px;
  box-shadow: 0 6px 0 rgba(35, 44, 78, 0.18);
  text-align: center;
}

.modes {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 20px;
}
@media (max-width: 860px) { .modes { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .modes { grid-template-columns: 1fr; } }

.mode img { width: 104px; height: 104px; object-fit: contain; }
.mode h3 { margin-top: 8px; font-size: 22px; color: var(--ink); }
.mode p {
  margin-top: 6px;
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.55;
  font-weight: 500;
}
.chip {
  display: inline-block;
  margin-top: 14px;
  padding: 4px 14px;
  border-radius: 999px;
  font-size: 12.5px;
  font-weight: 700;
  letter-spacing: 0.05em;
}
.chip.run   { background: var(--gold);  color: var(--gold-ink);  border: 1px solid rgba(77, 52, 0, 0.3); }
.chip.dodge { background: var(--green); color: var(--green-ink); border: 1px solid var(--green-edge); }
.chip.flip  { background: #E6DBFF; color: #3B2380; border: 1px solid rgba(106, 61, 216, 0.45); }

.feats {
  margin-top: 22px;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 16px;
}
@media (max-width: 720px) { .feats { grid-template-columns: repeat(2, 1fr); } }
.feat { padding: 18px 14px; }
.feat .big { font-size: 30px; line-height: 1; }
.feat h3 { margin-top: 8px; font-size: 16px; color: var(--ink); }
.feat p { margin-top: 4px; font-size: 13px; color: var(--ink-soft); line-height: 1.45; }

.crew {
  margin-top: 22px;
  display: flex;
  justify-content: center;
  align-items: flex-end;
  gap: 4px;
  flex-wrap: wrap;
}
.crew img {
  width: clamp(64px, 12vw, 104px);
  animation: bob 3.2s ease-in-out infinite;
}
.crew img:nth-child(2n)  { animation-delay: -1.1s; }
.crew img:nth-child(3n)  { animation-delay: -2.2s; }
.crew-note { margin-top: 12px; font-size: 14px; color: var(--ink); font-weight: 600; }

/* ---------- long-form doc pages (privacy / terms / support) ---------- */

.doc {
  max-width: 760px;
  margin: 0 auto;
  padding: 44px 22px 10px;
  text-align: left;
}
.doc header { text-align: center; margin-bottom: 26px; }
.doc header img { width: 104px; animation: bob 3.4s ease-in-out infinite; }
.doc header h1 {
  margin-top: 6px;
  font-size: clamp(28px, 6vw, 40px);
  color: var(--cream);
  text-shadow: 0 3px 0 rgba(35, 44, 78, 0.4);
  letter-spacing: 1px;
}
.doc .updated { color: var(--ink); font-size: 13.5px; margin-top: 6px; font-weight: 600; }
.doc .card { margin-top: 18px; text-align: left; }
.doc h2 { font-size: 19px; color: var(--ink); margin-bottom: 8px; }
.doc p, .doc li {
  color: var(--ink-soft);
  font-size: 15px;
  line-height: 1.7;
  font-weight: 500;
}
.doc p + p { margin-top: 10px; }
.doc ul, .doc ol { padding-left: 22px; margin-top: 8px; }
.doc li + li { margin-top: 6px; }
.doc strong { color: var(--ink); font-weight: 600; }

/* ---------- footer ---------- */

footer {
  margin-top: 52px;
  padding: 26px 22px 34px;
  background: var(--ink);
  color: rgba(255, 246, 232, 0.6);
  font-size: 13px;
  font-weight: 500;
}
footer nav { margin-bottom: 12px; }
footer nav a {
  color: var(--cream);
  text-decoration: none;
  margin: 0 12px;
  font-weight: 600;
}
footer nav a:hover { color: var(--gold); }
footer .made { margin-top: 6px; }
footer a { color: rgba(255, 246, 232, 0.8); }

@media (prefers-reduced-motion: reduce) {
  .hero-ghost, .cloud, .coins img, .crew img, .doc header img { animation: none; }
}
