:root {
  --bg: #0c1240;
  --bg2: #1a2770;
  --ink: #ffffff;
  --muted: rgba(255, 255, 255, 0.72);
  --gold: #ffd84a;
  --cyan: #7cf0ff;
  --pink: #ff6fb5;
  --card: rgba(255, 255, 255, 0.07);
  --card-line: rgba(255, 255, 255, 0.14);
  --radius: 22px;
  --max: 1140px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: radial-gradient(1200px 700px at 70% -10%, #2f47a8 0%, transparent 60%), linear-gradient(180deg, var(--bg2) 0%, var(--bg) 55%, #070a26 100%);
  font-family: "Nunito", system-ui, -apple-system, sans-serif;
  line-height: 1.55;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--cyan); }
h1, h2, h3 { font-family: "Fredoka", "Nunito", system-ui, sans-serif; line-height: 1.08; margin: 0; letter-spacing: -0.01em; }

#sky { position: fixed; inset: 0; width: 100%; height: 100%; z-index: -1; pointer-events: none; }

.grad {
  background: linear-gradient(90deg, var(--gold), #ff9f43 40%, var(--pink) 75%, var(--cyan));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.eyebrow { text-transform: uppercase; letter-spacing: 0.14em; font-weight: 800; font-size: 13px; color: var(--cyan); margin: 0 0 12px; }

/* Nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; gap: 24px;
  max-width: var(--max); margin: 0 auto; padding: 14px 16px;
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
}
.nav::before { content: ""; position: absolute; inset: 0; background: rgba(12, 18, 64, 0.55); z-index: -1; border-bottom: 1px solid var(--card-line); left: -50vw; right: -50vw; }
.brand { display: flex; align-items: center; gap: 10px; white-space: nowrap; flex-shrink: 0; color: var(--ink); text-decoration: none; font-family: "Fredoka", sans-serif; font-weight: 700; font-size: 20px; }
.brand img { border-radius: 9px; }
.nav nav { display: flex; gap: 22px; margin-left: auto; }
.nav nav a { color: var(--muted); text-decoration: none; font-weight: 700; font-size: 15px; }
.nav nav a:hover { color: var(--ink); }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; gap: 10px; white-space: nowrap;
  background: linear-gradient(180deg, #5fe04a, #2fa51f);
  color: #fff; text-decoration: none; font-weight: 800; font-family: "Fredoka", sans-serif;
  border-radius: 999px; padding: 12px 22px; box-shadow: 0 5px 0 #1d6e13, 0 12px 28px rgba(0,0,0,.3);
  transition: transform .15s ease, box-shadow .15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(3px); box-shadow: 0 2px 0 #1d6e13; }
.btn-big { font-size: 20px; padding: 16px 28px; }
.btn-small { padding: 9px 16px; font-size: 15px; box-shadow: 0 3px 0 #1d6e13; }
.btn-ghost { background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line); }
.btn-ghost:active { box-shadow: inset 0 0 0 1px var(--card-line); }

/* Hero */
.hero {
  max-width: var(--max); margin: 0 auto; padding: 56px 16px 40px;
  display: grid; grid-template-columns: 1.05fr 1fr; gap: 40px; align-items: center;
}
.hero h1 { font-size: clamp(40px, 6vw, 72px); font-weight: 700; }
.lede { font-size: 19px; color: var(--muted); max-width: 520px; margin: 20px 0 28px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 14px; }
.quick-facts { list-style: none; padding: 0; margin: 32px 0 0; display: flex; flex-wrap: wrap; gap: 10px; }
.quick-facts li { background: var(--card); border: 1px solid var(--card-line); border-radius: 999px; padding: 6px 14px; font-size: 14px; color: var(--muted); }
.quick-facts b { color: var(--gold); }

.hero-art { position: relative; height: 620px; }
.phone {
  border-radius: 38px; padding: 9px; background: #0a0d24;
  box-shadow: 0 0 0 2px #2d3a7a, 0 30px 60px rgba(0,0,0,.5), inset 0 0 0 1px rgba(255,255,255,.08);
  overflow: hidden;
}
.phone img { border-radius: 30px; width: 100%; }
.hero-art .phone { position: absolute; width: 270px; }
.tilt-l { left: 6%; top: 10px; transform: rotate(-6deg); z-index: 2; }
.tilt-r { right: 6%; top: 60px; transform: rotate(7deg); z-index: 1; }
.hero-art .back { filter: saturate(1.1) brightness(.92); }
.mascot { position: absolute; width: 180px; left: 50%; bottom: -10px; transform: translateX(-30%); z-index: 3; filter: drop-shadow(0 18px 24px rgba(0,0,0,.45)); }
.bob { animation: bob 2.6s ease-in-out infinite; }
@keyframes bob { 0%, 100% { translate: 0 0; } 50% { translate: 0 -10px; } }

/* Marquee */
.marquee { overflow: hidden; border-block: 1px solid var(--card-line); background: rgba(255,255,255,.04); padding: 14px 0; margin: 20px 0 10px; }
.track { display: flex; gap: 40px; width: max-content; animation: scroll 40s linear infinite; }
.track span { font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 18px; white-space: nowrap; color: var(--muted); }
@keyframes scroll { to { transform: translateX(-50%); } }

/* Sections */
.section { max-width: var(--max); margin: 0 auto; padding: 90px 16px 20px; }
.section-head { text-align: center; max-width: 760px; margin: 0 auto 50px; }
.section-head h2 { font-size: clamp(32px, 4.4vw, 52px); }
.sub { color: var(--muted); font-size: 18px; margin-top: 18px; }

.feature { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; margin: 0 0 90px; }
.feature.flip .feature-copy { order: 2; }
.feature h3 { font-size: clamp(26px, 3vw, 36px); margin: 14px 0; }
.feature p { color: var(--muted); font-size: 18px; }
.feature-art { display: flex; justify-content: center; }
.feature-art .phone { width: 280px; }
.duo-phones { gap: 18px; }
.duo-phones .phone { width: 230px; }
.duo-phones .offset { margin-top: 70px; }
.chip { display: inline-block; font-weight: 800; font-size: 13px; letter-spacing: .04em; color: #1d1033; background: var(--gold); border-radius: 999px; padding: 4px 12px; }
.ticks { list-style: none; padding: 0; margin: 20px 0 0; }
.ticks li { position: relative; padding-left: 30px; margin: 10px 0; color: var(--ink); }
.ticks li::before { content: ""; position: absolute; left: 0; top: 5px; width: 16px; height: 16px; border-radius: 4px; background: linear-gradient(135deg, #ffcd3c, #f4a221); box-shadow: inset -3px -3px 0 rgba(0,0,0,.18); }

/* Modes */
.modes { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.mode { background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); padding: 26px; transition: transform .2s ease, background .2s ease; }
.mode:hover { transform: translateY(-4px); background: rgba(255,255,255,.1); }
.mode-icon { font-size: 34px; }
.mode h3 { font-size: 24px; margin: 10px 0 8px; }
.mode p { color: var(--muted); margin: 0; }
.mode-shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; margin-top: 56px; }
.mode-shots figure { margin: 0; text-align: center; }
.mode-shots .phone { max-width: 260px; margin: 0 auto; }
figcaption { margin-top: 14px; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 18px; }

/* Worlds */
.worlds-strip { display: grid; grid-auto-flow: column; grid-auto-columns: 150px; gap: 14px; overflow-x: auto; padding: 6px 4px 22px; scroll-snap-type: x mandatory; scrollbar-width: thin; }
.world { scroll-snap-align: start; text-align: center; }
.world img { border-radius: 18px; aspect-ratio: 9 / 19.5; object-fit: cover; box-shadow: 0 10px 24px rgba(0,0,0,.35); transition: transform .2s ease; }
.world:hover img { transform: translateY(-6px) rotate(-1deg); }
.world span { display: block; margin-top: 8px; font-size: 14px; font-weight: 700; color: var(--muted); }
.world .tag { color: var(--gold); font-size: 12px; }

/* Duo */
.duo-frame { position: relative; max-width: 900px; margin: 0 auto; border-radius: 34px; padding: 12px; background: #0a0d24; box-shadow: 0 0 0 2px #2d3a7a, 0 40px 80px rgba(0,0,0,.5); }
.duo-frame img { border-radius: 24px; width: 100%; }
.duo-video { flex-direction: column; align-items: center; margin-top: 40px; }
.duo-video .sub { text-align: center; margin-top: 14px; }
.duo-tag { position: absolute; right: -10px; top: -22px; background: #fff; color: #1d1033; font-weight: 800; padding: 10px 16px; border-radius: 16px; box-shadow: 0 10px 24px rgba(0,0,0,.3); font-family: "Fredoka", sans-serif; }

/* FAQ */
.faq details { max-width: 780px; margin: 0 auto 12px; background: var(--card); border: 1px solid var(--card-line); border-radius: 18px; padding: 18px 22px; }
.faq summary { cursor: pointer; font-family: "Fredoka", sans-serif; font-weight: 600; font-size: 20px; list-style: none; }
.faq summary::after { content: "+"; float: right; color: var(--gold); font-size: 24px; line-height: 1; }
.faq details[open] summary::after { content: "–"; }
.faq p { color: var(--muted); margin: 12px 0 0; }

/* Final */
.final { text-align: center; max-width: 720px; margin: 90px auto 40px; padding: 50px 16px; background: radial-gradient(400px 220px at 50% 0%, rgba(255,216,74,.18), transparent), var(--card); border: 1px solid var(--card-line); border-radius: 32px; }
.final img { margin: -110px auto 10px; filter: drop-shadow(0 16px 20px rgba(0,0,0,.4)); }
.final h2 { font-size: clamp(28px, 4vw, 42px); }
.final p { color: var(--muted); font-size: 18px; margin: 12px 0 26px; }

/* Footer */
.footer { max-width: var(--max); margin: 0 auto; padding: 40px 16px 60px; text-align: center; color: var(--muted); }
.footer-brand { display: inline-flex; align-items: center; gap: 8px; font-family: "Fredoka", sans-serif; font-weight: 700; color: var(--ink); font-size: 18px; }
.footer-brand img { border-radius: 7px; }
.credit b { color: var(--gold); }
.footer nav { display: flex; gap: 20px; justify-content: center; margin: 10px 0; }
.footer nav a { color: var(--muted); }
.fine { font-size: 13px; opacity: .7; }

/* Reveal on scroll */
.reveal { opacity: 0; transform: translateY(26px); transition: opacity .7s ease, transform .7s ease; }
.reveal.in { opacity: 1; transform: none; }

/* Legal pages */
.doc { max-width: 760px; margin: 0 auto; padding: 40px 16px 80px; }
.doc h1 { font-size: clamp(34px, 5vw, 48px); margin-bottom: 8px; }
.doc h2 { font-size: 24px; margin: 36px 0 10px; }
.doc p, .doc li { color: var(--muted); font-size: 17px; }
.doc .updated { color: var(--cyan); font-weight: 700; }

@media (prefers-reduced-motion: reduce) {
  .bob, .track { animation: none; }
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
}

@media (max-width: 900px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
  .hero { grid-template-columns: 1fr; padding-top: 30px; text-align: center; }
  .lede { margin-inline: auto; }
  .cta-row, .quick-facts { justify-content: center; }
  .hero-art { height: 520px; }
  .hero-art .phone { width: 220px; }
  .tilt-l { left: 8%; }
  .tilt-r { right: 8%; }
  .mascot { width: 140px; }
  .feature, .feature.flip { grid-template-columns: 1fr; gap: 30px; text-align: left; }
  .feature.flip .feature-copy { order: 0; }
  .modes { grid-template-columns: 1fr 1fr; }
  .mode-shots { grid-template-columns: 1fr; gap: 40px; }
  .duo-tag { right: 10px; top: -30px; font-size: 14px; }
}
@media (max-width: 560px) {
  .hero h1 { font-size: 40px; }
  .brand { font-size: 18px; }
  .btn-big { white-space: normal; text-align: left; }
  .hero-art { height: 440px; }
  .hero-art .phone { width: 180px; }
  .tilt-l { left: 2%; }
  .tilt-r { right: 2%; }
  .mascot { width: 120px; }
  .btn-big { font-size: 17px; padding: 14px 20px; }
  .modes { grid-template-columns: 1fr; }
  .duo-phones .phone { width: 46%; }
}

/* Trailer */
.trailer { display: flex; justify-content: center; }
.trailer .phone { width: 300px; }
.phone video { display: block; width: 100%; height: auto; border-radius: 30px; background: #0c1240; }
@media (max-width: 560px) { .trailer .phone { width: 250px; } }

.contact-box { background: rgba(255, 216, 74, 0.12); border: 1px solid rgba(255, 216, 74, 0.45); border-radius: 14px; padding: 14px 18px; }

/* Merch */
.merch { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.merch-item { margin: 0; background: var(--card); border: 1px solid var(--card-line); border-radius: var(--radius); overflow: hidden; }
.merch-item img { display: block; width: 100%; height: auto; }
.merch-item figcaption { padding: 16px 18px 20px; }
.merch-item h3 { margin: 0 0 6px; }
.merch-item p { margin: 0; opacity: .85; }
.merch-cta { text-align: center; margin-top: 28px; }
@media (max-width: 900px) { .merch { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .merch { grid-template-columns: 1fr; } }

/* The nav background reaches past the edges; clip (unlike hidden) also stops sideways scrolling on iPhone Safari. */
html, body { overflow-x: clip; }

/* Menu button (small screens) */
.menu-toggle { display: none; flex-shrink: 0; width: 44px; height: 44px; margin-left: 8px; padding: 11px 10px; border: 0; border-radius: 12px;
  background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line); cursor: pointer; flex-direction: column; justify-content: space-between; }
.menu-toggle span { display: block; height: 3px; border-radius: 2px; background: var(--ink); transition: transform .2s ease, opacity .2s ease; }
@media (max-width: 1020px) {
  .nav nav { display: none; }
  .nav .btn-small { margin-left: auto; }
  .menu-toggle { display: flex; }
  .nav .btn-small + .menu-toggle { margin-left: 8px; }
  .nav:not(:has(.btn-small)) .menu-toggle { margin-left: auto; }
  .nav.open nav { display: flex; flex-direction: column; gap: 0; position: absolute; top: 100%; left: 0; right: 0; margin: 0;
    padding: 8px 16px 16px; background: #0c1240; border-bottom: 1px solid var(--card-line);
    box-shadow: 0 18px 30px rgba(0, 0, 0, 0.35); }
  .nav.open nav a { padding: 14px 4px; font-size: 18px; color: var(--ink); border-bottom: 1px solid var(--card-line); }
  .nav.open nav a:last-child { border-bottom: 0; }
  .nav.open .menu-toggle span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
  .nav.open .menu-toggle span:nth-child(2) { opacity: 0; }
  .nav.open .menu-toggle span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }
}

.notify-note { color: var(--muted); font-size: 14px; margin: 10px 4px 0; }

/* Launch notice sign-up */
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }
.notify-wrap { max-width: 520px; }
.coming { margin: 0 0 12px; font-weight: 800; color: var(--gold); font-size: 15px; }
.coming svg { display: inline-block; vertical-align: -3px; margin-right: 4px; }
.notify { display: flex; gap: 10px; background: var(--card); border: 1px solid var(--card-line); border-radius: 999px; padding: 6px; }
.notify input[type=email] { flex: 1; min-width: 0; background: transparent; border: 0; color: var(--ink); font: inherit; font-size: 17px; padding: 10px 16px; outline: none; }
.notify input[type=email]::placeholder { color: var(--muted); }
.notify:focus-within { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(124, 240, 255, .2); }
.notify .btn { padding: 12px 22px; font-size: 17px; box-shadow: 0 3px 0 #1d6e13; border: 0; cursor: pointer; }
.notify .btn:disabled { opacity: .6; cursor: default; }
.notify-msg { min-height: 1.4em; margin: 10px 4px 0; font-weight: 700; color: #7dffa0; }
.notify-msg.bad { color: #ff9db8; }
.notify-msg:empty { min-height: 0; margin: 0; }
.see-inside { margin-top: 18px; }
.final .notify-wrap { margin: 0 auto; }
.final .coming { text-align: center; }
@media (max-width: 900px) { .notify-wrap { margin: 0 auto; } .coming { text-align: center; } }
@media (max-width: 420px) { .notify .btn { padding: 12px 16px; } }

/* Languages */
.lang-switch { margin: 6px 0; }
.lang-switch a { color: var(--muted); text-decoration: none; font-weight: 700; }
.lang-switch a:hover { color: var(--ink); }
.lang-switch a[aria-current] { color: var(--gold); }
.lang-banner { position: relative; z-index: 20; display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 12px;
  padding: 10px 44px 10px 16px; background: #2a3a9a; color: var(--ink); font-weight: 700; font-size: 15px; text-align: center; }
.lang-banner a { color: var(--gold); }
.lang-banner button { position: absolute; right: 8px; top: 50%; transform: translateY(-50%); background: none; border: 0; color: var(--ink);
  font-size: 22px; width: 36px; height: 36px; cursor: pointer; }
:lang(ja) body, body:lang(ja) { font-family: "Nunito", "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Noto Sans JP", "Yu Gothic", sans-serif; }
:lang(ja) h1, :lang(ja) h2, :lang(ja) h3, :lang(ja) .btn, :lang(ja) summary {
  font-family: "Fredoka", "Hiragino Maru Gothic ProN", "Hiragino Sans", "Noto Sans JP", sans-serif; letter-spacing: 0; }
:lang(ja) h1 { font-size: clamp(34px, 5vw, 60px); line-height: 1.2; }
:lang(ja) { line-break: strict; }
/* Menu fits mid-size screens in every language */
.nav nav a, .nav .btn-small { white-space: nowrap; }
@media (min-width: 1021px) and (max-width: 1180px) {
  .nav { gap: 16px; }
  .nav nav { gap: 14px; }
  .nav nav a { font-size: 14px; }
  .nav .btn-small { padding: 8px 13px; font-size: 14px; }
}
/* Language menu in the top bar */
.lang-pick { position: relative; flex-shrink: 0; }
.lang-pick summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 13px;
  border-radius: 999px; background: var(--card); box-shadow: inset 0 0 0 1px var(--card-line); color: var(--ink); font-weight: 800; font-size: 14px;
  font-family: "Nunito", sans-serif; user-select: none; }
.lang-pick summary::-webkit-details-marker { display: none; }
.lang-pick summary:hover, .lang-pick[open] summary { background: rgba(255, 255, 255, 0.14); }
.lang-menu { position: absolute; right: 0; top: calc(100% + 10px); z-index: 30; display: flex; flex-direction: column; min-width: 160px; padding: 6px;
  background: #0c1240; border: 1px solid var(--card-line); border-radius: 14px; box-shadow: 0 18px 30px rgba(0, 0, 0, 0.4); }
.lang-menu a { padding: 11px 14px; border-radius: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.lang-menu a:hover { background: var(--card); }
.lang-menu a[aria-current] { color: var(--gold); }
.lang-menu a[aria-current]::after { content: " ✓"; }
.menu-langs { display: none; }
@media (max-width: 1020px) {
  .nav .lang-pick { margin-left: auto; }
  .nav .lang-pick + .btn-small { margin-left: 0; }
}
@media (max-width: 600px) {
  .nav .lang-pick { display: none; }
  .nav .lang-pick + .btn-small { margin-left: auto; }
  .nav.open .menu-langs { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; padding: 14px 4px 2px; color: var(--muted); }
  .nav.open .menu-langs a { padding: 8px 14px; border: 0; border-radius: 999px; background: var(--card); font-size: 16px; color: var(--ink); }
  .nav.open .menu-langs a[aria-current] { color: var(--gold); }
}
/* Small phones: the top bar keeps the ☰ button on screen */
@media (max-width: 430px) {
  .nav { gap: 10px; }
  .brand { gap: 8px; font-size: 18px; }
  .nav .btn-small { padding: 8px 12px; font-size: 14px; }
  .nav .btn-small + .menu-toggle { margin-left: 0; }
  /* The Spanish and Japanese buttons already say "Block Boy", so the logo stands alone */
  :lang(es) .brand span, :lang(ja) .brand span { display: none; }
}
@media (max-width: 350px) { .brand span { display: none; } }
/* Japanese headline: each line fits whole instead of breaking mid-word */
:lang(ja) .hero h1 { font-size: clamp(25px, 7.9vw, 52px); }
@media (min-width: 901px) { :lang(ja) .hero h1 { font-size: min(46px, calc((100vw - 72px) * 0.044)); } }
