:root {
  --navy-900: #060b26;
  --navy-800: #0a1236;
  --navy-700: #111c4f;
  --cobalt: #2346c8;
  --gold: #ffd34d;
  --pink: #ff6fae;
  --ink: #f4f6ff;
  --ink-dim: #b8c0e6;
  --line: #ffffff1f;
  --jp: "Zen Kaku Gothic New", "Hiragino Sans", "Noto Sans JP", system-ui, sans-serif;
  --display: "Dela Gothic One", "Hiragino Sans", system-ui, sans-serif;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--navy-800);
  color: var(--ink);
  font-family: var(--jp);
  font-weight: 500;
  line-height: 1.8;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
a { color: inherit; }
h1, h2, h3, p { margin: 0; }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  isolation: isolate;
}
.hero-bg {
  position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(120% 70% at 50% 108%, #2a4fd655 0%, transparent 60%),
    radial-gradient(80% 60% at 50% 0%, #1a2a7a 0%, transparent 70%),
    linear-gradient(180deg, var(--navy-800), var(--navy-900));
}
.hero-copy {
  width: min(100%, 680px);
  padding: clamp(24px, 5vh, 56px) 16px 0;
  display: flex; flex-direction: column; align-items: center;
  text-align: center;
  z-index: 2;
}
.logo {
  width: min(72vw, 320px);
  height: auto;
  filter: drop-shadow(0 18px 40px #00000066);
  animation: logo-in .9s cubic-bezier(.2, 1.4, .4, 1) both;
}
.tagline {
  margin-top: 14px;
  font-family: var(--display);
  font-size: clamp(18px, 3.2vw, 26px);
  letter-spacing: .08em;
  animation: rise .8s .25s both;
}
.stores {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  margin-top: 22px;
  animation: rise .8s .4s both;
}
.store {
  display: inline-flex; align-items: center; gap: 10px;
  min-width: 176px;
  padding: 10px 22px 10px 16px;
  border-radius: 999px;
  background: var(--gold);
  color: #2a1440;
  text-decoration: none;
  font-weight: 700; font-size: 17px; line-height: 1.15;
  box-shadow: 0 6px 0 #c48a12, 0 14px 30px #00000055;
  transition: transform .15s, box-shadow .15s;
}
.store small { display: block; font-size: 11px; font-weight: 700; opacity: .75; letter-spacing: .06em; }
.store svg { width: 24px; height: 24px; flex: none; }
.store:hover { transform: translateY(-2px); box-shadow: 0 8px 0 #c48a12, 0 18px 34px #00000066; }
.store:active { transform: translateY(4px); box-shadow: 0 2px 0 #c48a12, 0 8px 18px #00000055; }
/* The browser game, one tap away: its own row above the two stores. */
.store--play { background: var(--pink); box-shadow: 0 6px 0 #c2447f, 0 14px 30px #00000055; }
.store--play:hover { box-shadow: 0 8px 0 #c2447f, 0 18px 34px #00000066; }
.store--play:active { box-shadow: 0 2px 0 #c2447f, 0 8px 18px #00000055; }
.stores-break { flex-basis: 100%; height: 0; }

.parade {
  position: relative;
  width: 100%;
  flex: 1 1 auto;
  min-height: max(260px, 40svh);
  margin-top: 8px;
  cursor: pointer;
}
.parade canvas { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.scroll-cue {
  position: absolute; left: 50%; bottom: 18px; translate: -50% 0;
  width: 26px; height: 42px; border: 2px solid #ffffff66; border-radius: 14px;
  z-index: 3;
}
.scroll-cue span {
  position: absolute; left: 50%; top: 8px; width: 4px; height: 8px; margin-left: -2px;
  border-radius: 2px; background: #fff;
  animation: cue 1.6s infinite;
}

/* ---------- Section basics ---------- */
.section-title {
  font-family: var(--display);
  font-size: clamp(30px, 5.4vw, 56px);
  line-height: 1.25;
  letter-spacing: .04em;
  text-align: center;
}
.reveal { opacity: 0; transform: translateY(28px); transition: opacity .9s, transform .9s cubic-bezier(.2, .8, .2, 1); }
.reveal.in { opacity: 1; transform: none; }

/* ---------- How to play ---------- */
.how {
  padding: clamp(80px, 14vh, 140px) 16px clamp(72px, 12vh, 120px);
  background: var(--navy-900);
}
.steps {
  list-style: none; margin: clamp(36px, 6vh, 64px) auto 0; padding: 0;
  max-width: 1040px;
  display: grid; grid-template-columns: repeat(3, 1fr); gap: clamp(16px, 3vw, 40px);
}
.step { text-align: center; }
.step:nth-child(2) { transition-delay: .12s; }
.step:nth-child(3) { transition-delay: .24s; }
.step-art {
  width: 100%; height: auto; aspect-ratio: 5 / 4;
  border-radius: 24px;
  background: linear-gradient(160deg, #16215c, #0d1540);
  border: 1px solid var(--line);
}
.step-label {
  margin-top: 16px;
  font-family: var(--display);
  font-size: clamp(18px, 2.4vw, 24px);
  letter-spacing: .06em;
}
.step-label b {
  display: inline-grid; place-items: center;
  width: 1.6em; height: 1.6em; margin-right: .5em;
  border-radius: 50%; background: var(--gold); color: #2a1440;
  font-size: .75em; font-weight: 400; vertical-align: .15em;
}
.draw-path { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 3.2s infinite; }
.spin-wheel { transform-box: view-box; transform-origin: 98px 80px; animation: spin 1.4s linear infinite; }
.spin-arc { animation: fade-pulse 1.4s infinite; }
.swap-big { transform-box: fill-box; transform-origin: center; animation: swap-big 3.2s infinite; }
.swap-small { animation: swap-small 3.2s infinite; }

/* ---------- Characters ---------- */
.chara {
  position: relative;
  min-height: 100svh;
  display: flex; align-items: center;
  overflow: hidden;
  isolation: isolate;
  background: var(--navy-900);
}
.chara picture, .chara picture img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: 70% 50%;
  z-index: -2;
}
.chara::before { /* keep the left side quiet for the text */
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    linear-gradient(90deg, #060b26f0 0%, #060b26c0 36%, #060b2600 60%),
    linear-gradient(0deg, #060b26cc 0%, #060b2600 30%);
}
.chara-copy {
  width: min(100%, 1200px);
  margin: 0 auto;
  padding: 0 clamp(16px, 6vw, 96px);
}
.chara-copy > * { max-width: 30rem; }
.chara-num {
  font-family: var(--display);
  font-size: clamp(64px, 11vw, 140px);
  line-height: 1;
  color: transparent;
  -webkit-text-stroke: 2px color-mix(in srgb, var(--accent) 70%, transparent);
}
.chara-elem {
  display: inline-flex; align-items: center; gap: 8px;
  margin-top: 18px;
  padding: 4px 14px 4px 10px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--accent) 18%, transparent);
  border: 1px solid color-mix(in srgb, var(--accent) 55%, transparent);
  color: var(--accent);
  font-weight: 700; letter-spacing: .1em;
}
.chara-elem svg { width: 18px; height: 18px; }
.chara h3 {
  margin-top: 14px;
  font-family: var(--display);
  font-weight: 400;
  font-size: clamp(44px, 7.4vw, 96px);
  line-height: 1.08;
  letter-spacing: .02em;
  text-shadow: 0 6px 30px #00000080;
}
.chara-story {
  margin-top: 22px;
  font-size: clamp(15px, 1.5vw, 18px);
  color: var(--ink-dim);
  max-width: 26rem;
}
.chara-special {
  display: flex; align-items: baseline; gap: 14px;
  margin-top: 26px;
  font-family: var(--display);
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--accent);
}
.chara-special span {
  font-family: var(--jp); font-weight: 700; font-size: 12px; letter-spacing: .2em;
  color: var(--ink-dim);
  padding: 2px 10px; border: 1px solid var(--line); border-radius: 6px;
}

/* ---------- Features ---------- */
.feature {
  display: grid; grid-template-columns: 1.25fr 1fr; align-items: center;
  gap: clamp(24px, 5vw, 72px);
  max-width: 1200px; margin: 0 auto;
  padding: clamp(80px, 14vh, 140px) clamp(16px, 5vw, 48px) 0;
}
.feature--flip .feature-art { order: 2; }
.feature-art { margin: 0; border-radius: 28px; overflow: hidden; box-shadow: 0 30px 80px #00000066; }
.feature-art img { width: 100%; aspect-ratio: 3 / 2; object-fit: cover; }
.feature-copy h2 {
  font-family: var(--display); font-weight: 400;
  font-size: clamp(26px, 3.4vw, 44px);
  line-height: 1.35;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
.feature-meta { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 22px; }
.pill {
  padding: 4px 14px; border-radius: 999px;
  background: #ffffff10; border: 1px solid var(--line);
  font-size: 14px; color: var(--ink-dim);
}

.courses { padding: clamp(96px, 16vh, 160px) 16px 0; }
.course-list {
  list-style: none; margin: 36px auto 0; padding: 0;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 12px;
  max-width: 900px;
}
.course-list li {
  display: inline-flex; align-items: center; gap: 10px;
  padding: 10px 20px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 45%, transparent);
  font-weight: 700;
}
.course-list li::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 12px var(--c); }

.cta {
  display: flex; flex-direction: column; align-items: center;
  padding: clamp(110px, 18vh, 180px) 16px clamp(90px, 14vh, 140px);
  background: radial-gradient(70% 60% at 50% 60%, #2346c833, transparent 70%);
}
.cta-logo { width: min(64vw, 280px); height: auto; filter: drop-shadow(0 14px 30px #00000066); }
.cta-sub { margin-top: 18px; color: var(--ink-dim); letter-spacing: .12em; font-weight: 700; }
.cta .stores { animation: none; }

.footer {
  padding: 36px 16px 48px;
  border-top: 1px solid var(--line);
  text-align: center;
  color: var(--ink-dim);
  font-size: 13px;
}
.footer nav { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 28px; margin-bottom: 12px; }
.footer a { text-decoration: none; }
.footer a:hover { color: var(--ink); }

/* ---------- Motion ---------- */
@keyframes logo-in { from { opacity: 0; transform: scale(.7) rotate(-4deg); } }
@keyframes rise { from { opacity: 0; transform: translateY(16px); } }
@keyframes cue { 0% { opacity: 0; transform: translateY(0); } 30% { opacity: 1; } 100% { opacity: 0; transform: translateY(14px); } }
@keyframes draw { 0% { stroke-dashoffset: 1; } 55%, 85% { stroke-dashoffset: 0; opacity: 1; } 100% { stroke-dashoffset: 0; opacity: 0; } }
@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade-pulse { 50% { opacity: .2; } }
@keyframes swap-big { 0%, 35% { opacity: 1; transform: scale(1); } 50%, 100% { opacity: 0; transform: scale(.4); } }
@keyframes swap-small { 0%, 45% { opacity: 0; transform: translateX(-80px); } 60% { opacity: 1; transform: translateX(-80px); } 95% { opacity: 1; transform: translateX(10px); } 100% { opacity: 0; transform: translateX(10px); } }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .reveal { opacity: 1; transform: none; }
  .draw-path { stroke-dashoffset: 0; }
}

/* ---------- Narrow screens ---------- */
@media (max-width: 760px) {
  .steps { gap: 10px; }
  .step-art { border-radius: 14px; }
  .step-label { font-size: 14px; margin-top: 10px; }
  .chara { align-items: flex-end; }
  .chara picture, .chara picture img { bottom: auto; height: 66%; }
  .chara picture img { object-position: 80% 40%; }
  .chara::before {
    background: linear-gradient(0deg, var(--navy-900) 0%, var(--navy-900) 36%, #060b2600 56%);
  }
  .chara-copy { padding-bottom: 56px; }
  .chara-num { font-size: 56px; }
  .feature, .feature--flip { grid-template-columns: 1fr; }
  .feature--flip .feature-art { order: 0; }
  .feature-copy { text-align: center; }
  .feature-meta { justify-content: center; }
}
