/* Homepage hero — KJV-inspired cinematic background */

.miga-hero {
  position: relative;
  width: 100%;
  min-height: 100dvh;
  min-height: 100svh;
  isolation: isolate;
  overflow-x: clip;
  overflow-y: visible;
  display: flex;
  flex-direction: column;
  align-items: stretch;
  justify-content: flex-start;
  padding-bottom: 4rem;
}

.miga-hero-bg {
  position: absolute;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.miga-hero-bg-base {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 120% 80% at 50% 20%, rgba(30, 41, 59, 0.55) 0%, transparent 55%),
    radial-gradient(ellipse 90% 60% at 80% 90%, rgba(185, 28, 28, 0.12) 0%, transparent 50%),
    linear-gradient(165deg, #0a0f1a 0%, #05080f 45%, #030712 100%);
}

.miga-hero-bg-scripture {
  position: absolute;
  inset: -5%;
  background-image: url("../images/hero-kjv-watermark.svg");
  background-size: cover;
  background-position: center 35%;
  background-repeat: no-repeat;
  opacity: 0.42;
  mix-blend-mode: soft-light;
}

.miga-hero-bg-lines {
  position: absolute;
  inset: 0;
  background-image: url("../images/hero-scripture-lines.svg");
  background-size: 100% auto;
  background-position: center bottom;
  background-repeat: no-repeat;
  opacity: 0.18;
}

.miga-hero-bg-vignette {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, transparent 35%, rgba(5, 8, 15, 0.65) 100%),
    linear-gradient(to bottom, rgba(5, 8, 15, 0.35) 0%, transparent 28%, transparent 72%, rgba(5, 8, 15, 0.5) 100%);
}

.miga-hero-bg-glow {
  position: absolute;
  top: 28%;
  left: 50%;
  width: min(520px, 90vw);
  height: min(520px, 90vw);
  transform: translateX(-50%);
  border-radius: 50%;
  background: radial-gradient(circle, rgba(220, 38, 38, 0.08) 0%, transparent 68%);
  filter: blur(2px);
}

.miga-hero-content {
  position: relative;
  z-index: 2;
  width: 100%;
  max-width: 64rem;
  margin-inline: auto;
  padding-top: max(6.75rem, calc(env(safe-area-inset-top, 0px) + 5.75rem));
  padding-left: max(1rem, env(safe-area-inset-left, 0px));
  padding-right: max(1rem, env(safe-area-inset-right, 0px));
  text-align: center;
  overflow: visible;
}

.miga-hero--bible-active .miga-hero-bg-scripture,
.miga-hero--bible-active .miga-hero-bg-lines {
  opacity: 0.08;
  transition: opacity 1s ease 2.5s;
}

.miga-hero-scroll {
  position: absolute;
  bottom: max(2.5rem, env(safe-area-inset-bottom, 0px));
  left: 50%;
  transform: translateX(-50%);
  z-index: 2;
}

@media (max-width: 640px) {
  .miga-hero-content {
    padding-top: max(7rem, calc(env(safe-area-inset-top, 0px) + 6rem));
  }

  .miga-hero-bg-glow {
    top: 32%;
  }

  .miga-hero-bg-scripture {
    opacity: 0.32;
    background-position: center 30%;
  }
}
