/* ============================================================
   davi.kr — 전역 스타일
   브랜드 토큰: prev_site/site/davi-kr-custom.css 의 색·폰트 값 계승
   (노션/우피 DOM 셀렉터는 폐기, 값만 채택)
   ============================================================ */

@import url("https://cdn.jsdelivr.net/gh/orioncactus/pretendard@v1.3.9/dist/web/variable/pretendardvariable-dynamic-subset.min.css");

:root {
  --brand: #0B3D6C;        /* 로고 네이비 — 주색: 링크·버튼·포인트 */
  --brand-soft: #8897C7;   /* 로고 페리윙클 — 보조: 테두리·hover */
  --brand-tint: #eef1f8;   /* 아주 옅은 페리윙클 — 카드/콜아웃 배경 */
  --brand-tint-blue: #e7eef6; /* 옅은 네이비 톤 — 강조 콜아웃 */

  --ink: #1a2431;          /* 본문 잉크(네이비 계열 다크) */
  --muted: #5b6675;        /* 보조 텍스트 */
  --bg: #ffffff;
  --surface: #f7f9fc;      /* 섹션 교대 배경 */
  --border: #e4e9f1;

  --maxw: 1080px;          /* 랜딩 섹션 최대폭 */
  --maxw-prose: 880px;     /* 글(본문) 최대폭 — 17px 한글 기준 한 줄 ~49자(데스크톱 권장대) */
  --radius: 12px;
  --shadow-sm: 0 1px 2px rgba(16, 36, 64, .05);
  --shadow: 0 6px 24px rgba(16, 36, 64, .07);
  color-scheme: light;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: 'Pretendard Variable', Pretendard, -apple-system, BlinkMacSystemFont,
    system-ui, 'Segoe UI', 'Apple SD Gothic Neo', 'Noto Sans KR', sans-serif;
  font-size: 17px;
  line-height: 1.75;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 {
  letter-spacing: -0.02em;
  line-height: 1.3;
  color: var(--ink);
  margin: 0 0 .5em;
}
h1 { font-size: 2.1rem; font-weight: 800; }
h2 { font-size: 1.55rem; font-weight: 700; margin-top: 2.2em; }
h3 { font-size: 1.2rem; font-weight: 700; margin-top: 1.6em; }

p { margin: 0 0 1.1em; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-soft); text-decoration: underline; }

img { max-width: 100%; height: auto; }

hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 2.5rem 0;
}

/* ── 레이아웃 컨테이너 ─────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 20px; }
.prose { max-width: var(--maxw-prose); margin: 0 auto; padding: 0 20px; }
.section { padding: 56px 0; }
.section--alt { background: var(--surface); }
/* 앵커(#signup 등)로 점프 시 sticky 헤더에 가리지 않게 위로 여백 확보 */
#signup { scroll-margin-top: 100px; }

/* ── 헤더 / 내비 ──────────────────────────────────────── */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(255,255,255,.9);
  backdrop-filter: saturate(160%) blur(8px);
  border-bottom: 1px solid var(--border);
}
.nav {
  max-width: var(--maxw); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 12px 20px; gap: 16px;
}
.brand {
  display: flex; align-items: baseline; gap: 8px;
  font-weight: 800; font-size: 1.25rem; color: var(--brand);
  letter-spacing: -0.02em;
}
.brand:hover { text-decoration: none; }
.brand small { font-weight: 600; font-size: .72rem; color: var(--muted); letter-spacing: .04em; }

.nav-links { display: flex; align-items: center; gap: 4px; list-style: none; margin: 0; padding: 0; }
.nav-links a {
  display: inline-block; padding: 8px 12px; border-radius: 8px;
  color: var(--ink); font-size: .96rem; font-weight: 600;
}
.nav-links a:hover { background: var(--brand-tint); color: var(--brand); text-decoration: none; }
.nav-cta {
  background: var(--brand); color: #fff !important; padding: 8px 16px !important;
}
.nav-cta:hover { background: #0e4c86; }

/* 모바일 메뉴 토글 (체크박스 없이 details 사용) */
.nav-toggle { display: none; }

@media (max-width: 760px) {
  .nav-links {
    position: absolute; top: 100%; left: 0; right: 0;
    flex-direction: column; align-items: stretch; gap: 2px;
    background: #fff; border-bottom: 1px solid var(--border);
    padding: 8px 12px 14px; display: none;
  }
  .nav-links a { padding: 10px 12px; }
  .nav[open] .nav-links, .nav.open .nav-links { display: flex; }
  .nav-toggle {
    display: inline-flex; align-items: center; justify-content: center;
    width: 40px; height: 40px; border: 1px solid var(--border);
    border-radius: 8px; background: #fff; cursor: pointer; font-size: 1.2rem;
    color: var(--ink);
  }
}

/* ── 히어로 ───────────────────────────────────────────── */
.hero { padding: 72px 0 40px; text-align: center; }
.hero h1 { font-size: 2.6rem; max-width: 18ch; margin: 0 auto .4em; }
.hero .lead {
  font-size: 1.2rem; color: var(--muted); max-width: 44ch; margin: 0 auto 1.8em;
}
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
@media (max-width: 560px) { .hero h1 { font-size: 2rem; } }

/* ── 버튼 ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 12px 22px; border-radius: 10px; font-weight: 700; font-size: 1rem;
  border: 1px solid transparent; cursor: pointer; transition: .15s;
  white-space: nowrap;
}
.btn:hover { text-decoration: none; }
.btn--primary { background: var(--brand); color: #fff; }
.btn--primary:hover { background: #0e4c86; color: #fff; }
.btn--ghost { background: #fff; color: var(--brand); border-color: var(--brand-soft); }
.btn--ghost:hover { background: var(--brand-tint); color: var(--brand); }
.btn--block { width: 100%; justify-content: center; }
.btn--lg { padding: 15px 30px; font-size: 1.08rem; }

/* ── 무료 구독 유도 버튼 밴드 ────────────────────────────── */
.cta-band {
  text-align: center; background: var(--brand-tint); border: 1px solid var(--border);
  border-radius: 16px; padding: 30px 24px;
}
.cta-band .note { margin: 12px 0 0; }

/* ── 콜아웃 / 카드 ────────────────────────────────────── */
.callout {
  background: var(--brand-tint); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px; margin: 0 0 16px;
}
.callout--blue { background: var(--brand-tint-blue); border-color: #cfe0f0; }
.callout .ic { font-size: 1.4rem; display: block; margin-bottom: 6px; }
.callout strong { color: var(--ink); }
.callout p:last-child { margin-bottom: 0; }

/* 컬럼 그리드 → 모바일 1열 */
.cols { display: grid; gap: 16px; grid-template-columns: repeat(3, 1fr); margin: 0 0 16px; }
.cols--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 760px) { .cols, .cols--2 { grid-template-columns: 1fr; } }
.cols .callout { margin: 0; height: 100%; }

.card {
  background: #fff; border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; box-shadow: var(--shadow-sm);
}

/* ── 표 ───────────────────────────────────────────────── */
.table-wrap { overflow-x: auto; margin: 0 0 16px; }
table { border-collapse: collapse; width: 100%; font-size: .96rem; }
th, td { text-align: left; padding: 10px 14px; border-bottom: 1px solid var(--border); vertical-align: top; }
thead th { background: var(--surface); font-weight: 700; color: var(--ink); white-space: nowrap; }
tbody tr:hover { background: #fafbfe; }

/* ── details(토글/FAQ) ───────────────────────────────── */
details {
  border: 1px solid var(--border); border-radius: 10px;
  padding: 4px 18px; margin: 0 0 10px; background: #fff;
}
details[open] { background: var(--surface); }
summary {
  cursor: pointer; font-weight: 700; padding: 12px 0; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
}
summary::-webkit-details-marker { display: none; }
summary::after { content: "+"; color: var(--brand-soft); font-size: 1.3rem; }
details[open] summary::after { content: "–"; }
details > :not(summary) { margin-bottom: 12px; }

/* ── 섹션 제목 정렬 ───────────────────────────────────── */
.section-head { text-align: center; margin-bottom: 28px; }
.section-head h2 { margin-top: 0; }
.section-head p { color: var(--muted); }

/* ── 뉴스레터 가입 박스 ──────────────────────────────── */
.signup {
  background: var(--brand); color: #fff; border-radius: 16px;
  padding: 36px 28px; text-align: center;
}
.signup h2 { color: #fff; margin-top: 0; }
.signup p { color: #dbe6f3; max-width: 46ch; margin: 0 auto 18px; }
.note { font-size: .82rem; color: var(--muted); }
.signup .note { color: #b9cbe0; margin-top: 14px; }
.signup .note a { color: #cfe0f0; text-decoration: underline; }

/* 스티비 삽입폼 재스킨 — 구조/JS 는 스티비 것, 겉모습만 우리 브랜드로 덮는다.
   (.signup .stb_* = 0,2,0 특정성으로 스티비 기본 CSS 0,1,0 을 이김) */
.signup .stb-card { max-width: 440px; margin: 0 auto; }
.signup .stb_form { background: #fff; border: 0; border-radius: 12px; padding: 24px 22px; text-align: left; color: var(--ink); }
.signup .stb_form_title { display: none; }                 /* 위 h2 로 대체 */
.signup .stb_form_set { margin: 0 0 14px; }
.signup .stb_form_set_label { display: block; font-size: .9rem; font-weight: 600; color: var(--muted); margin-bottom: 6px; }
.signup .stb_asterisk { color: #c0392b; margin-left: 2px; }
.signup .stb_form_set_input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; color: var(--ink); background: #fff; font-family: inherit;
}
.signup .stb_form_set_input:focus { outline: none; border-color: var(--brand-soft); box-shadow: 0 0 0 3px rgba(136,151,199,.25); }
.signup .stb_form_msg_error { color: #c0392b; font-size: .82rem; margin-top: 5px; }

.signup .stb_form_policy { font-size: .88rem; color: var(--muted); margin: 0 0 16px; line-height: 1.5; }
.signup .stb_form_policy input[type=checkbox] { margin-right: 6px; vertical-align: middle; }
.signup .stb_form_modal_open_btn {
  background: none; border: 0; padding: 0; color: var(--brand);
  text-decoration: underline; cursor: pointer; font-size: inherit; font-family: inherit;
}

.signup .stb_form_set_submit { margin: 0; }
.signup .stb_form_submit_button {
  width: 100%; height: auto; padding: 13px 22px; border: 0; border-radius: 10px;
  background: var(--brand); color: #fff; font-weight: 700; font-size: 1rem;
  cursor: pointer; transition: .15s; font-family: inherit;
}
.signup .stb_form_submit_button:hover { background: #0e4c86; }
.signup .stb_form_submit_button.disabled { opacity: .5; cursor: default; }

/* 스티비가 성공/결과 메시지를 서버 HTML로 주입하는데, 그 HTML에 인라인 흰색
   color 가 들어있어 우리 색이 밀린다. 자식까지 !important 로 읽히는 색 강제. */
.signup .stb_form_result,
.signup .stb_form_result * { color: var(--ink) !important; }
.signup .stb_form_result { font-size: .9rem; margin: 0 0 12px; }
.signup .stb_form_result:not(:empty) {
  background: var(--brand-tint); border: 1px solid var(--border);
  border-radius: 8px; padding: 12px 14px; line-height: 1.6;
}
.signup .stb_form_result:empty { margin: 0; }

/* 필수 기능 CSS: 모달 숨김(.blind) + 개인정보 팝업 오버레이 */
.blind { display: none !important; }
.signup .stb_form_modal { position: fixed; inset: 0; z-index: 100000; display: flex; align-items: center; justify-content: center; padding: 20px; }
.signup .stb_form_modal_bg { position: absolute; inset: 0; background: rgba(0,0,0,.5); }
.signup .stb_form_modal_body { position: relative; z-index: 1; background: #fff; color: var(--ink); border-radius: 12px; padding: 24px; max-width: 420px; width: 100%; text-align: left; }
.signup .stb_form_modal_title { font-size: 1.1rem; margin: 0 0 12px; }
.signup .stb_form_modal_text { color: var(--muted); white-space: pre-line; font-size: .92rem; line-height: 1.6; }
.signup .stb_form_modal_btn { text-align: right; margin-top: 16px; }
.signup .stb_form_modal_close_btn { padding: 8px 16px; border: 1px solid var(--border); border-radius: 8px; background: #fff; color: var(--ink); cursor: pointer; font-weight: 600; font-family: inherit; }

/* ── 새소식(블로그) 리스트 ───────────────────────────── */
.post-list { list-style: none; padding: 0; margin: 0; }
.post-list li { padding: 18px 0; border-bottom: 1px solid var(--border); }
.post-list .date { color: var(--muted); font-size: .85rem; font-variant-numeric: tabular-nums; }
.post-list h3 { margin: 4px 0 6px; }
.post-list h3 a { color: var(--ink); }
.post-list h3 a:hover { color: var(--brand); }
.post-list .summary { color: var(--muted); margin: 0; }

.post-meta { color: var(--muted); font-size: .9rem; margin-bottom: 1.5rem; }
.back-link { display: inline-block; margin: 2rem 0 0; }

/* ── 푸터 ─────────────────────────────────────────────── */
.site-footer {
  border-top: 1px solid var(--border); background: var(--surface);
  padding: 34px 0; margin-top: 60px; font-size: .9rem; color: var(--muted);
}
.site-footer .wrap { display: flex; flex-wrap: wrap; gap: 8px 20px; justify-content: space-between; }
.site-footer a { color: var(--muted); }
.site-footer a:hover { color: var(--brand); }

/* ── 유틸 ─────────────────────────────────────────────── */
.center { text-align: center; }
.mt-2 { margin-top: 2rem; }
.muted { color: var(--muted); }
.pill {
  display: inline-block; font-size: .78rem; font-weight: 700; color: var(--brand);
  background: var(--brand-tint); padding: 3px 10px; border-radius: 999px;
}

/* ── 수강생 게이트 오버레이 ──────────────────────────── */
.gate {
  position: fixed; inset: 0; z-index: 100; background: var(--surface);
  display: flex; align-items: center; justify-content: center; padding: 20px;
}
.gate .card { max-width: 380px; width: 100%; text-align: center; }
.gate input {
  width: 100%; padding: 12px 14px; border: 1px solid var(--border);
  border-radius: 8px; font-size: 1rem; margin: 12px 0;
}
.gate .err { color: #c0392b; font-size: .88rem; min-height: 1.2em; }
