/* ============================================
   GOTHIC-CATHEDRAL — Cathedral Gothic
   Stone, stained glass, jewel tones, heavy
   ============================================ */

:root {
  --stone-bg: #0c0a08;
  --stone-dark: #151210;
  --stone-mid: #1e1a16;
  --stone-light: #2a2420;
  --stone-border: #3a322a;
  --stone-text: #9a8a7a;
  --stone-dim: #5a4a3a;

  --ruby: #8b1a1a;
  --ruby-glow: #bb2a2a;
  --sapphire: #1a1a6b;
  --sapphire-glow: #3333aa;
  --amber: #8b6b1a;
  --amber-glow: #bb9a2a;
  --emerald: #1a5a2a;
  --emerald-glow: #2a8a3a;

  --font-blackletter: 'Crimson Pro', Georgia, serif;
}

/* --- Stone Texture Background --- */
.stone-bg {
  background:
    radial-gradient(ellipse at 20% 50%, rgba(139, 27, 27, 0.03) 0%, transparent 50%),
    radial-gradient(ellipse at 80% 30%, rgba(26, 26, 107, 0.03) 0%, transparent 50%),
    linear-gradient(180deg, var(--stone-bg) 0%, #0a0806 100%);
  background-color: var(--stone-bg);
}

/* --- Arch Frame --- */
.arch-frame {
  position: relative;
  max-width: 700px;
  margin: 0 auto;
  padding: 60px 40px 40px;
  border-left: 1px solid var(--stone-border);
  border-right: 1px solid var(--stone-border);
  border-bottom: 1px solid var(--stone-border);
}

.arch-frame::before {
  content: '';
  position: absolute;
  top: 0;
  left: -1px;
  right: -1px;
  height: 60px;
  border-left: 1px solid var(--stone-border);
  border-right: 1px solid var(--stone-border);
  border-top: 1px solid var(--stone-border);
  border-radius: 50% 50% 0 0 / 100% 100% 0 0;
}

/* --- Stone Dividers --- */
.stone-divider {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  margin: 40px 0;
  color: var(--stone-dim);
  font-size: 0.7rem;
  letter-spacing: 0.3em;
}

.stone-divider::before,
.stone-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--stone-border), transparent);
}

/* --- Stained Glass Accents --- */
.stained-glass-border {
  border-image: linear-gradient(
    180deg,
    var(--ruby) 0%,
    var(--amber) 25%,
    var(--sapphire) 50%,
    var(--emerald) 75%,
    var(--ruby) 100%
  ) 1;
  border-width: 2px;
  border-style: solid;
}

.stained-ruby { color: var(--ruby-glow); text-shadow: 0 0 8px rgba(187, 42, 42, 0.3); }
.stained-sapphire { color: var(--sapphire-glow); text-shadow: 0 0 8px rgba(51, 51, 170, 0.3); }
.stained-amber { color: var(--amber-glow); text-shadow: 0 0 8px rgba(187, 154, 42, 0.3); }
.stained-emerald { color: var(--emerald-glow); text-shadow: 0 0 8px rgba(42, 138, 58, 0.3); }

/* --- Candlelight --- */
.candlelight {
  position: relative;
}

.candlelight::after {
  content: '';
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: radial-gradient(
    ellipse at 50% 30%,
    rgba(139, 107, 26, 0.06) 0%,
    transparent 60%
  );
  pointer-events: none;
  z-index: 5;
  animation: candle-flicker 4s ease-in-out infinite;
}

@keyframes candle-flicker {
  0%, 100% { opacity: 1; }
  15% { opacity: 0.85; }
  30% { opacity: 1; }
  45% { opacity: 0.9; }
  60% { opacity: 1; }
  75% { opacity: 0.8; }
  90% { opacity: 0.95; }
}

/* --- Cathedral Typography --- */
.cathedral-title {
  font-family: var(--font-blackletter);
  font-size: 2rem;
  font-weight: 700;
  letter-spacing: 0.12em;
  color: var(--stone-text);
  text-align: center;
  text-shadow: 0 0 20px rgba(139, 107, 26, 0.1);
}

.cathedral-subtitle {
  font-family: var(--font-blackletter);
  font-size: 0.85rem;
  font-style: italic;
  color: var(--stone-dim);
  text-align: center;
  letter-spacing: 0.15em;
  margin-top: 8px;
}

.cathedral-text {
  font-family: var(--font-blackletter);
  font-size: 1rem;
  line-height: 1.9;
  color: var(--stone-text);
  text-align: justify;
}

.cathedral-verse {
  font-family: var(--font-blackletter);
  font-style: italic;
  font-size: 0.95rem;
  line-height: 2;
  color: var(--stone-text);
  text-align: center;
  padding: 20px 40px;
  border-left: 2px solid var(--stone-border);
  border-right: 2px solid var(--stone-border);
  margin: 32px auto;
  max-width: 500px;
}

/* --- Artifact Card --- */
.artifact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 16px;
  padding: 20px;
}

.artifact-card {
  background: var(--stone-dark);
  border: 1px solid var(--stone-border);
  padding: 20px;
  text-align: center;
  transition: border-color 0.5s, box-shadow 0.5s;
  cursor: default;
  position: relative;
  overflow: hidden;
}

.artifact-card:hover {
  border-color: var(--amber);
  box-shadow: 0 0 20px rgba(139, 107, 26, 0.08);
}

.artifact-symbol {
  font-size: 2rem;
  margin-bottom: 12px;
  display: block;
  color: var(--stone-dim);
  transition: color 0.5s;
}

.artifact-card:hover .artifact-symbol {
  color: var(--amber-glow);
}

.artifact-name {
  font-family: var(--font-blackletter);
  font-size: 0.85rem;
  color: var(--stone-text);
  letter-spacing: 0.1em;
  margin-bottom: 8px;
}

.artifact-desc {
  font-family: var(--font-blackletter);
  font-style: italic;
  font-size: 0.7rem;
  color: var(--stone-dim);
  line-height: 1.6;
}

.artifact-hidden {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
  font-size: 0.65rem;
  color: var(--amber);
  margin-top: 8px;
}

.artifact-card.revealed .artifact-hidden {
  max-height: 100px;
}

/* --- Choir / Voices --- */
.voice {
  position: absolute;
  font-family: var(--font-blackletter);
  font-style: italic;
  opacity: 0;
  transition: opacity 1s ease;
  pointer-events: none;
  white-space: nowrap;
}

.voice.audible {
  opacity: 1;
}

/* --- Cross / Religious Symbols --- */
.cathedral-cross {
  display: block;
  text-align: center;
  font-size: 1.5rem;
  color: var(--stone-dim);
  margin: 20px 0;
  letter-spacing: 0.5em;
}

/* --- Vignette (warm) --- */
.cathedral-vignette {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  box-shadow:
    inset 0 0 200px 80px rgba(0, 0, 0, 0.95),
    inset 0 0 80px 20px rgba(10, 6, 2, 0.5);
  pointer-events: none;
  z-index: 10;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .arch-frame {
    padding: 40px 20px 24px;
    margin: 0 12px;
  }

  .arch-frame::before {
    height: 40px;
  }

  .cathedral-title {
    font-size: 1.5rem;
  }

  .cathedral-verse {
    padding: 16px 20px;
    font-size: 0.85rem;
  }

  .artifact-grid {
    grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
    gap: 10px;
    padding: 12px;
  }
}
