/* ============================================================
   WW-HERO-SLIDER.CSS  — v1.0  2026
   W-WEBSOFT Cinematic Hero Slider
   ============================================================ */

/* ══════════════════════════════════════════════════════════
   § 기본 리셋 & 변수
   ══════════════════════════════════════════════════════════ */
.whs {
  position: relative;
  width: 100%;
  min-height: 100svh;
  min-height: 100vh;
  overflow: hidden;
  background: #040812;
}

/* ══════════════════════════════════════════════════════════
   § 슬라이드 트랙
   ══════════════════════════════════════════════════════════ */
.whs__track {
  position: relative;
  width: 100%;
  height: 100%;
  min-height: inherit;
}

/* ══════════════════════════════════════════════════════════
   § 개별 슬라이드
   ══════════════════════════════════════════════════════════ */
.whs__slide {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  min-height: 100svh;
  min-height: 100vh;
  padding-bottom: 90px; /* 컨트롤 영역 공간 */
  opacity: 0;
  visibility: hidden;
  transition:
    opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
    visibility 0.85s;
  will-change: opacity;
}

.whs__slide.is-active {
  opacity: 1;
  visibility: visible;
  position: relative; /* 높이 확보 */
}

.whs__slide.is-leaving {
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
}

/* ── 슬라이드별 배경 그라디언트 ── */
.whs__slide--1 .whs__bg-grad {
  background: radial-gradient(ellipse 80% 100% at 60% 40%, #1a2fc4 0%, #0a0e2e 55%, #040812 100%);
}
.whs__slide--2 .whs__bg-grad {
  background: radial-gradient(ellipse 80% 100% at 40% 40%, #5b21b6 0%, #1e1b4b 50%, #040812 100%);
}
.whs__slide--3 .whs__bg-grad {
  background: radial-gradient(ellipse 80% 100% at 55% 40%, #0e7490 0%, #0c1a30 50%, #040812 100%);
}

/* ── 슬라이드별 Orb 색상 ── */
.whs__slide--1 .whs__orb--a {
  background: radial-gradient(circle, rgba(37,99,235,0.45) 0%, transparent 70%);
}
.whs__slide--1 .whs__orb--b {
  background: radial-gradient(circle, rgba(124,58,237,0.3) 0%, transparent 70%);
}
.whs__slide--2 .whs__orb--a {
  background: radial-gradient(circle, rgba(124,58,237,0.5) 0%, transparent 70%);
}
.whs__slide--2 .whs__orb--b {
  background: radial-gradient(circle, rgba(91,33,182,0.35) 0%, transparent 70%);
}
.whs__slide--3 .whs__orb--a {
  background: radial-gradient(circle, rgba(6,182,212,0.45) 0%, transparent 70%);
}
.whs__slide--3 .whs__orb--b {
  background: radial-gradient(circle, rgba(16,87,245,0.3) 0%, transparent 70%);
}

/* ══════════════════════════════════════════════════════════
   § 배경 레이어
   ══════════════════════════════════════════════════════════ */
.whs__bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
}

.whs__bg-grad {
  position: absolute;
  inset: 0;
}

/* 노이즈 텍스처 */
.whs__bg-noise {
  position: absolute;
  inset: 0;
  opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='1'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* 격자선 장식 */
.whs__bg-lines {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.03) 1px, transparent 1px);
  background-size: 60px 60px;
  mask-image: radial-gradient(ellipse 80% 80% at 50% 50%, black 0%, transparent 100%);
}

/* 플로팅 Orb */
.whs__orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(80px);
  pointer-events: none;
  animation: whsOrbFloat 8s ease-in-out infinite alternate;
}
.whs__orb--a {
  width: 600px;
  height: 600px;
  top: -10%;
  right: -5%;
  animation-delay: 0s;
}
.whs__orb--b {
  width: 400px;
  height: 400px;
  bottom: 0;
  left: 10%;
  animation-delay: -4s;
}
@keyframes whsOrbFloat {
  from { transform: translate(0, 0) scale(1); }
  to   { transform: translate(30px, -30px) scale(1.08); }
}

/* ══════════════════════════════════════════════════════════
   § 슬라이드 내부 레이아웃
   ══════════════════════════════════════════════════════════ */
.whs__inner {
  position: relative;
  z-index: 2;
  width: 100%;
}

.whs__layout {
  display: grid;
  grid-template-columns: 1fr 480px;
  gap: 60px;
  align-items: center;
  min-height: calc(100svh - 90px);
  min-height: calc(100vh - 90px);
  padding: 120px 0 60px;
}

.whs__layout--center {
  grid-template-columns: 1fr;
  max-width: 900px;
  margin: 0 auto;
  text-align: center;
}

/* ══════════════════════════════════════════════════════════
   § 콘텐츠 영역
   ══════════════════════════════════════════════════════════ */
.whs__content {
  color: #fff;
}
.whs__content--wide {
  max-width: 800px;
  margin: 0 auto;
}

/* 입장 애니메이션 */
.whs__slide.is-active .whs__eyebrow {
  animation: whsFadeUp 0.7s 0.1s both cubic-bezier(0.16, 1, 0.3, 1);
}
.whs__slide.is-active .whs__heading {
  animation: whsFadeUp 0.7s 0.22s both cubic-bezier(0.16, 1, 0.3, 1);
}
.whs__slide.is-active .whs__desc {
  animation: whsFadeUp 0.65s 0.38s both cubic-bezier(0.16, 1, 0.3, 1);
}
.whs__slide.is-active .whs__actions {
  animation: whsFadeUp 0.65s 0.5s both cubic-bezier(0.16, 1, 0.3, 1);
}
.whs__slide.is-active .whs__stats {
  animation: whsFadeUp 0.6s 0.62s both cubic-bezier(0.16, 1, 0.3, 1);
}
.whs__slide.is-active .whs__visual {
  animation: whsFadeLeft 0.85s 0.3s both cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes whsFadeUp {
  from { opacity: 0; transform: translateY(28px); }
  to   { opacity: 1; transform: none; }
}
@keyframes whsFadeLeft {
  from { opacity: 0; transform: translateX(40px); }
  to   { opacity: 1; transform: none; }
}

/* ── 배지/아이브로우 ── */
.whs__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.7);
  margin-bottom: 22px;
}
.whs__eyebrow-dot {
  display: inline-block;
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #60a5fa;
  box-shadow: 0 0 8px #60a5fa;
  animation: whsPulse 2s ease-in-out infinite;
}
@keyframes whsPulse {
  0%, 100% { box-shadow: 0 0 6px #60a5fa; }
  50%       { box-shadow: 0 0 18px #60a5fa, 0 0 36px rgba(96,165,250,0.4); }
}

/* ── 헤딩 ── */
.whs__heading {
  display: flex;
  flex-direction: column;
  gap: 4px;
  font-size: clamp(2.4rem, 5.5vw, 4.8rem);
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.035em;
  margin: 0 0 28px;
  word-break: keep-all;
}
.whs__heading-line {
  display: block;
  color: #ffffff;
}
.whs__heading-line--accent {
  background: linear-gradient(90deg, #60a5fa 0%, #a78bfa 50%, #f0abfc 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

/* 슬라이드2 액센트 */
.whs__slide--2 .whs__heading-line--accent {
  background: linear-gradient(90deg, #a78bfa 0%, #e879f9 50%, #f0abfc 100%);
  -webkit-background-clip: text;
  background-clip: text;
}
/* 슬라이드3 액센트 */
.whs__slide--3 .whs__heading-line--accent {
  background: linear-gradient(90deg, #22d3ee 0%, #38bdf8 50%, #60a5fa 100%);
  -webkit-background-clip: text;
  background-clip: text;
}

/* ── 설명 텍스트 ── */
.whs__desc {
  font-size: clamp(0.95rem, 1.4vw, 1.1rem);
  line-height: 1.85;
  color: rgba(255, 255, 255, 0.65);
  margin: 0 0 36px;
  word-break: keep-all;
}

/* ── 버튼 ── */
.whs__actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.whs__btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  height: 52px;
  padding: 0 28px;
  border-radius: 99px;
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: -0.01em;
  text-decoration: none;
  transition:
    transform 0.22s cubic-bezier(0.34, 1.56, 0.64, 1),
    box-shadow 0.22s ease,
    background 0.2s ease;
  white-space: nowrap;
}
.whs__btn--primary {
  background: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
  color: #fff;
  box-shadow: 0 4px 24px rgba(37, 99, 235, 0.45);
}
.whs__btn--primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 36px rgba(37, 99, 235, 0.6);
}
.whs__btn--ghost {
  background: rgba(255, 255, 255, 0.08);
  border: 1.5px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.9);
  backdrop-filter: blur(8px);
}
.whs__btn--ghost:hover {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.35);
  transform: translateY(-2px);
}

/* ── 통계 (슬라이드2) ── */
.whs__stats {
  display: flex;
  align-items: center;
  gap: 32px;
  margin-top: 44px;
  padding-top: 36px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}
.whs__stat {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.whs__stat strong {
  font-size: clamp(1.8rem, 3vw, 2.6rem);
  font-weight: 900;
  letter-spacing: -0.04em;
  color: #fff;
  line-height: 1;
}
.whs__stat strong span {
  font-size: 0.6em;
  color: #60a5fa;
}
.whs__stat > span {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.55);
  letter-spacing: 0.02em;
}
.whs__stat-sep {
  width: 1px;
  height: 40px;
  background: rgba(255, 255, 255, 0.12);
  flex-shrink: 0;
}

/* ══════════════════════════════════════════════════════════
   § 비주얼 영역 (슬라이드1)
   ══════════════════════════════════════════════════════════ */
.whs__visual {
  position: relative;
}

.whs__visual-card {
  position: relative;
}

/* 브라우저 목업 */
.whs__browser {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 16px;
  overflow: hidden;
  backdrop-filter: blur(12px);
  box-shadow:
    0 32px 80px rgba(0, 0, 0, 0.5),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
}
.whs__browser-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 12px 16px;
  background: rgba(255, 255, 255, 0.04);
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
}
.whs__browser-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.2);
}
.whs__browser-dot:nth-child(1) { background: rgba(255, 95, 87, 0.7); }
.whs__browser-dot:nth-child(2) { background: rgba(255, 189, 46, 0.7); }
.whs__browser-dot:nth-child(3) { background: rgba(40, 201, 64, 0.7); }
.whs__browser-url {
  flex: 1;
  text-align: center;
  font-size: 0.72rem;
  color: rgba(255, 255, 255, 0.4);
  letter-spacing: 0.03em;
}
.whs__browser-screen {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 52px 32px;
  background: linear-gradient(135deg, #1057f5 0%, #7c3aed 100%);
  min-height: 220px;
  text-align: center;
}
.whs__browser-icon {
  font-size: 52px;
  color: rgba(255, 255, 255, 0.6);
  margin-bottom: 14px;
  animation: whsIconFloat 3s ease-in-out infinite;
}
@keyframes whsIconFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-8px); }
}
.whs__browser-name {
  font-size: 1.2rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -0.02em;
}
.whs__browser-sub {
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

/* 플로팅 배지 */
.whs__badge {
  position: absolute;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  padding: 10px 16px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.15);
  backdrop-filter: blur(16px);
  color: rgba(255, 255, 255, 0.9);
  font-size: 0.8rem;
  font-weight: 600;
  white-space: nowrap;
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}
.whs__badge--tl {
  top: -18px;
  left: -24px;
  animation: whsBadgeFloat 4s ease-in-out infinite;
}
.whs__badge--br {
  bottom: -18px;
  right: -20px;
  animation: whsBadgeFloat 4s 2s ease-in-out infinite;
}
@keyframes whsBadgeFloat {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-6px); }
}

/* ── 슬라이드2 센터 레이아웃 아이브로우 ── */
.whs__layout--center .whs__eyebrow {
  justify-content: center;
}

/* ── 기술 그리드 (슬라이드3) ── */
.whs__visual--tech {
  display: flex;
  align-items: center;
  justify-content: center;
}
.whs__tech-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 16px;
  width: 100%;
  max-width: 380px;
}
.whs__tech-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
  padding: 28px 16px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 16px;
  backdrop-filter: blur(8px);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: transform 0.3s ease, background 0.3s ease;
}
.whs__tech-item:hover {
  background: rgba(255, 255, 255, 0.1);
  transform: translateY(-4px);
}
.whs__tech-item i {
  font-size: 1.8rem;
  color: #60a5fa;
}
.whs__slide--3 .whs__tech-item i { color: #22d3ee; }

.whs__slide.is-active .whs__tech-item:nth-child(1) { animation: whsFadeUp 0.6s 0.3s both cubic-bezier(0.16,1,0.3,1); }
.whs__slide.is-active .whs__tech-item:nth-child(2) { animation: whsFadeUp 0.6s 0.38s both cubic-bezier(0.16,1,0.3,1); }
.whs__slide.is-active .whs__tech-item:nth-child(3) { animation: whsFadeUp 0.6s 0.46s both cubic-bezier(0.16,1,0.3,1); }
.whs__slide.is-active .whs__tech-item:nth-child(4) { animation: whsFadeUp 0.6s 0.54s both cubic-bezier(0.16,1,0.3,1); }
.whs__slide.is-active .whs__tech-item:nth-child(5) { animation: whsFadeUp 0.6s 0.62s both cubic-bezier(0.16,1,0.3,1); }
.whs__slide.is-active .whs__tech-item:nth-child(6) { animation: whsFadeUp 0.6s 0.70s both cubic-bezier(0.16,1,0.3,1); }

/* ══════════════════════════════════════════════════════════
   § 컨트롤 바
   ══════════════════════════════════════════════════════════ */
.whs__controls {
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 10;
  padding: 0 0 28px;
  background: linear-gradient(to top, rgba(0,0,0,0.45) 0%, transparent 100%);
}
.whs__controls-inner {
  display: flex;
  align-items: center;
  gap: 20px;
  padding-top: 20px;
}

/* 진행바 */
.whs__progress {
  flex: 1;
  height: 2px;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 2px;
  overflow: hidden;
}
.whs__progress-bar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #60a5fa, #a78bfa);
  border-radius: 2px;
  transform-origin: left;
}

/* 카운터 */
.whs__counter {
  display: flex;
  align-items: baseline;
  gap: 3px;
  font-variant-numeric: tabular-nums;
  flex-shrink: 0;
}
.whs__counter-cur {
  font-size: 1.35rem;
  font-weight: 800;
  color: #fff;
  line-height: 1;
}
.whs__counter-sep {
  font-size: 0.8rem;
  color: rgba(255, 255, 255, 0.35);
  margin: 0 2px;
}
.whs__counter-total {
  font-size: 0.85rem;
  color: rgba(255, 255, 255, 0.4);
}

/* 도트 내비 */
.whs__dots {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}
.whs__dot {
  width: 8px;
  height: 8px;
  border-radius: 99px;
  background: rgba(255, 255, 255, 0.3);
  border: none;
  cursor: pointer;
  padding: 0;
  transition:
    width 0.35s cubic-bezier(0.34, 1.56, 0.64, 1),
    background 0.25s ease;
}
.whs__dot.is-active {
  width: 28px;
  background: #fff;
}

/* 화살표 버튼 */
.whs__arrows {
  display: flex;
  gap: 8px;
  flex-shrink: 0;
}
.whs__arrow {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.14);
  color: rgba(255, 255, 255, 0.8);
  cursor: pointer;
  font-size: 1rem;
  transition:
    background 0.2s ease,
    border-color 0.2s ease,
    transform 0.2s ease;
  backdrop-filter: blur(8px);
}
.whs__arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  border-color: rgba(255, 255, 255, 0.3);
  transform: scale(1.08);
}

/* ══════════════════════════════════════════════════════════
   § 다크모드 (기본이 다크이므로 라이트모드 오버라이드)
   ══════════════════════════════════════════════════════════ */
[data-theme="light"] .whs {
  /* 라이트모드에서도 슬라이더는 다크 유지 (비주얼 일관성) */
  background: #040812;
}

/* ══════════════════════════════════════════════════════════
   § 반응형
   ══════════════════════════════════════════════════════════ */
@media (max-width: 1100px) {
  .whs__layout {
    grid-template-columns: 1fr 380px;
    gap: 40px;
  }
}

@media (max-width: 860px) {
  .whs__layout {
    grid-template-columns: 1fr;
    padding: 100px 0 40px;
    text-align: center;
    gap: 40px;
  }
  .whs__actions {
    justify-content: center;
  }
  .whs__visual {
    order: -1;
    max-width: 340px;
    margin: 0 auto;
  }
  .whs__badge--tl,
  .whs__badge--br {
    display: none;
  }
  .whs__heading {
    font-size: clamp(2rem, 8vw, 3rem);
  }
  .whs__stats {
    justify-content: center;
    flex-wrap: wrap;
    gap: 20px;
  }
  .whs__tech-grid {
    max-width: 280px;
    gap: 10px;
  }
  .whs__tech-item {
    padding: 18px 10px;
    font-size: 0.7rem;
  }
  .whs__controls-inner {
    gap: 12px;
  }
  .whs__arrows {
    display: none;
  }
  .whs__counter {
    order: -1;
  }
}

@media (max-width: 480px) {
  .whs__btn {
    height: 48px;
    padding: 0 22px;
    font-size: 0.85rem;
  }
  .whs__actions {
    flex-direction: column;
    align-items: center;
  }
  .whs__eyebrow {
    font-size: 0.65rem;
  }
  .whs__visual {
    display: none;
  }
}

/* ── 감소 모션 ── */
@media (prefers-reduced-motion: reduce) {
  .whs__slide,
  .whs__orb,
  .whs__badge,
  .whs__browser-icon,
  .whs__tech-item,
  .whs__eyebrow-dot,
  .whs__slide.is-active * {
    animation: none !important;
    transition-duration: 0.01ms !important;
  }
}
