/* ============================================================
   けいさんチャレンジ！ LP — 夜空の冒険 (Night Sky Adventure)
   ============================================================ */

:root {
  /* brand */
  --indigo: #2D1B69;
  --indigo-deep: #1F1148;
  --violet: #4C3494;
  --violet-soft: #6B4FB8;
  /* surfaces */
  --surface: #F8F6FF;
  --card: #FFFFFF;
  /* text */
  --ink: #1A1035;
  --ink-mid: #4A3A6B;
  --ink-soft: #6B6080;
  /* accents */
  --gold: #FFD60A;
  --gold-deep: #E5A20A;
  --coral: #FF6B6B;
  --mint: #22C55E;
  /* operations */
  --op-add: #3B82F6;
  --op-sub: #EF4444;
  --op-mul: #10B981;
  --op-div: #F59E0B;
  --op-mix: #06B6D4;
  --op-rand: #8B5CF6;
  --op-learn: #FB923C;

  --night-grad: linear-gradient(180deg, #2D1B69 0%, #4C3494 52%, #1F1148 100%);
  --maxw: 1100px;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'M PLUS Rounded 1c', system-ui, -apple-system, sans-serif;
  color: var(--ink);
  background: var(--surface);
  -webkit-font-smoothing: antialiased;
  line-height: 1.7;
  overflow-x: hidden;
}

h1, h2, h3 { margin: 0; line-height: 1.25; }
p { margin: 0; }
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

.font-display { font-family: 'Fredoka', 'M PLUS Rounded 1c', sans-serif; }

.en {
  display: block;
  font-size: 0.78em;
  font-weight: 500;
  color: var(--ink-soft);
  letter-spacing: 0.01em;
  margin-top: 4px;
}
/* en on dark backgrounds */
.on-dark .en, .en.on-dark { color: rgba(255,255,255,0.62); }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 22px; }

section { position: relative; }

/* ============================================================
   Header
   ============================================================ */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(45,27,105,0.82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}
.site-header .wrap {
  display: flex; align-items: center; gap: 12px;
  height: 60px;
}
.brand-mini { display: flex; align-items: center; gap: 10px; }
.brand-mini img { width: 34px; height: 34px; border-radius: 9px; }
.brand-mini b {
  font-family: 'Fredoka', sans-serif; font-weight: 700;
  color: #fff; font-size: 18px; letter-spacing: 0.3px;
}
.header-spacer { flex: 1; }
/* language switcher — accessible <details> menu, works without JS */
.lang-menu { position: relative; }
.lang-menu > summary {
  list-style: none; cursor: pointer; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(255,255,255,0.12); border: 1px solid rgba(255,255,255,0.18);
  color: #fff; border-radius: 999px; padding: 7px 14px;
  font-weight: 700; font-size: 13px; line-height: 1;
}
.lang-menu > summary::-webkit-details-marker { display: none; }
.lang-menu > summary::after { content: '▾'; font-size: 11px; opacity: 0.8; }
.lang-menu[open] > summary::after { content: '▴'; }
.lang-menu > summary:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }
.lang-menu-list {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  background: #fff; border-radius: 14px; padding: 6px;
  box-shadow: 0 12px 30px rgba(15,10,40,0.28);
  display: flex; flex-direction: column;
  min-width: 180px; max-width: calc(100vw - 24px);
}
.lang-menu-list a {
  padding: 9px 12px; border-radius: 9px; color: #2D1B69;
  font-weight: 700; font-size: 14px; white-space: nowrap;
}
.lang-menu-list a:hover { background: rgba(45,27,105,0.08); }
.lang-menu-list a[aria-current="page"] { background: var(--gold); color: var(--ink); }
/* keep the header on one line on small screens */
.brand-mini { min-width: 0; }
.brand-mini b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
@media (max-width: 560px) {
  .lang-menu > summary { gap: 4px; padding: 7px 11px; }
  .lang-cur { display: none; }
}
.header-cta {
  display: none;
  background: var(--gold); color: var(--ink);
  font-weight: 800; font-size: 14px;
  padding: 9px 18px; border-radius: 12px;
  box-shadow: 0 4px 0 var(--gold-deep);
}
@media (min-width: 720px) { .header-cta { display: inline-block; } }

/* ============================================================
   Buttons
   ============================================================ */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 58px; min-width: 220px; padding: 0 26px;
  border-radius: 16px; border: none; cursor: pointer;
  font-family: inherit; font-weight: 800; font-size: 17px;
  transition: transform 90ms ease, box-shadow 90ms ease;
  text-align: center;
}
.btn small { display: block; font-size: 11px; font-weight: 600; opacity: 0.8; line-height: 1.2; }
.btn .btn-label { display: flex; flex-direction: column; align-items: flex-start; line-height: 1.15; }
.btn .btn-ico { font-size: 24px; }

.btn-play {
  background: linear-gradient(180deg, #FFE259 0%, var(--gold) 100%);
  color: var(--ink);
  box-shadow: 0 6px 14px rgba(255,214,10,0.45), 0 6px 0 var(--gold-deep);
}
.btn-play:hover { transform: translateY(2px); box-shadow: 0 2px 6px rgba(255,214,10,0.4), 0 3px 0 var(--gold-deep); }

.btn-store {
  background: var(--ink-soft); color: #fff;
  opacity: 0.55; cursor: default;
  box-shadow: 0 6px 0 rgba(0,0,0,0.18);
}

.cta-row {
  display: flex; flex-direction: column; gap: 14px;
  align-items: center;
}
@media (min-width: 560px) { .cta-row { flex-direction: row; justify-content: center; } }

/* ============================================================
   Night sky background helper
   ============================================================ */
.night {
  background: var(--night-grad);
  color: #fff;
  position: relative;
  overflow: hidden;
}
.night .stars {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    radial-gradient(1.5px 1.5px at 12% 18%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 28% 52%, rgba(255,255,255,0.8) 50%, transparent),
    radial-gradient(2px 2px at 44% 24%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 62% 64%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 76% 30%, #fff 50%, transparent),
    radial-gradient(2px 2px at 88% 56%, rgba(255,255,255,0.85) 50%, transparent),
    radial-gradient(1.5px 1.5px at 18% 82%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 54% 86%, rgba(255,255,255,0.7) 50%, transparent),
    radial-gradient(1.5px 1.5px at 82% 80%, #fff 50%, transparent),
    radial-gradient(1.5px 1.5px at 36% 12%, rgba(255,255,255,0.6) 50%, transparent);
}
.night .star-deco {
  position: absolute; color: var(--gold); opacity: 0.85;
  animation: twinkle 3s ease-in-out infinite;
}
@keyframes twinkle { 0%,100%{opacity:.35; transform:scale(.85);} 50%{opacity:1; transform:scale(1.1);} }
@keyframes floaty { 0%,100%{transform:translateY(0);} 50%{transform:translateY(-10px);} }

/* ============================================================
   Section title
   ============================================================ */
.sec-head { text-align: center; margin-bottom: 36px; }
.sec-kicker {
  display: inline-block;
  font-size: 12px; font-weight: 800; letter-spacing: 2px;
  text-transform: uppercase;
  color: var(--violet-soft);
  background: rgba(107,79,184,0.12);
  padding: 5px 14px; border-radius: 999px;
  margin-bottom: 14px;
}
.night .sec-kicker { color: var(--gold); background: rgba(255,214,10,0.14); }
.sec-title {
  font-family: 'M PLUS Rounded 1c', sans-serif; font-weight: 800;
  font-size: clamp(26px, 5vw, 34px);
  letter-spacing: -0.01em;
}
.sec-title .en { font-size: 15px; margin-top: 6px; }

/* ============================================================
   Section 1 — Hero
   ============================================================ */
.hero { padding: 56px 0 70px; text-align: center; }
.hero-icon {
  width: 132px; height: 132px; margin: 0 auto 22px;
  filter: drop-shadow(0 16px 30px rgba(0,0,0,0.4));
  animation: floaty 5s ease-in-out infinite;
}
.hero-name {
  font-family: 'Fredoka', sans-serif; font-weight: 900;
  font-size: clamp(38px, 9vw, 66px);
  letter-spacing: -0.02em;
  text-shadow: 0 4px 0 rgba(0,0,0,0.18);
}
.hero-name .en {
  font-family: 'Fredoka', sans-serif; font-weight: 600;
  font-size: clamp(15px, 3vw, 20px); color: rgba(255,255,255,0.7);
  letter-spacing: 0.04em; margin-top: 8px;
}
.hero-catch {
  font-weight: 800; font-size: clamp(20px, 4.4vw, 30px);
  margin: 22px auto 6px; max-width: 18em;
  color: #fff;
}
.hero-catch .pop { color: var(--gold); }
.hero-sub {
  font-size: clamp(14px, 2.6vw, 17px); font-weight: 500;
  color: rgba(255,255,255,0.78); max-width: 30em; margin: 0 auto 8px;
}
.hero-sub .en { font-size: 13px; }
.hero .cta-row { margin-top: 30px; }

.hero-shot { margin-top: 54px; display: flex; justify-content: center; }

/* ============================================================
   Phone frame + mini app UI
   ============================================================ */
.phone {
  width: 252px; flex-shrink: 0;
  background: #0e0a1f; border-radius: 38px;
  padding: 9px;
  box-shadow: 0 30px 60px rgba(0,0,0,0.35), 0 0 0 2px rgba(255,255,255,0.06);
  position: relative;
}
.phone::before {
  content: ''; position: absolute; top: 16px; left: 50%; transform: translateX(-50%);
  width: 76px; height: 20px; background: #0e0a1f; border-radius: 12px; z-index: 3;
}
.phone-screen {
  border-radius: 30px; overflow: hidden; background: var(--surface);
  aspect-ratio: 9 / 19.2; position: relative;
}
.phone-lg { width: 290px; }

/* real app screenshots inside the phone frame */
.shot-img {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; object-position: top center; display: block;
}

/* caption under each shot */
.shot-cap {
  margin-top: 16px; text-align: center; color: #fff;
  font-weight: 700; font-size: 14px; max-width: 252px;
}
.shot-cap .en { font-size: 11.5px; }

/* ============================================================
   Section 2 — Features
   ============================================================ */
.features { padding: 64px 0; background: var(--surface); }
.feat-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 16px;
}
@media (min-width: 860px) { .feat-grid { grid-template-columns: repeat(3, 1fr); gap: 22px; } }
.card {
  background: var(--card); border-radius: 20px; padding: 22px;
  box-shadow: 0 4px 20px rgba(45,27,105,0.08);
}
.feat-badge {
  width: 56px; height: 56px; border-radius: 18px;
  display: flex; align-items: center; justify-content: center;
  font-size: 28px; margin-bottom: 14px;
}
.feat-card h3 { font-size: 18px; font-weight: 800; margin-bottom: 8px; }
.feat-card h3 .en { font-size: 12px; margin-top: 3px; }
.feat-card p { font-size: 14px; color: var(--ink-mid); font-weight: 500; }
.feat-card p .en { font-size: 12px; margin-top: 5px; }

/* ============================================================
   Section 3 — Screenshots
   ============================================================ */
.shots { padding: 64px 0; background: var(--indigo); }
.shots-scroll {
  display: flex; gap: 26px; overflow-x: auto; padding: 8px 22px 22px;
  scroll-snap-type: x mandatory; -webkit-overflow-scrolling: touch;
  margin: 0 -22px;
}
.shots-scroll::-webkit-scrollbar { height: 8px; }
.shots-scroll::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.2); border-radius: 8px; }
.shot-item { scroll-snap-align: center; flex-shrink: 0; display: flex; flex-direction: column; align-items: center; }
@media (min-width: 1024px) {
  .shots-scroll {
    display: grid; grid-template-columns: repeat(4, 1fr); overflow: visible;
    margin: 0; padding: 8px 0; justify-items: center; gap: 34px 20px;
  }
  .phone { width: 220px; }
}

/* ============================================================
   Section 4 — Parents
   ============================================================ */
.parents { padding: 66px 0; background: var(--surface); }
.parents-inner {
  max-width: 720px; margin: 0 auto;
  background: var(--card); border-radius: 28px; padding: 40px 30px;
  box-shadow: 0 4px 30px rgba(45,27,105,0.08);
}
.check-list { list-style: none; padding: 0; margin: 30px 0 0; display: grid; gap: 14px; }
@media (min-width: 640px) { .check-list { grid-template-columns: 1fr 1fr; gap: 16px 26px; } }
.check-list li { display: flex; gap: 12px; align-items: flex-start; font-weight: 600; font-size: 15px; }
.check-list .ck {
  flex-shrink: 0; width: 26px; height: 26px; border-radius: 8px;
  background: rgba(34,197,94,0.14); color: var(--mint);
  display: flex; align-items: center; justify-content: center; font-weight: 900; font-size: 15px;
  margin-top: 1px;
}
.check-list .en { font-size: 12px; font-weight: 500; }

/* ============================================================
   Section 5 — Lesson mode
   ============================================================ */
.lesson { padding: 66px 0; background: var(--surface); }
.lesson-inner {
  display: grid; gap: 36px; align-items: center;
  background: var(--card); border-radius: 28px; padding: 38px 28px;
  box-shadow: 0 4px 30px rgba(45,27,105,0.08);
}
@media (min-width: 880px) { .lesson-inner { grid-template-columns: 1.1fr 0.9fr; padding: 48px 44px; } }
.lesson-list { list-style: none; padding: 0; margin: 26px 0 0; display: grid; gap: 16px; }
.lesson-list li { display: flex; gap: 14px; align-items: flex-start; }
.lesson-num {
  flex-shrink: 0; width: 34px; height: 34px; border-radius: 11px;
  background: linear-gradient(180deg, #FFB867, var(--op-learn)); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 900; font-size: 16px; box-shadow: 0 3px 0 #D26F1A;
}
.lesson-list b { font-size: 15.5px; font-weight: 800; }
.lesson-list .en { font-size: 12px; }
.lesson-shot { display: flex; justify-content: center; }

/* ============================================================
   Section 6 — Languages
   ============================================================ */
.langs { padding: 62px 0; text-align: center; }
.lang-flags {
  display: flex; flex-wrap: wrap; justify-content: center; gap: 16px;
  margin-top: 12px;
}
.lang-pill {
  display: flex; align-items: center; gap: 10px;
  background: rgba(255,255,255,0.08); border: 1px solid rgba(255,255,255,0.14);
  padding: 14px 24px; border-radius: 18px;
  font-weight: 800; font-size: 18px;
}
.lang-pill .flag { font-size: 26px; }
.lang-pill.soon { opacity: 0.6; }
.lang-pill .soon-tag {
  font-size: 10px; font-weight: 800; background: var(--coral); color: #fff;
  padding: 2px 8px; border-radius: 999px; margin-left: 2px;
}

/* ============================================================
   Section 7 — Download CTA
   ============================================================ */
.download { padding: 76px 0; text-align: center; }
.download .sec-title { color: #fff; }
.download .cta-row { margin-top: 32px; }
.download-note { margin-top: 20px; font-size: 13px; color: rgba(255,255,255,0.6); }

/* ============================================================
   Section 8 — Press
   ============================================================ */
.press { padding: 50px 0; background: var(--surface); }
.press-inner { max-width: 720px; margin: 0 auto; text-align: center; }
.press h3 { font-size: 20px; font-weight: 800; margin-bottom: 10px; }
.press p { font-size: 14px; color: var(--ink-mid); font-weight: 500; }
.press .en { font-size: 12px; }
.press a.mail { color: var(--violet-soft); font-weight: 800; }

/* ============================================================
   Footer
   ============================================================ */
.site-footer { background: var(--indigo-deep); color: rgba(255,255,255,0.6); padding: 34px 0; }
.site-footer .wrap { display: flex; flex-direction: column; gap: 14px; align-items: center; text-align: center; }
.site-footer .brand-mini b { font-size: 16px; }
.foot-links { display: flex; gap: 18px; font-size: 13px; font-weight: 600; }
.foot-links a:hover { color: #fff; }
.foot-copy { font-size: 12px; color: rgba(255,255,255,0.4); }

/* curved divider between dark/light */
.curve { display: block; width: 100%; height: 40px; margin-bottom: -1px; }
