/* ============================================================
   Pramuka SMK Yanuris Tonjong — Custom Styles
   Melengkapi Tailwind CSS (via CDN).warna tema:
     Forest Green #2D5016 | Khaki #D4A574 | Brown #8B6F47
     Cream #F5F1E8       | Night   #1A1F12
   ============================================================ */

/* ---------- Variabel warna tema ---------- */
:root {
  --scout-forest: #2D5016;
  --scout-khaki: #D4A574;
  --scout-brown: #8B6F47;
  --scout-cream: #F5F1E8;
  --scout-night: #1A1F12;
}

/* ---------- Dasar ---------- */
html { scroll-behavior: smooth; }
body { font-family: 'Archivo', sans-serif; overflow-x: clip; }
.font-display { font-family: 'Bebas Neue', 'Archivo', sans-serif; letter-spacing: 0.02em; }

/* ---------- Scroll Reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s ease-out, transform 0.7s ease-out;
}
.reveal.visible { opacity: 1; transform: none; }

/* ---------- Hero Carousel ---------- */
.carousel-slide {
  position: absolute;
  inset: 0;
  opacity: 0;
  transition: opacity 0.9s ease-out;
}
.carousel-slide.active { opacity: 1; }
.carousel-slide img { width: 100%; height: 100%; object-fit: cover; }

/* ---------- Masonry Gallery ---------- */
.masonry { column-count: 1; column-gap: 1rem; }
@media (min-width: 640px)  { .masonry { column-count: 2; } }
@media (min-width: 1024px) { .masonry { column-count: 3; } }
.masonry-item { break-inside: avoid; margin-bottom: 1rem; }

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 60;
  display: none; align-items: center; justify-content: center;
  background: rgba(0, 0, 0, 0.92);
}
.lightbox.open { display: flex; }
.lightbox img {
  max-width: 90vw; max-height: 82vh; object-fit: contain;
  border-radius: 0.5rem; box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.lightbox-btn {
  position: absolute; top: 50%; transform: translateY(-50%);
  display: flex; align-items: center; justify-content: center;
  height: 3rem; width: 3rem; border-radius: 9999px;
  border: 1px solid rgba(255,255,255,0.3); color: #fff;
  background: rgba(0,0,0,0.3); transition: background 0.2s;
}
.lightbox-btn:hover { background: rgba(255,255,255,0.15); }
.lightbox-close { top: 1.25rem; right: 1.25rem; transform: none; }

/* ---------- Mobile menu ---------- */
.mobile-menu { max-height: 0; overflow: hidden; transition: max-height 0.3s ease-out; }
.mobile-menu.open { max-height: 420px; }

/* ---------- Nav active state ---------- */
.nav-link { transition: color 0.2s; }
.nav-link.active { color: var(--scout-khaki); }

/* ---------- Tombol taktil ---------- */
.btn-press:active { transform: scale(0.98); }

/* ---------- Honor reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
  html { scroll-behavior: auto; }
  .carousel-slide { transition: none; }
}
