@font-face {
  font-family: "Baloo 2";
  src: url("fonts/baloo2.woff2") format("woff2");
  font-weight: 400 800;
  font-display: swap;
}

:root {
  --ink: #2b2240;
  --ink-soft: #5d5370;
  --night-1: #1c1840;
  --night-2: #25204f;
  --night-3: #6a4f9c;
  --comet: #ffd166;
  --comet-deep: #f5b83d;
  --pink: #ff9eb5;
  --lav: #b9a2ff;
  --teal: #7fd8d0;
  --cream: #fff7e6;
  --paper: #fbf3e2;
  --card: #fffdf7;
  --line: #eadfca;
  --radius: 22px;
  --shadow: 0 2px 0 rgba(43, 34, 64, .06), 0 18px 40px -18px rgba(43, 34, 64, .28);
  --wrap: 1120px;
  --font: "Baloo 2", ui-rounded, "Segoe UI", system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 18px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--cream);
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { line-height: 1.12; margin: 0 0 .4em; font-weight: 800; letter-spacing: -.01em; text-wrap: balance; }
h1 { font-size: clamp(2.6rem, 7vw, 4.8rem); }
h2 { font-size: clamp(2rem, 4.4vw, 3rem); }
h3 { font-size: 1.45rem; }
p { margin: 0 0 1em; text-wrap: pretty; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.eyebrow {
  display: inline-block; font-weight: 700; font-size: .82rem; letter-spacing: .18em;
  text-transform: uppercase; color: var(--night-3); margin-bottom: .6em;
}
.skip { position: absolute; left: -999px; top: 8px; background: var(--comet); padding: 8px 14px; border-radius: 10px; z-index: 99; }
.skip:focus { left: 8px; }
:focus-visible { outline: 3px solid var(--comet); outline-offset: 3px; border-radius: 8px; }

/* ---------- nav ---------- */
.nav {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  transition: background .3s, box-shadow .3s, backdrop-filter .3s;
}
.nav.is-solid {
  background: rgba(37, 32, 79, .82);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  box-shadow: 0 6px 24px -12px rgba(0, 0, 0, .5);
}
.nav-in { display: flex; align-items: center; gap: 18px; height: 68px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--cream); font-weight: 800; font-size: 1.2rem; }
.brand img { width: 40px; height: 40px; }
.brand small { display: block; font-size: .62rem; letter-spacing: .32em; color: var(--comet); font-weight: 700; margin-top: -6px; }
.nav-links { display: flex; gap: 4px; margin-left: auto; list-style: none; padding: 0; margin-block: 0; }
.nav-links a {
  color: var(--cream); text-decoration: none; font-weight: 600; padding: 6px 14px; border-radius: 999px;
  transition: background .2s;
}
.nav-links a:hover { background: rgba(255, 247, 230, .12); }
.lang {
  display: flex; background: rgba(255, 247, 230, .12); border-radius: 999px; padding: 3px; gap: 2px;
}
.lang button {
  font: inherit; font-weight: 700; font-size: .8rem; border: 0; cursor: pointer; padding: 3px 10px;
  border-radius: 999px; background: transparent; color: var(--cream);
}
.lang button[aria-pressed="true"] { background: var(--comet); color: var(--ink); }
.menu-btn { display: none; }

@media (max-width: 760px) {
  .menu-btn {
    display: grid; place-items: center; margin-left: auto; width: 42px; height: 42px; border-radius: 12px;
    background: rgba(255, 247, 230, .12); border: 0; color: var(--cream); cursor: pointer;
  }
  .nav-links {
    position: absolute; top: 68px; left: 12px; right: 12px; flex-direction: column; padding: 10px;
    background: var(--night-2); border-radius: 18px; box-shadow: 0 20px 40px -10px rgba(0, 0, 0, .5);
    display: none;
  }
  .nav.is-open .nav-links { display: flex; }
  .nav.is-open { background: var(--night-2); }
  .nav-links a { padding: 10px 14px; }
  .lang { order: 3; }
}

/* ---------- night hero ---------- */
.night {
  position: relative; color: var(--cream); overflow: hidden; isolation: isolate;
  background:
    radial-gradient(1200px 500px at 70% 110%, rgba(185, 162, 255, .35), transparent 60%),
    radial-gradient(800px 400px at 10% 0%, rgba(127, 216, 208, .12), transparent 60%),
    linear-gradient(180deg, var(--night-1) 0%, var(--night-2) 45%, var(--night-3) 100%);
}
.stars { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.star {
  position: absolute; width: 3px; height: 3px; border-radius: 50%; background: #fff7e6;
  animation: twinkle var(--d, 3s) ease-in-out var(--delay, 0s) infinite;
}
.star.big { width: 5px; height: 5px; box-shadow: 0 0 8px 2px rgba(255, 209, 102, .5); background: var(--comet); }
@keyframes twinkle { 0%, 100% { opacity: .25; transform: scale(.8); } 50% { opacity: 1; transform: scale(1.1); } }
.shoot {
  position: absolute; top: 12%; left: 110%; width: 160px; height: 2px; z-index: -1;
  background: linear-gradient(90deg, rgba(255, 247, 230, .9), transparent);
  transform: rotate(-24deg); animation: shoot 9s linear 2s infinite; opacity: 0;
}
@keyframes shoot {
  0% { left: 110%; top: 8%; opacity: 0; }
  2% { opacity: 1; }
  9% { left: 40%; top: 38%; opacity: 0; }
  100% { left: 40%; top: 38%; opacity: 0; }
}

.hero { min-height: min(100svh, 860px); display: grid; align-items: center; padding: 110px 0 140px; }
.hero-grid { display: grid; grid-template-columns: 1.15fr .85fr; align-items: center; gap: 40px; }
.hero h1 .sub { display: block; font-size: .36em; letter-spacing: .42em; color: var(--comet); margin-top: .25em; font-weight: 700; }
.hero .lead { font-size: clamp(1.15rem, 2.2vw, 1.4rem); color: rgba(255, 247, 230, .86); max-width: 34ch; }
.tagline {
  display: inline-flex; align-items: center; gap: 10px; font-weight: 700; padding: 6px 16px 6px 8px;
  border-radius: 999px; background: rgba(255, 247, 230, .1); margin-bottom: 22px; font-size: .95rem;
}
.tagline i {
  width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-style: normal;
  background: var(--comet); color: var(--ink); font-size: .9rem;
}
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 28px; }

.mascot { position: relative; aspect-ratio: 1; max-width: 460px; justify-self: center; width: 100%; }
.mascot img { position: relative; z-index: 2; width: 100%; animation: float 6s ease-in-out infinite; filter: drop-shadow(0 30px 40px rgba(20, 10, 60, .45)); }
.mascot::before {
  content: ""; position: absolute; inset: 14%; border-radius: 50%; z-index: 1;
  background: radial-gradient(circle, rgba(255, 209, 102, .45), transparent 65%); animation: glow 6s ease-in-out infinite;
}
@keyframes float { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-16px) rotate(2deg); } }
@keyframes glow { 0%, 100% { transform: scale(1); opacity: .8; } 50% { transform: scale(1.12); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .mascot img, .mascot::before, .star, .shoot { animation: none; }
}

.hills { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 0; line-height: 0; }
.hills svg { width: 100%; height: 120px; display: block; }

@media (max-width: 860px) {
  .hero { padding: 100px 0 120px; }
  .hero-grid { grid-template-columns: 1fr; text-align: center; gap: 10px; }
  .hero .lead { margin-inline: auto; }
  .cta { justify-content: center; }
  .mascot { max-width: 260px; order: -1; }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 10px; font: inherit; font-weight: 700; font-size: 1.05rem;
  text-decoration: none; padding: 12px 24px; border-radius: 999px; border: 0; cursor: pointer;
  transition: transform .18s cubic-bezier(.3, 1.6, .5, 1), box-shadow .2s, background .2s;
}
.btn:active { transform: scale(.97); }
.btn-primary { background: var(--comet); color: var(--ink); box-shadow: 0 5px 0 var(--comet-deep), 0 14px 30px -10px rgba(255, 209, 102, .7); }
.btn-primary:hover { transform: translateY(-2px); }
.btn-ghost { background: rgba(255, 247, 230, .1); color: var(--cream); box-shadow: inset 0 0 0 2px rgba(255, 247, 230, .3); }
.btn-ghost:hover { background: rgba(255, 247, 230, .18); }
.btn-dark { background: var(--ink); color: var(--cream); }
.btn-dark:hover { transform: translateY(-2px); }
.btn-store { font-size: 1rem; }
.btn-store::before { content: ""; width: 20px; height: 20px; background: currentColor; flex: none; -webkit-mask: var(--ico) center/contain no-repeat; mask: var(--ico) center/contain no-repeat; }
.btn-play { background: var(--ink); color: var(--cream); --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M4 2.5v19l10-9.5z M15.3 13.3 6.8 21.4l11.6-6.4z M15.3 10.7l3.1-1.7L6.8 2.6z M19.6 9.7l-3.4 2.3 3.4 2.3 2.4-1.3c.8-.5.8-1.5 0-2z'/%3E%3C/svg%3E"); }
.btn-steam { background: #1b2838; color: #e7f0fb; --ico: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='10' fill='none' stroke='black' stroke-width='2.2'/%3E%3Ccircle cx='15' cy='9.5' r='3'/%3E%3Ccircle cx='8.5' cy='15.5' r='2.2'/%3E%3Cpath d='M8.5 15.5 15 9.5' stroke='black' stroke-width='2'/%3E%3C/svg%3E"); }
.btn-store.is-soon { cursor: default; opacity: .92; }

/* ---------- sections ---------- */
section { position: relative; }
.section { padding: 96px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 56px; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; }

/* game feature rows */
.game {
  display: grid; grid-template-columns: 1.1fr 1fr; gap: 48px; align-items: center;
  background: var(--card); border-radius: 32px; padding: 28px; box-shadow: var(--shadow);
  border: 2px solid var(--line); margin-bottom: 40px;
}
.game.flip { grid-template-columns: 1fr 1.1fr; }
.game.flip .game-art { order: 2; }
.game-art { position: relative; border-radius: 22px; overflow: hidden; aspect-ratio: 16/10; background: var(--night-2); }
.game-art img { width: 100%; height: 100%; object-fit: cover; transition: transform .6s cubic-bezier(.2, .8, .2, 1); }
.game:hover .game-art img { transform: scale(1.04); }
.game-art .badge {
  position: absolute; left: 14px; top: 14px; display: flex; align-items: center; gap: 8px;
  background: rgba(255, 253, 247, .94); padding: 4px 12px 4px 4px; border-radius: 999px; font-weight: 700; font-size: .85rem;
}
.game-art .badge img { width: 30px; height: 30px; border-radius: 9px; }
.game-body { padding: 8px 12px 8px 0; }
.game.flip .game-body { padding: 8px 0 8px 12px; }
.game-body h3 { font-size: clamp(1.8rem, 3.4vw, 2.4rem); }
.game-body p { color: var(--ink-soft); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin: 0 0 22px; padding: 0; list-style: none; }
.chips li { font-size: .88rem; font-weight: 700; padding: 3px 12px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); }
.chips li.pink { background: #ffe8ee; border-color: #ffd0dc; }
.chips li.lav { background: #efe9ff; border-color: #ddd2ff; }
.chips li.teal { background: #e3f7f4; border-color: #c4ece6; }
.chips li.sun { background: #fff1cc; border-color: #ffe3a1; }
.row-btns { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.link-arrow { font-weight: 700; text-decoration: none; padding: 10px 6px; display: inline-flex; gap: 6px; align-items: center; }
.link-arrow span { transition: transform .2s; }
.link-arrow:hover span { transform: translateX(4px); }
@media (max-width: 860px) {
  .game, .game.flip { grid-template-columns: 1fr; gap: 20px; padding: 16px; }
  .game.flip .game-art { order: 0; }
  .game-body, .game.flip .game-body { padding: 4px 8px 12px; }
}

/* workshop teaser */
.workshop {
  display: grid; grid-template-columns: auto 1fr; gap: 28px; align-items: center;
  border: 3px dashed var(--line); border-radius: 28px; padding: 28px 32px; background: rgba(255, 253, 247, .6);
}
.workshop .jar {
  width: 112px; height: 112px; border-radius: 30px; display: grid; place-items: center; position: relative;
  background: linear-gradient(140deg, var(--lav), var(--pink)); box-shadow: inset 0 -8px 0 rgba(43, 34, 64, .12);
}
.workshop .jar::after { content: "?"; font-size: 3.6rem; font-weight: 800; color: var(--cream); text-shadow: 0 4px 0 rgba(43, 34, 64, .18); }
.workshop h3 { margin-bottom: .2em; }
.workshop p { margin: 0; color: var(--ink-soft); }
@media (max-width: 600px) { .workshop { grid-template-columns: 1fr; text-align: center; justify-items: center; padding: 24px; } }

/* promise cards */
.promise { background: var(--paper); }
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card {
  background: var(--card); border-radius: var(--radius); padding: 26px 22px; border: 2px solid var(--line);
  box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.card:hover { transform: translateY(-4px) rotate(-.5deg); }
.card .ico {
  width: 52px; height: 52px; border-radius: 16px; display: grid; place-items: center; margin-bottom: 14px;
}
.card .ico svg { width: 28px; height: 28px; }
.card h3 { font-size: 1.2rem; }
.card p { color: var(--ink-soft); margin: 0; font-size: 1rem; }
.ico.sun { background: #fff1cc; color: #c98a00; }
.ico.pink { background: #ffe8ee; color: #d8506f; }
.ico.lav { background: #efe9ff; color: #6a4f9c; }
.ico.teal { background: #e3f7f4; color: #2a8f84; }
@media (max-width: 960px) { .cards { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .cards { grid-template-columns: 1fr; } }

/* about */
.about-grid { display: grid; grid-template-columns: .9fr 1.1fr; gap: 56px; align-items: center; }
.about-art {
  position: relative; border-radius: 32px; aspect-ratio: 1; overflow: hidden;
  background: linear-gradient(160deg, var(--night-2), var(--night-3));
  display: grid; place-items: center; box-shadow: var(--shadow);
}
.about-art img { width: 64%; animation: float 7s ease-in-out infinite; }
.about-art .stars { z-index: 0; }
.about-art img { position: relative; z-index: 1; }
.about-text p { color: var(--ink-soft); font-size: 1.1rem; }
.sig { font-weight: 800; color: var(--ink); font-size: 1.15rem; }
@media (max-width: 860px) { .about-grid { grid-template-columns: 1fr; gap: 32px; } .about-art { max-width: 360px; margin-inline: auto; width: 100%; } }

/* contact */
.contact { text-align: center; padding: 110px 0 170px; }
.contact h2 { color: var(--cream); }
.contact p { color: rgba(255, 247, 230, .82); max-width: 520px; margin-inline: auto; font-size: 1.15rem; }
.mail {
  display: inline-flex; align-items: center; gap: 12px; margin-top: 18px; font-size: clamp(1.05rem, 3vw, 1.4rem);
  font-weight: 800; text-decoration: none; color: var(--ink); background: var(--comet); padding: 14px 28px;
  border-radius: 999px; box-shadow: 0 6px 0 var(--comet-deep); word-break: break-all;
}
.mail:hover { transform: translateY(-2px); }
.copy-btn {
  font: inherit; font-weight: 700; margin-top: 14px; display: block; margin-inline: auto; background: none; border: 0;
  color: rgba(255, 247, 230, .7); cursor: pointer; text-decoration: underline; text-underline-offset: 4px;
}

/* footer */
.foot { background: var(--night-1); color: rgba(255, 247, 230, .7); padding: 48px 0 36px; font-size: .95rem; }
.foot-grid { display: flex; flex-wrap: wrap; gap: 32px; justify-content: space-between; align-items: flex-start; }
.foot .brand { margin-bottom: 8px; }
.foot h4 { color: var(--cream); margin: 0 0 8px; font-size: 1rem; }
.foot ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 4px; }
.foot a { text-decoration: none; }
.foot a:hover { color: var(--comet); }
.foot-bottom { margin-top: 36px; padding-top: 20px; border-top: 1px solid rgba(255, 247, 230, .1); display: flex; flex-wrap: wrap; gap: 8px 24px; justify-content: space-between; }

/* reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity .7s ease, transform .7s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; transition: none; } }
.no-js .reveal { opacity: 1; transform: none; }

/* ---------- game page ---------- */
.g-hero { padding: 120px 0 150px; }
.g-hero-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: center; }
.g-title { display: flex; align-items: center; gap: 16px; margin-bottom: 14px; }
.g-title img { width: 84px; height: 84px; border-radius: 22px; box-shadow: 0 10px 30px -10px rgba(0, 0, 0, .5); }
.g-title h1 { font-size: clamp(2.4rem, 5.6vw, 3.8rem); margin: 0; }
.g-hero .lead { font-size: 1.22rem; color: rgba(255, 247, 230, .86); }
.g-shot { border-radius: 24px; overflow: hidden; box-shadow: 0 30px 60px -20px rgba(0, 0, 0, .6); border: 4px solid rgba(255, 247, 230, .14); transform: rotate(1.5deg); }
.g-shot img { width: 100%; }
.facts { display: flex; flex-wrap: wrap; gap: 8px; margin: 18px 0 26px; padding: 0; list-style: none; }
.facts li { background: rgba(255, 247, 230, .1); border-radius: 999px; padding: 3px 14px; font-weight: 600; font-size: .92rem; }
@media (max-width: 860px) {
  .g-hero { padding: 100px 0 120px; }
  .g-hero-grid { grid-template-columns: 1fr; }
  .g-shot { transform: none; }
}
.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
@media (max-width: 900px) { .features { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .features { grid-template-columns: 1fr; } }

.gallery { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.gallery button {
  padding: 0; border: 0; border-radius: 16px; overflow: hidden; cursor: zoom-in; background: var(--night-2);
  aspect-ratio: 16/9; box-shadow: var(--shadow); transition: transform .25s cubic-bezier(.3, 1.5, .5, 1);
}
.gallery button:hover { transform: translateY(-3px) scale(1.02); }
.gallery img { width: 100%; height: 100%; object-fit: cover; }
@media (max-width: 860px) { .gallery { grid-template-columns: repeat(2, 1fr); } }

.lightbox {
  position: fixed; inset: 0; z-index: 100; background: rgba(20, 16, 44, .92); display: none;
  align-items: center; justify-content: center; padding: 16px;
}
.lightbox.open { display: flex; }
.lightbox img { max-height: 86vh; border-radius: 14px; box-shadow: 0 30px 80px rgba(0, 0, 0, .6); }
.lightbox button {
  position: absolute; font: inherit; font-weight: 800; font-size: 1.6rem; width: 52px; height: 52px; border-radius: 50%;
  border: 0; background: rgba(255, 247, 230, .14); color: var(--cream); cursor: pointer;
}
.lb-close { top: 16px; right: 16px; }
.lb-prev { left: 16px; top: 50%; translate: 0 -50%; }
.lb-next { right: 16px; top: 50%; translate: 0 -50%; }

.quote-band { text-align: center; padding: 70px 0; }
.quote-band p { font-size: clamp(1.4rem, 3vw, 2rem); font-weight: 700; max-width: 760px; margin: 0 auto 24px; line-height: 1.35; }

/* legal pages */
.legal { padding: 120px 0 80px; }
.legal .doc { max-width: 760px; margin-inline: auto; background: var(--card); border: 2px solid var(--line); border-radius: 28px; padding: clamp(22px, 5vw, 52px); box-shadow: var(--shadow); }
.legal h1 { font-size: clamp(2rem, 5vw, 2.8rem); }
.legal h2 { font-size: 1.35rem; margin-top: 1.6em; }
.legal p, .legal li { color: var(--ink-soft); }
.legal .muted { color: #8a7f96; font-size: .95rem; }
.legal table { width: 100%; border-collapse: collapse; font-size: .95rem; margin: 10px 0 18px; display: block; overflow-x: auto; }
.legal th, .legal td { text-align: left; padding: 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
.legal th { color: var(--ink); }
.legal code { background: var(--paper); padding: 1px 6px; border-radius: 6px; font-size: .9em; word-break: break-all; }
.legal .tabs { display: flex; gap: 8px; margin: 0 0 24px; }
.legal .tabs a { text-decoration: none; font-weight: 700; padding: 4px 14px; border-radius: 999px; background: var(--paper); border: 2px solid var(--line); }
.legal hr { border: 0; border-top: 3px dashed var(--line); margin: 48px 0; }
.night-top { position: fixed; inset: 0 0 auto 0; height: 68px; background: var(--night-2); z-index: 40; }

/* 404 */
.lost { min-height: 100svh; display: grid; place-items: center; text-align: center; padding: 100px 16px; }
.lost img { width: 200px; margin: 0 auto 20px; animation: float 5s ease-in-out infinite; }
