/* ==========================================================================
   마브스쿨 랜딩 — 메인 스타일시트
   Figma "02 · 메인 랜딩", "03 · 상세 소개", "04 · 상담 폼 상태" 기준
   PC 1440(콘텐츠 1200) / Mobile 390. 브레이크포인트 767 / 1279.
   ========================================================================== */

/* ---------- reset ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg-base);
  color: var(--text-primary);
  font-family: var(--font-sans);
  font-size: var(--body-md-size);
  line-height: var(--body-md-lh);
  font-weight: 500;
  -webkit-font-smoothing: antialiased;
  word-break: keep-all;
  overflow-wrap: anywhere;
}
img, svg, video { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, p, figure, blockquote { margin: 0; }
ul, ol { margin: 0; padding: 0; list-style: none; }
:focus-visible { outline: 2px solid var(--accent-primary); outline-offset: 2px; border-radius: 4px; }
/* 스크린리더 알림용 프로그램 포커스 대상 — 시각적 링은 띄우지 않는다 */
[tabindex="-1"]:focus, [tabindex="-1"]:focus-visible { outline: none; }
body.is-locked { overflow: hidden; }

/* ---------- type utilities ---------- */
.t-display-xl { font-size: var(--display-xl-size); line-height: var(--display-xl-lh); letter-spacing: var(--display-xl-ls); font-weight: 700; }
.t-display-lg { font-size: var(--display-lg-size); line-height: var(--display-lg-lh); letter-spacing: var(--display-lg-ls); font-weight: 700; }
.t-display-md { font-size: var(--display-md-size); line-height: var(--display-md-lh); letter-spacing: var(--display-md-ls); font-weight: 700; }
.t-heading-lg { font-size: var(--heading-lg-size); line-height: var(--heading-lg-lh); letter-spacing: var(--heading-lg-ls); font-weight: 700; }
.t-heading-md { font-size: var(--heading-md-size); line-height: var(--heading-md-lh); letter-spacing: var(--heading-md-ls); font-weight: 600; }
.t-body-lg { font-size: var(--body-lg-size); line-height: var(--body-lg-lh); }
.t-body-md { font-size: var(--body-md-size); line-height: var(--body-md-lh); }
.t-body-sm { font-size: var(--body-sm-size); line-height: var(--body-sm-lh); }
.t-sub { color: var(--text-secondary); }
.t-mute { color: var(--text-tertiary); }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------- layout ---------- */
.container { width: 100%; max-width: var(--content-max); margin-inline: auto; }
.page { display: flex; flex-direction: column; }
.section {
  padding: var(--section-y) var(--gutter);
  position: relative;
  overflow: hidden;
}
.section--surface { background: var(--bg-surface); }
.section--tight { padding-block: var(--section-y-sm); }
.section__head {
  display: flex; flex-direction: column; align-items: center;
  gap: var(--space-4); text-align: center;
  max-width: 960px; margin-inline: auto;
}
.section__body { margin-top: var(--space-16); }

/* 배경 글로우 — Figma의 "bg glow" 레이어 */
.glow {
  position: absolute; left: 50%; translate: -50% 0;
  width: min(1600px, 130%); aspect-ratio: 16 / 7;
  background: radial-gradient(closest-side,
    rgba(61, 129, 238, 0.36) 0%,
    rgba(61, 129, 238, 0.12) 45%,
    rgba(61, 129, 238, 0) 100%);
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
}
.glow--top { top: -18%; }
.glow--center { top: 8%; }
.section > *:not(.glow):not(.hero__ripple) { position: relative; z-index: 1; }

/* ---------- header ---------- */
.header {
  position: sticky; top: 0; z-index: var(--z-header);
  height: var(--header-h);
  display: flex; align-items: center;
  padding-inline: var(--gutter);
  gap: var(--space-6);
  background: transparent;
  transition: background var(--dur) var(--ease), backdrop-filter var(--dur) var(--ease),
              border-color var(--dur) var(--ease);
  border-bottom: 1px solid transparent;
}
.header.is-stuck {
  background: rgba(0, 0, 0, 0.8);
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  border-bottom-color: var(--border-subtle);
}
.header__logo { font-size: var(--heading-md-size); font-weight: 700; letter-spacing: -0.01em; }
.header__spacer { flex: 1; }
.header__actions { display: flex; align-items: center; gap: var(--space-6); }
.header__link { color: var(--text-secondary); font-size: var(--body-md-size); }
.header__link:hover { color: var(--text-primary); }
@media (max-width: 767px) {
  .header__link { display: none; }
  .header__actions { gap: var(--space-3); }
}

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  height: var(--button-h); padding-inline: var(--space-10);
  border-radius: var(--radius-full);
  font-size: var(--btn-size); font-weight: 600; letter-spacing: -0.005em;
  white-space: nowrap;
  transition: background var(--dur-fast) var(--ease), opacity var(--dur-fast) var(--ease),
              transform var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn--primary { background: var(--accent-primary); color: var(--text-primary); }
.btn--primary:hover { background: var(--accent-hover); }
.btn--primary:active { background: var(--accent-pressed); }
.btn--secondary { background: #fff; color: var(--text-inverse); }
.btn--secondary:hover { opacity: 0.88; }
.btn--secondary:active { opacity: 0.75; }
.btn--ghost { border: 1px solid var(--border-strong); color: var(--text-primary); }
.btn--ghost:hover { background: rgba(255, 255, 255, 0.1); border-color: var(--text-primary); }
.btn--sm { height: 44px; padding-inline: var(--space-6); font-size: var(--body-md-size); }
.btn--block { width: 100%; }
.btn[disabled], .btn[aria-busy="true"] {
  background: var(--state-disabled); color: var(--text-tertiary);
  cursor: not-allowed; pointer-events: none; opacity: 1;
}
.btn--ghost[disabled] { background: none; border-color: var(--state-disabled); }

/* 제출 중 스피너 */
.spinner {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent;
  animation: spin 1s linear infinite;
}
@keyframes spin { to { rotate: 360deg; } }

/* ---------- hero ---------- */
.hero {
  display: flex; flex-direction: column; align-items: center; text-align: center;
  gap: var(--space-6);
  padding-block: 160px;
}
@media (max-width: 767px) { .hero { padding-block: 72px 80px; } }
.eyebrow {
  display: inline-flex; align-items: center;
  padding: 9px 18px; border-radius: var(--radius-full);
  background: rgba(61, 129, 238, 0.14);
  border: 1px solid rgba(61, 129, 238, 0.4);
  color: var(--accent-soft);
  font-size: var(--body-sm-size);
}
/* v1.15 — eyebrow 문구 대신 로고 배지. 헤더 로고와 동일 자산. */
.hero__badge { height: 40px; width: auto; opacity: .92; }
.hero__title { max-width: 900px; }
.hero__sub { max-width: 760px; color: var(--text-secondary); }
.hero__cta { display: flex; gap: var(--space-3); margin-top: var(--space-4); }
@media (max-width: 767px) {
  .hero__cta { flex-direction: column; width: 100%; gap: 10px; }
  .hero__cta .btn { width: 100%; }
}

/* ---------- stats ---------- */
.stats {
  /* v1.14 — space-between 이 PC 와이드 화면에서 항목을 양끝까지 밀어붙여
     좌우가 텅 비어 보였다. 가운데로 모으고 항목 사이 간격을 넉넉히 줘서
     화면이 넓어질수록 좌우 여백이 늘어나는 쪽으로 바꿨다. */
  display: flex; justify-content: center; align-items: center;
  gap: clamp(var(--space-10), 6vw, 96px);
  flex-wrap: wrap;
  padding: 72px var(--gutter);
  background: var(--bg-surface);
  border-block: 1px solid var(--border-subtle);
}
.stat { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.stat__label { color: var(--text-secondary); font-size: var(--body-md-size); }
.stat__num { font-size: var(--stat-size); line-height: var(--stat-lh); letter-spacing: -0.02em; font-weight: 700; }
@media (max-width: 767px) {
  .stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; padding: 48px var(--gutter); }
  .stat {
    padding: 20px 8px; gap: 6px;
    background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
  }
  .stat--wide { grid-column: 1 / -1; }
}

/* ---------- 에셋 플레이스홀더 ----------
   실제 소재를 넣을 때 .ph 를 <img>/<video> 로 교체한다.
   비율은 인라인 --ar 로 지정한다 (예: style="--ar: 9/16"). */
.ph {
  aspect-ratio: var(--ar, 16 / 9);
  display: grid; place-items: center; gap: 6px;
  padding: 16px; text-align: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary);
}
.ph__ratio { font-size: var(--heading-md-size); font-weight: 600; }
.ph__spec { font-size: var(--body-sm-size); opacity: 0.7; }
@media (max-width: 767px) { .ph__spec { display: none; } }

/* ---------- rail (PC 그리드 ↔ 모바일 가로 스크롤) ---------- */
.rail { display: grid; gap: var(--space-6); }
/* 스와이프 힌트는 모바일에서만. 아래 미디어쿼리보다 먼저 선언해야 덮이지 않는다. */
.rail__hint { display: none; }
.rail--4 { grid-template-columns: repeat(4, 1fr); }
.rail--3 { grid-template-columns: repeat(3, 1fr); }
.rail--2 { grid-template-columns: repeat(2, 1fr); }
.rail--5 { grid-template-columns: repeat(5, 1fr); }
@media (max-width: 767px) {
  /* 좌측 여백은 유지하고 오른쪽으로만 흘려보낸다 */
  .rail {
    display: flex; grid-template-columns: none;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1) 0;
    padding-inline: var(--gutter);
    padding-bottom: 4px;
    scrollbar-width: none;
  }
  .rail::-webkit-scrollbar { display: none; }
  .rail > * { flex: 0 0 auto; scroll-snap-align: start; }
  .rail--4 > *, .rail--5 > * { width: 190px; }
  .rail--3 > * { width: 260px; }
  .rail--2 > * { width: 300px; }
  .rail--reviews > * { width: 300px; }
  .rail__hint { display: block; margin-top: var(--space-4); color: var(--text-tertiary); font-size: var(--body-sm-size); }
}

/* ---------- cards ---------- */
.card {
  display: flex; flex-direction: column; gap: var(--space-5);
  padding: var(--space-10) 36px;
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}
@media (max-width: 767px) { .card { padding: var(--space-6) var(--space-5); gap: var(--space-4); } }
.card__icon {
  width: 56px; height: 56px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-surface); color: var(--accent-soft);
  font-size: var(--heading-lg-size);
}
@media (max-width: 767px) { .card__icon { width: 44px; height: 44px; } }
.card__desc { color: var(--text-secondary); }
/* 번호 배지 — 상세 소개 "왜 마브스쿨" 5단계 */
.step-num {
  width: 36px; height: 36px; flex: 0 0 36px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-primary); color: #fff;
  font-size: var(--body-md-size); font-weight: 600;
}
@media (max-width: 767px) {
  /* 모바일에서는 5단계를 가로 스크롤이 아니라 세로 리스트로 (Figma M-D2) */
  .rail--steps {
    display: flex; flex-direction: column; overflow: visible;
    margin-inline: 0; padding-inline: 0; scroll-snap-type: none;
  }
  .rail--steps > * {
    width: 100%; flex-direction: row; align-items: center; gap: 14px;
    padding: 18px; border-radius: var(--radius-lg);
  }
  .rail--steps .step-num { width: 30px; height: 30px; flex-basis: 30px; }
}

.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: var(--space-6); }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-6); }
@media (max-width: 767px) {
  .grid-3, .grid-2 { grid-template-columns: 1fr; gap: 12px; }
}

/* ---------- 5주 프로세스 ---------- */
.process {
  display: flex; gap: var(--space-6);
  padding: var(--space-10);
  background: var(--light-surface);
  border-radius: 28px;
  color: var(--light-text);
}
/* v1.16 — 캡션이 카드 밖(회색 배경)에 따로 떠 있던 걸, 담당 카드 안으로 넣어
   흰 카드 하나·파란 카드 하나로 "한꺼번에" 보이게 합쳤다. 그래서 .process__group
   이 [스텝 4개 행 + 캡션] 을 세로로 쌓는 컨테이너가 되고, 스텝 4개 행은
   .process__steps 로 한 겹 더 감쌌다. */
.process__group {
  flex: 1; display: flex; flex-direction: column; gap: var(--space-6);
  padding: var(--space-8) var(--space-6);
  background: var(--light-card);
  border-radius: var(--radius-xl);
}
.process__steps { display: flex; gap: 0; }
.step {
  flex: 1; display: flex; flex-direction: column; align-items: center;
  gap: 14px; padding-inline: var(--space-2); text-align: center;
}
.step__icon {
  width: 64px; height: 64px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--light-accent-surface); color: var(--accent-primary);
  font-size: var(--heading-lg-size);
}
.step__text { display: flex; flex-direction: column; gap: 2px; }
.step__title { font-size: var(--heading-md-size); font-weight: 600; }
.step__sub { font-size: var(--body-sm-size); color: var(--light-text-sub); }
.step__week {
  margin-top: auto; width: 100%; height: 40px;
  display: grid; place-items: center;
  border-radius: var(--radius-sm);
  color: #fff; font-size: var(--body-md-size); font-weight: 600;
}
.step--w1 .step__week { background: var(--accent-step-1); }
.step--w2 .step__week { background: var(--accent-step-2); }
.step--w3 .step__week { background: var(--accent-step-3); }
.step--w4 .step__week { background: var(--accent-step-4); }
.step--hi {
  flex: 0 0 232px; padding: var(--space-8) 28px;
  background: var(--accent-primary); border-radius: var(--radius-xl); color: #fff;
}
.step--hi .step__icon { background: var(--accent-pressed); color: #fff; }
.step--hi .step__sub { color: rgba(255, 255, 255, 0.85); }
.step--hi .step__week { background: var(--accent-step-5); }

/* 카드 안에 들어간 캡션 — 브라켓 라인 + 라벨 + 설명 */
.process__caption {
  text-align: center;
  display: flex; flex-direction: column; align-items: center; gap: var(--space-2);
}
.process__caption b { color: var(--accent-soft); font-size: var(--heading-md-size); }
.step--hi .process__caption b { color: #fff; }
.step--hi .process__caption p { color: rgba(255, 255, 255, 0.85); }
/* 스텝 행과 캡션을 잇는 브라켓 라인 */
.process__bracket {
  display: block; width: 100%; height: 14px; margin-bottom: var(--space-2);
  position: relative;
}
.process__bracket::before {
  content: ""; position: absolute; top: 0; left: 6px; right: 6px; height: 1px;
  background: var(--accent-primary);
}
.process__bracket::after {
  content: ""; position: absolute; top: 0; left: 50%; translate: -50% 0;
  width: 1px; height: 14px; background: var(--accent-primary);
}
.step--hi .process__bracket::before,
.step--hi .process__bracket::after { background: rgba(255, 255, 255, 0.6); }

@media (max-width: 767px) {
  .process { flex-direction: column; gap: var(--space-2); padding: var(--space-4); }
  .process__group { flex-direction: column; gap: var(--space-2); padding: 0; background: none; }
  .process__steps { flex-direction: column; gap: var(--space-2); }
  .step {
    flex-direction: row; align-items: center; text-align: left;
    gap: 14px; padding: var(--space-4); border-radius: var(--radius-lg);
    background: var(--light-card);
  }
  .step__icon { display: none; }
  .step__week {
    order: -1; margin: 0; width: 58px; height: 32px; flex: 0 0 58px;
    font-size: var(--body-sm-size);
  }
  .step__text { flex: 1; }
  /* v1.16 — 오늘 작업 범위는 PC 뿐이라, 모바일은 카드 안에 들어온 캡션이
     스텝 행(가로 배치)과 안 섞이게 세로로 쌓는 선까지만 맞춘다. */
  .step--hi {
    flex: 1 1 auto; flex-direction: column; align-items: stretch; text-align: left;
    padding: var(--space-4);
  }
  .process__caption { align-items: flex-start; text-align: left; }
  .process__bracket { display: none; }
}

/* ---------- 후기 ---------- */
.review {
  display: flex; flex-direction: column; gap: var(--space-6);
  padding: 36px var(--space-8);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
}
@media (max-width: 767px) { .review { padding: var(--space-6) var(--space-5); gap: var(--space-4); } }
.review__mark { color: var(--accent-soft); font-size: var(--display-md-size); line-height: 1; font-weight: 700; }
.review__body { font-size: var(--body-lg-size); line-height: var(--body-lg-lh); }
.review__author { display: flex; align-items: center; gap: var(--space-3); margin-top: auto; }
.review__avatar {
  width: 44px; height: 44px; flex: 0 0 44px; border-radius: 50%;
  background: var(--bg-elevated); border: 1px dashed var(--border-strong);
}
.review__meta { display: flex; flex-direction: column; gap: 2px; }

/* ---------- 강사 라인업 ---------- */
.lineup { display: flex; flex-wrap: wrap; justify-content: center; gap: var(--space-5); }
.lineup > * {
  width: 170px; aspect-ratio: 1;
  display: grid; place-items: center;
  background: var(--bg-elevated);
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  color: var(--text-tertiary); font-size: var(--body-sm-size);
}
@media (max-width: 767px) {
  .lineup { gap: 10px; }
  .lineup > * { width: calc((100% - 30px) / 4); border-radius: var(--radius-md); }
}

/* ---------- 대상 체크 리스트 ---------- */
.targets { display: grid; grid-template-columns: repeat(2, 1fr); gap: var(--space-5); }
@media (max-width: 767px) { .targets { grid-template-columns: 1fr; gap: 10px; } }
.target {
  display: flex; align-items: flex-start; gap: var(--space-4);
  padding: 28px; border-radius: var(--radius-lg);
  background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
}
@media (max-width: 767px) { .target { padding: 18px; gap: 12px; } }
.target__check {
  flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-surface); color: var(--accent-soft);
  font-size: var(--body-sm-size);
}
@media (max-width: 767px) { .target__check { flex-basis: 24px; width: 24px; height: 24px; } }

/* ---------- VS 비교 ---------- */
.vs { display: flex; align-items: flex-start; gap: var(--space-6); }
.vs__col {
  flex: 1; display: flex; flex-direction: column; gap: 10px;
  padding: 36px 28px; border-radius: var(--radius-xl);
  background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
}
.vs__col--hi { background: var(--accent-surface); border: 2px solid var(--accent-primary); }
.vs__title { text-align: center; color: var(--text-tertiary); margin-bottom: 14px; }
.vs__col--hi .vs__title { color: var(--accent-soft); }
.vs__mid { flex: 0 0 64px; text-align: center; padding-top: 120px; color: var(--text-tertiary); }
.vs__item {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 14px 16px; border-radius: 10px;
  background: var(--bg-elevated); color: var(--text-secondary);
}
.vs__col--hi .vs__item { background: var(--bg-base); color: var(--text-primary); }
.vs__num {
  flex: 0 0 26px; width: 26px; height: 26px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--state-disabled); color: #fff; font-size: var(--body-sm-size);
}
.vs__col--hi .vs__num { background: var(--accent-primary); }
@media (max-width: 767px) {
  .vs { flex-direction: column; gap: var(--space-4); }
  .vs__col { padding: var(--space-6) var(--space-4); gap: 8px; }
  .vs__mid { flex: none; padding: 0; width: 100%; }
  .vs__item { padding: 11px 12px; }
  .vs__num { flex-basis: 22px; width: 22px; height: 22px; }
}

/* ---------- 유튜브 블록 ---------- */
.yt {
  display: flex; flex-direction: column; align-items: center; gap: var(--space-6);
  padding: 56px var(--space-6); border-radius: var(--radius-xl);
  background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
}
@media (max-width: 767px) { .yt { padding: 28px 16px; gap: var(--space-4); } }
.yt__media { width: min(640px, 100%); }

/* ---------- footer ---------- */
.footer {
  padding: var(--space-16) var(--gutter);
  background: var(--bg-surface);
  border-top: 1px solid var(--border-subtle);
  display: flex; flex-direction: column; gap: var(--space-6);
}
@media (max-width: 767px) { .footer { padding: var(--space-10) var(--gutter); gap: var(--space-4); } }
.footer__logo { font-size: var(--heading-md-size); font-weight: 700; }
.footer__info { color: var(--text-tertiary); font-size: var(--body-sm-size); }
.footer__links { display: flex; gap: var(--space-5); }
.footer__links a { color: var(--text-secondary); font-size: var(--body-sm-size); }
.footer__links a:hover { color: var(--text-primary); }
.footer__copy { color: var(--text-tertiary); font-size: var(--body-sm-size); }

/* ---------- 플로팅 CTA ---------- */
.floating {
  position: fixed; right: 40px; bottom: 40px; z-index: var(--z-floating);
  height: var(--floating-h); padding-inline: var(--space-8);
  display: inline-flex; align-items: center; gap: 10px;
  border-radius: var(--radius-full);
  background: var(--accent-primary); color: #fff;
  font-size: var(--btn-size); font-weight: 600;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.45);
  opacity: 0; visibility: hidden; translate: 0 12px;
  transition: opacity var(--dur) var(--ease), translate var(--dur) var(--ease), visibility var(--dur);
}
.floating.is-visible { opacity: 1; visibility: visible; translate: 0 0; }
.floating:hover { background: var(--accent-hover); }

@media (max-width: 767px) {
  .floating {
    right: 0; left: 0; bottom: 0;
    width: 100%; height: auto;
    padding: 12px 16px calc(24px + env(safe-area-inset-bottom));
    border-radius: 0;
    background: rgba(0, 0, 0, 0.92);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    box-shadow: none;
    /* 모바일은 항상 노출 */
    opacity: 1; visibility: visible; translate: 0 0;
    justify-content: center;
  }
  .floating__label {
    width: 100%; height: 54px;
    display: grid; place-items: center;
    background: var(--accent-primary); border-radius: var(--radius-full);
    font-size: var(--btn-size);
  }
  .floating__icon { display: none; }
  /* 하단 고정 바에 가리지 않도록 본문 끝에 여백 */
  .page { padding-bottom: 88px; }
}
.floating.is-hidden { opacity: 0; visibility: hidden; }

/* ---------- 상담 폼 (PC 모달 / Mobile 바텀시트) ---------- */
.modal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; }
.modal[hidden] { display: none; }
.modal__overlay {
  position: absolute; inset: 0;
  background: var(--bg-overlay);
  backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
  animation: fade var(--dur) var(--ease);
}
@keyframes fade { from { opacity: 0; } }
.modal__panel {
  position: relative;
  width: min(640px, calc(100vw - 40px));
  max-height: calc(100dvh - 80px);
  overflow-y: auto;
  padding: var(--space-10);
  background: var(--bg-surface-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-xl);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.6);
  animation: pop var(--dur) var(--ease);
}
@keyframes pop { from { opacity: 0; translate: 0 12px; } }
@media (max-width: 767px) {
  .modal { place-items: end stretch; }
  .modal__panel {
    width: 100%; max-width: none;
    max-height: 90dvh;
    padding: 12px var(--gutter) calc(24px + env(safe-area-inset-bottom));
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    border-bottom: 0;
    animation: slideup var(--dur) var(--ease);
  }
  @keyframes slideup { from { translate: 0 100%; } }
}
.sheet-handle { display: none; }
@media (max-width: 767px) {
  .sheet-handle {
    display: block; width: 40px; height: 4px; margin: 0 auto var(--space-4);
    border-radius: var(--radius-full); background: var(--border-strong);
  }
}
.modal__head { display: flex; flex-direction: column; gap: 10px; margin-bottom: var(--space-8); }
.modal__title-row { display: flex; align-items: center; gap: var(--space-4); }
.modal__title { flex: 1; }
.modal__close {
  width: 36px; height: 36px; display: grid; place-items: center;
  color: var(--text-tertiary); font-size: var(--heading-lg-size); border-radius: 50%;
}
.modal__close:hover { color: var(--text-primary); background: var(--bg-elevated); }

/* 오류 요약 */
.alert {
  display: flex; align-items: center; gap: 10px;
  padding: 14px 16px; margin-bottom: var(--space-6);
  border-radius: 10px;
  background: rgba(255, 90, 90, 0.12);
  border: 1px solid rgba(255, 90, 90, 0.45);
  color: var(--state-error);
  font-size: var(--body-md-size);
}
.alert[hidden] { display: none; }

/* 필드 */
.fields { display: flex; flex-direction: column; gap: var(--space-5); }
@media (max-width: 767px) { .fields { gap: var(--space-4); } }
.field { display: flex; flex-direction: column; gap: 10px; }
.field__label { color: var(--text-secondary); font-size: var(--body-md-size); }
.field__req { color: var(--accent-primary); }
.field__control {
  width: 100%; height: var(--input-h);
  padding: 0 var(--space-5);
  background: var(--bg-elevated);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  color: var(--text-primary);
  font-size: var(--body-lg-size);
  transition: border-color var(--dur-fast) var(--ease), box-shadow var(--dur-fast) var(--ease);
  appearance: none;
}
textarea.field__control {
  height: auto; min-height: 132px; padding: 18px var(--space-5);
  line-height: var(--body-lg-lh); resize: vertical;
}
@media (max-width: 767px) { textarea.field__control { min-height: 104px; } }
.field__control::placeholder { color: var(--text-tertiary); }
.field__control:focus {
  outline: none;
  border-color: var(--border-focus); border-width: 2px;
  padding-inline: calc(var(--space-5) - 1px);
}
select.field__control {
  background-image: linear-gradient(45deg, transparent 50%, var(--text-secondary) 50%),
                    linear-gradient(135deg, var(--text-secondary) 50%, transparent 50%);
  background-position: calc(100% - 22px) calc(50% + 2px), calc(100% - 16px) calc(50% + 2px);
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 44px;
}
select.field__control:invalid { color: var(--text-tertiary); }
.field__error { color: var(--state-error); font-size: var(--body-sm-size); }
.field__error[hidden] { display: none; }
.field.is-invalid .field__control { border-color: var(--state-error); border-width: 2px; padding-inline: calc(var(--space-5) - 1px); }

/* 동의 체크 */
.consent { display: flex; align-items: center; gap: var(--space-3); margin-top: var(--space-6); cursor: pointer; }
.consent input { position: absolute; opacity: 0; width: 0; height: 0; }
.consent__box {
  flex: 0 0 24px; width: 24px; height: 24px; border-radius: 6px;
  display: grid; place-items: center;
  background: var(--bg-elevated); border: 1px solid var(--border-strong);
  color: #fff; font-size: var(--body-sm-size);
  transition: background var(--dur-fast) var(--ease), border-color var(--dur-fast) var(--ease);
}
.consent__box::after { content: "✓"; opacity: 0; }
.consent input:checked + .consent__box { background: var(--accent-primary); border-color: var(--accent-primary); }
.consent input:checked + .consent__box::after { opacity: 1; }
.consent input:focus-visible + .consent__box { outline: 2px solid var(--accent-primary); outline-offset: 2px; }
.consent__text { color: var(--text-secondary); font-size: var(--body-md-size); }
.consent__view { color: var(--text-tertiary); font-size: var(--body-md-size); text-decoration: underline; }
.consent.is-invalid .consent__box { border-color: var(--state-error); border-width: 2px; }
.consent.is-invalid .consent__text { color: var(--state-error); }
.consent-error { margin-top: 10px; color: var(--state-error); font-size: var(--body-sm-size); }
.consent-error[hidden] { display: none; }
.modal__submit { margin-top: var(--space-8); }

/* 제출 중 — 필드 비활성 */
.form-body.is-busy .fields, .form-body.is-busy .consent { opacity: 0.45; pointer-events: none; }

/* 완료 화면 */
.success { display: flex; flex-direction: column; align-items: center; text-align: center; gap: var(--space-5); padding: var(--space-4) 0; }
.success[hidden] { display: none; }
.success__icon {
  width: 72px; height: 72px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-surface); border: 2px solid var(--accent-primary);
  color: var(--accent-soft); font-size: var(--display-md-size);
}
@media (max-width: 767px) { .success__icon { width: 64px; height: 64px; } }
.success__cta { display: flex; gap: 10px; width: 100%; margin-top: var(--space-3); }
.success__cta .btn { flex: 1; }
@media (max-width: 767px) { .success__cta { flex-direction: column; } }

/* ---------- 진입 애니메이션 ---------- */
.reveal { opacity: 0; translate: 0 16px; }
.reveal.is-in { opacity: 1; translate: 0 0; transition: opacity var(--dur-slow) var(--ease), translate var(--dur-slow) var(--ease); }
/* 안전망 경로 — 트랜지션이 멈춘 환경에서도 즉시 보이게 한다 */
.reveal.is-shown { opacity: 1; translate: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .reveal, .reveal.is-in { opacity: 1; translate: none; transition: none; }
  .modal__panel, .modal__overlay { animation: none; }
  .spinner { animation-duration: 3s; }
}

/* ---------- 모바일 섹션 순서 재배치 ----------
   Figma "메인 랜딩 — Mobile" 순서:
   Hero → 성과 → 핵심가치 → 5주 → 광고소재 → 온드미디어 → 후기 → 강사 → CTA */
@media (max-width: 767px) {
  .page { display: flex; flex-direction: column; }
  [data-m-order] { order: var(--m-order); }
}

/* ---------- 개발용 주석 배지 (배포 전 제거) ----------
   Figma의 노란 [제안] 주석과 대응. body에 .show-notes 를 붙이면 보인다. */
.note { display: none; }
.show-notes .note {
  display: block;
  margin: var(--space-4) auto; max-width: 760px;
  padding: 14px 16px; border-radius: 10px;
  background: rgba(255, 214, 74, 0.1);
  border: 1px dashed #ffd64a;
  color: var(--text-secondary);
  font-size: var(--body-sm-size); text-align: left;
}
.show-notes .note b { color: #ffd64a; display: block; margin-bottom: 4px; }

/* ==========================================================================
   목업용 플레이스홀더 비주얼
   실제 소재 수급 전 목업 검토용. .ph / .lineup 아이템에 추상 그라디언트를 깔아
   레이아웃 리듬이 보이게 한다. 실제 이미지로 교체할 때 이 블록만 지우면 된다.
   ========================================================================== */
.ph, .lineup > *, .review__avatar {
  border-style: solid;
  border-color: var(--border-subtle);
  background-color: var(--bg-elevated);
  background-repeat: no-repeat;
  position: relative;
  overflow: hidden;
}
.ph::before, .lineup > *::before, .review__avatar::before {
  content: "";
  position: absolute; inset: 0;
  background:
    radial-gradient(120% 90% at 22% 12%, rgba(61,129,238,0.42), transparent 60%),
    radial-gradient(110% 80% at 82% 88%, rgba(115,169,255,0.26), transparent 62%),
    linear-gradient(150deg, #1f2937 0%, #141a24 55%, #0d1117 100%);
  opacity: 0.95;
}
.ph > *, .lineup > * > * { position: relative; z-index: 1; }

/* 카드마다 색조를 돌려 같은 그림이 반복돼 보이지 않게 한다 */
.ph:nth-child(3n+2)::before, .lineup > *:nth-child(3n+2)::before {
  background:
    radial-gradient(120% 90% at 78% 18%, rgba(159,122,234,0.34), transparent 60%),
    radial-gradient(110% 80% at 18% 82%, rgba(61,129,238,0.24), transparent 62%),
    linear-gradient(150deg, #232030 0%, #17141f 55%, #0f0d15 100%);
}
.ph:nth-child(3n+3)::before, .lineup > *:nth-child(3n+3)::before {
  background:
    radial-gradient(120% 90% at 30% 82%, rgba(45,212,191,0.28), transparent 60%),
    radial-gradient(110% 80% at 76% 16%, rgba(61,129,238,0.22), transparent 62%),
    linear-gradient(150deg, #16262a 0%, #101b1e 55%, #0b1214 100%);
}
.ph:nth-child(4n+4)::before, .lineup > *:nth-child(4n+4)::before {
  background:
    radial-gradient(120% 90% at 50% 10%, rgba(251,146,60,0.24), transparent 58%),
    radial-gradient(110% 80% at 20% 90%, rgba(61,129,238,0.22), transparent 62%),
    linear-gradient(150deg, #2a2118 0%, #1b1611 55%, #110e0a 100%);
}

/* 강사 프로필은 인물 실루엣을 암시 */
.lineup > *::after, .review__avatar::after {
  content: "";
  position: absolute; z-index: 1;
  left: 50%; translate: -50% 0; bottom: -18%;
  width: 62%; aspect-ratio: 1 / 1.15;
  border-radius: 50% 50% 42% 42% / 60% 60% 40% 40%;
  background: rgba(255,255,255,0.16);
  box-shadow: 0 -0.9em 0 -0.32em rgba(255,255,255,0.16);
}
.lineup > * { color: transparent; font-size: 0 !important; }

/* 광고·썸네일 자리에는 재생 아이콘 힌트 */
.ph .ph__ratio {
  display: grid; place-items: center;
  width: 44px; height: 44px; border-radius: 50%;
  background: rgba(0,0,0,0.42);
  border: 1px solid rgba(255,255,255,0.28);
  color: rgba(255,255,255,0.92);
  font-size: 12px; font-weight: 600; letter-spacing: 0;
}
.ph .ph__spec { color: rgba(255,255,255,0.62); }

/* ==========================================================================
   2026-08-19 메인 수정분
   ========================================================================== */

/* eyebrow 아웃라인 제거 */
.eyebrow { border: 0; }

/* 아이콘 */
.ico { width: 26px; height: 26px; stroke: currentColor; fill: none;
  stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.step__icon .ico { width: 28px; height: 28px; }
@media (max-width: 767px) { .ico { width: 22px; height: 22px; } }

/* 5주차 카드 — 글래스모피즘 + 스윕 하이라이트 */
.step--hi {
  position: relative; overflow: hidden; isolation: isolate;
  background:
    linear-gradient(150deg, rgba(255,255,255,.20) 0%, rgba(255,255,255,.05) 42%, rgba(255,255,255,0) 70%),
    linear-gradient(150deg, #1d4ea8 0%, #14356f 55%, #0d2148 100%);
  backdrop-filter: blur(14px) saturate(1.3);
  -webkit-backdrop-filter: blur(14px) saturate(1.3);
  border: 1px solid rgba(255,255,255,.30);
  box-shadow:
    inset 0 1px 0 rgba(255,255,255,.40),
    inset 0 -1px 0 rgba(255,255,255,.10),
    0 6px 18px -8px rgba(0,0,0,.55);
}
/* 표면을 훑고 지나가는 광택 */
.step--hi::after {
  content: ""; position: absolute; inset: -40% -60%; z-index: -1;
  background: linear-gradient(105deg,
    transparent 44%, rgba(255,255,255,.22) 48.5%, rgba(255,255,255,.98) 50%,
    rgba(255,255,255,.22) 51.5%, transparent 56%);
  transform: translateX(-120%);
}
@media (prefers-reduced-motion: no-preference) {
  .step--hi { animation: stepGlow 3.2s var(--ease) infinite; }
  .step--hi::after { animation: stepSheen 3s linear infinite; }
  @keyframes stepGlow {
    0%,100% { box-shadow: inset 0 1px 0 rgba(255,255,255,.34), inset 0 -1px 0 rgba(255,255,255,.08),
                          0 6px 16px -8px rgba(0,0,0,.5); }
    50%     { box-shadow: inset 0 1px 0 rgba(255,255,255,.52), inset 0 -1px 0 rgba(255,255,255,.14),
                          0 8px 22px -8px rgba(0,0,0,.6); }
  }
  @keyframes stepSheen {
    0%, 18% { transform: translateX(-120%); }
    78%,100% { transform: translateX(120%); }
  }
}

/* 히어로 퍼지는 애니메이션 */
.hero__ripple {
  position: absolute; left: 50%; top: 40%; translate: -50% -50%;
  width: min(820px, 96vw); aspect-ratio: 1; pointer-events: none; z-index: 0;
}
.hero__ripple span {
  position: absolute; inset: 0; border-radius: 50%;
  /* 테두리 대신 링 그라디언트 — 바깥으로 완전히 사라져 동심원 윤곽이 안 보인다 */
  background: radial-gradient(circle,
    rgba(61,129,238,0) 44%,
    rgba(115,169,255,.22) 56%,
    rgba(61,129,238,.10) 66%,
    rgba(61,129,238,0) 78%);
  -webkit-mask-image: radial-gradient(circle, #000 45%, rgba(0,0,0,.35) 68%, transparent 82%);
          mask-image: radial-gradient(circle, #000 45%, rgba(0,0,0,.35) 68%, transparent 82%);
  filter: blur(6px);
  opacity: 0;
}
@media (prefers-reduced-motion: no-preference) {
  .hero__ripple span { animation: ripple 7.7s var(--ease) infinite; }
  .hero__ripple span:nth-child(2) { animation-delay: 2.57s; }
  .hero__ripple span:nth-child(3) { animation-delay: 5.14s; }
  @keyframes ripple {
    0%   { scale: .30; opacity: 0; }
    14%  { opacity: .9; }
    70%  { opacity: .2; }
    100% { scale: 1.30; opacity: 0; }
  }
}

/* 실제 이미지 */
.media { display: block; width: 100%; height: 100%; object-fit: cover; }
.frame {
  border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
}
.frame--1x1 { aspect-ratio: 1; }
.frame--16x9 { aspect-ratio: 16/9; }
.frame--auto { aspect-ratio: auto; }
.media--auto { height: auto; }
.lineup > .frame { width: 170px; border-style: solid; display: block; }
.lineup > .frame::before, .lineup > .frame::after { content: none; }
@media (max-width: 767px) { .lineup > .frame { width: calc((100% - 30px)/4); } }

/* 인라인 신청 폼 */
.quick {
  width: min(720px, 100%); padding: var(--space-8);
  border-radius: var(--radius-xl); background: #0c0c0e;
  border: 1px solid var(--border-subtle);
  box-shadow: 0 24px 60px -20px rgba(0,0,0,.9);
  text-align: left;
}
@media (max-width: 767px) { .quick { padding: var(--space-5); } }
.quick__title {
  display: flex; align-items: center; gap: 8px; margin-bottom: var(--space-5);
  font-size: var(--heading-lg-size); font-weight: 700;
}
.quick__row { display: flex; gap: 12px; align-items: stretch; }
.quick__fields { flex: 1; display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.quick__input {
  width: 100%; height: 56px; padding: 0 20px;
  border: 2px solid transparent; border-radius: 14px;
  background: #fff; color: #111; font-size: var(--body-lg-size);
}
.quick__input::placeholder { color: #9aa0a6; }
.quick__input:focus { outline: none; border-color: var(--accent-primary); }
.quick__input.is-invalid { border-color: var(--state-error); }
.quick__submit {
  flex: 0 0 132px; border-radius: 14px;
  background: linear-gradient(140deg, var(--accent-soft) 0%, var(--accent-primary) 55%, var(--accent-pressed) 100%);
  color: #fff; font-size: var(--btn-size); font-weight: 700;
  display: grid; place-items: center; gap: 6px;
  transition: filter var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.quick__submit:hover { filter: brightness(1.08); }
.quick__submit:active { transform: translateY(1px); }
.quick__submit[disabled] { filter: grayscale(.55) brightness(.75); cursor: not-allowed; }
.quick__consent {
  display: flex; align-items: center; gap: 8px; margin-top: 14px;
  color: var(--text-tertiary); font-size: var(--body-sm-size);
}
.quick__consent input { width: 16px; height: 16px; accent-color: var(--accent-primary); flex: none; }
.quick__consent a { color: var(--text-secondary); text-decoration: underline; }
.quick__consent.is-invalid { color: var(--state-error); }
.quick__error { margin-top: 10px; color: var(--state-error); font-size: var(--body-sm-size); }
.quick__error[hidden] { display: none; }
.quick__done { display: flex; align-items: center; gap: 14px; padding: var(--space-3) 0; }
.quick__done[hidden] { display: none; }
.quick__done .success__icon { width: 48px; height: 48px; flex: 0 0 48px; font-size: var(--heading-lg-size); }
@media (max-width: 767px) {
  .quick__row { flex-direction: column; }
  .quick__submit { flex: none; height: 54px; width: 100%; }
}

/* 숫자 카운트업 */
.stat__num { font-variant-numeric: tabular-nums; }

/* ==========================================================================
   v1.2 — 플로팅 신청 폼 (스크롤 내내 고정 노출)
   ========================================================================== */
.dock {
  position: fixed; z-index: var(--z-floating);
  left: 50%; translate: -50% 0; bottom: 24px; width: min(560px, calc(100vw - 48px));
  padding: 18px 20px 16px;
  border-radius: 20px;
  background: rgba(10,10,12,.82);
  backdrop-filter: blur(18px) saturate(1.2);
  -webkit-backdrop-filter: blur(18px) saturate(1.2);
  border: 1px solid rgba(255,255,255,.14);
  box-shadow: 0 20px 56px -14px rgba(0,0,0,.85), 0 0 0 1px rgba(0,0,0,.4);
}
.dock__title { display: block; margin-bottom: 12px; font-size: var(--body-md-size); font-weight: 700; }
.dock__row { display: flex; gap: 8px; }
.dock__input {
  flex: 1; min-width: 0; height: 46px; padding: 0 14px;
  border: 2px solid transparent; border-radius: 12px;
  background: #fff; color: #111; font-size: var(--body-md-size);
}
.dock__input::placeholder { color: #9aa0a6; }
.dock__input:focus { outline: none; border-color: var(--accent-primary); }
.dock__input.is-invalid { border-color: var(--state-error); }
.dock__submit {
  flex: 0 0 76px; height: 46px; border-radius: 12px;
  background: linear-gradient(140deg, var(--accent-soft) 0%, var(--accent-primary) 55%, var(--accent-pressed) 100%);
  color: #fff; font-size: var(--body-md-size); font-weight: 700;
  transition: filter var(--dur-fast) var(--ease);
}
.dock__submit:hover { filter: brightness(1.1); }
.dock__submit[disabled] { filter: grayscale(.55) brightness(.75); cursor: not-allowed; }
.dock__notice { margin-top: 9px; color: var(--text-tertiary); font-size: 12px; line-height: 1.5; }
.dock__notice a { color: var(--text-secondary); text-decoration: underline; }
.dock__error { margin-top: 8px; color: var(--state-error); font-size: 12px; }
.dock__error[hidden] { display: none; }
.dock__done { display: flex; align-items: center; gap: 10px; font-size: var(--body-sm-size); line-height: 1.5; }
.dock__done[hidden] { display: none; }
.dock__doneIcon {
  flex: 0 0 30px; width: 30px; height: 30px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent-surface); border: 1.5px solid var(--accent-primary); color: var(--accent-soft);
}
.dock.is-done .dock__inner { display: none; }

@media (max-width: 767px) {
  .dock {
    right: 0; left: 0; bottom: 0; width: auto;
    translate: none;                 /* PC 중앙정렬용 translate 해제 */
    padding: 12px 16px calc(10px + env(safe-area-inset-bottom));
    border-radius: 18px 18px 0 0;
    border-left: 0; border-right: 0; border-bottom: 0;
  }
  .dock__title { display: block; margin-bottom: 8px; font-size: var(--body-sm-size); }
  .dock__input { height: 44px; font-size: var(--body-sm-size); padding: 0 12px; }
  .dock__submit { flex: 0 0 64px; height: 44px; font-size: var(--body-sm-size); }
  .dock__notice { margin-top: 7px; font-size: 11px; }
  /* 하단 고정 폼에 가리지 않도록 본문 여백 */
  .page { padding-bottom: 150px; }
}

/* 인라인 폼 고지 문구 */
.quick__notice { margin-top: 14px; color: var(--text-tertiary); font-size: var(--body-sm-size); }
.quick__notice a { color: var(--text-secondary); text-decoration: underline; }

/* ==========================================================================
   v1.3
   ========================================================================== */

/* 로고 */
.header__logo img { height: 34px; width: auto; }
.footer__logo img { height: 38px; width: auto; }
@media (max-width: 767px) { .header__logo img { height: 26px; } }

/* 후기 아바타 = 실제 강사 사진 */
.review__avatar { object-fit: cover; border: 0; }
.review__avatar::before, .review__avatar::after { content: none; }

/* 강사 라인업 — 무한 마퀴 */
.marquee {
  position: relative; overflow: hidden;
  margin-inline: calc(var(--gutter) * -1);
  -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: 20px; width: max-content; }
.marquee__item { flex: 0 0 auto; width: 170px; }
.marquee__item img {
  display: block; width: 100%; aspect-ratio: 220 / 274; object-fit: cover;
  border-radius: var(--radius-lg); background: var(--bg-elevated);
}
@media (prefers-reduced-motion: no-preference) {
  .marquee__track { animation: marquee 42s linear infinite; }
  .marquee:hover .marquee__track { animation-play-state: paused; }
  @keyframes marquee { to { transform: translateX(calc(-50% - 10px)); } }
}
@media (max-width: 767px) {
  .marquee__track { gap: 14px; }
  .marquee__item { width: 170px; }
  @keyframes marquee { to { transform: translateX(calc(-50% - 7px)); } }
}

/* ── 모바일: 가로 스크롤 영역 여백을 넉넉하게 ── */
@media (max-width: 767px) {
  :root { --gutter: 24px; }
  .rail { gap: 16px; padding-bottom: 6px; }
  /* 다음 카드가 살짝 보이도록 폭을 줄여 숨통을 틔운다 */
  .rail--4 > *, .rail--5 > * { width: 168px; }
  .rail--3 > * { width: 250px; }
  .rail--2 > * { width: 280px; }
  .rail--reviews > * { width: 286px; }
  .review { padding: var(--space-6) 20px; gap: var(--space-4); }
  .section__head { padding-inline: 4px; }
}

/* 8. 모바일 완료 화면 버튼 높이 확보 */
@media (max-width: 767px) {
  .success { gap: var(--space-4); }
  .success__cta { gap: 12px; }
  .success__cta .btn,
  .modal__panel .btn { height: 56px; min-height: 56px; flex: 0 0 56px; }
}

/* ==========================================================================
   v1.4 — 상세 소개(피트페이퍼 시안 기반) 전용
   ========================================================================== */
.eyebrow-line { color: var(--accent-soft); font-weight: 700; margin-bottom: 10px; }

/* 좌우 정렬 지표 행 (시안 16~20을 한 섹션으로 압축) */
.metrics { display: flex; flex-direction: column; gap: 10px; }
.metric {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 20px 22px; border-radius: var(--radius-lg);
  background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
}
.metric__label { color: var(--text-secondary); font-size: var(--body-md-size); }
.metric__value {
  flex: none; font-size: var(--display-md-size); font-weight: 700;
  letter-spacing: -.02em; font-variant-numeric: tabular-nums;
}
.metric--hi { background: var(--accent-surface); border-color: var(--accent-primary); }
.metric--hi .metric__value { color: var(--accent-soft); }
.metric__note { display: block; margin-top: 4px; color: var(--text-tertiary); font-size: var(--body-sm-size); }

/* 퍼널 (시안 26) */
.funnel { display: flex; flex-direction: column; gap: 8px; }
.funnel__row {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  padding: 16px 20px; border-radius: var(--radius-md);
  background: var(--bg-elevated);
}
.funnel__row span:last-child { font-weight: 700; }

/* 단계 (시안 21) */
.steps-line { display: flex; flex-direction: column; gap: 12px; }
.steps-line li {
  display: flex; align-items: center; gap: 14px;
  padding: 18px 20px; border-radius: var(--radius-lg);
  background: var(--bg-surface-alt); border: 1px solid var(--border-subtle);
}
.steps-line .step-num { flex: 0 0 34px; width: 34px; height: 34px; }

/* 혼자 VS 함께 (시안 7) — 두 열 나란히, 모바일에서도 유지 */
.duo { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; align-items: start; }
.duo__col { padding: 20px 14px; border-radius: var(--radius-lg); background: var(--bg-surface-alt); border: 1px solid var(--border-subtle); }
.duo__col--hi { background: var(--accent-surface); border-color: var(--accent-primary); }
.duo__title { text-align: center; margin-bottom: 14px; font-weight: 700; }
.duo__col--hi .duo__title { color: var(--accent-soft); }
.duo ol { display: flex; flex-direction: column; gap: 7px; counter-reset: d; }
.duo li {
  display: flex; gap: 8px; align-items: baseline;
  padding: 10px 12px; border-radius: 9px; background: var(--bg-base);
  font-size: var(--body-sm-size); line-height: 1.4;
}
.duo li::before {
  counter-increment: d; content: counter(d);
  flex: none; width: 18px; height: 18px; border-radius: 50%;
  display: grid; place-items: center; font-size: 11px; font-weight: 700;
  background: var(--state-disabled); color: #fff;
}
.duo__col--hi li::before { background: var(--accent-primary); }

/* 상세 페이지는 모바일 전용 — PC 폭에서도 모바일 레이아웃을 유지한다 */
.mobile-doc { max-width: 480px; margin-inline: auto; }

/* ==========================================================================
   v1.5 — 상세 페이지 인터랙션
   ========================================================================== */

/* 리스트/카드 순차 등장 */
/* 컨테이너가 아직 화면에 안 들어왔을 때만 숨긴다.
   is-in/is-shown 이 붙으면 이 규칙 자체가 매칭에서 빠지므로
   자식의 .reveal 상태와 특정도로 다툴 일이 없다. */
.stagger:not(.is-in):not(.is-shown) > * { opacity: 0; translate: 0 14px; }
.stagger.is-in > * {
  opacity: 1; translate: 0 0;
  transition: opacity .45s var(--ease), translate .45s var(--ease);
  transition-delay: calc(var(--i, 0) * 70ms);
}
.stagger.is-shown > * { opacity: 1; translate: none; transition: none; }
@media (prefers-reduced-motion: reduce) {
  .stagger > *, .stagger.is-in > *, .stagger.is-shown > * { opacity: 1; translate: none; transition: none; }
}

/* duo 리스트는 조금 더 촘촘하게 */
.duo ol.stagger.is-in > * { transition-delay: calc(var(--i, 0) * 45ms); }

/* 퍼널 — 값에 비례해 차오르는 배경 */
.funnel__row { position: relative; overflow: hidden; isolation: isolate; }
.funnel__row::before {
  content: ""; position: absolute; inset: 0 auto 0 0; z-index: -1;
  width: 0; border-radius: inherit;
  background: linear-gradient(90deg, rgba(61,129,238,.42), rgba(61,129,238,.14));
  transition: width 1.1s var(--ease);
  transition-delay: calc(var(--i, 0) * 120ms);
}
.funnel.is-in .funnel__row::before, .funnel.is-shown .funnel__row::before { width: var(--fill, 0%); }
@media (prefers-reduced-motion: reduce) { .funnel__row::before { transition: none; } }

/* 퍼널 결과 카드 */

/* 지표 값 카운트업 */
.metric__value { font-variant-numeric: tabular-nums; }

/* 단계 카드 — 진입 시 번호가 튀어오른다 */
.steps-line.is-in .step-num, .steps-line.is-shown .step-num {
  animation: numPop .5s var(--ease) calc(var(--i, 0) * 120ms);
}
@keyframes numPop { 0% { scale: .55; } 60% { scale: 1.12; } 100% { scale: 1; } }
@media (prefers-reduced-motion: reduce) { .steps-line .step-num { animation: none !important; } }

/* duo 강조 열 — 진입 시 은은한 테두리 펄스 */
@media (prefers-reduced-motion: no-preference) {
  .duo.is-in .duo__col--hi, .duo.is-shown .duo__col--hi {
    animation: hiPulse 2.6s var(--ease) 2;
  }
  @keyframes hiPulse {
    0%,100% { box-shadow: 0 0 0 0 rgba(61,129,238,0); }
    50%     { box-shadow: 0 0 0 6px rgba(61,129,238,.12); }
  }
}

/* ---------- 숏폼 갤러리 ---------- */
.shorts { display: grid; gap: var(--space-4); }
.short {
  position: relative; display: block; width: 100%;
  aspect-ratio: 9 / 16; border-radius: var(--radius-lg); overflow: hidden;
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  cursor: pointer;
}
.short img, .short video {
  position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover;
}
.short video { opacity: 0; transition: opacity .4s var(--ease); }
.short.is-playing video { opacity: 1; }
.short__play {
  position: absolute; left: 50%; bottom: 12px; translate: -50% 0;
  display: inline-flex; align-items: center; gap: 6px;
  padding: 7px 12px; border-radius: 999px;
  background: rgba(0,0,0,.62); backdrop-filter: blur(6px);
  color: #fff; font-size: 12px; font-weight: 600;
  transition: opacity .3s var(--ease);
}
.short.is-playing .short__play { opacity: 0; }
.short__name {
  position: absolute; left: 10px; top: 10px;
  padding: 5px 10px; border-radius: 999px;
  background: rgba(0,0,0,.55); color: #fff; font-size: 11px; font-weight: 600;
}

/* 숏폼 전체 재생 모달 */
.vmodal { position: fixed; inset: 0; z-index: var(--z-modal); display: grid; place-items: center; }
.vmodal[hidden] { display: none; }
.vmodal__overlay { position: absolute; inset: 0; background: rgba(0,0,0,.88); }
.vmodal__box { position: relative; width: min(420px, calc(100vw - 32px)); }
.vmodal__box video {
  width: 100%; aspect-ratio: 9/16; object-fit: contain;
  border-radius: var(--radius-lg); background: #000;
}
.vmodal__close {
  position: absolute; right: 0; top: -46px;
  width: 38px; height: 38px; border-radius: 50%;
  background: rgba(255,255,255,.14); color: #fff; font-size: 18px;
}

/* 숏폼 갤러리 배치 — PC 4열, 모바일 가로 스크롤 */
.shorts--rail { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 767px) {
  .shorts--rail {
    display: flex; grid-template-columns: none;
    gap: 12px; overflow-x: auto; overscroll-behavior-x: contain;
    scroll-snap-type: x mandatory;
    margin-inline: calc(var(--gutter) * -1) 0;
    padding-inline: var(--gutter); padding-bottom: 6px;
    scrollbar-width: none;
  }
  .shorts--rail::-webkit-scrollbar { display: none; }
  .shorts--rail > * { flex: 0 0 auto; width: 168px; scroll-snap-align: start; }
}
/* 상세 페이지는 모바일 문서라 항상 가로 스크롤 */
html.doc-mobile .shorts--rail {
  display: flex; grid-template-columns: none;
  gap: 12px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin-inline: calc(var(--gutter) * -1) 0;
  padding-inline: var(--gutter); padding-bottom: 6px; scrollbar-width: none;
}
html.doc-mobile .shorts--rail::-webkit-scrollbar { display: none; }
html.doc-mobile .shorts--rail > * { flex: 0 0 auto; width: 168px; scroll-snap-align: start; }

/* ==========================================================================
   v1.6 — 상세 페이지 형광 파랑 (Figma 시안 11·26 기준)
   ========================================================================== */

/* 마브스쿨 강조 열 — 시안 11의 시안→블루 그라디언트 */
.duo__col--hi { background: var(--neon-surface); border-color: var(--neon-3); }
.duo__col--hi .duo__title { color: var(--neon-1); }
.duo__col--hi li {
  background: var(--neon-grad);
  color: #06121f; font-weight: 700;
  box-shadow: 0 2px 10px -4px rgba(2,148,253,.55);
}
.duo__col--hi li::before { background: rgba(255,255,255,.85); color: #0367FD; }

/* 지표 강조 카드 */
.metric--hi {
  background: var(--neon-surface);
  border-color: var(--neon-3);
  box-shadow: 0 0 0 1px rgba(2,148,253,.25), 0 10px 30px -14px rgba(2,148,253,.6);
}
.metric--hi .metric__value {
  background: var(--neon-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metric--hi .metric__label { color: #fff; }

/* 퍼널 — 시안 26 톤 */
.funnel__row { background: var(--neon-surface); }
.funnel__row span:last-child { color: var(--neon-2); }
.funnel__row::before {
  background: linear-gradient(90deg, rgba(53,248,255,.30), rgba(3,103,253,.12));
}
/* 지표 카드 순차 등장을 확실히 보이게 (간격 확대) */
.metrics.is-in > * { transition-delay: calc(var(--i, 0) * 130ms); }

/* ==========================================================================
   v1.8
   ========================================================================== */

/* 1. 가로 스크롤 영역 — 가로는 자기가 먹고, 세로는 페이지로 넘긴다.
   v1.8 에서 touch-action:pan-x 를 줬더니 썸네일 위에서 세로 스와이프가
   통째로 막혔다(스크롤이 안 내려감). pan-x pan-y 로 두 축을 모두 허용하면
   브라우저가 제스처 방향을 보고 축을 잡아주므로 가로 캐러셀은 그대로 동작한다.
   세로 체이닝을 막지 않도록 overscroll-behavior 도 x 축에만 건다. */
.rail, .shorts--rail, html.doc-mobile .shorts--rail, .marquee {
  overflow-y: hidden;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: auto;
  touch-action: pan-x pan-y;
}

/* 6. 카드 아이콘 + 타이틀 한 줄 */
.card__head { display: flex; align-items: center; gap: 14px; }
.card__head .card__icon { flex: none; }
.card__head h3 { margin: 0; }

@media (prefers-reduced-motion: no-preference) {
    @keyframes spinBorder { to { --angle: 360deg; } }
}
/* @property 미지원 브라우저 대비 — 정지된 코닉 보더로 폴백 */

/* 5. 상세 페이지 — 모바일에서도 홈 링크 노출 */
.header__link--always { display: inline-flex !important; align-items: center; }
@media (max-width: 767px) {
  .header__link--always { font-size: var(--body-sm-size); color: var(--text-secondary); }
}

/* ==========================================================================
   법무 문서 페이지 (약관 / 개인정보처리방침)
   ========================================================================== */
.legal { max-width: 760px; margin-inline: auto; padding: var(--space-16) var(--gutter) 120px; }
.legal h1 { font-size: var(--display-lg-size); line-height: 1.35; letter-spacing: -.015em; font-weight: 700; }
.legal .legal__meta { margin-top: var(--space-3); color: var(--text-tertiary); font-size: var(--body-sm-size); }
.legal h2 {
  margin: var(--space-12) 0 var(--space-4);
  font-size: var(--heading-lg-size); font-weight: 700;
  padding-top: var(--space-6); border-top: 1px solid var(--border-subtle);
}
.legal h3 { margin: var(--space-6) 0 var(--space-2); font-size: var(--heading-md-size); font-weight: 600; }
.legal p, .legal li { color: var(--text-secondary); font-size: var(--body-md-size); line-height: 1.8; }
.legal p { margin-bottom: var(--space-3); }
.legal ul, .legal ol { margin: 0 0 var(--space-4); padding-left: 1.2em; }
.legal ul li { list-style: disc; margin-bottom: 6px; }
.legal ol li { list-style: decimal; margin-bottom: 6px; }
.legal strong { color: var(--text-primary); }
.legal a { color: var(--accent-soft); text-decoration: underline; }
.legal table {
  width: 100%; border-collapse: collapse; margin: var(--space-4) 0 var(--space-6);
  font-size: var(--body-sm-size);
}
.legal th, .legal td {
  border: 1px solid var(--border-subtle); padding: 12px 14px;
  text-align: left; vertical-align: top; color: var(--text-secondary);
}
.legal th { background: var(--bg-surface-alt); color: var(--text-primary); font-weight: 600; white-space: nowrap; }
.legal__note {
  margin: var(--space-6) 0; padding: 16px 18px; border-radius: var(--radius-md);
  background: var(--accent-surface); border: 1px solid var(--accent-primary);
  color: var(--text-secondary); font-size: var(--body-sm-size); line-height: 1.7;
}
.legal__back { display: inline-block; margin-bottom: var(--space-8); color: var(--text-secondary); font-size: var(--body-md-size); }
.legal__back:hover { color: var(--text-primary); }
@media (max-width: 767px) {
  .legal { padding: var(--space-12) var(--gutter) 140px; }
  .legal table, .legal thead, .legal tbody, .legal tr, .legal th, .legal td { display: block; }
  .legal th { border-bottom: 0; }
  .legal td { border-top: 0; }
}

/* ==========================================================================
   누적 매출 카드 — 흐르는 코닉 그라디언트 보더
   @property 대신 회전하는 유사요소를 쓴다. 브라우저 지원 폭이 넓고
   애니메이션이 확실히 동작한다.
   ========================================================================== */
.funnel__result {
  position: relative;
  isolation: isolate;
  margin-top: var(--space-3);
  padding: calc(var(--space-6) + 2px) var(--space-5);
  border: 0;
  border-radius: var(--radius-lg);
  background: transparent;
  text-align: center;
  overflow: hidden;
  box-shadow: 0 16px 44px -18px rgba(2,148,253,.75);
}
/* 회전하는 그라디언트 (테두리 재료) */
.funnel__result::before {
  content: ""; position: absolute; z-index: -2;
  /* 회전해도 네 모서리를 항상 덮도록 카드 폭 기준 정사각으로 만든다.
     inset 으로 잡으면 가로로 긴 카드에서 좌우가 비어 보인다. */
  top: 50%; left: 50%; translate: -50% -50%;
  width: 220%; aspect-ratio: 1;
  background: conic-gradient(
    #35F8FF 0deg, #19C1FE 60deg, #0294FD 130deg,
    #0367FD 200deg, #7C3AED 280deg, #35F8FF 360deg);
}
/* 안쪽을 덮어 2px 테두리만 남긴다 */
.funnel__result::after {
  content: ""; position: absolute; z-index: -1;
  inset: 2px;
  border-radius: calc(var(--radius-lg) - 2px);
  background:
    radial-gradient(120% 90% at 50% 130%, rgba(2,148,253,.35), transparent 70%),
    var(--neon-surface);
}
.funnel__result span { color: var(--text-secondary); }
.funnel__result b {
  display: block; margin-top: 6px;
  font-size: calc(var(--display-lg-size) * 1.25);
  letter-spacing: -.03em;
  background: var(--neon-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
@media (prefers-reduced-motion: no-preference) {
  .funnel__result::before { animation: spinBorder 6s linear infinite; }
  @keyframes spinBorder { to { rotate: 360deg; } }
}

/* ==========================================================================
   유튜브 바로가기 카드
   ========================================================================== */
.ytlinks { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-top: var(--space-8); }
@media (max-width: 767px) { .ytlinks { grid-template-columns: 1fr; } }
html.doc-mobile .ytlinks { grid-template-columns: 1fr 1fr; }

.ytlink {
  position: relative; display: block; overflow: hidden;
  border-radius: var(--radius-lg);
  background: var(--bg-elevated); border: 1px solid var(--border-subtle);
  transition: border-color var(--dur-fast) var(--ease), transform var(--dur-fast) var(--ease);
}
.ytlink:hover { border-color: var(--neon-3); transform: translateY(-2px); }
.ytlink img { display: block; width: 100%; height: auto; aspect-ratio: 16/9; object-fit: cover; }
.ytlink__play {
  position: absolute; left: 50%; top: 50%; translate: -50% -50%;
  width: 46px; height: 46px; border-radius: 50%;
  display: grid; place-items: center;
  background: rgba(0,0,0,.62); backdrop-filter: blur(6px);
  border: 1px solid rgba(255,255,255,.34);
  color: #fff; font-size: 15px; padding-left: 3px;
}
.ytlink__label {
  position: absolute; left: 0; right: 0; bottom: 0;
  padding: 22px 12px 10px;
  background: linear-gradient(transparent, rgba(0,0,0,.82));
  color: #fff; font-size: var(--body-sm-size); font-weight: 600; text-align: center;
}
.yt__media.ytlink { width: min(640px, 100%); }

/* ==========================================================================
   v1.10 — 지표 카드 포커스가 스크롤을 따라 내려온다
   .metric--hi 는 초기 상태(첫 카드)일 뿐이고, 화면 중앙에 걸린 카드에
   main.js 가 .is-focus 를 옮겨 붙인다. JS 가 안 돌면 첫 카드 강조가 유지된다.
   ========================================================================== */
.metrics.js-focus .metric {
  transition: background .35s ease, border-color .35s ease,
              box-shadow .35s ease, scale .35s ease;
}
.metrics.js-focus .metric--hi:not(.is-focus) {
  background: var(--bg-surface-alt);
  border-color: var(--border-subtle);
  box-shadow: none;
}
.metrics.js-focus .metric--hi:not(.is-focus) .metric__value {
  background: none; -webkit-background-clip: border-box; background-clip: border-box;
  color: var(--text-primary);
}
.metrics.js-focus .metric--hi:not(.is-focus) .metric__label { color: var(--text-secondary); }

.metrics.js-focus .metric.is-focus {
  background: var(--neon-surface);
  border-color: var(--neon-3);
  box-shadow: 0 0 0 1px rgba(2,148,253,.25), 0 10px 30px -14px rgba(2,148,253,.6);
  scale: 1.015;
}
.metrics.js-focus .metric.is-focus .metric__value {
  background: var(--neon-grad);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.metrics.js-focus .metric.is-focus .metric__label { color: #fff; }

@media (prefers-reduced-motion: reduce) {
  .metrics.js-focus .metric { transition: none; }
  .metrics.js-focus .metric.is-focus { scale: 1; }
}
