/* Shared styles for the unified hero carousel — both School (green) and Nineview (blue).
   Pure decorative motif (no live data). Original copy preserved.
*/

.hero-carousel {
  position: relative;
  width: 100%;
  background:
    radial-gradient(1200px 400px at 50% -20%, rgba(255,255,255,0.06) 0%, transparent 60%),
    linear-gradient(135deg, #0B142E 0%, #142046 50%, #0E1838 100%);
  overflow: hidden;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans KR", sans-serif;
  color: #fff;
  isolation: isolate;
  /* 디자인 토큰 매핑 — foundation.css 의 --nj-primary 자동 분기
     (스쿨 페이지 :root = green / .nv-page wrapper = nineview blue) */
  --theme: var(--nj-primary, #32C387);
  --theme-soft: var(--nj-primary-soft, rgba(50, 195, 135, 0.10));
}

/* === Brand bar (top) === */
.hero-carousel__brandbar {
  position: relative;
  z-index: 5;
  max-width: 1200px;
  margin: 0 auto;
  padding: 14px 40px 0;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 11px;
  letter-spacing: 2px;
  font-weight: 600;
  color: rgba(255,255,255,0.7);
}
.hero-carousel__brandbar-left {
  display: flex;
  align-items: center;
  gap: 10px;
}
.hero-carousel__brand-dot {
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--theme);
  box-shadow: 0 0 0 4px var(--theme-soft);
  animation: brand-pulse 2.4s ease-in-out infinite;
}
@keyframes brand-pulse {
  0%, 100% { box-shadow: 0 0 0 4px var(--theme-soft); }
  50% { box-shadow: 0 0 0 8px transparent; }
}
.hero-carousel__brand-text { color: rgba(255,255,255,0.78); }
.hero-carousel__pager {
  font-variant-numeric: tabular-nums;
  font-size: 12px;
  letter-spacing: 1.5px;
  color: rgba(255,255,255,0.55);
}
.hero-carousel__pager-cur { color: #fff; font-weight: 700; }
.hero-carousel__pager-sep { margin: 0 4px; opacity: 0.5; }

/* === Stage / Slides === */
.hero-carousel__stage {
  position: relative;
  width: 100%;
  height: 240px;
  margin-top: 4px;
}
.hero-carousel__slide-wrap {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.7s ease;
  pointer-events: none;
}
.hero-carousel__slide-wrap.is-active {
  opacity: 1;
  pointer-events: auto;
}

.hero-slide {
  position: relative;
  width: 100%;
  height: 100%;
  overflow: hidden;
  color: #fff;
}

/* Backgrounds */
.hero-slide__bg { position: absolute; inset: 0; pointer-events: none; z-index: 1; }
.hero-slide__grid {
  position: absolute; inset: 0;
  background-image: radial-gradient(rgba(255,255,255,0.12) 1px, transparent 1px);
  background-size: 24px 24px;
  opacity: 0.45;
  mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,1) 100%);
  -webkit-mask-image: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.7) 30%, rgba(0,0,0,1) 100%);
}
.hero-slide__glow {
  position: absolute;
  width: 560px; height: 560px;
  border-radius: 50%;
  top: -300px; left: -180px;
  background: radial-gradient(circle, var(--accent-soft) 0%, transparent 65%);
  filter: blur(8px);
}
.hero-slide__glow--right {
  left: auto; right: -260px; top: -200px;
  width: 480px; height: 480px;
  background: radial-gradient(circle, var(--theme-soft) 0%, transparent 65%);
  opacity: 0.7;
}
.hero-slide__noise {
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.025) 0%, transparent 30%),
    linear-gradient(0deg, rgba(0,0,0,0.30) 0%, transparent 50%);
}

/* Decorative motif container — holds whichever motif SVG is active */
.hero-slide__motif-wrap {
  position: absolute;
  right: 0; top: 0;
  width: 64%;
  height: 100%;
  pointer-events: none;
  z-index: 2;
  overflow: visible;
  opacity: 0.95;
}
.hero-motif {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

/* === Motif: curve === */
.hero-motif--curve .hero-motif__line {
  stroke-dasharray: 1500;
  stroke-dashoffset: 1500;
}
.hero-carousel__slide-wrap.is-active .hero-motif--curve .hero-motif__line {
  animation: motif-draw 2.4s cubic-bezier(0.55, 0, 0.1, 1) forwards;
}
@keyframes motif-draw { to { stroke-dashoffset: 0; } }
.hero-motif--curve .hero-motif__bullet {
  transform-origin: center;
  transform-box: fill-box;
  animation: bullet-pulse 2.4s ease-in-out infinite;
}
@keyframes bullet-pulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: 0.55; }
}

/* === Motif: candle — staggered drop-in === */
.hero-motif--candle { opacity: 0.92; }
.hero-motif__candle {
  opacity: 0;
  transform: translateY(8px);
  transform-box: fill-box;
  transform-origin: center bottom;
}
.hero-carousel__slide-wrap.is-active .hero-motif__candle {
  animation: candle-rise 0.55s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes candle-rise {
  0%   { opacity: 0; transform: translateY(8px) scaleY(0.4); }
  100% { opacity: 1; transform: translateY(0)    scaleY(1);   }
}

/* === Motif: slip — fade in tilted === */
.hero-motif--slip { opacity: 0; transform: translateX(20px); transition: none; }
.hero-carousel__slide-wrap.is-active .hero-motif--slip {
  animation: slip-in 0.9s cubic-bezier(0.2, 0.8, 0.2, 1) forwards;
}
@keyframes slip-in {
  0%   { opacity: 0; transform: translateX(20px); }
  100% { opacity: 0.85; transform: translateX(0); }
}

/* === Motif: grid — slow build === */
.hero-motif--grid { opacity: 0; }
.hero-carousel__slide-wrap.is-active .hero-motif--grid {
  animation: grid-build 1.2s ease-out forwards;
}
@keyframes grid-build {
  0%   { opacity: 0; }
  100% { opacity: 0.78; }
}

/* === Motif: typo — slow fade === */
.hero-motif--typo { opacity: 0; transform: translateX(8px); }
.hero-carousel__slide-wrap.is-active .hero-motif--typo {
  animation: typo-in 1.4s ease-out forwards;
}
@keyframes typo-in {
  0%   { opacity: 0; transform: translateX(8px); }
  100% { opacity: 0.95; transform: translateX(0); }
}

/* Slide content */
.hero-slide__inner {
  position: relative;
  z-index: 3;
  max-width: 1200px;
  height: 100%;
  margin: 0 auto;
  padding: 0 40px 28px;
  display: flex;
  align-items: center;
}

.hero-slide__lead {
  display: flex;
  flex-direction: column;
  gap: 10px;
  max-width: 620px;
}

.hero-slide__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 12px;
  letter-spacing: 2.5px;
  font-weight: 600;
  text-transform: uppercase;
  color: var(--accent);
  filter: brightness(1.3);
}
.hero-slide__eyebrow-bar {
  width: 28px; height: 1.5px;
  background: var(--accent);
  display: inline-block;
  border-radius: 1px;
}

.hero-slide__title {
  font-size: 32px;
  font-weight: 800;
  line-height: 1.28;
  letter-spacing: -0.6px;
  color: #fff;
  margin: 0;
  text-shadow: 0 2px 30px rgba(0,0,0,0.4);
}

.hero-slide__sub {
  font-size: 15px;
  line-height: 1.6;
  color: rgba(255,255,255,0.78);
  margin: 0;
  letter-spacing: -0.2px;
}

/* Dots / pagination row */
.hero-carousel__dots {
  position: absolute;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 6;
  display: flex;
  gap: 8px;
}
.hero-carousel__dot {
  appearance: none;
  background: transparent;
  border: 0;
  padding: 6px;
  cursor: pointer;
}
.hero-carousel__dot-bar {
  display: block;
  width: 28px; height: 3px;
  background: rgba(255,255,255,0.22);
  border-radius: 2px;
  overflow: hidden;
  position: relative;
  transition: width .3s ease;
}
.hero-carousel__dot.is-active .hero-carousel__dot-bar {
  width: 44px;
  background: rgba(255,255,255,0.30);
}
.hero-carousel__dot-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, var(--theme), #fff);
  transform-origin: left center;
  transform: scaleX(0);
}
.hero-carousel__dot.is-active .hero-carousel__dot-fill {
  animation: dot-fill 5.2s linear forwards;
}
@keyframes dot-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* progress (thin top bar) */
.hero-carousel__progress {
  position: absolute;
  top: 0; left: 0;
  width: 100%; height: 2px;
  background: rgba(255,255,255,0.06);
  z-index: 5;
  overflow: hidden;
}
.hero-carousel__progress-fill {
  position: absolute; inset: 0;
  background: linear-gradient(90deg, transparent, var(--theme), #fff);
  transform-origin: left center;
  transform: scaleX(0);
  animation: progress-fill 5.2s linear forwards;
}
.hero-carousel.is-single .hero-carousel__progress-fill { animation: none; transform: scaleX(0); }
@keyframes progress-fill {
  from { transform: scaleX(0); }
  to   { transform: scaleX(1); }
}

/* Mobile */
@media (max-width: 768px) {
  .hero-carousel__stage { height: 200px; }
  .hero-carousel__brandbar { padding: 12px 20px 0; }
  .hero-slide__inner { padding: 0 20px 32px; }
  .hero-slide__title { font-size: 21px; }
  .hero-slide__sub   { font-size: 13px; }
  .hero-slide__glow { width: 360px; height: 360px; top: -180px; left: -120px; }
  .hero-slide__motif-wrap { width: 65%; opacity: 0.75; }
  .hero-carousel__dots { bottom: 12px; gap: 6px; }
  .hero-carousel__dot-bar { width: 22px; }
  .hero-carousel__dot.is-active .hero-carousel__dot-bar { width: 32px; }
}

/* Variant: minimal — quieter motif */
.hero-carousel--minimal .hero-slide__motif-wrap { opacity: 0.55; width: 58%; }
.hero-carousel--minimal .hero-slide__title { font-size: 36px; }

/* Variant: compact — closer to original 220px */
.hero-carousel--compact .hero-carousel__stage { height: 220px; }
.hero-carousel--compact .hero-slide__title { font-size: 28px; }
