/* ============================================================
   YSF custom styles — everything Tailwind utilities can't express
   cleanly: scroll-reveal states, organic shapes, masonry, lightbox.
   ============================================================ */

html {
  scroll-behavior: smooth;
}

section[id] {
  scroll-margin-top: 5.5rem;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

body {
  font-family: "Inter", sans-serif;
}

h1,
h2,
h3,
h4,
.font-display {
  font-family: "Plus Jakarta Sans", sans-serif;
}

/* Consistent, visible focus ring for keyboard users across the site. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid #22a29d;
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Scroll reveal ---------- */

[data-reveal] {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.9s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}

[data-reveal].is-visible {
  opacity: 1;
  transform: translateY(0);
}

[data-reveal="fade"] {
  transform: none;
}

/* Stagger children of a revealed group without extra JS bookkeeping. */
[data-reveal-group] > * {
  transition-delay: calc(var(--reveal-index, 0) * 90ms);
}

/* ---------- Organic background shapes ---------- */

.blob {
  border-radius: 62% 38% 53% 47% / 48% 55% 45% 52%;
  filter: blur(0.5px);
}

.blob-soft {
  border-radius: 55% 45% 60% 40% / 40% 50% 50% 60%;
}

/* ---------- Masonry (gallery) ---------- */

.masonry {
  column-count: 1;
  column-gap: 1.25rem;
}

@media (min-width: 640px) {
  .masonry {
    column-count: 2;
  }
}

@media (min-width: 1024px) {
  .masonry {
    column-count: 3;
  }
}

@media (min-width: 1440px) {
  .masonry {
    column-count: 4;
  }
}

.masonry-item {
  break-inside: avoid;
  margin-bottom: 1.25rem;
}

/* ---------- Lightbox ---------- */

.lightbox-overlay {
  position: fixed;
  inset: 0;
  z-index: 60;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1.5rem;
  background: rgba(11, 33, 24, 0.92);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox-overlay.is-open {
  opacity: 1;
  pointer-events: auto;
}

.lightbox-overlay img {
  max-height: 88vh;
  max-width: min(92vw, 1100px);
  border-radius: 0.5rem;
  box-shadow: 0 30px 90px -20px rgba(0, 0, 0, 0.6);
}

/* ---------- Image hover zoom ---------- */

.zoom-frame {
  overflow: hidden;
}

.zoom-frame img {
  transition: transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.zoom-frame:hover img,
.zoom-frame:focus-within img {
  transform: scale(1.06);
}

/* ---------- Hero event-image slideshow ---------- */

.hero-slideshow {
  position: relative;
}

.hero-slide {
  position: absolute;
  inset: 0;
  height: 100%;
  width: 100%;
  object-fit: cover;
  opacity: 0;
  transition: opacity 1.4s ease;
}

.hero-slide.is-active {
  opacity: 1;
  animation: hero-ken-burns 6.5s ease-out forwards;
}

@keyframes hero-ken-burns {
  from {
    transform: scale(1.1);
  }
  to {
    transform: scale(1);
  }
}

/* ---------- Navbar transition ---------- */

#site-nav {
  transition: background-color 0.4s ease, box-shadow 0.4s ease,
    padding 0.4s ease;
}

/* ---------- Mobile menu ---------- */

#mobile-menu {
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.45s cubic-bezier(0.16, 1, 0.3, 1);
}

#mobile-menu.is-open {
  max-height: 32rem;
}

/* ---------- Loading skeleton shimmer (events/gallery) ---------- */

.skeleton {
  position: relative;
  overflow: hidden;
  background-color: #e5e7eb;
}

.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background-image: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0) 0,
    rgba(255, 255, 255, 0.55) 50%,
    rgba(255, 255, 255, 0) 100%
  );
  animation: shimmer 1.6s infinite;
}

@keyframes shimmer {
  100% {
    transform: translateX(100%);
  }
}

/* Skip link, hidden until focused */
.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: #183a2b;
  color: #fff;
  padding: 0.75rem 1.25rem;
  border-radius: 0 0 0.375rem 0;
}

.skip-link:focus {
  left: 0;
}
