/* 히어로 Three.js 셰이더 배경 (hero-shader.js) */
.hero-section {
  position: relative;
}

.hero-shader-canvas {
  position: absolute;
  top: 0;
  left: 0;
  z-index: 0;
  display: block;
  pointer-events: none;
  opacity: 0;
  transition: opacity 1.2s ease;
}

body.joy-shader-ready .hero-shader-canvas {
  opacity: 1;
}

/* 셰이더가 준비되면 호스트 배경을 투명하게 해 캔버스가 비치게 한다 (hero-rebuild.css의 !important 보다 뒤에 로드) */
body.joy-hero-rebuild-ready.joy-shader-ready .hero-banner-top {
  background: transparent !important;
}

body.joy-shader-ready .hero-banner-top {
  position: relative;
  z-index: 1;
}

/* 캔버스 위 텍스트 가독성용 상단 그라데이션 */
body.joy-shader-ready .hero-banner-top::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background: linear-gradient(180deg, rgba(5, 10, 18, 0.35) 0%, rgba(5, 10, 18, 0) 40%, rgba(5, 10, 18, 0.45) 100%);
}

/* 슬라이드 사진 가장자리를 셰이더 배경에 녹여 합성 */
body.joy-shader-ready .joy-hero__media {
  -webkit-mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 18%, #000 42%, #000 100%),
    linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, 0.35) 88%, rgba(0, 0, 0, 0) 100%);
  mask-image: linear-gradient(90deg, rgba(0, 0, 0, 0) 0%, rgba(0, 0, 0, 0.55) 18%, #000 42%, #000 100%),
    linear-gradient(180deg, #000 0%, #000 62%, rgba(0, 0, 0, 0.35) 88%, rgba(0, 0, 0, 0) 100%);
  -webkit-mask-composite: source-in;
  mask-composite: intersect;
}

@media (max-width: 768px) {
  body.joy-shader-ready .joy-hero__media {
    -webkit-mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, #000 22%, #000 60%, rgba(0, 0, 0, 0.3) 86%, rgba(0, 0, 0, 0) 100%);
    mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.75) 0%, #000 22%, #000 60%, rgba(0, 0, 0, 0.3) 86%, rgba(0, 0, 0, 0) 100%);
  }
}
