/* ========== Real open Bible — user photo + 3s reveal ========== */

.miga-bible-real {
  position: relative;
  width: 100%;
  aspect-ratio: 1536 / 1024;
  animation: migaBibleRealIn 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.miga-bible-stage {
  position: relative;
  width: min(820px, 96vw);
  margin: 0 auto 1.25rem;
  overflow: visible;
}

.miga-bible-real__closed {
  position: absolute;
  inset: 4% 3% 3%;
  z-index: 3;
  border-radius: 4px;
  background: linear-gradient(160deg, #2a2a2a 0%, #111 50%, #0a0a0a 100%);
  box-shadow:
    inset 0 2px 0 rgba(255, 255, 255, 0.1),
    0 10px 30px rgba(0, 0, 0, 0.5);
  border: 1px solid rgba(100, 30, 30, 0.6);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  color: rgba(251, 191, 36, 0.9);
  font-family: "Playfair Display", Georgia, serif;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-size: 0.65rem;
  animation: migaBibleClosedOut 3s ease forwards;
}

.miga-bible-real__closed svg {
  width: 2rem;
  height: 2rem;
  opacity: 0.85;
}

.miga-bible-real__open {
  position: absolute;
  inset: 0;
  z-index: 2;
  opacity: 1;
  transform: scale(0.94);
  animation: migaBibleOpenIn 3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

.miga-bible-photo-wrap {
  position: relative;
  width: 100%;
  height: 100%;
  max-width: 100%;
  border-radius: 3px;
  overflow: hidden;
  background: transparent;
  filter: drop-shadow(0 18px 40px rgba(0, 0, 0, 0.45));
}

.miga-bible-photo {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: contain;
  object-position: center center;
}

.miga-bible-real__glow {
  position: absolute;
  bottom: -8%;
  left: 50%;
  width: 70%;
  height: 18%;
  transform: translateX(-50%);
  background: radial-gradient(ellipse, rgba(251, 191, 36, 0.25) 0%, transparent 70%);
  filter: blur(10px);
  opacity: 0;
  animation: migaBibleGlowIn 3s ease forwards;
  pointer-events: none;
  z-index: 1;
}

/* ========== 3 second timeline ========== */
@keyframes migaBibleRealIn {
  0% { opacity: 0; transform: translateY(10px); }
  8% { opacity: 1; transform: translateY(0); }
  100% { opacity: 1; transform: translateY(0); }
}

@keyframes migaBibleClosedOut {
  0%, 15% { opacity: 1; transform: scale(1); }
  35% { opacity: 0; transform: scale(1.02); pointer-events: none; }
  100% { opacity: 0; visibility: hidden; }
}

@keyframes migaBibleOpenIn {
  0%, 28% { transform: scale(0.92); }
  55%, 100% { transform: scale(1); }
}

@keyframes migaBibleGlowIn {
  0%, 70% { opacity: 0; }
  100% { opacity: 1; }
}

/* Hero content after Bible */
.miga-hero-content--after-bible .miga-hero-headline,
.miga-hero-content--after-bible .miga-hero-sub,
.miga-hero-content--after-bible .miga-hero-cta {
  opacity: 0;
  animation: migaHeroContentIn 0.7s ease forwards;
}

.miga-hero-content--after-bible .miga-hero-headline { animation-delay: 2.9s; }
.miga-hero-content--after-bible .miga-hero-sub { animation-delay: 3.05s; }
.miga-hero-content--after-bible .miga-hero-cta { animation-delay: 3.2s; }

@keyframes migaHeroContentIn {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

@media (max-width: 639px) {
  .miga-bible-stage {
    width: min(calc(100% - 0.75rem), 820px);
    max-width: 100%;
    margin-bottom: 1rem;
  }
}

@media (min-width: 640px) {
  .miga-bible-stage {
    width: min(820px, 92vw);
    margin-bottom: 1.75rem;
  }

  .miga-bible-real__closed {
    font-size: 0.75rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  .miga-bible-real,
  .miga-bible-real__closed,
  .miga-bible-real__open,
  .miga-bible-real__glow,
  .miga-hero-content--after-bible .miga-hero-headline,
  .miga-hero-content--after-bible .miga-hero-sub,
  .miga-hero-content--after-bible .miga-hero-cta {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    visibility: visible !important;
  }

  .miga-bible-real__closed { display: none; }
}
