/* =========================================================
   도약 클래스 랜딩 — 공통 스타일
   브레이크포인트
     ~639px    모바일      : 1단 + 하단 고정 바
     640~1023  태블릿 세로 : 1단 + 하단 고정 바(강의명·금액·버튼 한 줄)
     1024px~   태블릿 가로/데스크탑 : 2단 + 우측 sticky 카드
   ========================================================= */

:root {
  --blue: #0024ff;      /* 로고 원본 컬러 */
  --blue-700: #001bcc;
  --blue-900: #0a1f66;
  --blue-50: #eef0ff;
  --blue-100: #d9deff;
  --live: #e5102b;      /* LIVE 표시 전용 빨강 (상세 이미지 LIVE 배지와 통일) */
  --ink: #0f172a;
  --ink-2: #334155;
  --muted: #64748b;
  --line: #e2e8f0;
  --bg-soft: #f5f7fa;
  --white: #fff;

  --header-h: 64px;
  --radius: 16px;
  --container: 1200px;
  --gutter: 24px;
  --bar-h: 76px;

  --shadow-card: 0 1px 2px rgba(15, 23, 42, .04), 0 12px 32px -12px rgba(15, 23, 42, .12);
  --shadow-bar: 0 -8px 24px -8px rgba(15, 23, 42, .14);
}

*,
*::before,
*::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: "Pretendard Variable", Pretendard, -apple-system, BlinkMacSystemFont,
    "Apple SD Gothic Neo", "Noto Sans KR", "Malgun Gothic", sans-serif;
  color: var(--ink);
  background: var(--white);
  line-height: 1.5;
  letter-spacing: -0.01em;
  word-break: keep-all;
  -webkit-font-smoothing: antialiased;
}

img { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; background: none; border: 0; padding: 0; cursor: pointer; }

.container {
  width: 100%;
  max-width: calc(var(--container) + var(--gutter) * 2);
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.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;
}

/* ---------- 상단 브랜드 띠 ---------- */
.brand-strip {
  background: var(--blue);
  color: var(--white);
  text-align: center;
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .24em;
  padding: 7px 0;
}

/* ---------- 헤더 ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(255, 255, 255, .92);
  backdrop-filter: saturate(180%) blur(12px);
  -webkit-backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
}

.site-header .container {
  display: flex;
  align-items: center;
  justify-content: center;
  height: var(--header-h);
}

.logo {
  flex: none;
  font-size: 26px;
  font-weight: 900;
  color: var(--blue);
  letter-spacing: -0.04em;
  line-height: 1;
}
.logo img { height: 30px; width: auto; }
.site-footer .logo img { height: 26px; }


/* ---------- 상품 영역 레이아웃 ---------- */
.product {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 380px;
  grid-template-areas:
    "thumb  aside"
    "detail aside";
  column-gap: 48px;
  padding-top: 32px;
  padding-bottom: 96px;
}

.product__thumb { grid-area: thumb; }
.product__aside { grid-area: aside; }   /* stretch → 내부 카드 sticky 가능 */
.product__detail { grid-area: detail; }

.thumb {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--blue-50);
  aspect-ratio: 1200 / 630;  /* 썸네일 = 공유 미리보기(og:image) 한 장 */
}
.thumb img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- 구매 카드 ---------- */
.buy-card {
  position: sticky;
  top: calc(var(--header-h) + 24px);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 28px;
  background: var(--white);
  box-shadow: var(--shadow-card);
}

.buy-card__head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }

.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 12px; }
.badge {
  display: inline-flex; align-items: center; gap: 4px;
  padding: 4px 10px;
  font-size: 12px; font-weight: 700;
  border-radius: 999px;
  background: var(--blue-50); color: var(--blue);
}
.badge--solid { background: var(--blue); color: var(--white); }
.badge--live { background: var(--live); color: var(--white); white-space: nowrap; }
.badge--live::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; animation: pulse 1.6s ease-in-out infinite;
}
@keyframes pulse { 50% { opacity: .25; } }

.buy-card__title {
  margin: 0;
  font-size: 24px;
  font-weight: 800;
  line-height: 1.35;
  letter-spacing: -0.03em;
}

.buy-card__desc {
  margin: 12px 0 0;
  font-size: 15px;
  color: var(--ink-2);
  line-height: 1.65;
}

.meta {
  list-style: none;
  margin: 20px 0 0;
  padding: 16px 0 0;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}
.meta li { display: flex; gap: 12px; font-size: 14px; }
.meta dt, .meta .k { flex: none; width: 44px; color: var(--muted); }
.meta .v { min-width: 0; }
.meta .ln { display: block; }
.nw { white-space: nowrap; }   /* 이 묶음 안에서는 줄바꿈 금지 */
.meta .v { color: var(--ink); font-weight: 500; }

.price {
  margin-top: 20px;
  padding: 18px 20px;
  border-radius: 12px;
  background: var(--bg-soft);
}
.price__label { font-size: 13px; font-weight: 600; color: var(--muted); }
.price__row {
  display: flex; align-items: baseline; justify-content: flex-end; flex-wrap: wrap;
  gap: 4px 10px;
  margin-top: 4px;
}
.price__origin { font-size: 15px; color: var(--muted); text-decoration: line-through; }
.price__rate { font-size: 22px; font-weight: 800; color: var(--blue); }
.price__final { font-size: 30px; font-weight: 800; letter-spacing: -0.03em; }
.price__final small { font-size: 18px; font-weight: 700; margin-left: 1px; }
.price__free { color: var(--blue); }
.price__note { margin-top: 6px; font-size: 13px; color: var(--ink-2); text-align: right; }

.cta {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  white-space: nowrap;
  width: 100%;
  height: 56px;
  margin-top: 16px;
  border-radius: 12px;
  background: var(--blue);
  color: var(--white);
  font-size: 17px;
  font-weight: 700;
  transition: background-color .15s, transform .1s;
  box-shadow: 0 8px 20px -8px rgba(0, 36, 255, .5);
}
.cta:hover { background: var(--blue-700); }
.cta:active { transform: scale(.98); }
.cta svg { flex: none; }

.cta-note {
  margin: 10px 0 0;
  font-size: 12.5px;
  color: var(--muted);
  text-align: center;
}

/* ---------- 혜택 강조 ---------- */
.perk {
  margin-top: 18px;
  padding: 14px 16px 16px;
  border-radius: 12px;
  background: linear-gradient(135deg, var(--blue-50), #f6f7ff);
  border: 1px solid var(--blue-100);
}
.perk__head {
  display: flex; align-items: center; gap: 6px;
  margin: 0;
  font-size: 13.5px; font-weight: 800; color: var(--blue);
}
.perk__head svg { flex: none; }
.perk__list { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 8px; }
.perk__list li { display: flex; align-items: center; gap: 10px; font-size: 15.5px; font-weight: 700; color: var(--ink); }
.perk__no {
  flex: none;
  padding: 2px 8px;
  border-radius: 6px;
  background: var(--white);
  border: 1px solid var(--blue-100);
  color: var(--blue);
  font-size: 11.5px; font-weight: 800;
}

/* ---------- 클래스 설명 ---------- */
.detail-tab {
  margin-top: 56px;
  border-bottom: 1px solid var(--line);
}
.detail-tab h2 {
  display: inline-block;
  margin: 0;
  padding: 0 2px 14px;
  font-size: 18px;
  font-weight: 800;
  border-bottom: 3px solid var(--blue);
  margin-bottom: -1px;
}

.detail-images { margin-top: 32px; }
.detail-images img { width: 100%; margin: 0 auto; }
.detail-images img + img { margin-top: -1px; }   /* 분할 이미지 사이 1px 틈 방지 */
/* 상세 이미지 최대 폭(디자인 원본 860px 기준) */
.detail-images { max-width: 860px; margin-left: auto; margin-right: auto; }

/* ---------- 하단 고정 바 (1023px 이하) ---------- */
.buy-bar {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 60;
  background: var(--white);
  border-top: 1px solid var(--line);
  box-shadow: var(--shadow-bar);
  padding-bottom: env(safe-area-inset-bottom);
}
.buy-bar .container {
  display: flex; align-items: center; gap: 16px;
  height: var(--bar-h);
}
.buy-bar__info { min-width: 0; flex: 1; }
.buy-bar__title {
  display: none;
  font-size: 14px; font-weight: 600; color: var(--ink-2);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.buy-bar__price { display: flex; align-items: baseline; gap: 6px; white-space: nowrap; }
.buy-bar__sub { display: flex; align-items: center; gap: 8px; margin-top: 3px; font-size: 14px; font-weight: 600; color: var(--ink); line-height: 1.4; white-space: nowrap; }
.buy-bar__sub .badge { padding: 3px 9px; }
.buy-bar__sched { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
[hidden] { display: none !important; }
.buy-bar__price .price__rate { font-size: 17px; }
.buy-bar__price .price__final { font-size: 21px; }
.buy-bar__price .price__final small { font-size: 14px; }
.buy-bar__price .price__origin { font-size: 13px; }
.buy-bar .cta { margin: 0; width: auto; flex: none; min-width: 168px; padding: 0 24px; height: 52px; }

/* ---------- 푸터 ---------- */
.site-footer {
  background: var(--bg-soft);
  padding: 48px 0 40px;
  font-size: 14px;
  color: var(--ink-2);
}
.footer__top { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.footer__top .logo { font-size: 22px; }

.sns { display: flex; gap: 8px; }
.sns a {
  display: grid; place-items: center;
  width: 40px; height: 40px;
  border-radius: 50%;
  background: var(--white);
  color: var(--ink);
  transition: color .15s, background-color .15s;
}
.sns a:hover { color: var(--white); background: var(--blue); }

.biz { margin: 28px 0 0; display: grid; gap: 10px; line-height: 1.6; }
.biz p { margin: 0; }
.biz .sep { display: inline-block; margin: 0 8px; color: #cbd5e1; }
.biz strong { color: var(--ink); }

.footer__bottom {
  margin-top: 28px;
  padding-top: 20px;
  border-top: 1px solid var(--line);
}
.policy { display: flex; flex-wrap: wrap; gap: 8px 24px; }
.policy a:hover { color: var(--blue); }
.policy .strong { font-weight: 700; color: var(--ink); }
.copyright { margin: 14px 0 0; font-size: 13px; color: var(--muted); }

/* ---------- 맨 위로 버튼 ---------- */
.to-top {
  position: fixed;
  right: 20px;
  bottom: calc(24px + env(safe-area-inset-bottom));
  z-index: 55;
  display: grid; place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, .94);
  color: var(--ink-2);
  box-shadow: 0 6px 16px -6px rgba(15, 23, 42, .25);
  translate: 0 calc(var(--lift, 0px) * -1);   /* 푸터 침범 방지 (main.js) — 스크롤에 바로 따라가도록 transition 없음 */
  opacity: 0; visibility: hidden; transform: translateY(8px);
  transition: opacity .2s, transform .2s, visibility .2s, color .15s, border-color .15s;
}
.to-top.is-show { opacity: 1; visibility: visible; transform: none; }
.to-top:hover { color: var(--blue); border-color: var(--blue); }
/* 데스크탑: 우측 sticky 카드(신청 버튼)를 가리지 않도록 왼쪽 상세 영역 오른쪽 끝에 배치 */
@media (min-width: 1024px) {
  .to-top { right: calc(max(0px, (100vw - 1248px) / 2) + 24px + 380px + 48px + 16px); }
}
/* 높이가 낮은 노트북(1366×768 등): 카드가 화면 안에 다 들어오도록 여백 축소 */
@media (min-width: 1024px) and (max-height: 720px) {
  .buy-card { top: calc(var(--header-h) + 12px); padding: 22px 24px; }
  .meta { margin-top: 16px; padding-top: 14px; }
  .perk { margin-top: 14px; }
}

/* =========================================================
   반응형
   ========================================================= */

/* 태블릿 세로 + 모바일 공통: 1단 + 하단 고정 바 */
@media (max-width: 1023px) {
  .product {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas: "thumb" "aside" "detail";
    padding-top: 24px;
    padding-bottom: 64px;
  }
  .buy-card {
    position: static;
    margin-top: 24px;
    padding: 0;
    border: 0;
    box-shadow: none;
  }
  .buy-card .cta,
  .buy-card .cta-note { display: none; }   /* 하단 바가 대신 */
  .detail-tab { margin-top: 40px; }

  .buy-bar { display: block; }
  body.has-buybar { padding-bottom: calc(var(--bar-h) + env(safe-area-inset-bottom)); }
  body.has-buybar .to-top { bottom: calc(var(--bar-h) + 14px + env(safe-area-inset-bottom)); }
}

/* 태블릿 세로: 바에 강의명 노출 */
@media (min-width: 640px) and (max-width: 1023px) {
  .buy-bar__title { display: block; }
  .buy-bar .cta { min-width: 220px; }
  .buy-card__title { font-size: 26px; }
}

/* 모바일 */
@media (max-width: 639px) {
  :root { --gutter: 16px; --header-h: 56px; --bar-h: 88px; }

  .brand-strip { font-size: 10.5px; padding: 5px 0; }
  .logo img { height: 24px; }
  .site-footer .logo img { height: 22px; }

  .product { padding-top: 0; }
  .product__thumb { margin: 0 calc(var(--gutter) * -1); }
  .thumb { border-radius: 0; }
  .buy-card { margin-top: 20px; }
  .buy-card__title { font-size: 21px; }
  .buy-card__desc { font-size: 14.5px; }
  .price__final { font-size: 26px; }

  .detail-tab { margin-top: 32px; }
  .detail-images { margin: 24px calc(var(--gutter) * -1) 0; max-width: none; }

  /* 하단 바: 위 = LIVE 특강 + 1부/2부 일정, 아래 = 전체 폭 버튼 */
  .buy-bar .container { flex-direction: column; align-items: stretch; justify-content: center; gap: 8px; }
  .buy-bar__info { flex: none; }
  .buy-bar__sub { justify-content: center; margin-top: 0; font-size: 13px; }
  .buy-bar__sub .badge { font-size: 11.5px; padding: 2px 8px; }
  .buy-bar .cta { width: 100%; min-width: 0; height: 48px; padding: 0 16px; font-size: 16px; }
  .to-top { right: 14px; width: 40px; height: 40px; }

  .site-footer { padding: 36px 0 32px; font-size: 13px; }
  .biz .sep { display: none; }
  .biz .item { display: block; }
}

/* 320~359px (아이폰 SE 1세대 등) */
@media (max-width: 359px) {
  .buy-card { padding: 0; }
  .meta li { gap: 10px; font-size: 13.5px; }
  .meta .k { width: 32px; }
  .perk { padding: 12px 14px 14px; }
  .perk__list li { font-size: 14.5px; gap: 8px; }
  .buy-bar__sub { gap: 6px; font-size: 12px; letter-spacing: -0.03em; }
  .buy-bar__sub .badge { font-size: 11px; padding: 2px 7px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .badge--live::before { animation: none; }
  .to-top { transition: none; }
}

/* ---------- 문서 페이지 (개인정보처리방침 · 이용약관) ---------- */
.doc { max-width: 800px; margin: 0 auto; padding: 48px var(--gutter) 96px; font-size: 15px; color: var(--ink-2); line-height: 1.8; }
.doc h1 { margin: 0 0 8px; font-size: 30px; font-weight: 800; color: var(--ink); letter-spacing: -0.03em; }
.doc .doc__lead { margin: 0 0 32px; color: var(--muted); font-size: 14px; }
.doc nav.toc { margin: 0 0 40px; padding: 20px 24px; border-radius: 12px; background: var(--bg-soft); }
.doc nav.toc ol { margin: 0; padding-left: 20px; columns: 2; column-gap: 32px; font-size: 14px; }
.doc nav.toc a:hover { color: var(--blue); }
.doc section { padding-top: 32px; margin-top: 32px; border-top: 1px solid var(--line); scroll-margin-top: calc(var(--header-h) + 16px); }
.doc h2 { margin: 0 0 12px; font-size: 19px; font-weight: 800; color: var(--ink); }
.doc h3 { margin: 20px 0 6px; font-size: 16px; font-weight: 700; color: var(--ink); }
.doc p { margin: 0 0 10px; }
.doc ul, .doc ol { margin: 0 0 12px; padding-left: 22px; }
.doc li { margin: 2px 0; }
.doc table { width: 100%; border-collapse: collapse; margin: 8px 0 16px; font-size: 14px; }
.doc th, .doc td { border: 1px solid var(--line); padding: 10px 12px; text-align: left; vertical-align: top; }
.doc th { background: var(--bg-soft); color: var(--ink); font-weight: 700; white-space: nowrap; }
.doc ul.plain { list-style: none; padding-left: 0; }
.doc ul.plain > li { margin: 6px 0; }
.doc ul.plain ul { margin-top: 6px; }
.doc .table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; margin: 8px 0 16px; }
.doc .table-scroll table { margin: 0; min-width: 560px; }
.doc .note { font-size: 14px; color: var(--muted); }
.doc a { color: var(--blue); }
@media (max-width: 639px) {
  .doc { padding-top: 32px; font-size: 14.5px; }
  .doc h1 { font-size: 24px; }
  .doc nav.toc ol { columns: 1; }
}
