:root {
  --paper: #f6f3ea;
  --paper-2: #efe6d6;
  --ink: #34332f;
  --ink-soft: #5d5b54;
  --sage: #b9c9a9;
  --sage-deep: #a5b895;
  --butter: #f4e7c4;
  --rose: #e3a999;
  --radius: 20px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, Georgia, serif;
  --sans: ui-rounded, "SF Pro Rounded", "Nunito", system-ui, -apple-system, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--sans);
  font-size: 18px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--serif); font-weight: 600; line-height: 1.15; margin: 0 0 .5em; }
h1 { font-size: clamp(2.4rem, 6vw, 4rem); letter-spacing: -.01em; }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.4rem); text-align: center; }
h3 { font-size: 1.3rem; }
section { padding: 72px 24px; max-width: 1120px; margin: 0 auto; }
.sub { text-align: center; color: var(--ink-soft); max-width: 560px; margin: 0 auto 40px; }

/* nav */
.nav {
  position: sticky; top: 0; z-index: 10;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 24px;
  background: color-mix(in srgb, var(--paper) 88%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1.5px solid color-mix(in srgb, var(--ink) 12%, transparent);
}
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 700; }
.nav-cta { font-weight: 600; text-decoration: none; padding: 8px 16px; border: 2px solid var(--ink); border-radius: 999px; }
.nav-cta:hover { background: var(--butter); }

/* buttons */
.button {
  display: inline-block;
  font: inherit; font-weight: 700;
  color: var(--ink); text-decoration: none;
  background: var(--sage);
  border: 2.5px solid var(--ink);
  border-radius: 999px;
  padding: 14px 28px;
  box-shadow: 0 4px 0 var(--ink);
  cursor: pointer;
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.button:hover { background: var(--sage-deep); }
.button:active { transform: translateY(3px); box-shadow: 0 1px 0 var(--ink); }
.button:disabled { opacity: .6; cursor: progress; }

/* hero */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 56px; }
.eyebrow { display: inline-block; font-size: .85rem; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; background: var(--butter); border: 2px solid var(--ink); border-radius: 999px; padding: 4px 14px; margin: 0 0 20px; }
.lead { font-size: 1.15rem; color: var(--ink-soft); margin: 0 0 32px; max-width: 34ch; }
.hero-art { position: relative; }
.scene {
  position: relative; overflow: hidden;
  border: 2.5px solid var(--ink); border-radius: var(--radius); box-shadow: 8px 8px 0 var(--ink);
}
.hero-place { width: 100%; }

/* 아이들 일행이 장면을 왼쪽에서 오른쪽으로 가로질러 걸어감 */
.troop { position: absolute; inset: 0; animation: cross 15s linear infinite; }
.walker { position: absolute; bottom: 6%; }
.walker svg, .walker img { display: block; width: 100%; height: auto; overflow: visible; }
.walker.girl { width: 22%; left: 0; }
.walker.boy  { width: 24%; left: 22%; }
.walker.star { width: 11%; left: 50%; bottom: 8%; animation: hop .5s ease-in-out infinite; }
@keyframes cross {
  from { transform: translateX(-62%); }
  to   { transform: translateX(102%); }
}
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* 걸음걸이: 팔과 반대쪽 다리가 함께 앞으로 (한 팔 앞 ↔ 같은 쪽 발 뒤)
   한 걸음(--step)에 두 번 보폭을 벌림:
     0%   자세 B  가까운 다리 앞 + 먼 팔 앞 / 먼 다리 뒤 + 가까운 팔 뒤 (원본 다리 그림)
     25%  두 다리가 모여 수직 → 이 순간 자세 A 로 교체
     50%  자세 A  먼 다리 앞 + 가까운 팔 앞 / 가까운 다리 뒤 + 먼 팔 뒤
     75%  다시 모임 → 자세 B 로 교체
   다리: 앞으로 뻗은 모양(-fw)과 뒤로 뻗은 모양(-bk)은 보폭 ↔ 수직 사이만 오감
   팔: 자세 교체 없이 곧게 내린 팔이 어깨에서 시계추처럼 한 걸음 동안 한 번 왕복 */
.walker.is-walking { --step: 1.4s; }
.walker.is-walking svg { animation: step-bob calc(var(--step) / 2) ease-in-out infinite; }
.walker.is-walking svg g { transform-box: view-box; }
.walker.is-walking .leg-bk { transform-origin: 72px 110px; --from: 0deg;  --to: -23deg; }
.walker.is-walking .leg-fw { transform-origin: 88px 108px; --from: 0deg;  --to: 19deg; }
.walker.is-walking :is(.leg-bk, .leg-fw) {
  animation:
    scissor calc(var(--step) / 2) ease-in-out infinite,
    var(--show) var(--step) step-end infinite;
}
.walker.is-walking .pose-b { --show: show-b; }
.walker.is-walking .pose-a { --show: show-a; opacity: 0; }

/* 원본 팔은 몸 뒤쪽 가장자리에 붙어 있어 어깨 쪽으로 옮긴 뒤(translate) 어깨를 축으로 회전 */
.walker.is-walking .arm-near { transform-origin: 56px 68px; animation: arm-near var(--step) ease-in-out infinite; }
.walker.is-walking .arm-far  { transform-origin: 56px 68px; animation: arm-far  var(--step) ease-in-out infinite; }

@keyframes scissor { 0%, 100% { transform: rotate(var(--from)); } 50% { transform: rotate(var(--to)); } }
@keyframes show-b  { 0% { opacity: 1; } 25% { opacity: 0; } 75% { opacity: 1; } }
@keyframes show-a  { 0% { opacity: 0; } 25% { opacity: 1; } 75% { opacity: 0; } }
/* 0%: 가까운 다리 앞 → 가까운 팔 뒤 / 50%: 먼 다리 앞 → 가까운 팔 앞 */
@keyframes arm-near { 0%, 100% { transform: translateX(14px) rotate(30deg); }  50% { transform: translateX(14px) rotate(-30deg); } }
@keyframes arm-far  { 0%, 100% { transform: translateX(14px) rotate(-30deg); } 50% { transform: translateX(14px) rotate(30deg); } }
.walker.is-walking .head      { transform-origin: 84px 70px;  transform: rotate(-3deg); } /* 턱을 살짝 들고 */
.walker.girl.is-walking .pack { transform-origin: 84px 70px; transform: rotate(-3deg); } /* 뒷머리도 머리와 함께 */
.walker.girl.is-walking svg, .walker.girl.is-walking g { animation-delay: -.7s; }

@keyframes step-bob {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-2.5%); }
}
@keyframes hop {
  0%, 100% { transform: translateY(0); }
  50%      { transform: translateY(-14%); }
}

/* features */
.grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 20px; margin-top: 40px; }
.card { background: #fffdf7; border: 2.5px solid var(--ink); border-radius: var(--radius); padding: 28px 22px; box-shadow: 0 5px 0 var(--ink); }
.card img { margin-bottom: 14px; }
.card p { margin: 0; color: var(--ink-soft); font-size: 1rem; }
.card:nth-child(2) { background: var(--butter); }
.card:nth-child(4) { background: color-mix(in srgb, var(--sage) 45%, #fffdf7); }

/* journey */
.journey { max-width: none; background: var(--paper-2); border-block: 2.5px solid var(--ink); }
.places { display: flex; gap: 20px; overflow-x: auto; padding: 8px 4px 20px; scroll-snap-type: x mandatory; max-width: 1120px; margin: 0 auto; }
.places img { flex: 0 0 300px; scroll-snap-align: start; border: 2.5px solid var(--ink); border-radius: 16px; }
.friends { display: flex; justify-content: center; gap: 18px; margin-top: 28px; flex-wrap: wrap; }
.friends img { width: 64px; animation: bob 2.8s ease-in-out infinite; }
.friends img:nth-child(2n) { animation-delay: .4s; }
.friends img:nth-child(3n) { animation-delay: .8s; }

/* notify */
.notify { text-align: center; position: relative; }
.sparkle { width: 56px; margin: 0 auto 12px; }
.form { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; max-width: 520px; margin: 0 auto; }
.form input[type="email"] {
  flex: 1 1 260px; font: inherit; color: var(--ink);
  padding: 14px 20px; border: 2.5px solid var(--ink); border-radius: 999px; background: #fffdf7;
}
.form input[type="email"]:focus { outline: 3px solid var(--rose); outline-offset: 2px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; opacity: 0; }
.status { min-height: 1.6em; margin-top: 16px; font-weight: 600; }
.status[data-state="ok"] { color: #4f6b3e; }
.status[data-state="error"] { color: #a2483a; }
.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* footer */
.footer { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 24px 56px; color: var(--ink-soft); font-size: .95rem; }
.footer p { margin: 0; }

@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; text-align: center; }
  .lead { margin-inline: auto; }
  .grid { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 540px) {
  body { font-size: 17px; }
  section { padding: 56px 20px; }
  .grid { grid-template-columns: 1fr; }
  .nav-cta { display: none; }
  .places img { flex-basis: 240px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; scroll-behavior: auto !important; }
}
