/* ============================================================
   CINEMA DEPTH HERO
   Real Palmers home-cinema photo with WebGL depth parallax,
   mouse-tracked light bloom, and a cinematic vignette stack.
   ============================================================ */

.hero--cinema {
  position: relative;
  min-height: clamp(620px, 88vh, 940px);
  background: #000;
  overflow: hidden;
  isolation: isolate;
  margin: 0;
  padding: 0;
}

/* WebGL canvas mounts here */
.cinema__stage {
  position: absolute;
  inset: 0;
  z-index: 0;
}

.cinema__stage canvas {
  display: block;
  width: 100%;
  height: 100%;
}

/* Static fallback image — visible until WebGL takes over (or always if WebGL fails) */
.cinema__fallback {
  position: absolute;
  inset: 0;
  z-index: 0;
  object-fit: cover;
  width: 100%;
  height: 100%;
  opacity: 1;
  transition: opacity 1.2s ease-out;
  transform: scale(1.05);
  transform-origin: center 60%;
}

.cinema__stage.is-ready + .cinema__fallback {
  opacity: 0;
}

/* Cinematic colour grade overlay — deepens shadows, adds warmth */
.cinema__grade {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  background:
    /* warm orange light bloom from left (where the screen is) */
    radial-gradient(circle at 22% 40%, rgba(232, 90, 21, 0.18) 0%, transparent 38%),
    /* deeper warmth from screen position */
    radial-gradient(circle at 28% 35%, rgba(255, 200, 140, 0.10) 0%, transparent 30%),
    /* darken edges */
    radial-gradient(ellipse at 50% 55%, transparent 30%, rgba(0,0,0,0.45) 100%),
    /* top fade for nav legibility */
    linear-gradient(180deg, rgba(0,0,0,0.55) 0%, transparent 25%, transparent 65%, rgba(0,0,0,0.75) 100%);
}

/* Mouse-tracked highlight — follows cursor for that "this is alive" feel */
.cinema__spotlight {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background: radial-gradient(
    420px circle at var(--mx, 30%) var(--my, 40%),
    rgba(232, 90, 21, 0.10),
    transparent 70%
  );
  mix-blend-mode: screen;
  transition: background 0.2s ease-out;
}

/* Floating dust particles — subtle, like a real cinema beam */
.cinema__dust {
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background-image:
    radial-gradient(1px 1px at 18% 30%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(1px 1px at 35% 60%, rgba(255,210,170,0.4), transparent 60%),
    radial-gradient(1px 1px at 55% 25%, rgba(255,255,255,0.45), transparent 60%),
    radial-gradient(1px 1px at 70% 55%, rgba(255,210,170,0.4), transparent 60%),
    radial-gradient(1px 1px at 85% 38%, rgba(255,255,255,0.5), transparent 60%),
    radial-gradient(2px 2px at 42% 78%, rgba(255,255,255,0.3), transparent 60%);
  background-size: 800px 600px;
  animation: dustDrift 24s linear infinite;
  opacity: 0.7;
}

@keyframes dustDrift {
  from { background-position: 0 0; }
  to   { background-position: -800px 200px; }
}

/* CONTENT layer */
.hero--cinema .hero__content {
  position: relative;
  z-index: 5;
  max-width: 880px;
  margin: 0 auto;
  padding: clamp(120px, 18vh, 220px) 24px clamp(80px, 14vh, 160px);
  text-align: left;
  color: var(--color-cream, #FAF5EE);
  /* Add depth: content floats slightly forward */
  transform: translateZ(0);
}

.hero--cinema .hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
  font-size: 0.74rem;
  letter-spacing: 0.24em;
  text-transform: uppercase;
  color: rgba(250, 245, 238, 0.85);
  margin-bottom: 1.5rem;
  padding: 0.55rem 1.05rem;
  border: 1px solid rgba(250, 245, 238, 0.22);
  border-radius: 999px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  background: rgba(0,0,0,0.25);
}

.hero--cinema .hero__eyebrow::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #E85A15;
  box-shadow: 0 0 12px rgba(232, 90, 21, 0.8);
  animation: pulseDot 2.4s ease-in-out infinite;
}

@keyframes pulseDot {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%      { opacity: 0.6; transform: scale(1.3); }
}

.hero--cinema .hero__title {
  color: var(--color-cream, #FAF5EE);
  font-size: clamp(2.6rem, 6.4vw, 5rem);
  font-weight: 600;
  line-height: 1.04;
  letter-spacing: -0.025em;
  margin: 0 0 1.4rem;
  text-shadow:
    0 2px 30px rgba(0,0,0,0.7),
    0 0 80px rgba(0,0,0,0.4);
  max-width: 14ch;
}

.hero--cinema .hero__title em {
  font-style: normal;
  background: linear-gradient(95deg, #FAF5EE 0%, #FFB088 40%, #E85A15 70%, #FAF5EE 100%);
  background-size: 220% auto;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  animation: shimmer 7s ease-in-out infinite;
}

@keyframes shimmer {
  0%, 100% { background-position: 0% 50%; }
  50%      { background-position: 100% 50%; }
}

.hero--cinema .hero__text {
  color: rgba(250, 245, 238, 0.9);
  font-size: clamp(1.05rem, 1.7vw, 1.22rem);
  line-height: 1.6;
  max-width: 540px;
  margin: 0 0 2.2rem;
  text-shadow: 0 1px 14px rgba(0,0,0,0.5);
}

.hero--cinema .hero__cta-group {
  display: flex;
  gap: 1rem;
  flex-wrap: wrap;
}

.hero--cinema .btn--primary {
  background: #E85A15;
  color: #fff;
  border: none;
  padding: 1.05rem 2.1rem;
  font-size: 1rem;
  font-weight: 600;
  border-radius: 10px;
  box-shadow:
    0 10px 36px rgba(232, 90, 21, 0.4),
    0 0 0 1px rgba(255,255,255,0.06) inset,
    0 0 60px rgba(232, 90, 21, 0.15);
  transition: transform .28s cubic-bezier(.2,.7,.3,1), box-shadow .28s ease;
  text-decoration: none;
  display: inline-block;
}

.hero--cinema .btn--primary:hover {
  transform: translateY(-2px);
  box-shadow:
    0 16px 50px rgba(232, 90, 21, 0.55),
    0 0 0 1px rgba(255,255,255,0.12) inset,
    0 0 100px rgba(232, 90, 21, 0.3);
}

.hero--cinema .btn--ghost {
  background: rgba(255,255,255,0.06);
  color: var(--color-cream, #FAF5EE);
  border: 1px solid rgba(250, 245, 238, 0.28);
  padding: 1.05rem 2.1rem;
  font-size: 1rem;
  font-weight: 500;
  border-radius: 10px;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  transition: background .25s ease, border-color .25s ease, transform .25s ease;
  text-decoration: none;
  display: inline-block;
}

.hero--cinema .btn--ghost:hover {
  background: rgba(255,255,255,0.14);
  border-color: rgba(250, 245, 238, 0.5);
  transform: translateY(-2px);
}

/* Scroll cue */
.hero--cinema .hero__scroll-cue {
  position: absolute;
  bottom: 30px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 5;
  font-size: 0.72rem;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: rgba(250, 245, 238, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.hero--cinema .hero__scroll-cue::after {
  content: "";
  width: 1px;
  height: 32px;
  background: linear-gradient(180deg, rgba(250,245,238,0.6), transparent);
  animation: cueDrop 2.2s ease-in-out infinite;
  transform-origin: top center;
}

@keyframes cueDrop {
  0%   { transform: scaleY(0); opacity: 0; }
  40%  { transform: scaleY(1); opacity: 1; }
  100% { transform: scaleY(1) translateY(32px); opacity: 0; }
}

/* Mobile tightening */
@media (max-width: 720px) {
  .hero--cinema {
    min-height: 88vh;
  }
  .hero--cinema .hero__content {
    padding: clamp(96px, 14vh, 160px) 20px clamp(120px, 16vh, 180px);
    text-align: left;
  }
  .hero--cinema .hero__title {
    max-width: 100%;
  }
  .hero--cinema .hero__cta-group {
    flex-direction: column;
    align-items: stretch;
    gap: 0.75rem;
  }
  .hero--cinema .btn--primary,
  .hero--cinema .btn--ghost {
    width: 100%;
    text-align: center;
    padding: 1rem 1.25rem;
    font-size: 0.95rem;
  }
  .cinema__dust {
    display: none; /* save paint cost on mobile */
  }
}

/* Respect reduced motion */
@media (prefers-reduced-motion: reduce) {
  .cinema__dust,
  .hero--cinema .hero__title em,
  .hero--cinema .hero__eyebrow::before,
  .hero--cinema .hero__scroll-cue::after {
    animation: none !important;
  }
  .cinema__fallback {
    transform: none;
  }
}
