/* =============================================================
   Section 3 · Eco Activism — Pinned 스크롤리텔링 타임라인
   화면 고정(sticky) + 스크롤 진행에 따라 연도가 한 개씩 전환
   ============================================================= */

.activism {
  position: relative;
  background: var(--color-paper);
  color: var(--color-ink);
  padding-top: var(--space-24);
  /* ⚠ overflow:hidden 금지 — 조상 overflow는 자식 position:sticky를 깨뜨림 */
}
.activism::before {
  content: ""; position: absolute; inset: 0; pointer-events: none; z-index: 0;
  background:
    radial-gradient(60% 35% at 50% 0%, rgba(233,255,112,.16), transparent 60%),
    radial-gradient(60% 40% at 50% 100%, rgba(239,158,120,.12), transparent 60%);
}

/* ---------------- 헤더 (스크롤되어 사라짐) ---------------- */
.activism__head {
  position: relative; z-index: 2;
  max-width: 760px; margin: 0 auto var(--space-12);
  padding: 0 var(--space-6); text-align: center;
}
.activism__label {
  font-size: var(--fs-small); font-weight: var(--fw-bold);
  letter-spacing: .18em; color: var(--color-coral-deep); margin-bottom: var(--space-4);
}
.activism__title {
  font-size: clamp(2rem, 4vw, 3rem); font-weight: var(--fw-extra);
  line-height: 1.2; letter-spacing: var(--ls-tight); margin: 0 0 var(--space-6);
  color: var(--color-ink);
}
.activism__intro {
  font-size: 1.1rem; line-height: var(--lh-body);
  color: var(--color-subtext); margin: 0 auto; max-width: 52ch;
}

/* ================= Pinned 타임라인 ================= */
/* 스크롤 트랙: 항목 수 × step 높이 → 이 구간 동안 화면이 고정됨 */
.tl { position: relative; z-index: 2; --tl-step: 100vh; }
/* 트랙 높이 = (항목수-1)×step + 한 화면. 마커가 정확히 step 간격으로 놓임 */
.tl__track { position: relative; height: calc((var(--tl-count, 4) - 1) * var(--tl-step) + 100svh); }

.tl__sticky {
  position: sticky; top: 0;
  height: 100svh; overflow: hidden;
}

/* 연도별 스냅 마커 (보이지 않음) */
.tl__snap {
  position: absolute; left: 0; width: 1px; height: 1px; pointer-events: none;
  scroll-snap-align: start;
  scroll-snap-stop: always;   /* 빠른 스크롤도 연도를 건너뛰지 못하고 멈춤 */
}

/* 중심선 */
.tl__line {
  position: absolute; top: 0; bottom: 0; left: 50%;
  width: 3px; transform: translateX(-50%);
  background: linear-gradient(180deg, transparent, var(--color-ink) 14%,
    var(--color-ink) 80%, var(--color-coral-deep) 100%);
  opacity: .9;
}

.tl__stage {
  position: absolute; inset: 0;   /* sticky 뷰포트를 가득 채움 */
}

/* ---------------- 각 연도 항목 (겹쳐 쌓임) ---------------- */
/* 한 슬라이드 = 하나의 블록. 세로 컨베이어처럼 함께 이동 */
.tl-item {
  position: absolute; inset: 0;
  display: grid; grid-template-columns: 1fr auto 1fr; align-items: center;
  padding: 0 var(--space-6);
  opacity: 0; transform: translateY(64px); pointer-events: none;
  transition: opacity .6s cubic-bezier(.2,.8,.2,1),
              transform .6s cubic-bezier(.2,.8,.2,1);
}
.tl-item.is-active { opacity: 1; transform: translateY(0); pointer-events: auto; }
.tl-item.is-past   { opacity: 0; transform: translateY(-64px); }  /* 위로 빠져나감 */

/* 좌: 사진 / 우: 설명 / 가운데: 연도 — 레이아웃만 (애니메이션은 블록 단위) */
.tl-media { justify-self: end; width: 100%; max-width: 460px; padding-right: var(--space-12); }
.tl-node {
  justify-self: center; position: relative; z-index: 3;
  font-size: clamp(1.4rem, 2.3vw, 2rem); font-weight: var(--fw-extra);
  color: var(--on-lime); background: var(--color-lime);
  padding: .35em .8em; border-radius: var(--radius-pill);
  box-shadow: 0 0 0 10px var(--color-paper), 0 6px 18px rgba(120,140,40,.25);
}
.tl-body { justify-self: start; max-width: 460px; padding-left: var(--space-12); }

/* ---------------- 사진 플레이스홀더 ---------------- */
.ph {
  position: relative; aspect-ratio: 4 / 3; width: 100%;
  border-radius: var(--radius-lg);
  background: linear-gradient(135deg, rgba(233,255,112,.22), rgba(239,158,120,.12)), var(--color-paper-soft);
  border: 1.5px dashed rgba(160,180,90,.7);
  display: grid; place-content: center; gap: var(--space-3);
  text-align: center; color: var(--color-subtext);
}
.ph--coral { border-color: rgba(229,131,90,.65);
  background: linear-gradient(135deg, rgba(239,158,120,.22), rgba(233,255,112,.10)), var(--color-paper-soft); }
.ph svg { width: 46px; height: 46px; margin: 0 auto; color: #9bb33f; }
.ph--coral svg { color: var(--color-coral-deep); }
.ph__cap { font-size: var(--fs-small); letter-spacing: .04em; }
.ph__tag {
  position: absolute; top: 14px; left: 14px;
  font-size: .75rem; font-weight: var(--fw-semibold);
  padding: 4px 10px; border-radius: var(--radius-pill);
  background: var(--color-ink); color: var(--color-lime);
}

/* ---------------- 설명 ---------------- */
.tl-kicker {
  font-size: var(--fs-small); font-weight: var(--fw-bold);
  letter-spacing: .14em; color: var(--color-coral-deep); margin-bottom: var(--space-3);
}
.tl-title {
  font-size: clamp(1.5rem, 2.6vw, 2.1rem); font-weight: var(--fw-bold);
  line-height: 1.25; letter-spacing: var(--ls-tight);
  margin: 0 0 var(--space-4); color: var(--color-ink);
}
.tl-desc { font-size: 1.02rem; line-height: var(--lh-body); color: #3a4038; margin: 0 0 var(--space-6); }
.tl-steps { display: flex; flex-wrap: wrap; gap: var(--space-2); list-style: none; padding: 0; margin: 0; }
.tl-steps li {
  font-size: .82rem; font-weight: var(--fw-medium);
  padding: 5px 12px; border-radius: var(--radius-pill);
  color: var(--color-ink); border: 1px solid var(--color-line);
}
.tl-steps li::before { content: "•"; color: var(--color-lime-deep); margin-right: .4em; }

/* ---------------- 진행 표시 (연도 도트) ---------------- */
.tl__dots {
  position: absolute; right: var(--space-8); top: 50%; transform: translateY(-50%);
  display: flex; flex-direction: column; gap: var(--space-4);
  list-style: none; margin: 0; padding: 0; z-index: 5;
}
.tl__dot {
  display: flex; align-items: center; gap: 10px;
  background: none; border: 0; cursor: pointer;
  color: var(--color-subtext); font-size: .8rem; font-weight: var(--fw-semibold);
  font-variant-numeric: tabular-nums; transition: color .3s ease;
}
.tl__dot .bullet {
  width: 11px; height: 11px; border-radius: 50%;
  border: 1.5px solid currentColor; transition: all .3s ease;
}
.tl__dot.is-active { color: var(--color-ink); }
.tl__dot.is-active .bullet {
  background: var(--color-lime); border-color: var(--color-lime-deep);
  box-shadow: 0 2px 8px rgba(120,140,40,.35); transform: scale(1.2);
}

/* 스크롤 힌트 */
.tl__hint {
  position: absolute; bottom: 28px; left: 50%; transform: translateX(-50%);
  display: flex; align-items: center; gap: 8px; z-index: 5;
  font-size: var(--fs-small); color: var(--color-subtext); letter-spacing: .04em;
  animation: floaty 2.6s ease-in-out infinite;
}

/* ---------------- Responsive ---------------- */
@media (max-width: 860px) {
  .tl { --tl-step: 90vh; }
  .tl__line { left: 26px; }
  .tl-item { grid-template-columns: 1fr; align-content: center; gap: var(--space-6);
    padding: 0 var(--space-6) 0 60px; }
  .tl-media, .tl-body { justify-self: stretch; max-width: none; padding: 0; }
  .tl-node { justify-self: start; position: absolute; left: 26px; top: 50%;
    transform: translate(-50%, -50%); font-size: 1.05rem; }
  .tl__dots { right: var(--space-3); gap: var(--space-3); }
  .tl__dot span:last-child { display: none; }   /* 연도 텍스트 숨김, 점만 */
}

@media (prefers-reduced-motion: reduce) {
  .tl-item, .tl-media, .tl-body, .tl-node { transition: none; }
  .tl__hint { animation: none; }
}
