/* Citadel Theme v2 – Fractal Interior Upgrade */

body {
  background: radial-gradient(ellipse at center, #0b081a 0%, #090618 100%);
  font-family: 'Georgia', serif;
  color: #dcdcdc;
  padding: 2rem;
  line-height: 1.6;
}

h1, h2, h3 {
  text-align: center;
  color: #f0eaff;
  letter-spacing: 0.5px;
  text-shadow: 0 0 6px rgba(170, 160, 255, 0.3);
}

.subtitle, .citadel-welcome {
  text-align: center;
  color: #b4aaff;
  font-style: italic;
  font-size: 1.1rem;
  margin-bottom: 2rem;
}

.citadel-welcome {
  font-size: 1rem;
  color: #a89ddc;
  max-width: 700px;
  margin: 0 auto 2rem;
  text-shadow: 0 0 4px rgba(140, 120, 200, 0.15);
}

main.card {
  background: rgba(20, 15, 35, 0.6);
  border-radius: 12px;
  padding: 2rem;
  margin: 0 auto;
  max-width: 960px;
  box-shadow: 0 0 12px rgba(120, 90, 180, 0.12);
}

.caption-crayon {
  color: #b8aaff;
  font-style: italic;
  font-size: 0.95rem;
  text-align: center;
  margin-top: 0.5rem;
  opacity: 0.9;
}

.citadel-nav-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 2rem;
  padding: 3rem 0;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.corridor {
  background: #1a1526;
  border: 1px solid rgba(122, 92, 255, 0.25);
  border-radius: 12px;
  text-align: center;
  padding: 1rem;
  transition: transform 0.3s ease, box-shadow 0.3s ease;
  box-shadow: 0 0 6px rgba(122, 92, 255, 0.1);
}

.corridor:hover {
  transform: scale(1.03);
  box-shadow: 0 0 12px rgba(140, 110, 255, 0.25);
}

.corridor img {
  width: 80px;
  height: 80px;
  margin-bottom: 0.8rem;
  filter: drop-shadow(0 0 4px rgba(160, 140, 255, 0.15));
  transition: transform 0.3s ease;
}

.corridor:hover img {
  transform: scale(1.08);
}

.corridor a {
  color: #e6dfff;
  text-decoration: none;
  font-weight: 500;
  display: block;
  margin-top: 0.3rem;
}

.return-link {
  display: block;
  text-align: center;
  color: #9f90ff;
  font-size: 0.95rem;
  margin-top: 2rem;
  text-decoration: none;
  opacity: 0.7;
  transition: opacity 0.3s ease;
}

.return-link:hover {
  opacity: 1;
  text-shadow: 0 0 4px rgba(160, 150, 255, 0.3);
}

/* Optional echoform layer */
.echoform-channel {
  display: none;
}

.citadel-section {
  margin: 3rem auto;
  max-width: 1000px;
  padding: 2rem;
  background: rgba(255, 255, 255, 0.02); /* subtle glow */
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 12px;
  box-shadow: 0 0 20px rgba(180, 140, 255, 0.15);
  backdrop-filter: blur(6px);
  transition: all 0.3s ease;
}

.citadel-section:hover {
  box-shadow: 0 0 25px rgba(180, 140, 255, 0.35);
  border-color: rgba(255, 255, 255, 0.12);
}

.citadel-section h2, 
.citadel-section h3, 
.citadel-section h4 {
  color: #e3d2ff;
  margin-top: 0;
}

.citadel-section::before {
  content: "↯";
  display: block;
  font-size: 1.5rem;
  color: #9b75ff;
  margin-bottom: 1rem;
}

.flicker-horizon::before {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 30% 70%, rgba(255, 255, 255, 0.07) 0%, transparent 60%),
              radial-gradient(circle at 70% 60%, rgba(255, 255, 255, 0.05) 0%, transparent 65%);
  animation: horizonFlicker 12s infinite ease-in-out;
  pointer-events: none;
  mix-blend-mode: screen;
  z-index: 0;
}

@keyframes horizonFlicker {
  0%, 100% {
    opacity: 0;
  }
  5% {
    opacity: 0.03;
  }
  15% {
    opacity: 0.08;
  }
  25% {
    opacity: 0;
  }
  40% {
    opacity: 0.05;
  }
  60% {
    opacity: 0;
  }
  80% {
    opacity: 0.04;
  }
}

