/* 랜딩 페이지 전용: 스크롤 연동 애니메이션 + LP 호가 그림. 색은 style.css 의 --bg/--buy/--sell/--accent 를 따른다. */
.lp-page { --lp-bg: #07090c; background: var(--lp-bg); overflow-x: hidden; }
.lp-page main { display: block; }

/* 상단 바: 투명 → 스크롤하면 반투명 블러 */
.lp-nav { position: fixed; left: 0; right: 0; top: 0; background: transparent; border-bottom-color: transparent;
  transition: background .3s, border-color .3s, backdrop-filter .3s; }
.lp-nav.scrolled { background: rgba(10, 12, 16, .72); border-bottom-color: rgba(255,255,255,.08);
  backdrop-filter: saturate(180%) blur(18px); -webkit-backdrop-filter: saturate(180%) blur(18px); }

.lp-grad { background: linear-gradient(90deg, #ff6b6b 0%, #c586ff 45%, #4c8dff 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-ghost { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.16); }
.lp-actions { display: flex; gap: 12px; margin-top: 30px; flex-wrap: wrap; justify-content: center; }

/* ---------------------------------------------------------------- 1. 히어로 */
.lp-hero { position: relative; min-height: 100vh; padding: 120px 20px 80px; display: flex; flex-direction: column;
  align-items: center; text-align: center; }
.lp-glow { position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(40% 35% at 30% 62%, rgba(255,91,91,.22), transparent 70%),
    radial-gradient(40% 35% at 70% 62%, rgba(76,141,255,.26), transparent 70%),
    radial-gradient(60% 40% at 50% 0%, rgba(197,134,255,.10), transparent 70%); }
.lp-hero-copy { position: relative; z-index: 1; max-width: 860px; will-change: transform, opacity; }
.lp-eyebrow { color: var(--accent); font-weight: 600; letter-spacing: .04em; margin: 0 0 16px; font-size: 15px; }
.lp-hero h1 { font-size: clamp(36px, 7vw, 76px); line-height: 1.08; letter-spacing: -.03em; margin: 0 0 22px; font-weight: 800; }
.lp-lead { color: #a6afbd; font-size: clamp(16px, 2vw, 20px); line-height: 1.6; max-width: 640px; margin: 0 auto; }
#who { margin-top: 14px; }

.lp-stage { position: relative; z-index: 1; width: min(1040px, 100%); margin-top: 64px; perspective: 1400px; }
.lp-device { margin: 0; position: relative; border-radius: 22px; padding: 0 0 18px; transform-origin: 50% 0%;
  background: linear-gradient(180deg, #141922, #0c1016); border: 1px solid rgba(255,255,255,.10);
  box-shadow: 0 40px 120px -20px rgba(76,141,255,.35), 0 20px 60px -30px rgba(255,91,91,.45), inset 0 1px 0 rgba(255,255,255,.08);
  transform: rotateX(24deg) scale(.86); will-change: transform; }
.lp-device-bar { display: flex; align-items: center; gap: 7px; padding: 14px 18px; border-bottom: 1px solid rgba(255,255,255,.06);
  color: var(--muted); font-size: 12px; }
.lp-device-bar i { width: 10px; height: 10px; border-radius: 50%; background: #2a313b; }
.lp-device-bar span { margin-left: 10px; }
.lp-depth { display: block; width: 100%; height: auto; }
.lp-gridlines line { stroke: rgba(255,255,255,.06); stroke-width: 1; }
.lp-edge { fill: none; stroke-width: 2.5; stroke-linejoin: round; }
.lp-edge.bid { stroke: var(--buy); filter: drop-shadow(0 0 6px rgba(255,91,91,.8)); }
.lp-edge.ask { stroke: var(--sell); filter: drop-shadow(0 0 6px rgba(76,141,255,.8)); }
.lp-axis text { fill: var(--muted); font-size: 13px; text-anchor: middle; }
.lp-midtag rect { fill: rgba(255,255,255,.10); stroke: rgba(255,255,255,.35); }
.lp-midtag text { fill: #fff; font-size: 13px; font-weight: 700; text-anchor: middle; }
/* 처음 그려지는 연출 */
.lp-edge { stroke-dasharray: 1400; stroke-dashoffset: 1400; animation: lp-draw 1.8s .3s cubic-bezier(.2,.7,.2,1) forwards; }
.lp-area { opacity: 0; animation: lp-fade 1.2s 1s ease forwards; }
@keyframes lp-draw { to { stroke-dashoffset: 0; } }
@keyframes lp-fade { to { opacity: 1; } }

.lp-chip { position: absolute; padding: 9px 14px; border-radius: 12px; font-size: 13px; white-space: nowrap;
  background: rgba(18,22,29,.82); border: 1px solid rgba(255,255,255,.12); backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px); box-shadow: 0 10px 30px rgba(0,0,0,.4); will-change: transform; }
.lp-chip b { margin-right: 6px; }
.lp-chip.bid { left: 6%; top: 34%; } .lp-chip.bid b { color: var(--buy); }
.lp-chip.ask { right: 6%; top: 24%; } .lp-chip.ask b { color: var(--sell); }
.lp-chip.ok { left: 50%; bottom: -18px; transform: translateX(-50%); color: var(--ok); border-color: rgba(47,191,113,.4); }

.lp-scrollhint { position: absolute; bottom: 22px; left: 50%; transform: translateX(-50%); color: var(--muted); font-size: 12px;
  letter-spacing: .2em; animation: lp-bob 2s ease-in-out infinite; z-index: 1; }
.lp-scrollhint::after { content: ""; display: block; width: 1px; height: 26px; margin: 8px auto 0;
  background: linear-gradient(var(--muted), transparent); }
@keyframes lp-bob { 50% { transform: translate(-50%, 6px); } }

/* ---------------------------------------------------------------- 2. 단어별로 밝아지는 문장 */
.lp-statement { height: 220vh; position: relative; }
.lp-words { position: sticky; top: 0; height: 100vh; margin: 0 auto; max-width: 980px; padding: 0 24px; box-sizing: border-box;
  display: flex; flex-wrap: wrap; align-content: center; justify-content: center; gap: .1em .32em;
  font-size: clamp(28px, 5vw, 58px); font-weight: 800; line-height: 1.25; letter-spacing: -.02em; text-align: center; }
.lp-words .w { color: #fff; opacity: .14; transition: opacity .25s linear; }
.lp-words .w.on { opacity: 1; }

/* ---------------------------------------------------------------- 3. 고정 호가창 + 단계 설명 */
.lp-story { position: relative; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 40px;
  max-width: 1140px; margin: 0 auto; padding: 0 28px; }
.lp-story-sticky { position: sticky; top: 0; height: 100vh; display: flex; align-items: center; align-self: start; }
.lp-book-wrap { width: 100%; border-radius: 24px; padding: 18px; background: radial-gradient(80% 70% at 50% 50%, #121822, #0a0d12);
  border: 1px solid rgba(255,255,255,.08); box-shadow: 0 30px 80px -30px rgba(0,0,0,.8); }
.lp-book { display: block; width: 100%; height: auto; overflow: visible; }
.lp-steps { padding: 30vh 0 40vh; }
.lp-step { min-height: 70vh; display: flex; flex-direction: column; justify-content: center; opacity: .22;
  transform: translateY(20px); transition: opacity .5s, transform .5s; }
.lp-step.active { opacity: 1; transform: none; }
.lp-step h2 { font-size: clamp(26px, 3.4vw, 40px); letter-spacing: -.02em; margin: 6px 0 14px; line-height: 1.2; }
.lp-step p { color: #a6afbd; font-size: 17px; line-height: 1.7; margin: 0; }
.lp-num { color: var(--accent); font-weight: 700; font-size: 14px; letter-spacing: .1em; }

/* 호가창 그림: 기본은 비어 있고 data-step 이 커질수록 채워진다 */
.lp-book text { font-size: 13px; }
.lp-book .px { fill: #cfd5de; text-anchor: middle; font-variant-numeric: tabular-nums; }
.lp-book .q { fill: var(--muted); font-variant-numeric: tabular-nums; }
.lp-book .ask .q { text-anchor: start; }
.lp-book .bid .q { text-anchor: end; }
.lp-book .ask .bar { fill: rgba(76,141,255,.75); }
.lp-book .bid .bar { fill: rgba(255,91,91,.75); }
.lp-book .bar { transform-box: fill-box; transform: scaleX(0); transition: transform .7s cubic-bezier(.2,.8,.2,1); }
.lp-book .ask .bar { transform-origin: left center; }
.lp-book .bid .bar { transform-origin: right center; }
.lp-book .lv { opacity: 0; transition: opacity .5s; }
.lp-ladder { transition: transform .9s cubic-bezier(.2,.8,.2,1), opacity .5s; }

.lp-fair line { stroke: rgba(255,255,255,.5); stroke-dasharray: 4 5; }
.lp-fair rect { fill: #fff; }
.lp-fair text { fill: #0b0e13; font-weight: 800; text-anchor: middle; }
.lp-fair { transition: transform .9s cubic-bezier(.2,.8,.2,1); }
.lp-spread path { stroke: var(--accent); stroke-width: 2; fill: none; }
.lp-spread text { fill: var(--accent); font-size: 12px; }
.lp-spread, .lp-fill-flash, .lp-skew-tag, .lp-halt { opacity: 0; transition: opacity .5s; }
.lp-fill-flash rect { fill: none; stroke: #fff; stroke-width: 2; }
.lp-fill-flash text { fill: #fff; font-weight: 700; }
.lp-skew-tag rect { fill: rgba(230,167,0,.15); stroke: var(--warn); }
.lp-skew-tag text { fill: var(--warn); font-weight: 700; text-anchor: middle; font-size: 12px; }
.lp-halt rect { fill: rgba(255,91,91,.14); stroke: var(--err); }
.lp-halt text { fill: var(--err); font-weight: 800; text-anchor: middle; font-size: 16px; }

/* step 0: 적정가만 */
/* step 1+: 최우선 호가 + 스프레드 */
.lp-story:not([data-step="0"]) .l0 { opacity: 1; }
.lp-story:not([data-step="0"]) .l0 .bar { transform: scaleX(1); }
.lp-story[data-step="1"] .lp-spread { opacity: 1; }
/* step 2+: 사다리 전체(위로 갈수록 늦게) */
.lp-story[data-step="2"] .lv, .lp-story[data-step="3"] .lv, .lp-story[data-step="4"] .lv, .lp-story[data-step="5"] .lv { opacity: 1; }
.lp-story[data-step="2"] .bar, .lp-story[data-step="3"] .bar, .lp-story[data-step="4"] .bar, .lp-story[data-step="5"] .bar { transform: scaleX(1); }
.lp-story .l1, .lp-story .l1 .bar { transition-delay: .08s; }
.lp-story .l2, .lp-story .l2 .bar { transition-delay: .16s; }
.lp-story .l3, .lp-story .l3 .bar { transition-delay: .24s; }
.lp-story .l4, .lp-story .l4 .bar { transition-delay: .32s; }
/* step 3: 최우선 매도가 체결돼 줄었다가 다시 채워진다 */
.lp-story[data-step="3"] .lp-fill-flash { opacity: 1; animation: lp-pulse 2.4s ease-in-out infinite; }
.lp-story[data-step="3"] .ask.l0 .bar { animation: lp-refill 2.4s ease-in-out infinite; }
@keyframes lp-refill { 0%, 15% { transform: scaleX(1); } 35%, 55% { transform: scaleX(.05); } 80%, 100% { transform: scaleX(1); } }
@keyframes lp-pulse { 0%, 15% { opacity: .2; } 35%, 55% { opacity: 1; } 100% { opacity: .2; } }
/* step 4: 보유가 많아 사다리가 한 단계 내려간다 */
.lp-story[data-step="4"] .lp-ladder, .lp-story[data-step="4"] .lp-fair { transform: translateY(34px); }
.lp-story[data-step="4"] .lp-skew-tag { opacity: 1; }
/* step 5: 전체 OFF → 사다리가 빠진다 */
.lp-story[data-step="5"] .lp-ladder { opacity: .08; }
.lp-story[data-step="5"] .lp-halt { opacity: 1; }

/* ---------------------------------------------------------------- 4~6. 카드·흐름·마무리 */
.lp-section { max-width: 1140px; margin: 0 auto; padding: 110px 28px 20px; }
.lp-title { font-size: clamp(30px, 4.6vw, 52px); letter-spacing: -.03em; line-height: 1.15; text-align: center; margin: 0 0 56px; }
.lp-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); gap: 18px; }
.lp-card { background: linear-gradient(180deg, #11151c, #0c0f14); border: 1px solid rgba(255,255,255,.08); border-radius: 22px;
  padding: 28px 26px 22px; transition: border-color .3s, transform .3s; }
.lp-card:hover { border-color: rgba(76,141,255,.45); }
.lp-card h3 { margin: 18px 0 10px; font-size: 19px; }
.lp-card p { color: #a6afbd; line-height: 1.65; font-size: 14px; margin: 0; }
.lp-ico { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center;
  background: linear-gradient(135deg, rgba(255,91,91,.25), rgba(76,141,255,.3)); }
.lp-ico svg { width: 22px; height: 22px; fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

.lp-flow { list-style: none; padding: 0; margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 18px; counter-reset: step; }
.lp-flow li { counter-increment: step; padding: 24px; border-radius: 18px; background: rgba(255,255,255,.03);
  border: 1px solid rgba(255,255,255,.07); }
.lp-flow li::before { content: "0" counter(step); display: block; font-size: 34px; font-weight: 800; margin-bottom: 10px;
  background: linear-gradient(90deg, #ff6b6b, #4c8dff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lp-flow b { font-size: 17px; }
.lp-flow span { display: block; color: #a6afbd; font-size: 14px; margin-top: 6px; line-height: 1.6; }

.lp-final { text-align: center; padding: 160px 20px 140px; }
.lp-final h2 { font-size: clamp(34px, 6vw, 68px); letter-spacing: -.03em; line-height: 1.1; margin: 0; }

.lp-page .site-foot { border-top-color: rgba(255,255,255,.08); }

/* 나타나기: 아래에서 떠오른다 */
.reveal { opacity: 0; transform: translateY(40px) scale(.98); transition: opacity .9s ease, transform .9s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.lp-cards .reveal:nth-child(3n+2), .lp-flow .reveal:nth-child(2) { transition-delay: .08s; }
.lp-cards .reveal:nth-child(3n), .lp-flow .reveal:nth-child(3) { transition-delay: .16s; }
.lp-flow .reveal:nth-child(4) { transition-delay: .24s; }

/* ---------------------------------------------------------------- 좁은 화면: 호가창은 위에 고정, 설명은 아래로 흐른다 */
@media (max-width: 860px) {
  .lp-hero { padding-top: 100px; }
  .lp-stage { margin-top: 44px; }
  .lp-chip { font-size: 11px; padding: 6px 10px; }
  .lp-chip.bid { left: 3%; top: 30%; } .lp-chip.ask { right: 3%; top: 18%; }
  .lp-story { grid-template-columns: 1fr; gap: 0; padding: 0 16px; }
  .lp-story-sticky { height: auto; top: 56px; z-index: 3; padding: 8px 0 12px; background: var(--lp-bg); }
  .lp-book-wrap { padding: 10px; }
  .lp-steps { padding: 6vh 0 40vh; position: relative; z-index: 1; }
  .lp-step { min-height: 55vh; }
  .lp-step p { font-size: 15px; }
  .lp-section { padding: 80px 16px 10px; }
  .lp-title { margin-bottom: 36px; }
}

/* 움직임 줄이기 설정을 존중한다 */
@media (prefers-reduced-motion: reduce) {
  .lp-device { transform: none !important; }
  .lp-hero-copy, .lp-chip { transform: none !important; opacity: 1 !important; }
  .lp-chip.ok { transform: translateX(-50%) !important; }
  .lp-edge, .lp-area { animation: none; stroke-dashoffset: 0; opacity: 1; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .lp-words .w { opacity: 1; }
  .lp-statement { height: auto; }
  .lp-words { position: static; height: auto; padding: 120px 24px; }
  .lp-scrollhint { animation: none; }
  .lp-story *, .lp-story { transition: none !important; animation: none !important; }
}
