/**
 * Home page — world-class memorial museum landing
 */

.page-home .museum-hero {
  min-height: 100vh;
  min-height: 100dvh;
  background:
    radial-gradient(ellipse 90% 70% at 50% 20%, rgba(255, 23, 68, 0.22) 0%, transparent 55%),
    radial-gradient(ellipse 60% 50% at 80% 80%, rgba(251, 191, 36, 0.08) 0%, transparent 45%),
    linear-gradient(165deg, #0a0f1f 0%, #030712 40%, #020617 100%);
}

.page-home .museum-hero__media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    180deg,
    rgba(3, 7, 18, 0.55) 0%,
    rgba(3, 7, 18, 0.75) 50%,
    rgba(3, 7, 18, 0.95) 100%
  );
  animation: hero-veil-pulse 12s ease-in-out infinite alternate;
}

@keyframes hero-veil-pulse {
  0% { opacity: 0.85; }
  100% { opacity: 1; }
}

/* Enhanced eternal flame */
.page-home .museum-flame {
  width: 88px;
  height: 120px;
  filter: drop-shadow(0 0 30px rgba(255, 23, 68, 0.5));
}

.page-home .museum-flame__core {
  width: 38px;
  height: 64px;
  box-shadow:
    0 0 20px #fff9e6,
    0 0 50px rgba(251, 191, 36, 0.9),
    0 0 80px rgba(255, 23, 68, 0.6);
}

.page-home .museum-flame__glow {
  width: 110px;
  height: 130px;
}

.page-home .museum-flame__reflect {
  bottom: -36px;
  width: 80px;
  height: 48px;
  opacity: 0.65;
  animation: reflect-pulse 3s ease-in-out infinite;
}

@keyframes reflect-pulse {
  0%, 100% { opacity: 0.45; transform: translateX(-50%) scaleY(-1) scale(1); }
  50% { opacity: 0.75; transform: translateX(-50%) scaleY(-1) scale(1.08); }
}

/* Hero typography */
.page-home .museum-hero__title {
  font-family: var(--font-display);
  font-size: clamp(1.75rem, 5.5vw, 3.35rem);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  line-height: 1.15;
  background: linear-gradient(180deg, #ffffff 0%, #e2e8f0 45%, #fbbf24 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 4px 24px rgba(0, 0, 0, 0.8));
}

.page-home .museum-hero__subtitle {
  font-size: clamp(1rem, 2.5vw, 1.2rem);
  font-style: italic;
  max-width: 640px;
  color: rgba(226, 232, 240, 0.92);
  text-shadow: 0 2px 20px rgba(0, 0, 0, 0.6);
}

/* Glass CTA buttons */
.btn-museum--glass {
  background: rgba(15, 23, 42, 0.45) !important;
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border: 1px solid rgba(255, 255, 255, 0.18) !important;
  box-shadow:
    0 8px 32px rgba(0, 0, 0, 0.35),
    inset 0 1px 0 rgba(255, 255, 255, 0.1);
  position: relative;
  overflow: hidden;
}

.btn-museum--glass::before {
  content: '';
  position: absolute;
  inset: -2px;
  border-radius: inherit;
  padding: 2px;
  background: linear-gradient(120deg, var(--museum-crimson), var(--museum-gold), var(--museum-crimson));
  background-size: 200% 100%;
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
  opacity: 0;
  transition: opacity 0.35s;
  animation: border-flow 4s linear infinite;
  pointer-events: none;
}

.btn-museum--glass:hover {
  transform: translateY(-3px);
  box-shadow:
    0 14px 40px rgba(255, 23, 68, 0.35),
    0 0 30px rgba(251, 191, 36, 0.15);
}

.btn-museum--glass:hover::before {
  opacity: 1;
}

.btn-museum--glass.btn-museum--crimson {
  color: #fff !important;
  border-color: rgba(255, 23, 68, 0.5) !important;
}

.btn-museum--glass.btn-museum--gold {
  color: var(--museum-gold) !important;
}

/* Portrait ring strip */
.portrait-ring {
  margin-top: 2.5rem;
  padding: 1rem 0;
  overflow: hidden;
  mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 8%, #000 92%, transparent);
}

.portrait-ring__track {
  display: flex;
  gap: 1.25rem;
  width: max-content;
  animation: portrait-scroll 45s linear infinite;
}

.portrait-ring__track:hover {
  animation-play-state: paused;
}

@keyframes portrait-scroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

.portrait-ring__item {
  flex: 0 0 auto;
  text-align: center;
  text-decoration: none !important;
  transition: transform 0.35s ease;
}

.portrait-ring__item:hover {
  transform: translateY(-6px) scale(1.05);
}

.portrait-ring__avatar {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(251, 191, 36, 0.45);
  box-shadow:
    0 0 0 3px rgba(255, 23, 68, 0.25),
    0 8px 24px rgba(0, 0, 0, 0.5);
  display: block;
  margin: 0 auto;
}

.portrait-ring__avatar--placeholder {
  width: 64px;
  height: 64px;
  border-radius: 50%;
  margin: 0 auto;
  background: linear-gradient(135deg, #1e293b, #0f172a);
  border: 2px solid rgba(251, 191, 36, 0.35);
}

.portrait-ring__name {
  display: block;
  font-size: 0.62rem;
  color: var(--museum-text-soft);
  margin-top: 0.35rem;
  max-width: 72px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

/* Section ornament */
.museum-ornament {
  text-align: center;
  color: var(--museum-gold);
  font-size: 0.85rem;
  letter-spacing: 0.35em;
  margin: 0 auto 2rem;
  opacity: 0.85;
}

.museum-ornament::before,
.museum-ornament::after {
  content: '✦';
  margin: 0 0.5rem;
  opacity: 0.7;
}

/* Primary stats band */
.home-stats {
  padding: 4rem 0 3.5rem;
  position: relative;
  z-index: 6;
}

.home-stats__grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.25rem;
  max-width: 960px;
  margin: 0 auto;
}

.home-stat-card {
  text-align: center;
  padding: 1.75rem 1rem;
  border-radius: 20px;
  transition: transform 0.35s ease, box-shadow 0.35s ease;
}

.home-stat-card:hover {
  transform: translateY(-6px);
}

.home-stat-card__num {
  display: block;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 700;
  color: var(--museum-gold);
  text-shadow: 0 0 32px rgba(251, 191, 36, 0.45);
  line-height: 1;
}

.home-stat-card__label {
  display: block;
  margin-top: 0.6rem;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--museum-text-soft);
}

/* Today featured — museum card */
.home-featured {
  padding: 5rem 0;
}

.home-featured__card {
  max-width: 1000px;
  margin: 0 auto;
  overflow: hidden;
}

.home-featured__inner {
  display: grid;
  grid-template-columns: minmax(240px, 320px) 1fr;
  gap: 2.5rem;
  align-items: center;
  padding: 2rem;
}

.home-featured__photo {
  width: 100%;
  aspect-ratio: 3/4;
  object-fit: cover;
  border-radius: 12px;
  box-shadow:
    0 0 0 1px rgba(251, 191, 36, 0.3),
    0 20px 60px rgba(0, 0, 0, 0.55),
    0 0 80px rgba(255, 23, 68, 0.15);
}

/* Candle remembrance */
.home-candle {
  padding: 5rem 0;
  text-align: center;
}

.home-candle__glow {
  position: relative;
  display: inline-block;
  margin-bottom: 1.5rem;
}

.home-candle__flame {
  font-size: 4rem;
  filter: drop-shadow(0 0 24px rgba(251, 191, 36, 0.8));
  animation: candle-glow-pulse 2.5s ease-in-out infinite;
}

.home-candle__glow::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: -8px;
  transform: translateX(-50%);
  width: 120px;
  height: 40px;
  background: radial-gradient(ellipse, rgba(251, 191, 36, 0.35), transparent 70%);
  animation: candle-glow-pulse 2.5s ease-in-out infinite;
}

@keyframes candle-glow-pulse {
  0%, 100% { opacity: 0.7; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.05); }
}

.home-candle__count {
  font-family: var(--font-display);
  font-size: clamp(2.5rem, 6vw, 3.5rem);
  color: var(--museum-gold);
  text-shadow: 0 0 40px rgba(251, 191, 36, 0.5);
}

/* Wall preview masonry */
.home-wall-preview {
  padding: 5rem 0;
}

.home-wall-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  grid-auto-rows: 8px;
  gap: 0.85rem;
  margin-bottom: 2.5rem;
}

.home-wall-tile {
  grid-row-end: span 28;
  position: relative;
  border-radius: 14px;
  overflow: hidden;
  display: block;
  text-decoration: none !important;
  border: 1px solid rgba(255, 23, 68, 0.2);
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.4s;
}

.home-wall-tile:nth-child(3n+1) { grid-row-end: span 34; }
.home-wall-tile:nth-child(5n+2) { grid-column: span 2; grid-row-end: span 22; }

.home-wall-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.5s ease;
}

.home-wall-tile:hover {
  transform: translateY(-4px) scale(1.02);
  border-color: rgba(251, 191, 36, 0.5);
  box-shadow: 0 16px 48px rgba(255, 23, 68, 0.25);
  z-index: 2;
}

.home-wall-tile:hover img {
  transform: scale(1.08);
}

.home-wall-tile__overlay {
  position: absolute;
  inset: auto 0 0 0;
  padding: 2rem 0.75rem 0.65rem;
  background: linear-gradient(transparent, rgba(0, 0, 0, 0.92));
  font-size: 0.78rem;
  font-weight: 600;
  color: #fff;
  text-align: center;
}

/* Compact sections */
.home-section-compact {
  padding: 3.5rem 0;
}

.museum-section--alt {
  background: rgba(3, 7, 18, 0.5);
  border-block: 1px solid rgba(255, 23, 68, 0.12);
}

@media (max-width: 991px) {
  .home-stats__grid {
    grid-template-columns: repeat(2, 1fr);
  }
  .home-featured__inner {
    grid-template-columns: 1fr;
    text-align: center;
  }
  .home-featured__photo {
    max-width: 280px;
    margin: 0 auto;
  }
  .home-wall-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .home-wall-tile:nth-child(5n+2) {
    grid-column: auto;
  }
}

@media (max-width: 575px) {
  .home-wall-grid {
    grid-template-columns: 1fr 1fr;
  }
  .home-wall-tile:nth-child(3n+1),
  .home-wall-tile:nth-child(5n+2) {
    grid-row-end: span 28;
    grid-column: auto;
  }
  .portrait-ring__avatar,
  .portrait-ring__avatar--placeholder {
    width: 52px;
    height: 52px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .portrait-ring__track,
  .page-home .museum-hero__media::after,
  .home-candle__flame,
  .home-candle__glow::after {
    animation: none !important;
  }
}
