/* Mochicut — landing styles
   Brand tokens mirror docs/design-system.md (color, radius, shadow, motion).
   Voice: minimal base + restrained Y2K lavender accent. Cute, not a pro tool. */

/* 본문·한글: Pretendard (OFL, orioncactus) — dynamic-subset로 필요한 글자만 로드 */
@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.css");

/* 한글 디스플레이: 쿠키런 (Devsisters, 상업 무료). Fredoka는 라틴 전용이라 한글은 이걸로 폴백.
   self-host: fonts/CookieRun-Regular.woff (외부 CDN 의존 없음) */
@font-face {
  font-family: "CookieRun";
  src: url("fonts/CookieRun-Regular.woff") format("woff");
  font-weight: 400 900;
  font-display: swap;
}

:root {
  /* base (warm neutral) */
  --bg: #FAF7F2;
  --surface: #FFFFFF;
  --border: #ECE6DC;
  --divider: #E5DED2;

  /* text */
  --text: #2A2520;
  --text2: #8A7F75;
  --text3: #B8AEA2;

  /* accent — signature lavender */
  --accent: #B5A4E8;
  --accent-hover: #9F8BD8;
  --accent-soft: #EDE7FA;

  /* secondary accents (sparingly) */
  --pink: #FFC9D9;
  --mint: #B8E6D0;
  --success: #6FBF8F;
  --warning: #E8B654;

  /* radius (몽글몽글) */
  --r-sm: 8px;
  --r-md: 12px;
  --r-lg: 20px;
  --r-xl: 28px;
  --r-full: 999px;

  /* warm soft shadows (text-dark based, never pure black) */
  --shadow-sm: 0 1px 2px rgba(42, 37, 32, 0.05);
  --shadow-md: 0 4px 10px rgba(42, 37, 32, 0.07);
  --shadow-lg: 0 12px 24px rgba(42, 37, 32, 0.10);
  --shadow-accent: 0 4px 16px rgba(181, 164, 232, 0.45);

  /* motion */
  --fast: 150ms;
  --base: 250ms;

  /* fonts */
  --font-body: "Pretendard Variable", "Pretendard", -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --font-display: "Fredoka", "CookieRun", "SF Pro Rounded", var(--font-body);

  --maxw: 1080px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

/* soft floating background blobs — restrained Y2K glow */
body::before,
body::after {
  content: "";
  position: fixed;
  z-index: -1;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.5;
  pointer-events: none;
}
body::before {
  width: 460px; height: 460px;
  top: -160px; left: -120px;
  background: radial-gradient(circle, var(--accent-soft), transparent 70%);
}
body::after {
  width: 380px; height: 380px;
  top: 30vh; right: -140px;
  background: radial-gradient(circle, var(--pink), transparent 70%);
  opacity: 0.35;
}

a { color: inherit; text-decoration: none; }

.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-family: var(--font-body);
  font-size: 16px; font-weight: 600;
  padding: 14px 28px;
  border-radius: var(--r-full);
  border: 1px solid transparent;
  cursor: pointer;
  transition: transform var(--fast) ease-out, box-shadow var(--base) ease-out, background var(--fast) ease-out;
  white-space: nowrap;
}
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: var(--shadow-accent);
}
.btn-primary:hover { background: var(--accent-hover); transform: translateY(-2px); }
.btn-ghost {
  background: var(--surface);
  color: var(--text);
  border-color: var(--border);
  box-shadow: var(--shadow-sm);
}
.btn-ghost:hover { transform: translateY(-2px); box-shadow: var(--shadow-md); }
.btn-sm { padding: 10px 20px; font-size: 14px; }

.note { color: var(--text2); font-size: 13px; }

/* ---------- nav ---------- */
.nav {
  position: sticky; top: 0; z-index: 50;
  backdrop-filter: saturate(180%) blur(12px);
  background: rgba(250, 247, 242, 0.78);
  border-bottom: 1px solid var(--border);
}
.nav .wrap { display: flex; align-items: center; justify-content: space-between; height: 64px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--font-display); font-weight: 600; font-size: 20px; color: var(--text); }
.brand .logo {
  width: 30px; height: 30px; border-radius: var(--r-md);
  background: linear-gradient(135deg, var(--accent), var(--accent-hover));
  display: grid; place-items: center; color: #fff; font-size: 16px;
  box-shadow: var(--shadow-accent);
}
.nav-right { display: flex; align-items: center; gap: 14px; }
.lang { display: flex; gap: 4px; font-size: 13px; color: var(--text2); }
.lang a { padding: 4px 8px; border-radius: var(--r-sm); }
.lang a.active { background: var(--accent-soft); color: var(--accent-hover); font-weight: 600; }

/* ---------- sections ---------- */
section { padding: 88px 0; }
.section-head { text-align: center; max-width: 640px; margin: 0 auto 48px; }
.eyebrow {
  display: inline-block; font-size: 13px; font-weight: 600; letter-spacing: 0.04em;
  color: var(--accent-hover); background: var(--accent-soft);
  padding: 6px 14px; border-radius: var(--r-full); margin-bottom: 16px;
}
h1, h2, h3 { font-family: var(--font-display); font-weight: 600; line-height: 1.2; letter-spacing: -0.01em; }
h2 { font-size: clamp(28px, 4vw, 40px); }
h3 { font-size: 19px; }
.lead { color: var(--text2); font-size: 17px; margin-top: 14px; }

/* ---------- hero ---------- */
.hero { padding: 72px 0 64px; }
.hero .wrap { display: grid; grid-template-columns: 1.05fr 0.95fr; gap: 56px; align-items: center; }
.hero h1 { font-size: clamp(34px, 5.2vw, 56px); }
.hero p.sub { color: var(--text2); font-size: 19px; margin-top: 20px; max-width: 30em; }
.hero .cta { margin-top: 32px; display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }

/* hero visual — auto-straighten scene (CSS only, no assets needed) */
.scene { position: relative; aspect-ratio: 1 / 1; display: grid; place-items: center; }
.scene .stage {
  position: relative; width: 100%; max-width: 380px; aspect-ratio: 1/1;
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--r-xl); box-shadow: var(--shadow-lg);
  display: grid; place-items: center;
}
.photo {
  position: absolute; width: 150px; height: 188px; border-radius: var(--r-md);
  background: linear-gradient(160deg, #fff, #fff);
  border: 1px solid var(--border); box-shadow: var(--shadow-md);
  padding: 10px; display: flex; flex-direction: column; gap: 8px;
}
.photo .pic { flex: 1; border-radius: var(--r-sm); }
.photo .cap { height: 10px; border-radius: var(--r-full); background: var(--border); width: 70%; }
.photo.tilted { transform: rotate(-18deg) translate(-58px, 14px); z-index: 1; }
.photo.tilted .pic { background: linear-gradient(160deg, var(--mint), #d6f0e4); }
.photo.upright { transform: rotate(0deg) translate(46px, -8px); z-index: 2; }
.photo.upright .pic { background: linear-gradient(160deg, var(--accent-soft), var(--pink)); }
.sparkle { position: absolute; font-size: 26px; z-index: 3; animation: twinkle 2.4s ease-in-out infinite; }
.sparkle.s1 { top: 18%; right: 20%; }
.sparkle.s2 { bottom: 22%; left: 16%; font-size: 18px; animation-delay: .8s; }
@keyframes twinkle { 0%,100%{ opacity:.35; transform: scale(.85);} 50%{ opacity:1; transform: scale(1.1);} }
.scene .badge {
  position: absolute; bottom: 8%; left: 50%; transform: translateX(-50%);
  background: var(--surface); border: 1px solid var(--border); box-shadow: var(--shadow-md);
  border-radius: var(--r-full); padding: 8px 16px; font-size: 13px; font-weight: 600; color: var(--text);
  display: flex; align-items: center; gap: 8px;
}
.badge .dot { width: 8px; height: 8px; border-radius: 50%; background: var(--success); }

/* ---------- problem grid ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); gap: 20px; }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 26px; box-shadow: var(--shadow-sm); transition: transform var(--base) ease-out, box-shadow var(--base) ease-out;
}
.card:hover { transform: translateY(-3px); box-shadow: var(--shadow-md); }
.card .ic { font-size: 28px; margin-bottom: 14px; display: block; }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text2); font-size: 15px; }

/* ---------- steps ---------- */
.steps { counter-reset: step; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 22px; }
.step { position: relative; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); padding: 28px 24px 24px; box-shadow: var(--shadow-sm); }
.step::before {
  counter-increment: step; content: counter(step);
  position: absolute; top: -16px; left: 24px;
  width: 36px; height: 36px; border-radius: var(--r-full);
  background: var(--accent); color: #fff; font-family: var(--font-display); font-weight: 600;
  display: grid; place-items: center; box-shadow: var(--shadow-accent);
}
.step h3 { margin: 10px 0 8px; }
.step p { color: var(--text2); font-size: 15px; }

/* ---------- relax (trust) ---------- */
.relax { background: var(--accent-soft); border-radius: var(--r-xl); padding: 56px 40px; text-align: center; }
.relax h2 { margin-bottom: 28px; }
.relax-list { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 20px; max-width: 860px; margin: 0 auto; }
.relax-item { background: var(--surface); border-radius: var(--r-lg); padding: 22px; box-shadow: var(--shadow-sm); }
.relax-item .ic { font-size: 24px; }
.relax-item p { color: var(--text2); font-size: 14px; margin-top: 8px; }
.relax-item strong { display: block; color: var(--text); font-size: 15px; }

/* ---------- pricing ---------- */
.price-card {
  max-width: 460px; margin: 0 auto; text-align: center;
  background: var(--surface); border: 2px solid var(--accent); border-radius: var(--r-xl);
  padding: 44px 36px; box-shadow: var(--shadow-lg); position: relative;
}
.price-card .tag {
  position: absolute; top: -14px; left: 50%; transform: translateX(-50%);
  background: var(--mint); color: #2A4A3A; font-size: 13px; font-weight: 600;
  padding: 5px 16px; border-radius: var(--r-full);
}
.price { font-family: var(--font-display); font-size: 52px; font-weight: 600; margin: 8px 0 2px; }
.price small { font-size: 18px; color: var(--text2); font-weight: 500; }
.price-month { font-size: 17px; color: var(--text2); margin-top: 2px; }
.price-month strong { color: var(--accent-hover); font-weight: 700; }
.price-hl {
  display: inline-block; margin: 16px 0 4px;
  background: var(--mint); color: #2A4A3A;
  font-weight: 700; font-size: 15px;
  padding: 10px 20px; border-radius: var(--r-full);
  box-shadow: var(--shadow-sm);
}
.price-card ul { list-style: none; text-align: left; margin: 26px 0; display: grid; gap: 12px; }
.price-card li { display: flex; align-items: flex-start; gap: 10px; color: var(--text); font-size: 15px; }
.price-card li::before { content: "✓"; color: var(--success); font-weight: 700; }

/* ---------- faq ---------- */
.faq { max-width: 720px; margin: 0 auto; display: grid; gap: 12px; }
details {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg);
  padding: 4px 22px; box-shadow: var(--shadow-sm);
}
details summary {
  cursor: pointer; list-style: none; padding: 18px 0; font-weight: 600; font-size: 16px;
  display: flex; justify-content: space-between; align-items: center;
}
details summary::-webkit-details-marker { display: none; }
details summary::after { content: "+"; color: var(--accent-hover); font-size: 22px; transition: transform var(--fast) ease-out; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--text2); font-size: 15px; padding: 0 0 18px; }

/* ---------- final cta ---------- */
.final { text-align: center; }
.final h2 { margin-bottom: 24px; }

/* ---------- footer ---------- */
footer { border-top: 1px solid var(--border); padding: 36px 0; color: var(--text2); font-size: 13px; }
footer .wrap { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
footer a:hover { color: var(--text); }

/* ---------- responsive ---------- */
@media (max-width: 860px) {
  .hero .wrap { grid-template-columns: 1fr; gap: 40px; }
  .scene { order: -1; }
  section { padding: 64px 0; }
  .relax { padding: 44px 24px; }
}
@media (max-width: 520px) {
  .hero .cta { flex-direction: column; align-items: stretch; }
  .btn { width: 100%; }
  .nav .brand span.full { display: none; }
}

/* ---------- mochi mascot (pixel character, rendered by mochi.js) ---------- */
canvas[data-mochi] { image-rendering: pixelated; image-rendering: crisp-edges; display: block; }
.brand-mochi { flex: none; }
.nav .brand:hover .brand-mochi { animation: mochiWiggle 1.1s ease-in-out; }
.mochi-float { animation: mochiFloat 3.8s ease-in-out infinite; }
@keyframes mochiFloat { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-7px); } }
@keyframes mochiWiggle { 0%, 100% { transform: rotate(0); } 25% { transform: rotate(-5deg); } 75% { transform: rotate(5deg); } }
.scene .mochi-hero { position: absolute; left: -3%; bottom: 0; z-index: 4; }
.card .ic.mochi-ic { display: inline-block; }
.price-card { position: relative; }
.price-card .mochi-peek { position: absolute; top: -42px; left: 50%; transform: translateX(-50%); z-index: 2; }
.final .mochi-cta { display: inline-block; margin-bottom: 20px; }
@media (max-width: 860px) { .scene .mochi-hero { left: 2%; } }
