/* bg-anim.css — Section 8: 섹션 배경 애니메이션 */

/* ── 8-0-1. .section-content에 position:relative (section-bg absolute 기준) ── */
.section-content {
  position: relative;
  padding-top: 56px;
}

/* ── 8-1. Section 1: 세계지도 줌아웃 ── */
.bg-map-wrap {
  height: 100vh;
  height: 100dvh;
  margin-bottom: -100vh;
  margin-bottom: -100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
}

.bg-map-wrap .world-map {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

/* ── 8-2. Section 2: 세계지도 + 국가 핀 (pin 고정) ── */
#section2 .bg-map-wrap {
  position: relative;
}

/* 핀 공통 (SVG <g> 요소) — opacity는 GSAP이 제어 */

/* 핀 그림자 */
.map-pin .pin-shadow {
  opacity: 0.3;
}

/* ── 8-3. Section 3: 그래프 래퍼 (S1/S2 .bg-map-wrap과 동일 패턴) ── */
.bg-graph-wrap {
  height: 100vh;
  height: 100dvh;
  margin-bottom: -100vh;
  margin-bottom: -100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  position: relative;      /* .bg-graph absolute 기준 */
}

.bg-graph {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: calc( 100% - 48px );           /* Figma: 708/880 ≈ 80% */
  opacity: 0.6;
  pointer-events: none;
}

/* ── 8-3 리비전: 막대그래프 (2026-06-16) ── */
.graph-bar {
  fill: #F6F8FA;
}

/* X축 연도 라벨 — HTML overlay (SVG text 제거로 preserveAspectRatio="none" 왜곡 방지) */
.graph-year-label {
  position: absolute;
  bottom: 8%;                       /* (820−722)/980 × 80% — 베이스라인(10.45%) 아래 */
  transform: translateX(-50%);      /* bar 중앙 정렬 */
  color: #BDC2C7;
  font-family: 'NanumSquare Neo', sans-serif;
  font-size: clamp(7px, 0.7vw, 10px);
  font-weight: 700;
  letter-spacing: -0.02em;          /* −0.2px at 10px */
  line-height: 1.6;
  white-space: nowrap;
  pointer-events: none;
}

.graph-grid {
  stroke: #E5E5E5;
  stroke-width: 1;
  stroke-dasharray: 4 4;
}

.graph-baseline {
  stroke: #E5E5E5;
  stroke-width: 1;
}

/* Y축 pill 라벨 — HTML overlay (SVG text 짜부러짐 방지, 연도 라벨과 동일 방식) */
.graph-grid-pill {
  position: absolute;
  left: 1.11%;                      /* PAD_L 16 / 1440 */
  transform: translateY(calc(-100% - 4px));  /* gridline 위 4px */
  display: inline-flex;
  align-items: center;
  height: 24px;
  padding: 0 16px;
  border: 1px solid #E5E5E5;
  border-radius: 45px;
  color: #BDC2C7;
  font-family: 'NanumSquare Neo', sans-serif;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: -0.02em;
  white-space: nowrap;
  pointer-events: none;
}

/* Korea 뱃지 — Figma Frame 1904 */
.pin-badge {
  height: 24px;
  padding: 0 16px;
  margin-bottom: 4px;
  background: var(--gradient);
  color: #fff;
  font-family: 'Pretendard', sans-serif;
  font-size: 14px;
  font-weight: 600;
  line-height: 24px;
  border-radius: 32px;
  white-space: nowrap;
}

/* ── 8-4. Section 4: 5P 원 수렴 → KOICA 원 ── */
.bg-5p-wrap {
  height: 100vh;
  height: 100dvh;
  margin-bottom: -100vh;
  margin-bottom: -100dvh;
  overflow: hidden;
  pointer-events: none;
  z-index: -1;
  position: relative;
}

/* 5P 원 공통 (Figma 320×320 = 22.22vw) */
.p-circle {
  position: absolute;
  width: 22.22vw;
  height: 22.22vw;
  min-width: 180px;
  min-height: 180px;
  max-width: 320px;
  max-height: 320px;
  border-radius: 50%;
  background: #F7FCFE;
  border: 1px dashed #CCE1F9;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  mix-blend-mode: multiply;
}

.p-circle span {
  font-family: 'NanumSquare Neo', 'NanumSquareNeo', sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 1.39vw, 20px);
  line-height: 1.6;
  color: #CCE1F9;
  text-transform: uppercase;
  text-align: center;
  user-select: none;
}

/* KOICA 원 */
.koica-circle {
  position: absolute;
  width: 22.22vw;
  height: 22.22vw;
  min-width: 180px;
  min-height: 180px;
  max-width: 320px;
  max-height: 320px;
  border-radius: 50%;
  background: #F7FCFE;
  border: none;
  transform: translate(-50%, -50%);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 10;   /* 5P 원 위에 표시 */

  background: #DAF0FA;
  mix-blend-mode: multiply;
}

.koica-circle span {
  font-family: 'NanumSquare Neo', 'NanumSquareNeo', sans-serif;
  font-weight: 700;
  font-size: clamp(14px, 1.39vw, 20px);
  line-height: 1.6;
  color: #02489B;
  text-transform: uppercase;
  text-align: center;
  user-select: none;
}

/* ── 9. 아웃트로 ── */
.outro-wrap {
  position: relative;
  height: 500vh;
  height: 500dvh;
  /* overflow: hidden 제거 — sticky가 작동하려면 필요 [버그 수정 D-rev] */
}

.outro-inner {
  position: sticky;
  top: 0;  /* nav 뒤로 겹침 허용 */
  width: 100%;
  height: 100vh;  /* nav 높이 무관 고정 */
  height: 100dvh;
  overflow: hidden;
}

.outro-image-layer {
  position: absolute;
  inset: 0;
  clip-path: circle(0% at 50% 50%);
  z-index: 2;
}

.outro-image {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: grayscale(1);
}

.outro-overlay {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.2);
  pointer-events: none;
}

.outro-ring {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 22.22vw;
  height: 22.22vw;
  min-width: 180px;
  min-height: 180px;
  max-width: 320px;
  max-height: 320px;
  transform: translate(-50%, -50%);
  border-radius: 50%;
  background: #DAF0FA;
  pointer-events: none;
  opacity: 0;
  z-index: 1;
}

.outro-content {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 32px;
  width: 84.44%;
  max-width: 1216px;
  z-index: 3;
}

.outro-text {
  font-family: 'NanumSquare Neo', 'NanumSquareNeo', sans-serif;
  font-weight: 700;
  font-size: clamp(32px, 5.56vw, 80px);
  line-height: 1.2;
  letter-spacing: -0.02em;
  text-align: center;
  color: #FFFFFF;
  opacity: 0;
  pointer-events: none;
}

.outro-btn {
  display: inline-flex;
  align-items: center;
  padding: 12px 28px;
  font-family: var(--font-nanum);
  font-weight: 700;
  font-size: 20px;
  color: #02489D;
  border: 1px solid #02489D;
  background: #FFF;
  border-radius: 100px;
  text-decoration: none;
  cursor: pointer;
  opacity: 0;
  transition: background 0.2s, border-color 0.2s;

}
.outro-btn:hover {
  background: rgba(255, 255, 255, 0.25);
  border-color: rgba(255, 255, 255, 0.7);
}
