/* =========================================================================
   Sanctuary Virtual Guide — Home Page  (Premium Edition)
   =========================================================================
   Depends on navigation.css for --nv-* tokens + app-shell scaffolding.

   Section map (mirrors home.html):
     1. Hero  (image stack · arch · glows · badge · headline · CTAs)
     2. Stat bar  (glass floating strip)
     3. Quick-actions grid
     4. Featured places grid
     5. Guided-tour feature card
     6. Map preview + Audio guide  (two-col)
    7. Accessibility feature card
     8. History / About feature card
     9. Bottom CTA
   ========================================================================= */


/* ═══════════════════════════ TOKENS ═══════════════════════════════════════ */

:root {
  --home-card:           #FDFBF7;
  --home-card-border:    rgba(184, 134, 11, 0.10);
  --home-card-hover:     rgba(184, 134, 11, 0.22);
  --home-radius-lg:      14px;
  --home-shadow-sm:      0 1px 4px rgba(44, 36, 24, 0.05);
  --home-shadow-md:      0 8px 28px rgba(44, 36, 24, 0.08);
  --home-shadow-lg:      0 16px 48px rgba(44, 36, 24, 0.12);
  --home-glass:          rgba(250, 247, 242, 0.82);
  --home-hero-overlay:   linear-gradient(to top,
                           rgba(26, 18, 8, 0.92) 0%,
                           rgba(26, 18, 8, 0.40) 55%,
                           rgba(26, 18, 8, 0.10) 100%);
  --home-reveal-ease:    cubic-bezier(0.22, 1, 0.36, 1);
  --home-divider:        linear-gradient(to right, transparent, var(--nv-border) 20%, var(--nv-border) 80%, transparent);
}

html.theme-dark,
body.dark-mode {
  --home-card:           #161616;
  --home-card-border:    rgba(212, 175, 55, 0.10);
  --home-card-hover:     rgba(212, 175, 55, 0.22);
  --home-shadow-sm:      0 0 0 1px rgba(212, 175, 55, 0.05), 0 1px 3px rgba(0,0,0,0.4);
  --home-shadow-md:      0 0 0 1px rgba(212, 175, 55, 0.06), 0 8px 28px rgba(0,0,0,0.5);
  --home-shadow-lg:      0 0 0 1px rgba(212, 175, 55, 0.06), 0 16px 48px rgba(0,0,0,0.6);
  --home-glass:          rgba(18, 18, 18, 0.85);
  --home-hero-overlay:   linear-gradient(to top,
                           rgba(0, 0, 0, 0.94) 0%,
                           rgba(0, 0, 0, 0.48) 55%,
                           rgba(0, 0, 0, 0.12) 100%);
}


/* ═══════════════════════════ PAGE BASE ════════════════════════════════════ */

html { scroll-behavior: smooth; }

.home-wrap {
  max-width: 1200px;
  margin: 0 auto;
}


/* ═══════════════════════════ 1. HERO ═════════════════════════════════════ */

.home-hero {
  position: relative;
  height: 51vh;
  height: 51dvh;
  min-height: 300px;
  max-height: 450px;
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  border: 1px solid var(--home-card-border);
  border-radius: 0 0 18px 18px;
  box-shadow: var(--home-shadow-lg);
}

/* --- Image slides --- */

.home-hero-image {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

/* Skeleton shimmer while the admin-managed hero image is loading.
   Two layers stacked over the dark fallback:
     • A subtle vertical gradient (warm gold → near-black) that
       hints at the eventual lit composition.
     • A diagonal sweep highlight that travels across the surface
       on a 1.6s loop — the de-facto skeleton-loading idiom users
       already recognise from major apps.
   `pointer-events: none` so the shimmer never intercepts taps.   */
.home-hero-image.is-loading::before,
.home-hero-image.is-loading::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 1;
}
.home-hero-image.is-loading::before {
  background:
    linear-gradient(180deg,
      rgba(184, 134, 11, 0.10) 0%,
      rgba(10, 10, 10, 0.0) 55%,
      rgba(0, 0, 0, 0.30) 100%),
    #0A0A0A;
}
.home-hero-image.is-loading::after {
  background: linear-gradient(110deg,
    rgba(255, 255, 255, 0) 30%,
    rgba(255, 255, 255, 0.06) 48%,
    rgba(212, 175, 55, 0.12) 50%,
    rgba(255, 255, 255, 0.06) 52%,
    rgba(255, 255, 255, 0) 70%);
  background-size: 220% 100%;
  animation: home-hero-shimmer 1.6s linear infinite;
  mix-blend-mode: screen;
}
@keyframes home-hero-shimmer {
  0%   { background-position: 120% 0; }
  100% { background-position: -120% 0; }
}
/* When the image finishes loading the JS removes .is-loading; the
   pseudo-elements vanish without a visible cut thanks to a short
   fade. opacity: 0 is set on the loaded state so the transition
   has somewhere to land.                                          */
.home-hero-image::before,
.home-hero-image::after {
  opacity: 0;
  transition: opacity 320ms ease;
}
.home-hero-image.is-loading::before,
.home-hero-image.is-loading::after {
  opacity: 1;
}
@media (prefers-reduced-motion: reduce) {
  .home-hero-image.is-loading::after { animation: none; }
}

.home-hero-slide {
  position: absolute;
  inset: 0;
  background-position: center;
  background-size: cover;
  background-repeat: no-repeat;
  background-color: #0A0A0A;
  opacity: 1;
  transform: none;
  transition: none;
  will-change: auto;
}

.home-hero-slide.slide-1 {
  /* Background image is loaded from the database (content_text key
     `home.hero.image_url`) by home.js → applyContentTexts. The dark
     background-color above acts as a fallback while the API resolves. */
  background-position: center 45%;
}

/* --- Decorative layers --- */

.home-hero-pattern {
  position: absolute;
  inset: 0;
  background-image:
    repeating-linear-gradient(0deg, transparent, transparent 39px, rgba(184, 134, 11, 0.04) 39px, rgba(184, 134, 11, 0.04) 40px),
    repeating-linear-gradient(90deg, transparent, transparent 39px, rgba(184, 134, 11, 0.03) 39px, rgba(184, 134, 11, 0.03) 40px);
  pointer-events: none;
  z-index: 1;
}

.home-hero-arch {
  position: absolute;
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
  width: 200px;
  height: 260px;
  border-radius: 100px 100px 0 0;
  border: 1.5px solid rgba(184, 134, 11, 0.18);
  border-bottom: none;
  pointer-events: none;
  z-index: 1;
}

.home-hero-arch--inner {
  width: 140px;
  height: 180px;
  border-radius: 70px 70px 0 0;
  border-color: rgba(184, 134, 11, 0.10);
}

.home-hero-glow {
  position: absolute;
  bottom: 10%;
  left: 25%;
  width: 320px;
  height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(184, 134, 11, 0.12) 0%, transparent 70%);
  pointer-events: none;
  z-index: 1;
}

.home-hero-glow--secondary {
  left: auto;
  right: 15%;
  bottom: 20%;
  width: 260px;
  height: 260px;
  background: radial-gradient(circle, rgba(212, 168, 75, 0.08) 0%, transparent 65%);
}

.home-hero-overlay {
  position: absolute;
  inset: 0;
  background: var(--home-hero-overlay);
  z-index: 2;
}

/* --- Hero content --- */

.home-hero-content {
  position: relative;
  z-index: 3;
  padding: 0 24px 38px;
  width: 100%;
  max-width: 430px;
}

.hero-badge {
  display: flex;
  align-items: center;
  gap: 14px;
  max-width: 260px;
  margin-bottom: 18px;
}

.hero-badge::before,
.hero-badge::after {
  content: '';
  flex: 1;
  height: 1px;
  background: rgba(236, 190, 61, 0.86);
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}

.hero-badge-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #F2C33B;
  white-space: nowrap;
  text-shadow: 0 2px 5px rgba(0, 0, 0, 0.95), 0 0 1px rgba(0, 0, 0, 0.9);
}

.home-hero-content h1 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: clamp(1.9rem, 5vw, 2.8rem);
  font-weight: 400;
  letter-spacing: -0.02em;
  line-height: 1.12;
  color: #FFF7E6;
  margin: 0;
  text-wrap: balance;
  text-shadow: 0 3px 10px rgba(0, 0, 0, 0.94), 0 1px 2px rgba(0, 0, 0, 0.96);
}

.home-hero-content h1 em {
  font-style: italic;
  color: #F2C33B;
}

.hero-rule {
  width: 40px;
  height: 1px;
  background: rgba(236, 190, 61, 0.9);
  border: 0;
  margin: 16px 0;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.72);
}

.home-hero-content > p {
  font-size: 0.92rem;
  color: #FFF3D8;
  max-width: 390px;
  line-height: 1.75;
  margin: 0 0 26px;
  letter-spacing: 0.01em;
  text-shadow: 0 2px 7px rgba(0, 0, 0, 0.96), 0 1px 2px rgba(0, 0, 0, 0.96);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}


/* --- Scroll hint --- */

@keyframes heroScrollBounce {
  0%, 100% { transform: translateY(0); opacity: 0.5; }
  50%      { transform: translateY(8px); opacity: 1; }
}

.hero-scroll-hint {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 6px;
  width: 100%;
  padding: 12px 0 4px;
  color: var(--nv-text-muted, rgba(120, 100, 80, 0.6));
  animation: heroScrollBounce 2.4s ease-in-out infinite;
  cursor: pointer;
  transition: opacity 0.4s ease;
}

.hero-scroll-hint .material-symbols-outlined {
  font-size: 24px;
}

.hero-scroll-hint-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.52rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--nv-text-muted, rgba(120, 100, 80, 0.5));
}


/* ═══════════════════════════ 2. STAT BAR ═════════════════════════════════ */

.home-hero-stats {
  display: flex;
  position: relative;
  z-index: 5;
  margin: -28px 16px 0;
  border-radius: 12px;
  border: 1px solid var(--home-card-border);
  background: var(--home-glass);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  box-shadow: var(--home-shadow-md);
}

.home-stat {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  padding: 20px 8px;
  border-right: 1px solid var(--nv-border);
  text-align: center;
}

.home-stat:last-child { border-right: none; }

.home-stat-number {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.6rem;
  font-weight: 400;
  color: var(--nv-fg);
  letter-spacing: -0.02em;
  line-height: 1.1;
}

.home-stat-number small {
  font-size: 0.6em;
  font-weight: 400;
  color: var(--nv-muted-fg);
  margin-left: 2px;
}

.home-stat-label {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  color: var(--nv-muted-fg);
  margin-top: 5px;
  text-transform: uppercase;
  letter-spacing: 0.13em;
  font-weight: 500;
}


/* ═══════════════════════════ 3. SECTIONS + LABELS ═════════════════════════ */

.home-section {
  position: relative;
  padding: 40px 20px 0;
}

/* Gradient dividers between sections */
.home-section::after {
  content: '';
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 1px;
  background: var(--home-divider);
}

.home-section:last-child::after { display: none; }
.home-section:last-child { padding-bottom: 0; }

.section-label-bar {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 22px;
}

.section-label-bar::before,
.section-label-bar::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--nv-border);
}

.section-label-bar--inline {
  margin-bottom: 10px;
}

.section-label-bar--inline::before,
.section-label-bar--inline::after {
  display: none;
}

.section-label-text {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.66rem;
  font-weight: 500;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nv-accent);
  white-space: nowrap;
}

/* Section number (01, 02, etc.) */
.home-section-num {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.56rem;
  font-weight: 500;
  color: var(--nv-border);
  letter-spacing: 0.08em;
  margin-right: 2px;
}


/* ═══════════════════════════ 4. QUICK ACTIONS ════════════════════════════ */

.quick-actions-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 10px;
  padding-bottom: 40px;
}

.quick-action-btn {
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  padding: 22px 12px;
  border-radius: var(--home-radius-lg);
  background: var(--home-card);
  border: 1px solid var(--home-card-border);
  cursor: pointer;
  transition: border-color 350ms var(--home-reveal-ease),
              box-shadow 350ms var(--home-reveal-ease),
              transform 350ms var(--home-reveal-ease);
  min-height: 95px;
  box-shadow: var(--home-shadow-sm);
  font-family: 'Source Sans 3', system-ui, sans-serif;
  color: inherit;
  overflow: hidden;
}

/* Gold top-line accent on hover */
.quick-action-btn::before {
  content: '';
  position: absolute;
  top: 0;
  left: 16px;
  right: 16px;
  height: 2px;
  border-radius: 0 0 2px 2px;
  background: linear-gradient(90deg, transparent, var(--nv-accent), transparent);
  opacity: 0;
  transition: opacity 350ms ease;
}

.quick-action-btn:hover::before {
  opacity: 1;
}

.quick-action-btn:hover {
  border-color: var(--home-card-hover);
  box-shadow: var(--home-shadow-md);
  transform: translateY(-3px);
}

.quick-action-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--nv-accent-muted);
  border: 1px solid var(--nv-border);
  color: var(--nv-accent);
  transition: background-color 300ms var(--home-reveal-ease),
              color 300ms var(--home-reveal-ease),
              border-color 300ms var(--home-reveal-ease),
              transform 300ms var(--home-reveal-ease);
}

.quick-action-icon .material-symbols-outlined {
  font-size: 22px;
}

.quick-action-btn:hover .quick-action-icon {
  background: var(--nv-accent);
  color: var(--nv-accent-on);
  border-color: var(--nv-accent);
  transform: scale(1.06);
}

.quick-action-label {
  font-size: 0.82rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--nv-fg);
}


/* ═══════════════════════════ 5. FEATURED PLACES ══════════════════════════ */

.featured-places-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 14px;
  padding-bottom: 40px;
}

.place-card {
  position: relative;
  display: flex;
  flex-direction: column;
  border-radius: var(--home-radius-lg);
  background: var(--home-card);
  border: 1px solid var(--home-card-border);
  overflow: hidden;
  cursor: pointer;
  transition: box-shadow 350ms var(--home-reveal-ease),
              transform 350ms var(--home-reveal-ease),
              border-color 350ms var(--home-reveal-ease);
  box-shadow: var(--home-shadow-sm);
  text-align: left;
  color: inherit;
  font-family: inherit;
}

/* Gold top line on hover */
.place-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nv-accent), transparent);
  opacity: 0;
  transition: opacity 350ms ease;
  z-index: 3;
}

.place-card:hover::before { opacity: 1; }

.place-card:hover {
  box-shadow: var(--home-shadow-md);
  transform: translateY(-3px);
  border-color: var(--home-card-hover);
}

.place-card:focus-visible {
  outline: 2px solid var(--nv-accent);
  outline-offset: 2px;
}

.place-card-image {
  /* `aspect-ratio` scales the photo frame with card width, so on
     wider cards (desktop 2-col) the image area grows tall enough
     to show the photo properly instead of cropping its top/bottom
     into a squat band. min/max-height keep narrow phones from
     getting too short and ultra-wide screens from getting absurdly
     tall.                                                       */
  aspect-ratio: 16 / 10;
  min-height: 180px;
  max-height: 360px;
  display: flex;
  align-items: center;
  justify-content: center;
  position: relative;
  overflow: hidden;
}

.place-card-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: inherit;
  z-index: 0;
  transition: transform 0.6s cubic-bezier(0.22, 1, 0.36, 1);
}

.place-card:hover .place-card-image::after {
  transform: scale(1.08);
}

.place-card-image .material-symbols-outlined {
  font-size: 36px;
  color: rgba(255, 255, 255, 0.5);
  position: relative;
  z-index: 2;
  transition: transform 0.5s var(--home-reveal-ease), color 0.5s ease;
}

.place-card:hover .place-card-image .material-symbols-outlined {
  transform: scale(1.12);
  color: rgba(255, 255, 255, 0.72);
}

.place-card-image--sanctuary {
  background: linear-gradient(135deg, #2B1F10 0%, #4A3515 50%, #2B1F10 100%);
}
.place-card-image--sanctuary::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at 50% 80%, rgba(184, 134, 11, 0.22) 0%, transparent 60%),
    repeating-linear-gradient(90deg, transparent 0px, transparent 29px, rgba(184, 134, 11, 0.05) 29px, rgba(184, 134, 11, 0.05) 30px);
  z-index: 1;
}

.place-card-image--chapel {
  background: linear-gradient(135deg, #1E1508 0%, #3D2B10 50%, #1E1508 100%);
}
.place-card-image--chapel::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 60%, rgba(255, 180, 50, 0.16) 0%, transparent 55%);
  z-index: 1;
}

.place-card-image--viewpoint {
  background: linear-gradient(160deg, #1A2535 0%, #2A3D55 50%, #1A2535 100%);
}
.place-card-image--viewpoint::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 100%, rgba(184, 134, 11, 0.16) 0%, transparent 55%);
  z-index: 1;
}

.place-card-image--garden {
  background: linear-gradient(135deg, #1A2510 0%, #283B18 50%, #1A2510 100%);
}
.place-card-image--garden::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 70%, rgba(100, 160, 50, 0.12) 0%, transparent 55%);
  z-index: 1;
}

/* Photo variant — fills the tile when poi_thumbnail_url is present. */
.place-card-image--photo {
  background: #0A0A0A;
}
.place-card-image--photo::after { display: none; }
.place-card-image--photo img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  z-index: 1;
  /* Opacity transition lets the loaded image fade in over the
     shimmer overlay instead of popping in. transform stays for
     the hover-zoom effect.                                      */
  opacity: 1;
  transition:
    transform 0.6s cubic-bezier(0.22, 1, 0.36, 1),
    opacity   0.35s ease;
}
.place-card:hover .place-card-image--photo img {
  transform: scale(1.06);
}

/* ── Per-image shimmer while the bitmap is still loading ────────────
   buildPlaceCard() adds `.is-img-loading` on the photo container
   and removes it from the <img>'s load handler. While the class
   is present a shimmering pill (::before) covers the frame and
   the <img> stays invisible — so visitors never see a half-
   decoded image or an empty dark box, even on slow connections
   or for cards that come into view far down the page (the imgs
   use loading="lazy"). The error handler also removes the class
   and unlinks the broken <img>, leaving the dark fallback.   */
.place-card-image--photo.is-img-loading::before {
  content: '';
  position: absolute;
  inset: 0;
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  z-index: 2;
  pointer-events: none;
}
.place-card-image--photo.is-img-loading img { opacity: 0; }

@media (prefers-reduced-motion: reduce) {
  .place-card-image--photo.is-img-loading::before { animation: none; }
}

.place-card-body {
  padding: 18px 20px 16px;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.place-card-body h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.04rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--nv-fg);
  margin: 0 0 6px;
}

.place-card-body p {
  font-size: 0.82rem;
  color: var(--nv-muted-fg);
  line-height: 1.65;
  flex: 1;
  margin: 0 0 14px;
}

.place-card-link {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nv-accent);
}

.place-card-link .material-symbols-outlined {
  font-size: 14px;
  transition: transform 300ms var(--home-reveal-ease);
}

.place-card:hover .place-card-link .material-symbols-outlined {
  transform: translateX(4px);
}


/* ═══════════════════════════ 6. FEATURE CARDS ════════════════════════════ */

.home-feature-card {
  position: relative;
  border-radius: var(--home-radius-lg);
  background: var(--home-card);
  border: 1px solid var(--home-card-border);
  overflow: hidden;
  box-shadow: var(--home-shadow-sm);
  transition: box-shadow 350ms ease, transform 350ms ease, border-color 350ms ease;
}

.home-feature-card:hover {
  box-shadow: var(--home-shadow-md);
  transform: translateY(-3px);
  border-color: var(--home-card-hover);
}

/* Gold top line on feature cards */
.home-feature-card::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(90deg, transparent, var(--nv-accent), transparent);
  opacity: 0;
  transition: opacity 350ms ease;
  z-index: 2;
}

.home-feature-card:hover::before { opacity: 1; }

.home-feature-card--tour {
  padding: 28px 24px;
  display: flex;
  gap: 20px;
  align-items: flex-start;
}

.home-feature-card--history {
  padding: 28px 24px;
  display: flex;
  gap: 20px;
  align-items: center;
}

.home-feature-card--map,
.home-feature-card--audio,
.home-feature-card--access {
  display: flex;
  flex-direction: column;
}

.home-feature-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 50px;
  height: 50px;
  border-radius: 50%;
  background: var(--nv-accent-muted);
  border: 1px solid var(--nv-border);
  color: var(--nv-accent);
  flex-shrink: 0;
  transition: transform 300ms var(--home-reveal-ease),
              background-color 300ms ease;
}

.home-feature-card:hover .home-feature-icon {
  transform: scale(1.06);
}

.home-feature-icon .material-symbols-outlined {
  font-size: 24px;
}

.home-feature-content {
  flex: 1;
  min-width: 0;
}

.home-feature-content h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.4rem;
  font-weight: 600;
  letter-spacing: -0.02em;
  margin: 0 0 10px;
  color: var(--nv-fg);
}

.home-feature-content h3 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.12rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  margin: 0 0 8px;
  color: var(--nv-fg);
}

.home-feature-content p {
  font-size: 0.86rem;
  color: var(--nv-muted-fg);
  line-height: 1.75;
  margin: 0 0 20px;
}

.home-feature-btn {
  width: 100%;
  justify-content: center;
}


/* ═══════════════════════════ TOUR STOPS ═══════════════════════════════════ */

.tour-stops-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 6px;
  margin-bottom: 20px;
}

.tour-stop-chip {
  font-family: 'IBM Plex Mono', monospace;
  font-size: 0.64rem;
  font-weight: 500;
  letter-spacing: 0.06em;
  padding: 4px 10px;
  border-radius: 12px;
  background: var(--nv-accent-muted);
  border: 1px solid var(--nv-border);
  color: var(--nv-accent);
  white-space: nowrap;
  transition: background 300ms ease, border-color 300ms ease, transform 300ms ease;
}

.home-feature-card--tour:hover .tour-stop-chip {
  border-color: rgba(184, 134, 11, 0.22);
}

.tour-stop-arrow {
  font-size: 0.78rem;
  color: var(--nv-border);
  user-select: none;
}

/* ── MOBILE (<640 px) ── compact vertical "pilgrim path" timeline ─────
   Instead of cramming chips horizontally, present the route as an
   elegant numbered timeline: dots connected by a continuous accent
   line, with each stop name inline. Feels intentional and sacred,
   not like an overflowing chip row.
   ───────────────────────────────────────────────────────────────────── */
@media (max-width: 639px) {
  .tour-stops-row {
    display: grid;
    grid-template-columns: 22px 1fr;
    gap: 0;
    margin: 4px 0 22px;
    padding: 4px 0 2px;
    flex-wrap: initial;            /* override base */
    align-items: initial;
    position: relative;
    counter-reset: tour-step;
  }

  /* Continuous accent line behind the dots — runs centered through col 1 */
  .tour-stops-row::before {
    content: '';
    position: absolute;
    left: 10px;
    top: 12px;
    bottom: 12px;
    width: 1.5px;
    border-radius: 1px;
    background: linear-gradient(
      to bottom,
      var(--nv-accent) 0%,
      var(--nv-accent) 100%
    );
    opacity: 0.32;
  }

  /* Each chip becomes a row spanning both columns */
  .tour-stop-chip {
    grid-column: 1 / -1;
    display: grid;
    grid-template-columns: 22px 1fr;
    align-items: center;
    gap: 12px;

    background: transparent;
    border: 0;
    padding: 7px 0;
    border-radius: 0;
    color: var(--nv-fg);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    letter-spacing: 0.005em;
    counter-increment: tour-step;
    box-shadow: none;
    position: relative;
  }

  /* Numbered dot in column 1 */
  .tour-stop-chip::before {
    content: counter(tour-step);
    width: 22px;
    height: 22px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    background: var(--nv-surface);
    border: 1.5px solid var(--nv-accent);
    color: var(--nv-accent);
    font-family: 'IBM Plex Mono', monospace;
    font-size: 0.62rem;
    font-weight: 600;
    line-height: 1;
    z-index: 1;
    box-shadow: 0 0 0 4px var(--nv-bg);   /* punches through the line */
    transition: background 250ms ease, color 250ms ease, transform 250ms ease;
  }

  /* First and last dots: filled accent so the path has clear endpoints */
  .tour-stop-chip:first-of-type::before,
  .tour-stop-chip:last-of-type::before {
    background: var(--nv-accent);
    color: var(--nv-accent-on);
  }

  /* Hide the textual arrows — the connector line replaces them */
  .tour-stop-arrow {
    display: none;
  }

  /* Hover/tap feedback on the whole card */
  .home-feature-card--tour:hover .tour-stop-chip::before,
  .home-feature-card--tour:focus-within .tour-stop-chip::before {
    transform: scale(1.06);
  }
}


/* ═══════════════════════════ TWO-COLUMN LAYOUT ═══════════════════════════ */

.home-two-col {
  display: flex;
  flex-direction: column;
  gap: 14px;
  padding-bottom: 40px;
}


/* ═══════════════════════════ PREVIEW AREAS ═══════════════════════════════ */

.map-preview-area {
  height: 130px;
  background: var(--nv-muted);
  border-bottom: 1px solid var(--nv-border);
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  justify-content: center;
}

.map-preview-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(var(--nv-border) 1px, transparent 1px),
    linear-gradient(90deg, var(--nv-border) 1px, transparent 1px);
  background-size: 28px 28px;
  opacity: 0.8;
}

.map-preview-dots {
  position: absolute;
  inset: 0;
}

.map-dot {
  position: absolute;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--home-card);
  border: 1.5px solid var(--nv-accent);
  transition: transform 0.3s ease;
}

@keyframes mapDotPing {
  0%   { transform: scale(1); opacity: 1; }
  70%  { transform: scale(2.2); opacity: 0; }
  100% { transform: scale(2.2); opacity: 0; }
}

.map-dot::after {
  content: '';
  position: absolute;
  inset: -1.5px;
  border-radius: 50%;
  border: 1.5px solid var(--nv-accent);
  opacity: 0;
}

.map-dots-animate .map-dot::after {
  animation: mapDotPing 2.4s ease-out infinite;
}
.map-dots-animate .map-dot--1::after { animation-delay: 0ms; }
.map-dots-animate .map-dot--2::after { animation-delay: 400ms; }
.map-dots-animate .map-dot--3::after { animation-delay: 800ms; }
.map-dots-animate .map-dot--4::after { animation-delay: 1200ms; }
.map-dots-animate .map-dot--5::after { animation-delay: 1600ms; }
.map-dot--1 { top: 38%; left: 18%; }
.map-dot--2 { top: 22%; left: 44%; }
.map-dot--3 { top: 54%; left: 63%; }
.map-dot--4 { top: 28%; left: 76%; }
.map-dot--5 { top: 62%; left: 36%; }

.map-preview-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
}

.map-preview-icon {
  font-size: 32px;
  color: var(--nv-accent);
  opacity: 0.35;
  position: relative;
  z-index: 2;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.home-feature-card--map:hover .map-preview-icon {
  transform: scale(1.1);
  opacity: 0.55;
}

/* --- Audio --- */

.audio-preview-area {
  height: 130px;
  background: var(--nv-muted);
  border-bottom: 1px solid var(--nv-border);
  position: relative;
  overflow: hidden;
  display: flex;
  /* Stack the headphones icon ABOVE the wave bars. `column-reverse`
     swaps the DOM order (bars come first in the HTML) so the icon
     renders on top and the bars sit below it.                      */
  flex-direction: column-reverse;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 12px 0;
}

.audio-wave-bars {
  display: flex;
  align-items: center;
  gap: 3px;
  /* No longer absolutely positioned — flex column-reverse on the
     parent now handles vertical placement, putting the bars under
     the headphones icon.                                            */
}

.audio-wave-bars span {
  display: block;
  width: 3px;
  border-radius: 2px;
  background: var(--nv-accent);
  opacity: 0.25;
  transform-origin: bottom;
}

@keyframes audioBarPulse {
  0%, 100% { transform: scaleY(1); }
  50%      { transform: scaleY(0.5); }
}

.audio-wave-bars.is-animating span {
  animation: audioBarPulse 1.2s ease-in-out infinite;
  opacity: 0.4;
}
.audio-wave-bars.is-animating span:nth-child(1)  { animation-delay: 0ms; }
.audio-wave-bars.is-animating span:nth-child(2)  { animation-delay: 80ms; }
.audio-wave-bars.is-animating span:nth-child(3)  { animation-delay: 160ms; }
.audio-wave-bars.is-animating span:nth-child(4)  { animation-delay: 240ms; }
.audio-wave-bars.is-animating span:nth-child(5)  { animation-delay: 320ms; }
.audio-wave-bars.is-animating span:nth-child(6)  { animation-delay: 400ms; }
.audio-wave-bars.is-animating span:nth-child(7)  { animation-delay: 480ms; }
.audio-wave-bars.is-animating span:nth-child(8)  { animation-delay: 560ms; }
.audio-wave-bars.is-animating span:nth-child(9)  { animation-delay: 640ms; }
.audio-wave-bars.is-animating span:nth-child(10) { animation-delay: 720ms; }
.audio-wave-bars.is-animating span:nth-child(11) { animation-delay: 800ms; }
.audio-wave-bars.is-animating span:nth-child(12) { animation-delay: 880ms; }
.audio-wave-bars.is-animating span:nth-child(13) { animation-delay: 960ms; }
.audio-wave-bars.is-animating span:nth-child(14) { animation-delay: 1040ms; }
.audio-wave-bars.is-animating span:nth-child(15) { animation-delay: 1120ms; }

.audio-wave-bars span:nth-child(1)  { height: 10px; }
.audio-wave-bars span:nth-child(2)  { height: 22px; }
.audio-wave-bars span:nth-child(3)  { height: 16px; }
.audio-wave-bars span:nth-child(4)  { height: 34px; }
.audio-wave-bars span:nth-child(5)  { height: 26px; }
.audio-wave-bars span:nth-child(6)  { height: 44px; }
.audio-wave-bars span:nth-child(7)  { height: 30px; }
.audio-wave-bars span:nth-child(8)  { height: 50px; }
.audio-wave-bars span:nth-child(9)  { height: 34px; }
.audio-wave-bars span:nth-child(10) { height: 50px; }
.audio-wave-bars span:nth-child(11) { height: 38px; }
.audio-wave-bars span:nth-child(12) { height: 26px; }
.audio-wave-bars span:nth-child(13) { height: 18px; }
.audio-wave-bars span:nth-child(14) { height: 12px; }
.audio-wave-bars span:nth-child(15) { height: 6px; }

.audio-preview-icon {
  font-size: 32px;
  color: var(--nv-accent);
  opacity: 0.45;
  position: relative;
  z-index: 3;
  /* `isolation: isolate` pins the icon to its own stacking context so
     no descendant transform on the wave bars can ever promote them
     above it. Belt + braces with z-index: 3 vs the bars' z-index: 1. */
  isolation: isolate;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.home-feature-card--audio:hover .audio-preview-icon {
  transform: scale(1.1);
  opacity: 0.65;
}

/* --- Accessibility --- */

.access-preview-area {
  height: 130px;
  background: var(--nv-muted);
  border-bottom: 1px solid var(--nv-border);
  display: flex;
  align-items: center;
  justify-content: center;
}

.access-preview-icon {
  font-size: 48px;
  color: var(--nv-accent);
  opacity: 0.25;
  transition: transform 0.4s ease, opacity 0.4s ease;
}

.home-feature-card--access:hover .access-preview-icon {
  transform: scale(1.08);
  opacity: 0.4;
}

.home-feature-card--map .home-feature-content,
.home-feature-card--audio .home-feature-content,
.home-feature-card--access .home-feature-content {
  padding: 20px;
}


/* ═══════════════════════════ 8. HISTORY ══════════════════════════════════ */

.history-visual {
  flex-shrink: 0;
  width: 80px;
  height: 80px;
  position: relative;
  display: flex;
  align-items: center;
  justify-content: center;
}

.history-arch {
  position: absolute;
  inset: 0;
  border: 2px solid rgba(184, 134, 11, 0.22);
  border-radius: 40px 40px 0 0;
  border-bottom: none;
}

.history-icon {
  font-size: 28px;
  color: var(--nv-accent);
  opacity: 0.5;
  position: relative;
  z-index: 2;
}

.history-fact {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  background: var(--nv-accent-muted);
  border: 1px solid var(--nv-border);
  border-radius: var(--nv-radius);
  padding: 12px 14px;
  margin-bottom: 20px;
  font-size: 0.84rem;
  color: var(--nv-muted-fg);
  line-height: 1.65;
}

.history-fact .material-symbols-outlined {
  font-size: 18px;
  color: var(--nv-accent);
  flex-shrink: 0;
  margin-top: 1px;
}


/* ═══════════════════════════ 8.5 PILGRIM STORIES ════════════════════════
   Instagram-stories style row of approved visitor photos, with a
   leading "+ Share" CTA. Sits directly under home-hero-stats so the
   wall of pilgrim moments is one of the first things visitors see.
   ═══════════════════════════════════════════════════════════════════════ */

.home-stories {
  padding: 22px 20px 6px;
  margin: 0 auto;
  max-width: 1200px;
  width: 100%;
  box-sizing: border-box;
}
/* Trim the Quick Access section's top space when it follows stories */
.home-stories + .home-section { padding-top: 12px; }
/* Force the HTML `hidden` attribute to win over the rules below. */
.home-stories[hidden],
.home-stories-more[hidden] { display: none !important; }

.home-stories-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 16px;
  margin: 0 0 16px;
  padding: 0 4px;
}
.home-stories-eyebrow {
  font: 700 11px 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.2em;
  color: var(--nv-accent);
}
.home-stories-more {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  color: var(--nv-muted-fg);
  text-decoration: none;
  font: 700 10.5px 'IBM Plex Mono', monospace;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  transition: gap 180ms ease, color 180ms ease;
}
.home-stories-more:hover { color: var(--nv-fg); gap: 8px; }
.home-stories-more .material-symbols-outlined { font-size: 14px; }

.home-stories-row {
  display: flex;
  gap: 18px;
  overflow-x: auto;
  overflow-y: hidden;
  padding: 6px 16px 18px;
  margin: 0 -16px;
  scroll-snap-type: x proximity;
  -webkit-overflow-scrolling: touch;
  scrollbar-width: none;
}
.home-stories-row::-webkit-scrollbar { display: none; }

/* ── Individual story (circular avatar + label) ── */
.home-story {
  flex: 0 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 8px;
  text-decoration: none;
  color: inherit;
  scroll-snap-align: start;
  cursor: pointer;
  transition: transform 200ms var(--nv-ease, ease);
}
.home-story:hover { transform: translateY(-3px); }

.home-story__ring {
  position: relative;
  width: 78px;
  height: 78px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3px;
  background: var(--nv-accent);
  box-shadow: 0 0 0 1px var(--nv-accent-glow);
  transition: box-shadow 220ms ease, background 220ms ease;
}
.home-story:hover .home-story__ring {
  box-shadow: 0 0 0 4px var(--nv-accent-glow);
}

.home-story__avatar {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  overflow: hidden;
  background: var(--nv-muted);
  border: 2px solid var(--nv-bg);
  box-sizing: border-box;
  position: relative;
}
/* Shimmer overlay — visible until JS flips data-loaded="1" on the
   wrapper after the <img> finishes decoding.                       */
.home-story__avatar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.14) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: avatarShimmer 1.4s linear infinite;
  z-index: 1;
  pointer-events: none;
}
.home-story__avatar[data-loaded="1"]::after { display: none; }
@keyframes avatarShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}
.home-story__avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  position: relative;
  z-index: 2;
  opacity: 0;
  transition: transform 320ms ease, opacity 240ms ease;
}
.home-story__avatar[data-loaded="1"] img { opacity: 1; }
.home-story:hover .home-story__avatar[data-loaded="1"] img { transform: scale(1.06); }

/* Count badge for multi-photo contributors (Instagram-style "+2").
   z-index:3 so it sits ABOVE the avatar's <img> (which has z-index:2)
   — otherwise the bottom-left arc of the badge gets painted over by
   the image wherever they overlap.                                    */
.home-story__count {
  position: absolute;
  top: -3px;
  right: -3px;
  min-width: 20px;
  height: 20px;
  padding: 0 5px;
  border-radius: 999px;
  background: var(--nv-accent, #D4AF37);
  color: var(--nv-accent-on, #0A0A0A);
  font: 700 11px 'Source Sans 3', sans-serif;
  font-variant-numeric: tabular-nums lining-nums;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  box-shadow: 0 0 0 2px var(--nv-bg, #0A0A0A);
  pointer-events: none;
  line-height: 1;
  z-index: 3;
}

/* ── "Share" story (always first, leads to /photos?upload=1) ── */
.home-story--share .home-story__ring {
  background: transparent;
  border: 2px dashed var(--nv-accent);
  padding: 0;
  box-shadow: none;
}
.home-story--share:hover .home-story__ring {
  background: var(--nv-accent-muted);
  border-style: solid;
}
.home-story__plus {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  background: var(--nv-accent);
  color: var(--nv-accent-on);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 200ms ease;
}
.home-story--share:hover .home-story__plus { transform: rotate(90deg); }
.home-story__plus .material-symbols-outlined { font-size: 22px; }

/* ── Name label ── */
.home-story__name {
  font: 700 10.5px 'IBM Plex Mono', monospace;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--nv-muted-fg);
  max-width: 86px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-align: center;
  transition: color 180ms ease;
}
.home-story:hover .home-story__name { color: var(--nv-fg); }
.home-story--share .home-story__name { color: var(--nv-accent); }

/* ── Skeleton loading state ── */
.home-story--skel { pointer-events: none; }
.home-story--skel .home-story__ring,
.home-story--skel .home-story__name {
  position: relative;
  overflow: hidden;
  background-color: var(--nv-muted);
  border: 1px solid var(--nv-border);
  box-shadow: none;
}
.home-story--skel .home-story__name {
  width: 56px;
  height: 10px;
  border-radius: 2px;
  border: 0;
  background-color: rgba(255, 255, 255, 0.05);
}
/* The actual shimmer — a soft highlight that slides left → right.
   `linear-gradient` is used as a moving background, not as a visible
   decorative fill on the surface itself.                            */
.home-story--skel .home-story__ring::after,
.home-story--skel .home-story__name::after {
  content: "";
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    transparent 0%,
    rgba(255, 255, 255, 0.10) 50%,
    transparent 100%
  );
  transform: translateX(-100%);
  animation: storyShimmer 1.6s linear infinite;
}
.home-story--skel .home-story__ring::after { border-radius: 50%; }
@keyframes storyShimmer {
  0%   { transform: translateX(-100%); }
  100% { transform: translateX(100%); }
}

/* Nudge the stories row 4px lower on every non-desktop width — phones,
   tablets, and iPad (portrait + small-iPad landscape both ≤1024px).
   Sits outside the 700px block so it applies to tablet sizes too.    */
@media (max-width: 1024px) {
  .home-stories-row     { margin-top: 4px; }
}

/* ── Mobile sizing — slightly smaller circles ── */
@media (max-width: 700px) {
  .home-stories         { padding: 20px 14px 4px; }
  .home-stories-head    { margin-bottom: 12px; }
  .home-stories-row     { gap: 14px; padding: 4px 12px 14px; margin: 4px -12px 0; }
  .home-story__ring     { width: 68px; height: 68px; padding: 2.5px; }
  .home-story__plus     { width: 32px; height: 32px; }
  .home-story__plus .material-symbols-outlined { font-size: 20px; }
  .home-story__name     { font-size: 9.5px; max-width: 74px; }
}


/* ═══════════════════════════ 8.6 STORY VIEWER ════════════════════════════
   Instagram-style full-screen viewer that opens on story tap. Black
   background, thin progress bars at top, author header, photo
   centered/letterboxed, caption at bottom, tap zones for prev/next,
   auto-advance every 5s.
   ═══════════════════════════════════════════════════════════════════════ */

.story-viewer[hidden] { display: none !important; }
body.story-viewer-open { overflow: hidden; }

.story-viewer {
  position: fixed;
  inset: 0;
  z-index: 9100;
  background: #000;
  display: flex;
  align-items: stretch;
  justify-content: center;
  animation: svFade 180ms ease-out;
  user-select: none;
  -webkit-user-select: none;
  -webkit-tap-highlight-color: transparent;
  /* Suppress the iOS/Android long-press "Save image" callout so our own
     IG-style hold-to-hide gesture isn't hijacked by the OS menu.       */
  -webkit-touch-callout: none;
  touch-action: pan-y;
}
.story-viewer img {
  -webkit-touch-callout: none;
  -webkit-user-drag: none;
  user-select: none;
  pointer-events: none;   /* taps + holds go to the face container */
}
@keyframes svFade {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Progress bars (one per story, animates the active one) ── */
.story-viewer__progress {
  position: absolute;
  top: 10px;
  left: 12px;
  right: 12px;
  display: flex;
  gap: 4px;
  z-index: 4;
}
.story-viewer__progress-bar {
  flex: 1 1 0;
  height: 3px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.32);
  overflow: hidden;
  min-width: 0;
}
.story-viewer__progress-fill {
  display: block;
  height: 100%;
  width: 0%;
  background: #fff;
  border-radius: 999px;
  will-change: width;
}
.story-viewer__progress-bar.is-done .story-viewer__progress-fill { width: 100%; }

/* ── Full-screen 3D cube. Each face is a complete story card so the
     ENTIRE screen folds during a swipe.                              */
.story-viewer__stage {
  position: absolute;
  inset: 0;
  z-index: 1;
  box-sizing: border-box;
  perspective: 1400px;
  perspective-origin: 50% 50%;
  overflow: hidden;
  --cube-half-w: 50vw;
}
.story-viewer__cube {
  position: absolute;
  inset: 0;
  transform-style: preserve-3d;
  will-change: transform;
  /* Pull the cube back by half its width so the front face (translateZ +halfW)
     ends up at z=0 — no perspective magnification, so the overlaid header
     and caption stay at their CSS positions instead of being clipped.    */
  transform: translateZ(calc(-1 * var(--cube-half-w)));
}

/* Each face is a full story card. The photo is a full-bleed absolute
   layer that fills the entire face; the header and caption are
   overlaid on top with text shadows for legibility. translateZ pushes
   each face out so the three form perpendicular planes of a centred
   prism — the entire screen rotates with the cube, not just the photo. */
.story-viewer__face {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  background: #000;
  backface-visibility: hidden;
  will-change: transform;
  overflow: hidden;
}
.story-viewer__face--current { transform: rotateY(  0deg) translateZ(var(--cube-half-w)); animation: svImg 240ms ease-out; }
.story-viewer__face--next    { transform: rotateY( 90deg) translateZ(var(--cube-half-w)); }
.story-viewer__face--prev    { transform: rotateY(-90deg) translateZ(var(--cube-half-w)); }
.story-viewer__face[data-empty="1"] { visibility: hidden; }

/* Chrome layer (progress bars + close X) — child of the cube, pinned
   to the front-face depth so it rotates with the cube during a swipe.
   When the swipe completes and the cube resets to 0°, the chrome ends
   up flat again on the new active face, and `buildProgressBars()`
   refreshes its content for the new contributor.                     */
.story-viewer__chrome {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transform: rotateY(0deg) translateZ(var(--cube-half-w));
  transform-style: preserve-3d;
  backface-visibility: hidden;
  pointer-events: none;     /* let face content receive its own clicks */
  z-index: 3;
}
.story-viewer__chrome > * { pointer-events: auto; }

/* Instagram-style long-press: hide chrome + per-face header/caption
   while the user holds the screen, fade back in on release. The body
   gets `.story-viewer-hold` after HOLD_MS in JS.                       */
.story-viewer__chrome,
.story-viewer__face-header,
.story-viewer__face-caption {
  transition: opacity 180ms ease;
}
body.story-viewer-hold .story-viewer__chrome,
body.story-viewer-hold .story-viewer__face-header,
body.story-viewer-hold .story-viewer__face-caption {
  opacity: 0;
  pointer-events: none;
}

/* The photo: full-bleed background fill of the face. */
/* The photo — rendered as a CSS background-image on a <div>, NOT an
   <img>. WebKit (which Chrome / Firefox / Brave / Edge all use on iOS
   per App Store rules) fires the long-press "Save image" sheet whenever
   it detects an <img>, regardless of `-webkit-touch-callout`. Hiding
   the photo behind a background-image makes WebKit see no image at
   all, so the OS context menu never appears.                          */
.story-viewer__face-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: block;
  background-color: #000;
  background-position: center;
  background-repeat: no-repeat;
  background-size: contain;
  pointer-events: none;
}

/* Loading state — shimmer overlay shown only when the current photo
   hasn't decoded yet. Cached photos render instantly with no flash
   because `.is-loading` is never applied (see home.js, decoded path). */
.story-viewer__face.is-loading .story-viewer__face-img::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    100deg,
    rgba(255, 255, 255, 0)    25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0)    75%
  );
  background-size: 220% 100%;
  animation: svLoadShimmer 1.1s linear infinite;
  pointer-events: none;
}
.story-viewer__face.is-loading::before {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 28px; height: 28px;
  margin: -14px 0 0 -14px;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.18);
  border-top-color: rgba(255, 255, 255, 0.85);
  /* Don't flash for fast networks: spinner fades in after ~200ms. */
  animation: svSpinFadeIn 200ms ease-out 200ms forwards,
             svSpin 720ms linear infinite 200ms;
  opacity: 0;
  z-index: 2;
  pointer-events: none;
}
@keyframes svLoadShimmer {
  from { background-position: 220% 0; }
  to   { background-position: -120% 0; }
}
@keyframes svSpin {
  to { transform: rotate(360deg); }
}
@keyframes svSpinFadeIn {
  to { opacity: 1; }
}

/* Header (avatar + name + time) — overlaid at the top of each face,
   below the global progress bars and clear of the close X.            */
.story-viewer__face-header {
  position: absolute;
  top: 28px;
  left: 12px;
  right: 60px;     /* room for the fixed close button */
  display: flex;
  align-items: center;
  gap: 10px;
  z-index: 2;
  pointer-events: none;
}
.story-viewer__face-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--nv-accent);
  color: var(--nv-accent-on, #fff);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font: 700 14px 'Source Sans 3', sans-serif;
  text-transform: uppercase;
  flex-shrink: 0;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.5);
}
.story-viewer__face-author {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
}
.story-viewer__face-name {
  font: 600 14px 'Source Sans 3', sans-serif;
  color: #fff;
  max-width: 180px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}
.story-viewer__face-time {
  font: 500 11.5px 'IBM Plex Mono', monospace;
  color: rgba(255, 255, 255, 0.75);
  letter-spacing: 0.05em;
  white-space: nowrap;
  text-shadow: 0 1px 3px rgba(0, 0, 0, 0.7);
}

/* Caption — overlaid at the bottom of each face. */
.story-viewer__face-caption {
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 32px;
  z-index: 2;
  text-align: center;
  color: #F2F0E4;
  font: 400 18px 'Playfair Display', serif;
  line-height: 1.35;
  text-shadow: 0 2px 6px rgba(0, 0, 0, 0.7);
  pointer-events: none;
  max-height: 30%;
  overflow: hidden;
}
.story-viewer__face-caption:empty { display: none; }

/* Fixed close button — outside the cube, doesn't rotate */
.story-viewer__close-fixed {
  position: absolute;
  top: 18px;
  right: 12px;
  width: 40px; height: 40px;
  z-index: 5;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: #fff;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: background 160ms ease;
}
.story-viewer__close-fixed:hover { background: rgba(255, 255, 255, 0.12); }
.story-viewer__close-fixed .material-symbols-outlined { font-size: 26px; }

@keyframes svImg {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Tap zones (invisible) ── */
.story-viewer__tap {
  position: absolute;
  top: 60px;          /* below the header so the close X is reachable */
  bottom: 70px;       /* above the caption */
  width: 35%;
  border: 0;
  background: transparent;
  cursor: pointer;
  z-index: 3;
  -webkit-tap-highlight-color: transparent;
}
.story-viewer__tap--prev { left: 0; }
.story-viewer__tap--next { right: 0; width: 65%; }
.story-viewer__tap:focus-visible { outline: 2px solid rgba(255,255,255,0.4); outline-offset: -8px; }

@media (max-width: 700px) {
  .story-viewer__progress       { top: 8px; left: 8px; right: 8px; }
  .story-viewer__face-header    { top: 22px; left: 8px; right: 56px; }
  .story-viewer__face-avatar    { width: 28px; height: 28px; font-size: 13px; }
  .story-viewer__face-name      { font-size: 13px; max-width: 140px; }
  .story-viewer__face-time      { font-size: 11px; }
  .story-viewer__face-caption   { font-size: 16px; bottom: 24px; }
  .story-viewer__close-fixed    { top: 14px; right: 8px; }
}


/* ═══════════════════════════ 9. BOTTOM CTA ═══════════════════════════════ */

.home-bottom-cta {
  position: relative;
  padding: 56px 20px 64px;
  text-align: center;
  overflow: hidden;
}

.home-bottom-cta-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at 50% 80%, rgba(184, 134, 11, 0.06) 0%, transparent 60%);
  pointer-events: none;
}

.home-bottom-cta-inner {
  position: relative;
  z-index: 1;
  max-width: 420px;
  margin: 0 auto;
}

.home-cta-ornament {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 14px;
  margin-bottom: 20px;
  color: var(--nv-accent);
}

.home-cta-ornament .material-symbols-outlined {
  font-size: 20px;
  opacity: 0.5;
}

.home-cta-line {
  width: 40px;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--nv-accent));
}

.home-cta-line:last-child {
  background: linear-gradient(90deg, var(--nv-accent), transparent);
}

.home-bottom-cta h2 {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--nv-fg);
  margin: 0 0 10px;
  letter-spacing: -0.02em;
}

.home-bottom-cta p {
  font-size: 0.88rem;
  color: var(--nv-muted-fg);
  line-height: 1.7;
  margin: 0 0 24px;
}


/* ═══════════════════════════ BUTTONS ═════════════════════════════════════ */

.btn-primary,
.btn-secondary {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  padding: 11px 24px;
  border-radius: var(--nv-radius);
  font-size: 0.86rem;
  font-weight: 600;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  letter-spacing: 0.04em;
  cursor: pointer;
  transition: background-color 300ms var(--home-reveal-ease),
              color 300ms var(--home-reveal-ease),
              border-color 300ms var(--home-reveal-ease),
              box-shadow 300ms var(--home-reveal-ease),
              transform 300ms var(--home-reveal-ease);
  text-decoration: none;
  min-height: 44px;
  white-space: nowrap;
}

.btn-primary {
  position: relative;
  background: var(--nv-accent);
  color: var(--nv-accent-on);
  border: 1px solid var(--nv-accent);
  box-shadow: var(--home-shadow-sm);
  overflow: hidden;
}

.btn-primary:hover {
  background: var(--nv-accent-soft);
  border-color: var(--nv-accent-soft);
  box-shadow: var(--home-shadow-md);
  transform: translateY(-2px);
}

.btn-primary:active { transform: translateY(0); }

.btn-primary .material-symbols-outlined { font-size: 18px; }

/* Shine sweep on primary buttons */
@keyframes homeBtnSweep {
  0%   { left: -60%; }
  100% { left: 130%; }
}

.home-btn-shine {
  position: absolute;
  top: 0;
  left: -60%;
  width: 40%;
  height: 100%;
  background: linear-gradient(105deg,
    transparent 30%,
    rgba(255, 255, 255, 0.22) 50%,
    transparent 70%);
  pointer-events: none;
}

.btn-primary:hover .home-btn-shine {
  animation: homeBtnSweep 0.55s ease-out;
}

.btn-secondary {
  background: transparent;
  color: var(--nv-fg);
  border: 1px solid var(--nv-fg);
  font-weight: 500;
}

.btn-secondary:hover {
  background: var(--nv-muted);
  border-color: var(--nv-accent);
  color: var(--nv-accent);
  transform: translateY(-1px);
}

.btn-secondary .material-symbols-outlined { font-size: 18px; }

.btn-secondary.on-hero {
  border-color: rgba(255, 247, 230, 0.7);
  color: #FFF7E6;
  background: rgba(10, 10, 10, 0.42);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  box-shadow: 0 3px 14px rgba(0, 0, 0, 0.24);
  text-shadow: 0 1px 2px rgba(0, 0, 0, 0.72);
}

.btn-secondary.on-hero:hover {
  background: rgba(240, 230, 210, 0.12);
  border-color: rgba(240, 230, 210, 0.65);
  color: #F5EDD6;
}


/* ═══════════════════════════ DARK MODE ═══════════════════════════════════ */

html.theme-dark .place-card-image--sanctuary,
html.theme-dark .place-card-image--chapel,
html.theme-dark .place-card-image--viewpoint,
html.theme-dark .place-card-image--garden,
body.dark-mode .place-card-image--sanctuary,
body.dark-mode .place-card-image--chapel,
body.dark-mode .place-card-image--viewpoint,
body.dark-mode .place-card-image--garden {
  filter: brightness(0.9) saturate(1.05);
}

html.theme-dark .hero-badge::before,
html.theme-dark .hero-badge::after,
body.dark-mode .hero-badge::before,
body.dark-mode .hero-badge::after {
  background: rgba(212, 175, 55, 0.32);
}

html.theme-dark .home-hero-stats,
body.dark-mode .home-hero-stats {
  box-shadow: var(--home-shadow-md);
}

html.theme-dark .home-bottom-cta-bg,
body.dark-mode .home-bottom-cta-bg {
  background: radial-gradient(ellipse at 50% 80%, rgba(212, 175, 55, 0.04) 0%, transparent 60%);
}

html.theme-dark .home-section-num,
body.dark-mode .home-section-num {
  color: rgba(255, 255, 255, 0.10);
}


/* ═══════════════════════════ RESPONSIVE ══════════════════════════════════ */

@media (min-width: 640px) {
  .home-hero {
    height: 46.5vh;
    height: 46.5dvh;
    min-height: 285px;
    max-height: 413px;
  }
  .home-hero-content {
    padding: 0 40px 42px;
    max-width: 460px;
  }
  .home-hero-stats {
    margin: -30px 28px 0;
  }
  .home-stat { padding: 22px 12px; }
  .home-stat-number { font-size: 1.5rem; }
  .home-section { padding: 48px 32px 0; }
  .featured-places-grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-two-col {
    flex-direction: row;
  }
  .home-two-col > * {
    flex: 1;
    min-width: 0;
  }
  .quick-actions-grid {
    grid-template-columns: repeat(4, 1fr);
  }
  .home-bottom-cta {
    padding: 64px 32px 72px;
  }
  .home-bottom-cta h2 {
    font-size: 1.6rem;
  }
}

@media (min-width: 1024px) {
  .home-wrap { max-width: 1100px; }

  .home-hero {
    height: 56.25vh;
    height: 56.25dvh;
    min-height: 330px;
    max-height: 525px;
  }

  .home-hero-content {
    padding: 0 48px 48px;
    max-width: 500px;
  }

  .home-hero-content h1 {
    font-size: 2.7rem;
    line-height: 1.08;
  }

  .hero-badge { max-width: 280px; }
  .hero-badge-text { font-size: 0.62rem; }
  .hero-rule { width: 44px; }

  .home-hero-content > p {
    font-size: 0.93rem;
    max-width: 410px;
    margin-bottom: 28px;
  }

  .hero-actions { gap: 12px; }
  .hero-actions .btn-primary,
  .hero-actions .btn-secondary {
    padding: 10px 24px;
    font-size: 0.84rem;
  }

  .hero-scroll-hint .material-symbols-outlined { font-size: 28px; }

  .home-hero-arch {
    width: 220px;
    height: 280px;
    border-radius: 110px 110px 0 0;
    opacity: 0.6;
  }
  .home-hero-arch--inner {
    width: 160px;
    height: 200px;
    border-radius: 80px 80px 0 0;
  }

  /* Stat bar */
  .home-hero-stats {
    margin: -34px 40px 0;
    border-radius: 14px;
  }
  .home-stat { padding: 22px 16px; }
  .home-stat-number { font-size: 1.55rem; }
  .home-stat-label { font-size: 0.56rem; letter-spacing: 0.14em; }

  /* Sections */
  .home-section { padding: 48px 40px 0; }
  .section-label-text { font-size: 0.64rem; letter-spacing: 0.16em; }

  /* Quick actions */
  .quick-actions-grid { grid-template-columns: repeat(4, 1fr); gap: 16px; }
  .quick-action-btn { padding: 24px 14px; min-height: 105px; }

  /* Featured places */
  .featured-places-grid { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .place-card { border-radius: 12px; }
  /* `.place-card-image` no longer needs a desktop height override —
     the aspect-ratio rule on the base selector scales with the
     card's width across every breakpoint.                        */

  /* Feature cards side-by-side on desktop */
  .home-feature-card { border-radius: 12px; }
  .home-feature-card--tour { padding: 30px 32px; }
  .home-feature-card--history { padding: 30px 32px; gap: 24px; }

  .home-feature-card--map,
  .home-feature-card--audio,
  .home-feature-card--access {
    flex-direction: row;
  }

  .map-preview-area,
  .audio-preview-area,
  .access-preview-area {
    width: 220px;
    height: auto;
    min-height: 180px;
    flex-shrink: 0;
    border-bottom: none;
    border-right: 1px solid var(--nv-border);
  }

  .home-feature-card--map .home-feature-content,
  .home-feature-card--audio .home-feature-content,
  .home-feature-card--access .home-feature-content {
    padding: 24px 28px;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  .home-feature-content h2 { font-size: 1.45rem; }
  .home-feature-content h3 { font-size: 1.12rem; }
  .home-feature-content p { font-size: 0.84rem; }

  .home-feature-btn { width: auto; align-self: flex-start; }

  .home-two-col { gap: 20px; }
  .tour-stop-chip { font-size: 0.63rem; padding: 4px 11px; }

  .history-fact { padding: 14px 16px; font-size: 0.84rem; }

  .btn-primary, .btn-secondary {
    padding: 10px 22px;
    font-size: 0.82rem;
    border-radius: 8px;
  }

  .home-bottom-cta { padding: 72px 40px 80px; }
  .home-bottom-cta h2 { font-size: 1.7rem; }
}


/* ═══════════════════════════ SCROLL REVEAL ═══════════════════════════════ */

/* ════════════════════════ SKELETON / SHIMMER LOADERS ══════════════════════
   Covers every dynamic-loaded surface on /home:
     • the hero title + subtitle ([data-content-text]),
     • the Featured Places grid (renderFeaturedPlaces),
     • the Recommended Route title + description ([data-route-summary]),
     • the tour stops chips row ([data-route-stops]).

   The colour palette is theme-aware via the `--hs-tint*` variables
   below, so the same shimmer reads correctly on the warm cream
   light theme AND the deep-walnut dark theme. The gradient sweep
   (1.6 s linear infinite) is the same idiom the guide page + the
   home-hero image loader use, so the loading vocabulary stays
   consistent across the site.

   Each loader in home.js carries a first-load gate so the
   skeleton ONLY shows on the very first call. Language changes
   update the rendered content silently in place — no jarring
   "content → shimmer flash → content" cycle.                    */

:root {
  /* Light theme: deeper gold so the tint is visible on cream
     surfaces (--nv-surface ≈ #F6F2EC). */
  --hs-tint-soft: rgba(184, 134, 11, 0.06);
  --hs-tint:      rgba(184, 134, 11, 0.18);
}
html.theme-dark,
body.dark-mode {
  /* Dark theme: slightly brighter gold + higher alpha so the
     shimmer doesn't disappear into the near-black surface. */
  --hs-tint-soft: rgba(212, 175, 55, 0.08);
  --hs-tint:      rgba(212, 175, 55, 0.22);
}

@keyframes home-skel-shimmer {
  0%   { background-position: 220% 0; }
  100% { background-position: -120% 0; }
}

/* Reusable shimmer paint. Any element that gets `.is-skel-line`
   becomes a tinted pill with the diagonal sweep. We do NOT force
   display/width/height: the underlying (transparent) fallback
   text gives the element its natural shape, so when JS swaps in
   the real text there's zero layout shift.                       */
.is-skel-line {
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  color: transparent !important;
  border-color: transparent !important;
  border-radius: 6px;
  user-select: none;
}
.is-skel-line * { color: transparent !important; }
.is-skel-line:empty {
  display: inline-block;
  min-width: 8ch;
  min-height: 1em;
}

/* Force visibility on skeleton-containing reveal sections so
   visitors see the shimmer immediately on first paint instead of
   waiting for the IntersectionObserver to fire and the reveal
   fade-in to run. `:has()` covers modern browsers; `.is-skel-host`
   is an explicit fallback class that JS sets on the section. */
.reveal:has(.is-skel-line),
.reveal:has(.is-skeleton),
.reveal.is-skel-host,
.reveal-children:has(.is-skeleton),
.reveal-children.is-skel-host {
  opacity: 1 !important;
  transform: none !important;
  transition: none;
}
.reveal-children:has(.is-skeleton) > .is-skeleton,
.reveal-children.is-skel-host > .is-skeleton {
  opacity: 1 !important;
  transform: none !important;
  transition: none;
}

/* ── Featured Places skeleton cards ──────────────────────────────────
   Built by home.js renderFeaturedPlaces() on first load. The
   outer .place-card shape matches the real card so when the
   fetch resolves the swap is a content fade rather than a
   layout jump. */
.place-card.is-skeleton {
  pointer-events: none;
  cursor: default;
}
.place-card.is-skeleton:hover {
  transform: none !important;
  box-shadow: var(--home-shadow-sm) !important;
  border-color: var(--home-card-border) !important;
}
.place-card.is-skeleton .place-card-image {
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  border-radius: 0;
}
.place-card.is-skeleton .place-card-image::after { display: none; }
.place-card.is-skeleton .place-card-body { /* keep its native padding */ }
.place-card.is-skeleton .place-card-body h3 {
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  color: transparent;
  border-radius: 6px;
  width: 70%;
  height: 1.1em;
  margin: 0 0 10px;
}
.place-card.is-skeleton .place-card-link {
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  color: transparent !important;
  border-radius: 6px;
  width: 90px;
  height: 0.9em;
  display: inline-block;
}
.place-card.is-skeleton .place-card-link * { display: none; }

/* ── Tour-stops row skeleton chips ─────────────────────────────────
   Replaces the lone "Loading route…" chip with several shimmering
   pills sized like real stop chips, so the row width is stable
   when the real chips swap in. */
.tour-stop-chip.is-skeleton {
  background:
    linear-gradient(110deg,
      var(--hs-tint-soft) 0%,
      var(--hs-tint)      50%,
      var(--hs-tint-soft) 100%);
  background-size: 220% 100%;
  animation: home-skel-shimmer 1.6s linear infinite;
  color: transparent !important;
  border-color: transparent !important;
  min-width: 80px;
  pointer-events: none;
}
.tour-stop-chip.is-skeleton:nth-child(1) { min-width: 110px; }
.tour-stop-chip.is-skeleton:nth-child(3) { min-width:  90px; }
.tour-stop-chip.is-skeleton:nth-child(5) { min-width: 100px; }
.tour-stop-chip.is-skeleton:nth-child(7) { min-width:  80px; }

/* ── Smooth skeleton → real-card swap ─────────────────────────────────
   When renderFeaturedPlaces detects a skeleton was in place, the
   new cards are marked `.is-instant` for the first paint so they
   don't fade in over 0.5s + staggered delays — leaving the panel
   visibly empty between the shimmer vanishing and the real
   content stabilising. The class is stripped after first paint
   so subsequent hover transitions still animate.                 */
.place-card.is-instant,
.reveal-children > .place-card.is-instant {
  opacity: 1 !important;
  transform: none !important;
}

/* Respect reduced-motion preferences — freeze the sweep, keep
   the tinted boxes so the visitor still knows it's a loading
   state. */
@media (prefers-reduced-motion: reduce) {
  .is-skel-line,
  .place-card.is-skeleton .place-card-image,
  .place-card.is-skeleton .place-card-body h3,
  .place-card.is-skeleton .place-card-link,
  .tour-stop-chip.is-skeleton {
    animation: none;
  }
}

.reveal {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.65s var(--home-reveal-ease),
              transform 0.65s var(--home-reveal-ease);
  will-change: opacity, transform;
}

.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* Stagger children inside grids */
.reveal-children > * {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.5s var(--home-reveal-ease),
              transform 0.5s var(--home-reveal-ease);
}

.reveal-children.is-visible > * {
  opacity: 1;
  transform: translateY(0);
}

.reveal-children.is-visible > *:nth-child(1) { transition-delay: 0ms; }
.reveal-children.is-visible > *:nth-child(2) { transition-delay: 70ms; }
.reveal-children.is-visible > *:nth-child(3) { transition-delay: 140ms; }
.reveal-children.is-visible > *:nth-child(4) { transition-delay: 210ms; }

/* Hero content entrance */
.home-hero-content {
  opacity: 1;
  transform: none;
  transition: none;
}

.home-hero-content.is-visible {
  opacity: 1;
  transform: translateY(0);
}


/* ═══════════════════════════ MOBILE LANGUAGE FAB ═════════════════════════ */

.lang-fab-wrap { display: none; }

@media (max-width: 639px) {
  .hero-scroll-hint {
    display: none;
  }

  .lang-fab-wrap {
    display: block;
    position: fixed;
    right: 16px;
    bottom: calc(var(--nv-bottom-h) + env(safe-area-inset-bottom, 0px) + 14px);
    z-index: 110;
    /* Slide up in sync with the sticky CTA so it doesn't end up
       overlapping the bar's right edge. Same easing as the bar.    */
    transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  }

  /* When the sticky CTA is visible, lift the lang FAB above it.
     Bar is flush against nav, ~100 px tall (12 + content + 50 bot
     padding); FAB has its own 14 px lift baked in. Net: 100 - 14
     + 8 (gap) = 94.                                              */
  body.has-sticky-cta .lang-fab-wrap {
    transform: translateY(-78px);
  }


  .lang-fab {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    border: 1px solid rgba(184, 134, 11, 0.3);
    background:
      radial-gradient(circle at 30% 28%, rgba(255, 255, 255, 0.16) 0%, transparent 55%),
      linear-gradient(145deg, var(--nv-accent-soft) 0%, var(--nv-accent) 58%, #9E7209 100%);
    color: var(--nv-accent-on);
    box-shadow:
      0 6px 16px rgba(184, 134, 11, 0.28),
      0 2px 6px rgba(26, 26, 26, 0.12);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 260ms cubic-bezier(0.34, 1.56, 0.64, 1),
                box-shadow 260ms cubic-bezier(0.34, 1.56, 0.64, 1);
    appearance: none;
    -webkit-appearance: none;
    -webkit-tap-highlight-color: transparent;
    outline: none;
    min-height: 44px;
  }

  .lang-fab .material-symbols-outlined {
    font-size: 22px;
    font-variation-settings: 'FILL' 1, 'wght' 400, 'GRAD' 0, 'opsz' 24;
  }

  .lang-fab:hover {
    transform: translateY(-3px) scale(1.06);
    box-shadow:
      0 12px 28px rgba(184, 134, 11, 0.34),
      0 4px 10px rgba(26, 26, 26, 0.16);
  }

  .lang-fab:active { transform: translateY(-1px) scale(1.02); }

  .lang-fab:focus-visible {
    outline: 2px solid var(--nv-accent);
    outline-offset: 3px;
  }

  .lang-fab-dropdown {
    position: absolute;
    right: 0;
    bottom: 58px;
    min-width: 170px;
    padding: 6px;
    border-radius: 12px;
    background: var(--home-card);
    border: 1px solid var(--nv-border);
    box-shadow: 0 8px 28px rgba(26, 26, 26, 0.12);
    z-index: 300;
    visibility: hidden;
    opacity: 0;
    transform: translateY(12px) scale(0.94);
    transform-origin: 100% 100%;
    pointer-events: none;
    transition: opacity 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1),
                visibility 0ms linear 280ms;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  .lang-fab-dropdown.is-open {
    visibility: visible;
    opacity: 1;
    transform: translateY(0) scale(1);
    pointer-events: auto;
    transition: opacity 220ms cubic-bezier(0.34, 1.56, 0.64, 1),
                transform 280ms cubic-bezier(0.34, 1.56, 0.64, 1);
  }

  .lang-fab-option {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 12px;
    border-radius: var(--nv-radius-sm);
    background: none;
    border: none;
    color: var(--nv-muted-fg);
    font-family: 'Source Sans 3', system-ui, sans-serif;
    font-size: 0.86rem;
    font-weight: 500;
    cursor: pointer;
    transition: background-color 180ms ease, color 180ms ease;
  }

  .lang-fab-option:hover {
    background: var(--nv-muted);
    color: var(--nv-fg);
  }

  .lang-fab-option.is-active { color: var(--nv-accent); }

  .lang-fab-option .material-symbols-outlined {
    font-size: 16px;
    visibility: hidden;
  }

  .lang-fab-option.is-active .material-symbols-outlined {
    visibility: visible;
  }
}

html.theme-dark .lang-fab,
body.dark-mode .lang-fab {
  background: linear-gradient(135deg, rgba(212, 175, 55, 0.92) 0%, rgba(184, 134, 11, 0.88) 100%);
  box-shadow:
    0 8px 20px rgba(0, 0, 0, 0.45),
    0 0 0 1px rgba(255, 255, 255, 0.05);
}

html.theme-dark .lang-fab-dropdown,
body.dark-mode .lang-fab-dropdown {
  background: rgba(13, 13, 16, 0.96);
  border-color: rgba(255, 255, 255, 0.08);
  box-shadow: 0 8px 28px rgba(0, 0, 0, 0.6),
              0 0 0 1px rgba(255, 255, 255, 0.05);
}


/* ═══════════════════════════ REDUCED MOTION ══════════════════════════════ */

@media (prefers-reduced-motion: reduce) {
  .home-hero-slide {
    transition: none;
    opacity: 0;
  }
  .home-hero-slide.slide-1 {
    opacity: 1;
    transform: none;
  }
  .quick-action-btn:hover,
  .place-card:hover,
  .btn-primary:hover,
  .home-feature-card:hover {
    transform: none;
  }
  .reveal,
  .reveal-children > *,
  .home-hero-content {
    opacity: 1 !important;
    transform: none !important;
    transition: none !important;
  }
  .hero-scroll-hint {
    animation: none;
  }
  .home-btn-shine {
    display: none;
  }
  .lang-fab-dropdown,
  .lang-fab {
    transition: none !important;
  }
}

/* ═══════════════════════ MOBILE/TABLET ROUTE PREVIEW ════════════════════
   Mirrors the visual idiom of the /guide page's hero card EXACTLY:
   monospace eyebrow → vertical stop list with thumb dots + duration
   pills → three-column stats footer. No title, no description, no
   inline button — the whole <a> wrapping the card IS the navigation
   element, so tapping anywhere on the card starts the guided tour.

   Shown only on viewports under 1024 px (mobile + tablet); the
   .home-feature-card--tour stays in place on desktop.
   ═══════════════════════════════════════════════════════════════════════ */

.home-route-mini { display: none; }

@media (max-width: 1023px) {
  .home-feature-card--tour { display: none !important; }

  .home-route-mini {
    display: flex;
    flex-direction: column;
    position: relative;
    overflow: hidden;
    background: var(--nv-surface, #fff);
    border: 1px solid var(--nv-border);
    border-radius: 20px;
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 16px 40px -22px rgba(0, 0, 0, 0.20);
    text-decoration: none;
    color: inherit;
    transition: transform 240ms ease, box-shadow 240ms ease;
  }
  .home-route-mini:hover,
  .home-route-mini:focus-visible {
    transform: translateY(-2px);
    box-shadow:
      0 1px 2px rgba(0, 0, 0, 0.04),
      0 22px 50px -22px rgba(0, 0, 0, 0.28);
  }
  .home-route-mini:focus-visible {
    outline: 2px solid var(--nv-accent, #b8860b);
    outline-offset: 3px;
  }

  /* Top accent hairline — mirrors guide-route-card::before */
  .home-route-mini::before {
    content: '';
    position: absolute;
    top: 0;
    left: 10%;
    right: 10%;
    height: 1px;
    background: linear-gradient(to right,
      transparent,
      rgba(184, 134, 11, 0.32),
      transparent);
    z-index: 1;
    pointer-events: none;
  }

  /* ── HEADER (eyebrow + small accent icon) ───────────────────── */
  .home-route-mini__head {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 14px 20px;
    border-bottom: 1px solid var(--nv-border);
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.62rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    color: var(--nv-muted-fg, #6b6b78);
  }
  .home-route-mini__head .material-symbols-outlined {
    font-size: 16px;
    color: var(--nv-accent, #b8860b);
  }

  /* ── VISUAL (vertical stop list with thumb dots) ────────────── */
  .home-route-mini__visual {
    padding: 8px 20px 14px;
    display: flex;
    flex-direction: column;
  }

  .home-route-node {
    display: flex;
    align-items: center;
    gap: 14px;
    position: relative;
    padding: 12px 0;
  }
  /* Vertical hairline connector from this dot down to the next one. */
  .home-route-node::before {
    content: '';
    position: absolute;
    left: 18px; /* (dot width 38 / 2) − (line width 1 / 2) */
    top: 56px;
    bottom: -4px;
    width: 1px;
    background: linear-gradient(to bottom,
      var(--nv-accent, #b8860b),
      var(--nv-border));
    opacity: 0.35;
  }
  .home-route-node:last-child::before { display: none; }

  .home-route-dot {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    background: rgba(184, 134, 11, 0.06);
    border: 1.5px solid var(--nv-accent, #b8860b);
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    overflow: hidden;
    z-index: 1;
  }
  .home-route-dot .material-symbols-outlined {
    font-size: 16px;
    color: var(--nv-accent, #b8860b);
  }
  .home-route-dot-thumb {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
  }

  .home-route-node-name {
    flex: 1;
    min-width: 0;
    /* Playfair Display matches the home page's POI / place names.
       Tightened from 1.05 → 0.9 rem because at the larger size the
       names wrapped onto two lines for every stop and the card felt
       front-heavy. 0.9 rem keeps each stop on a single line on most
       mobile widths while still reading as the page's serif idiom. */
    font-family: 'Playfair Display', Georgia, serif;
    font-size: 0.9rem;
    font-weight: 500;
    line-height: 1.3;
    color: var(--nv-fg-strong, var(--nv-fg, #1a1a1a));
  }

  .home-route-node-dur {
    flex-shrink: 0;
    font-family: 'IBM Plex Mono', ui-monospace, monospace;
    font-size: 0.76rem;
    font-weight: 500;
    color: var(--nv-muted-fg, #6b6b78);
    background: rgba(184, 134, 11, 0.06);
    border: 1px solid var(--nv-border);
    border-radius: 999px;
    padding: 4px 10px;
    white-space: nowrap;
  }

  /* Skeleton placeholders (until home.js swaps in real data). */
  .home-route-node.is-skeleton .home-route-dot,
  .home-route-node.is-skeleton .home-route-node-name,
  .home-route-node.is-skeleton .home-route-node-dur {
    background: linear-gradient(90deg,
      rgba(0, 0, 0, 0.06) 0%,
      rgba(0, 0, 0, 0.12) 50%,
      rgba(0, 0, 0, 0.06) 100%);
    background-size: 200% 100%;
    animation: homeRouteShimmer 1.4s ease-in-out infinite;
    border-color: transparent;
    color: transparent;
  }
  .home-route-node.is-skeleton .home-route-node-name {
    height: 14px;
    width: 60%;
    border-radius: 4px;
  }
  .home-route-node.is-skeleton .home-route-node-dur {
    height: 14px;
    width: 44px;
    border-radius: 999px;
  }
  @keyframes homeRouteShimmer {
    0%   { background-position: 200% 0; }
    100% { background-position: -200% 0; }
  }

  /* ── FOOTER (3 equal stat columns with vertical dividers) ───── */
  .home-route-mini__footer {
    display: flex;
    align-items: stretch;
    justify-content: space-around;
    padding: 14px 12px;
    border-top: 1px solid var(--nv-border);
    /* Flat — gradient gold backdrop removed. The thin top border + the
       card's own surface already separate the footer enough; the gold
       wash competed with the stat values for attention. */
    background: transparent;
  }

  .home-route-mini__stat {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 6px;
    flex: 1;
    text-align: center;
    min-width: 0;
  }

  .home-route-mini__stat-val {
    /* Match .home-stat-number (the hero stats below the welcome) so
       the footer values feel like part of the same family — Playfair
       Display, serif. Tightened from 1.25 → 1.0 rem because at the
       larger size each value dwarfed its label and unbalanced the
       three columns. Lining + tabular numerals keep digits aligned. */
    font-family: 'Playfair Display', Georgia, serif;
    font-feature-settings: 'lnum' 1, 'tnum' 1;
    font-variant-numeric: lining-nums tabular-nums;
    font-size: 1rem;
    font-weight: 600;
    line-height: 1.1;
    color: var(--nv-fg-strong, var(--nv-fg, #1a1a1a));
    white-space: nowrap;
  }

  .home-route-mini__stat-lbl {
    font-size: 0.58rem;
    color: var(--nv-muted-fg, #6b6b78);
    text-transform: uppercase;
    letter-spacing: 0.16em;
    white-space: nowrap;
  }

  .home-route-mini__divider {
    width: 1px;
    align-self: center;
    height: 32px;
    background: linear-gradient(to bottom,
      transparent,
      var(--nv-border),
      transparent);
    flex-shrink: 0;
  }
}

/* Dark theme tweaks. */
html.theme-dark .home-route-mini,
body.dark-mode .home-route-mini {
  background: var(--nv-surface, rgba(255, 255, 255, 0.04));
  border-color: rgba(255, 255, 255, 0.10);
  box-shadow:
    0 1px 2px rgba(0, 0, 0, 0.40),
    0 24px 52px -24px rgba(0, 0, 0, 0.55);
}
html.theme-dark .home-route-mini::before,
body.dark-mode .home-route-mini::before {
  background: linear-gradient(to right,
    transparent,
    rgba(184, 134, 11, 0.45),
    transparent);
}
html.theme-dark .home-route-mini__head,
body.dark-mode .home-route-mini__head { border-color: rgba(255, 255, 255, 0.08); }

html.theme-dark .home-route-node-dur,
body.dark-mode .home-route-node-dur {
  background: rgba(184, 134, 11, 0.10);
  border-color: rgba(255, 255, 255, 0.10);
  color: rgba(255, 255, 255, 0.78);
}
html.theme-dark .home-route-mini__footer,
body.dark-mode .home-route-mini__footer {
  /* Footer stays flat in dark mode too — only the top border carries
     the visual break from the stop list. */
  background: transparent;
  border-color: rgba(255, 255, 255, 0.08);
}
html.theme-dark .home-route-mini__divider,
body.dark-mode .home-route-mini__divider {
  background: linear-gradient(to bottom,
    transparent,
    rgba(255, 255, 255, 0.14),
    transparent);
}
html.theme-dark .home-route-node.is-skeleton .home-route-dot,
html.theme-dark .home-route-node.is-skeleton .home-route-node-name,
html.theme-dark .home-route-node.is-skeleton .home-route-node-dur,
body.dark-mode .home-route-node.is-skeleton .home-route-dot,
body.dark-mode .home-route-node.is-skeleton .home-route-node-name,
body.dark-mode .home-route-node.is-skeleton .home-route-node-dur {
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.12) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
}


/* ══════════════════════════════════════════════════════════════════
   STICKY TOUR CTA — slim bar pinned to the bottom of the viewport.

   Lifecycle: hidden by default (translateY 100%). JS adds .is-visible
   when the hero is OUT of view AND the bottom CTA is NOT yet in view.
   When .is-visible, slides up over 320 ms with a soft elastic ease.

   Layout: max-width 720 px content row, left = title + meta (Playfair
   serif + IBM Plex Mono), right = solid gold pill button.
   ══════════════════════════════════════════════════════════════════ */
/* Flat full-width bar pinned just above the bottom-nav. Lifted by
   40 px so the centered map FAB (which protrudes ~30 px above the
   nav top) doesn't clip the content. The lang FAB on the right is
   nudged up via the body.has-sticky-cta hook (rule lives in the
   mobile lang-fab-wrap block) so it doesn't overlap either.       */
.home-sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  /* Flush against the bottom-nav (no gap). The center map FAB
     + its outer glow protrude ~46 px above the nav top — we add
     50 px of EXTRA bottom padding so the text + button always
     sit in the bar's upper portion, completely clear of the FAB.
     The bar's lower band is just empty background.              */
  bottom: var(--nv-bottom-total-h, 0px);
  z-index: 95;
  background: var(--nv-bg);
  border-top: 1px solid var(--nv-border);
  padding: 10px 18px 34px;
  box-shadow: 0 -8px 24px rgba(0, 0, 0, 0.10);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  transform: translateY(100%);
  transition: transform 360ms cubic-bezier(0.22, 1, 0.36, 1);
  pointer-events: none;
}
.home-sticky-cta.is-visible {
  transform: translateY(0);
  pointer-events: auto;
}

/* Desktop: bottom-nav is hidden, anchor the bar at the viewport bottom. */
@media (min-width: 1024px) {
  .home-sticky-cta {
    bottom: 0;
    padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px));
    border-bottom: 0;
  }
}

.home-sticky-cta__inner {
  max-width: 720px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

/* ── Left: title + meta line ── */
.home-sticky-cta__copy {
  display: flex;
  align-items: baseline;
  gap: 8px;
  min-width: 0;
  flex: 1;
  white-space: nowrap;
  overflow: hidden;
}
.home-sticky-cta__title {
  font-family: 'Playfair Display', Georgia, serif;
  font-size: 0.98rem;
  font-weight: 500;
  letter-spacing: -0.01em;
  color: var(--nv-fg);
  flex-shrink: 0;
}
.home-sticky-cta__sep {
  color: var(--nv-accent);
  opacity: 0.55;
  font-weight: 600;
  flex-shrink: 0;
}
.home-sticky-cta__meta {
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  color: var(--nv-muted-fg);
  overflow: hidden;
  text-overflow: ellipsis;
}
.home-sticky-cta__meta strong {
  color: var(--nv-fg);
  font-weight: 700;
}

/* ── Right: solid gold pill button ── */
.home-sticky-cta__btn {
  appearance: none;
  background: var(--nv-accent);
  color: var(--nv-accent-on);
  border: none;
  padding: 9px 18px 9px 14px;
  border-radius: 999px;
  font-family: 'Source Sans 3', system-ui, sans-serif;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
  box-shadow: 0 2px 8px rgba(184, 134, 11, 0.28);
  transition:
    background 200ms ease,
    transform  200ms cubic-bezier(0.22, 1, 0.36, 1),
    box-shadow 200ms ease;
}
.home-sticky-cta__btn:hover {
  background: var(--nv-accent-soft);
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(184, 134, 11, 0.38);
}
.home-sticky-cta__btn:active {
  transform: translateY(0);
  transition-duration: 80ms;
}
.home-sticky-cta__btn-icon {
  width: 12px;
  height: 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.home-sticky-cta__btn-icon svg { width: 100%; height: 100%; }

/* ── Mobile: tighter sizing ── */
@media (max-width: 640px) {
  .home-sticky-cta { padding: 8px 12px; }
  .home-sticky-cta__inner { gap: 10px; }
  .home-sticky-cta__title { font-size: 0.86rem; }
  .home-sticky-cta__meta  { font-size: 0.62rem; }
  .home-sticky-cta__btn   { padding: 8px 14px 8px 12px; font-size: 0.72rem; gap: 6px; }
}

/* On very narrow phones (≤380 px), drop the title so the meta + button
   stay legible without truncation. */
@media (max-width: 380px) {
  .home-sticky-cta__title,
  .home-sticky-cta__sep:not(.home-sticky-cta__sep--inline) { display: none; }
}

/* Dark theme — match the page's obsidian panel surface. */
html.theme-dark .home-sticky-cta,
body.dark-mode  .home-sticky-cta {
  background: rgba(14, 14, 14, 0.94);
  border-top-color: rgba(212, 175, 55, 0.18);
  box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.55);
}

@media (prefers-reduced-motion: reduce) {
  .home-sticky-cta      { transition: none; }
  .home-sticky-cta__btn { transition: none; }
}


/* ══════════════════════════════════════════════════════════════════
   TODAY AT THE SANCTUARY — live status strip above the home hero.

   Single thin row, three monospace cells separated by gold 1 px
   hairlines, with a pulse dot at the start to signal "live."
   Cells fade in from skeleton bars once the API responds; any cell
   whose data is missing hides itself + its trailing separator so
   the strip never looks half-broken.
   ══════════════════════════════════════════════════════════════════ */
.sanc-status {
  background: rgba(14, 14, 14, 0.96);
  border-bottom: 1px solid rgba(212, 175, 55, 0.20);
  padding: 8px 16px;
  font-family: 'IBM Plex Mono', ui-monospace, monospace;
  font-size: 0.66rem;
  letter-spacing: 0.06em;
  color: rgba(242, 240, 228, 0.72);
  position: relative;
  z-index: 10;
}
.sanc-status__inner {
  display: flex;
  align-items: center;
  justify-content: center;
  /* row-gap 6 / column-gap 12 — if the row wraps, the two lines
     sit close together but still read as one composition.       */
  gap: 6px 12px;
  max-width: 960px;
  margin: 0 auto;
  /* Allow wrap by default. When everything fits, it stays on one
     line. When the viewport is too narrow, cells move to a second
     line instead of being truncated.                              */
  flex-wrap: wrap;
}

/* ── Live indicator dot (pulses on a 2 s cycle). ───────────────── */
.sanc-status__pulse {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--nv-accent);
  box-shadow: 0 0 6px rgba(184, 134, 11, 0.7);
  flex-shrink: 0;
  margin-right: 4px;
  animation: sancPulse 2.2s ease-in-out infinite;
}
@keyframes sancPulse {
  0%, 100% { opacity: 1;    transform: scale(1);    }
  50%      { opacity: 0.35; transform: scale(0.55); }
}

/* ── Cells ─────────────────────────────────────────────────────── */
.sanc-status__cell {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  /* Keep each cell on a single line, but let the FLEX CONTAINER
     wrap entire cells to a new line rather than chopping mid-word.
     `overflow: hidden + text-overflow: ellipsis` is intentionally
     removed: with flex-wrap on the parent, an over-long cell now
     wraps gracefully instead of being silently chopped.          */
  white-space: nowrap;
  flex-shrink: 0;
}
.sanc-status__cell strong {
  color: #fffce7;
  font-weight: 700;
}

/* Hide an empty cell AND its trailing separator (gold rule). */
.sanc-status__cell.is-empty,
.sanc-status__cell.is-empty + .sanc-status__rule {
  display: none;
}

/* Hairline gold separator between cells. */
.sanc-status__rule {
  display: inline-block;
  width: 1px;
  height: 11px;
  background: rgba(212, 175, 55, 0.34);
  flex-shrink: 0;
}

/* ── Skeleton — shimmer until the API responds. ────────────────── */
.sanc-status__skel {
  display: inline-block;
  width: 84px;
  height: 9px;
  border-radius: 3px;
  background: linear-gradient(90deg,
    rgba(255, 255, 255, 0.04) 0%,
    rgba(255, 255, 255, 0.14) 50%,
    rgba(255, 255, 255, 0.04) 100%);
  background-size: 200% 100%;
  animation: sancShimmer 1.4s ease-in-out infinite;
}
@keyframes sancShimmer {
  0%   { background-position: -100% 0; }
  100% { background-position:  100% 0; }
}

/* ── Light theme — pale strip on the cream background. ────────── */
html:not(.theme-dark):not(.dark-mode) .sanc-status {
  background: rgba(252, 250, 244, 0.96);
  border-bottom-color: rgba(184, 134, 11, 0.28);
  color: rgba(28, 28, 36, 0.66);
}
html:not(.theme-dark):not(.dark-mode) .sanc-status__cell strong {
  color: #1c1c24;
}
html:not(.theme-dark):not(.dark-mode) .sanc-status__rule {
  background: rgba(184, 134, 11, 0.38);
}
html:not(.theme-dark):not(.dark-mode) .sanc-status__skel {
  background: linear-gradient(90deg,
    rgba(0, 0, 0, 0.04) 0%,
    rgba(0, 0, 0, 0.12) 50%,
    rgba(0, 0, 0, 0.04) 100%);
  background-size: 200% 100%;
}

/* ── Mobile: condense spacing + font. ──────────────────────────── */
@media (max-width: 640px) {
  .sanc-status            { padding: 6px 10px; font-size: 0.6rem; letter-spacing: 0.04em; }
  .sanc-status__inner     { gap: 8px; }
  .sanc-status__pulse     { width: 5px; height: 5px; margin-right: 2px; }
  .sanc-status__rule      { height: 9px; }
  .sanc-status__skel      { width: 64px; height: 8px; }
}

/* Very narrow phones: tighten the wrapped-row gaps so the second
   line sits close to the first.                                   */
@media (max-width: 380px) {
  .sanc-status__inner     { gap: 4px 8px; }
}

/* Respect reduced motion. */
@media (prefers-reduced-motion: reduce) {
  .sanc-status__pulse,
  .sanc-status__skel { animation: none; }
}

