/* Harumung introduction site. Colours follow design/tokens.json (neutral light/dark, MINT theme,
   pixel ink/paper); dot pictures stay at whole-number scales with no smoothing. */
:root {
  --bg: #FBF9F5;
  --surface: #FFFFFF;
  --surface-low: #F8F6F2;
  --surface-high: #EEEBE6;
  --ink: #2B2A2F;
  --muted: #77737A;
  --line: #ECE8E2;
  --accent: #23795F;
  --tint: #E3F3EC;
  --peach: #FAECE6;
  --butter: #FAF1D6;
  --sky: #E4EFF8;
  --pixel-ink: #3B3335;
  --pixel-paper: #FFFBF2;
  --coral: #F09A86;
  --radius: 20px;
  --dot: 3px;
  --heading: "Jua", system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", sans-serif;
  --body: system-ui, -apple-system, "Apple SD Gothic Neo", "Noto Sans KR", "Hiragino Sans", "Noto Sans JP", sans-serif;
  color-scheme: light dark;
}
:lang(ja) { --heading: "Hiragino Maru Gothic ProN", "Zen Maru Gothic", "BIZ UDPGothic", system-ui, sans-serif; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #16161B;
    --surface: #1E1E25;
    --surface-low: #202027;
    --surface-high: #2C2C36;
    --ink: #F1F0F5;
    --muted: #B2B0BF;
    --line: #363540;
    --accent: #8ED3B8;
    --tint: #1F3A31;
    --peach: #3A2B27;
    --butter: #3A3322;
    --sky: #22303D;
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 16px/1.65 var(--body);
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; }
a { color: var(--accent); }
h1, h2, h3 { font-family: var(--heading); font-weight: 400; line-height: 1.3; margin: 0 0 .5em; }
h1 { font-size: clamp(2rem, 6vw, 3.1rem); }
h2 { font-size: clamp(1.5rem, 4.2vw, 2.1rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 16px; top: -48px; background: var(--ink); color: var(--bg); padding: 8px 12px; border-radius: 8px; z-index: 10; }
.skip:focus { top: 12px; }
.muted { color: var(--muted); }
.pixelated, .pet .sprite, .breed img, .brand img, .eyebrow img, .paws img, .promise img, .day-night img, .float-icon { image-rendering: pixelated; }

/* A dot frame: the outline sits one dot outside the box with the corner dot left out. */
.dots {
  background: var(--pixel-paper);
  color: var(--pixel-ink);
  box-shadow:
    0 calc(var(--dot) * -1) 0 0 var(--pixel-ink),
    0 var(--dot) 0 0 var(--pixel-ink),
    calc(var(--dot) * -1) 0 0 0 var(--pixel-ink),
    var(--dot) 0 0 0 var(--pixel-ink);
}

/* ---- header ---- */
.top {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px;
  max-width: 1120px; margin: 0 auto; padding: 14px 16px;
}
.brand { display: inline-flex; align-items: center; gap: 8px; font-family: var(--heading); font-size: 1.4rem; color: var(--ink); text-decoration: none; }
.langs { display: flex; gap: 4px; font-size: .9rem; }
.langs a { color: var(--muted); text-decoration: none; padding: 6px 10px; border-radius: 999px; }
.langs a[aria-current="page"] { background: var(--tint); color: var(--accent); font-weight: 600; }

/* ---- hero ---- */
.hero {
  max-width: 1120px; margin: 0 auto; padding: 0 16px 24px;
  display: grid; gap: 20px;
  grid-template-columns: minmax(0, 1fr);
}
@media (min-width: 900px) {
  .hero { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); grid-template-rows: auto auto; align-items: center; column-gap: 40px; }
  .scene { grid-row: 1 / span 2; }
}
.scene {
  position: relative; overflow: hidden;
  min-height: 380px; height: min(64vh, 600px);
  border-radius: var(--radius);
  background: #DDE8C9 url("/assets/maps/day.webp") center 62% / cover no-repeat;
  box-shadow: 0 1px 0 var(--line), 0 18px 40px -24px rgba(43, 42, 47, .45);
  isolation: isolate;
}
.scene.night { background-image: url("/assets/maps/night.webp"); background-color: #34402F; }
.scene::after { /* the app's soft top scrim, so the button reads on any map */
  content: ""; position: absolute; inset: 0 0 auto; height: 72px; z-index: -1;
  background: linear-gradient(rgba(255, 251, 242, .45), transparent);
}
.scene.night::after { background: linear-gradient(rgba(32, 32, 39, .4), transparent); }
.stage { position: absolute; left: 0; right: 0; bottom: 14%; height: 1px; }
.walker {
  --s: 2; position: absolute; bottom: 0; left: 0;
  width: calc(64px * var(--s)); transform: translateX(var(--x, 40px));
  will-change: transform;
}
@media (min-width: 600px) { .walker { --s: 3; } }
.pet { display: block; padding: 0; margin: 0; border: 0; background: none; cursor: pointer; -webkit-tap-highlight-color: transparent; }
.pet:focus-visible { outline: 3px solid var(--pixel-paper); outline-offset: 2px; border-radius: 8px; }
.pet .sprite {
  display: block; width: calc(64px * var(--s)); height: calc(64px * var(--s));
  background: var(--atlas, url("/assets/pets/baekgu.png")) no-repeat;
  background-size: calc(256px * var(--s)) calc(320px * var(--s));
  background-position: calc(var(--col, 0) * -64px * var(--s)) calc(var(--row, 2) * -64px * var(--s));
  transform: scaleX(var(--face, 1));
}
.walker.hop .pet { animation: hop .42s steps(6) 1; }
@keyframes hop { 0%, 100% { transform: translateY(0); } 40% { transform: translateY(-22px); } 70% { transform: translateY(-6px); } }
.shadow {
  position: absolute; left: 22%; right: 22%; bottom: calc(4px * var(--s)); height: calc(5px * var(--s));
  background: rgba(38, 57, 33, .2); border-radius: 50%; z-index: -1;
}
.bubble {
  position: absolute; bottom: calc(100% + 14px); left: 50%; transform: translateX(-50%);
  width: max-content; max-width: min(240px, 70vw); margin: 0;
  padding: 7px 12px; font: 1rem/1.4 var(--heading); text-align: center;
  background: var(--pixel-paper); color: var(--pixel-ink);
  box-shadow: 0 -3px 0 0 var(--pixel-ink), 0 3px 0 0 var(--pixel-ink), -3px 0 0 0 var(--pixel-ink), 3px 0 0 0 var(--pixel-ink);
  transition: opacity .25s;
}
:lang(en) .bubble, :lang(ja) .bubble { font-family: var(--body); font-weight: 600; font-size: .92rem; }
.bubble:empty { opacity: 0; }
.bubble::after { /* a stepped tail under the bubble */
  content: ""; position: absolute; left: 50%; top: 100%; width: 9px; height: 9px; margin-left: -6px;
  background:
    linear-gradient(var(--pixel-ink), var(--pixel-ink)) 0 0 / 3px 9px no-repeat,
    linear-gradient(var(--pixel-ink), var(--pixel-ink)) 9px 0 / 3px 3px no-repeat,
    linear-gradient(var(--pixel-ink), var(--pixel-ink)) 6px 3px / 3px 3px no-repeat,
    linear-gradient(var(--pixel-ink), var(--pixel-ink)) 3px 6px / 3px 3px no-repeat,
    linear-gradient(var(--pixel-paper), var(--pixel-paper)) 3px 0 / 6px 3px no-repeat,
    linear-gradient(var(--pixel-paper), var(--pixel-paper)) 3px 3px / 3px 3px no-repeat;
  width: 12px;
}
.day-night {
  position: absolute; top: 12px; right: 12px; z-index: 2;
  width: 44px; height: 44px; display: grid; place-items: center; cursor: pointer; border: 0;
  background: var(--pixel-paper);
  box-shadow: 0 -3px 0 0 var(--pixel-ink), 0 3px 0 0 var(--pixel-ink), -3px 0 0 0 var(--pixel-ink), 3px 0 0 0 var(--pixel-ink);
}
.day-night img { grid-area: 1 / 1; }
.day-night .moon, .scene.night .day-night .sun { display: none; }
.scene.night .day-night .moon { display: block; }
.float-icon { position: absolute; pointer-events: none; width: 26px; height: auto; animation: rise 1.1s ease-out forwards; z-index: 3; }
.float-text { position: absolute; pointer-events: none; font: 1.1rem var(--heading); color: #CB6B5B; animation: rise 1.1s ease-out forwards; z-index: 3; white-space: nowrap; }
@keyframes rise { from { opacity: 1; transform: translateY(0); } to { opacity: 0; transform: translateY(-46px); } }

.hero-card { padding: 4px 4px 0; }
.kicker { display: inline-block; color: var(--accent); background: var(--tint); font-weight: 600; font-size: .9rem; padding: 4px 12px; border-radius: 999px; margin-bottom: 14px; }
h1 em { font-style: normal; color: var(--accent); }
.lead { color: var(--muted); font-size: 1.05rem; max-width: 34em; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; margin: 20px 0 8px; }
.store {
  display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 0 22px;
  border-radius: 14px; font-weight: 700; text-decoration: none; font-size: 1rem;
}
.store-play { background: var(--ink); color: var(--bg); }
.store-play:hover { filter: brightness(1.15); }
.store-ios { background: var(--surface); color: var(--ink); border: 2px solid var(--ink); }
.store-soon { background: transparent; color: var(--muted); border: 2px dashed var(--line); cursor: default; }
/* Store buttons and, on a computer, the QR beside them: one download block. */
.download { margin: 20px 0 8px; }
.download .stores { margin: 0; }
.qr-box { display: none; flex-direction: column; align-items: center; gap: 6px; margin: 0; color: var(--muted); font-size: .8rem; }
.qr-box svg { width: 120px; height: 120px; border-radius: 10px; }
@media (hover: hover) and (min-width: 900px) {
  .download {
    display: flex; align-items: center; gap: 24px; width: max-content; max-width: 100%;
    padding: 18px 22px; border-radius: var(--radius); background: var(--surface-low); border: 1px solid var(--line);
  }
  .download .stores { flex-direction: column; flex-wrap: nowrap; }
  .download .store { min-width: 230px; }
  .qr-box { display: flex; }
}

.breeds-wrap { min-width: 0; }
.breeds-title { font-family: var(--heading); font-size: 1.05rem; margin-bottom: 8px; }
/* All eight friends at once: four across, two rows, no sideways scrolling at any width. */
.breeds { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; padding: 2px; }
.breed {
  display: grid; justify-items: center; align-content: start; gap: 2px; min-width: 0;
  padding: 8px 4px 6px; border-radius: 14px; cursor: pointer;
  border: 2px solid var(--line); background: var(--surface); color: var(--ink); font: .74rem/1.25 var(--body);
}
.breed span { min-height: 2.5em; display: flex; align-items: center; text-align: center; overflow-wrap: normal; hyphens: auto; }
.breed[aria-pressed="true"] { border-color: var(--accent); background: var(--tint); color: var(--accent); font-weight: 600; }

/* ---- try ---- */
section { scroll-margin-top: 16px; }
.try, .features, .promise, .faq, .final { max-width: 1120px; margin: 0 auto; padding: 56px 16px; }
.try { display: grid; gap: 28px; align-items: center; }
@media (min-width: 800px) { .try { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 48px; } }
.note { color: var(--muted); font-size: .9rem; }
.try-card { background: var(--butter); border-radius: var(--radius); padding: 22px 20px; position: relative; }
.paws { display: inline-flex; align-items: center; gap: 8px; font: 1.4rem var(--heading); background: var(--surface); padding: 6px 16px 6px 12px; border-radius: 999px; margin-bottom: 14px; }
.paws.bump { animation: bump .35s ease-out; }
@keyframes bump { 50% { transform: scale(1.12); } }
.todos { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.todo {
  position: relative; display: flex; align-items: center; gap: 14px; min-height: 56px;
  padding: 10px 16px; background: var(--surface); border-radius: 14px; cursor: pointer;
}
.todo input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.todo .box {
  flex: none; width: 26px; height: 26px; border-radius: 8px; border: 2px solid var(--muted);
  display: grid; place-items: center; transition: background .15s, border-color .15s;
}
.todo input:checked + .box { background: var(--accent); border-color: var(--accent); }
.todo input:checked + .box::after { content: ""; width: 11px; height: 6px; border: solid var(--surface); border-width: 0 0 3px 3px; transform: translateY(-2px) rotate(-45deg); }
.todo input:checked ~ .todo-text { color: var(--muted); text-decoration: line-through; }
.todo input:focus-visible + .box { outline: 3px solid var(--accent); outline-offset: 2px; }

/* ---- features ---- */
.features { display: grid; gap: 72px; }
.feature { display: grid; gap: 24px; align-items: center; grid-template-columns: minmax(0, 1fr); }
@media (min-width: 800px) {
  .feature { grid-template-columns: minmax(0, 1.1fr) minmax(0, .9fr); gap: 56px; }
  .feature:nth-child(even) .feature-text { order: 2; }
}
.eyebrow { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; color: var(--accent); margin-bottom: 8px; }
.points { margin: 0; padding: 0; list-style: none; display: grid; gap: 8px; }
.points li { position: relative; padding-left: 22px; }
.points li::before { content: ""; position: absolute; left: 4px; top: .62em; width: 8px; height: 8px; background: var(--coral); border-radius: 2px; }
.shot {
  justify-self: center; width: min(300px, 78vw); height: auto; border-radius: 28px;
  box-shadow: 0 24px 50px -28px rgba(43, 42, 47, .55); background: var(--surface-high);
}
#today .shot { background: var(--tint); }

.dday { margin-top: 22px; padding: 18px; border-radius: var(--radius); background: var(--peach); display: grid; gap: 12px; }
.dday-title { font-family: var(--heading); font-size: 1.15rem; margin: 0; }
.field { display: grid; gap: 4px; font-size: .9rem; color: var(--muted); }
.field input { font: inherit; font-size: 1rem; color: var(--ink); background: var(--surface); border: 2px solid var(--line); border-radius: 12px; padding: 10px 12px; min-height: 48px; }
.choice { border: 0; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 8px; }
.choice label { display: inline-flex; align-items: center; gap: 6px; background: var(--surface); padding: 8px 12px; border-radius: 999px; font-size: .92rem; cursor: pointer; min-height: 40px; }
.choice input { accent-color: var(--accent); }
.choice .lunar:has(input:disabled) { opacity: .5; cursor: default; }
.dday-result { margin: 0; display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 12px; background: var(--surface); border-radius: 14px; padding: 12px 16px; }
.dday-number { font: 2rem var(--heading); color: var(--accent); }
.dday-date { color: var(--muted); }

/* ---- promise, faq, final ---- */
.promise ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 14px; }
@media (min-width: 700px) { .promise ul { grid-template-columns: 1fr 1fr; } }
.promise li { display: flex; gap: 14px; align-items: flex-start; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.promise li img { flex: none; margin-top: 4px; }
.promise h3 { margin-bottom: .25em; }
.promise p { margin: 0; color: var(--muted); }
.faq { max-width: 820px; }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary { cursor: pointer; padding: 16px 4px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--accent); font: 1.4rem/1 var(--heading); }
.faq details[open] summary::after { content: "−"; }
.faq details p { padding: 0 4px 16px; color: var(--muted); margin: 0; }
.final { text-align: center; }
.final .stores { justify-content: center; }
.final-wrap { background: var(--tint); }
.bottom { max-width: 1120px; margin: 0 auto; padding: 28px 16px 40px; font-size: .88rem; color: var(--muted); border-top: 1px solid var(--line); }
.bottom a { color: var(--muted); }

@media (prefers-reduced-motion: reduce) {
  .walker.hop .pet, .paws.bump, .float-icon, .float-text { animation: none; }
  .float-icon, .float-text { display: none; }
}
