/* =============================================================================
   experiences.css
   The Experiences page v0: a full-screen interactive Holy Land map.
   Inherits palette tokens, typography, and shared chrome from main.css.
   ========================================================================== */

/* Keep the page locked to the viewport; the map is the experience. */
body.page-experiences { overflow: hidden; }

/* A persistent frosted header so the map shows through it subtly. */
.page-experiences .site-header {
  background-color: color-mix(in srgb, var(--color-cream) 78%, transparent);
  -webkit-backdrop-filter: saturate(140%) blur(10px);
  backdrop-filter: saturate(140%) blur(10px);
  color: var(--color-ink);
  border-bottom-color: var(--color-cream-deep);
}

/* -----------------------------------------------------------------------------
   Map stage
   The stage shrink-wraps the image so percentage-positioned hotspots stay
   aligned to the map itself, with cream filling the space around it.
   -------------------------------------------------------------------------- */
.map-experience {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100vh;
  height: 100svh;
  overflow: hidden;
  background-color: var(--color-cream);
}

.map-stage {
  position: relative;
  line-height: 0;
}

.map-image {
  display: block;
  max-width: 100vw;
  max-height: 100svh;
  width: auto;
  height: auto;
  user-select: none;
  -webkit-user-drag: none;
}

/* Leave link, top-left, just below the header. */
.map-leave {
  position: fixed;
  top: calc(var(--header-height) + 0.75rem);
  left: var(--gutter);
  z-index: 15;
  display: inline-flex;
  align-items: center;
  gap: 0.45em;
  padding: 0.5rem 0.9rem;
  font-family: var(--font-body);
  font-size: var(--step--1);
  font-weight: 500;
  letter-spacing: 0.03em;
  color: var(--color-ink);
  background-color: color-mix(in srgb, var(--color-cream) 80%, transparent);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  border: 1px solid var(--color-cream-deep);
  border-radius: 4px;
  transition: color var(--transition), background-color var(--transition);
}

.map-leave:hover { color: var(--color-terracotta); }

/* -----------------------------------------------------------------------------
   Intro overlay
   -------------------------------------------------------------------------- */
.map-intro {
  position: fixed;
  top: calc(var(--header-height) + 0.75rem);
  left: 50%;
  z-index: 12;
  max-width: min(90vw, 30rem);
  padding: 0.9rem 1.4rem;
  text-align: center;
  border-radius: 4px;
  background: rgba(20, 14, 8, 0.55);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  color: var(--color-cream);
  opacity: 0;
  visibility: hidden;
  transform: translateX(-50%) translateY(-8px);
  transition: opacity 0.8s var(--ease), transform 0.8s var(--ease), visibility 0.8s;
}

.map-intro.is-visible {
  opacity: 1;
  visibility: visible;
  transform: translateX(-50%) translateY(0);
}

.map-intro-eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.4rem;
}

.map-intro-text {
  font-family: var(--font-display);
  font-style: italic;
  font-size: 1.125rem;
  line-height: 1.4;
  color: var(--color-cream);
  max-width: none;
}

/* -----------------------------------------------------------------------------
   Hotspots
   -------------------------------------------------------------------------- */
.hotspot {
  position: absolute;
  cursor: pointer;
  z-index: 5;
  width: 32px;
  height: 32px;
  transform: translate(-50%, -50%);
  padding: 0;
  background: none;
  border: 0;
}

.hotspot-target { position: absolute; inset: -16px; }

.hotspot-pulse {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212, 169, 85, 0.5) 0%, rgba(212, 169, 85, 0) 70%);
  animation: hotspot-breathe 3.5s ease-in-out infinite;
  pointer-events: none;
}

.hotspot-dot {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 10px;
  height: 10px;
  margin: -5px 0 0 -5px;
  background: var(--color-gold);
  border-radius: 50%;
  box-shadow: 0 0 14px rgba(212, 169, 85, 0.9), 0 0 5px rgba(255, 244, 212, 0.95);
  animation: dot-breathe 3.5s ease-in-out infinite;
  pointer-events: none;
}

@keyframes hotspot-breathe {
  0%, 100% { transform: scale(0.6); opacity: 0.3; }
  50% { transform: scale(1); opacity: 0.7; }
}

@keyframes dot-breathe {
  0%, 100% { transform: scale(0.85); opacity: 0.75; }
  50% { transform: scale(1.15); opacity: 1; }
}

.hotspot:hover .hotspot-dot,
.hotspot:focus-visible .hotspot-dot {
  background: var(--color-gold-bright);
  box-shadow: 0 0 18px rgba(212, 169, 85, 1), 0 0 7px rgba(255, 244, 212, 1);
}

.hotspot.visited .hotspot-dot {
  background: var(--color-gold);
  box-shadow: 0 0 5px rgba(184, 146, 58, 0.5);
  animation: none;
  opacity: 0.5;
}

.hotspot.visited .hotspot-pulse { display: none; }

/* -----------------------------------------------------------------------------
   Moment panel
   Visibility toggles with the slide so closed panels stay out of the tab order.
   -------------------------------------------------------------------------- */
.moment-panel {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  z-index: 20;
  background: linear-gradient(180deg, transparent 0%, rgba(20, 14, 8, 0.92) 30%, rgba(20, 14, 8, 0.97) 100%);
  padding: 80px 32px 60px;
  transform: translateY(100%);
  visibility: hidden;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1), visibility 0.6s;
  max-height: 70vh;
  overflow-y: auto;
  color: var(--color-cream);
}

.moment-panel.open {
  transform: translateY(0);
  visibility: visible;
}

.moment-inner {
  position: relative;
  max-width: 640px;
  margin-inline: auto;
}

.moment-close {
  position: absolute;
  top: -48px;
  right: 0;
  width: 2.5rem;
  height: 2.5rem;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--color-cream);
  font-size: 1.6rem;
  line-height: 1;
  border-radius: 50%;
  transition: color var(--transition), background-color var(--transition);
}

.moment-close:hover {
  color: var(--color-gold-bright);
  background-color: color-mix(in srgb, var(--color-cream) 12%, transparent);
}

.moment-eyebrow {
  font-family: var(--font-body);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--color-gold);
  margin-bottom: 0.5rem;
}

.moment-title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.6vw, 2.5rem);
  font-weight: 600;
  line-height: 1.1;
  color: var(--color-cream);
  margin-bottom: 1.25rem;
}

.moment-body {
  font-size: 1.0625rem;
  line-height: 1.7;
  color: color-mix(in srgb, var(--color-cream) 85%, transparent);
  max-width: 62ch;
}

.moment-body + .moment-body { margin-top: 1rem; }

.moment-scripture {
  margin-top: 1.75rem;
  padding-left: 1.5rem;
  border-left: 2px solid var(--color-gold);
  max-width: 62ch;
}

.moment-scripture p {
  font-family: var(--font-display);
  font-style: italic;
  font-weight: 400;
  font-size: clamp(1.125rem, 1rem + 0.5vw, 1.35rem);
  line-height: 1.5;
  color: var(--color-cream);
  max-width: none;
}

.moment-scripture cite {
  display: block;
  margin-top: 0.75rem;
  font-family: var(--font-body);
  font-style: normal;
  font-size: 0.75rem;
  letter-spacing: 0.04em;
  color: color-mix(in srgb, var(--color-cream) 65%, transparent);
}

/* -----------------------------------------------------------------------------
   Responsive
   -------------------------------------------------------------------------- */
@media (max-width: 39.9375em) {
  .moment-panel { padding: 64px 20px 40px; }
  .moment-close { top: -44px; }
  .hotspot { width: 28px; height: 28px; }
  .hotspot-dot { width: 8px; height: 8px; margin: -4px 0 0 -4px; }
}
