/* Naho's Math Adventure — product site by Elastic Cell */
:root {
  --sky: #eef7ff;
  --paper: #ffffff;
  --ink: #22304f;
  --ink-soft: #5b6a8c;
  --teal: #0e9e8e;
  --teal-deep: #0a7062;
  --coral: #ff6b5e;
  --sun: #ffc24b;
  --grape: #7c6bf2;
  --radius: 22px;
  --display: "Baloo 2", "Jua", "IBM Plex Sans KR", sans-serif;
  --body: "Inter", "IBM Plex Sans KR", -apple-system, sans-serif;
}
:lang(ko) {
  --display: "Jua", "Baloo 2", sans-serif;
  --body: "IBM Plex Sans KR", -apple-system, sans-serif;
}
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
body { font-family: var(--body); color: var(--ink); background: var(--sky); line-height: 1.65; }
a { color: var(--teal-deep); }
a:focus-visible, button:focus-visible { outline: 3px solid var(--sun); outline-offset: 2px; }
.wrap { max-width: 1020px; margin: 0 auto; padding: 0 24px; }

/* header */
header.site {
  position: sticky; top: 0; z-index: 10;
  background: rgba(238, 247, 255, 0.9);
  backdrop-filter: blur(8px);
}
header.site .wrap { display: flex; align-items: center; gap: 20px; height: 66px; }
.logo { display: flex; align-items: center; gap: 10px; font-family: var(--display); font-weight: 700; font-size: 1.1rem; color: var(--ink); text-decoration: none; }
.logo .mark {
  width: 30px; height: 30px; border-radius: 30%; flex: none;
  background: linear-gradient(145deg, var(--teal), var(--teal-deep));
  color: #fff; display: flex; align-items: center; justify-content: center;
  font-size: 1rem; font-weight: 700;
}
nav.main { margin-left: auto; display: flex; gap: 18px; align-items: center; }
nav.main a { text-decoration: none; color: var(--ink-soft); font-size: 0.92rem; font-weight: 500; }
nav.main a:hover { color: var(--ink); }
.lang { border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; font-size: 0.85rem; font-weight: 700; color: var(--ink) !important; background: var(--paper); }
.lang:hover { background: var(--sun); }

/* hero */
.hero { padding: 72px 0 84px; overflow: hidden; }
.hero .wrap { display: grid; grid-template-columns: 1.15fr 0.85fr; gap: 44px; align-items: center; }
.eyebrow { font-family: var(--display); font-size: 0.85rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--coral); font-weight: 700; }
.hero h1 { font-family: var(--display); font-size: clamp(2.3rem, 5.5vw, 3.8rem); line-height: 1.08; margin: 12px 0 18px; }
.hero h1 em { font-style: normal; color: var(--teal); }
.hero p.lede { color: var(--ink-soft); font-size: 1.1rem; max-width: 32em; }
.cta-row { margin-top: 28px; display: flex; gap: 14px; flex-wrap: wrap; align-items: center; }
.btn { display: inline-block; font-family: var(--display); font-weight: 700; text-decoration: none; padding: 13px 26px; border-radius: 999px; font-size: 1rem; }
.btn.primary { background: var(--ink); color: #fff; box-shadow: 0 6px 0 rgba(34, 48, 79, 0.25); }
.btn.primary:hover { background: var(--teal-deep); }
.btn.ghost { border: 2px solid var(--ink); color: var(--ink); background: var(--paper); }
.btn.ghost:hover { background: var(--sun); }
.soon { font-size: 0.85rem; color: var(--ink-soft); }

/* hero: Naho + floating ops */
.stage { position: relative; display: flex; align-items: center; justify-content: center; min-height: 340px; }
.stage::before {
  content: ""; position: absolute; width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(14, 158, 142, 0.22), rgba(14, 158, 142, 0) 70%);
}
.stage .naho { position: relative; width: min(320px, 78%); height: auto; filter: drop-shadow(0 18px 28px rgba(34, 48, 79, 0.22)); }
.bub {
  position: absolute; font-family: var(--display); font-weight: 700; color: #fff;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; animation: bob 5s ease-in-out infinite;
}
.bub.a { width: 74px; height: 74px; background: var(--coral); top: 4%; left: 6%; font-size: 1.25rem; }
.bub.b { width: 58px; height: 58px; background: var(--sun); bottom: 10%; left: 2%; font-size: 1.05rem; color: var(--ink); animation-delay: -1.6s; }
.bub.c { width: 66px; height: 66px; background: var(--grape); top: 10%; right: 4%; font-size: 1.15rem; animation-delay: -3.2s; }
.bub.d { width: 48px; height: 48px; background: var(--teal); bottom: 4%; right: 12%; font-size: 1rem; animation-delay: -2.4s; }
@keyframes bob {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-14px); }
}

/* wave divider into white */
.wave { display: block; width: 100%; height: 60px; color: var(--paper); }
.band { background: var(--paper); }

/* sections */
section { padding: 72px 0; }
section h2 { font-family: var(--display); font-size: clamp(1.6rem, 3.4vw, 2.3rem); margin-bottom: 10px; }
section .sub { color: var(--ink-soft); max-width: 44em; margin-bottom: 36px; font-size: 1.02rem; }
.center { text-align: center; }
.center .sub { margin-left: auto; margin-right: auto; }

/* feature cards */
.cards { display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.card { background: var(--sky); border-radius: var(--radius); padding: 26px 22px; }
.band .card { background: var(--sky); }
.card .chip {
  width: 52px; height: 52px; border-radius: 50%; margin-bottom: 16px;
  display: flex; align-items: center; justify-content: center;
  font-family: var(--display); font-weight: 700; font-size: 1.4rem; color: #fff;
}
.card:nth-child(1) .chip { background: var(--teal); }
.card:nth-child(2) .chip { background: var(--coral); }
.card:nth-child(3) .chip { background: var(--grape); }
.card:nth-child(4) .chip { background: var(--sun); color: var(--ink); }
.card h3 { font-family: var(--display); font-size: 1.1rem; margin-bottom: 8px; }
.card p { font-size: 0.92rem; color: var(--ink-soft); }

/* curriculum strip */
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; counter-reset: step; }
.step { background: var(--paper); border-radius: var(--radius); padding: 26px 24px; border: 2px dashed #cfe0f2; }
.step .num { font-family: var(--display); font-weight: 700; font-size: 2rem; color: var(--coral); }
.step h3 { font-family: var(--display); font-size: 1.08rem; margin: 6px 0 8px; }
.step p { font-size: 0.92rem; color: var(--ink-soft); }

/* in-game screenshots */
.solve { display: grid; grid-template-columns: minmax(0, 0.8fr) minmax(0, 1.2fr); gap: 44px; align-items: center; margin-bottom: 56px; }
.solve > * { min-width: 0; }
.solve .shot { margin: 0; width: 100%; max-width: 290px; justify-self: center; }
.solve h3 { font-family: var(--display); font-size: clamp(1.3rem, 2.6vw, 1.7rem); margin: 8px 0 12px; }
.solve-copy { color: var(--ink-soft); font-size: 1.02rem; max-width: 34em; }
#screens img {
  width: 100%; height: auto; display: block;
  border-radius: 26px; border: 5px solid #fff;
  box-shadow: 0 14px 34px rgba(34, 48, 79, 0.16);
  background: var(--sky);
}
.shots { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px 18px; }
.shots figure { margin: 0; text-align: center; min-width: 0; }
.shots figcaption { font-size: 0.86rem; color: var(--ink-soft); margin-top: 10px; line-height: 1.5; padding: 0 4px; }

/* creature collection strip */
.critters { display: flex; flex-wrap: wrap; justify-content: center; gap: 20px 16px; }
.critter { width: 104px; margin: 0; text-align: center; }
.critter img {
  width: 96px; height: 96px; border-radius: 50%; object-fit: cover;
  background: #fff; border: 3px solid #fff;
  box-shadow: 0 8px 18px rgba(34, 48, 79, 0.12);
  transform: rotate(-3deg);
}
.critter:nth-child(even) img { transform: rotate(3deg); }
.critter:hover img { transform: rotate(0) scale(1.06); transition: transform 0.2s ease; }
.critter figcaption { font-family: var(--display); font-size: 0.85rem; color: var(--ink-soft); margin-top: 8px; }
.critter.locked img { filter: grayscale(1) opacity(0.55); }

/* support cheer duo */
.support-duo { display: flex; justify-content: center; align-items: flex-end; gap: 4px; margin-bottom: 20px; }
.support-duo img { width: 150px; height: auto; filter: drop-shadow(0 10px 16px rgba(34, 48, 79, 0.18)); }
.support-duo img:first-child { transform: rotate(-4deg); }
.support-duo img:last-child { transform: rotate(4deg); }

/* parents band */
.parents { background: var(--ink); border-radius: 28px; color: #fff; }
.parents-inner { padding: 52px; display: grid; grid-template-columns: 1fr 1fr; gap: 40px; }
.parents h2 { color: #fff; }
.parents .sub { color: #aab8d6; margin-bottom: 18px; }
.parents ul { list-style: none; }
.parents li { padding: 9px 0 9px 32px; position: relative; color: #dbe4f5; font-size: 0.96rem; }
.parents li::before { content: "✓"; position: absolute; left: 0; top: 9px; width: 22px; height: 22px; border-radius: 50%; background: var(--teal); color: #fff; font-size: 0.8rem; display: flex; align-items: center; justify-content: center; }
.parents a { color: var(--sun); }

/* company / footer */
footer.site { background: var(--paper); padding: 44px 0 52px; margin-top: 40px; }
footer.site .wrap { display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
footer.site h3 { font-family: var(--display); font-size: 1rem; margin-bottom: 8px; }
footer.site p { font-size: 0.82rem; color: var(--ink-soft); line-height: 1.8; }
footer.site nav a { display: block; font-size: 0.88rem; margin-bottom: 6px; }

/* legal pages */
.legal { max-width: 760px; margin: 0 auto; padding: 56px 24px 80px; background: var(--paper); border-radius: 0 0 var(--radius) var(--radius); }
.legal h1 { font-family: var(--display); font-size: 1.9rem; margin-bottom: 6px; }
.legal .updated { color: var(--ink-soft); font-size: 0.88rem; margin-bottom: 32px; }
.legal h2 { font-family: var(--display); font-size: 1.2rem; margin: 34px 0 10px; }
.legal p, .legal li { font-size: 0.95rem; color: #3c4a6b; }
.legal ul { padding-left: 22px; margin: 10px 0; }
.legal table { width: 100%; border-collapse: collapse; margin: 14px 0; font-size: 0.88rem; }
.legal table th, .legal table td { border: 1px solid #dbe7f4; padding: 8px 12px; text-align: left; }
.legal table th { background: var(--sky); }

@media (max-width: 820px) {
  .hero .wrap, .parents-inner { grid-template-columns: 1fr; }
  .stage { min-height: 280px; order: -1; }
  .stage .naho { width: min(260px, 70%); }
  .cards { grid-template-columns: 1fr 1fr; }
  .steps { grid-template-columns: 1fr; }
  .solve { grid-template-columns: 1fr; gap: 28px; }
  .solve .shot { max-width: 250px; }
  .shots { grid-template-columns: 1fr 1fr; }
  .parents-inner { padding: 32px 24px; }
  nav.main a:not(.lang) { display: none; }
}
@media (max-width: 480px) {
  .wrap { padding: 0 18px; }
  .cards { grid-template-columns: 1fr; }
  .hero { padding: 36px 0 56px; }
  .hero p.lede { font-size: 1rem; }
  section { padding: 52px 0; }
  .stage { min-height: 230px; }
  .stage .naho { width: min(210px, 64%); }
  .stage::before { width: 220px; height: 220px; }
  .solve .shot { max-width: 220px; }
  .shots { gap: 24px 14px; }
  .critter { width: 84px; }
  .critter img { width: 76px; height: 76px; }
  .support-duo img { width: 96px; }
  .bub.a { width: 58px; height: 58px; font-size: 1.05rem; }
  .bub.b { width: 46px; height: 46px; font-size: 0.9rem; }
  .bub.c { width: 52px; height: 52px; font-size: 0.95rem; }
  .bub.d { width: 40px; height: 40px; font-size: 0.85rem; }
  .cta-row { flex-direction: column; align-items: stretch; }
  .cta-row .btn { text-align: center; }
  .parents-inner { padding: 28px 20px; gap: 24px; }
  footer.site .wrap { flex-direction: column; }
  .legal { padding: 40px 18px 64px; }
}
