/* ==========================================
   THE FORBIDDEN ARCHIVES
   A LIBRARY OF LEGENDS AND QUESTIONABLE LAW
========================================== */

.theme-forbidden {
  margin: 0;
  min-height: 100vh;
  background: #090810;
  color: #ded5e6;
  font-family: Georgia, serif;
}

.forbidden-world {
  position: relative;
  isolation: isolate;
  min-height: 100vh;
  padding: 65px 22px 85px;
  box-sizing: border-box;
  overflow: hidden;

  background:
    radial-gradient(
      ellipse at 50% 8%,
      rgba(106, 73, 143, 0.22),
      transparent 42%
    ),
    radial-gradient(
      ellipse at 90% 75%,
      rgba(71, 52, 100, 0.12),
      transparent 48%
    ),
    linear-gradient(
      180deg,
      #100d19,
      #090810 55%,
      #0c0913
    );
}

/* SUBTLE LIBRARY ATMOSPHERE */

.forbidden-world::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: -1;

  background:
    repeating-linear-gradient(
      90deg,
      transparent 0,
      transparent 140px,
      rgba(180, 155, 210, 0.018) 141px,
      transparent 144px
    );

  opacity: 0.7;
}

/* HEADER */

.forbidden-header {
  max-width: 780px;
  margin: 0 auto;
  text-align: center;
}

.archive-sigil {
  display: block;
  margin-bottom: 25px;
  color: #b8a0d6;
  font-size: 1.5rem;
  letter-spacing: 0.3em;
}

.archive-eyebrow {
  color: #aa96bd;
  font-size: 0.7rem;
  letter-spacing: 0.22em;
  line-height: 1.8;
}

.forbidden-header h1 {
  margin: 22px 0;
  color: #e8d9f1;
  font-size: clamp(2.3rem, 7vw, 4.3rem);
  font-weight: normal;

  text-shadow:
    0 0 25px rgba(173, 139, 215, 0.25);
}

.archive-subtitle {
  color: #bcb0c9;
  font-size: 1rem;
  font-style: italic;
  line-height: 1.9;
}

.archive-warning {
  margin-top: 35px;
  color: #88718e;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
}

/* DECORATIVE DIVIDERS */

.archive-divider {
  margin: 75px auto;
  color: rgba(189, 159, 214, 0.5);
  text-align: center;
  letter-spacing: 0.2em;
}

/* SECTIONS */

.codex-section,
.incident-section {
  max-width: 1100px;
  margin: 0 auto;
}

.codex-section h2,
.incident-section h2 {
  margin-bottom: 15px;
  color: #d6c3e7;
  font-size: clamp(1.7rem, 5vw, 2.4rem);
  font-weight: normal;
  text-align: center;
}

.section-intro {
  margin-bottom: 45px;
  color: #9d91a9;
  text-align: center;
  font-size: 0.9rem;
  font-style: italic;
  line-height: 1.8;
}

/* RESIDENT CODEX */

.resident-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 25px;
}

.resident-record {
  position: relative;
  min-width: 0;
  padding: 32px 28px;
  border: 1px solid rgba(182, 153, 205, 0.2);
  border-radius: 6px;

  background:
    linear-gradient(
      145deg,
      rgba(37, 29, 48, 0.92),
      rgba(18, 15, 29, 0.96)
    );

  box-shadow:
    0 10px 35px rgba(0, 0, 0, 0.18),
    inset 0 0 30px rgba(165, 126, 195, 0.025);

  transition:
    border-color 0.35s ease,
    box-shadow 0.35s ease,
    transform 0.35s ease;
}

.resident-record:hover {
  border-color: rgba(194, 165, 224, 0.42);
  box-shadow:
    0 12px 45px rgba(0, 0, 0, 0.25),
    0 0 25px rgba(123, 87, 164, 0.09);
  transform: translateY(-3px);
}

/* Manuscript corner details */

.resident-record::before,
.resident-record::after {
  content: "";
  position: absolute;
  width: 20px;
  height: 20px;
  pointer-events: none;
}

.resident-record::before {
  top: 10px;
  left: 10px;
  border-top: 1px solid rgba(190, 163, 215, 0.3);
  border-left: 1px solid rgba(190, 163, 215, 0.3);
}

.resident-record::after {
  right: 10px;
  bottom: 10px;
  border-right: 1px solid rgba(190, 163, 215, 0.3);
  border-bottom: 1px solid rgba(190, 163, 215, 0.3);
}

.resident-symbol {
  display: block;
  margin-bottom: 18px;
  font-size: 1.7rem;
}

.record-type {
  color: #a58dbd;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  line-height: 1.7;
}

.resident-record h3 {
  margin: 12px 0 5px;
  color: #e2d5ed;
  font-size: 1.65rem;
  font-weight: normal;
}

.resident-title {
  margin-bottom: 25px;
  color: #b9a3ce;
  font-size: 0.85rem;
  font-style: italic;
}

.resident-record p {
  line-height: 1.85;
}

.resident-record > p:not(.record-type):not(.resident-title):not(.record-secret) {
  color: #c5bccc;
  font-size: 0.9rem;
}

.record-secret {
  margin-top: 28px;
  padding-top: 17px;
  border-top: 1px solid rgba(190, 163, 215, 0.15);
  color: #aa95bd;
  font-size: 0.82rem;
  font-style: italic;
}

/* INDIVIDUAL RESIDENT ACCENTS */

.record-vespera {
  border-top-color: rgba(181, 185, 224, 0.45);
}

.record-gerald {
  border-top-color: rgba(194, 120, 80, 0.5);
}

.record-eira {
  border-top-color: rgba(196, 208, 231, 0.5);
}

.record-lyraeth {
  border-top-color: rgba(172, 132, 225, 0.55);
}

.record-aurelle {
  border-top-color: rgba(159, 168, 235, 0.5);
}

.record-noctis {
  border-top-color: rgba(83, 118, 168, 0.5);
}

.record-reson {
  border-top-color: rgba(180, 151, 229, 0.55);
}

.record-browster {
  border-top-color: rgba(176, 87, 111, 0.55);
}

.record-cabbage {
  border-top-color: rgba(112, 159, 110, 0.5);
}

/* INCIDENT ARCHIVES */

.incident-list {
  max-width: 800px;
  margin: 0 auto;
}

.incident-file {
  margin-bottom: 15px;
  padding: 0 22px;
  border: 1px solid rgba(177, 146, 201, 0.2);
  border-radius: 5px;
  background: rgba(27, 21, 37, 0.75);
}

.incident-file summary {
  padding: 23px 0;
  color: #cbb6dc;
  cursor: pointer;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
  line-height: 1.6;
}

.incident-file[open] {
  border-color: rgba(188, 152, 218, 0.4);
}

.incident-file p {
  color: #c0b4c9;
  font-size: 0.88rem;
  line-height: 1.8;
}

.incident-file p:last-child {
  padding-bottom: 15px;
}

.incident-file strong {
  color: #d9c8e7;
}

.incident-file code {
  color: #c9a8e6;
  overflow-wrap: anywhere;
}

.classified-file {
  border-color: rgba(167, 84, 108, 0.35);
}

.classified-file summary {
  color: #c99baa;
}

.classified-message {
  margin-top: 25px;
  color: #b78096 !important;
  font-style: italic;
}

/* FOOTER */

.forbidden-footer {
  margin-top: 90px;
  text-align: center;
}

.forbidden-footer p {
  color: #84758e;
  font-size: 0.85rem;
  font-style: italic;
}

.forbidden-footer a {
  display: inline-block;
  margin-top: 20px;
  color: #bda7d7;
  text-decoration: none;
  font-size: 0.9rem;
}

.forbidden-footer a:hover {
  color: #e9d8ff;
}

/* MOBILE */

@media (max-width: 700px) {
  .forbidden-world {
    padding: 45px 17px 70px;
  }

  .resident-grid {
    grid-template-columns: 1fr;
    gap: 20px;
  }

  .resident-record {
    padding: 27px 22px;
  }

  .archive-divider {
    margin: 55px auto;
  }
}

/* REDUCED MOTION */

@media (prefers-reduced-motion: reduce) {
  .resident-record {
    transition: none;
  }

  .resident-record:hover {
    transform: none;
  }
}
