/* 칙! CHIKKK! — 랜딩 스타일. 토큰: docs/03-design-tokens.md v2 (1:1).
   mori.beside-co.com 수준의 단일 화면 미니멀. */

:root {
  --ink: #17130f;
  --ink-deep: #191511;
  --bg: #f4f0e7;         /* 웜 아이보리 배경 */
  --text: #1c1915;       /* 웜 잉크 (순블랙 아님) */
  --surface: #ffffff;
  --sunken: #ede8dc;
  --border: #e8e2d4;
  --muted: #99917f;
  --accent: #e8632c;     /* Point Orange — 행동 */
  --navy: #243c74;       /* Point Navy — 상태·선택 */
  --crema: #d9a45b;      /* 커피 표현 전용 */
  --danger: #b05248;

  --maxw: 1080px;
  --radius: 18px;
  --shadow: 0 1px 2px rgba(23, 19, 15, 0.04), 0 12px 32px rgba(23, 19, 15, 0.08);

  --font-body: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont, system-ui, 'Apple SD Gothic Neo', sans-serif;
  --font-num: 'Space Grotesk', 'Pretendard Variable', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; }

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  background: var(--accent);
  color: #fff;
  padding: 10px 16px;
  border-radius: 0 0 10px 0;
  z-index: 200;
}
.skip-link:focus { left: 0; }

/* 언어 토글 (공용) */
.lang-toggle {
  display: inline-flex;
  border: 1px solid var(--border);
  background: var(--surface);
  border-radius: 999px;
  padding: 3px;
  gap: 2px;
}
.lang-toggle button {
  font: inherit;
  font-size: 13px;
  font-weight: 600;
  border: 0;
  background: transparent;
  color: var(--muted);
  padding: 6px 14px;
  border-radius: 999px;
  cursor: pointer;
  line-height: 1;
  transition: background 0.15s ease, color 0.15s ease;
}
.lang-toggle button[aria-pressed='true'] {
  background: var(--navy);
  color: #fff;
}

/* ===================== 단일 화면 랜딩 ===================== */
body.landing {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

.mini-header {
  position: absolute;
  top: 0;
  right: 0;
  padding: 22px 24px;
  z-index: 10;
}

.hero-mini {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 96px 24px 40px;
  gap: 0;
}

.hero-mark-wrap {
  position: relative;
  display: inline-block;
  margin-bottom: 34px;
}
/* CHIKKK! 워드마크 (해리 제작 SVG, 689×120) */
.hero-mark {
  display: block;
  height: clamp(34px, 6vw, 54px);
  width: auto;
  transform-origin: 90% 55%; /* "!" 쪽을 축으로 톡 */
  animation: chik-snap 5s cubic-bezier(0.34, 1.56, 0.64, 1) infinite;
}

/* "칙!" 스냅 — 기록이 완료되는 찰나 (5초마다 톡) */
@keyframes chik-snap {
  0%, 100% { transform: scale(1) rotate(0deg); }
  4% { transform: scale(0.955) rotate(-0.6deg); }
  8% { transform: scale(1.035) rotate(0.4deg); }
  13% { transform: scale(0.992); }
  18% { transform: scale(1); }
}

/* 크레마 스플래시 — "!" 지점에서 튐 (스냅과 동기, 5초 루프) */
.snap-splash {
  position: absolute;
  right: 8%;
  top: 22%;
  width: 0;
  height: 0;
  pointer-events: none;
}
.snap-splash .ring {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 30px;
  height: 30px;
  margin: -15px 0 0 -15px;
  border: 2px solid var(--crema);
  border-radius: 50%;
  opacity: 0;
  animation: splash-ring 5s ease-out infinite;
}
.snap-splash .spark {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 5px;
  height: 5px;
  margin: -2.5px 0 0 -2.5px;
  border-radius: 50%;
  background: var(--crema);
  opacity: 0;
  animation: splash-spark 5s cubic-bezier(0.2, 0.7, 0.3, 1) infinite;
}
@keyframes splash-ring {
  0%, 5% { transform: scale(0.3); opacity: 0; }
  8% { opacity: 0.65; }
  20% { transform: scale(1.8); opacity: 0; }
  100% { opacity: 0; }
}
@keyframes splash-spark {
  0%, 5% { transform: translate(0, 0) scale(0); opacity: 0; }
  9% { transform: translate(var(--dx), var(--dy)) scale(1); opacity: 1; }
  22% { transform: translate(calc(var(--dx) * 1.7), calc(var(--dy) * 1.7)) scale(0.35); opacity: 0; }
  100% { opacity: 0; }
}

.hero-mini h1 {
  font-weight: 700;
  font-size: clamp(23px, 3.6vw, 34px);
  line-height: 1.35;
  letter-spacing: -0.015em;
  margin: 0 0 16px;
  white-space: pre-line;
}

.hero-mini .sub {
  color: var(--muted);
  font-size: clamp(14px, 1.8vw, 16px);
  line-height: 1.7;
  margin: 0 0 36px;
  white-space: pre-line;
  max-width: 42ch;
}

/* 스토어 배지 */
.badges {
  display: flex;
  gap: 12px;
  justify-content: center;
  flex-wrap: wrap;
}
.store-badge {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 54px;
  padding: 0 20px;
  border-radius: 14px;
  text-decoration: none;
  transition: transform 0.15s ease, box-shadow 0.15s ease, opacity 0.15s ease;
}
.store-badge svg { width: 22px; height: 22px; flex: none; }
.store-badge .b-lines { text-align: left; line-height: 1.15; }
.store-badge .b-top { display: block; font-size: 10px; letter-spacing: 0.02em; opacity: 0.72; }
.store-badge .b-name { display: block; font-size: 16px; font-weight: 700; }

.store-badge.is-primary {
  background: var(--ink);
  color: #fff;
}
.store-badge.is-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(23, 19, 15, 0.22);
}
.store-badge.is-muted {
  background: var(--sunken);
  color: var(--muted);
  border: 1px solid var(--border);
}
.store-badge.is-muted:hover { transform: translateY(-2px); }

.note {
  margin: 20px 0 0;
  font-size: 13px;
  color: var(--muted);
}

/* 은은한 크레마 파티클 */
.ambient {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.ambient span {
  position: absolute;
  left: var(--x);
  top: var(--y);
  width: var(--s);
  height: var(--s);
  border-radius: 50%;
  background: radial-gradient(circle at 35% 30%, var(--crema), rgba(217, 164, 91, 0));
  opacity: 0.35;
  filter: blur(0.4px);
  animation: drift var(--d, 26s) ease-in-out infinite alternate;
}
@keyframes drift {
  from { transform: translate(0, 0); }
  to { transform: translate(14px, -22px); }
}

/* 미니 푸터 (홈·서브페이지 공용, 라이트) */
.mini-footer {
  text-align: center;
  padding: 28px 24px 32px;
  color: var(--muted);
}
.mini-footer .f-links {
  display: flex;
  gap: 18px;
  justify-content: center;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.mini-footer .f-links a {
  color: var(--muted);
  text-decoration: none;
  font-size: 13px;
}
.mini-footer .f-links a:hover { color: var(--text); }
.mini-footer .copyright {
  margin: 0;
  font-size: 12px;
  color: var(--muted);
  font-family: var(--font-num);
}

/* ===================== 서브페이지 (privacy/support/terms) ===================== */
.site-header {
  border-bottom: 1px solid var(--border);
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 64px;
}
.container {
  width: 100%;
  max-width: var(--maxw);
  margin-inline: auto;
  padding-inline: 24px;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  text-decoration: none;
  font-weight: 700;
}
.brand img { height: 22px; width: auto; }

.doc {
  max-width: 720px;
  margin: 0 auto;
  padding: 56px 24px 80px;
}
.doc a.back {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--accent);
  text-decoration: none;
  font-weight: 600;
  font-size: 14px;
  margin-bottom: 28px;
}
.doc h1 { font-size: clamp(26px, 4vw, 34px); margin: 0 0 8px; letter-spacing: -0.01em; }
.doc .updated { color: var(--muted); font-size: 14px; margin: 0 0 40px; }
.doc h2 { font-size: 20px; margin: 40px 0 12px; }
.doc p, .doc li { color: var(--text); }
.doc ul { padding-left: 20px; }
.doc li { margin-bottom: 6px; }
.doc .card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 22px 24px;
  box-shadow: var(--shadow);
  margin: 18px 0;
}
.doc .faq-q { font-weight: 700; margin: 0 0 6px; }
.doc .faq-a { margin: 0; color: var(--muted); }
.doc .mail { color: var(--accent); font-weight: 600; text-decoration: none; }

/* ===================== 반응형 ===================== */
@media (max-width: 520px) {
  .hero-mini { padding-top: 88px; }
  .hero-mark { margin-bottom: 26px; }
  .badges { flex-direction: column; align-items: center; }
  .store-badge { width: 220px; justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .ambient span,
  .hero-mark,
  .snap-splash .ring,
  .snap-splash .spark { animation: none; }
  .hero-mark { transform: none; }
  .snap-splash { display: none; }
}
