/* repositorgan.github.io/annex/annex.css */

/* GLOBAL ANNEX CONTEXT */

body.annex-active {
  margin: 0;
  padding: 0;
  font-family: "Georgia", serif;
  background: #f2e9d8;
  color: #3a2f22;
}

.annex-title {
  text-align: center;
  margin-top: 30px;
  font-size: 2.4rem;
  color: #5a4632;
  text-shadow: 0 2px 3px rgba(0,0,0,0.15);
}

/* BOOKSHELF */

.shelf {
  display: flex;
  align-items: flex-end;
  gap: 20px;
  padding: 25px 40px;
  margin: 40px auto;
  background: #c9a97a;
  background-image: linear-gradient(135deg, #b48854 0%, #d7b98a 50%, #b48854 100%);
  border: 8px solid #8b6b45;
  border-radius: 10px;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25);
  height: 180px;
  width: fit-content;
}

.decor {
  font-size: 42px;
  user-select: none;
  filter: drop-shadow(0 2px 2px rgba(0,0,0,0.3));
}

/* BOOK SPINES */

.book {
  width: 70px;
  height: 150px;
  background: var(--book-color);
  border: 3px solid #2d241a;
  border-radius: 5px;
  cursor: pointer;
  position: relative;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  display: flex;
  justify-content: center;
  align-items: center;
  background-image: linear-gradient(
    rgba(255,255,255,0.12),
    rgba(0,0,0,0.18)
  );
  box-shadow: 0 4px 6px rgba(0,0,0,0.25);
}

.book:hover {
  transform: translateY(-12px);
  box-shadow: 0 8px 12px rgba(0,0,0,0.35);
}

.spine-text {
  writing-mode: vertical-rl;
  transform: rotate(180deg);
  font-weight: bold;
  font-size: 1rem;
  text-align: center;
  color: #fdfdfd;
  text-shadow: 0 1px 2px rgba(0,0,0,0.6);
}

/* OVERLAY */

#annex-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,0.55);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
  z-index: 900;
}

#annex-overlay.visible {
  opacity: 1;
  pointer-events: all;
}

/* FLOATING PAPER MODAL */

.paper-modal {
  position: fixed;
  top: 50%;
  left: 50%;
  width: 650px;
  max-width: 90%;
  background: #fffdf5;
  border: 4px solid #b89b72;
  border-radius: 10px;
  padding: 40px 50px;
  transform: translate(-50%, -50%) scale(0.85);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 1000;
  background-image: radial-gradient(circle at top left, #fffef7 0%, #f3e3c5 60%, #e3cfaa 100%);
  box-shadow:
    0 12px 25px rgba(0,0,0,0.35),
    inset 0 0 20px rgba(0,0,0,0.15);
}

.paper-modal.open {
  opacity: 1;
  pointer-events: all;
  transform: translate(-50%, -50%) scale(1);
}

/* CLOSE BUTTON */

.close-paper {
  position: absolute;
  top: 15px;
  right: 15px;
  background: #b89b72;
  color: white;
  border: none;
  padding: 8px 12px;
  font-size: 1.1rem;
  cursor: pointer;
  border-radius: 5px;
  box-shadow: 0 2px 4px rgba(0,0,0,0.25);
}

.close-paper:hover {
  background: #a1845f;
}

/* TYPOGRAPHY INSIDE PAPER */

.paper-modal h1 {
  margin-top: 0;
  margin-bottom: 10px;
  font-size: 1.8rem;
  color: #4a3825;
}

.paper-modal h2 {
  margin-top: 18px;
  margin-bottom: 6px;
  font-size: 1.2rem;
  color: #5a4632;
}

.paper-modal p,
.paper-modal li {
  font-size: 0.98rem;
  line-height: 1.5;
}

/* PREVENT BACKGROUND SCROLL WHEN MODAL OPEN */

.no-scroll {
  overflow: hidden;
}

/* GOLD FOIL EFFECT FOR CERTIFICATION BOOK */

/* Target the specific book by its data attribute */
.book[data-target="doc-fcc-cert"] {
  border: 3px solid #d4af37; /* Metallic Gold Border */
  box-shadow: 0 0 15px rgba(212, 175, 55, 0.4);
}

/* Create the "shimmer" overlay */
.book[data-target="doc-fcc-cert"]::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: linear-gradient(
    135deg,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0.4) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  pointer-events: none;
  border-radius: 2px;
}

/* Add a gold leaf texture to the text */
.book[data-target="doc-fcc-cert"] .spine-text {
  color: #fff2cc;
  text-shadow: 0 0 5px rgba(212, 175, 55, 0.8), 0 1px 2px rgba(0,0,0,0.5);
}
