/* ═══════════════════════════════════════════════════════════
   KB x Atelier — Hero Section CSS
   Flashlight canvas effect over photo grid
═══════════════════════════════════════════════════════════ */

.hero {
  position: relative;
  width: 100%;
  height: 100svh;
  min-height: 500px;
  overflow: hidden;
  cursor: none;
}

/* ─── Photo grid (behind canvas) ─────────────────────────── */
.hero__grid {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-template-rows: repeat(3, 1fr);
}

.hero__grid-tile {
  background-size: cover;
  background-position: center;
}

/* ─── Blur overlay (behind canvas, blurs grid outside spotlight) ── */
.hero__blur {
  position: absolute;
  inset: 0;
  z-index: 2;
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  background: rgba(0, 0, 0, 0.01); /* forces compositing layer */
  will-change: transform;
  pointer-events: none;
}

/* ─── Canvas overlay ──────────────────────────────────────── */
#hero-canvas {
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
}

/* ─── Logo ────────────────────────────────────────────────── */
.hero__logo {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 4;
  pointer-events: none;
}

.hero__logo img {
  width: clamp(160px, 22vw, 300px);
  filter: invert(1);
  mix-blend-mode: screen;
  user-select: none;
}

/* ─── Scroll indicator ────────────────────────────────────── */
.hero__scroll {
  position: absolute;
  bottom: 28px;
  left: 50%;
  transform: translateX(-50%);
  font-size: 0.55rem;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  z-index: 5;
  animation: scrollBounce 2s ease-in-out infinite;
  pointer-events: none;
}

.hero__scroll::after {
  content: '';
  width: 1px;
  height: 28px;
  background: rgba(255, 255, 255, 0.4);
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); }
  50%       { transform: translateX(-50%) translateY(6px); }
}

/* ─── Mobile: static dark olive overlay, no canvas ───────── */
@media (max-width: 768px) {
  .hero {
    cursor: auto;
    height: 85svh;
  }

  #hero-canvas {
    display: none;
  }

  .hero__grid {
    grid-template-columns: repeat(2, 1fr);
    grid-template-rows: repeat(3, 1fr);
  }

  /* Static dark olive overlay replaces canvas on mobile */
  .hero__grid::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(30, 35, 20, 0.94);
    z-index: 1;
  }

  .hero__logo { z-index: 3; }
  .hero__scroll { z-index: 4; }

  .hero__logo img {
    width: clamp(140px, 50vw, 220px);
  }
}
