/* Slim helper styles — page layout/design lives in Tailwind utility classes.
   This file only covers base type, scroll-reveal, and the JS-built gallery + lightbox. */

:root {
  --brand: #f97316; /* orange-500 */
  --brand-strong: #ea580c; /* orange-600 */
  --line: #e7e5e4; /* stone-200 */
  --panel: #fafaf9; /* stone-50 */
}

html {
  scroll-behavior: smooth;
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, -apple-system, "Segoe UI",
    Roboto, Helvetica, Arial, sans-serif;
}

.font-display {
  font-family: "Space Grotesk", "Inter", ui-sans-serif, system-ui, sans-serif;
}

::selection {
  background: var(--brand);
  color: #fff;
}

/* Sticky nav gains a hairline once the page is scrolled */
.nav-scrolled {
  border-bottom-color: var(--line) !important;
  background: rgba(255, 255, 255, 0.75);
  backdrop-filter: saturate(1.5) blur(14px);
  -webkit-backdrop-filter: saturate(1.5) blur(14px);
}

/* ---------- Scroll reveal ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
  transition: opacity 0.7s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.7s cubic-bezier(0.22, 1, 0.36, 1);
  transition-delay: var(--delay, 0ms);
  will-change: opacity, transform;
}
.reveal.in {
  opacity: 1;
  transform: none;
}

/* ---------- Gallery / carousel ---------- */
.gallery {
  position: relative;
  border-radius: 1.25rem;
  border: 1px solid var(--line);
  background: var(--panel);
  overflow: hidden;
  box-shadow: 0 22px 44px -30px rgba(28, 25, 23, 0.28);
}

.gallery__stage {
  position: relative;
  aspect-ratio: var(--stage-aspect, 16 / 10);
  background: var(--panel);
}

.gallery__img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  cursor: zoom-in;
}

.gallery__nav {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border-radius: 9999px;
  border: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.86);
  backdrop-filter: blur(8px);
  color: #292524;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.25s ease, background 0.2s ease, color 0.2s ease;
}
.gallery:hover .gallery__nav,
.gallery:focus-within .gallery__nav {
  opacity: 1;
}
.gallery__nav:hover {
  background: #fff;
  color: var(--brand-strong);
}
.gallery__nav.prev {
  left: 0.75rem;
}
.gallery__nav.next {
  right: 0.75rem;
}
.gallery__nav svg {
  width: 1.1rem;
  height: 1.1rem;
}

.gallery__bar {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  background: linear-gradient(0deg, rgba(28, 25, 23, 0.42), transparent);
}
.gallery__dots {
  display: flex;
  gap: 0.4rem;
}
.gallery__dot {
  width: 0.45rem;
  height: 0.45rem;
  padding: 0;
  border: none;
  border-radius: 9999px;
  background: rgba(255, 255, 255, 0.55);
  cursor: pointer;
  transition: background 0.2s ease, transform 0.2s ease;
}
.gallery__dot.active {
  background: #fff;
  transform: scale(1.3);
}
.gallery__count {
  margin-left: auto;
  color: rgba(255, 255, 255, 0.92);
  font-size: 0.75rem;
  font-weight: 600;
  font-variant-numeric: tabular-nums;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: none;
  place-items: center;
  padding: 5vmin;
  background: rgba(28, 25, 23, 0.8);
  backdrop-filter: blur(8px);
  opacity: 0;
  transition: opacity 0.25s ease;
}
.lightbox.open {
  display: grid;
  opacity: 1;
}
.lightbox img {
  max-width: 100%;
  max-height: 90vh;
  border-radius: 1rem;
  box-shadow: 0 30px 60px -20px rgba(0, 0, 0, 0.5);
}
.lightbox__close {
  position: absolute;
  top: 1.25rem;
  right: 1.25rem;
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 0.75rem;
  border: 1px solid rgba(255, 255, 255, 0.22);
  background: rgba(255, 255, 255, 0.1);
  color: #fff;
  cursor: pointer;
  transition: background 0.2s ease;
}
.lightbox__close:hover {
  background: rgba(255, 255, 255, 0.2);
}
.lightbox__close svg {
  width: 1.25rem;
  height: 1.25rem;
}

@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
  .reveal {
    opacity: 1;
    transform: none;
  }
}
