/* ============================================
   RELIQUARY — The Artifacts
   Fragments of what was. Echoes of what will be.
   ============================================ */

/* --- Page Layout --- */
.reliquary-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: flex-start;
  padding: 80px 20px 60px;
}

.reliquary-container {
  position: relative;
  max-width: 800px;
  width: 100%;
  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);
}

.reliquary-container::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;
}

/* --- Artifact Card Overrides --- */
.reliquary-page .artifact-grid {
  margin-top: 10px;
}

.reliquary-page .artifact-card {
  cursor: pointer;
  user-select: none;
  transition: border-color 0.5s, box-shadow 0.5s, transform 0.3s;
}

.reliquary-page .artifact-card:active {
  transform: scale(0.98);
}

.reliquary-page .artifact-card.revealed {
  border-color: var(--amber);
  box-shadow: 0 0 16px rgba(139, 107, 26, 0.06);
}

.reliquary-page .artifact-card.revealed .artifact-symbol {
  color: var(--amber-glow);
}

/* --- Artifact Link Styling --- */
.artifact-link {
  display: block;
  color: inherit;
  text-decoration: none;
  margin-top: 8px;
  font-family: var(--font-blackletter);
  font-size: 0.55rem;
  color: var(--stone-dim);
  letter-spacing: 0.15em;
  opacity: 0;
  transition: opacity 0.6s ease, color 0.3s ease;
}

.artifact-card.revealed .artifact-link {
  opacity: 0.6;
}

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

/* --- Glitch effect on Void Residue card --- */
.artifact-card--void {
  position: relative;
}

.artifact-card--void::after {
  content: '';
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: linear-gradient(
    180deg,
    transparent 0%,
    rgba(51, 170, 51, 0.02) 50%,
    transparent 100%
  );
  pointer-events: none;
  animation: void-glitch 8s ease-in-out infinite;
}

@keyframes void-glitch {
  0%, 100% { opacity: 0; }
  45% { opacity: 0; }
  50% { opacity: 1; }
  52% { opacity: 0; }
  70% { opacity: 0; }
  72% { opacity: 0.5; }
  74% { opacity: 0; }
}

/* --- Completion Message --- */
.reliquary-completion {
  text-align: center;
  margin-top: 40px;
  max-height: 0;
  overflow: hidden;
  opacity: 0;
  transition: max-height 2s ease, opacity 2s ease;
}

.reliquary-completion.visible {
  max-height: 200px;
  opacity: 1;
}

.completion-text {
  font-family: var(--font-blackletter);
  font-style: italic;
  font-size: 0.8rem;
  color: var(--amber-glow);
  text-shadow: 0 0 8px rgba(187, 154, 42, 0.15);
  letter-spacing: 0.1em;
  line-height: 1.8;
}

.completion-link {
  display: inline-block;
  margin-top: 16px;
  font-family: var(--font-blackletter);
  font-size: 0.65rem;
  color: var(--stone-dim);
  letter-spacing: 0.15em;
  transition: color 0.4s ease;
}

.completion-link:hover {
  color: var(--amber-glow);
  text-shadow: 0 0 6px rgba(187, 154, 42, 0.2);
}

/* --- Counter --- */
.artifact-counter {
  text-align: center;
  margin-top: 24px;
  font-family: var(--font-mono);
  font-size: 0.55rem;
  color: var(--stone-dim);
  letter-spacing: 0.2em;
  opacity: 0.4;
}

/* --- Footer --- */
.reliquary-footer {
  margin-top: 40px;
  text-align: center;
}

.reliquary-depth {
  font-family: var(--font-mono);
  font-size: 0.5rem;
  color: var(--stone-dark);
  letter-spacing: 0.4em;
  opacity: 0.2;
}

/* --- Mobile --- */
@media (max-width: 768px) {
  .reliquary-page {
    padding: 60px 12px 40px;
  }

  .reliquary-container {
    padding: 40px 16px 24px;
  }
}
