/* ============================================================
   Tokens
   ============================================================ */
:root {
  --bg: #0a0c10;
  --bg-2: #0e1015;
  --surface: #13161c;
  --surface-2: #1a1e26;
  --line: rgba(255, 255, 255, .08);
  --text: #eef0f3;
  --muted: #9aa2ae;
  --dim: #6b7280;
  --red: #f23d3d;
  --red-2: #d9262a;
  --gold: #ffd54a;
  --card: #ffffff;
  --ink: #111318;
  --ink-2: #4b515c;
  --field: #f3f4f6;
  --radius: 16px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: "Pretendard Variable", Pretendard, -apple-system, "Apple SD Gothic Neo", "Malgun Gothic", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  letter-spacing: -0.015em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; height: auto; display: block; }
button { font: inherit; color: inherit; }
.col { max-width: 560px; margin: 0 auto; padding: 0 20px; }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.h-accent { color: var(--gold); }

/* ============================================================
   Marquee
   ============================================================ */
.marquee { background: var(--red); color: #fff; overflow: hidden; white-space: nowrap; font-size: 13px; font-weight: 700; height: 36px; display: flex; align-items: center; }
.marquee-track { display: inline-flex; animation: marquee 28s linear infinite; }
.marquee-track span { padding: 0 22px; position: relative; }
.marquee-track span::after { content: ""; position: absolute; right: -2px; top: 50%; width: 4px; height: 4px; border-radius: 50%; background: rgba(255,255,255,.6); transform: translateY(-50%); }
@keyframes marquee { to { transform: translateX(-50%); } }

/* ============================================================
   Hero
   ============================================================ */
.top { position: relative; overflow: hidden; display: flex; flex-direction: column; }
.hero { position: relative; padding: 28px 0 26px; }
.apply { order: 2; }
.scan-wrap { order: 3; position: relative; padding: 0 0 64px; }
.scan-wrap .col { position: relative; z-index: 1; }
.top::before {
  content: ""; position: absolute; inset: 0;
  background: url("/images/hero-bg.svg") center top / cover no-repeat;
  opacity: .35;
  mask-image: linear-gradient(180deg, #000 20%, transparent 70%);
  -webkit-mask-image: linear-gradient(180deg, #000 20%, transparent 70%);
}
.top::after {
  content: ""; position: absolute; left: 50%; top: -220px; width: 720px; height: 520px; transform: translateX(-50%);
  background: radial-gradient(closest-side, rgba(242,61,61,.28), transparent);
  pointer-events: none;
}
.hero .col, .apply .col { position: relative; z-index: 1; }

.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 7px 14px; border-radius: 999px;
  background: rgba(242,61,61,.12); border: 1px solid rgba(242,61,61,.35);
  color: #ff8a8a; font-size: 13px; font-weight: 700;
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); box-shadow: 0 0 0 0 rgba(242,61,61,.6); animation: ping 1.6s infinite; }
@keyframes ping { 70% { box-shadow: 0 0 0 8px rgba(242,61,61,0); } 100% { box-shadow: 0 0 0 0 rgba(242,61,61,0); } }

.hero h1 {
  margin-top: 16px;
  font-size: clamp(38px, 10.6vw, 60px);
  font-weight: 900;
  line-height: 1.14;
  letter-spacing: -0.05em;
  color: #fff;
}
.hero .h-sm { display: block; margin-bottom: 10px; font-size: 16px; font-weight: 600; letter-spacing: -0.03em; color: var(--muted); }
.hero .lead { margin-top: 14px; font-size: 15.5px; color: #b6bcc6; line-height: 1.55; }

/* 분석 현황 패널 */
.scan { background: rgba(19,22,28,.88); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; backdrop-filter: blur(6px); box-shadow: 0 24px 60px rgba(0,0,0,.45); }
.scan-head { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-bottom: 1px solid var(--line); font-size: 14px; }
.scan-head b { font-weight: 700; }
.live { display: inline-flex; align-items: center; gap: 6px; padding: 3px 8px; border-radius: 6px; background: var(--red); color: #fff; font-size: 11px; font-weight: 800; letter-spacing: .04em; }
.live i { width: 6px; height: 6px; border-radius: 50%; background: #fff; animation: blink 1s steps(2) infinite; }
@keyframes blink { 50% { opacity: .2; } }
.scan-clock { margin-left: auto; color: var(--dim); font-size: 12px; font-variant-numeric: tabular-nums; }
.scan-chart { position: relative; height: 120px; }
.scan-chart svg { width: 100%; height: 100%; display: block; }
.scan-beam {
  position: absolute; top: 0; bottom: 0; left: 0; width: 60px;
  background: linear-gradient(90deg, transparent, rgba(255,213,74,.16));
  border-right: 1px solid rgba(255,213,74,.7);
  animation: beam 3.2s cubic-bezier(.5,0,.5,1) infinite;
}
@keyframes beam { from { left: -60px; } to { left: 100%; } }
.scan-rows { list-style: none; padding: 6px 16px 14px; }
.scan-rows li { display: grid; grid-template-columns: 1fr 84px 44px; align-items: center; gap: 12px; padding: 9px 0; font-size: 14px; color: #c9ced6; }
.scan-rows li + li { border-top: 1px dashed var(--line); }
.bar { height: 5px; border-radius: 3px; background: var(--surface-2); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 3px; background: var(--red); }
.bar .b1 { width: 100%; }
.bar .b2 { animation: fill 2.8s ease-in-out infinite; }
.bar .b3 { animation: fill 3.6s ease-in-out .6s infinite; }
@keyframes fill { 0% { width: 8%; } 80%, 100% { width: 92%; } }
.st { font-style: normal; font-size: 12px; font-weight: 700; color: var(--gold); text-align: right; }
.st.done { color: #4ade80; }

/* ============================================================
   Apply card
   ============================================================ */
.apply { padding: 0 0 40px; }
.card {
  background: var(--card); color: var(--ink);
  border-radius: 22px; padding: 30px 22px 24px;
  box-shadow: 0 30px 80px rgba(0,0,0,.5), 0 0 0 1px rgba(255,255,255,.04);
}
.card-head { margin-bottom: 22px; }
.eyebrow { font-size: 13.5px; font-weight: 800; letter-spacing: -0.01em; color: var(--red); }
.card h2 { margin-top: 6px; font-size: 28px; font-weight: 800; letter-spacing: -0.04em; line-height: 1.3; }
.card-sub { margin-top: 8px; font-size: 14px; color: var(--ink-2); line-height: 1.55; }
.card-sub b { color: var(--red-2); font-weight: 700; }

.field { margin-bottom: 14px; }
.field label, .seg legend { display: block; margin-bottom: 7px; font-size: 13.5px; font-weight: 700; color: var(--ink); }
.field input {
  width: 100%; height: 54px; padding: 0 16px;
  border: 1.5px solid transparent; border-radius: 12px;
  background: var(--field); color: var(--ink);
  font: inherit; font-size: 16px; font-weight: 500;
  transition: border-color .15s, background .15s;
}
.field input::placeholder { color: #a3a9b3; font-weight: 400; }
.field input:focus { outline: none; border-color: var(--ink); background: #fff; }

.seg { border: 0; margin-top: 18px; }
.seg-grid { display: grid; gap: 6px; }
.seg-grid.five { grid-template-columns: repeat(5, 1fr); }
.seg-grid.four { grid-template-columns: repeat(4, 1fr); }
.seg label { position: relative; cursor: pointer; }
.seg input { position: absolute; opacity: 0; pointer-events: none; }
.seg span {
  display: flex; align-items: center; justify-content: center; height: 46px;
  border: 1.5px solid #e4e6ea; border-radius: 10px; background: #fff;
  font-size: 14px; font-weight: 600; color: var(--ink-2); white-space: nowrap;
  transition: .15s;
}
.seg label:hover span { border-color: #c6cad1; }
.seg input:checked + span { background: var(--ink); border-color: var(--ink); color: #fff; }
.seg input:focus-visible + span { outline: 2px solid var(--red); outline-offset: 2px; }
/* 좁은 화면: 투자유형 3+2 를 꽉 채워 배치 */
@media (max-width: 480px) {
  .seg-grid.five { grid-template-columns: repeat(6, 1fr); }
  .seg-grid.five label { grid-column: span 2; }
  .seg-grid.five label:nth-child(n+4) { grid-column: span 3; }
  .seg span { height: 44px; font-size: 14px; }
}
@media (max-width: 340px) {
  .seg-grid.four { grid-template-columns: repeat(2, 1fr); }
}

.agree { margin-top: 22px; padding-top: 18px; border-top: 1px solid #eceef1; display: grid; gap: 12px; }
.chk { display: flex; align-items: center; gap: 10px; font-size: 14.5px; color: var(--ink); cursor: pointer; position: relative; }
.chk input { position: absolute; opacity: 0; width: 20px; height: 20px; margin: 0; }
.chk .box { flex: none; width: 21px; height: 21px; border: 1.5px solid #c8ccd3; border-radius: 6px; background: #fff; display: grid; place-items: center; transition: .15s; }
.chk .box::after { content: ""; width: 10px; height: 6px; border-left: 2.2px solid #fff; border-bottom: 2.2px solid #fff; transform: rotate(-45deg) translate(1px, -1px); opacity: 0; }
.chk input:checked + .box { background: var(--red); border-color: var(--red); }
.chk input:checked + .box::after { opacity: 1; }
.chk input:focus-visible + .box { outline: 2px solid var(--red); outline-offset: 2px; }
.chk em { font-style: normal; color: var(--red-2); font-size: 13px; font-weight: 600; }
.chk button { margin-left: auto; background: none; border: 0; color: #8a9099; font-size: 13px; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; padding: 4px; }

.form-error { margin-top: 16px; padding: 12px 14px; border-radius: 10px; background: #fff1f1; color: #c62828; font-size: 14px; font-weight: 600; }

/* CTA */
.cta {
  position: relative; overflow: hidden;
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 62px; margin-top: 20px;
  border: 0; border-radius: 14px; cursor: pointer; text-decoration: none;
  background: linear-gradient(180deg, #ff4a4a, var(--red-2));
  color: #fff; font-size: 19px; font-weight: 800; letter-spacing: -0.03em;
  box-shadow: 0 10px 24px rgba(217,38,42,.35), inset 0 1px 0 rgba(255,255,255,.25);
  transition: transform .12s, box-shadow .12s;
}
.cta::after { content: "→"; font-weight: 700; transition: transform .2s; }
.cta:hover::after { transform: translateX(3px); }
.cta:active { transform: translateY(1px); box-shadow: 0 5px 14px rgba(217,38,42,.35); }
.cta::before {
  content: ""; position: absolute; top: 0; bottom: 0; left: -40%; width: 30%;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,.35), transparent);
  transform: skewX(-20deg);
  animation: shine 3.2s ease-in-out infinite;
}
@keyframes shine { 0%, 60% { left: -40%; } 100% { left: 130%; } }
.cta[disabled] { opacity: .65; cursor: wait; }
.cta[disabled]::before { animation: none; }

.secure { display: flex; align-items: center; justify-content: center; gap: 6px; margin-top: 14px; font-size: 12.5px; color: #8a9099; }
.secure::before {
  content: ""; width: 12px; height: 12px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%238a9099' stroke-width='2.4' stroke-linecap='round'%3E%3Crect x='4' y='10' width='16' height='11' rx='2'/%3E%3Cpath d='M8 10V7a4 4 0 0 1 8 0v3'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* ============================================================
   Sections
   ============================================================ */
main > section:not(.apply) { padding: 76px 0; border-top: 1px solid var(--line); }
.sec-title { margin-top: 10px; font-size: clamp(26px, 7vw, 32px); font-weight: 800; line-height: 1.32; letter-spacing: -0.045em; }

.sec-sub { margin-top: 12px; font-size: 16px; color: var(--muted); }

/* Offer */
.offer { background: var(--bg-2); }
.offer-visual { position: relative; margin: 36px auto 12px; width: 220px; }
.offer-visual::before { content: ""; position: absolute; inset: 15% -30%; background: radial-gradient(closest-side, rgba(242,61,61,.25), transparent); z-index: 0; }
.offer-visual img { position: relative; z-index: 1; }
.offer-list { list-style: none; margin-top: 28px; }
.offer-list li { display: grid; grid-template-columns: 44px 1fr; gap: 6px; padding: 22px 0; border-top: 1px solid var(--line); }
.offer-list li:last-child { border-bottom: 1px solid var(--line); }
.offer-list .no { font-size: 15px; font-weight: 800; color: var(--red); font-variant-numeric: tabular-nums; padding-top: 2px; }
.offer-list h3 { font-size: 19px; font-weight: 700; letter-spacing: -0.035em; }
.offer-list p { margin-top: 4px; font-size: 15px; color: var(--muted); }

/* Flow */
.flow-list { list-style: none; margin-top: 32px; position: relative; }
.flow-list::before { content: ""; position: absolute; left: 7px; top: 10px; bottom: 10px; width: 2px; background: linear-gradient(var(--red), rgba(242,61,61,.1)); }
.flow-list li { position: relative; padding: 0 0 28px 36px; }
.flow-list li:last-child { padding-bottom: 0; }
.flow-list li::before { content: ""; position: absolute; left: 0; top: 4px; width: 16px; height: 16px; border-radius: 50%; background: var(--bg); border: 3px solid var(--red); }
.flow-list .step { font-size: 12px; font-weight: 800; letter-spacing: .08em; color: var(--red); }
.flow-list h3 { margin-top: 2px; font-size: 20px; font-weight: 700; letter-spacing: -0.035em; }
.flow-list p { font-size: 15px; color: var(--muted); }

/* Status ticker */
.ticker { margin-top: 28px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; }
.ticker-head, .ticker li { display: grid; grid-template-columns: 1.1fr 1fr 80px; align-items: center; padding: 0 18px; }
.ticker-head { height: 42px; font-size: 12.5px; color: var(--dim); font-weight: 600; border-bottom: 1px solid var(--line); background: rgba(255,255,255,.02); }
.ticker-head span:last-child, .ticker li .t-time { text-align: right; }
.ticker-body { height: 280px; overflow: hidden; position: relative; }
.ticker-body::after { content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 60px; background: linear-gradient(transparent, var(--surface)); pointer-events: none; }
.ticker ul { list-style: none; }
.ticker.rolling ul { animation: roll var(--dur, 30s) linear infinite; }
.ticker li { height: 56px; border-bottom: 1px solid var(--line); font-size: 15px; }
.ticker .t-name { font-weight: 600; }
.ticker .t-type { justify-self: start; padding: 3px 9px; border-radius: 6px; background: rgba(242,61,61,.12); color: #ff8a8a; font-size: 12.5px; font-weight: 700; }
.ticker .t-time { color: var(--dim); font-size: 13px; font-variant-numeric: tabular-nums; }
@keyframes roll { to { transform: translateY(-50%); } }

/* FAQ */
.faq details { border-bottom: 1px solid var(--line); }
.faq details:first-of-type { margin-top: 24px; border-top: 1px solid var(--line); }
.faq summary { list-style: none; cursor: pointer; display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 20px 0; font-size: 16.5px; font-weight: 600; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; flex: none; width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); color: var(--muted); font-size: 18px; font-weight: 400; transition: transform .2s; }
.faq details[open] summary::after { transform: rotate(45deg); color: #fff; background: var(--red); }
.faq details p { padding: 0 0 22px; font-size: 15px; color: var(--muted); }

/* Final CTA */
.final { text-align: center; position: relative; overflow: hidden; }
.final::before { content: ""; position: absolute; left: 50%; bottom: -260px; width: 700px; height: 500px; transform: translateX(-50%); background: radial-gradient(closest-side, rgba(242,61,61,.22), transparent); }
.final .col { position: relative; }
.final h2 { font-size: clamp(26px, 7vw, 34px); font-weight: 800; line-height: 1.32; letter-spacing: -0.045em; }
.final .cta-link { width: auto; display: inline-flex; padding: 0 36px; margin-top: 30px; }

/* ============================================================
   Footer
   ============================================================ */
footer { background: #07080b; border-top: 1px solid var(--line); padding: 40px 0 48px; font-size: 12.5px; color: var(--dim); line-height: 1.7; }
footer .warn { padding: 14px 16px; border: 1px solid var(--line); border-radius: 12px; color: #9aa2ae; }
footer .links { display: flex; gap: 18px; margin-top: 18px; }
footer .links button { background: none; border: 0; color: #b6bcc6; font-size: 13px; font-weight: 600; cursor: pointer; padding: 0; }
footer .biz { display: flex; flex-wrap: wrap; gap: 2px 16px; margin-top: 14px; }
footer .biz div { display: flex; gap: 6px; }
footer .biz dt { color: #4b5260; }
footer .copy { margin-top: 14px; color: #4b5260; }

/* Sticky (mobile) */
.sticky {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 20;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  background: linear-gradient(transparent, rgba(10,12,16,.92) 30%);
  transform: translateY(110%); transition: transform .25s;
}
.sticky.show { transform: none; }
.sticky .cta { margin-top: 0; height: 56px; font-size: 18px; }
@media (min-width: 721px) { .sticky { display: none; } }
@media (max-width: 720px) { footer { padding-bottom: 110px; } }

/* Modal */
dialog { border: 0; border-radius: 20px; padding: 28px 24px 20px; max-width: 460px; width: calc(100% - 32px); background: #fff; color: var(--ink); margin: auto; box-shadow: 0 30px 80px rgba(0,0,0,.4); }
dialog::backdrop { background: rgba(5,6,8,.7); backdrop-filter: blur(3px); }
dialog h3 { font-size: 20px; font-weight: 800; letter-spacing: -0.035em; margin-bottom: 14px; }
.modal-body { font-size: 14.5px; line-height: 1.7; color: var(--ink-2); max-height: 60vh; overflow-y: auto; }
.modal-body p + p { margin-top: 12px; }
.modal-body b { color: var(--ink); }
.done { text-align: center; }
.done svg { margin: 4px auto 14px; }
.done p { font-size: 15.5px; color: var(--ink); }
dialog button { margin-top: 20px; width: 100%; height: 50px; border: 0; border-radius: 12px; background: var(--ink); color: #fff; font-size: 16px; font-weight: 700; cursor: pointer; }

/* 404 */
.notfound { min-height: 100vh; display: grid; place-items: center; text-align: center; }
.notfound h1 { font-size: 72px; font-weight: 900; letter-spacing: -0.05em; color: var(--red); }
.notfound p { color: var(--muted); margin-top: 6px; }
.notfound .cta { width: auto; display: inline-flex; padding: 0 32px; margin-top: 28px; }

/* ============================================================
   Desktop
   ============================================================ */
@media (min-width: 1000px) {
  .top {
    display: grid; grid-template-columns: minmax(0, 580px) 440px; grid-template-rows: auto 1fr;
    justify-content: center; column-gap: 64px; row-gap: 32px;
    padding: 72px 32px 96px; align-items: start;
  }
  .top .col { max-width: none; padding: 0; }
  .hero, .apply, .scan-wrap { padding: 0; }
  .hero { grid-column: 1; grid-row: 1; }
  .scan-wrap { grid-column: 1; grid-row: 2; }
  .apply { grid-column: 2; grid-row: 1 / span 2; }
  .hero .h-sm { font-size: 18px; }
  .hero .lead { font-size: 17px; }
  .hero h1 { font-size: 64px; }
  .hero .lead { font-size: 18px; }
  .card { padding: 34px 30px 28px; }

  .offer .col, .flow .col, footer .col { max-width: 1040px; padding: 0 32px; }
  .status .col, .faq .col { max-width: 760px; }

  .offer .col { display: grid; grid-template-columns: 320px 1fr; column-gap: 80px; align-items: start; }
  .offer .col > * { grid-column: 2; }
  .offer-visual { grid-column: 1 !important; grid-row: 1 / span 5; width: 260px; margin: 0 auto; }

  .flow .col { text-align: center; }
  .flow-list { display: grid; grid-template-columns: repeat(3, 1fr); gap: 32px; margin-top: 48px; text-align: left; }
  .flow-list::before { left: 0; right: 0; top: 7px; bottom: auto; width: auto; height: 2px; background: linear-gradient(90deg, var(--red), rgba(242,61,61,.12)); }
  .flow-list li { padding: 40px 0 0; }
  .flow-list li::before { top: 0; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; }
  .ticker-body { overflow-y: auto; }
}
