/* ==========================================================
   pumda-style-v2-motion.css
   = 기존 pumda-style-v2.css 디자인 그대로 + CSS 전용 모션(JS 불필요)
   - 기존 .js-on / .show 규칙은 JS가 실행되지 않아 제거했습니다.
   - 맨 아래 "스크롤 모션" 구역만 따로 복사해서 써도 됩니다.
   ========================================================== */

/* 공통 */
#pumda * {
  box-sizing: border-box;
  font-family: 'Noto Sans KR', sans-serif;
  margin: 0;
  padding: 0;
}
:root { --brand: #800020; }

/* =========================
   HERO – 전체폭 + 커버
   ========================= */
#pumda .hero {
  position: relative;
  width: 100%;
  height: 400px;
  overflow: hidden;
}
#pumda .hero img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
  opacity: 1;
  transform: none;
}
#pumda .hero h1 {
  position: absolute;
  top: 10%;
  left: 50%;
  transform: translateX(-50%);
  color: #fff;
  font-weight: 800;
  font-size: clamp(24px, 3vw, 38px);
  text-align: center;
  text-shadow: 0 2px 6px rgba(0,0,0,.6);
  white-space: nowrap;
  opacity: 1;
}

/* =========================
   인트로 박스 - 폰트 키우고 가로 넓게
   ========================= */
#pumda .intro-box {
  max-width: 1100px;
  margin: 48px auto 40px;
  padding: 32px 48px;
  background: #fff;
  border: 1px solid #eee;
  border-radius: 12px;
  box-shadow: 0 4px 20px rgba(0,0,0,.06);
  line-height: 1.9;
  text-align: center;
}
#pumda .intro-box p { 
  margin-bottom: 16px; 
  font-size: 18px;
}
#pumda .intro-box p strong { 
  color: var(--brand); 
  font-size: 19px;
}

/* 두 번째 문단 이후 좌측 정렬 */
#pumda .intro-box p:nth-of-type(n+2) {
  text-align: left;
}

/* =========================
   지그재그 섹션
   ========================= */
#pumda .zigzag {
  max-width: 1120px;
  margin: 40px auto 80px;
  display: flex;
  flex-direction: column;
  gap: 48px;
  padding: 0 16px;
}
#pumda .block {
  display: flex;
  align-items: center;
  gap: 28px;
  opacity: 1;
  transform: none;
}
#pumda .block:nth-child(even) { flex-direction: row-reverse; }
#pumda .imgwrap { 
  flex: 0 0 42%; 
  overflow: hidden; 
}
#pumda .imgwrap img {
  width: 100%;
  height: 420px;
  object-fit: cover;
  border-radius: 10px;
  display: block;
}
#pumda .textwrap {
  flex: 1;
  position: relative;
  padding: 6px 20px 6px 28px;
}
#pumda .textwrap::before {
  content: "";
  position: absolute;
  left: 0;
  top: .2em;
  bottom: .2em;
  width: 4px;
  background: var(--brand);
  border-radius: 2px;
}
#pumda .block:nth-child(even) .textwrap { padding: 6px 28px 6px 20px; }
#pumda .block:nth-child(even) .textwrap::before { left: auto; right: 0; }
#pumda .kicker {
  display: inline-flex;
  gap: 6px;
  color: var(--brand);
  font: bold 13px/1 "Noto Sans KR", sans-serif;
  margin-bottom: 8px;
}
#pumda .kicker::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--brand);
  margin-top: 3px;
}
#pumda .textwrap h2 {
  font-size: 24px;
  font-weight: 800;
  color: var(--brand);
  margin: 6px 0 10px;
}
#pumda .textwrap p {
  font-size: 16px;
  line-height: 1.85;
  color: #222;
}
#pumda .value-list {
  list-style: disc;
  margin-left: 18px;
}
#pumda .value-list li { margin: 6px 0; }

/* =========================
   다이어그램
   ========================= */
#pumda .diagram-section {
  max-width: 1100px;
  margin: 80px auto 60px;
  padding: 40px 16px;
  text-align: center;
}
#pumda .pumda-diagram {
  position: relative;
  width: 700px;
  height: 700px;
  margin: 0 auto;
}
#pumda .center {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  width: 272px;
  height: 272px;
  background: #fff;
  border: 8px solid rgb(103, 25, 44);
  border-radius: 50%;
  display: flex;
  justify-content: center;
  align-items: center;
  z-index: 2;
}
#pumda .center .logo { width: 180px; height: auto; }
#pumda .small-circle {
  position: absolute;
  width: 126px;
  height: 126px;
  border: 5px solid rgb(103, 25, 44);
  border-radius: 50%;
  background: #fff;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;
  z-index: 1;
}
#pumda .small-circle span {
  color: #000;
  font-size: 22px;
  font-weight: 600;
  line-height: 1.3;
  padding: 5px;
}
/* 원 5개를 같은 간격(72°)으로 배치: 중심 50%/50%, 반지름 41% */
#pumda .pumda-diagram::before {          /* 원들을 잇는 얇은 점선 궤도 (싫으면 이 블록 삭제) */
  content: "";
  position: absolute;
  inset: 9%;
  border: 1px dashed #ccc;
  border-radius: 50%;
  z-index: 0;
}
#pumda .circle-12,
#pumda .circle-1,
#pumda .circle-5,
#pumda .circle-7,
#pumda .circle-11 {
  top: auto; right: auto; bottom: auto; left: auto;   /* 기존 위치값 초기화 */
  transform: translate(-50%, -50%);
}
#pumda .circle-12 { left: 50%;   top: 9%; }      /* 12시 */
#pumda .circle-1  { left: 89%;   top: 37.3%; }   /* 약 2시 */
#pumda .circle-5  { left: 74.1%; top: 83.2%; }   /* 약 5시 */
#pumda .circle-7  { left: 25.9%; top: 83.2%; }   /* 약 7시 */
#pumda .circle-11 { left: 11%;   top: 37.3%; }   /* 약 10시 */

/* =========================
   반응형
   ========================= */
@media (max-width: 900px) {
  #pumda .hero { height: 300px; }
  #pumda .hero h1 { white-space: normal; top: 6%; font-size: 22px; }
  #pumda .intro-box { 
    max-width: 90%; 
    padding: 24px 28px; 
  }
  #pumda .intro-box p { font-size: 16px; }
  #pumda .intro-box p strong { font-size: 17px; }
  #pumda .block { flex-direction: column !important; }
  #pumda .imgwrap { width: 100%; }
  #pumda .imgwrap img { height: auto; aspect-ratio: 475/420; }
  #pumda .textwrap { padding: 12px !important; }
  #pumda .textwrap::before { left: 0 !important; right: auto !important; }
  #pumda .pumda-diagram { width: 450px; height: 450px; }
  #pumda .center { width: 204px; height: 204px; }
  #pumda .center .logo { width: 135px; }
  #pumda .small-circle { width: 95px; height: 95px; }
  #pumda .small-circle span { font-size: 12px; }
}
@media (max-width: 500px) {
  #pumda .intro-box p { font-size: 15px; }
  #pumda .pumda-diagram { width: 350px; height: 350px; }
  #pumda .center { width: 160px; height: 160px; }
  #pumda .center .logo { width: 105px; }
  #pumda .small-circle { width: 75px; height: 75px; }
  #pumda .small-circle span { font-size: 10px; }
}


/* ==========================================================
   스크롤 모션 (CSS 전용 / 기존 디자인은 건드리지 않고 이동만 추가)
   ▷ 이동 거리: --shift 값 (크게 = 더 멀리서 들어옴)
   ▷ 속도: animation-range의 % (작게 = 스크롤을 조금만 해도 끝남)
   ▷ 모션이 아예 안 보이면: 컴퓨터/휴대폰의 '애니메이션 효과 줄이기' 설정 확인
   ========================================================== */
#pumda {
  overflow-x: clip;                      /* 옆으로 밀린 요소 때문에 가로 스크롤 생기는 것 방지 */
  --shift: clamp(140px, 24vw, 320px);    /* 데스크톱 이동 거리 */
}
@media (max-width: 900px) {
  #pumda { --shift: 48vw; }              /* 모바일: 화면 폭의 절반 가까이 */
}

@keyframes pumda-from-left  { from { opacity: 0; translate: calc(var(--shift) * -1) 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pumda-from-right { from { opacity: 0; translate: var(--shift) 0; }              to { opacity: 1; translate: 0 0; } }
@keyframes pumda-converge   { from { opacity: 0; translate: var(--dx) var(--dy); }         to { opacity: 1; translate: 0 0; } }
@keyframes pumda-pop        { from { opacity: 0; scale: .6; }                              to { opacity: 1; scale: 1; } }

/* 히어로: 페이지를 열자마자 1회 재생 (제목은 오른쪽에서, 사진은 서서히) */
@keyframes pumda-hero-title { from { opacity: 0; translate: 36vw 0; } to { opacity: 1; translate: 0 0; } }
@keyframes pumda-hero-img   { from { opacity: 0; scale: 1.08; }       to { opacity: 1; scale: 1; } }

@media (prefers-reduced-motion: no-preference) {

  #pumda .hero img { animation: pumda-hero-img .9s ease-out backwards; }
  #pumda .hero h1  { animation: pumda-hero-title 1s cubic-bezier(.2,.7,.2,1) .25s backwards; }

  @supports (animation-timeline: view()) {

    /* ---- 지그재그: 이미지와 텍스트가 반대쪽에서 가운데로 ---- */
    #pumda .block { view-timeline: --pumda-block block; }

    #pumda .imgwrap,
    #pumda .textwrap { transition: none; }
    #pumda .imgwrap img { transition: none; }

    /* 홀수 블록: 이미지 ← 왼쪽 / 텍스트 → 오른쪽 */
    #pumda .block .imgwrap {
      animation: pumda-from-left linear both;
      animation-timeline: --pumda-block;      /* animation 뒤에 써야 적용됩니다 */
      animation-range: entry 0% entry 40%;
    }
    #pumda .block .textwrap {
      animation: pumda-from-right linear both;
      animation-timeline: --pumda-block;
      animation-range: entry 10% entry 50%;   /* 이미지보다 조금 늦게 */
    }
    /* 짝수 블록: 방향 반대 */
    #pumda .block:nth-child(even) .imgwrap  { animation-name: pumda-from-right; }
    #pumda .block:nth-child(even) .textwrap { animation-name: pumda-from-left; }

    /* ---- 다이어그램: 가운데 로고 → 원 5개가 바깥에서 차례로 ---- */
    #pumda .pumda-diagram { view-timeline: --pumda-dia block; }

    #pumda .center {
      animation: pumda-pop linear both;
      animation-timeline: --pumda-dia;
      animation-range: entry 0% entry 25%;
    }
    #pumda .small-circle {
      animation: pumda-converge linear both;
      animation-timeline: --pumda-dia;
    }
    /* 각 원이 자기 자리에서 바깥 방향으로 300px 떨어진 곳에서 출발 */
    #pumda .circle-12 { --dx: 0;      --dy: -220px; animation-range: entry 5%  entry 30%; }
    #pumda .circle-1  { --dx: 285px;  --dy: -93px;  animation-range: entry 13% entry 38%; }
    #pumda .circle-5  { --dx: 176px;  --dy: 243px;  animation-range: entry 21% entry 46%; }
    #pumda .circle-7  { --dx: -176px; --dy: 243px;  animation-range: entry 29% entry 54%; }
    #pumda .circle-11 { --dx: -285px; --dy: -93px;  animation-range: entry 37% entry 62%; }

    @media (max-width: 900px) {
      #pumda .circle-12 { --dy: -120px; }
      #pumda .circle-1  { --dx: 157px;  --dy: -51px; }
      #pumda .circle-5  { --dx: 97px;   --dy: 134px; }
      #pumda .circle-7  { --dx: -97px;  --dy: 134px; }
      #pumda .circle-11 { --dx: -157px; --dy: -51px; }
    }
  }
}
