:root {
  /* 인주(도장) 레드 — assets/stamp-watdagam.png에서 실측 추출 */
  --ink: #CE311F;
  --ink-soft: rgba(206, 49, 31, 0.1);
  /* 크래프트지 팔레트 — 앱 themeB(모노/웜톤) 그대로 재사용, 브랜드 일관성 */
  --bg: #EFECE6;
  --surface: #FFFFFF;
  --surface-alt: #F6F3EE;
  --text: #1B1B1A;
  --text-muted: #6B6A63;
  --border: #E6E4DF;
  --accent-on: #FFFFFF;
  --radius-sm: 8px;
  --radius-md: 14px;
  --radius-lg: 20px;
  --noise: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix type='saturate' values='0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='0.5'/%3E%3C/svg%3E");
}

@media (prefers-color-scheme: dark) {
  :root {
    --ink: #E2543C;
    --ink-soft: rgba(226, 84, 60, 0.16);
    --bg: #161514;
    --surface: #201F1C;
    --surface-alt: #1B1A18;
    --text: #ECEAE5;
    --text-muted: #98948A;
    --border: #33312C;
  }
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background-color: var(--bg);
  background-image: var(--noise);
  color: var(--text);
  font-family: -apple-system, BlinkMacSystemFont, 'Apple SD Gothic Neo', 'Pretendard', 'Malgun Gothic', sans-serif;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--ink); }

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

header.site {
  display: flex;
  align-items: center;
  justify-content: space-between;
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 20px 0;
}

header.site .brand {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 800;
  font-size: 15px;
  text-decoration: none;
  color: var(--text);
  letter-spacing: -0.01em;
}

header.site .brand img { width: 26px; height: 26px; border-radius: 6px; }

header.site nav a {
  margin-left: 18px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}

header.site nav a:hover { color: var(--ink); }

/* ── 히어로: 도장이 "쾅" 찍히는 임팩트 ── */
.hero {
  text-align: left;
  padding: 72px 0 32px;
}

.hero .stamp-wrap {
  display: inline-block;
  margin-bottom: 28px;
  animation: stampDown 0.55s cubic-bezier(0.2, 0.9, 0.3, 1.4) both;
}

.hero .stamp {
  width: 116px;
  height: 116px;
  object-fit: contain;
  transform: rotate(-6deg);
  filter: drop-shadow(0 6px 10px rgba(0, 0, 0, 0.18));
}

@keyframes stampDown {
  0% { opacity: 0; transform: scale(1.9) rotate(-6deg); }
  60% { opacity: 1; }
  100% { opacity: 1; transform: scale(1) rotate(-6deg); }
}

.hero h1 {
  font-size: clamp(34px, 6vw, 48px);
  font-weight: 800;
  margin: 0 0 16px;
  letter-spacing: -0.03em;
  line-height: 1.15;
}

.hero p.tagline {
  font-size: 17px;
  color: var(--text-muted);
  margin: 0 0 14px;
  max-width: 32ch;
}

.store-links {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.store-links.center { justify-content: center; }

.store-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 13px 22px;
  border-radius: var(--radius-md);
  background: var(--ink);
  color: var(--accent-on);
  font-weight: 700;
  text-decoration: none;
  font-size: 15px;
  box-shadow: 0 4px 14px var(--ink-soft);
}

.store-btn.disabled {
  background: transparent;
  color: var(--text-muted);
  border: 1.5px dashed var(--border);
  box-shadow: none;
  cursor: default;
  pointer-events: none;
}

/* ── 본문 섹션 공통 ── */
.block { margin: 72px 0; }

.block h2, .cta-repeat h2 {
  font-size: clamp(22px, 4vw, 28px);
  font-weight: 800;
  letter-spacing: -0.02em;
  line-height: 1.3;
  margin: 0 0 14px;
}

.block-body {
  font-size: 15px;
  color: var(--text-muted);
  margin: 0 0 20px;
  line-height: 1.75;
}

.sub-head {
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.01em;
  margin: 40px 0 10px;
}

.caption {
  font-size: 13px;
  color: var(--text-muted);
  margin: 10px 0 0;
}

/* TODO: 실기기/시뮬레이터 스크린샷 확보되면 .shot-slot을 <img>로 교체 (각 슬롯의 HTML 주석에 디렉팅 있음) */
.shot-slot {
  aspect-ratio: 9 / 16;
  max-width: 240px;
  border: 1.5px dashed var(--border);
  border-radius: var(--radius-md);
  background: var(--surface-alt);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 12px;
  text-align: center;
  padding: 0 12px;
}

.shot-slot.wide { aspect-ratio: 16 / 10; max-width: 420px; margin: 0 0 8px; }

.hero-shot { margin-top: 36px; }

.shot-strip {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 12px;
  max-width: 560px;
}

.shot-strip.two { grid-template-columns: repeat(2, 1fr); max-width: 400px; }

.shot-strip .shot-slot { max-width: none; }

/* ── 도장 그리드 ── */
.badge-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 14px;
  margin-top: 8px;
}

.badge-grid img {
  width: 100%;
  height: auto;
  border-radius: var(--radius-sm);
}

/* ── Pro ── */
.pro-list {
  list-style: none;
  padding: 0;
  margin: 0 0 20px;
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 8px 20px;
  max-width: 440px;
}

.pro-list li {
  font-size: 14px;
  padding-left: 22px;
  position: relative;
}

.pro-list li::before {
  content: '✓';
  position: absolute;
  left: 0;
  color: var(--ink);
  font-weight: 700;
}

.pro .shot-slot { margin-top: 24px; }

/* ── 하단 CTA 재노출 ── */
.cta-repeat {
  text-align: center;
  margin: 80px 0 24px;
  padding: 44px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}

.cta-repeat .block-body { margin-bottom: 24px; }

footer.site {
  max-width: 720px;
  margin: 40px auto 0;
  padding: 24px 20px;
  border-top: 1px solid var(--border);
  font-size: 13px;
  color: var(--text-muted);
  text-align: center;
}

footer.site a { color: var(--text-muted); margin: 0 8px; }
footer.site a:hover { color: var(--ink); }

@media (prefers-reduced-motion: reduce) {
  .hero .stamp-wrap { animation: none; }
}

@media (max-width: 480px) {
  .badge-grid { grid-template-columns: repeat(3, 1fr); }
  .pro-list { grid-template-columns: 1fr; }
}

/* ── 법률 문서 페이지: 같은 팔레트, 장식 최소·가독성 우선 ── */
.legal h1 {
  font-size: clamp(26px, 5vw, 32px);
  font-weight: 800;
  letter-spacing: -0.02em;
  margin: 44px 0 4px;
}
.legal .meta { color: var(--text-muted); font-size: 13px; margin-bottom: 32px; }
.legal h2 {
  font-size: 16px;
  font-weight: 700;
  margin: 34px 0 10px;
  padding-left: 10px;
  border-left: 3px solid var(--ink);
}
.legal p, .legal li { font-size: 15px; color: var(--text); }
.legal ul, .legal ol { padding-left: 20px; }
.legal table { width: 100%; border-collapse: collapse; margin: 12px 0; font-size: 14px; }
.legal table th, .legal table td { text-align: left; padding: 8px 10px; border-bottom: 1px solid var(--border); }
.legal table th { color: var(--text-muted); font-weight: 600; width: 110px; }
.back-link {
  display: inline-block;
  margin: 20px 0 4px;
  font-size: 13px;
  color: var(--text-muted);
  text-decoration: none;
}
.back-link:hover { color: var(--ink); }
