/* 값은 poliflow-app/frontend/design.md 기준. 힘은 첫 화면의 "사진 → 카드뉴스" 장면 하나에만 준다 */
:root {
  --p: #6C00B8;
  --t1: #191F28;
  --t2: #4E5968;
  --t3: #8B95A1;
  --t4: #B0B8C1;
  --line: #E5E8EB;
  --bg: #F2F4F6;
  --white: #FFFFFF;
  --photo: #CBD2D9;
  --dot: #D1D6DB;
  --ease: cubic-bezier(.2, .7, .2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--white);
  color: var(--t1);
  font-family: 'Pretendard Variable', Pretendard, -apple-system, 'Apple SD Gothic Neo', sans-serif;
  font-size: 17px;
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-x: clip;
}
h1, h2, h3, p, ol, ul, dl, dd { margin: 0; padding: 0; }
ol, ul { list-style: none; }
a { color: inherit; }
.num { font-variant-numeric: tabular-nums; }

:focus-visible { outline: 3px solid var(--p); outline-offset: 3px; border-radius: 6px; }
.skip { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--t1); color: #fff; padding: 10px 16px; border-radius: 10px; text-decoration: none; font-weight: 600; }
.skip:focus { top: 12px; }

.wrap { width: 100%; max-width: 1120px; margin: 0 auto; padding: 0 20px; }

/* 로고 */
.logo { font-weight: 800; letter-spacing: -0.045em; color: var(--t1); font-size: 26px; line-height: 1; text-decoration: none; display: inline-flex; align-items: baseline; }
.logo .dot { width: .2em; height: .2em; border-radius: 50%; background: var(--p); margin-left: .05em; display: inline-block; }
.logo-sm { font-size: 18px; }

/* 버튼 */
.btn { display: inline-flex; align-items: center; justify-content: center; height: 56px; padding: 0 26px; border-radius: 16px; font-size: 17px; font-weight: 700; text-decoration: none; transition: transform .15s var(--ease), background-color .15s; }
.btn:active { transform: scale(.97); }
.btn.primary { background: var(--p); color: #fff; }
.btn.primary:hover { background: #5B009C; }
.btn.second { background: var(--bg); color: var(--t1); }
.btn.second:hover { background: var(--line); }
.btn.light { background: #fff; color: var(--t1); }
.btn.light:hover { background: var(--bg); }
.btn.sm { height: 40px; padding: 0 16px; border-radius: 12px; font-size: 15px; }
.cta-row { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 36px; }

/* 상단 바 */
.top { position: sticky; top: 0; z-index: 10; background: rgba(255, 255, 255, .92); backdrop-filter: saturate(1.8) blur(12px); -webkit-backdrop-filter: saturate(1.8) blur(12px); }
.top-in { height: 64px; display: flex; align-items: center; justify-content: space-between; }

/* 글자: 제목이 화면의 얼굴이 되게 크고 촘촘하게 */
h1 { font-size: clamp(40px, 11vw, 84px); font-weight: 800; line-height: 1.14; letter-spacing: -0.045em; }
h2 { font-size: clamp(30px, 7.4vw, 52px); font-weight: 800; line-height: 1.24; letter-spacing: -0.04em; }
h3 { font-size: 20px; font-weight: 700; letter-spacing: -0.02em; line-height: 1.4; }
.lead { font-size: clamp(17px, 2vw, 19px); color: var(--t2); margin-top: 20px; max-width: 30em; }

/* 구역 위아래 간격은 .sec 하나로만 정한다 */
.sec { padding: 96px 0; }

/* 폰을 올려 두는 회색 무대. 좁은 화면에서는 폰 아래쪽을 잘라 길이를 줄인다 */
.stage { position: relative; background: var(--bg); border-radius: 28px; height: 480px; overflow: hidden; display: flex; justify-content: center; padding-top: 40px; }

/* 첫 화면 */
.hero { padding: 32px 0 24px; }
.hero-in { display: grid; gap: 48px; align-items: center; }

/* 문제 */
.problem { background: var(--bg); }
.reasons { margin-top: 48px; border-top: 1px solid var(--dot); }
.reasons > div { padding: 24px 0; border-bottom: 1px solid var(--dot); display: grid; gap: 6px; }
.reasons dt { font-size: 15px; font-weight: 700; color: var(--p); }
.reasons dd { font-size: 18px; font-weight: 600; line-height: 1.55; max-width: 34em; }
.reasons small { display: block; margin-top: 8px; font-size: 13px; font-weight: 500; color: var(--t2); }
.so { margin-top: 40px; font-size: clamp(19px, 2.6vw, 24px); font-weight: 700; line-height: 1.5; letter-spacing: -0.02em; max-width: 26em; }

/* 단계 */
.steps { display: grid; gap: 72px; margin-top: 56px; }
.step { display: grid; gap: 28px; }
.step-n { display: inline-grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; background: var(--t1); color: #fff; font-weight: 700; font-size: 15px; margin-bottom: 16px; }
.step-txt p { color: var(--t2); margin-top: 8px; max-width: 22em; }

/* 리포트 */
.split { display: grid; gap: 40px; }

/* 원칙 */
.trust-sec { padding-top: 0; }
.trust { display: grid; margin-top: 40px; }
.trust li { padding: 24px 0 24px 40px; border-top: 1px solid var(--line); position: relative; }
.trust li::before { content: ""; position: absolute; left: 0; top: 26px; width: 24px; height: 24px; border-radius: 50%; background: var(--p) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M7 12.5l3.2 3.2L17 9' fill='none' stroke='%23fff' stroke-width='2.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") center / 24px no-repeat; }
.trust p { color: var(--t2); margin-top: 6px; font-size: 16px; max-width: 24em; }

/* 끝: 사전 신청과 바닥글을 어두운 띠 하나로 */
.end { background: var(--t1); color: #fff; }
.apply { padding-top: 96px; padding-bottom: 88px; }
.apply .lead { color: var(--t4); }
.apply .btn { margin-top: 36px; }
.foot { padding-top: 32px; padding-bottom: 48px; border-top: 1px solid rgba(255, 255, 255, .12); display: grid; gap: 10px; font-size: 14px; color: var(--t4); }
.foot .logo { color: #fff; font-size: 22px; margin-bottom: 6px; }
.foot a { color: #fff; font-weight: 600; }
.foot .copy { font-size: 13px; }

/* ── 폰 목업 (앱 화면 v6 축소판) ── */
.phone { width: 272px; height: 560px; border-radius: 40px; background: var(--white); padding: 10px; flex: none; }
.ph-bar { height: 44px; display: flex; align-items: center; justify-content: space-between; padding: 0 14px; }
.ph-bar .back { width: 10px; height: 10px; border-left: 2px solid var(--t1); border-bottom: 2px solid var(--t1); transform: rotate(45deg); margin-left: 4px; }
.badge { font-size: 11px; font-weight: 700; background: var(--bg); color: var(--t2); padding: 3px 8px; border-radius: 7px; }
.ph-body { padding: 6px 12px 0; height: calc(100% - 44px); display: flex; flex-direction: column; font-size: 13px; line-height: 1.5; }
.ph-h { font-size: 20px; font-weight: 700; line-height: 1.36; letter-spacing: -.4px; }
.ph-sub { color: var(--t2); margin-top: 6px; }
.ph-cap { font-size: 12px; font-weight: 600; color: var(--t2); margin: 18px 0 8px; }
.ph-field { background: var(--bg); border-radius: 14px; padding: 12px; min-height: 76px; }
.ph-field.short { min-height: 48px; margin-top: 14px; }
.ph-btn { margin-top: auto; margin-bottom: 14px; height: 46px; border-radius: 14px; background: var(--p); color: #fff; font-weight: 700; font-size: 15px; display: grid; place-items: center; }

.photo { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.photo.zoom { transform: scale(1.9); transform-origin: 34% 62%; }
.card { position: relative; border-radius: 16px; overflow: hidden; background: var(--photo); display: flex; flex-direction: column; justify-content: flex-end; flex: none; }
.card.lg { height: 350px; }
.card.md { height: 300px; }
.card.xs { width: 48px; height: 48px; border-radius: 10px; }
.pg { position: absolute; top: 12px; right: 12px; background: rgba(25, 31, 40, .6); color: #fff; font-size: 11px; font-weight: 700; padding: 3px 8px; border-radius: 8px; }
.card-txt { position: relative; background: var(--t1); color: #fff; padding: 14px 16px 16px; }
.card-txt .kind { display: block; font-size: 11px; font-weight: 600; color: var(--t4); margin-bottom: 4px; }
.card-txt strong { font-size: 18px; font-weight: 700; line-height: 1.32; letter-spacing: -.3px; }
.dots { display: flex; gap: 6px; justify-content: center; margin-top: 14px; }
.dots i { width: 6px; height: 6px; border-radius: 3px; background: var(--dot); }
.dots i.on { width: 18px; background: var(--t1); }

.shots { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; margin-top: 18px; }
.shot { height: 80px; border-radius: 12px; background: var(--photo); position: relative; overflow: hidden; }
.shot em { position: absolute; left: 6px; top: 6px; background: var(--t1); color: #fff; font-style: normal; font-size: 10px; font-weight: 700; padding: 2px 6px; border-radius: 6px; }
.shot.add { background: var(--bg); color: var(--t2); font-size: 10px; font-weight: 600; display: grid; place-items: center; align-content: center; gap: 2px; }
.shot.add b { color: var(--p); font-size: 22px; font-weight: 500; line-height: 1; }

.logo-ch { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; flex: none; line-height: 1; }
.logo-ch svg { width: 20px; height: 20px; }
.ig { background: linear-gradient(45deg, #F58529, #DD2A7B, #8134AF); }
.th { background: #000; }
.fb { background: #1877F2; }

.chs { margin-top: 16px; }
.chs li { display: flex; align-items: center; gap: 12px; padding: 11px 0; border-bottom: 1px solid var(--line); }
.chs li:last-child { border-bottom: 0; }
.ch-t { flex: 1; font-size: 14px; font-weight: 600; line-height: 1.35; }
.ch-t small { display: block; font-size: 11px; font-weight: 500; color: var(--t3); }
.ck { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--dot); flex: none; position: relative; }
.ck.on { background: var(--p); border-color: var(--p); }
.ck.on::after { content: ""; position: absolute; left: 6px; top: 2px; width: 5px; height: 10px; border: solid #fff; border-width: 0 2.4px 2.4px 0; transform: rotate(45deg); }

.bars { display: grid; gap: 10px; }
.bar { display: flex; align-items: center; gap: 10px; }
.bar .logo-ch { width: 26px; height: 26px; border-radius: 8px; font-size: 12px; }
.bar .logo-ch svg { width: 16px; height: 16px; }
.track { flex: 1; height: 10px; background: var(--bg); border-radius: 4px; overflow: hidden; }
.fill { display: block; height: 100%; width: var(--w); background: var(--p); border-radius: 4px; }
.val { width: 22px; text-align: right; font-size: 13px; font-weight: 700; }
.best { display: flex; gap: 10px; align-items: center; background: var(--bg); border-radius: 14px; padding: 10px; }
.best b { display: block; font-size: 12px; line-height: 1.4; }
.best small { font-size: 11px; color: var(--t2); }

/* 첫 화면 무대 위 알림: 좁은 화면은 사진 위 가운데, 넓은 화면은 오른쪽 */
.chips { position: absolute; left: 0; right: 0; top: 150px; display: grid; gap: 8px; justify-items: center; }
.chip { display: flex; align-items: center; gap: 10px; background: var(--white); border-radius: 16px; padding: 8px 16px 8px 8px; font-size: 14px; font-weight: 600; white-space: nowrap; box-shadow: 0 0 0 1px var(--line); }
.chip .logo-ch { width: 28px; height: 28px; border-radius: 8px; font-size: 13px; }
.chip .logo-ch svg { width: 18px; height: 18px; }

/* ── 넓은 화면 ── */
@media (min-width: 720px) {
  .wrap { padding: 0 32px; }
  .reasons > div { grid-template-columns: 180px 1fr; gap: 24px; padding: 28px 0; }
  .reasons dt { padding-top: 3px; }
  .trust { grid-template-columns: repeat(3, 1fr); gap: 32px; }
  .trust li { padding: 28px 0 0; border-top: 2px solid var(--t1); }
  .trust li::before { position: static; display: block; margin-bottom: 16px; }
}
@media (min-width: 960px) {
  .hero { padding: 48px 0 32px; }
  .hero-in { grid-template-columns: 1fr 1fr; gap: 64px; }
  .stage { height: 640px; border-radius: 36px; }
  .sec { padding: 144px 0; }
  .trust-sec { padding-top: 0; }
  .steps { gap: 120px; margin-top: 72px; }
  .step { grid-template-columns: 5fr 7fr; align-items: center; gap: 64px; }
  .step:nth-child(even) { grid-template-columns: 7fr 5fr; }
  .step:nth-child(even) .step-txt { order: 2; }
  .split { grid-template-columns: 1fr 1fr; align-items: center; gap: 64px; }
  .chips { left: auto; right: 24px; top: 200px; justify-items: end; }
  .apply { padding-top: 144px; padding-bottom: 120px; }
}

/* ── 움직임: 첫 화면에서 한 번, 사진이 카드뉴스가 되어 올라간다 ── */
@keyframes rise { from { opacity: 0; transform: translateY(20px); } }
@keyframes fade { from { opacity: 0; } }
@keyframes settle { from { transform: scale(1.08); } }
@keyframes band { from { transform: translateY(100%); } }
@keyframes pop { from { opacity: 0; transform: translateY(10px) scale(.96); } }
@keyframes grow { from { width: 0; } }
@keyframes check { from { transform: scale(.4); opacity: 0; } }

.h-anim { animation: rise .8s var(--ease) both; animation-delay: var(--d, 0ms); }
.make .photo { animation: settle 1.6s var(--ease) .3s both; }
.make .card-txt { animation: band .7s var(--ease) 1s both; }
.make .pg { animation: fade .4s 1.5s both; }
.chip { animation: pop .5s var(--ease) both; animation-delay: var(--d); }

/* 스크롤하면 폰 무대만 살짝 올라온다. JS가 켜졌을 때만 숨긴다 */
.js .reveal { opacity: 0; transform: translateY(24px); transition: opacity .8s var(--ease), transform .8s var(--ease); }
.js .reveal.in { opacity: 1; transform: none; }
.js .reveal.in .fill { animation: grow 1.1s var(--ease) .4s both; }
.js .reveal.in .ck.on { animation: check .35s var(--ease) both; animation-delay: calc(.6s + var(--d, 0s)); }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
}
