@import url("https://cdn.jsdelivr.net/npm/pretendard@1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --bg: #f6f4f9;
  --surface: #ffffff;
  --muted: #efecf4;
  --ink: #1e1530;
  --ink-2: #6e6680;
  --border: #e2deea;
  --coral: #ff5a4e;
  --coral-ink: #d63a2f;
  --coral-soft: #ffe3e0;
  --mint: #22c7a9;
  --mint-ink: #0b8a73;
  --mint-soft: #d5f6ee;
  --amber-ink: #a86f00;
  --amber-soft: #fff1d1;
  --violet: #6b4ef0;
  --violet-soft: #e8e2ff;
  --night: #1e1530;
  --radius: 22px;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #120d1c;
    --surface: #1f172d;
    --muted: #2a2139;
    --ink: #f3effa;
    --ink-2: #a79dbb;
    --border: #342a45;
    --coral-ink: #ff8a80;
    --coral-soft: #4a2230;
    --mint-ink: #5fe0c6;
    --mint-soft: #123b34;
    --amber-ink: #ffcb5c;
    --amber-soft: #3d2f12;
    --violet-soft: #2c2350;
    --night: #0b0812;
  }
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  line-height: 1.7;
  letter-spacing: -0.2px;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--coral-ink); }
img { max-width: 100%; display: block; }

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

/* 상단 */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.top .wrap { display: flex; align-items: center; gap: 18px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; font-weight: 800; font-size: 19px; color: var(--ink); text-decoration: none; }
.brand img { width: 30px; height: 30px; border-radius: 8px; }
.top nav { display: flex; gap: 18px; flex: 1; font-size: 15px; }
.top nav a { color: var(--ink-2); text-decoration: none; }
.top nav a:hover { color: var(--ink); }
.top .lang { font-size: 14px; color: var(--ink-2); text-decoration: none; }
@media (max-width: 760px) { .top nav { display: none; } .top .wrap { justify-content: space-between; } }

/* 버튼 */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 13px 20px; border-radius: 999px; border: 0;
  font: inherit; font-weight: 700; font-size: 15px; cursor: pointer;
  text-decoration: none; transition: transform .15s ease, opacity .15s;
}
.btn:hover { transform: translateY(-1px); }
.btn svg { width: 20px; height: 20px; flex: none; }
.btn-dark { background: var(--ink); color: var(--bg); }
.btn-coral { background: var(--coral); color: #fff; }
.btn-ghost { background: transparent; color: var(--ink); border: 1px solid var(--border); }
.btn-sm { padding: 8px 14px; font-size: 14px; }
.stores { display: flex; flex-wrap: wrap; gap: 10px; }

/* 히어로 */
.hero { padding: 64px 0 40px; }
.hero .wrap { display: grid; grid-template-columns: 1.1fr .9fr; gap: 40px; align-items: center; }
.eyebrow { display: inline-block; font-size: 14px; font-weight: 700; color: var(--coral-ink); background: var(--coral-soft); padding: 4px 12px; border-radius: 999px; }
.hero h1 { font-size: clamp(34px, 5.4vw, 58px); line-height: 1.15; letter-spacing: -1.6px; margin: 18px 0 16px; font-weight: 800; }
.hero h1 em { font-style: normal; color: var(--coral); }
.hero .lead { font-size: 18px; color: var(--ink-2); margin: 0 0 28px; max-width: 34em; }
.badges { display: flex; flex-wrap: wrap; gap: 8px 16px; margin: 22px 0 0; padding: 0; list-style: none; font-size: 14px; color: var(--ink-2); }
.badges li::before { content: "✓ "; color: var(--mint-ink); font-weight: 800; }
.phones { position: relative; height: 560px; }
.phones img {
  position: absolute; width: 250px; border-radius: 34px;
  box-shadow: 0 30px 60px -20px rgba(30, 21, 48, .35), 0 0 0 1px var(--border);
}
.phones img:first-child { right: 150px; top: 40px; transform: rotate(-5deg); }
.phones img:last-child { right: 0; top: 0; transform: rotate(4deg); }
@media (max-width: 860px) {
  .hero { padding-top: 40px; }
  .hero .wrap { grid-template-columns: 1fr; }
  .phones { height: 420px; max-width: 420px; margin: 0 auto; width: 100%; }
  .phones img { width: 190px; }
  .phones img:first-child { right: auto; left: 0; }
}

/* 섹션 */
section { padding: 56px 0; }
.sec-title { font-size: clamp(26px, 3.6vw, 36px); line-height: 1.25; letter-spacing: -1px; margin: 0 0 10px; font-weight: 800; }
.sec-lead { color: var(--ink-2); font-size: 17px; margin: 0 0 32px; max-width: 40em; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 860px) { .grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid, .grid-2 { grid-template-columns: 1fr; } }

.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.card h3 { font-size: 19px; margin: 12px 0 6px; letter-spacing: -0.4px; line-height: 1.35; }
.card p { margin: 0; color: var(--ink-2); font-size: 15.5px; }
.card ul { margin: 10px 0 0; padding-left: 18px; color: var(--ink-2); font-size: 15px; }
.ico { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; font-size: 22px; }
.ico.c { background: var(--coral-soft); }
.ico.m { background: var(--mint-soft); }
.ico.a { background: var(--amber-soft); }
.ico.v { background: var(--violet-soft); }

.tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.tags span { font-size: 13px; color: var(--ink-2); background: var(--muted); padding: 3px 10px; border-radius: 999px; }

/* 누구를 위한 앱인가 */
.who { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.who .card { padding: 20px; }
.who strong { display: block; font-size: 17px; margin-bottom: 4px; }
.who span { color: var(--ink-2); font-size: 14.5px; }
@media (max-width: 860px) { .who { grid-template-columns: 1fr 1fr; } }

/* 계산기 */
.calc { background: var(--surface); border: 1px solid var(--border); border-radius: 28px; padding: 28px; }
.calc form { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; align-items: end; }
.calc label { display: grid; gap: 6px; font-size: 14px; font-weight: 600; color: var(--ink-2); }
.calc input, .calc select {
  font: inherit; font-size: 16px; color: var(--ink); background: var(--bg);
  border: 1px solid var(--border); border-radius: 14px; padding: 11px 14px; width: 100%;
}
.result { margin-top: 22px; display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; }
.result:empty { display: none; }
.result div { border-radius: 18px; padding: 16px 18px; }
.result small { display: block; font-size: 13px; font-weight: 700; }
.result b { font-size: 20px; letter-spacing: -0.4px; }
.result .c { background: var(--coral-soft); } .result .c small { color: var(--coral-ink); }
.result .m { background: var(--mint-soft); } .result .m small { color: var(--mint-ink); }
.result .a { background: var(--amber-soft); } .result .a small { color: var(--amber-ink); }
.result .v { background: var(--violet-soft); } .result .v small { color: var(--violet); }
.note { font-size: 13.5px; color: var(--ink-2); margin: 16px 0 0; }

/* 다크 띠 */
.band { background: var(--night); color: #f3effa; border-radius: 32px; padding: 48px 40px; }
.band .sec-lead { color: #b9b0cc; }
.band .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); }
.band .card p { color: #b9b0cc; }
@media (max-width: 560px) { .band { padding: 36px 22px; border-radius: 24px; } }

/* FAQ */
.faq details { background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 4px 22px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 700; font-size: 16.5px; padding: 14px 0; list-style: none; position: relative; padding-right: 28px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; position: absolute; right: 0; top: 10px; font-size: 22px; color: var(--ink-2); }
.faq details[open] summary::after { content: "–"; }
.faq details p { margin: 0 0 16px; color: var(--ink-2); }

/* 마무리 CTA */
.cta { text-align: center; }
.cta img { width: 84px; height: 84px; border-radius: 22px; margin: 0 auto 18px; }
.cta .stores { justify-content: center; margin-top: 24px; }

/* 본문형 페이지 */
.article { max-width: 760px; }
.article h2 { font-size: 23px; margin: 40px 0 8px; letter-spacing: -0.5px; }
.article p, .article li { color: var(--ink); font-size: 16.5px; }
.crumbs { font-size: 14px; color: var(--ink-2); margin: 28px 0 0; }
.crumbs a { color: var(--ink-2); }

footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 32px 0 48px; color: var(--ink-2); font-size: 14px; }
footer .wrap { display: flex; flex-wrap: wrap; gap: 10px 22px; }
footer a { color: var(--ink-2); }
footer .spacer { flex: 1; }

/* 준비 중 안내 */
dialog { border: 0; border-radius: 24px; padding: 28px; max-width: 340px; width: calc(100% - 40px); background: var(--surface); color: var(--ink); text-align: center; }
dialog::backdrop { background: rgba(18, 13, 28, .55); }
dialog img { width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 12px; }
dialog h2 { margin: 0 0 6px; font-size: 20px; }
dialog p { margin: 0 0 20px; color: var(--ink-2); font-size: 15px; }
dialog .btn { width: 100%; justify-content: center; }

/* ───────── 움직임 ─────────
   html.motion 은 JS 가 켜고, '동작 줄이기' 설정이면 켜지 않는다.
   JS 가 없어도 모든 내용은 그대로 보인다(검색엔진용). */

.progress { position: fixed; top: 0; left: 0; height: 3px; width: 100%; z-index: 20; transform-origin: 0 50%; transform: scaleX(var(--p, 0)); background: linear-gradient(90deg, var(--coral), #ffb51f, var(--mint)); }
.top { transition: box-shadow .3s ease, background .3s ease; }
.top.scrolled { box-shadow: 0 8px 30px -18px rgba(30, 21, 48, .35); }

/* 히어로 배경의 흐르는 빛 */
.hero { position: relative; overflow: clip; isolation: isolate; }
.glow { position: absolute; inset: 0; z-index: -1; pointer-events: none; }
.glow i { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .6; }
.glow i:nth-child(1) { width: 420px; height: 420px; background: var(--coral-soft); right: 6%; top: 4%; }
.glow i:nth-child(2) { width: 340px; height: 340px; background: var(--mint-soft); right: 30%; top: 45%; }
.glow i:nth-child(3) { width: 300px; height: 300px; background: var(--violet-soft); left: -4%; top: 12%; }
.motion .glow i:nth-child(1) { animation: drift1 16s ease-in-out infinite alternate; }
.motion .glow i:nth-child(2) { animation: drift2 19s ease-in-out infinite alternate; }
.motion .glow i:nth-child(3) { animation: drift3 22s ease-in-out infinite alternate; }
@keyframes drift1 { to { translate: -120px 80px; scale: 1.15; } }
@keyframes drift2 { to { translate: 140px -60px; scale: .9; } }
@keyframes drift3 { to { translate: 90px 70px; scale: 1.2; } }

/* 히어로 글자가 차례로 떠오른다 */
.motion .hero .wrap > div:first-child > * { animation: rise .9s cubic-bezier(.2, .7, .2, 1) both; }
.motion .hero .wrap > div:first-child > :nth-child(2) { animation-delay: .08s; }
.motion .hero .wrap > div:first-child > :nth-child(3) { animation-delay: .18s; }
.motion .hero .wrap > div:first-child > :nth-child(4) { animation-delay: .28s; }
.motion .hero .wrap > div:first-child > :nth-child(5) { animation-delay: .38s; }
@keyframes rise { from { opacity: 0; translate: 0 28px; filter: blur(6px); } to { opacity: 1; translate: 0 0; filter: blur(0); } }

/* 강조 글자에 빛이 지나간다 */
.motion .hero h1 em {
  background: linear-gradient(100deg, var(--coral) 0%, var(--coral) 40%, #ffb51f 50%, var(--coral) 60%, var(--coral) 100%);
  background-size: 300% 100%;
  -webkit-background-clip: text; background-clip: text; color: transparent;
  animation: shine 4.5s ease-in-out 1.2s infinite;
}
@keyframes shine { from { background-position: 100% 0; } 60%, to { background-position: 0 0; } }

/* 폰은 둥둥 떠 있고, 마우스를 따라 살짝 움직인다 */
.phones img { transition: transform .6s cubic-bezier(.2, .7, .2, 1); }
.phones img:first-child { transform: none; rotate: -5deg; }
.phones img:last-child { transform: none; rotate: 4deg; }
.motion .phones img:first-child { animation: enterL 1.1s cubic-bezier(.2, .7, .2, 1) .25s both, float 6s ease-in-out 1.4s infinite; transform: translate3d(calc(var(--mx, 0) * -14px), calc(var(--my, 0) * -10px), 0); }
.motion .phones img:last-child { animation: enterR 1.1s cubic-bezier(.2, .7, .2, 1) .1s both, float 6s ease-in-out 1.2s infinite reverse; transform: translate3d(calc(var(--mx, 0) * 20px), calc(var(--my, 0) * 14px), 0); }
@keyframes enterL { from { opacity: 0; translate: -40px 80px; rotate: -14deg; } }
@keyframes enterR { from { opacity: 0; translate: 40px 90px; rotate: 12deg; } }
@keyframes float { 50% { translate: 0 -14px; } }

/* 흐르는 키워드 띠 */
.marquee { overflow: hidden; padding: 14px 0; border-block: 1px solid var(--border); background: var(--surface); -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent); }
.marquee .track { display: flex; gap: 10px; width: max-content; }
.motion .marquee .track { animation: slide 60s linear infinite; }
.marquee:hover .track { animation-play-state: paused; }
.marquee span { white-space: nowrap; font-size: 14.5px; font-weight: 600; padding: 6px 14px; border-radius: 999px; }
.marquee span:nth-child(4n+1) { background: var(--coral-soft); color: var(--coral-ink); }
.marquee span:nth-child(4n+2) { background: var(--mint-soft); color: var(--mint-ink); }
.marquee span:nth-child(4n+3) { background: var(--amber-soft); color: var(--amber-ink); }
.marquee span:nth-child(4n) { background: var(--violet-soft); color: var(--violet); }
@keyframes slide { to { transform: translateX(calc(-50% - 5px)); } }

/* 스크롤하면 하나씩 샤라락 */
.motion .reveal { opacity: 0; translate: 0 34px; filter: blur(4px); transition: opacity .8s ease, translate .9s cubic-bezier(.2, .7, .2, 1), filter .8s ease, transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease; transition-delay: calc(var(--i, 0) * 80ms); }
.motion .reveal.in { opacity: 1; translate: 0 0; filter: blur(0); }

/* 카드에 손이 가면 살짝 떠오른다 */
.card { transition: transform .35s cubic-bezier(.2, .7, .2, 1), box-shadow .35s ease, border-color .35s ease; }
.card:hover { transform: translateY(-4px); box-shadow: 0 22px 40px -24px rgba(30, 21, 48, .35); border-color: color-mix(in srgb, var(--coral) 30%, var(--border)); }
.card:hover .ico { animation: wiggle .6s ease; }
@keyframes wiggle { 30% { rotate: -10deg; scale: 1.12; } 60% { rotate: 6deg; } }

/* 루틴 띠: 들어오면 체크가 하나씩 찍힌다 */
.band { position: relative; overflow: hidden; isolation: isolate; }
.band::before { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -160px; top: -200px; border-radius: 50%; background: radial-gradient(circle, rgba(255, 90, 78, .35), transparent 65%); }
.motion .band::before { animation: drift1 14s ease-in-out infinite alternate; }
.band h3 { display: flex; align-items: center; gap: 10px; }
.band h3::before { content: "✓"; display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 13px; font-weight: 800; color: #fff; background: var(--mint); flex: none; }
.motion .band .card h3::before { scale: 0; transition: scale .5s cubic-bezier(.3, 1.6, .5, 1); transition-delay: calc(.4s + var(--i, 0) * 200ms); }
.motion .band .card.in h3::before { scale: 1; }

/* 계산 결과가 톡톡 튀어나온다 */
.result div { animation: pop .5s cubic-bezier(.3, 1.4, .5, 1) both; }
.result div:nth-child(2) { animation-delay: .05s; }
.result div:nth-child(3) { animation-delay: .1s; }
.result div:nth-child(4) { animation-delay: .15s; }
.result div:nth-child(5) { animation-delay: .2s; }
.result div:nth-child(6) { animation-delay: .25s; }
@keyframes pop { from { opacity: 0; scale: .9; translate: 0 10px; } }

/* 앱 버튼 위로 빛이 스친다 */
.btn-dark, .btn-coral { position: relative; overflow: hidden; }
.motion .btn-dark::after, .motion .btn-coral::after { content: ""; position: absolute; inset: 0; pointer-events: none; background: linear-gradient(100deg, transparent 30%, rgba(255, 255, 255, .28) 50%, transparent 70%); translate: -120% 0; animation: sweep 5s ease-in-out 2s infinite; }
@keyframes sweep { 25%, to { translate: 120% 0; } }
.motion .cta img.in { animation: bob 3s ease-in-out 1s infinite; }
@keyframes bob { 50% { translate: 0 -8px; rotate: -4deg; } }

/* FAQ 열릴 때 부드럽게 */
.faq details[open] p { animation: rise .45s ease both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* 푸터 */
footer.site-footer { border-top: 1px solid var(--border); margin-top: 40px; padding: 48px 0 40px; background: var(--surface); color: var(--ink-2); font-size: 14.5px; }
footer.site-footer > .wrap:first-child { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 28px; }
.foot-brand p { margin: 12px 0 16px; line-height: 1.6; }
.foot-col { display: flex; flex-direction: column; gap: 8px; }
.foot-col strong { color: var(--ink); font-size: 14px; margin-bottom: 4px; }
.foot-col a { color: var(--ink-2); text-decoration: none; }
.foot-col a:hover { color: var(--coral-ink); }
footer.site-footer .foot-bottom { display: flex; justify-content: space-between; gap: 12px; margin-top: 36px; padding-top: 20px; border-top: 1px solid var(--border); font-size: 13px; }
footer.site-footer .foot-bottom a { color: var(--ink-2); }
@media (max-width: 760px) { footer.site-footer > .wrap:first-child { grid-template-columns: 1fr 1fr; } .foot-brand { grid-column: 1 / -1; } }

/* 문의 모달 */
dialog.contact { max-width: 380px; }
.contact .mail { display: flex; align-items: center; gap: 8px; background: var(--bg); border: 1px solid var(--border); border-radius: 14px; padding: 6px 6px 6px 14px; margin: 0 0 12px; text-align: left; }
.contact .mail span { flex: 1; font-weight: 700; font-size: 15px; overflow-wrap: anywhere; }
.contact .mail .btn { width: auto; flex: none; }
.contact .btn.copied { background: var(--mint); color: #fff; }
.contact .row { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.contact small { display: block; margin-top: 14px; color: var(--ink-2); font-size: 12.5px; }
.motion dialog[open] { animation: pop .35s cubic-bezier(.3, 1.4, .5, 1); }
