/* ============================================================
   HALLOWED AURORA STUDIOS — ECHOES OF THE PAST
   Restore Point: Aapo+Uniform+Titles+Sigil+AboutGlow
   ============================================================ */

/* ===== VARIABLES ===== */
:root {
  --crimson: #8b0000;
  --crimson-glow: #b30000;
  --text: #ffffff;
  --bg-dark: #000000;
  --font-main: 'Trade Winds', serif;
}

/* ===== RESET ===== */
* { margin: 0; padding: 0; box-sizing: border-box; }

/* ===== GLOBAL ===== */
html, body {
  height: 100%;
  background: #000;
  font-family: var(--font-main);
  color: var(--text);
  overflow-x: hidden;
  scroll-behavior: smooth;
}

body { padding-top: 0; }

/* ============================================================
   NAVBAR
   ============================================================ */
.navbar {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: 80px;
  padding: 10px 40px;
  display: flex;
  justify-content: space-between;
  align-items: center;
  background: transparent;
  transition: background 0.4s ease, box-shadow 0.4s ease;
  z-index: 9999;
}

.nav-left {
  display: flex;
  align-items: center;
  gap: 12px;
}

.navbar img.logo {
  height: 60px;
  width: auto;
  object-fit: contain;
  filter: drop-shadow(0 0 8px var(--crimson));
  transition: transform 0.3s ease, filter 0.3s ease;
}

.navbar img.logo:hover {
  transform: scale(1.05);
  filter: drop-shadow(0 0 12px var(--crimson-glow));
}

.nav-links {
  display: flex;
  gap: 22px;
}

.nav-links a {
  text-decoration: none;
  color: #ddd;
  font-size: 1rem;
  transition: color 0.3s ease, text-shadow 0.3s ease;
}

.nav-links a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--crimson-glow);
}

.nav-sep {
  color: var(--crimson);
  opacity: 0.4;
  margin: 0 5px;
  user-select: none;
}

.navbar.scrolled {
  background: linear-gradient(to bottom, rgba(20,0,0,0.75), rgba(0,0,0,0.55));
  box-shadow: 0 0 25px rgba(179,0,0,0.6);
  border-bottom: 1px solid rgba(179,0,0,0.4);
  backdrop-filter: blur(6px);
}

/* ============================================================
   HEADER
   ============================================================ */
.main-header {
  position: relative;
  text-align: center;
  color: var(--text);
  padding: 16rem 2rem;
  background: url("assets/Echoes_of_the_Past_banner.png") center center / cover no-repeat;
  background-attachment: fixed;
  text-shadow: 0 0 20px rgba(179, 0, 0, 0.8);
  z-index: 5;
  overflow: hidden;
}

.main-header::after {
  content: "";
  position: absolute;
  top: 0; left: -50%;
  width: 200%; height: 100%;
  background: radial-gradient(circle at 50% 0%, rgba(179, 0, 0, 0.15) 0%, transparent 70%);
  animation: emberSweep 14s linear infinite;
  z-index: 0;
  pointer-events: none;
}

@keyframes emberSweep {
  0% { transform: translateX(-25%) rotate(0deg); opacity: 0.3; }
  50% { transform: translateX(25%) rotate(1deg); opacity: 0.4; }
  100% { transform: translateX(-25%) rotate(0deg); opacity: 0.3; }
}

.main-header h1 {
  position: relative;
  font-size: 4rem;
  letter-spacing: 3px;
  color: #ff1e1e;
  text-shadow:
    0 0 15px rgba(179, 0, 0, 0.8),
    0 0 30px rgba(255, 30, 30, 0.6),
    0 0 45px rgba(179, 0, 0, 0.8);
  animation: titlePulse 3.5s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes titlePulse {
  0% { text-shadow: 0 0 10px rgba(179,0,0,0.7), 0 0 20px rgba(255,30,30,0.5); }
  100% { text-shadow: 0 0 20px rgba(255,60,60,0.9), 0 0 40px rgba(179,0,0,1); }
}

.tagline {
  position: relative;
  margin-top: 0.75rem;
  font-size: 1.2rem;
  color: #eee;
  text-shadow: 0 0 6px rgba(179, 0, 0, 0.8);
  animation: taglineGlow 4s ease-in-out infinite alternate;
  z-index: 2;
}

@keyframes taglineGlow {
  0% { opacity: 0.8; text-shadow: 0 0 4px rgba(179,0,0,0.6); }
  100% { opacity: 1; text-shadow: 0 0 12px rgba(255,60,60,0.9); }
}

/* ============================================================
   SECTION TITLES
   ============================================================ */
section h2 {
  font-size: 2.2rem;
  color: #ff1e1e;
  text-transform: uppercase;
  letter-spacing: 2px;
  margin-bottom: 2rem;
  text-shadow:
    0 0 12px rgba(179,0,0,0.8),
    0 0 24px rgba(255,30,30,0.6);
  position: relative;
}
/* ===== SECTION TITLE ALIGNMENT FIX ===== */
section h2 {
  text-align: center;
  display: block;
  margin-left: auto;
  margin-right: auto;
  width: 100%;
}

section h2::after {
  content: "";
  position: absolute;
  bottom: -8px;
  left: 50%;
  transform: translateX(-50%);
  width: 80px;
  height: 3px;
  background: var(--crimson);
  box-shadow: 0 0 10px var(--crimson-glow);
  border-radius: 3px;
}

/* ============================================================
   SECTIONS
   ============================================================ */
.section-divider {
  width: 100%;
  height: 3px;
  background: var(--crimson);
  box-shadow: 0 0 15px var(--crimson-glow);
}

.section {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10, 0, 0, 0.9) 0%, rgba(0, 0, 0, 1) 100%);
  border-top: 1px solid rgba(255, 0, 0, 0.2);
  border-bottom: 1px solid rgba(255, 0, 0, 0.2);
}


.section-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 2rem;
  position: relative;
}

.about-section    { background: linear-gradient(to bottom, #3a0000 0%, #000 100%); }
.features-section { background: linear-gradient(to bottom, #400000 0%, #000 100%); }
.gallery-section  { background: linear-gradient(to bottom, #350000 0%, #000 100%); }

/* ABOUT GLOW */
.about-section p {
  font-size: 1.05rem;
  color: #f5f5f5;
  text-align: center;
  margin-bottom: 1.5rem;
  line-height: 1.8;
  text-shadow: 0 0 8px rgba(255,255,255,0.12), 0 0 20px rgba(179,0,0,0.15);
}

.about-section strong {
  color: #ff2b2b;
  font-weight: bold;
  text-shadow: 0 0 8px rgba(255,0,0,0.7), 0 0 18px rgba(179,0,0,0.8);
}

/* ============================================================
   FEATURES — cinematic candlelight glow + ember drift
   ============================================================ */
.features-section {
  position: relative;
  background: linear-gradient(to bottom, #400000 0%, #000 100%);
  overflow: hidden;
  animation: featuresBreathe 20s ease-in-out infinite alternate;
}

/* subtle breathing gradient */
@keyframes featuresBreathe {
  0% { background: linear-gradient(to bottom, #400000 0%, #000 100%); }
  50% { background: linear-gradient(to bottom, #4b0000 0%, #100000 100%); }
  100% { background: linear-gradient(to bottom, #400000 0%, #000 100%); }
}

/* drifting ember particles */
.features-section::before,
.features-section::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(circle, rgba(255,80,80,0.15) 1px, transparent 1px),
    radial-gradient(circle, rgba(255,40,40,0.1) 1px, transparent 1px);
  background-size: 250px 250px, 180px 180px;
  opacity: 0.2;
  mix-blend-mode: screen;
  animation: emberDrift 60s linear infinite;
  pointer-events: none;
  z-index: 1;
}
.features-section::after {
  animation-duration: 90s;
  opacity: 0.15;
  background-size: 320px 320px, 220px 220px;
}
@keyframes emberDrift {
  from { transform: translateY(0) translateX(0); }
  to { transform: translateY(-20%) translateX(10%); }
}

/* feature grid unchanged */
.features-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
  gap: 2.5rem;
  max-width: 1100px;
  margin: 3rem auto;
  justify-items: center;
  position: relative;
  z-index: 2;
}

/* candlelight glow boxes */
@keyframes candleBreath {
  0%,100% {
    box-shadow: 0 0 12px rgba(179,0,0,0.3),
                inset 0 0 6px rgba(179,0,0,0.25);
    background: rgba(20,0,0,0.6);
  }
  50% {
    box-shadow: 0 0 25px rgba(179,0,0,0.8),
                inset 0 0 10px rgba(179,0,0,0.5);
    background: rgba(40,0,0,0.8);
  }
}

.feature-box {
  border: 1px solid var(--crimson);
  border-radius: 12px;
  padding: 1.8rem;
  text-align: left;
  transition: transform 0.3s ease;
  width: 100%;
  min-height: 180px;
  display: flex;
  flex-direction: column;
  justify-content: flex-start;
  animation: candleBreath 6s ease-in-out infinite alternate;
  position: relative;
  overflow: hidden;
}

.feature-box::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 20%, rgba(255,80,80,0.05), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: candleFlicker 3.5s ease-in-out infinite alternate;
  z-index: 0;
}
@keyframes candleFlicker {
  0% { opacity: 0.3; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.05); }
  100% { opacity: 0.35; transform: scale(0.98); }
}

.feature-box:hover {
  transform: translateY(-6px);
  background: rgba(50,0,0,0.9);
  box-shadow: 0 0 40px var(--crimson-glow),
              inset 0 0 15px rgba(179,0,0,0.7);
  animation: none;
}

.feature-box h3 {
  color: var(--crimson-glow);
  text-shadow: 0 0 10px var(--crimson-glow);
  margin-bottom: 0.5rem;
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.feature-box p {
  color: #eee;
  line-height: 1.5;
  font-size: 0.95rem;
  margin-top: 0.35rem;
  position: relative;
  z-index: 1;
}


/* ============================================================
   GALLERY — spectral flicker + lightbox interaction
   ============================================================ */
.gallery-section {
  position: relative;
  background: linear-gradient(to bottom, #350000 0%, #000 100%);
  overflow: hidden;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.75rem;
  margin: 4rem auto;
  max-width: 1400px;
  justify-items: center;
  position: relative;
  z-index: 2;
}

.gallery-item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  width: 100%;
  aspect-ratio: 16/10;
  background: #000;
  transform: translateY(40px);
  opacity: 0;
  transition: transform 0.6s ease-out, opacity 1s ease-out, box-shadow 0.4s ease;
  box-shadow: 0 0 20px rgba(139,0,0,0.3);
  cursor: pointer;
}

.gallery-item.visible { transform: translateY(0); opacity: 1; }

.gallery-item img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: brightness(0.9) contrast(1.05) saturate(0.95);
  transition: transform 0.6s ease, filter 0.6s ease;
  will-change: transform, filter;
}

.gallery-item:hover img {
  transform: scale(1.08);
  animation: spectralFlickerHue 1.8s ease-in-out infinite alternate;
}

/* spectral flicker with hue rotation */
@keyframes spectralFlickerHue {
  0% { filter: brightness(0.9) contrast(1.05) hue-rotate(0deg); }
  25% { filter: brightness(1.2) contrast(1.1) hue-rotate(25deg); }
  50% { filter: brightness(1.4) contrast(1.15) hue-rotate(-35deg); }
  75% { filter: brightness(1.1) contrast(1.1) hue-rotate(45deg); }
  100% { filter: brightness(1.0) contrast(1.05) hue-rotate(0deg); }
}

.gallery-item:hover {
  box-shadow: 0 0 30px rgba(179,0,0,0.7), inset 0 0 12px rgba(179,0,0,0.4);
}

.gallery-item::after {
  content: "";
  position: absolute;
  top: -100%;
  left: 0;
  width: 100%;
  height: 12%;
  background: linear-gradient(to bottom, rgba(255,255,255,0) 0%, rgba(255,255,255,0.25) 50%, rgba(255,255,255,0) 100%);
  opacity: 0.15;
  transform: rotate(0.3deg);
  z-index: 5;
  pointer-events: none;
}
.gallery-item:hover::after { animation: staticSweep 0.6s linear 1; }

@keyframes staticSweep {
  from { top: -100%; opacity: 0.25; }
  50% { opacity: 0.35; }
  to { top: 120%; opacity: 0; }
}

/* LIGHTBOX STYLING */
.lightbox {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.95);
  justify-content: center;
  align-items: center;
  z-index: 10000;
  flex-direction: column;
  text-align: center;
}

.lightbox-img {
  max-width: 85%;
  max-height: 80%;
  border: 2px solid var(--crimson);
  border-radius: 12px;
  box-shadow: 0 0 25px var(--crimson-glow);
  animation: lightboxFade 0.6s ease forwards;
}

@keyframes lightboxFade {
  from { opacity: 0; transform: scale(0.9); }
  to { opacity: 1; transform: scale(1); }
}

.close-btn {
  position: absolute;
  top: 30px;
  right: 50px;
  font-size: 2rem;
  color: #fff;
  cursor: pointer;
  text-shadow: 0 0 10px var(--crimson-glow);
}

#download-btn {
  display: inline-block;
  margin-top: 1.5rem;
  padding: 10px 20px;
  background: var(--crimson);
  color: #fff;
  text-decoration: none;
  font-family: var(--font-main);
  border-radius: 8px;
  box-shadow: 0 0 12px var(--crimson-glow);
  transition: background 0.3s ease, box-shadow 0.3s ease;
}

#download-btn:hover {
  background: var(--crimson-glow);
  box-shadow: 0 0 25px var(--crimson-glow);
}

/* ============================================================
   BGM BUTTON — arcane sigil
   ============================================================ */
.bgm-button {
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  width: 35px;
  height: 35px;
  margin-left: 4px;
  border-radius: 50%;
  border: 1px solid rgba(90,0,0,0.8);
  background: radial-gradient(circle at center, rgba(15,0,0,0.95) 60%, rgba(0,0,0,0.9) 100%);
  box-shadow: 0 0 8px rgba(179,0,0,0.45), inset 0 0 6px rgba(179,0,0,0.25);
  cursor: pointer;
  overflow: hidden;
  transition: all 0.3s ease;
  transform: translateY(-3px);
}

.bgm-button i {
  width: 22px;
  height: 22px;
  color: #fff;
  stroke-width: 2.1;
  filter: drop-shadow(0 0 5px rgba(179,0,0,0.6));
  transition: filter 0.3s ease, transform 0.3s ease;
}

.bgm-button:hover i {
  transform: scale(1.1);
  filter: drop-shadow(0 0 9px rgba(255,60,60,0.9));
}

/* ============================================================
   FOOTER — full asynchronous desync (chaotic irregular pulses)
   ============================================================ */
.footer {
  background: #000;
  padding: 2.25rem 0 2.5rem;
  text-align: center;
  color: #ccc;
  border-top: 2px solid var(--crimson);
  box-shadow: 0 0 15px var(--crimson-glow);
}

.footer-inner {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.footer .social {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 6px;
  margin-bottom: 1.5rem;
}

.footer .social a {
  color: #ddd;
  text-decoration: none;
  font-size: 0.95rem;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: color 0.25s ease, text-shadow 0.25s ease;
  animation: footerPulse var(--pulse-duration, 3s) ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
  filter: brightness(var(--pulse-bright, 1));
}

.footer .social a:hover {
  color: #fff;
  text-shadow: 0 0 8px var(--crimson-glow);
}

.footer .social i {
  width: 16px;
  height: 16px;
  color: #fff;
  stroke-width: 1.8;
  text-shadow: 0 0 6px rgba(179,0,0,0.6);
}

.footer .nav-sep {
  color: var(--crimson);
  opacity: 0.5;
  margin: 0 10px;
}

.footer .copyright {
  margin-top: 0.75rem;
  font-size: 0.9rem;
  opacity: 0.85;
  color: #bbb;
}

/* Heartbeat keyframes — irregular glow strength */
@keyframes footerPulse {
  0%, 100% {
    color: #a00000;
    text-shadow: 0 0 8px rgba(139,0,0,0.6), 0 0 14px rgba(139,0,0,0.4);
    filter: brightness(0.9);
  }
  40% {
    color: #fff;
    text-shadow:
      0 0 14px rgba(179,0,0,0.9),
      0 0 25px rgba(179,0,0,0.7),
      0 0 38px rgba(179,0,0,0.6);
    filter: brightness(1.2);
  }
  70% {
    color: #ff2a2a;
    text-shadow:
      0 0 18px rgba(255,30,30,0.95),
      0 0 30px rgba(179,0,0,0.85),
      0 0 45px rgba(179,0,0,0.7);
    filter: brightness(1.3);
  }
}

/* Asynchronous chaos — none will ever overlap */
.footer .social a:nth-child(1) { --pulse-duration: 2.6s; --pulse-delay: 0.17s; --pulse-bright: 0.95; }
.footer .social a:nth-child(2) { --pulse-duration: 3.5s; --pulse-delay: 1.08s; --pulse-bright: 1.15; }
.footer .social a:nth-child(3) { --pulse-duration: 2.9s; --pulse-delay: 0.49s; --pulse-bright: 1.05; }
.footer .social a:nth-child(4) { --pulse-duration: 4.2s; --pulse-delay: 1.61s; --pulse-bright: 1.25; }
.footer .social a:nth-child(5) { --pulse-duration: 3.3s; --pulse-delay: 0.82s; --pulse-bright: 0.98; }
.footer .social a:nth-child(6) { --pulse-duration: 2.8s; --pulse-delay: 1.47s; --pulse-bright: 1.1; }
.footer .social a:nth-child(7) { --pulse-duration: 4.6s; --pulse-delay: 0.37s; --pulse-bright: 1.18; }
.footer .social a:nth-child(8) { --pulse-duration: 3.1s; --pulse-delay: 1.93s; --pulse-bright: 1.2; }

@media (max-width: 600px) {
  .footer .social { flex-direction: column; }
}

/* ============================================================
   RUNE-LIGHT DIVIDER EFFECT — enhanced visibility
   ============================================================ */
.section-divider {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  box-shadow: 0 0 25px rgba(179,0,0,0.8);
}

.section-divider::before {
  content: "";
  position: absolute;
  inset: -1px;
  background:
    repeating-linear-gradient(
      45deg,
      rgba(255,140,0,0.25) 0px,
      rgba(255,80,0,0.25) 10px,
      transparent 12px,
      transparent 25px
    ),
    repeating-linear-gradient(
      -45deg,
      rgba(255,0,0,0.25) 0px,
      rgba(255,0,0,0.25) 8px,
      transparent 10px,
      transparent 24px
    );
  background-size: 300% 300%;
  mix-blend-mode: screen;
  opacity: 0;
  pointer-events: none;
  filter: blur(2px);
}

.section-divider::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 50%, rgba(255,100,0,0.25), transparent 70%);
  opacity: 0;
  pointer-events: none;
  mix-blend-mode: screen;
}

.section-divider.rune-active::before {
  animation: runeGlow 7s ease-in-out forwards, runeDrift 12s linear infinite;
  opacity: 1;
}

.section-divider.rune-active::after {
  animation: emberPulse 6s ease-in-out forwards;
  opacity: 0.4;
}

@keyframes runeGlow {
  0%   { opacity: 0; filter: brightness(0.4) blur(2px); }
  25%  { opacity: 0.9; filter: brightness(1.3) blur(1px); }
  50%  { opacity: 1; filter: brightness(1.7) blur(0.8px); }
  75%  { opacity: 0.8; filter: brightness(1.2) blur(1px); }
  100% { opacity: 0; filter: brightness(0.5) blur(2px); }
}

@keyframes runeDrift {
  0%   { background-position: 0% 0%; }
  50%  { background-position: 100% 100%; }
  100% { background-position: 0% 0%; }
}

@keyframes emberPulse {
  0%, 100% { opacity: 0.2; transform: scale(1); filter: blur(2px); }
  50% { opacity: 0.6; transform: scale(1.05); filter: blur(3px); }
}



/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 1024px) {
  .features-grid { grid-template-columns: repeat(2, 1fr); }
  .main-header h1 { font-size: 2.6rem; }
}

@media (max-width: 600px) {
  .features-grid { grid-template-columns: 1fr; }
  .main-header { padding: 6rem 1.25rem; }
  .main-header h1 { font-size: 2.1rem; }
  .tagline { font-size: 0.95rem; }
  .footer .social { flex-direction: column; }
}
/* ============================================================
   AMBIENT SHIMMER — cinematic heartbeat glow (enhanced visibility)
   ============================================================ */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  z-index: 6; /* just beneath mist, above all content */
  background: radial-gradient(
    circle at 50% 50%,
    rgba(179, 0, 0, 0.5) 0%,
    rgba(80, 0, 0, 0.25) 35%,
    rgba(0, 0, 0, 0.85) 100%
  );
  mix-blend-mode: overlay;
  opacity: 0.45;
  animation: ambientPulse 6s ease-in-out infinite alternate;
  transition: opacity 1.5s ease;
  filter: blur(12px);
}

@keyframes ambientPulse {
  0% {
    opacity: 0.3;
    transform: scale(1);
    filter: brightness(1) blur(8px);
  }
  50% {
    opacity: 0.65;
    transform: scale(1.05);
    filter: brightness(1.4) blur(15px);
  }
  100% {
    opacity: 0.3;
    transform: scale(1);
    filter: brightness(1) blur(8px);
  }
}/* ============================================================
   AMBIENT WALL OF ECHOES + RED LANTERNS
   ============================================================ */
.ambient-wall {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(80,0,0,0.12) 0%, transparent 70%),
    radial-gradient(circle at 70% 60%, rgba(100,0,0,0.10) 0%, transparent 80%),
    url("assets/textures/wall_of_echoes.png");
  background-size: cover;
  background-blend-mode: overlay;
  opacity: 0.22;
  filter: blur(4px) brightness(0.8) contrast(1.2);
  z-index: 1;
  pointer-events: none;
  animation: wallBreath 60s ease-in-out infinite alternate;
}

@keyframes wallBreath {
  0%   { opacity: 0.18; filter: blur(3px) brightness(0.75); }
  50%  { opacity: 0.28; filter: blur(5px) brightness(0.9); }
  100% { opacity: 0.18; filter: blur(3px) brightness(0.75); }
}

/* ===== RED LANTERNS ===== */
.lantern {
  position: fixed;
  top: 35%;
  width: 80px;
  height: 200px;
  background: radial-gradient(circle at 50% 30%, rgba(200,30,30,0.6) 0%, rgba(80,0,0,0.05) 80%);
  border-radius: 50%;
  box-shadow:
    0 0 30px rgba(179,0,0,0.7),
    0 0 80px rgba(179,0,0,0.4),
    0 0 150px rgba(179,0,0,0.2);
  opacity: 0.4;
  pointer-events: none;
  animation: lanternPulse 6s ease-in-out infinite alternate;
  z-index: 2;
}

.lantern.left-lantern  { left: 2%;  animation-delay: 0s; }
.lantern.right-lantern { right: 2%; animation-delay: 3s; }

@keyframes lanternPulse {
  0%   { opacity: 0.35; transform: scale(1);   box-shadow: 0 0 30px rgba(179,0,0,0.6), 0 0 120px rgba(179,0,0,0.3); }
  50%  { opacity: 0.6;  transform: scale(1.05); box-shadow: 0 0 40px rgba(255,60,60,0.9), 0 0 160px rgba(255,30,30,0.5); }
  100% { opacity: 0.35; transform: scale(1);   box-shadow: 0 0 30px rgba(179,0,0,0.6), 0 0 120px rgba(179,0,0,0.3); }
}

/* ============================================================
   AMBIENT WALL OF ECHOES + RED LANTERNS
   ============================================================ */
.ambient-wall {
  position: fixed;
  inset: 0;
  background:
    radial-gradient(circle at 30% 40%, rgba(80,0,0,0.12) 0%, transparent 70%),
    radial-gradient(circle at 70% 60%, rgba(100,0,0,0.10) 0%, transparent 80%),
    url("assets/textures/wall_of_echoes.png");
  background-size: cover;
  background-blend-mode: overlay;
  opacity: 0.22;
  filter: blur(4px) brightness(0.8) contrast(1.2);
  z-index: 1;
  pointer-events: none;
  animation: wallBreath 60s ease-in-out infinite alternate;
}

@keyframes wallBreath {
  0%   { opacity: 0.18; filter: blur(3px) brightness(0.75); }
  50%  { opacity: 0.28; filter: blur(5px) brightness(0.9); }
  100% { opacity: 0.18; filter: blur(3px) brightness(0.75); }
}

/* ============================================================
   GHOSTLY SPIRITS — transformed from lanterns
   ============================================================ */
.lantern {
  position: fixed;
  top: 25%;
  width: 200px;
  height: 320px;
  background: radial-gradient(ellipse at 50% 40%, rgba(255,255,255,0.25) 0%, rgba(150,0,0,0.05) 60%, transparent 100%);
  border-radius: 50% 50% 40% 40%;
  filter: blur(35px) brightness(1.2);
  opacity: 0.25;
  pointer-events: none;
  z-index: 9999; /* stay visible above everything */
  animation: ghostDrift 25s ease-in-out infinite, ghostFade 10s ease-in-out infinite;
}

.lantern::before {
  content: "";
  position: absolute;
  top: 60%;
  left: 50%;
  transform: translateX(-50%);
  width: 140px;
  height: 140px;
  background: radial-gradient(circle at 50% 50%, rgba(255,255,255,0.2) 0%, transparent 70%);
  filter: blur(25px);
  opacity: 0.3;
  animation: ghostTail 12s ease-in-out infinite;
}

.lantern.left-lantern  { left: 2%;  animation-delay: 0s, 4s; }
.lantern.right-lantern { right: 2%; animation-delay: 12s, 0s; }

@keyframes ghostDrift {
  0%   { transform: translateY(0) translateX(0) scale(1); }
  25%  { transform: translateY(-10px) translateX(8px) scale(1.03); }
  50%  { transform: translateY(12px) translateX(-6px) scale(1.06); }
  75%  { transform: translateY(-6px) translateX(4px) scale(1.02); }
  100% { transform: translateY(0) translateX(0) scale(1); }
}

@keyframes ghostFade {
  0%,100% { opacity: 0.2; filter: blur(35px) brightness(1.1); }
  50%     { opacity: 0.4; filter: blur(25px) brightness(1.4); }
}

@keyframes ghostTail {
  0%,100% { transform: translate(-50%,0) scaleY(1); opacity: 0.25; }
  50%     { transform: translate(-50%,20%) scaleY(1.2); opacity: 0.45; }
}

/* ===== KICKSTARTER SECTION ===== */
#kickstarter {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(15, 0, 0, 0.9) 0%, rgba(0, 0, 0, 1) 100%);
  border-top: 1px solid rgba(255, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
}

.kickstarter-content p {
  font-size: 1.2rem;
  margin-bottom: 20px;
  color: #ddd;
  max-width: 700px;
  margin-left: auto;
  margin-right: auto;
}

.kickstarter-btn {
  display: inline-block;
  background: crimson;
  color: #fff;
  padding: 12px 30px;
  font-size: 1.1rem;
  font-weight: bold;
  border-radius: 6px;
  text-decoration: none;
  transition: all 0.3s ease;
  box-shadow: 0 0 15px crimson;
}

.kickstarter-btn:hover {
  background: #ff0000;
  box-shadow: 0 0 30px #ff2222;
}

/* ===== NEWS SECTION — haunted crimson revival ===== */
#news {
  position: relative;
  padding: 80px 20px;
  text-align: center;
  background: linear-gradient(180deg, rgba(10, 0, 0, 0.9) 0%, rgba(0, 0, 0, 1) 100%);
  border-top: 1px solid rgba(255, 0, 0, 0.3);
  border-bottom: 1px solid rgba(255, 0, 0, 0.3);
  overflow: hidden;
}

#news::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at center, rgba(60, 0, 0, 0.4) 0%, rgba(0, 0, 0, 0.9) 100%);
  z-index: 0;
  pointer-events: none;
}

#news .section-title {
  font-size: 2.3rem;
  color: #ff1e1e;
  text-shadow: 0 0 15px rgba(179,0,0,0.8), 0 0 30px rgba(255,30,30,0.6);
  margin-bottom: 50px;
  position: relative;
  z-index: 2;
}

.news-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 35px;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
  position: relative;
  z-index: 2;
}

/* haunted crimson box styling */
.news-item {
  background: rgba(40, 0, 0, 0.55);
  border: 1px solid rgba(179,0,0,0.6);
  border-radius: 12px;
  padding: 25px;
  box-shadow: 0 0 25px rgba(179,0,0,0.25), inset 0 0 10px rgba(179,0,0,0.2);
  backdrop-filter: blur(6px);
  transition: transform 0.4s ease, box-shadow 0.4s ease, background 0.4s ease;
  position: relative;
  overflow: hidden;
}

/* candle glow flicker overlay */
.news-item::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 50% 30%, rgba(255,60,60,0.08), transparent 70%);
  mix-blend-mode: screen;
  opacity: 0.4;
  animation: newsFlicker 4s ease-in-out infinite alternate;
  z-index: 0;
}

@keyframes newsFlicker {
  0% { opacity: 0.25; transform: scale(1); }
  50% { opacity: 0.6; transform: scale(1.03); }
  100% { opacity: 0.3; transform: scale(0.97); }
}

.news-item:hover {
  transform: translateY(-6px);
  background: rgba(60,0,0,0.7);
  box-shadow: 0 0 40px rgba(179,0,0,0.4), inset 0 0 20px rgba(179,0,0,0.4);
}

.news-item h3 {
  color: var(--crimson-glow);
  margin-bottom: 12px;
  text-shadow: 0 0 8px var(--crimson-glow);
  font-size: 1.3rem;
  position: relative;
  z-index: 1;
}

.news-item p {
  color: #ddd;
  font-size: 1rem;
  line-height: 1.6;
  position: relative;
  z-index: 1;
}

.news-date {
  display: block;
  margin-top: 14px;
  color: #999;
  font-size: 0.9rem;
  text-align: right;
  font-style: italic;
  text-shadow: 0 0 5px rgba(179,0,0,0.6);
  position: relative;
  z-index: 1;
}
