/* =====================================================
   Marcos Garcia — Immersive hero
   Marcus stands centred and full height, his auras glowing
   across the whole screen; the headline floats out in front
   of him with 3D depth.
   hero-depth.js feeds --px / --py (pointer or idle drift,
   -1..1) and --scroll (0..1 through the hero).
   ===================================================== */

.hero.hero--immersive {
  --px: 0;
  --py: 0;
  --scroll: 0;
  --fig-w: min(100vw, 82svh);     /* the painting is 623 x 756 */
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  min-height: 100svh;
  margin-top: -76px;              /* slide under the see-through header */
  padding: 76px 0 0 !important;
  display: flex;
  align-items: flex-end;
  overflow: hidden;
  perspective: 1200px;
  background: #05070d !important;
}

/* ---------- picture layers ---------- */
.hero-stage {
  position: absolute;
  inset: 0;
  z-index: 0;
  pointer-events: none;
}

.hero-layer {
  position: absolute;
  inset: 0;
  will-change: transform;
}

/* Deep layer: the painting stretched edge to edge so its colours fill the screen */
.hero-layer--back {
  transform:
    translate3d(calc(var(--px) * -14px), calc(var(--py) * -10px + var(--scroll) * 90px), 0)
    scale(1.15);
}
.hero-bg-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 35%;
  filter: blur(9px) brightness(0.7) saturate(1.45);
}

/* Auras: rings and glow spread across the whole screen, centred on Marcus */
.hero-layer--aura {
  transform:
    translate3d(calc(var(--px) * -22px), calc(var(--py) * -16px + var(--scroll) * 120px), 0);
}
.hero-layer--aura::before,
.hero-layer--aura::after {
  content: "";
  position: absolute;
  left: 50%;
  top: 40%;
  width: max(130vw, 150svh);
  aspect-ratio: 1;
  translate: -50% -50%;
  border-radius: 50%;
}
.hero-layer--aura::before {
  background:
    repeating-radial-gradient(circle,
      transparent 0 6%,
      rgba(75, 225, 255, 0.30) 6.4% 6.9%,
      transparent 7.4% 10.5%,
      rgba(243, 211, 107, 0.26) 10.9% 11.4%,
      transparent 11.9% 14.5%,
      rgba(178, 103, 255, 0.24) 14.9% 15.4%,
      transparent 15.9% 19%);
  mask-image: radial-gradient(circle, transparent 4%, #000 14%, #000 34%, transparent 50%);
  -webkit-mask-image: radial-gradient(circle, transparent 4%, #000 14%, #000 34%, transparent 50%);
  mix-blend-mode: screen;
  animation: hero-rings 4.5s ease-in-out infinite;
}
.hero-layer--aura::after {
  background:
    radial-gradient(circle,
      rgba(255, 236, 170, 0.34) 0 4%,
      rgba(69, 217, 255, 0.22) 11%,
      rgba(178, 103, 255, 0.18) 22%,
      rgba(211, 138, 84, 0.10) 32%,
      transparent 46%);
  filter: blur(12px);
  mix-blend-mode: screen;
  animation: hero-glow 5.5s ease-in-out infinite;
}

/* Marcus himself: centred, full height, sharp, edges melting into the glow */
.hero-layer--figure {
  left: 50%;
  right: auto;
  width: var(--fig-w);
  margin-left: calc(var(--fig-w) / -2);
  transform:
    translate3d(calc(var(--px) * -30px), calc(var(--py) * -20px + var(--scroll) * 150px), 0);
}
.hero-figure-image {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 50% 15%;
  mask-image: radial-gradient(ellipse 52% 60% at 50% 46%, #000 62%, transparent 100%);
  -webkit-mask-image: radial-gradient(ellipse 52% 60% at 50% 46%, #000 62%, transparent 100%);
  animation: hero-breathe 5s ease-in-out infinite;
}

/* Shade: dark corners, a soft pool behind the words, and a fade into the next section */
.hero-layer--shade {
  background:
    radial-gradient(ellipse 60% 34% at 50% 80%, rgba(5, 7, 13, 0.62), transparent 100%),
    radial-gradient(ellipse 85% 80% at 50% 42%, transparent 55%, rgba(5, 7, 13, 0.7) 100%),
    linear-gradient(to bottom, rgba(5, 7, 13, 0.5) 0, transparent 14%, transparent 78%, #05070d 100%);
}

/* ---------- floating words ---------- */
.hero.hero--immersive .hero-inner {
  position: relative;
  z-index: 2;
  display: block !important;
  width: min(1180px, calc(100% - 64px)) !important;
  margin: 0 auto !important;
  padding: 40px 0 clamp(48px, 9svh, 110px);
  transform-style: preserve-3d;
  perspective: 900px;
}

.hero.hero--immersive .hero-text {
  max-width: 900px;
  margin: 0 auto;
  text-align: center !important;
  transform-style: preserve-3d;
  transform:
    translate3d(calc(var(--px) * 18px), calc(var(--py) * 12px - var(--scroll) * 80px), 0)
    rotateY(calc(var(--px) * 9deg))
    rotateX(calc(var(--py) * -7deg));
  opacity: calc(1 - var(--scroll) * 1.3);
  will-change: transform, opacity;
}

/* each line sits at its own depth, so they slide past each other (and Marcus) as you move */
.hero.hero--immersive .eyebrow    { translate: 0 0 40px; }
.hero.hero--immersive .hero-title { translate: 0 0 130px; }
.hero.hero--immersive .hero-sub   { translate: 0 0 60px; }

.hero.hero--immersive .eyebrow {
  color: #f0b07a;
  font-size: 13px;
  letter-spacing: 0.3em;
  text-shadow: 0 1px 2px #000, 0 0 12px rgba(0, 0, 0, 0.95), 0 0 24px rgba(0, 0, 0, 0.8);
}

/* a carved, extruded headline: stacked shadows give it thickness */
.hero.hero--immersive .hero-title {
  font-size: clamp(44px, 7vw, 104px);
  line-height: 1;
  margin-bottom: 26px;
  color: #fbf6ea;
  text-shadow:
    0 1px 0 #c9b48a,
    0 2px 0 #b39c70,
    0 3px 0 #9a845b,
    0 4px 0 #806c48,
    0 5px 0 #665536,
    0 6px 1px rgba(0, 0, 0, 0.6),
    0 10px 18px rgba(0, 0, 0, 0.75),
    0 24px 50px rgba(0, 0, 0, 0.7),
    0 0 60px rgba(243, 211, 107, 0.25);
}

/* the shimmering gradient words are see-through, so they glow instead of casting a dark shadow */
.hero.hero--immersive .hero-title em {
  text-shadow: none;
  filter:
    drop-shadow(0 3px 0 rgba(60, 40, 20, 0.9))
    drop-shadow(0 10px 16px rgba(0, 0, 0, 0.8))
    drop-shadow(0 0 24px rgba(243, 211, 107, 0.45));
}

.hero.hero--immersive .hero-sub {
  max-width: 50ch;
  margin: 0 auto;
  font-size: clamp(17px, 1.45vw, 20px);
  color: rgba(245, 240, 228, 0.9);
  text-shadow: 0 2px 4px rgba(0, 0, 0, 0.9), 0 4px 18px rgba(0, 0, 0, 0.9);
}

@keyframes hero-rings {
  0%, 100% { opacity: 0.5;  scale: 0.97; }
  50%      { opacity: 1;    scale: 1.05; }
}
@keyframes hero-glow {
  0%, 100% { opacity: 0.55; }
  50%      { opacity: 1; }
}
@keyframes hero-breathe {
  0%, 100% { filter: brightness(1) saturate(1); }
  50%      { filter: brightness(1.15) saturate(1.22); }
}

/* ---------- phones ---------- */
@media (max-width: 760px) {
  .hero.hero--immersive { --fig-w: min(118vw, 82svh); }
  .hero-figure-image { opacity: 0.85; }
  .hero.hero--immersive .hero-inner {
    width: calc(100% - 32px) !important;
    padding-bottom: 64px;
  }
  .hero-layer--shade {
    background:
      linear-gradient(to bottom, rgba(5, 7, 13, 0.5) 0, transparent 20%, rgba(5, 7, 13, 0.25) 45%, rgba(5, 7, 13, 0.78) 72%, #05070d 100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-layer, .hero.hero--immersive .hero-text { transform: none !important; }
  .hero-layer--aura::before, .hero-layer--aura::after, .hero-figure-image { animation: none !important; }
}
