/* ═══════════════════════════════════
   WHY NOVA SM — whynovasm.css
   이미지 레이아웃: 5개 이유 카드 + 중앙 제목
   카드 구조: 이미지가 카드 전체를 채우고, 텍스트 박스가 좌상단에 오버레이
═══════════════════════════════════ */

/* 데스크톱: 히어로는 한 화면, 푸터는 그 아래 */
@media (min-width: 769px) {
  body.wn_page {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
  }

  body.wn_page main {
    flex: 0 0 auto;
    display: flex;
    flex-direction: column;
    height: calc(100vh - var(--ms-header-h));
    height: calc(100dvh - var(--ms-header-h));
  }
}

/* ── 전체 히어로 섹션 ── */
.wn_hero {
  position: relative;
  background: var(--mainbg);
  width: 100%;
  display: flex;
  flex-direction: column;
  align-items: center;
  overflow: hidden;
  flex: 1;
  min-height: 0;
  height: 100%;
  padding: 0;
}

/* ── 배경 파티클 레이어 ── */
.wn_particles {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
}

/* ── 메인 그리드: 3열 × 3행 ── */
/* 좌 카드열 | 중앙 제목 | 우 카드열 */
.wn_grid {
  position: relative;
  z-index: 1;
  display: grid;
  grid-template-columns: 1fr 1.1fr 1fr;
  grid-template-rows: 1fr 1fr 1fr;
  width: 100%;
  height: 100%;
  min-height: 0;
  align-self: stretch; /* flex 부모의 align-items: center 영향 무시하고 좌우 꽉 채움 */
}

.wn_grid > * {
  min-height: 0;
}

/* ── 중앙 제목 블록 (1행, 2열): 행 1~3 점유 ── */
.wn_center {
  grid-column: 2;
  grid-row: 1 / 3;
  position: relative;
  z-index: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: visible;
  /* 진입 애니메이션 초기 상태 */
  opacity: 0;
  transform: translateY(-20px);
  transition: opacity 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s,
              transform 0.8s cubic-bezier(0.22, 1, 0.36, 1) 0.1s;
}

.wn_center.wn_visible {
  opacity: 1;
  transform: translateY(0);
}

/* 대형 원형 테두리 — 카드 이미지 뒤 레이어 */
.wn_center_circle {
  position: absolute;
  top: 48%;
  left: 50%;
  width: clamp(420px, 48vw, 680px);
  aspect-ratio: 1;
  border: 1px solid rgba(184, 168, 140, 0.6);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  pointer-events: none;
  z-index: 0;
}

/* 동심원 — 레퍼런스의 얇은 골드 링 느낌 */
.wn_center_circle::before,
.wn_center_circle::after {
  content: '';
  position: absolute;
  border-radius: 50%;
  pointer-events: none;
}

.wn_center_circle::before {
  inset: 14px;
  border: 1px solid rgba(184, 168, 140, 0.22);
}

.wn_center_circle::after {
  inset: -14px;
  border: 1px solid rgba(184, 168, 140, 0.14);
}

/* 제목·스파크 콘텐츠 */
.wn_center_content {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 20px;
  padding: 12px 16px;
}

/* 제목 */
.wn_title {
  font-family: var(--font-title);
  font-size: clamp(26px, 3.4vw, 40px);
  font-weight: 500;
  color: var(--text1);
  line-height: 1.55;
  letter-spacing: -0.01em;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.12em;
}

.wn_title_brand {
  --wn-logo-h: clamp(68px, 8.2vw, 108px);
  display: inline-flex;
  align-items: flex-start;
  justify-content: center;
  gap: 0.12em;
  white-space: nowrap;
  line-height: 1;
}

.wn_title_logo {
  display: block;
  height: var(--wn-logo-h);
  width: auto;
}

.wn_title_particle {
  font-size: inherit;
  font-weight: 500;
  line-height: 1;
  padding-top: calc(var(--wn-logo-h) * 0.22);
}

/* ── 골드 스파크 장식 ✦ ── */
.wn_spark {
  font-size: 22px;
  color: var(--border);
  line-height: 1;
  display: block;
  animation: wn_twinkle 3s ease-in-out infinite;
}

@keyframes wn_twinkle {
  0%, 100% { opacity: 1;   transform: scale(1);   }
  50%       { opacity: 0.4; transform: scale(0.7); }
}

.wn_spark--mid    { animation-delay: 0.6s; }
.wn_spark--bottom { animation-delay: 1.2s; }

/* ── 중앙 하단 스파크 (2행, 2열) ── */
.wn_center_bottom {
  grid-column: 2;
  grid-row: 2;
  position: relative;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  justify-content: center;
  padding-bottom: 8px;
  /* 진입 애니메이션 */
  opacity: 0;
  transition: opacity 0.5s ease 0.4s;
}

.wn_center_bottom.wn_visible {
  opacity: 1;
}

/* ── 태그라인 (3×3 그리드 8번째 칸: 중앙 하단) ── */
.wn_tagline {
  grid-column: 2;  /* 2열 (중앙) */
  grid-row: 3;     /* 3행 (하단) */
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding-top: 0;
  justify-content: center;
  align-items: center;  /* 수평 중앙 정렬 */
  text-align: center;   /* 텍스트 중앙 정렬 */
  /* 진입 애니메이션 */
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.75s ease 0.5s, transform 0.75s ease 0.5s;
}

.wn_tagline.wn_visible {
  opacity: 1;
  transform: translateY(0);
}

.wn_tagline_sub {
  font-family: var(--font-title-soft);
  font-size: clamp(12px, 1.1vw, 15px);
  color: var(--text2);
  letter-spacing: 0.04em;
}

.wn_tagline_main {
  font-family: var(--font-title);
  font-size: clamp(20px, 2.4vw, 36px);
  font-weight: 500;
  color: var(--text1);
  line-height: 1.5;
  letter-spacing: -0.01em;
}

/* 태그라인 끝 스파크 */
.wn_tagline_spark {
  display: inline-block;
  margin-left: 8px;
  font-size: 14px;
  color: var(--border);
  vertical-align: middle;
  animation: wn_twinkle 3s ease-in-out infinite 1.8s;
}

/* ═══════════════════════════════════
   카드 공통
   - 카드 전체가 이미지로 채워짐
   - 텍스트 박스가 좌상단에 절대 위치로 오버레이
═══════════════════════════════════ */

/* ── 카드 외부 컨테이너 ── */
.wn_card {
  position: relative;
  /* overflow: visible 로 텍스트박스가 카드 경계 밖으로 튀어나올 수 있게 함 */
  overflow: visible;
  /* 진입 전 숨김 */
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              transform 0.65s cubic-bezier(0.22, 1, 0.36, 1),
              box-shadow 0.3s ease;
}

.wn_card.wn_visible {
  opacity: 1;
  transform: translateY(0);
}

/* ── 카드 이미지: 카드 전체를 채움 ── */
.wn_card_img {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  overflow: hidden;
}

/* 3번: 바깥쪽(좌) 가장자리는 선명하게, 중앙 쪽만 페이드 */
.wn_card--3 .wn_card_img {
  -webkit-mask-image: linear-gradient(to right, #000 58%, transparent 100%);
  mask-image: linear-gradient(to right, #000 58%, transparent 100%);
}

.wn_card--2 .wn_card_img,
.wn_card--4 .wn_card_img,
.wn_card--5 .wn_card_img {
  -webkit-mask-image: linear-gradient(to left, #000 58%, transparent 100%);
  mask-image: linear-gradient(to left, #000 58%, transparent 100%);
}

/* 1번 카드: 사방 페더 + 가장자리 블러로 배경에 스며들게 */
.wn_card--1 .wn_card_img {
  overflow: visible;
  background-image: none;
  -webkit-mask-image: none;
  mask-image: none;
}

.wn_card--1 .wn_card_img::before,
.wn_card--1 .wn_card_img::after {
  content: '';
  position: absolute;
  inset: -8% -4% -4% -8%;
  background-image: url('../img/hp_lobby_blur.png?v=office');
  background-size: cover;
  background-repeat: no-repeat;
  background-position: 22% 30%; /* 우측 하단 어두운 전경 블롭 제외 */
  pointer-events: none;
}

/* 가장자리 소프트 블러 헤일로 */
.wn_card--1 .wn_card_img::before {
  filter: blur(24px);
  transform: scale(1.08);
  opacity: 0.8;
  -webkit-mask-image: radial-gradient(ellipse 105% 98% at 18% 22%, #000 26%, transparent 80%);
  mask-image: radial-gradient(ellipse 105% 98% at 18% 22%, #000 26%, transparent 80%);
}

/* 선명한 코어 — 가장자리만 짧게 페이드 */
.wn_card--1 .wn_card_img::after {
  -webkit-mask-image: radial-gradient(ellipse 102% 94% at 16% 20%, #000 36%, rgba(0, 0, 0, 0.55) 60%, transparent 85%);
  mask-image: radial-gradient(ellipse 102% 94% at 16% 20%, #000 36%, rgba(0, 0, 0, 0.55) 60%, transparent 85%);
}

/* 이미지 없을 때 플레이스홀더 색상 */
.wn_card_img--1 { background-image: none; } /* 1번은 의사요소에서 처리 */
.wn_card_img--2 { background-color: #0d1526; background-image: url('../img/지도_w.png'); border-top-left-radius: 20px; border-bottom-left-radius: 20px; inset: 0 0 10px 100px; margin-top: 40px;} /* 아시아 지도 — 2·5번만 왼쪽 inset으로 오른쪽 이동 */
.wn_card_img--3 { background-image: url('../img/sns_w.png'); background-size: contain; background-repeat: no-repeat; background-position: center; } /* SNS 폰 */
.wn_card_img--4 { background-color: #152040; background-image: url('../img/brand_strategy.png'); border-top-left-radius: 20px; border-bottom-left-radius: 20px; inset: 10px 0 10px 0; } /* 브랜드 책자 — 위아래 10px 여백 */
.wn_card_img--5 { background-color: #0a1220; background-image: url('../img/data.png'); border-top-left-radius: 20px; border-bottom-left-radius: 20px; inset: 10px 0 0 100px; margin-bottom: 40px;} /* 데이터 대시보드 — 2번과 동일하게 오른쪽으로 */

/* ── 텍스트 오버레이 박스 (이미지 위 좌상단) — 글래스모피즘 */
.wn_card_body {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 2;
  background: rgba(255, 255, 255, 0.78);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border: 1px solid rgba(255, 255, 255, 0.65);
  padding: 14px 18px;
  border-radius: 14px;
  max-width: 78%;
  display: flex;
  flex-direction: column;
  gap: 8px;
  box-shadow: 0 10px 28px rgba(21, 31, 52, 0.1);
}

/* 번호 — 골드 */
.wn_card_num {
  font-family: var(--logo_text);
  font-size: 30px;
  font-weight: 600;
  color: var(--border);
  letter-spacing: 0.06em;
  line-height: 1;
}

/* 설명 텍스트 */
.wn_card_text {
  font-family: var(--font-body);
  font-size: clamp(8px, 0.8vw, 13px);
  font-weight: 600;
  color: var(--text1);
  line-height: 1.9;
  letter-spacing: 0.02em;
}

/* ── 카드 그리드 배치 ── */
.wn_card--1 {
  grid-column: 1;
  grid-row: 1;
  z-index: 2;
}
.wn_card--2 { grid-column: 3; grid-row: 1; z-index: 2; }
.wn_card--3 { grid-column: 1; grid-row: 2 / 4; z-index: 2; }
.wn_card--4 { grid-column: 3; grid-row: 2; z-index: 2; }
.wn_card--5 { grid-column: 3; grid-row: 3; z-index: 2; }

/* 왼쪽 카드(1, 3)의 텍스트박스: 사이즈 유지하고 오른쪽으로 이동 */
.wn_card--1 .wn_card_body {
  transform: translateX(290%);
  box-shadow: 0 12px 32px rgba(21, 31, 52, 0.12);
}

.wn_card--3 .wn_card_body {
  transform: translateX(240%);
  box-shadow: 0 12px 32px rgba(21, 31, 52, 0.12);
}

.wn_card--2 .wn_card_body,
.wn_card--4 .wn_card_body,
.wn_card--5 .wn_card_body {
  transform: translateX(-30%);
  box-shadow: 0 12px 32px rgba(21, 31, 52, 0.12);
}

/* 2·5번 문구 박스: 이미지 inset(100px)과 동일하게 오른쪽으로 */
.wn_card--2 .wn_card_body,
.wn_card--5 .wn_card_body {
  transform: translateX(calc(-30% + 100px));
}

/* ═══════════════════════════════════
   반응형: 768px 이하 (태블릿)
═══════════════════════════════════ */
@media (max-width: 768px) {
  .wn_hero {
    height: auto;
    min-height: calc(100vh - var(--ms-header-h));
    padding: 50px 0;
  }

  /* 3열 → 2열로 축소 */
  .wn_grid {
    grid-template-columns: 1fr 1fr;
    grid-template-rows: 300px 300px 300px;
    height: auto;
  }

  /* 중앙 타이틀: 두 열 전체 점유 */
  .wn_center {
    grid-column: 1 / 3;
    grid-row: 1;
    justify-content: center;
  }

  .wn_center_circle {
    width: clamp(320px, 72vw, 480px);
  }

  .wn_center_circle::before { inset: 10px; }
  .wn_center_circle::after  { inset: -10px; }

  /* 카드 재배치: 2열 레이아웃 */
  .wn_card--1 {
    grid-column: 1;
    grid-row: 2;
    margin-top: 0;
    height: auto;
  }
  .wn_card--2 { grid-column: 2; grid-row: 2; }
  .wn_card--3 { grid-column: 1; grid-row: 3; }
  .wn_card--4 { grid-column: 2; grid-row: 3; }
  .wn_card--5 { grid-column: 1 / 3; grid-row: 4; min-height: 240px; }

  /* 4번 카드 오프셋 초기화 */
  .wn_card--4 { transform: translateY(24px); }
  .wn_card--4.wn_visible { transform: translateY(0); }

  /* 텍스트 박스 위치 정상화 */
  .wn_card--1 .wn_card_body,
  .wn_card--3 .wn_card_body {
    transform: none;
  }

  .wn_card--2 .wn_card_body,
  .wn_card--4 .wn_card_body,
  .wn_card--5 .wn_card_body {
    transform: none;
  }

  /* 중앙 하단 스파크 숨김 */
  .wn_center_bottom { display: none; }

  /* 태그라인: 두 열 점유 */
  .wn_tagline {
    grid-column: 1 / 3;
    grid-row: 5;
    padding: 20px 0;
  }

  /* 1번 카드: 모바일에서는 중앙 기준으로 페더 */
  .wn_card--1 .wn_card_img::before,
  .wn_card--1 .wn_card_img::after {
    inset: 0;
    background-position: 30% 40%;
  }

  .wn_card--1 .wn_card_img::before {
    -webkit-mask-image: radial-gradient(ellipse 98% 92% at 50% 45%, #000 32%, transparent 84%);
    mask-image: radial-gradient(ellipse 98% 92% at 50% 45%, #000 32%, transparent 84%);
  }

  .wn_card--1 .wn_card_img::after {
    -webkit-mask-image: radial-gradient(ellipse 94% 88% at 50% 45%, #000 42%, transparent 86%);
    mask-image: radial-gradient(ellipse 94% 88% at 50% 45%, #000 42%, transparent 86%);
  }

  /* 이미지 보정: 오른쪽 카드 radius 제거 */
  .wn_card_img--2,
  .wn_card_img--4,
  .wn_card_img--5 {
    border-radius: 0;
    inset: 0;
    margin: 0;
  }
}

/* ═══════════════════════════════════
   반응형: 480px 이하 (모바일)
═══════════════════════════════════ */
@media (max-width: 480px) {
  .wn_hero {
    padding: 32px var(--page-pad-x-mob-sm) 40px;
    overflow-x: hidden;
  }

  /* 1열 세로 스택 */
  .wn_grid {
    grid-template-columns: 1fr;
    grid-template-rows: auto;
    gap: 12px;
    width: 100%;
  }

  /* 타이틀 블록 */
  .wn_center {
    grid-column: 1;
    grid-row: 1;
    padding: 24px 0 8px;
    justify-content: center;
  }

  .wn_center_circle {
    width: min(86vw, 340px);
  }

  .wn_center_circle::before { inset: 8px; }
  .wn_center_circle::after  { inset: -8px; }

  .wn_center_content {
    gap: 16px;
  }

  .wn_title {
    font-size: clamp(22px, 6.5vw, 32px);
  }

  .wn_title_brand {
    --wn-logo-h: clamp(56px, 22vw, 84px);
  }

  .wn_spark {
    font-size: 18px;
  }

  /* 카드 전부 1열 순서대로 */
  .wn_card--1 { grid-column: 1; grid-row: 2; min-height: 220px; margin-top: 0; height: auto; }
  .wn_card--2 { grid-column: 1; grid-row: 3; min-height: 220px; }
  .wn_card--3 { grid-column: 1; grid-row: 4; min-height: 220px; }
  .wn_card--4 { grid-column: 1; grid-row: 5; min-height: 220px; }
  .wn_card--5 { grid-column: 1; grid-row: 6; min-height: 220px; }

  /* 4번 카드 오프셋 초기화 */
  .wn_card--4 { transform: translateY(24px); }
  .wn_card--4.wn_visible { transform: translateY(0); }

  /* 텍스트 박스: 오프셋 완전 제거 */
  .wn_card--1 .wn_card_body,
  .wn_card--2 .wn_card_body,
  .wn_card--3 .wn_card_body,
  .wn_card--4 .wn_card_body,
  .wn_card--5 .wn_card_body {
    transform: none;
    max-width: 85%;
  }

  /* 번호 폰트 축소 */
  .wn_card_num { font-size: 22px; }

  /* 이미지 radius·여백 보정 */
  .wn_card_img--2,
  .wn_card_img--4,
  .wn_card_img--5 {
    border-radius: 0;
    inset: 0;
    margin: 0;
  }

  /* 중앙 하단 스파크·태그라인 배치 */
  .wn_center_bottom { display: none; }

  .wn_tagline {
    grid-column: 1;
    grid-row: 7;
    padding: 16px 0 8px;
  }
}
