/* =========================================================
   Home-only: 3D scroll hero
   ========================================================= */

.hero-3d {
  position: relative;
  height: 360vh;
  z-index: 1;
}

.hero-sticky {
  position: sticky;
  top: 0;
  height: 100vh;
  width: 100%;
  overflow: hidden;
  background: var(--hero-bg);
  transition: background 0.5s var(--ease);
}

#bg-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
}

.hero-content {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto 1fr;
  padding: 0 var(--pad);
  z-index: 2;
  pointer-events: none;
}

.hero-meta {
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: end;
  width: 100%;
  margin-bottom: 12px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-mute);
}
.hero-meta .right { text-align: right; }

.hero-title {
  align-self: center;
  text-align: center;
  font-family: 'Fraunces', serif;
  font-style: italic;
  font-weight: 200;
  font-size: clamp(64px, 14vw, 200px);
  letter-spacing: -0.04em;
  line-height: 0.95;
  color: var(--text);
  mix-blend-mode: difference;
  pointer-events: auto;
}
/* Difference blending only reads cleanly on a dark background — switch off
   in light mode so the wordmark stays legible against the cream gradient. */
:root[data-theme="light"] .hero-title {
  mix-blend-mode: normal;
  color: var(--text);
  text-shadow: 0 2px 24px rgba(255, 255, 255, 0.6);
}
.hero-title .small {
  display: block;
  font-family: 'Inter', sans-serif;
  font-style: normal;
  font-weight: 500;
  font-size: clamp(11px, 1vw, 13px);
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--text-mute);
  margin-top: 24px;
  mix-blend-mode: normal;
}

.hero-bottom {
  align-self: end;
  display: flex;
  justify-content: space-between;
  align-items: end;
  width: 100%;
  padding-bottom: 32px;
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.22em;
  color: var(--text-mute);
}

.scroll-cue {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}
.scroll-cue .line {
  width: 1px;
  height: 40px;
  background: linear-gradient(180deg, var(--text-mute), transparent);
  animation: cuePulse 2.4s infinite var(--ease);
}
@keyframes cuePulse {
  0%, 100% { opacity: 0.3; transform: scaleY(0.6); }
  50% { opacity: 1; transform: scaleY(1); }
}

/* (Vignette overlay removed — hero background is now a pure flat colour) */

/* Loading overlay while textures load */
.hero-loader {
  position: absolute;
  inset: 0;
  background: var(--bg);
  z-index: 3;
  display: grid;
  place-items: center;
  transition: opacity 0.8s var(--ease);
}
.hero-loader.hidden { opacity: 0; pointer-events: none; }
.hero-loader-bar {
  width: 200px;
  height: 1px;
  background: var(--border);
  overflow: hidden;
  position: relative;
}
.hero-loader-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: var(--text);
  transform: translateX(-100%);
  animation: load 1.6s var(--ease) infinite;
}
@keyframes load {
  0% { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Fallback if WebGL unsupported */
.hero-fallback {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(180deg, rgba(0,0,0,0.55), rgba(0,0,0,0.75)),
    url('../assets/images/timelessHero.jpg');
  background-size: cover;
  background-position: center;
}
