/* 루틴캠프 랜딩. 색은 docs/04-DESIGN_SYSTEM.md 토큰과 같아요. */
:root {
  --bg: #fbf8f3;
  --surface: #ffffff;
  --surface-muted: #f3eee6;
  --border: #e8e1d6;
  --text: #2a2622;
  --text-muted: #6b635a;
  --text-subtle: #958c81;
  --primary: #2f7a5b;
  --primary-pressed: #25634a;
  --primary-soft: #e2f1e9;
  --on-primary: #ffffff;
  --xp: #c98a1f;
  --xp-soft: #fbf0d9;
  --scene: #f7f5e4;
  --shadow: 0 1px 2px rgba(42, 38, 34, 0.06), 0 12px 32px rgba(42, 38, 34, 0.08);
  --radius-md: 12px;
  --radius-lg: 16px;
  --radius-xl: 24px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412;
    --surface: #201d1a;
    --surface-muted: #2a2622;
    --border: #3a352f;
    --text: #f4efe8;
    --text-muted: #b8afa4;
    --text-subtle: #857c72;
    --primary: #5dbb8e;
    --primary-pressed: #4aa67a;
    --primary-soft: #1e3a2e;
    --on-primary: #0f1f17;
    --xp: #e8b54d;
    --xp-soft: #3a2e14;
    --scene: #2b2925;
    --shadow: none;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: 72px; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 16px;
  line-height: 1.6;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--primary); }
h1, h2, h3 { line-height: 1.3; margin: 0; letter-spacing: -0.02em; }
p { margin: 0; }
:focus-visible { outline: 3px solid var(--primary); outline-offset: 2px; border-radius: 4px; }

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

/* 헤더 */
.site-header {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 88%, transparent);
  backdrop-filter: saturate(1.4) blur(12px);
  -webkit-backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--border);
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; height: 60px; gap: 12px; }
.brand { display: flex; align-items: center; gap: 8px; color: var(--text); text-decoration: none; font-weight: 700; font-size: 18px; }
.brand img { border-radius: 8px; }
.header-nav { display: flex; align-items: center; gap: 4px; }
.header-nav a { color: var(--text-muted); text-decoration: none; font-size: 15px; font-weight: 500; padding: 8px 10px; border-radius: 8px; }
.header-nav a:hover { color: var(--text); background: var(--surface-muted); }
.header-nav .header-cta { background: var(--primary); color: var(--on-primary); font-weight: 600; padding: 8px 14px; margin-left: 4px; }
.header-nav .header-cta:hover { background: var(--primary-pressed); color: var(--on-primary); }
@media (max-width: 600px) {
  .header-nav a:not(.header-cta) { display: none; }
}

/* 공통 */
.eyebrow { color: var(--primary); font-weight: 600; font-size: 15px; margin-bottom: 10px; }
.section { padding: 88px 0; }
.section-muted { background: var(--surface-muted); }
.section h2 { font-size: clamp(28px, 4.2vw, 40px); font-weight: 700; margin-bottom: 18px; }
.section p { color: var(--text-muted); font-size: 17px; }
.section-head { max-width: 640px; margin-bottom: 48px; }
.section .eyebrow { color: var(--primary); }
.note { margin-top: 16px; padding: 12px 16px; border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary) !important; font-weight: 500; font-size: 15px !important; }
.text-link { font-weight: 600; font-size: 18px; }

.button-primary {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 52px; padding: 0 28px; border-radius: var(--radius-md);
  background: var(--primary); color: var(--on-primary); font-weight: 600; font-size: 16px; text-decoration: none;
}
.button-primary:hover { background: var(--primary-pressed); }
.button-ghost {
  font: inherit; font-size: 14px; font-weight: 600; color: var(--primary);
  background: none; border: 1px solid var(--border); border-radius: 8px; padding: 6px 12px; cursor: pointer; min-height: 36px;
}

/* 스토어 버튼 */
.stores { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 32px; }
.store {
  display: inline-flex; flex-direction: column; justify-content: center;
  min-width: 164px; min-height: 60px; padding: 8px 20px; border-radius: var(--radius-md);
  background: var(--text); color: var(--bg); text-decoration: none; line-height: 1.25;
}
.store:hover { opacity: 0.88; }
.store-sub { font-size: 12px; font-weight: 500; opacity: 0.8; }
.store-name { font-size: 19px; font-weight: 700; letter-spacing: -0.01em; }
.store.is-soon { background: var(--surface); color: var(--text-muted); border: 1px solid var(--border); cursor: default; }
.store.is-soon .store-sub { color: var(--xp); opacity: 1; font-weight: 600; }

/* 폰 화면 */
.phone {
  width: 100%; max-width: 280px;
  border-radius: 36px; padding: 8px;
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow);
}
.phone img { border-radius: 28px; width: 100%; }
.scene { border-radius: var(--radius-xl); background: var(--scene); overflow: hidden; }
@media (prefers-color-scheme: dark) {
  .scene img, .tiers img { filter: brightness(0.92); }
}

/* 히어로 */
.hero { padding: 64px 0 88px; }
.hero-grid { display: grid; gap: 48px; align-items: center; }
.hero h1 { font-size: clamp(36px, 6.4vw, 60px); font-weight: 800; margin-bottom: 20px; }
.lead { color: var(--text-muted); font-size: clamp(17px, 2vw, 19px); max-width: 520px; }
.hero-art { position: relative; padding-bottom: 40px; }
.hero-art .scene { width: 100%; max-width: 560px; aspect-ratio: 4 / 3; }
.hero-art .scene img { width: 100%; height: 100%; object-fit: cover; }
.hero-phone { position: absolute; right: 0; bottom: 0; max-width: 168px; border-radius: 26px; padding: 5px; }
.hero-phone img { border-radius: 21px; }
@media (max-width: 599px) {
  .hero-art { padding-bottom: 0; }
  .hero-phone { display: none; }
}
@media (min-width: 900px) {
  .hero { padding: 88px 0 112px; }
  .hero-grid { grid-template-columns: 1.05fr 1fr; }
  .hero-phone { max-width: 200px; right: -12px; }
}

/* 좌우 배치 */
.split { display: grid; gap: 48px; align-items: center; }
.split-art { display: flex; justify-content: center; }
@media (min-width: 900px) {
  .split { grid-template-columns: 1fr 1fr; gap: 80px; }
  .split-reverse .split-copy { order: 2; }
}
.kinds { list-style: none; padding: 0; margin: 28px 0 0; display: grid; gap: 10px; }
.kinds li {
  display: flex; align-items: center; gap: 14px;
  padding: 12px 16px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border);
}
.kind-emoji { font-size: 24px; width: 32px; text-align: center; }
.kinds strong { display: block; font-size: 16px; }
.kinds span { color: var(--text-muted); font-size: 14px; }

/* 캠프 단계 */
.steps { list-style: none; padding: 0; margin: 0 0 56px; display: grid; gap: 12px; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.steps li { padding: 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.steps strong { display: block; font-size: 18px; margin: 12px 0 6px; }
.steps p { font-size: 15px; }
.step-no {
  display: inline-flex; align-items: center; justify-content: center; width: 32px; height: 32px; border-radius: 999px;
  background: var(--primary-soft); color: var(--primary); font-weight: 700; font-size: 15px;
}
.phones-row { display: flex; justify-content: center; gap: 24px; }
.phones-row .phone { max-width: 260px; }
@media (max-width: 600px) {
  .phones-row { gap: 12px; }
  .phones-row .phone { border-radius: 24px; padding: 5px; }
  .phones-row .phone img { border-radius: 19px; }
}

/* 문명 등급 */
.section-world { background: linear-gradient(180deg, var(--bg), var(--surface-muted)); }
.tiers {
  list-style: none; margin: 0; padding: 0 20px 8px;
  display: grid; grid-auto-flow: column; grid-auto-columns: 220px; gap: 16px;
  overflow-x: auto; scroll-snap-type: x mandatory; scroll-padding: 0 20px;
}
.tiers li { scroll-snap-align: start; }
.tiers figure { margin: 0; }
.tiers img { border-radius: var(--radius-lg); background: var(--scene); aspect-ratio: 4 / 3; object-fit: cover; width: 100%; }
.tiers figcaption { margin-top: 10px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.tier-no {
  display: inline-flex; align-items: center; justify-content: center; min-width: 24px; height: 24px; padding: 0 6px;
  border-radius: 999px; background: var(--xp-soft); color: var(--xp); font-size: 12px; font-weight: 700;
}
@media (min-width: 900px) {
  .tiers {
    max-width: 1080px; margin: 0 auto; overflow: visible;
    grid-auto-flow: row; grid-template-columns: repeat(3, 1fr); grid-auto-columns: auto; gap: 24px;
  }
}

/* 다운로드 */
.cta-inner { display: flex; flex-direction: column; align-items: center; text-align: center; }
.cta-icon { border-radius: 22px; margin-bottom: 24px; box-shadow: var(--shadow); }
.cta .stores { justify-content: center; }

/* 회사 소개 */
.about { display: grid; gap: 24px; }
.about-body { display: grid; gap: 12px; max-width: 600px; }
@media (min-width: 900px) { .about { grid-template-columns: 1fr 1.6fr; } }

/* 푸터 */
.site-footer { border-top: 1px solid var(--border); padding: 40px 0 56px; color: var(--text-muted); font-size: 14px; }
.footer-links { display: flex; flex-wrap: wrap; gap: 8px 20px; margin-bottom: 20px; }
.footer-links a { color: var(--text); text-decoration: none; }
.footer-links a:hover { text-decoration: underline; }
.biz { font-style: normal; display: flex; flex-wrap: wrap; gap: 4px 0; line-height: 1.7; }
.biz span:not(:last-child)::after { content: '|'; margin: 0 10px; color: var(--border); }
.copy { margin-top: 16px; color: var(--text-subtle); font-size: 13px; }

/* 약관 */
.legal { padding-top: 48px; padding-bottom: 88px; }
.legal h1 { font-size: clamp(28px, 4vw, 36px); margin-bottom: 24px; }
.legal h2 { font-size: 21px; margin: 48px 0 14px; padding-top: 8px; }
.legal h3 { font-size: 18px; margin: 28px 0 10px; }
.legal p, .legal li { color: var(--text); font-size: 16px; line-height: 1.75; }
.legal p { margin: 12px 0; }
.legal ul, .legal ol { padding-left: 22px; margin: 12px 0; }
.legal li { margin: 6px 0; }
.legal blockquote { margin: 16px 0; padding: 12px 16px; border-radius: var(--radius-md); background: var(--xp-soft); }
.legal blockquote p { margin: 0; color: var(--text); }
.legal code { font-size: 0.92em; background: var(--surface-muted); padding: 1px 5px; border-radius: 4px; }
.table-wrap { overflow-x: auto; margin: 16px 0; border: 1px solid var(--border); border-radius: var(--radius-md); background: var(--surface); }
.legal table { width: 100%; border-collapse: collapse; font-size: 15px; }
@media (max-width: 600px) { .legal table { font-size: 14px; } .legal th, .legal td { padding: 8px 10px; } }
.legal th, .legal td { overflow-wrap: break-word; text-align: left; vertical-align: top; padding: 10px 14px; border-bottom: 1px solid var(--border); line-height: 1.6; }
.legal th { background: var(--surface-muted); font-weight: 600; }
.legal tr:last-child td { border-bottom: 0; }
.toc { margin: 24px 0 8px; padding: 18px 20px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.toc-title { font-weight: 700; margin: 0 0 8px !important; }
.toc ol { list-style: none; margin: 0; padding-left: 0; columns: 2 220px; column-gap: 24px; }
.toc li { margin: 0; padding: 3px 0; font-size: 15px; break-inside: avoid; }
.toc a { color: var(--text-muted); text-decoration: none; }
.toc a:hover { color: var(--primary); text-decoration: underline; }
.legal-other { margin-top: 48px !important; }

/* 초대 */
.invite { padding-top: 40px; padding-bottom: 72px; max-width: 520px; }
.invite-card { text-align: center; display: flex; flex-direction: column; align-items: center; }
.invite-scene { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 24px; }
.invite-scene img { width: 100%; height: 100%; object-fit: cover; }
.invite h1 { font-size: 28px; margin-bottom: 8px; }
.invite-meta { color: var(--xp); font-weight: 600; font-size: 15px; margin-bottom: 12px; }
.invite-desc { color: var(--text-muted); margin: 8px 0 24px; }
.invite .button-primary { width: 100%; }
.invite-code {
  display: flex; align-items: center; gap: 12px; justify-content: center;
  margin-top: 16px; padding: 12px 16px; width: 100%; border-radius: var(--radius-md); background: var(--surface-muted);
}
.invite-code span { color: var(--text-muted); font-size: 14px; }
.invite-code strong { font-size: 20px; letter-spacing: 0.12em; font-variant-numeric: tabular-nums; }
.invite-help { margin-top: 20px; color: var(--text-muted); font-size: 14px; }
.invite .stores { justify-content: center; margin-top: 20px; }
.avatars { list-style: none; padding: 0; margin: 4px 0 4px; display: flex; justify-content: center; }
.avatars li {
  width: 36px; height: 36px; border-radius: 999px; margin-left: -6px; border: 2px solid var(--bg);
  display: flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; color: #2a2622;
}
.avatars li:first-child { margin-left: 0; }
[hidden] { display: none !important; }

/* 404 */
.notfound { padding-top: 56px; padding-bottom: 96px; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 12px; max-width: 480px; }
.notfound .scene { width: 100%; aspect-ratio: 4 / 3; margin-bottom: 12px; }
.notfound .scene img { width: 100%; height: 100%; object-fit: cover; }
.notfound p { color: var(--text-muted); margin-bottom: 12px; }

@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
.legal td a { overflow-wrap: anywhere; word-break: break-all; }
