/* Tripaint 앱 웹 — 정적 3파일·의존성 0. 색은 앱 Theme(코랄·민트·크림·와인)에서 가져왔다.
   대비(WCAG AA 4.5:1 이상 실측): 라이트 ink #241A1E / bg #FBF9F6 = 16.3 · muted #6B5A60 / bg = 6.3 · 버튼 흰 글자 / coral-deep #C42F58 = 5.4
   다크 ink #FFF4EC / bg #100C0E = 17.9 · muted #C9B8BC / bg = 10.4 · 다크 버튼 #1A0F13 / coral #FF7D99 = 7.9 */
:root {
  --bg: #FBF9F6; --bg-tint: #F4EFE9; --surface: #FFFFFF; --ink: #241A1E; --muted: #6B5A60; --line: #E6DDD5;
  --coral: #E84A70; --coral-deep: #C42F58; --coral-soft: #FFE3EA; --mint: #1F9F82; --mint-soft: #DDF4EE;
  --btn-bg: #C42F58; --btn-ink: #FFFFFF; --shadow: 0 24px 60px rgba(36, 26, 30, .14);
  --wrap: 1120px; --r: 20px;
  --font: -apple-system, BlinkMacSystemFont, "Pretendard", "Apple SD Gothic Neo", "Segoe UI", Roboto, "Noto Sans KR", sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #100C0E; --bg-tint: #1A1316; --surface: #211A1D; --ink: #FFF4EC; --muted: #C9B8BC; --line: #37292E;
    --coral: #FF7D99; --coral-deep: #FF7D99; --coral-soft: #3A1C25; --mint: #4FD8B6; --mint-soft: #143029;
    --btn-bg: #FF7D99; --btn-ink: #1A0F13; --shadow: 0 24px 60px rgba(0, 0, 0, .5);
  }
}
:root[data-theme="dark"] {
  --bg: #100C0E; --bg-tint: #1A1316; --surface: #211A1D; --ink: #FFF4EC; --muted: #C9B8BC; --line: #37292E;
  --coral: #FF7D99; --coral-deep: #FF7D99; --coral-soft: #3A1C25; --mint: #4FD8B6; --mint-soft: #143029;
  --btn-bg: #FF7D99; --btn-ink: #1A0F13; --shadow: 0 24px 60px rgba(0, 0, 0, .5);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 400 17px/1.6 var(--font); overflow-x: hidden; }
:lang(ko) body, html[lang="ko"] body { word-break: keep-all; }
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; }
h1, h2, h3, p, ul, ol { margin: 0; }
ul, ol { padding: 0; list-style: none; }
:focus-visible { outline: 3px solid var(--mint); outline-offset: 3px; border-radius: 6px; }
.wrap { width: min(var(--wrap), 100% - 32px); margin-inline: auto; }
.narrow { max-width: 760px; }
.skip { position: absolute; left: -999px; top: 8px; background: var(--surface); padding: 8px 14px; border-radius: 10px; z-index: 50; }
.skip:focus { left: 8px; }

/* 글자 위계: 히어로 제목은 본문의 3~4.5배 */
h1 { font-size: clamp(2.7rem, 7.4vw, 5rem); line-height: 1.02; letter-spacing: -.035em; font-weight: 800; text-wrap: balance; }
h1 em { font-style: normal; color: var(--coral); display: block; }
h2 { font-size: clamp(1.8rem, 4.2vw, 2.9rem); line-height: 1.12; letter-spacing: -.025em; font-weight: 800; text-wrap: balance; margin-bottom: 18px; }
h3 { font-size: 1.14rem; line-height: 1.3; font-weight: 700; margin-bottom: 6px; }
.eyebrow { font-size: .8rem; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--mint); margin-bottom: 14px; }
.lead { font-size: clamp(1.08rem, 1.9vw, 1.3rem); color: var(--muted); max-width: 34em; margin-top: 22px; }
.sub { color: var(--muted); max-width: 40em; }
.link { color: var(--coral-deep); text-underline-offset: 3px; }

/* 내비 */
.nav { position: sticky; top: 0; z-index: 20; background: color-mix(in srgb, var(--bg) 86%, transparent); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid transparent; transition: border-color .3s; }
.nav.is-stuck { border-bottom-color: var(--line); }
.nav__in { display: flex; align-items: center; gap: 16px; min-height: 60px; }
.brand { display: inline-flex; align-items: center; gap: 8px; text-decoration: none; font-size: 1.1rem; letter-spacing: -.01em; }
.nav__links { display: none; gap: 22px; margin-left: 18px; font-size: .94rem; }
.nav__links a { text-decoration: none; color: var(--muted); }
.nav__links a:hover { color: var(--ink); }
.nav__tools { margin-left: auto; display: flex; align-items: center; gap: 8px; }
@media (min-width: 900px) { .nav__links { display: flex; } }
@media (max-width: 479px) { .nav__tools .btn--sm { display: none; } }

.chip { font: inherit; font-size: .88rem; color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; min-height: 40px; cursor: pointer; }
.chip:hover { border-color: var(--coral); }
.chip--icon { width: 40px; padding: 0; display: inline-grid; place-items: center; }
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 52px; padding: 12px 24px; border-radius: 999px; background: var(--btn-bg); color: var(--btn-ink); font-weight: 700; text-decoration: none; border: 2px solid var(--btn-bg); transition: transform .2s, box-shadow .2s; }
.btn:hover { transform: translateY(-2px); box-shadow: 0 8px 20px rgba(0, 0, 0, .18); }
.btn--ghost { background: transparent; color: var(--ink); border-color: var(--line); }
.btn--ghost:hover { border-color: var(--coral); box-shadow: none; }
.btn--sm { min-height: 40px; padding: 8px 18px; font-size: .9rem; }
.cta { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 30px; }
.cta--center { justify-content: center; }

/* 히어로 */
.hero { position: relative; padding: clamp(36px, 7vw, 84px) 0 clamp(48px, 7vw, 96px); overflow: hidden; }
.hero__in { display: grid; gap: 44px; align-items: center; }
@media (min-width: 900px) { .hero__in { grid-template-columns: 1.05fr .95fr; gap: 56px; } }
.badges { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 26px; font-size: .9rem; color: var(--muted); }
.badges li { border: 1px solid var(--line); border-radius: 999px; padding: 8px 16px; background: var(--surface); }
.hero__art { position: relative; display: grid; place-items: center; min-height: 420px; }
.phone { position: relative; z-index: 2; width: min(300px, 70vw); border-radius: 44px; padding: 9px; background: #120D0F; box-shadow: var(--shadow), 0 0 0 1px rgba(255, 255, 255, .08) inset; transform: rotate(-3deg); }
.phone .shot { border-radius: 36px; width: 100%; }
.phone--sm { width: min(270px, 64vw); transform: rotate(2.5deg); }
/* 시그니처: 지도에 색이 번져 나가는 고리 */
.rings { position: absolute; inset: 0; display: grid; place-items: center; z-index: 0; }
.rings i { grid-area: 1 / 1; width: 46%; aspect-ratio: 1; border-radius: 50%; background: var(--coral-soft); opacity: .0; animation: ring 7s ease-out infinite; }
.rings i:nth-child(2) { animation-delay: 1.75s; background: var(--mint-soft); }
.rings i:nth-child(3) { animation-delay: 3.5s; }
.rings i:nth-child(4) { animation-delay: 5.25s; background: var(--mint-soft); }
@keyframes ring { 0% { transform: scale(.5); opacity: .9; } 100% { transform: scale(2.3); opacity: 0; } }
.route { position: absolute; left: -4%; right: -4%; bottom: 4%; width: 108%; height: 34%; z-index: 3; pointer-events: none; overflow: visible; }
#routeLine { stroke-dasharray: 1; stroke-dashoffset: 1; animation: draw 2.4s .5s cubic-bezier(.6, 0, .2, 1) forwards; }
.route__head { opacity: 0; animation: pop .4s 2.7s forwards; }
@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.4); transform-origin: 505px 70px; } to { opacity: 1; transform: none; } }

/* 숫자 띠 */
.band { border-block: 1px solid var(--line); background: var(--surface); }
.band__in { display: grid; grid-template-columns: repeat(2, 1fr); gap: 26px 16px; padding-block: 34px; }
@media (min-width: 760px) { .band__in { grid-template-columns: repeat(4, 1fr); } }
.stat b { display: block; font-size: clamp(2rem, 5vw, 3.2rem); line-height: 1; letter-spacing: -.03em; font-weight: 800; color: var(--coral-deep); font-variant-numeric: tabular-nums; }
.stat span { display: block; margin-top: 8px; color: var(--muted); font-size: .95rem; }

/* 섹션 */
.sec { padding: clamp(64px, 9vw, 120px) 0; }
.sec--tint { background: var(--bg-tint); }
.sec .narrow p + p { margin-top: 16px; }
.sec .narrow > p:not(.eyebrow) { color: var(--muted); font-size: 1.08rem; }
.steps { display: grid; gap: 16px; margin-top: 34px; counter-reset: s; }
@media (min-width: 820px) { .steps { grid-template-columns: repeat(3, 1fr); } }
.steps li { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 26px 24px; }
.steps__n { display: inline-grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; background: var(--coral-soft); color: var(--coral-deep); font-weight: 800; margin-bottom: 14px; }
.steps p, .card p { color: var(--muted); font-size: .98rem; }

/* 직접 해 보기 */
.demo { display: grid; gap: 18px; margin-top: 30px; }
@media (min-width: 820px) { .demo { grid-template-columns: 1fr 1fr; } }
.demo__col { display: flex; flex-direction: column; min-width: 0; }
.demo label, .demo__label { font-size: .86rem; font-weight: 700; color: var(--muted); margin-bottom: 8px; }
.demo textarea { font: 400 1rem/1.7 var(--font); color: var(--ink); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; width: 100%; min-height: 300px; resize: vertical; }
.demo textarea:focus { border-color: var(--coral); outline: none; box-shadow: 0 0 0 3px var(--coral-soft); }
.demo__tools { display: flex; gap: 8px; margin-top: 10px; flex-wrap: wrap; }
.memo { flex: 1; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 18px; min-height: 300px; white-space: pre-wrap; overflow-wrap: anywhere; line-height: 1.7; box-shadow: var(--shadow); }
.memo:empty::before { content: attr(data-empty); color: var(--muted); }
.m-time { color: var(--coral-deep); font-weight: 600; }
.m-arrow { color: var(--mint); font-weight: 500; }
.m-tip { color: var(--muted); text-decoration: underline; text-underline-offset: 3px; }
.m-note { color: var(--muted); font-weight: 500; }
.m-transit { color: var(--muted); }
.legend { display: flex; flex-wrap: wrap; gap: 8px 16px; margin-top: 12px; font-size: .86rem; color: var(--muted); }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 50%; background: var(--muted); }
.legend .k-time { background: var(--coral-deep); } .legend .k-arrow { background: var(--mint); }
.legend .k-tip { background: transparent; border-bottom: 2px solid var(--muted); border-radius: 0; height: 8px; }

/* 기능 */
.split { display: grid; gap: 34px; margin-top: 30px; align-items: start; }
@media (min-width: 900px) { .split { grid-template-columns: 300px 1fr; gap: 48px; } .split__art { position: sticky; top: 96px; } }
.split__art { display: grid; place-items: center; }
.cards { display: grid; gap: 14px; }
@media (min-width: 620px) { .cards { grid-template-columns: 1fr 1fr; } }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 22px; transition: transform .25s, border-color .25s; }
@media (hover: hover) { .card:hover { transform: translateY(-3px); border-color: var(--coral); } }

.plain { display: grid; gap: 12px; margin: 8px 0 22px; }
.plain li { position: relative; padding-left: 26px; color: var(--muted); }
.plain li::before { content: ""; position: absolute; left: 0; top: .62em; width: 12px; height: 12px; border-radius: 50%; background: var(--mint); }

details { border-bottom: 1px solid var(--line); }
summary { cursor: pointer; list-style: none; padding: 18px 34px 18px 0; font-weight: 700; position: relative; min-height: 48px; }
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; position: absolute; right: 4px; top: 14px; font-size: 1.5rem; font-weight: 400; color: var(--coral-deep); transition: transform .25s; }
details[open] summary::after { transform: rotate(45deg); }
details p { color: var(--muted); padding: 0 0 20px; }

.get { padding: clamp(72px, 10vw, 130px) 0; text-align: center; background: var(--bg); border-top: 1px solid var(--line); }
.get h2 { margin-bottom: 6px; }
.foot { border-top: 1px solid var(--line); padding: 28px 0 40px; font-size: .88rem; color: var(--muted); }
.foot__in { display: flex; flex-wrap: wrap; gap: 10px 24px; justify-content: space-between; }

/* 나타나기 — JS 가 있을 때만 숨겼다 보여 준다(JS 없으면 그대로 보인다) */
.js .rv { opacity: 0; transform: translateY(18px); transition: opacity .7s cubic-bezier(.2, .7, .2, 1), transform .7s cubic-bezier(.2, .7, .2, 1); }
.js .rv.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .js .rv { opacity: 1; transform: none; transition: none; }
  .rings i { animation: none; opacity: .5; transform: scale(1.5); }
  .rings i:nth-child(n+2) { display: none; }
  #routeLine { animation: none; stroke-dashoffset: 0; }
  .route__head { animation: none; opacity: 1; }
  .btn, .card { transition: none; }
}
