/* Mun Chat Themes landing page.
   Same visual system as the iOS app (ChatThemes/Views/DesignSystem.swift, "Butter, quieted",
   2026-11-23): white ground, black type, one font family at two weights, soft gray fills
   instead of outlines. Butter appears in only two places: the 문 door mark and the main
   (App Store) button. No other accent colors; the themes' own pictures carry the color.
   Dark mode is a neutral near-black. */

:root {
  --bg: #FFFFFF;
  --surface: #FFFFFF;
  --soft: #F4F4F2;
  --ink: #111111;
  --sub: #6E6E6E;
  --line: #EFEFEF;
  --chip-line: #E5E5E5;
  --raised: #111111;
  --on-raised: #FFFFFF;
  --on-raised-sub: rgba(255, 255, 255, .66);
  --selected: #111111;
  --on-selected: #FFFFFF;
  --butter: #FFCE3A;
  --on-butter: #111111;
  --new-text: #8A6500;
  --frame: #111111;
  --shadow: 0 28px 60px -28px rgba(0, 0, 0, .35);
  --font: -apple-system, BlinkMacSystemFont, "Pretendard Variable", Pretendard,
          "Apple SD Gothic Neo", "Noto Sans KR", system-ui, "Segoe UI", sans-serif;
  color-scheme: light dark;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0F0F0F;
    --surface: #181818;
    --soft: #1F1F1F;
    --ink: #F2F2F2;
    --sub: #9A9A9A;
    --line: #262626;
    --chip-line: #333333;
    --raised: #222222;
    --on-raised: #F2F2F2;
    --on-raised-sub: rgba(242, 242, 242, .62);
    --selected: #F2F2F2;
    --on-selected: #0F0F0F;
    --new-text: #FFCE3A;
    --frame: #2A2A2A;
    --shadow: 0 28px 60px -28px rgba(0, 0, 0, .9);
  }
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;          /* Korean: break between words, not inside them */
  overflow-wrap: anywhere;
}
img { display: block; max-width: 100%; height: auto; }
a { color: inherit; }

/* Two languages in one page: <html lang="ko"> shows .ko, anything else shows .en. */
html[lang="ko"] .en, html:not([lang="ko"]) .ko { display: none !important; }

.wrap { max-width: 1080px; margin: 0 auto; padding: 0 20px; }

/* The 문 door from the app icon: a butter arch with an ink knob. */
.door { display: inline-block; flex: none; position: relative; width: 17px; height: 24px; background: var(--butter); border-radius: 8.5px 8.5px 0 0; }
.door::after { content: ""; position: absolute; width: 3.2px; height: 3.2px; border-radius: 50%; background: var(--on-butter); left: 11.3px; top: 13.4px; }

/* ---------- Header ---------- */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
}
.top .wrap { display: flex; align-items: center; gap: 12px; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; font-weight: 600; font-size: 19px; letter-spacing: -.3px; margin-right: auto; }
.lang { display: flex; gap: 14px; }
.lang button {
  font: inherit; font-size: 14px; border: 0; background: transparent; color: var(--sub);
  height: 36px; padding: 0; cursor: pointer; position: relative;
}
.lang button[aria-pressed="true"] { color: var(--ink); font-weight: 600; }
.lang button[aria-pressed="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: 4px; height: 2px; background: var(--ink); }
.top-cta {
  display: inline-flex; align-items: center; height: 36px; padding: 0 16px; border-radius: 999px; margin-left: 6px;
  background: var(--selected); color: var(--on-selected); text-decoration: none; font-size: 14px; font-weight: 600;
}
@media (max-width: 520px) { .top-cta { display: none; } }

/* ---------- Type ---------- */
h1, h2, h3 { font-weight: 700; letter-spacing: -.025em; line-height: 1.2; }
h1 { font-size: clamp(36px, 6.2vw, 60px); }
h2 { font-size: clamp(26px, 4vw, 38px); }
h3 { font-size: 17px; font-weight: 600; letter-spacing: -.3px; }
.kicker { font-size: 14px; font-weight: 600; color: var(--sub); margin-bottom: 10px; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--sub); max-width: 32em; }
.nw { white-space: nowrap; }

/* Small uppercase text label, like the app's Badge: no pill, color and weight only. */
.label { font-size: 12px; font-weight: 600; letter-spacing: .03em; text-transform: uppercase; color: var(--new-text); }
.label.is-muted { color: var(--sub); }

/* ---------- Store button: the app's 54pt butter button ---------- */
.store {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 54px; padding: 0 26px; border-radius: 14px;
  background: var(--butter); color: var(--on-butter);
  font-size: 16px; font-weight: 600; text-decoration: none;
  transition: opacity .15s;
}
.store:hover { opacity: .85; }
.store svg { width: 20px; height: 20px; flex: none; }
.store.is-soon { background: var(--soft); color: var(--sub); cursor: default; }
.store.is-soon:hover { opacity: 1; }
.meta { margin-top: 14px; font-size: 14px; color: var(--sub); }

/* ---------- Hero ---------- */
.hero { display: grid; grid-template-columns: 1.05fr 1fr; gap: 48px; align-items: center; padding-top: 56px; padding-bottom: 80px; }
.hero .label { display: block; margin-bottom: 14px; }
.hero h1 { margin-bottom: 18px; }
.hero .lead { margin-bottom: 32px; }
.phones { position: relative; display: flex; justify-content: center; min-height: 540px; }
.phones::before { /* a soft gray stage behind the phones */
  content: ""; position: absolute; inset: 40px 6% 30px; border-radius: 32px; background: var(--soft);
}
.phone {
  width: 250px; aspect-ratio: 600 / 1298; border-radius: 40px; padding: 8px;
  background: var(--frame); box-shadow: var(--shadow); flex: none; position: relative;
}
.phone img { width: 100%; height: 100%; object-fit: cover; border-radius: 32px; }
.phones .phone:first-child { transform: translate(34px, 34px) rotate(-4deg); }
.phones .phone:last-child { transform: translate(-34px, 10px) rotate(3deg); z-index: 1; }
.toast {
  position: absolute; z-index: 2; left: 50%; bottom: 8px; transform: translateX(-50%);
  display: flex; align-items: center; gap: 10px; white-space: nowrap;
  background: var(--surface); border-radius: 16px; padding: 12px 18px 12px 12px;
  box-shadow: 0 14px 34px -12px rgba(0, 0, 0, .3); font-size: 14px; font-weight: 600;
}
.toast .check { width: 28px; height: 28px; border-radius: 50%; background: var(--selected); color: var(--on-selected); display: grid; place-items: center; }
.toast .check svg { width: 15px; height: 15px; }
.toast small { display: block; font-weight: 400; color: var(--sub); font-size: 12px; line-height: 1.3; }

@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; gap: 28px; padding-top: 32px; padding-bottom: 56px; text-align: center; }
  .hero .lead { margin-left: auto; margin-right: auto; }
  .phones { min-height: 0; padding: 20px 0 44px; }
  .phones::before { inset: 0 0 20px; border-radius: 28px; }
  .phone { width: min(200px, 40vw); border-radius: 32px; padding: 6px; }
  .phone img { border-radius: 26px; }
  .phones .phone:first-child { transform: translate(14px, 22px) rotate(-4deg); }
  .phones .phone:last-child { transform: translate(-14px, 0) rotate(3deg); }
  .toast { bottom: 4px; }
}

/* ---------- Sections ---------- */
.section { padding: 72px 0; }
.section + .section { border-top: 1px solid var(--line); }
.section-head { margin-bottom: 32px; }
.section-head p:not(.kicker) { color: var(--sub); margin-top: 10px; max-width: 36em; }

/* Text tabs, like the app's Chip: ink and underlined when selected, gray otherwise. */
.tabs { display: flex; gap: 26px; overflow-x: auto; scrollbar-width: none; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; font-size: 15px; color: var(--sub); padding-bottom: 10px; white-space: nowrap; position: relative; }
.tab.is-on { color: var(--ink); font-weight: 600; }
.tab.is-on::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--ink); }

/* Theme cards, like the app's grid: soft tile, picture, then name + NEW. */
.themes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; }
.theme { margin: 0; }
.theme .pic { border-radius: 18px; overflow: hidden; background: var(--soft); padding: 14px; }
.theme .pic img { width: 100%; aspect-ratio: 900 / 944; object-fit: cover; border-radius: 6px; }
.theme figcaption { margin-top: 14px; font-size: 17px; font-weight: 500; display: flex; align-items: baseline; flex-wrap: wrap; gap: 4px 10px; }
.theme figcaption .tags { flex-basis: 100%; font-size: 14px; font-weight: 400; color: var(--sub); }

/* Features: soft gray fills instead of outlines. */
.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.feature { background: var(--soft); border-radius: 20px; padding: 24px 22px; }
.feature .ico { width: 40px; height: 40px; border-radius: 12px; background: var(--surface); display: grid; place-items: center; margin-bottom: 18px; }
.feature .ico svg { width: 21px; height: 21px; }
.feature p { color: var(--sub); font-size: 15px; margin-top: 6px; }
@media (max-width: 900px) { .features { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 520px) { .features, .themes { grid-template-columns: 1fr; } }

/* Steps: numbered rows. */
.steps { list-style: none; display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; counter-reset: s; }
.steps li { counter-increment: s; background: var(--soft); border-radius: 20px; padding: 24px 22px; }
.steps li::before {
  content: counter(s); display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%;
  background: var(--selected); color: var(--on-selected); font-weight: 600; font-size: 15px; margin-bottom: 16px;
}
.steps p { color: var(--sub); font-size: 15px; margin-top: 4px; }
.note { margin-top: 16px; font-size: 14px; color: var(--sub); }
@media (max-width: 760px) { .steps { grid-template-columns: 1fr; } }

/* Plans: Free is a soft card; Premium is the app's big ink card. */
.plans { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.plan { border-radius: 24px; padding: 28px 26px; background: var(--soft); }
.plan .label { display: block; margin-bottom: 12px; color: var(--sub); }
.plan h3 { font-size: 22px; }
.plan > p { color: var(--sub); margin-top: 6px; }
.plan ul { list-style: none; margin-top: 20px; display: grid; gap: 10px; }
.plan li { display: flex; gap: 10px; font-size: 15px; }
.plan li::before {
  content: ""; flex: none; width: 18px; height: 18px; margin-top: 3px; background: currentColor;
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
          mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m5 12.5 4.5 4.5L19 7.5'/%3E%3C/svg%3E") center / contain no-repeat;
}
.plan.is-premium { background: var(--raised); color: var(--on-raised); }
.plan.is-premium .label, .plan.is-premium > p { color: var(--on-raised-sub); }
@media (max-width: 760px) { .plans { grid-template-columns: 1fr; } }

/* Trust block: one soft card, ink icons. */
.trust { background: var(--soft); border-radius: 28px; padding: 44px 40px; display: grid; grid-template-columns: 1.2fr 1fr; gap: 32px; align-items: center; }
.trust p:not(.kicker) { color: var(--sub); margin-top: 12px; }
.trust ul { list-style: none; display: grid; gap: 10px; }
.trust li { background: var(--surface); border-radius: 14px; padding: 14px 16px; font-size: 15px; display: flex; gap: 12px; align-items: center; }
.trust li svg { width: 20px; height: 20px; flex: none; }
.trust a { font-weight: 600; text-decoration: underline; text-underline-offset: 4px; text-decoration-thickness: 1.5px; display: inline-block; margin-top: 18px; }
@media (max-width: 760px) { .trust { grid-template-columns: 1fr; padding: 32px 24px; } }

/* Final CTA */
.cta { text-align: center; padding: 96px 0 80px; border-top: 1px solid var(--line); }
.cta img { width: 96px; height: 96px; border-radius: 22px; margin: 0 auto 24px; box-shadow: 0 0 0 1px var(--chip-line), 0 14px 30px -16px rgba(0, 0, 0, .3); }
.cta p:not(.kicker):not(.meta) { color: var(--sub); margin: 10px auto 28px; }
.cta .meta a { text-underline-offset: 3px; }

/* Footer */
.foot { border-top: 1px solid var(--line); padding: 28px 0 44px; font-size: 13px; color: var(--sub); }
.foot nav { display: flex; flex-wrap: wrap; gap: 6px 20px; margin-bottom: 14px; }
.foot nav a { text-decoration: none; color: var(--ink); }
.foot nav a:hover { text-decoration: underline; }
.foot p + p { margin-top: 6px; }
