@font-face {
  font-family: 'Garet';
  src: url('/assets/fonts/garet/Garet-Book.woff2') format('woff2');
  font-weight: 400;
}

@font-face {
  font-family: 'Garet';
  src: url('/assets/fonts/garet/Garet-Heavy.woff2') format('woff2');
  font-weight: 700;
}

:root {
    --section-color: #1C0034;
    --bg-color: #471666;
}

* {
    font-family: sans-serif;
    transition: all 0.25s ease;
}

.logo img {
  height: 90px;   
  width: auto;
  display: block;
}

.logo img:hover {
  transform: scale(1.1);
}

html, body {
  height: 100%;
}

body {  
  color: white;
  background-color: var(--bg-color);
  overflow-x: hidden;
  padding-top: 80px;
}

h1 {
  font-weight: 700; 
  font-size: 50px;
  margin-bottom: -10px;
  
}

h2 {
    font-size: 30px;
    margin-bottom: 10px;
}

h1, h2, h3, h4, h5, h6 {
  text-transform: uppercase;
}

p {
  font-weight: 400; 
  font-size: 16px;
}

.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 15px 100px;
    height: 90px;
    background-color: var(--section-color);
    position: fixed;
    top: 0;
    z-index: 9000;
    width: 100%;
    box-sizing: border-box;
}

/* =======================
   NAV LINKS
======================= */
.nav-links {
  display: flex;
  gap: 20px;
  position: relative;
  z-index: 1000;
}

.nav-links a {
  text-decoration: none;
  color: white;
  font-size: 20px;
  display: block;
  padding: 10px 18px;
  transition: 0.3s ease;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.nav-links a:hover {
  background-color: #471666;
}

/* =======================
   HAMBURGER
======================= */
.hamburger {
  display: none; 
  font-size: 28px;
  cursor: pointer;
  transition: 0.3s ease;
  position: relative;
  z-index: 1100;
}

.hamburger::before {
    content: "☰";
}

.hamburger.open::before {
  content: "✕";
}

/* =======================
   DROPDOWN BASE STATE (CLOSED)
======================= */
.dropdown-content,
.sub-dropdown-content,
.sub-sub-dropdown-content {
  display: none;
  position: absolute;
  background: #1C0034;
  min-width: 220px;
  width: max-content;
  z-index: 9999;
  padding: 0;
}

.dropdown-content a,
.sub-dropdown-content a,
.sub-sub-dropdown-content a {
  display: block;
  width: 100%;               
  box-sizing: border-box;      
  padding: 12px 20px;
}


.sub-dropdown-content {
  background-color: #471666;
}



.sub-sub-dropdown-content {
  background-color: #591685;
}

/* keep parents positioned correctly */
.dropdown,
.sub-dropdown,
.sub-sub-dropdown {
  position: relative;
}

.dropdown-toggle {
  display: inline-flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  width: 100%;
  border-bottom: 2px solid rgba(255,255,255,0.1);
}

.dropdown-toggle a {
  flex: 1;
}

.toggle-btn {
  flex-shrink: 0;
  cursor: pointer;
  padding: 5px 10px;
  display: inline-block;
}

.toggle-btn::after {
  content: "▶";
}

.toggle-btn.down-only::after {
    content: "▼";
  }

/* MOBILE OPEN STATES */
.open > .dropdown-content,
.open > .sub-dropdown-content,
.open > .sub-sub-dropdown-content {
  display: flex;
}

/* FOOTER ROOT FIX (THIS WAS MISSING) */
.footer {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 40px;
  padding: 60px 100px;
  background-color: var(--section-color);
  flex-wrap: wrap;
}


/* COLUMNS */
.footer .left,
.footer .middle,
.footer .right {
  flex: 1;
}

/* TEXT */
.footer .left h5 {
  padding: 0px 50px;
}

/* LINKS */
.footer .middle,
.footer .right {
  display: flex;
  flex-direction: column;
  gap: 15px;
}

.footer a {
  color: white;
  text-decoration: none;
  transition: 0.2s;
}

.footer a:hover {
  color: #aaa;
}

/* SOCIALS */
.footer .socials {
  display: flex;
  gap: 10px;
  font-size: 20px;
}


#logo img{
  height: 90px;
  width: auto;
  display: block;
  margin-bottom: -25px;
}

#contact a {
  text-decoration: none;
  color: white;
  font-size: 25px;
  margin: 10px;
  transition: all 0.25s ease;
}

#contact a i:hover {
  transform: scale(1.1);
  border: 3px solid white;
}

#contact a i {
  background-color: #7F20BE;
  padding:15px;
  border-radius: 100%;
}

#kofi img{
  height: 20px;
  width: auto;
  display: block;
  box-sizing: border-box;
}

#kofi img:hover{
  transform: scale(1.1);
}

.heading {
  background:
    linear-gradient(rgba(0,0,0,0.3), rgba(0,0,0,0.3)),
    url('/assets/images/test_banner.jpg');

  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;

  height: 180px;
  padding: 50px;
  font-size: 20px;
  text-align: center;
}

.heading h1 {
  padding-bottom: 20px;
  transform: translateY(20px);
}

.cta {
    background-color: var(--section-color);
    min-height: 300px;
    padding: 20px 100px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 40px;
}

.cta .text {
    flex:1;
}

.cta .image {
  flex: 1;
  height: 100%;
  background: transparent; /* placeholder since image isn't ready */
  border-radius: 12px;
}

.cta .image img {
  max-height: 400px;
}

 #support {
    background: linear-gradient(to right, black, black, #591685, #1C0034);
  }

#secrets {
  position: relative;

  background-image: url('/assets/images/therearesecrets.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  height: 400px;
  overflow: hidden;

  display: flex;
  align-items: center;
}

/* right-side gradient overlay */
#secrets::before {
  content: "";
  position: absolute;
  inset: 0;

  background: linear-gradient(
    to left,
    rgba(0, 0, 0, 0.8),
    rgba(0, 0, 0, 0)
  );

  z-index: 1;
}

#secrets .text {
  position: relative;
  z-index: 2;
  color: white;
}



.hero {
    background-image: url('/assets/images/herobanner.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    height: 200px;
    padding: 200px 100px;
    font-size: 20px;
    text-transform: uppercase;
}

.carousel {
  background-color: black;
  width: 100%;
  height: 500px;
  position: relative;
  overflow: hidden;
  display: flex;
  align-items: center;
  box-sizing: border-box;
}

.carousel-heading {
  background-color: #1C0034;
  align-items: center;
  text-align: center;
  height: 100px;
  padding: 10px;
}

.carousel-heading h1 {
  font-size: 40px;
}

/* track */
.carousel-track {
  display: flex;
  transition: transform 0.4s ease;
  width: 100%;
  align-items: center;
}

/* each slide */
.slide {
  background:
  radial-gradient(
    circle at center,

    color-mix(in srgb, var(--accent) 100%, white 20%) 0%,

    var(--accent) 45%,

    rgba(0,0,0,0.25) 85%,

    black 100%
  );
  flex: 0 0 100%;
  height: 500px;
  position: relative;
  display: flex;
  justify-content: center;
  align-items: center;
  overflow: hidden;
}

.slide::before {
  content: "";

  position: absolute;
  inset: 0;

  background: var(--accent);

  filter: blur(120px);

  opacity: 0.45;

  transform: scale(1.2);

  z-index: 0;
}

.slide img {
  position: relative;
  z-index: 1;
}

/* image */
.slide img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
  transform: scale(1);
  transition: 0.4s ease;
}

/* overlay container */
.slide-inner {
  position: absolute;
  z-index:2;
  bottom: 0;

  width: 100%;
  padding: 20px;

  color: white;
  text-align: center;
  align-items: center;
  justify-content: center;
  display: flex;
  flex-direction: column;

  text-shadow:
        0 0 8px rgba(0, 0, 0, 0.8),
        0 0 16px rgba(0, 0, 0, 0.6);

  background: linear-gradient(
    to top,
    rgba(0,0,0.8,0.98),
    transparent
  );
}


.primary,
.secondary {
    display: inline-block;
    padding: 10px 15px;

    font-family: sans-serif;
    font-size: 14px;

    border: 2px solid;
    border-radius: 8px;

    text-decoration: none;   /* for <a> */
    cursor: pointer;

    transition: all 0.25s ease;
}


.primary {
    background-color: #7F20BE;
    color: white;
    border-color: #7F20BE;
}

.primary:hover {
    background-color: #7F20BE;
    border-color: white;
    font-weight: 600;
    transform: scale(1.1);
}

.secondary {
    background-color: transparent;
    color: white;
    border-color: white;
}

.secondary:hover {
    background-color: #471666;
    border-width: 3px;
    font-weight: 600;
    transform: scale(1.1);
}

.buttons {
    display: flex;
    gap: 30px;
    
}

.arrow {

    position: absolute;
    top: 50%;
    transform: translateY(-50%);

    z-index: 10;

    width: 40px;
    height: 40px;

    display: flex;
    align-items: center;
    justify-content: center;

    color: white;

    background: rgba(0,0,0,0.35);

    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);

    border: 1px solid rgba(255,255,255,0.08);

    border-radius: 50%;

    font-size: 24px;

    cursor: pointer;
}

.arrow.left {left: 100px;}
.arrow.right {right: 100px;}

.gallery {
  column-count: 4;
  column-gap: 15px;
  padding: 20px;
}

.filter {
  display: flex;
  justify-content: right;
  align-items: center;
  gap: 15px;
  padding: 25px;
  padding-right: 100px;
  background: var(--section-color);
  border-bottom: 1px solid rgba(255,255,255,0.1);
}

.filter label {
  color: white;
  font-size: 18px;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 1px;
}


.filter select {
  appearance: none;
  -webkit-appearance: none;
  background:
    linear-gradient(
      135deg,
      #471666,
      #1C0034
    );
  color: white;
  padding: 12px 45px 12px 20px;
  border: 2px solid white;
  border-radius: 10px;
  font-size: 16px;
  font-weight: 600;
  cursor: pointer;
  outline: none;
  box-shadow:
    0 0 15px rgba(127,32,190,0.35);
  position: relative;
}

.filter-select{
  position: relative;
}

.filter-select::after {
  content: "▼";
  position: absolute;
  right: 15px;
  top: 50%;
  transform: translateY(-50%);
  color: white;
  font-size: 12px;
  pointer-events: none;
}


.filter select:hover {
  background:
    linear-gradient(
      135deg,
      #7F20BE,
      #471666
    );

  transform: scale(1.05);
}


.filter select:focus {
  border-color: white;
  box-shadow:
    0 0 20px rgba(255,255,255,0.4);
}


.filter option {
  background: #1C0034;
  color: white;
}

.item {
  break-inside: avoid;
  margin-bottom: 15px;
  border-radius: 10px;
  overflow: hidden;
  position: relative;
}

.item img {
  width: 100%;
  height: auto;   
  display: block;
  transition: 0.3s ease;
}

.item img:hover {
  transform: scale(1.05);
}

.label {
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  padding: 30px;
  font-size: 20px;
  font-weight: 600;
  color: white;
  background: linear-gradient(to top, rgba(0,0,0,1), rgba(0,0,0,1), rgba(0,0,0,0.7), rgba(0,0,0,0.4), transparent);
  opacity: 0;
  transition: 0.3s ease;
}

.item:hover .label {
  opacity: 1;
}

.lightbox {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  background: rgba(0,0,0,0.7);
  display: none;
  justify-content: center;
  align-items: center;
  z-index: 9999;
  flex-direction: column;
  gap: 0px;
}

.lightbox img {
  max-width: 90%;
  max-height: 90%;
  border-radius: 10px;
  cursor: zoom-out;
}


.login {
  height: 600px;
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 100px;

  position: relative;

  background-image: url('/assets/images/login_bg.jpg');
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  background-attachment: fixed;

  overflow: hidden;

  display: flex;
}


.login::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.4); 
  z-index: 1;
}

.login-info,
.login-box {
  position: relative;
  z-index: 2;
}

.login-box {
  background: linear-gradient(to top, #7F20BE, #471666, #1C0034);
  padding: 40px;
  border-radius: 12px;
  width: 320px;
  color: white;
  box-shadow: 0 0 20px rgba(0,0,0,0.5);
  text-align: center;
}

.login-info {
  width: 400px;
}

.login-info h2,
.login-info p {
    color: white;
    text-shadow:
        0 0 8px rgba(0, 0, 0, 0.8),
        0 0 16px rgba(0, 0, 0, 0.6);
}

.login .image img {
  height: 170px;
}

.input-group {
  margin-bottom: 15px;
  display: flex;
  flex-direction: column;
}

.input-group label {
  font-size: 14px;
  text-align: left;
  padding: 10px;
}

.input-group input {
  padding: 15px;
  border: none;
  border-radius: 20px;
  outline: none;
  background-color: #ccc;
}

.login-btn {
  width: 100%;
  padding: 10px;
  background:
    linear-gradient(
      135deg,
      #471666,
      #1C0034
    );
  box-shadow:
    0 0 15px rgba(127,32,190,0.35);
  border: 2px solid #ccc;
  border-radius: 20px;
  cursor: pointer;
  margin-top: 10px;
  transition: 0.2s;
  color: white;
}

.login-btn:hover {
  background:
    linear-gradient(
      135deg,
      #7F20BE,
      #471666
    );
  transform: scale(1.05);
}

ul {
  list-style: none;
  padding: 0;
  margin: 0;
  margin-bottom: 10px;
  letter-spacing: 1px;
}

li::before {
  content: "✦ ";
  color: #a855f7; /* purple vibe */
}

li {
  margin: 20px;
  letter-spacing: 1px;
  font-size: 14px;
  padding-left: 20px;
  text-indent: -20px;
}

.mobile-only {
  display: none;
}

.lore-section {
  background-color: var(--section-color);
  padding: 20px;
  display: flex;
  gap: 10px;
  align-items: flex-start; 
}

.lore-section .lore-text {
  flex: 2;                /* text gets more space than image */
  max-width: 700px;
  padding: 40px;
}

.lore-section .lore-text h2 {
  margin-bottom: 20px;
}

.lore-section .lore-text p {
  margin-bottom: 16px;
  line-height: 1.7;
}

.lore-section .lore-image {
  flex: 1;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  gap: 15px;
  margin-top: 40px;
}

.lore-section .lore-image img {
  width: 100%;
  max-height: 500px;
  border-radius: 12px;
  object-fit: cover;
}

.lore-section.reverse {
  flex-direction: row-reverse;
}

.caption {
  font-size: 14px;
  color: #aaa;
  font-style: italic;
  opacity: 0.8;
  margin-top: 4px;
}

#section-nav {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
  justify-content: center;
  padding: 15px 20px;
  background: #111;
  border-bottom: 1px solid #333;
}

#section-nav a {
  color: #aaa;
  text-decoration: none;
  font-size: 14px;
  padding: 6px 10px;
  border-radius: 6px;

  transition: 0.2s ease;
}

#section-nav a:hover {
  color: white;
  background: #222;
}

#section-nav a.active {
  color: white;
  background: #444;
}

.char-box {
  display: flex;
  gap:70px;
  align-items: flex-start;
  justify-content: center;
  background: #111;
  padding: 60px;
  border-radius: 12px;
  margin: 20px 0;
  border: 1px solid #333;
}

.char-box h2 {
  margin-bottom: 10px;
}

.char-box p {
  margin: 15px 0;
  color: #ccc;
}

.char-image {
  flex: 1;
  margin-bottom: 15px;
}

.char-image img {
  width: 100%;
  height: 400px;
  border-radius: 12px;
  object-fit: contain;
  border: 1px solid #62566a;
}

.char-info {
  flex: 2;
  padding: 30px;
  background: linear-gradient(to top, #1C0034, black);
  border-radius: 12px;
  border: 1px solid #62566a;
  width: 300px;

}

.fun-facts {
  margin-top: 40px;
  padding: 20px;
  background: linear-gradient(to top, #471666, #1C0034);
  border-radius: 12px;
  border: 1px solid #d2b6e6;
  width: 300px;
}

.fun-facts h3 {
  margin-bottom: 10px;
}

.fun-facts li {
  margin-bottom: 8px;
  color: white;
}

section[data-type] {
  width: 100%;
  box-sizing: border-box;
  margin: 40px 0;
  padding: 20px;
  background-color: #1C0034;
  text-align: center;
}

section[data-type] h2 {
  margin-bottom: 15px;
  padding-bottom: 8px;
  text-align: center;
}

.card-container {
  display: grid;
  box-sizing: border-box;
  grid-template-columns: repeat(3, 1fr);
  gap: 50px;
  justify-content: center;
  padding: 40px 100px;
}

.card {
  width: 100%;
  aspect-ratio: 1/1;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  background: #111;
  border-radius: 10px;
  overflow: hidden;
  cursor: pointer;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.card:hover {
  transform: scale(1.05);
  box-shadow: 0 8px 20px rgba(0, 0, 0, 0.5);
}

.card img {
  width: 100%;
  height: 70%;
  object-fit: cover;
  display: block;
}

.card h3 {
  height: 30%;
  padding: 20px;
  margin: 0;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

/* ===== FLIPBOOK POPUP ===== */
.book-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 0, 52, 0.92);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9500;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}
.book-overlay.open {
  opacity: 1;
  pointer-events: all;
}

.book-close {
  position: absolute;
  top: 32px;
  right: 40px;
  background: transparent;
  border: 2px solid white;
  color: white;
  width: 40px;
  height: 40px;
  border-radius: 8px;
  font-size: 20px;
  cursor: pointer;
  transition: 0.25s ease;
}
.book-close:hover {
  background-color: #471666;
  border-width: 3px;
  transform: scale(1.1);
}

.book-scene {
  /* This is the positioning context the nav buttons (and the
     spine/static-left page) measure themselves against. Without
     this, .book-nav's left/right offsets were being measured
     against .book-overlay (the full viewport) instead of the book
     itself — that's why both buttons ended up bunched on the left. */
  position: relative;
  perspective: 2400px;
  transform: scale(0.85);
  opacity: 0;
  transition: transform 0.45s cubic-bezier(0.2, 0.8, 0.2, 1), opacity 0.45s ease;
}
.book-overlay.open .book-scene {
  transform: scale(1);
  opacity: 1;
}
.book {
  position: relative;
  width: 900px;
  height: 636px;
  max-width: 92vw;
  max-height: 82vh;
  border-radius: 12px;
  box-shadow: 0 0 30px rgba(127, 32, 190, 0.5);
}

.page {
  position: absolute;
  inset: 0;
  width: 50%;
  left: 50%;
  transform-style: preserve-3d;
  transform-origin: left center;
  transition: transform 0.85s cubic-bezier(0.45, 0.05, 0.15, 1);
}
.page.flipped {
  transform: rotateY(-180deg);
}

.page .face {
  position: absolute;
  inset: 0;
  backface-visibility: hidden;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1c0034;
  border: 1px solid rgba(255, 255, 255, 0.15);
  box-sizing: border-box;
}
.page .face.back {
  transform: rotateY(180deg);
}
.page .face:first-child {
  border-radius: 0 12px 12px 0;
}

.book-static-left {
  position: absolute;
  inset: 0;
  width: 50%;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
  background-color: #1c0034;
  border-radius: 12px 0 0 12px;
  transition: opacity 0.2s ease;
}

.book-spine {
  position: absolute;
  left: 50%;
  top: 0;
  bottom: 0;
  width: 3px;
  background: #9d663f;
  transform: translateX(-1.5px);
  z-index: 50;
  pointer-events: none;
}

.book-nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  background: transparent;
  border: 2px solid white;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  cursor: pointer;
  transition: 0.25s ease;
}
.book-nav:hover:not(:disabled) {
  background-color: #471666;
  border-width: 3px;
  transform: translateY(-50%) scale(1.1);
}
.book-nav:disabled {
  /* Bumped from 0.25 so it reads as "grayed out", not "gone" */
  opacity: 0.4;
  cursor: default;
}
.book-nav.prev { left: -70px; }
.book-nav.next { right: -70px; }

.tutorial-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 10000;
}

.tutorial-overlay.open {
  display: flex;
}

.tutorial-box {
  background: #1C0034;
  border-radius: 16px;
  max-width: 900px;
  width: 90%;
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

.tutorial-image {
  height: 400px;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  background-color: #471666;
}

.tutorial-content {
  padding: 24px;
  color: white;
  text-align: center;
}

.tutorial-nav {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  margin-top: 16px;
}

.tutorial-arrow {
  background: #7F20BE;
  color: white;
  border: none;
  border-radius: 50%;
  width: 36px;
  height: 36px;
  font-size: 20px;
  cursor: pointer;
}

.tutorial-arrow.next {
  padding-left: 15px; 
  padding-top: 5px;
}

.tutorial-arrow:disabled {
  opacity: 0.4;
  cursor: default;
}

.tutorial-dots {
  display: flex;
  gap: 8px;
}

.tutorial-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #591685;
  cursor: pointer;
}

.tutorial-dot.active {
  background: #7F20BE;
}

.tutorial-cta {
  display: none;
  background: #7F20BE;
  color: white;
  padding: 10px 20px;
  border-radius: 8px;
  text-decoration: none;
  margin-top: 8px;
}

.tutorial-cta:hover {
  border: solid 2px white;
  font-weight: 600;
}

.tutorial-close {
  position: absolute;
  top: 20px;
  right: 30px;
  background: none;
  border: none;
  color: white;
  font-size: 28px;
  cursor: pointer;
}

/* ===== CLUE POPUP (reusable) ===== */
.clue-popup-overlay {
  position: fixed;
  inset: 0;
  background: rgba(28, 0, 52, 0.9);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 9600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}
.clue-popup-overlay.open {
  opacity: 1;
  pointer-events: all;
}
.clue-popup-box {
  display: flex;
  flex-direction: column;
  width: 500px;
  max-width: 90vw;
  border-radius: 12px;
  overflow: hidden;
  background: linear-gradient(to top, #7F20BE, #471666, #1C0034);
  box-shadow: 0 0 30px rgba(127, 32, 190, 0.5);
  transform: scale(0.9);
  opacity: 0;
  transition: transform 0.3s ease, opacity 0.3s ease;
}
.clue-popup-overlay.open .clue-popup-box {
  transform: scale(1);
  opacity: 1;
}
.clue-popup-image {
  width: 100%;
  min-height: 50vh;
  max-height: 100vh;
  flex-shrink: 0;
  background-size: contain;
  background-position: center;
  background-color: #1c0034;
  background-repeat: no-repeat;
  order: 2;
}
.clue-popup-content {
  position: relative;
  flex: none;
  padding: 30px 25px;
  display: flex;
  align-items: center;
  order: 1;
}
.clue-popup-content p {
  margin: 0;
  font-size: 15px;
  line-height: 1.6;
}
.clue-popup-close {
  position: absolute;
  top: 10px;
  right: 12px;
  background: transparent;
  border: none;
  color: white;
  font-size: 18px;
  cursor: pointer;
  opacity: 0.7;
}
.clue-popup-close:hover {
  opacity: 1;
}

.clue-popup-box.image-only .clue-popup-content {
  display: none;
}

.clue-popup-box.image-only .clue-popup-image {
  height: 100%;
  width: 100%;
}

.clue-popup-box.image-only {
  height: 80vh;
}

#clueText {
  cursor: pointer;
}

#tutorial-end {
  min-height: 70vh;
}

#crypto {
    scroll-margin-top: 300px;
}

.cryptolab {
  padding: 40px clamp(20px, 5vw, 100px);
  background-color: #1c0034;
  justify-content: center;
  align-items: center;
}

.crypto-layout {
  display: flex;
  align-items: flex-start;
  gap: 40px;
  margin-top: 0px;
}

.crypto-image {
  flex: 1;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 0;
}

.crypto-image img {
  width: 100%;
  max-height: 370px;
  border-radius: 12px;
  object-fit: contain;
}

.crypto-heading {
    flex: 1;
}

.crypto-carousel {
  flex: 1;
  min-width: 0;
  position: relative;
  display: flex;
  align-items: flex-start;
  gap: 20px;
  margin-top: 40px;
}

.crypto-stage-wrap {
  flex: 1;
  min-width: 0;
}

.crypto-stage {
  position: relative;
  min-width: 0;
  transition: height 0.4s ease;
}

.cipher-box {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  box-sizing: border-box;

  background: linear-gradient(to top, #471666, black);
  border: 1px solid #7a608d;
  border-radius: 12px;
  padding: 25px;
  color: white;

  transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.45s ease;
  will-change: transform, opacity;
}

.cipher-box.is-current {
  transform: translateX(0) scale(1);
  opacity: 1;
  z-index: 3;
  pointer-events: auto;
}

.cipher-box.is-prev {
  transform: translateX(-36px) scale(0.94);
  opacity: 0.35;
  z-index: 2;
  pointer-events: none;
}

.cipher-box.is-hidden {
  transform: translateX(36px) scale(0.94);
  opacity: 0;
  z-index: 1;
  pointer-events: none;
}

.crypto-arrow {
  background: transparent;
  border: 2px solid white;
  color: white;
  width: 44px;
  height: 44px;
  border-radius: 50%;
  font-size: 22px;
  line-height: 1;
  cursor: pointer;
  flex-shrink: 0;
  margin-top: 150px;
  transition: 0.25s ease;
}

.crypto-arrow:hover {
  background-color: #471666;
  border-width: 3px;
  transform: scale(1.1);
}

.crypto-dots {
  display: flex;
  justify-content: center;
  gap: 10px;
  margin-top: 15px;
}

.crypto-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: rgba(255,255,255,0.25);
  cursor: pointer;
  transition: 0.25s ease;
}

.crypto-dot.active {
  background: #7F20BE;
  box-shadow: 0 0 8px rgba(127,32,190,0.7);
  transform: scale(1.2);
}

.cipher-box h3 {
  color: white;
  margin: 0 0 15px;
  font-size: 18px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.336);
  padding-bottom: 10px;
}

.cipher-box p {
  font-size: 14px;
  color: rgb(195, 192, 192);
  border-bottom: 2px solid rgba(255, 255, 255, 0.336);
  padding-bottom: 10px;
}

.cipher-box label {
  display: block;
  font-size: 13px;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #d2b6e6;
  margin: 15px 0 6px;
}

.cipher-box textarea,
.cipher-box input[type="text"] {
  width: 100%;
  background-color: #ccc;
  border: none;
  border-radius: 12px;
  padding: 12px 15px;
  font-family: sans-serif;
  font-size: 14px;
  box-sizing: border-box;
  resize: none;
  min-height: 50px;
  height: auto;
  overflow: hidden;
  transition: box-shadow 0.25s ease;
}

.cipher-box textarea:focus,
.cipher-box input[type="text"]:focus {
  box-shadow: 0 0 12px rgba(127,32,190,0.6);
}

.cipher-box textarea[readonly] {
  background-color: #e8ddf0;
  color: #1C0034;
  font-weight: 600;
}

.shift-control {
  display: flex;
  align-items: center;
  gap: 15px;
  margin: 15px 0;
}

.shift-control span {
  font-size: 14px;
  letter-spacing: 1px;
}

#caesarShiftVal {
  font-weight: 700;
  font-size: 18px;
  min-width: 24px;
  text-align: center;
}

.shift-btn {
  background: linear-gradient(135deg, #471666, #1C0034);
  box-shadow: 0 0 10px rgba(127,32,190,0.35);
  border: 2px solid #ccc;
  color: white;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  font-size: 16px;
  line-height: 1;
  cursor: pointer;
  transition: 0.2s ease;
}

.shift-btn:hover {
  background: linear-gradient(135deg, #7F20BE, #471666);
  transform: scale(1.1);
}

.field-error {
  display: block;
  color: #ff8fa3;
  font-size: 12px;
  min-height: 16px;
  margin-top: 6px;
  letter-spacing: 0.5px;
}

.cipher-popup-overlay {
  display: none;
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.cipher-popup-overlay.open {
  display: flex;
}

.cipher-popup-box {
  position: relative;
  background: linear-gradient(to top, #1C0034, black);
  border: 2px solid #591685;
  border-radius: 8px;
  padding: 2rem;
  max-width: 420px;
  width: 90%;
  color: #eee;
  text-align: center;
  align-items: center;
}

.cipher-popup-box .clue-popup-close {
  position: absolute;
  top: 0.75rem;
  right: 1rem;
  background: none;
  border: none;
  color: #eee;
  font-size: 1.5rem;
  cursor: pointer;
}

.cipher-text {
  font-family: monospace;
  font-size: 1.2rem;
  letter-spacing: 0.1em;
  color: #b388ff;
  margin: 1rem 0 0.25rem;
}

.cipher-hint {
  font-size: 0.85rem;
  color: #999;
  margin-bottom: 1rem;
}

#cipherPopupForm {
  display: flex;
  gap: 0.5rem;
}

#cipherPopupInput {
  flex: 1;
  padding: 0.5rem;
  background: #111;
  border: 1px solid #591685;
  color: #eee;
  border-radius: 4px;
}

#cipherPopupForm button {
  padding: 0.5rem 1rem;
  background: #591685;
  color: #fff;
  border: none;
  border-radius: 4px;
  cursor: pointer;
}

.cipher-error {
  color: #ff5c5c;
  margin-top: 0.75rem;
  min-height: 1.2em;
}

.cipher-success a {
  display: inline-block;
  margin-top: 0.5rem;
  color: white;
}

.interactive-image {
  cursor: pointer;
}

.cipher-success {
  margin-top: 1rem;
}

.cipher-success p {
  color: #63ffc8;
  margin-bottom: 0.5rem;
}

.coord {
  padding: 10px;
  background: #1C0034;
  border-radius: 10px;
  border: solid 1px rgb(155, 143, 160);
}

.coord p {
  color: white !important
}

body.locked-gate {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 100vh;
  margin: 0;
  background:
    radial-gradient(circle at center, #150022 0%, #050006 70%);
  overflow: hidden;
}

.gate-message {
  position: relative;
  text-align: center;
  color: #b388ff;
  font-family: monospace;
}

.gate-message::before {
  content: "⚠";
  display: block;
  font-size: 100px;
  color: #6a00ff;
  margin-bottom: 1rem;
  text-shadow: 0 0 12px #6a00ff, 0 0 24px #6a00ff;
  animation: gate-pulse 2s ease-in-out infinite;
}

.gate-message p {
  font-size: 1rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  margin: 0;
  text-shadow: 0 0 8px #6a00ff;
}



@keyframes gate-pulse {
  0%, 100% { opacity: 0.6; text-shadow: 0 0 12px #6a00ff, 0 0 24px #6a00ff; }
  50%      { opacity: 1;   text-shadow: 0 0 20px #b388ff, 0 0 40px #6a00ff; }
}

@keyframes gate-blink {
  0%, 50% { opacity: 1; }
  50.01%, 100% { opacity: 0; }
}

/* ===== COPY BUTTON (shared) ===== */
.copy-btn {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 10px 18px;
  margin-top: 12px;

  font-family: sans-serif;
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0.5px;
  text-transform: uppercase;

  color: white;
  background: linear-gradient(135deg, #7F20BE, #471666);
  border: 2px solid #7F20BE;
  border-radius: 8px;

  cursor: pointer;
  box-shadow: 0 0 12px rgba(127, 32, 190, 0.35);
  transition: all 0.25s ease;
}

.copy-btn:hover {
  border-color: white;
  transform: scale(1.05);
  box-shadow: 0 0 18px rgba(127, 32, 190, 0.6);
}

.copy-btn:active {
  transform: scale(0.97);
}

/* optional "copied" success state — toggle this class in JS
   alongside the textContent change for a stronger confirmation cue */
.copy-btn.copied {
  background: linear-gradient(135deg, #2fae6c, #1c6b44);
  border-color: #2fae6c;
  box-shadow: 0 0 14px rgba(47, 174, 108, 0.5);
}


@media (max-width: 768px) {

  .gate-message {
    width: 95%;
    margin: 0 auto;
    text-align: center;
  }

  .gate-message::before {
    font-size: 110px;
    margin-bottom: 1.2rem;
    text-shadow:
      0 0 12px #6a00ff,
      0 0 28px #6a00ff,
      0 0 45px #6a00ff;
  }

  .gate-message p {
    font-size: 1.0rem;
    letter-spacing: 0.12em;
    line-height: 1.6;
    text-shadow:
      0 0 8px #6a00ff,
      0 0 16px #6a00ff;
  }


  .cryptolab {
    padding: 20px;
  }

  .crypto-carousel {
    gap: 10px;
  }


  .crypto-arrow {
    width: 34px;
    height: 34px;
    font-size: 16px;
    margin-top: 120px;
  }

  .crypto-layout {
    flex-direction: column;
    gap: 20px;
  }

  .crypto-image img {
    max-height: 220px;
  }

  .crypto-image,
  .crypto-carousel {
        width: 100%;
        flex: none;
  }

  .crypto-stage-wrap {
        width: 100%;
    }

   .clue-popup-box {
    flex-direction: column;
    width: 320px;
  }
  .clue-popup-image {
    width: 100%;
    height: 120px;
  }

  .card-container {
    gap: 20px;
    grid-template-columns: repeat(2, 1fr);
    padding: 10px;
  }

  .card {
    height: auto;
    width: auto;
    margin-bottom: 10px;
  }

  

  .card h3 {
    font-size: 11px;
  }

  .char-box {
    flex-direction: column;
    justify-content: center;
    align-items: center;
  }

  .char-image {
    max-width: 100%;
  }
  
  #section-nav {
    justify-content: center;
    gap: 8px;
    padding: 10px;
  }

  #section-nav a {
    font-size: 12px;
    padding: 5px 8px;
  }

  .lore-section, .lore-section.reverse {
    display:flex;
    flex-direction: column !important;
    padding: 30px;
  }

  .lore-section .lore-text {
    max-width: 100%;
    padding: 0;
  }

  .lore-image {
    margin-top: 0;
    display: flex;
    flex-direction: column;
  }

  .image-block {
    display: block;
    width: 100%
  }

  .lore-section .lore-image img{
    display: block;
    height: auto;
    width: 100%;
  }

  .cta {
    padding: 30px 20px;
    flex-direction: column;
    height: auto;
    gap: 5px;
  }

  #guide {
    height: 700px;
  }

  #support {
    background: linear-gradient(to top, black, black, #591685, #1C0034);
  }

  .cta .image {
    order: -1;
  }

  .cta .image img {
    max-height: 300px;
    width: 100%;
    box-sizing: border-box;
  }


   .hero {
    position: relative;
    background-color: black;
    background-image: none;

    height: 350px;
    padding: 20px;
    box-sizing: border-box;

    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: flex-start;

    text-align: center;
    overflow: hidden;
  }

  /* Background image */
  .hero::before {
    content: "";
    position: absolute;

    /* Move image DOWN */
    top: 100px;
    left: 0;

    width: 100%;
    height: 250px;

    background-image:
      linear-gradient(
        to bottom,
        black 0%,
        transparent 30%
      ),
      url('/assets/images/herobanner.png');

    background-repeat: no-repeat;
    background-size: cover;
    background-position: 100% center;

    z-index: 0;
  }

  /* Keep text/buttons above image */
  .hero h1,
  .hero p,
  .hero .buttons {
    position: relative;
    z-index: 1;
  }

  .hero h1 {
    margin-top: 20px;
    font-size: 24px;
  }

  .hero p {
    margin-top: 10px;
    font-size: 10px;
  }

  .hero .buttons {
    display: flex;
    justify-content: flex-start;
    gap: 10px;
    width: 100%;
  }

  .hero .primary,
  .hero .secondary {
    font-size: 10px;
    padding: 7px 10px;
    border-width: 1px;
    border-radius: 6px;
  }
  .logo img {
    height: 70px;
  }

  .navbar {
    padding: 30px 20px;
    box-sizing: border-box;
  }

  p {
    font-size: 14px;
  }

  h1 {
    font-size: 24px;
  }

  h2 {
    font-size: 20px;
  }

  .primary , .secondary {
    font-size:12px ;
  }

  .buttons {
    display: flex;
    justify-content: center;
  }

  .heading {
    height: 50px;
    background-position: 5% center;
  }

  .heading h1 {
    transform: translateY(-20px);
  }


  .nav-links {
    display: none;
    flex-direction: column;
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: #111;
    padding: 10px 0;
    box-sizing: border-box;
  }

  .nav-links.active {
    display: flex;
  }

  .hamburger {
    display: block;
  }


  .dropdown-content,
  .sub-dropdown-content,
  .sub-sub-dropdown-content {
    position: relative;  
    display: none;
    flex-direction: column;
    width: 100%;
  }

  .toggle-btn::after {
    content: "▼";
  }

  .carousel-heading h1 {
  font-size: 30px;
}

   .carousel {
    height: auto;
  }

  .carousel-track {
    height: auto;
  }

  .slide {
    height: auto;
  }

  .slide img {
    width: 100%;
    height: auto;
    display: block;
    object-fit: contain;
  }

  .arrow.left {left: 10px;}
  .arrow.right {right: 10px;}


  .open > .dropdown-content,
  .open > .sub-dropdown-content,
  .open > .sub-sub-dropdown-content {
    display: flex;
  }

  /* spacing for nested items */
  .sub-dropdown-content a {
    padding-left: 30px;
  }

  .sub-sub-dropdown-content a {
    padding-left: 50px;
  }

  .footer {
    flex-direction: column;
    text-align: center;
    align-items: center;
    padding: 40px 80px;
    display: flex;
    height: 800px;
  }

  .footer .middle {
    align-items: center;
  }

  .footer .right {
    align-items: center;
  }

  .footer .socials {
    justify-content: center;
  }

  .login {
    display: flex;
    flex-direction: column;
    gap: 20px;
    background-position: 30% center;
  }

  .login-box {
    width: 200px;
    padding-top: 10px;
    padding: 20px;
  }

  .login-box .image img {
    height: 130px;
  }

  .login-info {
    width: 320px;
  }

  .input-group label {
    font-size: 12px;
    padding: 5px;
  }

  .input-group input {
    font-size: 12px;
    padding: 10px;
  }

  .mobile-only {
    display: block;
  }

  .gallery {
    column-count: 2;
    column-gap: 10px;
    padding: 10px;
  }

  .filter {
    padding-right: 25px;
    justify-content: center;
  }

  .item {
    display: flex;
    flex-direction: column;
    margin-bottom: 5px;
    border-radius: 10px;
    overflow: hidden;
  }

  .item img {
    width: 100%;
    height: auto;
    display: block;
  }

  .label {
    position: static;        
    background: none;        
    color: #fff;
    padding: 10px 5px 15px;
    font-size: 12px;
    text-align: left;
    opacity: 0.9;
  }

/* =========================
   CASE FILE BOOK — MOBILE
========================= */

.book-overlay {
  padding: 20px;
  box-sizing: border-box;
}

.book-scene {
  width: 100%;
  max-width: 450px;
  height: 90vh;

  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;

  transform: scale(0.95);
}

.book {
  width: 100%;
  height: calc(90vh - 80px);

  max-width: 450px;
  max-height: none;

  border-radius: 12px;
  overflow: hidden;
}

/* Hide desktop spread elements */

.book-static-left,
.book-spine {
  display: none !important;
}

/* Make each sheet fill the entire book */

.page {
  width: 100%;
  height: 100%;
  left: 0;

  transform: none !important;
  transform-style: flat;
  transform-origin: center;

  transition: none;
}

/* Hide both sides by default */

.page .face {
  width: 100%;
  height: 100%;

  display: none;

  border-radius: 12px !important;

  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;
}

/* JS adds this to the page currently being shown */

.page .face.mobile-visible {
  display: block;
}


/* =========================
   MOBILE NAV BUTTONS
========================= */

.book-nav {
  top: auto;
  bottom: 0;

  transform: none;
}

.book-nav.prev {
  left: calc(50% - 55px);
  right: auto;
  z-index: 99999;
}

.book-nav.next {
  right: calc(50% - 55px);
  left: auto;
  z-index: 99999;
}


.book-nav:hover:not(:disabled) {
  transform: scale(1.05);
}


/* =========================
   CLOSE BUTTON
========================= */

.book-close {
  top: 20px;
  right: 20px;
}

/* =========================
   MOBILE SINGLE PAGE
========================= */

.mobile-book-page {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  background-color: #1c0034;
  background-size: contain;
  background-position: center;
  background-repeat: no-repeat;

  border-radius: 12px;
  box-sizing: border-box;

  z-index: 100;
}


}

/* =======================
   DESKTOP HOVER DROPDOWNS
======================= */

@media (min-width: 769px) {

  /* LEVEL 1 */
  .dropdown:hover .dropdown-content {
    display: flex;
    flex-direction: column;
    top: 100%;
    left: 0;
  }

  /* LEVEL 2 */
  .sub-dropdown:hover .sub-dropdown-content {
    display: flex;
    flex-direction: column;
    top: 0;
    left: 100%;
  }

  /* LEVEL 3 */
  .sub-sub-dropdown:hover .sub-sub-dropdown-content {
    display: flex;
    flex-direction: column;
    top: 0;
    left: 100%;
  }

}



