/* Tiny Tank homepage — bright toy-block look, same colors as the game */
:root {
  --ink: #1e2a1c;
  --ink-soft: #4a5547;
  --cream: #fff8e6;
  --cream-edge: #e6d6ad;
  --orange: #ff8a2b;
  --orange-top: #ffa45c;
  --yellow: #ffd23f;
  --green: #4caf3a;
  --green-dark: #2e7d23;
  --sky: #8fd3ff;
  --sky-deep: #4aa8e8;
  --red: #e2463a;
  --sand: #f4c46a;
  --snow: #e9f5ff;
  --lava: #ff6a2b;
  --radius: 24px;
  --shadow: 0 10px 0 rgba(30, 42, 28, .14), 0 18px 40px rgba(30, 42, 28, .12);
  --font-head: 'Baloo 2', 'Jua', system-ui, sans-serif;
  --font-body: 'Nunito', 'Noto Sans KR', system-ui, -apple-system, 'Segoe UI', sans-serif;
}
html:lang(ko) {
  --font-head: 'Jua', 'Baloo 2', system-ui, sans-serif;
  --font-body: 'Noto Sans KR', 'Nunito', system-ui, -apple-system, 'Segoe UI', sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--ink);
  background: var(--cream);
  line-height: 1.6;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3 { font-family: var(--font-head); line-height: 1.15; margin: 0; }
html:lang(ko) h1, html:lang(ko) h2, html:lang(ko) h3 { font-weight: 400; word-break: keep-all; }
html:lang(ko) p, html:lang(ko) li { word-break: keep-all; }
.wrap { width: min(1120px, 100% - 32px); margin: 0 auto; }

/* ── top bar ── */
.topbar {
  position: fixed; inset: 0 0 auto 0; z-index: 20;
  transition: background .25s, box-shadow .25s;
}
.topbar.scrolled { background: rgba(255, 248, 230, .94); box-shadow: 0 2px 14px rgba(30, 42, 28, .12); backdrop-filter: blur(8px); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-family: var(--font-head); font-weight: 800; font-size: 1.35rem; }
html:lang(ko) .brand { font-weight: 400; }
.brand img { width: 38px; height: 38px; border-radius: 10px; box-shadow: 0 2px 6px rgba(0, 0, 0, .2); }
.topbar:not(.scrolled) .brand { color: #fff; text-shadow: 0 2px 6px rgba(0, 0, 0, .35); }
.spacer { flex: 1; }
.langs { display: flex; gap: 4px; background: rgba(255, 255, 255, .85); border-radius: 999px; padding: 4px; border: 2px solid var(--ink); }
.langs a { text-decoration: none; font-weight: 800; font-size: .85rem; padding: 4px 12px; border-radius: 999px; }
.langs a[aria-current="true"] { background: var(--ink); color: #fff; }
.btn.top-cta { display: none; }
@media (min-width: 720px) {
  .btn.top-cta { display: inline-flex; }
}
.brand, .langs a, .btn { white-space: nowrap; }
@media (max-width: 380px) { .brand { font-size: 1.15rem; } .brand img { width: 32px; height: 32px; } }

/* ── buttons ── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 12px;
  text-decoration: none; font-family: var(--font-head); font-weight: 800;
  border: 3px solid var(--ink); border-radius: 999px; cursor: pointer;
  transition: transform .12s, box-shadow .12s;
}
html:lang(ko) .btn { font-weight: 400; }
.btn:active { transform: translateY(3px); }
.btn-play {
  background: linear-gradient(var(--orange-top), var(--orange));
  color: var(--ink);
  font-size: 1.35rem; padding: 12px 28px 12px 14px;
  box-shadow: 0 6px 0 var(--ink);
}
.btn-play:hover { transform: translateY(-2px); box-shadow: 0 8px 0 var(--ink); }
.btn-play:active { transform: translateY(4px); box-shadow: 0 2px 0 var(--ink); }
.btn-play .badge-icon {
  width: 46px; height: 46px; border-radius: 50%; background: var(--ink);
  display: grid; place-items: center; flex: none;
}
.btn-play .badge-icon svg { width: 22px; height: 22px; margin-left: 3px; }
.btn-play small { display: block; font-family: var(--font-body); font-weight: 700; font-size: .72rem; letter-spacing: .04em; text-transform: uppercase; opacity: .8; line-height: 1.1; }
.btn-play span.lbl { text-align: left; line-height: 1.1; }
.btn-small { background: var(--orange); font-size: .95rem; padding: 6px 16px; box-shadow: 0 3px 0 var(--ink); }

/* ── hero ── */
.hero {
  position: relative; min-height: min(100svh, 920px);
  display: grid; place-items: center; text-align: center;
  padding: 96px 16px 140px;
  background: #8fd3ff url('../images/hero-1280.jpg') center bottom / cover no-repeat;
  overflow: hidden;
}
@media (min-width: 1300px) { .hero { background-image: url('../images/hero.jpg'); } }
.hero::after {
  content: ''; position: absolute; inset: auto 0 -1px 0; height: 90px;
  background: var(--cream);
  clip-path: polygon(0 60%, 8% 40%, 18% 55%, 30% 30%, 42% 50%, 55% 28%, 68% 52%, 80% 34%, 92% 55%, 100% 38%, 100% 100%, 0 100%);
}
.hero-inner { position: relative; z-index: 1; transform: translateY(-6vh); }
.logo {
  font-family: 'Baloo 2', var(--font-head); font-weight: 800;
  font-size: clamp(3.6rem, 13vw, 8.5rem); line-height: .86; letter-spacing: .01em;
  color: var(--yellow);
  -webkit-text-stroke: 3px var(--ink); paint-order: stroke fill;
  text-shadow: 0 7px 0 var(--ink), 0 14px 26px rgba(0, 0, 0, .25);
}
html:lang(ko) .logo { font-family: 'Jua', var(--font-head); font-weight: 400; }
.logo .top { display: block; color: #2f8a2a; }
.tagline {
  display: inline-block; margin: 26px 0 0;
  background: var(--cream); border: 3px solid var(--ink); border-radius: 999px;
  padding: 6px 20px; font-family: var(--font-head); font-weight: 800; font-size: clamp(1rem, 3.2vw, 1.35rem);
  box-shadow: 0 4px 0 var(--ink);
}
html:lang(ko) .tagline { font-weight: 400; }
.hero-lead {
  max-width: 580px; margin: 22px auto 26px; padding: 8px 18px; border-radius: 18px; background: rgba(20, 40, 20, .38); backdrop-filter: blur(3px); color: #fff; font-weight: 800; font-size: clamp(1rem, 2.6vw, 1.2rem);
  text-shadow: 0 2px 4px rgba(0, 0, 0, .55), 0 0 18px rgba(0, 0, 0, .3);
}
.hero-facts { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 22px; }
.chip {
  background: rgba(255, 255, 255, .9); border: 2px solid var(--ink); border-radius: 999px;
  padding: 3px 12px; font-weight: 800; font-size: .85rem;
}

/* ── sections ── */
section { padding: 80px 0; position: relative; }
.eyebrow {
  display: inline-block; font-weight: 900; font-size: .8rem; letter-spacing: .12em; text-transform: uppercase;
  color: var(--green-dark); background: #e2f3d6; border-radius: 999px; padding: 3px 12px; margin-bottom: 12px;
}
html:lang(ko) .eyebrow { letter-spacing: .02em; }
.section-title { font-size: clamp(2rem, 5.4vw, 3.1rem); font-weight: 800; }
.section-lead { color: var(--ink-soft); font-size: 1.08rem; max-width: 620px; margin: 12px 0 0; }
.center { text-align: center; }
.center .section-lead { margin-left: auto; margin-right: auto; }

/* story */
.story { padding-top: 40px; }
.story-card {
  display: grid; gap: 24px; align-items: center;
  background: #fff; border: 3px solid var(--ink); border-radius: 32px; padding: 28px; box-shadow: var(--shadow);
}
@media (min-width: 820px) { .story-card { grid-template-columns: 1.1fr 1fr; padding: 40px 48px; } }
.story-lines p { margin: 0 0 8px; font-size: 1.15rem; font-weight: 700; }
.story-lines .call { color: var(--orange); font-family: var(--font-head); font-size: 1.6rem; margin-top: 14px; }
html:lang(ko) .story-lines .call { font-size: 1.8rem; }
.story-bosses { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.story-bosses img { background: #fbe9e2; border-radius: 18px; padding: 10px; border: 2px solid #f1c7b8; }

/* how to play */
.steps { display: grid; gap: 22px; margin-top: 40px; }
@media (min-width: 860px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.step {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); padding: 22px 22px 0;
  box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column;
}
.step-num {
  width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: var(--orange); border: 3px solid var(--ink); font-family: var(--font-head); font-weight: 800; font-size: 1.4rem;
}
.step h3 { font-size: 1.45rem; margin: 14px 0 6px; }
html:lang(ko) .step h3 { font-size: 1.6rem; }
.step p { margin: 0 0 18px; color: var(--ink-soft); }
.step .phone-crop { margin-top: auto; border-radius: 22px 22px 0 0; overflow: hidden; border: 3px solid var(--ink); border-bottom: 0; aspect-ratio: 9 / 8; }
.step .phone-crop img { width: 100%; height: 100%; object-fit: cover; }
.step .phone-crop.bottom img { object-position: center 88%; }
.step .phone-crop.top img { object-position: center 4%; }

/* worlds */
.worlds { background: linear-gradient(#cdeeff, #fff8e6); }
.world-grid { display: grid; gap: 20px; margin-top: 40px; }
@media (min-width: 640px) { .world-grid { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1040px) { .world-grid { grid-template-columns: repeat(4, 1fr); } }
.world {
  background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  display: flex; flex-direction: column;
}
.world-img { position: relative; aspect-ratio: 4 / 3; overflow: hidden; }
.world-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .5s; }
.world:hover .world-img img { transform: scale(1.06); }
.zone-tag {
  position: absolute; left: 12px; top: 12px; background: var(--ink); color: #fff; border-radius: 999px;
  font-weight: 800; font-size: .78rem; padding: 3px 10px;
}
.world-body { padding: 16px 18px 20px; display: flex; flex-direction: column; gap: 8px; flex: 1; }
.world-body h3 { font-size: 1.5rem; }
html:lang(ko) .world-body h3 { font-size: 1.7rem; }
.world-body p { margin: 0; color: var(--ink-soft); font-size: .95rem; }
.world-boss { margin-top: auto; display: flex; align-items: center; gap: 10px; background: #fdf1ec; border-radius: 14px; padding: 8px 10px; }
.world-boss img { width: 46px; height: 46px; }
.world-boss b { display: block; font-size: .92rem; }
.world-boss span { font-size: .78rem; color: var(--red); font-weight: 800; }
.w-grass .world-body h3 { color: var(--green-dark); }
.w-desert .world-body h3 { color: #c47a12; }
.w-snow .world-body h3 { color: var(--sky-deep); }
.w-fortress .world-body h3 { color: var(--red); }

/* bosses */
.bosses { background: var(--ink); color: #fff; overflow: hidden; }
.bosses .eyebrow { background: #3a4a36; color: var(--yellow); }
.bosses .section-lead { color: #c9d3c4; }
.boss-row { display: grid; gap: 18px; margin-top: 40px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 900px) { .boss-row { grid-template-columns: repeat(4, 1fr); } }
.boss {
  background: #2b3a28; border: 3px solid #4a5d45; border-radius: var(--radius); padding: 16px; text-align: center;
  position: relative;
}
.boss img { width: min(150px, 72%); margin: 0 auto; filter: drop-shadow(0 10px 10px rgba(0, 0, 0, .45)); animation: bob 3.2s ease-in-out infinite; }
.boss:nth-child(2) img { animation-delay: -.8s; }
.boss:nth-child(3) img { animation-delay: -1.6s; }
.boss:nth-child(4) img { animation-delay: -2.4s; }
.boss .stage { display: inline-block; background: var(--red); border-radius: 999px; padding: 1px 10px; font-size: .75rem; font-weight: 900; margin-top: 6px; }
.boss h3 { font-size: 1.25rem; margin-top: 8px; color: var(--yellow); }
html:lang(ko) .boss h3 { font-size: 1.4rem; }
.boss q { display: block; margin-top: 6px; font-size: .9rem; color: #dfe7da; font-style: italic; quotes: none; }
@keyframes bob { 0%, 100% { transform: translateY(0) rotate(-2deg); } 50% { transform: translateY(-8px) rotate(2deg); } }

/* upgrades */
.upgrade-grid { display: grid; gap: 24px; margin-top: 40px; }
@media (min-width: 900px) { .upgrade-grid { grid-template-columns: 1.15fr 1fr; align-items: start; } }
.panel { background: #fff; border: 3px solid var(--ink); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow); }
.panel h3 { font-size: 1.5rem; margin-bottom: 6px; }
html:lang(ko) .panel h3 { font-size: 1.65rem; }
.panel > p { margin: 0 0 16px; color: var(--ink-soft); }
.shops { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; }
.shop { text-align: center; font-weight: 800; font-size: .85rem; }
.shop img { background: #f4efe0; border-radius: 16px; padding: 10px; margin-bottom: 4px; }
.parts { display: grid; gap: 10px; margin-top: 18px; }
.part-line { display: grid; grid-template-columns: 74px 1fr; gap: 10px; align-items: start; }
.pills { display: flex; flex-wrap: wrap; gap: 6px; }
.part-line b { padding-top: 1px; font-family: var(--font-head); font-size: 1.05rem; }
html:lang(ko) .part-line b { font-weight: 400; font-size: 1.15rem; }
.pill { background: #fff3df; border: 2px solid var(--cream-edge); border-radius: 999px; padding: 1px 10px; font-size: .85rem; font-weight: 700; }
.stack { display: grid; gap: 24px; }
.mini-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 12px; }
.mini-list li { display: flex; gap: 14px; align-items: center; }
.mini-list img { width: 56px; height: 56px; flex: none; background: #f4efe0; border-radius: 14px; padding: 8px; }
.mini-list .emoji { width: 56px; height: 56px; flex: none; display: grid; place-items: center; background: #f4efe0; border-radius: 14px; font-size: 1.7rem; }
.mini-list b { display: block; }
.mini-list span { color: var(--ink-soft); font-size: .93rem; }

/* gallery */
.gallery-section { background: linear-gradient(#fff8e6, #e5f4d8); }
.gallery {
  display: flex; gap: 20px; overflow-x: auto; scroll-snap-type: x mandatory;
  padding: 36px max(16px, (100% - 1120px) / 2) 30px; margin-top: 4px;
  scrollbar-width: thin;
}
.gallery figure { margin: 0; flex: none; width: min(240px, 64vw); scroll-snap-align: center; text-align: center; }
.phone {
  border: 8px solid var(--ink); border-radius: 34px; overflow: hidden; background: var(--ink);
  box-shadow: 0 16px 30px rgba(30, 42, 28, .25); aspect-ratio: 9 / 20;
}
.phone img { width: 100%; height: 100%; object-fit: cover; }
.gallery figcaption { margin-top: 12px; font-weight: 800; }
.gallery-hint { text-align: center; color: var(--ink-soft); font-size: .9rem; margin: 0; }

/* final call */
.cta {
  text-align: center; color: #fff; padding: 110px 0 120px;
  background: linear-gradient(rgba(20, 40, 20, .35), rgba(20, 40, 20, .6)), url('../images/hero-1280.jpg') center 70% / cover;
}
.cta h2 { font-size: clamp(2.2rem, 6vw, 3.6rem); text-shadow: 0 4px 0 var(--ink); }
.cta p { font-size: 1.15rem; font-weight: 700; margin: 12px 0 28px; text-shadow: 0 2px 6px rgba(0, 0, 0, .5); }

footer { background: var(--ink); color: #c9d3c4; padding: 30px 0 40px; font-size: .9rem; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 24px; align-items: center; justify-content: space-between; }
footer a { color: #fff; }

/* appear on scroll */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .6s, transform .6s; }
.js .reveal.shown { opacity: 1; transform: none; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transform: none; transition: none; }
  .boss img { animation: none; }
  html { scroll-behavior: auto; }
}

/* 휴대폰: 대표 그림에서 꼬마 탱크가 보이게 */
@media (max-width: 600px) { .hero { background-position: 22% bottom; } }
