/* ===== 디자인 토큰 ===== */
:root {
  --green-900: #1a3f3c;
  --green-800: #204e4a;
  --green-600: #2f6b65;
  --sage: #8c9c6b;
  --sage-dark: #7a8a5b;
  --yellow: #e1e53f;
  --yellow-dark: #cfd32c;
  --orange: #c1452e;
  --ink: #212121;
  --text: #666;
  --muted: #8a8a8a;
  --line: #e3e3e6;
  --gray-50: #f2f3f4;
  --lavender: #ecedf2;
  --beige: #f4f0e8;
  --white: #fff;

  --radius-sm: 12px;
  --radius: 24px;
  --radius-lg: 36px;
  --shadow-sm: 0 4px 14px rgba(32, 78, 74, 0.08);
  --shadow: 0 14px 40px rgba(32, 78, 74, 0.12);

  --container: 1240px;
  --gutter: 32px;
  --header-h: 88px;
  --ease: cubic-bezier(0.22, 1, 0.36, 1);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; scroll-padding-top: calc(var(--header-h) + 8px); }

/* Lenis 부드러운 스크롤 */
html.lenis, html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 15px;
  font-weight: 500;
  line-height: 1.65;
  color: var(--text);
  background: var(--white);
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: hidden;
}

img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, select, input { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
ul { list-style: none; margin: 0; padding: 0; }
h1, h2, h3, p { margin: 0; }

.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

:focus-visible { outline: 3px solid var(--yellow-dark); outline-offset: 3px; border-radius: 8px; }

/* ===== 레이아웃 ===== */
.container { width: 100%; max-width: var(--container); margin: 0 auto; padding: 0 var(--gutter); }
.container.narrow { max-width: 860px; }
.center { text-align: center; }
.center > .pill-link { margin-inline: auto; }

/* ===== 타이포 ===== */
.h-lg, .h-xl {
  color: var(--green-800);
  font-weight: 500;
  letter-spacing: -0.02em;
  line-height: 1.35;
}
.h-lg { font-size: clamp(26px, 3vw, 38px); }
.h-xl { font-size: clamp(32px, 4.2vw, 54px); line-height: 1.2; }
.h-lg strong, .h-xl strong { font-weight: 800; }

.lead { font-size: 17px; color: var(--green-800); line-height: 1.7; max-width: 420px; }
.lead.italic { font-style: italic; }
.body-text { font-size: 16px; color: var(--green-800); line-height: 1.85; }

/* 노란 밑줄 스와시 */
.swash { position: relative; display: inline-block; font-weight: 800; }
.swash::after {
  content: ""; position: absolute; left: -4%; right: -4%; bottom: -14px; height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 200 20'%3E%3Cpath d='M3 15C60 4 140 2 197 8' fill='none' stroke='%23E1E53F' stroke-width='5' stroke-linecap='round'/%3E%3C/svg%3E") no-repeat center / 100% 100%;
}

/* 주황 스파크 장식 */
.sparks { position: relative; display: inline-block; width: 0; height: 0; }
.sparks::before {
  content: ""; position: absolute; left: -8px; top: -58px; width: 44px; height: 44px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 44 44'%3E%3Cg stroke='%23C1452E' stroke-width='3' stroke-linecap='round'%3E%3Cpath d='M8 4l6 14'/%3E%3Cpath d='M20 22l18-6'/%3E%3Cpath d='M22 32l16 4'/%3E%3C/g%3E%3C/svg%3E") no-repeat center / contain;
}
.sparks.right::before { left: auto; right: -260px; top: -20px; }

/* ===== 버튼 ===== */
.btn {
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; font-weight: 700; letter-spacing: 0.02em;
  transition: background 0.25s, transform 0.25s var(--ease);
}
.btn-sm { height: 44px; padding: 0 26px; font-size: 13px; }
.btn-yellow { background: var(--yellow); color: var(--green-800); }
.btn-yellow:hover { background: var(--yellow-dark); }

.pill-link {
  display: inline-flex; align-items: center; gap: 28px;
  height: 64px; padding: 0 12px 0 32px; border-radius: 999px;
  background: var(--white); color: var(--green-800);
  font-weight: 700; font-size: 15px;
  box-shadow: var(--shadow-sm);
  transition: transform 0.3s var(--ease), box-shadow 0.3s;
}
.pill-link:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.pill-link.yellow { background: var(--yellow); box-shadow: none; }
.pill-link.yellow:hover { box-shadow: 0 10px 26px rgba(207, 211, 44, 0.45); }

.circle-arrow {
  display: inline-grid; place-items: center; flex: none;
  width: 40px; height: 40px; border-radius: 50%;
  background: var(--yellow); color: var(--green-800);
  transition: transform 0.3s var(--ease);
}
.circle-arrow.white { background: var(--white); }
.circle-arrow svg { width: 20px; height: 20px; }
.pill-link:hover .circle-arrow, .finder-submit:hover .circle-arrow { transform: translateX(4px); }

.badge {
  display: inline-block; padding: 8px 20px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--white);
  font-size: 13px; font-weight: 600; letter-spacing: 0.08em; color: var(--green-800);
}

/* ===== 선 그리기 애니메이션 (js/draw-path.js) ===== */
.draw-path { stroke-dasharray: var(--len, 0); stroke-dashoffset: var(--len, 0); }
.is-drawn .draw-path {
  animation: drawLine 1s var(--ease) forwards;
  animation-delay: calc(0.6s + var(--i, 0) * 0.35s);
}
.no-js .draw-path { stroke-dashoffset: 0; }
@keyframes drawLine { to { stroke-dashoffset: 0; } }

/* ===== 스크롤 등장 애니메이션 ===== */
.reveal { opacity: 0; transform: translateY(28px); transition: opacity 0.8s var(--ease), transform 0.8s var(--ease); }
.reveal.is-visible { opacity: 1; transform: none; }
.no-js .reveal { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .draw-path { stroke-dashoffset: 0; }
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; }
}

/* ===== 토스트 ===== */
.toast {
  position: fixed; left: 50%; bottom: 32px; z-index: 200;
  transform: translate(-50%, 20px); opacity: 0; pointer-events: none;
  background: var(--green-800); color: var(--white);
  padding: 14px 26px; border-radius: 999px; font-weight: 600; font-size: 14px;
  box-shadow: var(--shadow); transition: opacity 0.3s, transform 0.3s var(--ease);
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }

@media (max-width: 640px) {
  :root { --gutter: 18px; --header-h: 72px; }
  .pill-link { height: 56px; gap: 18px; padding-left: 24px; font-size: 14px; }
  .lead { font-size: 15px; }
  .body-text { font-size: 15px; }
}
