/* Google Fonts */
@import url("https://fonts.googleapis.com/css2?family=Cinzel:wght@400;700&family=Lato:wght@400;700&display=swap");

:root {
  --gold: rgb(233, 177, 9);
  --dark-bg: #0d0d18;
}

body {
  font-family: 'Lato', sans-serif;
  background-color: var(--dark-bg);
  color: #e5ddd0;
  overflow-x: hidden;
}

/* Background video */
.video-wrap {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  overflow: hidden;
}

.video-wrap video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  opacity: 0.25;
}

.video-overlay {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 20, 0);
}

/* Navbar */
#navbar {
  background: transparent;
  transition: background 0.3s;
  z-index: 200;
}

#navbar.scrolled {
  background: rgba(10, 10, 20, 0.95);
}

#navbar .navbar-brand {
  font-family: 'Cinzel', serif;
  color: var(--gold) !important;
  font-size: 1.2rem;
  letter-spacing: 0.08em;
}

/* Desktop nav links */
#navbar .nav-link {
  color: #e5ddd0 !important;
  font-size: 0.85rem;
  letter-spacing: 0.08em;
}

#navbar .nav-link:hover {
  color: var(--gold) !important;
}

/* Hamburger button (mobile) */
.hamburger {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.5);
  border-radius: 5px;
  padding: 5px 10px;
  cursor: pointer;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.hamburger span {
  display: block;
  width: 22px;
  height: 2px;
  background: var(--gold);
  border-radius: 2px;
}

/* Mobile menu */
.mobile-menu {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(10, 10, 20, 0.97);
  z-index: 300;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  display: none;
}

.mobile-menu.open {
  display: flex;
}

.menu-close {
  position: absolute;
  top: 18px;
  right: 22px;
  background: none;
  border: none;
  color: var(--gold);
  font-size: 2.2rem;
  cursor: pointer;
  line-height: 1;
}

.mobile-menu ul {
  list-style: none;
  padding: 0;
  margin: 0;
  text-align: center;
}

.mobile-menu ul li {
  margin-top: 2.15rem;
}

.menu-link {
  font-family: 'Cinzel', serif;
  color: #e5ddd0;
  text-decoration: none;
  font-size: 16px;
}

.menu-link:hover {
  color: var(--gold);
}

/* Hero section */
.hero-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
}

.small-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 8px;
}

.hero-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.8rem, 6vw, 3.2rem);
  color: #ffffff;
  margin-bottom: 16px;
}

.text-gold {
  color: var(--gold);
}

/* Any h3.text-gold used as a section title */
h3.text-gold,
.section-heading {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.2rem, 4vw, 1.6rem);
  letter-spacing: 0.06em;
  color: var(--gold);
}

.hero-desc {
  color: #9a9080;
  font-size: 0.95rem;
  max-width: 500px;
  margin: 0 auto 28px;
  line-height: 1.8;
  text-align: justify;
}

/* Audio player box */
.audio-box {
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.3);
  border-radius: 10px;
  padding: 16px 20px;
  max-width: 460px;
  width: 100%;
}

.audio-label {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

/* Sections */
.page-section {
  position: relative;
  z-index: 1;
  padding: 60px 0;
  background: rgba(5, 5, 14, 0.82);
}

.bg-section-dark {
  background: rgba(5, 5, 14, 0.90);
}

/* ─────────────────────────────────────────
   CHAPTER CARDS (index.html)
   Constrained so they never fill the whole viewport
   ───────────────────────────────────────── */
.card-link .card {
  max-width: 320px;
  margin: 0 auto;
  transition: transform 0.3s, border-color 0.3s;
}

.card-link .card .card-img-top {
  height:400px;
  object-fit: cover;
}

.card-link .card:hover {
  transform: translateY(-5px);
  border-color: var(--gold) !important;
}

/* How to play */
.step-box {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 10px;
  background: rgba(201, 168, 76, 0.04);
  border: 1px solid rgba(255, 187, 0, 0.15);
  border-radius: 8px;
  padding: 16px;
  margin-bottom: 12px;
  color: #e5ddd0;
  text-align: center;
}

.step-box p {
  font-size: 16px;
}

/* Footer */
.site-footer {
  position: relative;
  z-index: 1;
  background: rgb(5, 5, 14);
  border-top: 1px solid rgba(201, 168, 76, 0.12);
  color: rgba(233, 177, 9, 0.589);
}

.footer-title {
  color: #0dff00bf;
}

/* Fragment grid */
.fragment-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 15px;
}

.fragment-item {
  text-decoration: none;
  color: #e5ddd0;
  font-size: 12px;
}

.fragment-item img {
  width: 100%;
  height: 90px;
  object-fit: cover;
  border-radius: 8px;
  border: 1px solid rgba(201, 168, 76, 0.3);
  transition: 0.3s;
}

.fragment-item img:hover {
  transform: scale(1.05);
  border-color: var(--gold);
}

.fragment-item p {
  margin-top: 6px;
}

/* =============================
   PUZZLE WRAPPER
============================= */
.puzzle-wrapper {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 50px;
  flex-wrap: wrap;
  padding: 20px;
}

/* =============================
   GRID (LEFT / TOP)
============================= */
.puzzle-grid {
  display: grid;
  grid-template-columns: repeat(3, 110px);
  gap: 14px;
}

/* =============================
   TILE
============================= */
.puzzle-tile {
  width: 110px;
  height: 110px;
  border-radius: 12px;
  background: rgba(201, 168, 76, 0.08);
  border: 1px solid rgba(201, 168, 76, 0.3);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: 0.25s ease;
  overflow: hidden;
}

.puzzle-tile img {
  width: 75%;
  height: 75%;
  object-fit: contain;
}

.puzzle-tile:hover {
  transform: scale(1.05);
  border-color: #e9b109;
  box-shadow: 0 0 12px rgba(233, 177, 9, 0.35);
}

.puzzle-tile.active {
  background: rgba(233, 177, 9, 0.18);
  border-color: #e9b109;
  transform: scale(1.04);
}

/* =============================
   RIGHT SIDE (ANSWER AREA)
============================= */
.puzzle-right {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 16px;
  min-width: 130px;
}

/* =============================
   SLOTS
============================= */
.puzzle-slots {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.puzzle-slot {
  width: 100px;
  height: 100px;
  border-radius: 12px;
  border: 2px dashed rgba(201, 168, 76, 0.45);
  background: rgba(255, 255, 255, 0.03);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

.puzzle-slot img {
  width: 80%;
  height: 80%;
  object-fit: contain;
}

/* =============================
   PUZZLE BUTTON
============================= */
.puzzle-btn {
  padding: 10px 24px;
  border: none;
  border-radius: 8px;
  background: #e9b109;
  color: #000;
  font-weight: bold;
  cursor: pointer;
  transition: 0.25s ease;
}

.puzzle-btn:hover {
  transform: scale(1.05);
  box-shadow: 0 0 12px rgba(233, 177, 9, 0.5);
}

/* ─────────────────────────────────────────
   CREATORS SECTION
   ───────────────────────────────────────── */
.creators-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
  max-width: 700px;
  margin: 0 auto;
}

.creator-card {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 12px;
  padding: 24px 16px;
  text-align: center;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

.creator-card:hover {
  transform: translateY(-4px);
  border-color: var(--gold);
  box-shadow: 0 0 16px rgba(233, 177, 9, 0.2);
}

.creator-card .creator-name {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  color: #ffffff;
  margin-bottom: 6px;
  line-height: 1.3;
}

.creator-card .creator-role {
  font-family: 'Lato', sans-serif;
  font-size: 0.8rem;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--gold);
  margin: 0;
}

/* ─────────────────────────────────────────
   PODCAST-LOGO PAGE — chapter card styling
   ───────────────────────────────────────── */
#chapter-hero .card {
  background: rgba(201, 168, 76, 0.06) !important;
  border: 1px solid rgba(201, 168, 76, 0.25) !important;
  border-radius: 14px;
  overflow: hidden;
  max-width: 300px;
  margin: 0 auto;
  transition: transform 0.25s ease, border-color 0.25s ease;
}

#chapter-hero .card:hover {
  transform: translateY(-5px);
  border-color: var(--gold) !important;
  box-shadow: 0 0 18px rgba(233, 177, 9, 0.25);
}

#chapter-hero .card-img-top {
  height: 200px;
  object-fit: cover;
}

#chapter-hero .card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: #ffffff;
  margin: 0;
}

/* =============================
   REWARD PAGE
============================= */
.reward-section {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 120px 20px 60px;
}

.reward-card {
  background: rgba(201, 168, 76, 0.06);
  border: 1px solid rgba(201, 168, 76, 0.25);
  border-radius: 16px;
  padding: 40px 32px;
  max-width: 520px;
  width: 100%;
  text-align: center;
}

.reward-badge {
  font-family: 'Cinzel', serif;
  font-size: 0.7rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 12px;
}

.reward-title {
  font-family: 'Cinzel', serif;
  font-size: clamp(1.4rem, 5vw, 2rem);
  color: #ffffff;
  margin-bottom: 8px;
}

.reward-desc {
  color: #9a9080;
  font-size: 0.9rem;
  line-height: 1.8;
  margin-bottom: 28px;
}

.reward-audio-label {
  font-family: 'Cinzel', serif;
  font-size: 0.68rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
}

.reward-audio-box {
  background: rgba(201, 168, 76, 0.07);
  border: 1px solid rgba(201, 168, 76, 0.2);
  border-radius: 10px;
  padding: 20px;
  margin-bottom: 24px;
}

.reward-audio-box audio {
  width: 100%;
}

.reward-btn-home {
  display: inline-block;
  font-family: 'Lato', serif;
  font-size: 0.8rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: #000;
  background: var(--gold);
  border: none;
  border-radius: 8px;
  padding: 11px 28px;
  text-decoration: none;
  transition: 0.25s ease;
  font-weight: 700;
}

.reward-btn-home:hover {
  transform: scale(1.04);
  box-shadow: 0 0 14px rgba(233, 177, 9, 0.5);
  color: #000;
}

.reward-chapter-img {
  width: 110px;
  height: 110px;
  object-fit: contain;
  margin-bottom: 20px;
  opacity: 0.92;
}
/* Solve button spacing fix */
.solve-section {
  margin-top: 30px;     /* reduced top space */
  margin-bottom: 60px;  /* space before footer */
}
/* =====================================================
   RESPONSIVE — MOBILE BREAKPOINTS
   ===================================================== */

/* Tablet and below */
@media (max-width: 768px) {
  #chapter-hero {
    padding: 90px 16px 40px !important;
  }
}

/* Small phones */
@media (max-width: 600px) {
  .hero-section {
    padding: 80px 16px 40px !important;
    min-height: unset;
  }

  .hero-desc {
    margin-bottom: 12px !important;
  }

  h3.text-gold {
    margin-bottom: 8px !important;
  }

  /* Puzzle */
  .puzzle-wrapper {
    flex-direction: column;
    align-items: center;
    gap: 16px;
  }

  .puzzle-grid {
    grid-template-columns: repeat(3, 1fr);
    width: 100%;
    max-width: 320px;
    gap: 10px;
  }

  .puzzle-tile {
    width: 100%;
    height: 0;
    padding-bottom: 100%;
    position: relative;
    margin-top: 0;
  }

  .puzzle-tile img {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 70%;
    height: 70%;
  }

  .puzzle-right {
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 320px;
    gap: 10px;
  }

  .puzzle-slots {
    flex-direction: row;
    justify-content: center;
    gap: 12px;
  }

  .puzzle-slot {
    width: 90px;
    height: 90px;
  }

  /* Reward page */
  .reward-card {
    padding: 28px 18px;
  }

  .reward-chapter-img {
    width: 80px;
    height: 80px;
  }
}

/* Extra small phones */
@media (max-width: 480px) {
  /* Chapter cards on index */
  .card-link .card {
    max-width: 260px;
  }

  .card-link .card .card-img-top {
    height: 160px;
  }

  /* Creators: single column */
  .creators-grid {
    grid-template-columns: 1fr;
    max-width: 320px;
  }

  /* Audio box */
  .audio-box {
    padding: 14px;
  }

  .audio-box audio {
    width: 100%;
  }

  /* Solve button */
  .text-center .btn-warning {
    width: 100%;
    max-width: 300px;
  }
}

/* Tiny phones */
@media (max-width: 360px) {
  .fragment-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 10px;
  }
}



/* Wrapper controls image display area */
.chapter-img-wrap {
  width: 100%;
  background: #111;               /* dark bg behind image */
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 12px;
  min-height: 180px;
}

/* Image fits fully inside — no cropping ever */
.chapter-img-wrap img {
  max-width: 100%;
  max-height: 200px;
  width: auto;
  height: auto;
  object-fit: contain;
  display: block;
}

/* Card title consistent with site fonts */
.chapter-card .card-title {
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.05em;
  color: #ffffff;
  margin-bottom: 6px;
}

/* ─────────────────────────────────────────
   COMPLETED BADGE
   Overlays the card when chapter is done
   ───────────────────────────────────────── */
.chapter-card {
  position: relative;
}

.chapter-done-badge {
  position: absolute;
  top: 10px;
  right: 10px;
  background: rgba(0, 0, 0, 0.75);
  color: #00ff88;
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 4px 10px;
  border-radius: 20px;
  border: 1px solid rgba(0, 255, 136, 0.4);
  pointer-events: none;
  z-index: 10;
}

/* ─────────────────────────────────────────
   EPILOGUE BUTTON
   Only shows when all 3 chapters done
   ───────────────────────────────────────── */
.btn-epilogue {
  display: inline-block;
  font-family: 'Cinzel', serif;
  font-size: 1rem;
  letter-spacing: 0.1em;
  color: #000;
  background: var(--gold);
  border-radius: 8px;
  padding: 14px 36px;
  text-decoration: none;
  font-weight: 700;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  animation: pulse-gold 2s infinite;
}

.btn-epilogue:hover {
  transform: scale(1.05);
  box-shadow: 0 0 20px rgba(233, 177, 9, 0.6);
  color: #000;
}

@keyframes pulse-gold {
  0%, 100% { box-shadow: 0 0 10px rgba(233,177,9,0.4); }
  50%       { box-shadow: 0 0 24px rgba(233,177,9,0.8); }
}

/* ─────────────────────────────────────────
   RESET BUTTON
   ───────────────────────────────────────── */
.btn-reset {
  background: none;
  border: 1px solid rgba(201, 168, 76, 0.35);
  color: rgba(201, 168, 76, 0.6);
  font-family: 'Lato', sans-serif;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  padding: 7px 20px;
  border-radius: 6px;
  cursor: pointer;
  transition: 0.2s ease;
}

.btn-reset:hover {
  border-color: var(--gold);
  color: var(--gold);
}
