/* ============================================
   STREETLAMP BOOKS - Main Stylesheet
   ============================================ */

/* ---- Font Face Declarations ---- */
/* Fonts loaded via Google Fonts CDN in index.html.
   To self-host for production, download WOFF2 files to fonts/ and uncomment:

@font-face {
  font-family: 'Baloo Thambi 2';
  src: url('../fonts/BalooThambi2-Variable.woff2') format('woff2');
  font-weight: 400 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Catamaran';
  src: url('../fonts/Catamaran-Variable.woff2') format('woff2');
  font-weight: 400 700;
  font-style: normal;
  font-display: swap;
}
*/

/* ---- CSS Custom Properties ---- */
:root {
  --color-sunset: #E8762B;
  --color-sunset-dark: #C45A1C;
  --color-lamp-gold: #F5B731;
  --color-teal: #00838F;
  --color-teal-dark: #006064;
  --color-cream: #FFF8E7;
  --color-charcoal: #2D2D2D;
  --color-warm-grey: #6B6B6B;
  --color-level-1: #F48FB1;
  --color-level-2: #4FC3F7;
  --color-level-3: #81C784;
  --color-level-4: #9575CD;
}

/* ---- Base Styles ---- */
html {
  scroll-behavior: smooth;
  scroll-padding-top: 80px;
}

body {
  overflow-x: hidden;
}

::selection {
  background-color: var(--color-lamp-gold);
  color: var(--color-charcoal);
}

/* ---- Navigation ---- */
#navbar {
  background: transparent;
}

#navbar.scrolled {
  background: rgba(45, 45, 45, 0.95);
  backdrop-filter: blur(12px);
  box-shadow: 0 2px 20px rgba(0, 0, 0, 0.15);
}

#navbar.scrolled .nav-tall {
  height: 64px;
}

#navbar.scrolled .nav-logo {
  height: 32px;
}

.nav-link {
  position: relative;
}

.nav-link::after {
  content: '';
  position: absolute;
  bottom: -4px;
  left: 0;
  width: 0;
  height: 2px;
  background: var(--color-lamp-gold);
  transition: width 0.3s ease;
  border-radius: 1px;
}

.nav-link:hover::after,
.nav-link.active::after {
  width: 100%;
}

/* ---- Hero Section ---- */
#hero-video {
  filter: brightness(0.7);
}

/* ---- Book Cards ---- */
.book-card {
  opacity: 1;
  transform: scale(1);
  transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.book-card.hidden-card {
  opacity: 0;
  transform: scale(0.95);
  position: absolute;
  pointer-events: none;
}

.book-card .book-cover {
  aspect-ratio: 3 / 4;
  overflow: hidden;
  border-radius: 12px;
}

.book-card .book-cover img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.book-card:hover .book-cover img {
  transform: scale(1.05);
}

.book-card .new-badge {
  position: absolute;
  top: 12px;
  right: 12px;
  background: var(--color-sunset);
  color: white;
  font-size: 12px;
  font-weight: 700;
  padding: 4px 10px;
  border-radius: 20px;
}

.level-badge {
  display: inline-block;
  padding: 2px 12px;
  border-radius: 20px;
  font-size: 12px;
  font-weight: 600;
}

.level-badge[data-level="1"] {
  background: rgba(244, 143, 177, 0.15);
  color: var(--color-level-1);
}

.level-badge[data-level="2"] {
  background: rgba(79, 195, 247, 0.15);
  color: var(--color-level-2);
}

.level-badge[data-level="3"] {
  background: rgba(129, 199, 132, 0.15);
  color: var(--color-level-3);
}

.level-badge[data-level="4"] {
  background: rgba(149, 117, 205, 0.15);
  color: var(--color-level-4);
}

/* ---- Level Filter Buttons ---- */
.level-filter.active[data-level="all"] {
  background: var(--color-charcoal);
  color: white;
}

.level-filter.active[data-level="1"] {
  background: var(--color-level-1);
  color: white;
}

.level-filter.active[data-level="2"] {
  background: var(--color-level-2);
  color: white;
}

.level-filter.active[data-level="3"] {
  background: var(--color-level-3);
  color: white;
}

.level-filter.active[data-level="4"] {
  background: var(--color-level-4);
  color: white;
}

/* ---- Video Cards ---- */
.video-card {
  position: relative;
  overflow: hidden;
  border-radius: 16px;
  cursor: pointer;
}

.video-card .video-thumbnail {
  aspect-ratio: 16 / 9;
  overflow: hidden;
}

.video-card .video-thumbnail img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.4s ease;
}

.video-card:hover .video-thumbnail img {
  transform: scale(1.05);
}

.video-card .play-overlay {
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0, 0, 0, 0.3);
  transition: background 0.3s ease;
}

.video-card:hover .play-overlay {
  background: rgba(0, 0, 0, 0.15);
}

.play-btn {
  width: 64px;
  height: 64px;
  background: rgba(255, 255, 255, 0.9);
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: all 0.3s ease;
  box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.video-card:hover .play-btn {
  transform: scale(1.1);
  background: white;
}

.play-btn svg {
  margin-left: 4px;
}

/* ---- Testimonials ---- */
#testimonial-carousel {
  min-height: 200px;
}

.testimonial-slide {
  min-width: 100%;
  padding: 0 16px;
}

.testimonial-quote {
  position: relative;
  padding: 2rem;
}

.testimonial-quote::before {
  content: '\201C';
  position: absolute;
  top: -10px;
  left: 0;
  font-size: 80px;
  font-family: Georgia, serif;
  color: var(--color-lamp-gold);
  opacity: 0.3;
  line-height: 1;
}

.testimonial-dot {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--color-warm-grey);
  opacity: 0.3;
  cursor: pointer;
  transition: all 0.3s ease;
  border: none;
  padding: 0;
}

.testimonial-dot.active {
  opacity: 1;
  background: var(--color-sunset);
  transform: scale(1.2);
}

/* ---- Particles (Join the Light section) ---- */
.particle {
  position: absolute;
  width: 4px;
  height: 4px;
  background: rgba(255, 255, 255, 0.3);
  border-radius: 50%;
  animation: float-up 6s infinite ease-in;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 5s; }
.particle:nth-child(2) { left: 25%; animation-delay: 1s; animation-duration: 7s; }
.particle:nth-child(3) { left: 40%; animation-delay: 2s; animation-duration: 6s; }
.particle:nth-child(4) { left: 55%; animation-delay: 0.5s; animation-duration: 8s; }
.particle:nth-child(5) { left: 70%; animation-delay: 1.5s; animation-duration: 5.5s; }
.particle:nth-child(6) { left: 85%; animation-delay: 3s; animation-duration: 6.5s; }
.particle:nth-child(7) { left: 15%; animation-delay: 4s; animation-duration: 7.5s; }
.particle:nth-child(8) { left: 60%; animation-delay: 2.5s; animation-duration: 5s; }

/* ---- Button Shine Effect ---- */
.btn-shine {
  position: relative;
  overflow: hidden;
}

.btn-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(255, 255, 255, 0.15) 50%,
    transparent 100%
  );
  transform: rotate(30deg) translateX(-100%);
  transition: transform 0.6s ease;
}

.btn-shine:hover::after {
  transform: rotate(30deg) translateX(100%);
}

/* ---- Placeholder book covers ---- */
.book-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, var(--color-cream), var(--color-lamp-gold));
  font-family: 'Baloo Thambi 2', cursive;
  font-weight: 700;
  color: var(--color-charcoal);
  text-align: center;
  padding: 1rem;
  font-size: 1rem;
  line-height: 1.3;
}

.book-placeholder[data-level="1"] {
  background: linear-gradient(135deg, #fce4ec, var(--color-level-1));
}

.book-placeholder[data-level="2"] {
  background: linear-gradient(135deg, #e1f5fe, var(--color-level-2));
}

.book-placeholder[data-level="3"] {
  background: linear-gradient(135deg, #e8f5e9, var(--color-level-3));
}

.book-placeholder[data-level="4"] {
  background: linear-gradient(135deg, #ede7f6, var(--color-level-4));
}

/* ---- Video placeholder ---- */
.video-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(135deg, #f5f5f5, #e0e0e0);
}

/* ---- Scrollbar ---- */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--color-cream);
}

::-webkit-scrollbar-thumb {
  background: var(--color-warm-grey);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--color-sunset);
}

/* ---- Responsive Adjustments ---- */
@media (max-width: 640px) {
  #hero .hero-logo-entrance {
    height: 80px;
  }
}

/* ---- Reduced Motion ---- */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  .particle {
    animation: none;
  }

  .btn-shine::after {
    display: none;
  }

  #hero-video {
    display: none;
  }

  .book-card {
    transition: none;
  }
}

/* ---- GLightbox overrides ---- */
.gslide-media {
  max-width: 900px;
}
