/* 레디&루디 소개 사이트 — 앱 kit.gd 색(INK·SUN·BERRY·MINT·SKY)과 친구 색을 그대로 쓴다. 외부 요청 없음. */

@font-face {
  font-family: "Jua";
  src: url("../fonts/jua-site.woff2") format("woff2");
  font-display: swap;
}
@font-face {
  font-family: "M PLUS Rounded 1c";
  src: url("../fonts/mplus-rounded-xb-site.woff2") format("woff2");
  font-weight: 800;
  font-display: swap;
}

:root {
  --ink: #1e2a78;
  --ink-soft: #46508f;
  --panel: #1a246b;
  --paper: #f4fbff;
  --sun: #ffc93c;
  --redi: #f2546e;
  --redi-text: #d6304e;
  --ludi: #3e8ef0;
  --ludi-text: #1d6bd2;
  --mint: #3ddc97;
  --sky: #5bc0f8;

  --display: "Jua", "M PLUS Rounded 1c", ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", "Noto Sans KR", "Segoe UI", sans-serif;

  --fs-0: 0.9375rem;
  --fs-1: 1.0625rem;
  --fs-2: 1.3125rem;
  --fs-3: 1.625rem;
  --fs-4: 2.0625rem;
  --fs-5: 2.5625rem;
  --fs-6: 3.25rem;

  --gap: clamp(20px, 5vw, 40px);
  --section: clamp(64px, 10vw, 120px);
}
:root[data-lang="ja"] {
  --display: "M PLUS Rounded 1c", "Jua", ui-rounded, system-ui, sans-serif;
  --body: system-ui, -apple-system, "Hiragino Sans", "Hiragino Kaku Gothic ProN", "Yu Gothic", "Meiryo", "Noto Sans JP", sans-serif;
}
:root[data-lang="en"] {
  --body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", sans-serif;
}

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

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
html.lang-wait body { opacity: 0; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--body);
  font-size: var(--fs-1);
  line-height: 1.7;
  word-break: keep-all;
  overflow-wrap: break-word;
}
:root[data-lang="ja"] body { word-break: normal; line-break: strict; }

img, svg { display: block; max-width: 100%; }
picture { display: block; }
a { color: inherit; text-underline-offset: 0.18em; text-decoration-thickness: 2px; }
h1, h2, h3 { font-family: var(--display); font-weight: 400; line-height: 1.2; margin: 0; letter-spacing: 0; }
:root[data-lang="ja"] h1, :root[data-lang="ja"] h2, :root[data-lang="ja"] h3 { font-weight: 800; }
p { margin: 0; }

:focus-visible { outline: 3px solid var(--ink); outline-offset: 3px; border-radius: 6px; }

.wrap { width: 100%; max-width: 1120px; margin-inline: auto; padding-inline: var(--gap); }
.vh { position: absolute !important; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

.skip {
  position: absolute; left: 12px; top: -60px; z-index: 10;
  background: var(--ink); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none;
}
.skip:focus { top: 12px; }

/* ───────── 머리 ───────── */
.top { position: absolute; inset: 0 0 auto 0; z-index: 3; }
.top-in { display: flex; align-items: center; gap: 16px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; margin-right: auto; }
.brand img { width: 44px; height: 44px; border-radius: 12px; box-shadow: 0 2px 0 rgba(30, 42, 120, 0.18); }
.brand-name { font-family: var(--display); font-size: var(--fs-2); display: none; }
:root[data-lang="ja"] .brand-name { font-weight: 800; }
.jump { display: none; gap: 4px; }
.jump a { font-family: var(--display); text-decoration: none; padding: 6px 12px; border-radius: 999px; }
:root[data-lang="ja"] .jump a { font-weight: 800; font-size: var(--fs-0); }
.jump a:hover { background: rgba(255, 255, 255, 0.6); }

.langs { display: flex; background: rgba(255, 255, 255, 0.72); border-radius: 999px; padding: 4px; box-shadow: inset 0 0 0 2px rgba(30, 42, 120, 0.12); }
.langs button {
  font: inherit; font-size: var(--fs-0); line-height: 1; color: var(--ink);
  background: none; border: 0; border-radius: 999px; padding: 9px 12px; cursor: pointer;
}
.langs button[aria-pressed="true"] { background: var(--ink); color: #fff; }
.langs button:not([aria-pressed="true"]):hover { background: rgba(30, 42, 120, 0.08); }

@media (min-width: 560px) { .brand-name { display: inline; } }
@media (min-width: 1040px) { .jump { display: flex; } }

/* ───────── 히어로: 친구 둘이 앱 자세를 따라 하는 무대 + 놀이 매트 바닥 ───────── */
.hero {
  position: relative;
  background:
    radial-gradient(120% 70% at 85% 10%, rgba(255, 255, 255, 0.55), transparent 60%),
    linear-gradient(180deg, #a9f2e1 0%, #c3f2f5 46%, #d4eeff 100%);
  padding-top: 96px;
  overflow: hidden;
}
.hero-in { display: grid; gap: 28px; align-items: end; }
.hero h1 {
  font-size: clamp(3.4rem, 16vw, 7rem);
  line-height: 1;
  display: flex; align-items: baseline; flex-wrap: wrap;
  text-shadow: 0 3px 0 rgba(255, 255, 255, 0.9);
}
.nm-redi { color: var(--redi-text); }
.nm-ludi { color: var(--ludi-text); }
.nm-amp { color: var(--ink); margin-inline: 0.04em; font-size: 0.86em; }
:root[data-lang="ja"] .hero h1 { font-size: clamp(2.4rem, 11.5vw, 4.4rem); flex-wrap: nowrap; }
.tagline { font-family: var(--display); font-size: clamp(var(--fs-3), 6.4vw, var(--fs-5)); line-height: 1.15; margin-top: 10px; }
:root[data-lang="ja"] .tagline { font-weight: 800; }
.lead { margin-top: 18px; max-width: 30em; font-size: var(--fs-1); color: var(--ink); }

.stores { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 24px; }
.store {
  display: inline-grid; grid-template-columns: auto; align-content: center;
  min-width: 156px; padding: 9px 18px 10px; border-radius: 14px;
  background: var(--ink); color: #fff; line-height: 1.15;
  box-shadow: 0 4px 0 rgba(30, 42, 120, 0.25);
  cursor: default; user-select: none;
}
.store-name { font-family: var(--body); font-weight: 700; font-size: var(--fs-2); letter-spacing: -0.01em; }
.store-soon { font-family: var(--display); font-size: var(--fs-0); color: var(--sun); order: -1; }
:root[data-lang="ja"] .store-soon { font-weight: 800; }

.stage { margin: 0; display: grid; justify-items: center; }
.call { display: grid; justify-items: center; gap: 6px; text-align: center; min-height: 96px; align-content: end; }
.call-name {
  font-family: var(--display); font-size: var(--fs-4); line-height: 1;
  background: var(--sun); color: var(--ink);
  padding: 10px 26px 12px; border-radius: 999px;
  border: 3px solid #fff;
  box-shadow: 0 0 0 3px var(--ink), 0 6px 0 3px var(--ink);
}
:root[data-lang="ja"] .call-name { font-weight: 800; font-size: var(--fs-3); }
.call-hint {
  font-family: var(--display); font-size: var(--fs-2); color: var(--ink);
  margin-top: 8px;
  -webkit-text-stroke: 5px #fff; paint-order: stroke fill;
}
:root[data-lang="ja"] .call-hint { font-weight: 800; }

.pair { display: flex; justify-content: center; gap: 0; width: min(100%, 520px); margin-top: 6px; position: relative; z-index: 2; margin-bottom: -40px; }
.bud { width: 46%; margin-inline: -2%; transform-origin: 50% 98%; }
.bud img { width: 100%; height: auto; filter: drop-shadow(0 10px 0 rgba(30, 42, 120, 0.12)); }
.bud.flip img { transform: scaleX(-1); }
.bud.pop { animation: pop 0.38s cubic-bezier(0.3, 1.6, 0.5, 1); }
.bud-ludi.pop { animation-delay: 0.05s; }
@keyframes pop {
  0% { transform: scale(1.06, 0.9); }
  55% { transform: scale(0.96, 1.05); }
  100% { transform: scale(1, 1); }
}

/* 놀이 매트(폼 퍼즐 매트) — 윗면 + 두께 */
.mat {
  position: relative; z-index: 1;
  padding: 56px 0 26px;
  background:
    linear-gradient(180deg, transparent 0, transparent calc(100% - 22px), rgba(30, 42, 120, 0.16) calc(100% - 22px)),
    repeating-linear-gradient(90deg,
      #ffb7c5 0 120px, #ffd6a0 120px 240px, #fff0a3 240px 360px,
      #bff0b8 360px 480px, #b4e4ff 480px 600px, #d3c2ff 600px 720px);
  box-shadow: inset 0 3px 0 rgba(255, 255, 255, 0.7);
}
.mat::before {
  /* 타일 이음매 */
  content: ""; position: absolute; inset: 0 0 22px 0;
  background: repeating-linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0 3px, transparent 3px 120px);
  pointer-events: none;
}
.mat-in { position: relative; display: grid; }
/* 친구 칸(.pair)과 같은 폭 — 이름표는 각 친구 발밑(29%·71%), 버튼은 가운데 */
.mat-row { position: relative; width: min(100%, 520px); margin-inline: auto; min-height: 50px; }
.tagname {
  position: absolute; top: 4px; translate: -50% 0;
  font-family: var(--display); font-size: var(--fs-2); line-height: 1; white-space: nowrap;
  background: #fff; padding: 8px 16px 9px; border-radius: 999px;
  box-shadow: 0 3px 0 rgba(30, 42, 120, 0.18);
}
.tag-redi { left: 29%; }
.tag-ludi { left: 71%; }
:root[data-lang="ja"] .tagname { font-weight: 800; font-size: var(--fs-1); }
.tag-redi { color: var(--redi-text); }
.tag-ludi { color: var(--ludi-text); }
.again {
  position: absolute; left: 50%; top: 0; translate: -50% 0; white-space: nowrap;
  display: inline-flex; align-items: center; gap: 8px;
  font-family: var(--display); font-size: var(--fs-2); line-height: 1; color: var(--ink);
  background: var(--sun); border: 3px solid var(--ink); border-radius: 999px;
  padding: 11px 20px 12px 16px; cursor: pointer;
  box-shadow: 0 5px 0 var(--ink);
  transition: transform 0.08s, box-shadow 0.08s;
}
:root[data-lang="ja"] .again { font-weight: 800; font-size: var(--fs-1); }
.again svg { width: 22px; height: 22px; }
.again:hover { background: #ffd35f; }
.again:active { transform: translateY(4px); box-shadow: 0 1px 0 var(--ink); }
/* 이름표 줄 아래에 버튼 */
.mat-row { padding-top: 58px; display: flex; justify-content: center; }
.again { position: static; translate: none; }

@media (min-width: 900px) {
  .hero { padding-top: 120px; }
  .hero-in, .mat-in { grid-template-columns: 1.05fr 1fr; column-gap: 40px; }
  .hero-in { gap: 40px; }
  .mat-row { grid-column: 2; width: 500px; }
  .hero-copy { padding-bottom: 72px; }
  .pair { width: 500px; margin-bottom: -48px; }
  .bud { width: 250px; }
  .mat { padding-top: 64px; }
}

/* ───────── 노는 법 ───────── */
section[id] { scroll-margin-top: 16px; }
.how { padding: var(--section) 0 0; }
.how-in { display: grid; gap: 40px; align-items: center; }
.how h2, .plays h2, .price h2, .soon h2, .parents h2 { font-size: clamp(var(--fs-4), 7vw, var(--fs-6)); }

.steps { list-style: none; padding: 0; margin: 32px 0 0; counter-reset: step; display: grid; gap: 26px; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 52px 1fr; column-gap: 16px; }
.steps li::before {
  content: counter(step);
  grid-row: span 2;
  width: 52px; height: 52px; border-radius: 50%;
  display: grid; place-items: center;
  font-family: "Jua", var(--display); font-size: var(--fs-3); line-height: 1;
  background: var(--sun); color: var(--ink);
  box-shadow: inset 0 0 0 3px var(--ink);
}
.steps h3 { font-size: var(--fs-3); align-self: end; }
.steps p { max-width: 28em; color: var(--ink-soft); margin-top: 4px; }

.tv { margin: 0; }
.tv-screen {
  background: var(--ink); padding: 10px; border-radius: 22px;
  box-shadow: 0 14px 0 -4px rgba(30, 42, 120, 0.14);
  position: relative;
}
.tv-screen img { border-radius: 13px; width: 100%; height: auto; }
.tv-screen::after {
  /* 받침 */
  content: ""; position: absolute; left: 50%; bottom: -22px; transform: translateX(-50%);
  width: 34%; height: 12px; border-radius: 0 0 12px 12px; background: var(--ink);
}
.tv figcaption { margin-top: 36px; font-size: var(--fs-0); color: var(--ink-soft); text-align: center; }

.shots {
  list-style: none; padding: 0; margin: 56px 0 0;
  display: grid; grid-auto-flow: column; grid-auto-columns: 78%; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 12px;
  overscroll-behavior-x: contain;
}
.shots li { scroll-snap-align: start; }
.shots figure { margin: 0; }
.shots img { border-radius: 14px; width: 100%; height: auto; box-shadow: 0 0 0 2px rgba(30, 42, 120, 0.1); }
.shots figcaption { font-family: var(--display); margin-top: 10px; font-size: var(--fs-1); }
:root[data-lang="ja"] .shots figcaption { font-weight: 800; font-size: var(--fs-0); }

@media (min-width: 700px) {
  .shots { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); overflow: visible; }
}
@media (min-width: 900px) {
  .how-in { grid-template-columns: 5fr 7fr; gap: 56px; }
}
@media (min-width: 1000px) {
  .shots { grid-template-columns: repeat(4, 1fr); }
}

/* ───────── 놀이 선반 ───────── */
.plays { padding: var(--section) 0 0; }
.plays-head p { margin-top: 14px; max-width: 34em; color: var(--ink-soft); }
.legend { list-style: none; padding: 0; margin: 18px 0 0; display: flex; flex-wrap: wrap; gap: 8px 22px; font-size: var(--fs-0); }
.legend li { display: flex; align-items: center; gap: 8px; }

.g-energy { display: inline-flex; gap: 2px; align-items: center; }
.fl { width: 12px; height: 15px; fill: rgba(30, 42, 120, 0.16); }
.fl.on { fill: #ff7a3d; }

.shelf { margin-top: 48px; }
.shelf-head { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.shelf h3 { font-size: var(--fs-3); }
.tag {
  font-family: var(--display); font-size: var(--fs-0); line-height: 1;
  padding: 6px 12px 7px; border-radius: 999px; background: var(--tint); color: var(--ink);
  box-shadow: inset 0 0 0 2px var(--edge);
}
:root[data-lang="ja"] .tag { font-weight: 800; }
.tag-free { background: var(--sun); box-shadow: none; }
.tag-soon { background: #fff; box-shadow: inset 0 0 0 2px var(--edge); border: 0; outline: 2px dashed var(--edge); outline-offset: -2px; }

.shelf-row {
  list-style: none; margin: 14px 0 0; padding: 0 8px 16px;
  display: flex; flex-wrap: wrap; justify-content: center; gap: 18px 0;
  background: linear-gradient(180deg, transparent 0 38px, var(--tint) 38px);
  border-radius: 0 0 22px 22px;
  box-shadow: 0 6px 0 var(--edge);
}
.g { flex: 0 0 33.333%; padding-inline: 4px; display: grid; justify-items: center; align-content: start; text-align: center; gap: 6px; }
.g img { width: 88px; height: 88px; filter: drop-shadow(0 4px 0 rgba(30, 42, 120, 0.1)); }
.g-name { font-family: var(--display); font-size: var(--fs-0); line-height: 1.25; }
:root[data-lang="ja"] .g-name { font-weight: 800; font-size: 0.8125rem; }
:root[data-lang="en"] .g-name { font-size: var(--fs-0); }

@media (min-width: 640px) {
  .shelf-row { flex-wrap: nowrap; }
  .g { flex: 1 1 0; }
}
@media (min-width: 900px) {
  .shelf-row { padding: 0 20px 20px; background: linear-gradient(180deg, transparent 0 52px, var(--tint) 52px); }
  .g img { width: 112px; height: 112px; }
  .g-name { font-size: var(--fs-1); }
  :root[data-lang="ja"] .g-name { font-size: var(--fs-0); }
}
.plays-note { margin-top: 40px; color: var(--ink-soft); max-width: 36em; }

/* ───────── 부모님께: 앱 '부모님' 판의 남색 ───────── */
.parents { margin-top: var(--section); background: var(--panel); color: #fff; padding: var(--section) 0; }
.parents :focus-visible { outline-color: var(--sun); }
.facts { list-style: none; padding: 0; margin: 40px 0 0; display: grid; gap: 34px; }
.facts li { border-top: 2px solid rgba(255, 255, 255, 0.16); padding-top: 22px; }
.facts h3 { font-size: var(--fs-3); color: var(--sun); }
:root[data-lang="ja"] .facts h3 { font-size: var(--fs-2); }
.facts p { margin-top: 10px; color: #e3e8ff; max-width: 32em; }
.facts .src { font-size: var(--fs-0); color: #aab4ee; margin-top: 8px; }
.policy-link { margin-top: 44px; }
.policy-link a {
  display: inline-block; font-family: var(--display); font-size: var(--fs-2); text-decoration: none;
  padding: 12px 22px 13px; border-radius: 999px; box-shadow: inset 0 0 0 2px rgba(255, 255, 255, 0.7);
}
:root[data-lang="ja"] .policy-link a { font-weight: 800; font-size: var(--fs-1); }
.policy-link a:hover { background: rgba(255, 255, 255, 0.1); }
@media (min-width: 760px) {
  .facts { grid-template-columns: repeat(2, 1fr); column-gap: 48px; }
}
@media (min-width: 1080px) {
  .facts { grid-template-columns: repeat(3, 1fr); }
}

/* ───────── 무료와 구매 ───────── */
.price { padding: var(--section) 0 0; }
.rules { margin: 32px 0 0; background: #fff; border-radius: 24px; box-shadow: 0 0 0 2px rgba(30, 42, 120, 0.08); padding: 6px 24px; }
.rules > div { padding: 20px 0; display: grid; gap: 6px; }
.rules > div + div { border-top: 2px solid #e6f2fb; }
.rules dt { font-family: var(--display); font-size: var(--fs-2); }
:root[data-lang="ja"] .rules dt { font-weight: 800; font-size: var(--fs-1); }
.rules dd { margin: 0; color: var(--ink-soft); max-width: 36em; }
.price-note { margin-top: 14px; font-size: var(--fs-0); color: var(--ink-soft); }
@media (min-width: 760px) {
  .rules { padding: 6px 36px; }
  .rules > div { grid-template-columns: 15em 1fr; gap: 24px; align-items: baseline; }
}

/* ───────── 곧 만나요 ───────── */
.soon { padding: var(--section) 0; }
.soon-in { display: grid; gap: 40px; }
.soon-copy p { margin-top: 14px; max-width: 30em; }
.mail a { font-family: var(--display); font-size: clamp(var(--fs-2), 4.6vw, var(--fs-3)); color: var(--ludi-text); word-break: break-all; }
:root[data-lang="ja"] .mail a { font-family: "Jua", var(--display); }
.spec { margin: 0; display: grid; gap: 0; align-content: start; }
.spec > div { display: grid; grid-template-columns: 5.5em 1fr; gap: 12px; padding: 12px 0; border-top: 2px solid #e1eefa; }
:root[data-lang="en"] .spec > div, :root[data-lang="ja"] .spec > div { grid-template-columns: 6.5em 1fr; }
.spec dt { font-family: var(--display); }
:root[data-lang="ja"] .spec dt { font-weight: 800; font-size: var(--fs-0); padding-top: 2px; }
.spec dd { margin: 0; }
@media (min-width: 900px) {
  .soon-in { grid-template-columns: 1fr 1fr; gap: 64px; }
}

/* ───────── 바닥 ───────── */
.foot { background: #e4f3fd; padding: 32px 0 44px; font-size: var(--fs-0); color: var(--ink-soft); }
.foot-in { display: grid; gap: 8px; }
.foot-links { display: flex; gap: 20px; flex-wrap: wrap; font-weight: 600; color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .bud.pop { animation: none; }
  .again { transition: none; }
}
