/**
 * 랜딩 톤 서브페이지 (약관/정책) 전용 스타일
 * index.css 의 디자인 토큰을 사용하므로 반드시 index.css 뒤에 로드한다
 */

/* 정책 페이지 전용. 랜딩에서 모달로 쓸 때는 적용되지 않아야 한다 */
body.is-doc-page {
  background: #f6f8fb;
}

/* --- 상단 네이비 밴드 --- */
.subhead {
  position: relative;
  background: radial-gradient(120% 140% at 20% 0%, var(--navy-light) 0%, var(--navy) 60%);
  padding: clamp(110px, 14vh, 150px) 0 clamp(40px, 6vh, 64px);
  overflow: hidden;
}

.subhead::after {
  content: '';
  position: absolute;
  inset: auto 0 0 0;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--teal-glow), transparent);
}

.subhead .nav {
  position: absolute;
  top: 20px;
}

.subhead__inner {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
}

.subhead__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 1.3rem;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 14px;
}

.subhead__eyebrow::before {
  content: '';
  width: 18px;
  height: 1px;
  background: var(--teal);
}

.subhead__title {
  font-family: var(--ff-aggro);
  font-size: clamp(2.8rem, 4.4vw, 4.4rem);
  line-height: 1.25;
  color: var(--white);
  font-weight: 400;
}

.subhead__meta {
  margin-top: 16px;
  font-size: 1.35rem;
  color: var(--white-50);
}

/* --- 본문 영역 --- */
.doc {
  width: min(1080px, calc(100% - 48px));
  margin: 0 auto;
  padding: clamp(36px, 6vh, 64px) 0 clamp(60px, 9vh, 110px);
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: clamp(24px, 3vw, 48px);
  align-items: start;
}

/* --- 목차 --- */
.doc__toc {
  position: sticky;
  top: 90px;
  font-size: 1.3rem;
}

.doc__toc-title {
  font-size: 1.2rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--gray-text);
  padding-bottom: 10px;
  margin-bottom: 10px;
  border-bottom: 1px solid #dde3ea;
}

.doc__toc ol {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 2px;
  counter-reset: toc;
}

.doc__toc a {
  display: block;
  padding: 7px 10px 7px 26px;
  position: relative;
  color: var(--gray-text);
  border-radius: 6px;
  line-height: 1.45;
  transition: background 0.15s, color 0.15s;
}

.doc__toc li {
  counter-increment: toc;
}

.doc__toc a::before {
  content: counter(toc);
  position: absolute;
  left: 8px;
  font-family: var(--ff-num);
  font-size: 1.2rem;
  color: #aab6c2;
}

.doc__toc a:hover {
  background: #eaeff5;
  color: var(--gray-dark);
}

.doc__toc a.is-active {
  background: rgba(0, 162, 153, 0.08);
  color: var(--teal-dark);
  font-weight: 600;
}

.doc__toc a.is-active::before {
  color: var(--teal);
}

/* --- 문서 카드 --- */
.doc__body {
  background: var(--white);
  border: 1px solid #e6ebf1;
  border-radius: 16px;
  padding: clamp(28px, 4vw, 52px);
  box-shadow: 0 1px 2px rgba(16, 32, 56, 0.04), 0 12px 32px rgba(16, 32, 56, 0.05);
}

/* --- 반응형 --- */
@media (max-width: 1024px) {
  .doc {
    grid-template-columns: minmax(0, 1fr);
  }

  .doc__toc {
    display: none;
  }
}

/* 목차 없는 문서 (저작권 보호방침) */
.doc--single {
  grid-template-columns: minmax(0, 1fr);
  max-width: 860px;
}

/* ===== 이전 구조 문서 모달 (landing, landing_1, landing_3 — 시안 비교 기간 지원) ===== */

.dl-card--doc {
  max-width: 860px;
  max-height: 86vh;
  display: flex;
  flex-direction: column;
  padding: 30px 0 0;
}

.dl-card--doc .doc-modal__head {
  padding: 0 34px 18px;
  border-bottom: 1px solid #eef2f6;
}

.dl-card--doc .doc-modal__eyebrow {
  font-size: 1.2rem;
  letter-spacing: 0.04em;
  color: var(--teal);
  margin-bottom: 8px;
}

.dl-card--doc .doc-modal__title {
  font-family: var(--ff-aggro);
  font-size: 2.4rem;
  font-weight: 400;
  color: var(--gray-dark);
  line-height: 1.3;
}

.dl-card--doc .doc-modal__meta {
  margin-top: 8px;
  font-size: 1.3rem;
  color: #93a1ae;
}

/* 본문만 스크롤한다 */
.dl-card--doc .doc-modal__body {
  overflow-y: auto;
  padding: 24px 34px 30px;
  -webkit-overflow-scrolling: touch;
}

/* 모달 안에서는 목차와 카드 테두리를 쓰지 않는다 */
.dl-card--doc .doc__body {
  background: none;
  border: 0;
  border-radius: 0;
  padding: 0;
  box-shadow: none;
}

@media (max-width: 768px) {
  .dl-card--doc {
    max-height: 92vh;
    padding-top: 24px;
  }

  .dl-card--doc .doc-modal__head {
    padding: 0 20px 14px;
  }

  .dl-card--doc .doc-modal__body {
    padding: 18px 20px 24px;
  }
}
