/* ═══════════════════════════════════════════════════════════════
   HiFashions — Video + Particle 3D Hero
   Loads AFTER css/styles-v4.css (overrides where needed)
═══════════════════════════════════════════════════════════════ */

/* ─── SCROLL CONTAINER ───────────────────────────────────────── */
.hero-3d {
  position: relative;
  width: 100%;
  height: 460vh;
  margin-top: var(--header-h);
  overflow: visible;
}

/* ─── STICKY CANVAS WRAP — pins for the full scroll duration ─── */
.hero-3d-canvas-wrap {
  position: sticky;
  top: 0;
  width: 100%;
  height: 100vh;
  z-index: 1;
  overflow: hidden;       /* clips video edges during parallax shift */
}

/* ─── BACKGROUND VIDEO ──────────────────────────────────────── */
#heroVideo {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  transform: translate3d(0, 0, 0) scale(1.07); /* pre-scale = parallax headroom */
  transform-origin: center center;
  will-change: transform;
  z-index: 0;
}

/* ─── DARK GRADIENT OVERLAY ─────────────────────────────────── */
.hero-3d-video-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    linear-gradient(
      180deg,
      rgba(7,7,12,0.28) 0%,
      rgba(7,7,12,0.42) 35%,
      rgba(7,7,12,0.68) 75%,
      rgba(7,7,12,0.88) 100%
    ),
    radial-gradient(ellipse at 50% 40%, rgba(245,184,0,0.06), transparent 65%);
}

/* ─── THREE.JS PARTICLE CANVAS ──────────────────────────────── */
.hero-3d-canvas-wrap canvas {
  display: block;
  position: absolute;
  inset: 0;
  width: 100% !important;
  height: 100% !important;
  z-index: 2;
  outline: none;
}

/* ─── STAGE OVERLAYS (text per stage) ────────────────────────── */
.hero-3d-stages {
  position: sticky;
  top: 0;
  margin-top: -100vh;
  width: 100%;
  height: 100vh;
  pointer-events: none;
  z-index: 3;
}
.hero-3d-stage {
  position: absolute;
  left: 50%; top: 50%;
  transform: translate(-50%, -50%);
  width: min(880px, 92vw);
  text-align: center;
  opacity: 0;
  transition: opacity 0.35s ease, transform 0.6s cubic-bezier(.22,.61,.36,1);
  pointer-events: none;
  padding: 0 20px;
}
.hero-3d-stage .eyebrow {
  display: inline-block;
  font-family: var(--font-sans);
  font-size: 11px;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 18px;
  padding: 6px 14px;
  border: 1px solid rgba(245,184,0,0.45);
  border-radius: 999px;
  background: rgba(7,7,12,0.45);
  backdrop-filter: blur(6px);
  -webkit-backdrop-filter: blur(6px);
}
.hero-3d-stage h1,
.hero-3d-stage h2 {
  font-family: var(--font-serif);
  color: var(--white);
  font-weight: 700;
  line-height: 1.08;
  margin: 0 0 18px;
  text-shadow: 0 2px 30px rgba(0,0,0,0.65);
}
.hero-3d-stage h1 { font-size: clamp(2.1rem, 5.6vw, 4.2rem); }
.hero-3d-stage h2 { font-size: clamp(1.7rem, 4.4vw, 3.2rem); }
.hero-3d-stage p {
  font-size: clamp(1rem, 1.6vw, 1.18rem);
  line-height: 1.6;
  color: rgba(248,244,236,0.88);
  margin: 0 auto 26px;
  max-width: 640px;
  text-shadow: 0 2px 18px rgba(0,0,0,0.65);
}
.hero-3d-stage .stage-ctas {
  display: inline-flex;
  gap: 14px;
  flex-wrap: wrap;
  justify-content: center;
}

/* big numerals for stat stages */
.hero-3d-stage .big-stat {
  display: block;
  font-family: var(--font-serif);
  font-weight: 700;
  font-size: clamp(3.5rem, 12vw, 8rem);
  color: var(--gold);
  line-height: 1;
  letter-spacing: -0.02em;
  text-shadow:
    0 0 40px rgba(245,184,0,0.55),
    0 4px 30px rgba(0,0,0,0.65);
  margin-bottom: 6px;
}
.hero-3d-stage .big-stat-suffix {
  font-size: 0.4em;
  color: var(--white);
  margin-left: 6px;
  font-weight: 400;
  letter-spacing: 0.05em;
}

/* ─── PROGRESS / SCROLL HINT ─────────────────────────────────── */
.hero-3d-progress {
  position: sticky;
  top: 88vh;
  margin-top: -100vh;
  margin-bottom: 0;
  width: min(420px, 60vw);
  margin-left: auto;
  margin-right: auto;
  height: 2px;
  background: rgba(248,244,236,0.12);
  border-radius: 2px;
  overflow: hidden;
  z-index: 4;
  pointer-events: none;
  transform: translateY(24px);
}
.hero-3d-progress span {
  display: block;
  height: 100%;
  width: 0;
  background: linear-gradient(90deg, var(--gold) 0%, #fff7d6 100%);
  box-shadow: 0 0 12px rgba(245,184,0,0.6);
  transition: width 0.05s linear;
}

.hero-3d-scroll-hint {
  position: sticky;
  top: 92vh;
  margin-top: -100vh;
  text-align: center;
  z-index: 4;
  pointer-events: none;
  font-family: var(--font-sans);
  color: rgba(248,244,236,0.55);
  font-size: 11px;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  animation: hero3d-bounce 2.4s ease-in-out infinite;
}
.hero-3d-scroll-hint::after {
  content: "↓";
  display: block;
  margin-top: 6px;
  font-size: 16px;
}
@keyframes hero3d-bounce {
  0%, 100% { transform: translateY(0); opacity: 0.55; }
  50%       { transform: translateY(6px); opacity: 0.9; }
}

/* ─── STATIC FALLBACK (reduced-motion / no-WebGL / no three.js) ─ */
html.hero3d-fallback .hero-3d {
  height: auto;
  min-height: 92vh;
  display: flex;
  align-items: center;
  justify-content: center;
}
html.hero3d-fallback .hero-3d-canvas-wrap {
  position: relative;
  height: 100%;
  min-height: 92vh;
}
html.hero3d-fallback #heroVideo {
  transform: none !important;
}
html.hero3d-fallback .hero-3d-canvas-wrap canvas { display: none; }
html.hero3d-fallback .hero-3d-progress,
html.hero3d-fallback .hero-3d-scroll-hint { display: none; }
html.hero3d-fallback .hero-3d-stages {
  position: absolute;
  margin: 0;
  height: 100%;
  pointer-events: auto;
}
html.hero3d-fallback .hero-3d-stage {
  position: absolute;
  opacity: 1;
  pointer-events: auto;
}
html.hero3d-fallback .hero-3d-stage:not(:first-child) { display: none; }

/* ─── SMALL-PHONE TUNING ─────────────────────────────────────── */
@media (max-width: 600px) {
  .hero-3d { height: 380vh; }
  .hero-3d-progress { width: 70vw; }
  /* no mouse on touch — lock video to natural scale */
  #heroVideo { transform: scale(1.03) !important; }
}

@media (max-height: 520px) and (orientation: landscape) {
  .hero-3d { height: 320vh; }
  .hero-3d-stage h1 { font-size: clamp(1.6rem, 5vw, 2.6rem); }
  .hero-3d-stage p  { font-size: 0.95rem; }
}
