:root {
  --cream: #fff3d1;
  --cream-2: #ffe7b8;
  --paper: #fffdf6;
  --navy: #24366b;
  --navy-2: #1a2850;
  --gold: #e9a523;
  --gold-2: #ffc94a;
  --red: #d94b35;
  --green: #398b72;
  --blue: #2f80e0;
  --purple: #7a5ba6;
  --orange: #e07a3d;
  --ink: #2a2f45;
  --ink-soft: #5c6b94;
  --sky: #a9d8ff;
  --radius: 22px;
  --shadow: 0 10px 0 rgba(36, 54, 107, 0.16), 0 18px 40px rgba(36, 54, 107, 0.12);
  --font: "Nunito", "Segoe UI Rounded", "Arial Rounded MT Bold", "Segoe UI", system-ui, -apple-system, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; display: block; }

a { color: var(--blue); }

h1, h2, h3 { color: var(--navy); line-height: 1.15; margin: 0 0 0.5em; }

h2 { font-size: clamp(2rem, 4vw, 2.8rem); font-weight: 900; letter-spacing: -0.01em; }

h3 { font-size: 1.3rem; font-weight: 800; }

.wrap { width: min(1160px, 100% - 40px); margin: 0 auto; }

.skip {
  position: absolute; left: -999px; top: 8px; z-index: 100;
  background: var(--navy); color: #fff; padding: 8px 14px; border-radius: 10px;
}
.skip:focus { left: 8px; }

/* ---------- header ---------- */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255, 243, 209, 0.92);
  backdrop-filter: blur(10px);
  border-bottom: 3px solid rgba(36, 54, 107, 0.08);
}

.site-header .wrap { display: flex; align-items: center; gap: 16px; min-height: 72px; }

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--navy); font-weight: 900; font-size: 1.05rem; line-height: 1.1; }
.brand img { width: 46px; height: 46px; border-radius: 12px; box-shadow: 0 3px 0 rgba(36, 54, 107, 0.2); }

.nav { margin-left: auto; display: flex; gap: 4px; align-items: center; }
.nav a { color: var(--navy); text-decoration: none; font-weight: 800; padding: 8px 12px; border-radius: 999px; }
.nav a:hover, .nav a[aria-current="page"] { background: var(--cream-2); }

.nav-toggle {
  display: none; margin-left: auto; border: 0; background: var(--navy); color: #fff;
  width: 46px; height: 46px; border-radius: 14px; font-size: 1.4rem; cursor: pointer;
}

@media (max-width: 860px) {
  .nav-toggle { display: block; }
  .nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; align-items: stretch;
    background: var(--cream); padding: 10px 20px 20px; border-bottom: 3px solid rgba(36, 54, 107, 0.08);
    display: none;
  }
  .nav.open { display: flex; }
  .nav a { padding: 12px 14px; }
}

/* ---------- buttons ---------- */

.btn {
  display: inline-flex; align-items: center; gap: 10px; border: 0; cursor: pointer;
  font: inherit; font-weight: 900; font-size: 1.05rem; text-decoration: none;
  padding: 14px 24px; border-radius: 999px; transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.btn:active { transform: translateY(3px); }
.btn-gold { background: var(--gold); color: var(--navy); box-shadow: 0 5px 0 #b07a12; }
.btn-gold:hover { background: var(--gold-2); }
.btn-gold:active { box-shadow: 0 2px 0 #b07a12; }
.btn-navy { background: var(--navy); color: #fff; box-shadow: 0 5px 0 var(--navy-2); }
.btn-navy:hover { background: #2d4385; }
.btn-navy:active { box-shadow: 0 2px 0 var(--navy-2); }
.btn svg { width: 22px; height: 22px; flex: none; }

.store-btn { padding: 12px 24px 12px 18px; }
.store-btn small { display: block; font-size: 0.72rem; font-weight: 700; opacity: 0.85; line-height: 1; }
.store-btn span { line-height: 1.15; text-align: left; }

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

.hero {
  position: relative; overflow: hidden;
  background: linear-gradient(180deg, var(--sky) 0%, #d8efff 55%, var(--cream) 100%);
  padding: 60px 0 120px;
}

.hero .wrap { display: grid; grid-template-columns: 1.1fr 0.9fr; gap: 40px; align-items: center; position: relative; z-index: 2; }

.hero-logo { width: min(420px, 100%); margin: 0 0 18px -10px; filter: drop-shadow(0 8px 0 rgba(36, 54, 107, 0.15)); }

.hero h1 { font-size: clamp(1.9rem, 3.6vw, 2.7rem); font-weight: 900; }
.hero p.lead { font-size: 1.2rem; color: var(--ink-soft); font-weight: 700; max-width: 560px; }

.hero-actions { display: flex; flex-wrap: wrap; gap: 14px; margin: 26px 0 18px; }

.badges { display: flex; flex-wrap: wrap; gap: 10px; padding: 0; margin: 0; list-style: none; }
.badges li { background: rgba(255, 255, 255, 0.75); color: var(--navy); font-weight: 800; font-size: 0.9rem; padding: 6px 14px; border-radius: 999px; }

.phone {
  position: relative; justify-self: center; width: min(330px, 80vw); aspect-ratio: 9 / 19.5;
  border-radius: 46px; padding: 12px; background: var(--navy);
  box-shadow: 0 16px 0 var(--navy-2), 0 40px 70px rgba(26, 40, 80, 0.35);
  transform: rotate(3deg);
}
.phone::before {
  content: ""; position: absolute; top: 22px; left: 50%; transform: translateX(-50%);
  width: 90px; height: 22px; background: var(--navy); border-radius: 999px; z-index: 2;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 36px; }

.hero-player {
  position: absolute; z-index: 3; width: 150px; left: -90px; bottom: -10px;
  filter: drop-shadow(0 8px 10px rgba(26, 40, 80, 0.3));
}

.cloud {
  position: absolute; background: #fff; border-radius: 999px; opacity: 0.85; z-index: 1;
  animation: drift linear infinite;
}
.cloud::before, .cloud::after { content: ""; position: absolute; background: #fff; border-radius: 50%; }
.cloud::before { width: 55%; height: 160%; left: 15%; bottom: 20%; }
.cloud::after { width: 40%; height: 120%; right: 12%; bottom: 25%; }
.cloud.c1 { width: 160px; height: 46px; top: 70px; animation-duration: 60s; }
.cloud.c2 { width: 110px; height: 32px; top: 200px; animation-duration: 45s; animation-delay: -20s; }
.cloud.c3 { width: 200px; height: 56px; top: 380px; animation-duration: 75s; animation-delay: -40s; opacity: 0.6; }

@keyframes drift { from { transform: translateX(-260px); } to { transform: translateX(calc(100vw + 260px)); } }

@media (max-width: 860px) {
  .hero { padding-top: 34px; }
  .hero .wrap { grid-template-columns: 1fr; text-align: center; }
  .hero-logo { margin: 0 auto 16px; }
  .hero p.lead { margin-inline: auto; }
  .hero-actions, .badges { justify-content: center; }
  .hero-player { width: 110px; left: -40px; }
}

/* ---------- train parade ---------- */

.parade {
  position: relative; margin-top: -78px; z-index: 4; height: 120px; overflow: hidden;
}
.rails {
  position: absolute; left: 0; right: 0; bottom: 22px; height: 26px;
  background:
    linear-gradient(var(--ink-soft), var(--ink-soft)) 0 4px / 100% 5px no-repeat,
    linear-gradient(var(--ink-soft), var(--ink-soft)) 0 17px / 100% 5px no-repeat,
    repeating-linear-gradient(90deg, #8d5a3c 0 14px, transparent 14px 44px);
}
.train-row {
  position: absolute; bottom: 30px; display: flex; align-items: flex-end; gap: 4px;
  animation: roll 28s linear infinite; will-change: transform;
}
.train-row img { height: 76px; width: auto; max-width: none; transform: rotate(90deg); }
.train-row .car { width: 74px; height: 44px; display: grid; place-items: center; }
.train-row .car.loco { cursor: pointer; }
.train-row .gap { width: 120px; }
.parade:hover .train-row { animation-play-state: paused; }

@keyframes roll { from { transform: translateX(100vw); } to { transform: translateX(-100%); } }

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

section { padding: 90px 0; }
.section-head { text-align: center; max-width: 720px; margin: 0 auto 46px; }
.section-head p { color: var(--ink-soft); font-size: 1.12rem; font-weight: 700; margin: 0; }
.eyebrow {
  display: inline-block; background: var(--navy); color: var(--gold-2); font-weight: 900;
  font-size: 0.8rem; letter-spacing: 0.12em; text-transform: uppercase; padding: 6px 14px; border-radius: 999px; margin-bottom: 14px;
}

.alt { background: var(--paper); }
.navy { background: var(--navy); color: #e6ebff; }
.navy h2, .navy h3 { color: #fff; }
.navy .section-head p { color: #b9c4ee; }

.card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow); padding: 28px;
}

/* how to play */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 26px; counter-reset: step; }
.step { position: relative; text-align: center; padding-top: 50px; }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -22px; left: 50%; transform: translateX(-50%);
  width: 52px; height: 52px; border-radius: 50%; background: var(--gold); color: var(--navy);
  display: grid; place-items: center; font-weight: 900; font-size: 1.5rem; box-shadow: 0 4px 0 #b07a12;
}
.step .art { height: 120px; display: grid; place-items: center; margin-bottom: 14px; }
.step .art img { max-height: 110px; width: auto; }
.step p { color: var(--ink-soft); font-weight: 700; margin: 0; }
@media (max-width: 860px) { .steps { grid-template-columns: 1fr; gap: 46px; } }

/* features */
.features { display: grid; grid-template-columns: repeat(auto-fit, minmax(250px, 1fr)); gap: 22px; }
.feature { display: flex; flex-direction: column; gap: 6px; }
.feature .icon {
  width: 64px; height: 64px; border-radius: 18px; display: grid; place-items: center; margin-bottom: 8px;
  font-size: 1.9rem; color: #fff;
}
.feature .icon img { width: 44px; height: 44px; object-fit: contain; }
.feature p { margin: 0; color: var(--ink-soft); font-weight: 600; }

/* split rows */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; }
.split.reverse > :first-child { order: 2; }
.split p { font-size: 1.08rem; font-weight: 600; }
.split ul { padding-left: 1.1em; font-weight: 700; }
.split li { margin: 6px 0; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 34px; } .split.reverse > :first-child { order: 0; } }

/* cargoblocks demo */
.cargo-board {
  width: min(440px, 100%); aspect-ratio: 1; margin: 0 auto; padding: 12px;
  background: var(--navy); border-radius: 26px; box-shadow: 0 12px 0 var(--navy-2), 0 30px 60px rgba(0, 0, 0, 0.3);
  display: grid; grid-template-columns: repeat(9, 1fr); gap: 4px;
}
.navy .cargo-board { background: #31458a; box-shadow: 0 12px 0 #111b3a, 0 30px 60px rgba(0, 0, 0, 0.35); }
.cargo-cell { border-radius: 7px; background: rgba(255, 255, 255, 0.1); transition: transform 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease; }
.cargo-cell.on { box-shadow: inset 0 -5px 0 rgba(0, 0, 0, 0.22), inset 0 4px 0 rgba(255, 255, 255, 0.28); }
.cargo-cell.clear { background: #fff !important; transform: scale(1.12); box-shadow: 0 0 18px #fff; }
.cargo-cell.pop { animation: pop 0.25s ease; }
@keyframes pop { 50% { transform: scale(1.22); } }
.cargo-score { text-align: center; font-weight: 900; font-size: 2.2rem; color: #fff; margin-top: 18px; }
.cargo-score small { display: block; font-size: 0.95rem; color: var(--gold-2); }

/* album */
.album-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 22px; }
.album-card {
  border: 0; padding: 0; background: none; cursor: zoom-in; position: relative;
  transition: transform 0.2s ease; font: inherit;
}
.album-card:hover { transform: translateY(-6px) rotate(-1deg); }
.album-card img { filter: drop-shadow(0 10px 12px rgba(36, 54, 107, 0.25)); }
.album-card span {
  display: block; margin-top: 10px; font-weight: 900; color: var(--navy); font-size: 1.15rem; text-align: center;
}
.album-card .lock {
  position: absolute; top: 8px; right: 8px; display: inline-flex; align-items: center; gap: 4px;
  background: var(--navy); color: #fff; font-weight: 900; font-size: 0.85rem; padding: 4px 10px 4px 6px; border-radius: 999px;
}
.album-card .lock img { width: 20px; height: 20px; filter: none; }
@media (max-width: 860px) { .album-grid { grid-template-columns: repeat(2, 1fr); } }

/* lightbox */
.lightbox {
  position: fixed; inset: 0; z-index: 200; display: none; place-items: center; padding: 30px;
  background: rgba(16, 22, 44, 0.88);
}
.lightbox.open { display: grid; }
.lightbox img { max-height: 86vh; width: auto; border-radius: 18px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5); }
.lightbox button {
  position: absolute; top: 18px; right: 18px; width: 52px; height: 52px; border-radius: 50%; border: 0;
  background: var(--gold); color: var(--navy); font-size: 1.6rem; font-weight: 900; cursor: pointer;
}
.lightbox p { position: absolute; bottom: 18px; left: 0; right: 0; text-align: center; color: #fff; font-weight: 900; font-size: 1.3rem; margin: 0; }

/* trophies */
.shelf { position: relative; width: min(760px, 100%); margin: 0 auto; }
.shelf > img { width: 100%; }
.trophy {
  position: absolute; border: 0; padding: 0; background: none; cursor: pointer;
  transition: transform 0.2s ease;
}
.trophy img { width: 100%; height: 100%; object-fit: contain; filter: drop-shadow(0 6px 6px rgba(0, 0, 0, 0.3)); }
.trophy:hover, .trophy:focus-visible { transform: translateY(-6px) scale(1.06); outline: none; }
.trophy .tip {
  position: absolute; bottom: 100%; left: 50%; transform: translateX(-50%) translateY(6px);
  background: var(--navy); color: #fff; font-weight: 800; font-size: 0.85rem; white-space: nowrap;
  padding: 6px 12px; border-radius: 12px; opacity: 0; pointer-events: none; transition: opacity 0.15s ease, transform 0.15s ease;
}
.trophy:hover .tip, .trophy:focus-visible .tip, .trophy.show .tip { opacity: 1; transform: translateX(-50%) translateY(-4px); }

/* station */
.station-stage {
  position: relative; border-radius: 28px; overflow: hidden; padding: 30px 20px 0;
  background: linear-gradient(180deg, #bfe3ff 0%, #e9f6ff 60%, #e3cfa6 60%, #d8c39a 100%);
  box-shadow: var(--shadow); min-height: 360px; display: flex; align-items: flex-end; justify-content: center;
}
.station-stage .items { position: absolute; inset: auto 0 18% 0; display: flex; justify-content: space-between; align-items: flex-end; padding: 0 4%; }
.station-stage .items img { height: 120px; width: auto; }
.station-stage .player { position: relative; z-index: 2; height: 300px; width: auto; margin-bottom: 4%; cursor: pointer; }
.item-strip { display: flex; flex-wrap: wrap; gap: 12px; justify-content: center; margin-top: 24px; }
.item-strip figure {
  margin: 0; width: 96px; text-align: center; font-size: 0.8rem; font-weight: 800; color: var(--navy);
}
.item-strip figure div { background: var(--paper); border-radius: 18px; height: 86px; display: grid; place-items: center; box-shadow: 0 4px 0 rgba(36, 54, 107, 0.12); }
.item-strip img { max-height: 66px; max-width: 76px; width: auto; }

.avatars { display: flex; flex-wrap: wrap; justify-content: center; gap: 14px; margin-top: 30px; }
.avatars img {
  width: 82px; height: 82px; border-radius: 50%; background: var(--paper); padding: 4px;
  border: 4px solid var(--gold); box-shadow: 0 4px 0 rgba(36, 54, 107, 0.2); transition: transform 0.2s ease;
}
.avatars img:hover { transform: translateY(-4px) rotate(-6deg); }

/* faq */
.faq { max-width: 820px; margin: 0 auto; display: grid; gap: 14px; }
.faq details { background: var(--paper); border-radius: 18px; box-shadow: 0 5px 0 rgba(36, 54, 107, 0.1); padding: 4px 22px; }
.faq summary { cursor: pointer; font-weight: 900; color: var(--navy); padding: 14px 0; list-style: none; position: relative; padding-right: 30px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 1.5rem; color: var(--gold); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-soft); font-weight: 600; }

/* cta */
.cta { text-align: center; }
.cta img.icon { width: 140px; height: 140px; border-radius: 34px; margin: 0 auto 20px; box-shadow: 0 8px 0 rgba(0, 0, 0, 0.2); }

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

.site-footer { background: var(--navy-2); color: #b9c4ee; padding: 50px 0 30px; font-weight: 600; }
.site-footer .wrap { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 30px; }
.site-footer h3 { color: #fff; font-size: 1rem; }
.site-footer a { color: #fff; text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .studio img { width: 170px; border-radius: 12px; margin-bottom: 14px; }
.site-footer .legal { grid-column: 1 / -1; border-top: 1px solid rgba(255, 255, 255, 0.12); padding-top: 20px; font-size: 0.85rem; }
@media (max-width: 760px) { .site-footer .wrap { grid-template-columns: 1fr; } }

/* ---------- sound toggle ---------- */

.sound-toggle {
  position: fixed; right: 20px; bottom: 20px; z-index: 60; width: 60px; height: 60px; border-radius: 50%;
  border: 0; background: var(--gold); color: var(--navy); cursor: pointer; box-shadow: 0 5px 0 #b07a12, 0 10px 24px rgba(0, 0, 0, 0.2);
  display: grid; place-items: center;
}
.sound-toggle svg { width: 28px; height: 28px; }
.sound-toggle.playing { animation: bob 1.2s ease-in-out infinite; }
@keyframes bob { 50% { transform: translateY(-4px); } }

/* ---------- legal pages ---------- */

.page-hero { background: linear-gradient(180deg, var(--sky), var(--cream)); padding: 56px 0 30px; text-align: center; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3rem); font-weight: 900; }
.page-hero p { color: var(--ink-soft); font-weight: 700; margin: 0; }

.legal-doc { padding: 30px 0 90px; }
.legal-doc .card { max-width: 860px; margin: 0 auto; padding: clamp(24px, 5vw, 54px); }
.legal-doc h2 { font-size: 1.5rem; margin-top: 1.8em; }
.legal-doc h2:first-child { margin-top: 0; }
.legal-doc h3 { font-size: 1.1rem; margin-top: 1.4em; }
.legal-doc p, .legal-doc li { font-weight: 500; }
.legal-doc table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.95rem; }
.legal-doc th, .legal-doc td { text-align: left; padding: 10px 12px; border-bottom: 1px solid #ecdcb8; vertical-align: top; }
.legal-doc th { background: var(--cream); color: var(--navy); }
.summary-box { background: var(--cream); border-left: 6px solid var(--green); border-radius: 14px; padding: 18px 22px; margin-bottom: 28px; }
.summary-box p { margin: 0.3em 0; font-weight: 700; }
.toc { background: var(--cream); border-radius: 14px; padding: 16px 22px; margin: 0 0 28px; }
.toc ol { margin: 6px 0 0; padding-left: 1.3em; columns: 2; column-gap: 30px; }
.toc a { color: var(--navy); font-weight: 700; }
@media (max-width: 640px) { .toc ol { columns: 1; } }

.contact-card { text-align: center; }
.contact-card .mail { font-size: 1.3rem; font-weight: 900; word-break: break-all; }

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