/* ===== BookMart - 3D Hero layer =====
   Positions the WebGL canvas behind the hero content and provides a
   readable scrim. Everything degrades gracefully: with no WebGL / reduced
   motion, the static .hero-image fallback stays visible. */

.hero {
  position: relative;
  overflow: hidden;
  min-height: min(90vh, 820px);
  display: flex;
  align-items: center;
}

/* WebGL canvas — full hero, behind content, never intercepts input */
.hero-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  z-index: 0;
  pointer-events: none;
  opacity: 0;                 /* fade in once the first frame is drawn */
  transition: opacity 1.4s ease;
}
.hero.is-3d .hero-canvas { opacity: 1; }

/* Cinematic scrim keeps the headline readable over the 3D scene */
.hero-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    radial-gradient(90% 120% at 18% 42%, rgba(7, 17, 31, 0.72), rgba(7, 17, 31, 0.15) 55%, transparent 78%),
    linear-gradient(180deg, rgba(7, 17, 31, 0.35) 0%, rgba(7, 17, 31, 0.10) 42%, rgba(7, 17, 31, 0.55) 100%);
}

/* Content sits above canvas + scrim */
.hero > .container {
  position: relative;
  z-index: 2;
  width: 100%;
}

/* Once the 3D scene is live, retire the static image column */
.hero.is-3d .hero-image { opacity: 0; visibility: hidden; }

/* Eyebrow label above the headline */
.hero-eyebrow {
  display: inline-block;
  margin-bottom: var(--space-md);
  padding: 0.3em 0.9em;
  border-radius: var(--radius-pill);
  background: var(--glass-background-light);
  border: 1px solid var(--border-soft);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
}

/* Scroll cue */
.hero-scroll-cue {
  position: absolute;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  z-index: 2;
  width: 26px;
  height: 42px;
  border: 2px solid var(--border-soft);
  border-radius: var(--radius-pill);
}
.hero-scroll-cue span {
  position: absolute;
  left: 50%;
  top: 8px;
  width: 4px;
  height: 8px;
  border-radius: 2px;
  background: var(--color-gold);
  transform: translateX(-50%);
  animation: heroScrollCue 1.8s ease-in-out infinite;
}
@keyframes heroScrollCue {
  0%   { opacity: 0; transform: translate(-50%, 0); }
  30%  { opacity: 1; }
  100% { opacity: 0; transform: translate(-50%, 14px); }
}

/* Mobile: let the hero size to content, keep the scene subtle */
@media (max-width: 768px) {
  .hero { min-height: auto; }
  .hero-scroll-cue { display: none; }
}

/* Reduced motion: no 3D canvas, no cue animation — static hero only */
@media (prefers-reduced-motion: reduce) {
  .hero-canvas { display: none; }
  .hero-scroll-cue span { animation: none; }
}
