/* ============================================================================
   A&R Chariots — behaviour styles
   Everything here backs the vanilla JS in site.js. Layout and colour still come
   from assets/app.css (the compiled Tailwind build); these rules only cover the
   interactive pieces that used to live in React components.
   ========================================================================== */

[hidden] {
  display: none !important;
}

.inline-block {
  display: inline-block;
}

html {
  scroll-behavior: smooth;
  /* clear the fixed header when jumping to an anchor */
  scroll-padding-top: 96px;
}

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

/* ---------------------------------------------------------------- header --- */

#site-header {
  transition: background-color 0.45s ease, backdrop-filter 0.45s ease,
    box-shadow 0.45s ease, padding 0.45s ease;
}

#site-header.is-scrolled {
  background-color: rgba(15, 12, 6, 0.92);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  box-shadow: 0 1px 0 rgba(201, 168, 76, 0.16), 0 12px 40px rgba(0, 0, 0, 0.35);
}

/* --------------------------------------------------------- mobile menu --- */

.mobile-menu {
  background-color: rgba(15, 12, 6, 0.97);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-top: 1px solid rgba(201, 168, 76, 0.18);
  overflow: hidden;
  max-height: 0;
  transition: max-height 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

.mobile-menu.is-open {
  max-height: 70vh;
}

.mobile-menu__inner {
  display: flex;
  flex-direction: column;
  gap: 0.25rem;
  padding: 1.25rem 1.5rem 2rem;
}

.mobile-menu__inner a {
  font-family: Montserrat, sans-serif;
  font-size: 12px;
  font-weight: 300;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  padding: 0.85rem 0;
  border-bottom: 1px solid rgba(255, 255, 255, 0.07);
  transition: color 0.3s ease;
}

.mobile-menu__inner a:hover,
.mobile-menu__inner a:focus-visible {
  color: #c9a84c;
}

.mobile-menu__cta {
  margin-top: 1.25rem;
  text-align: center;
  border: 1px solid #c9a84c !important;
  color: #c9a84c !important;
  font-size: 10px !important;
  letter-spacing: 0.3em !important;
  padding: 0.9rem 1.5rem !important;
  transition: background-color 0.3s ease, color 0.3s ease !important;
}

.mobile-menu__cta:hover,
.mobile-menu__cta:focus-visible {
  background-color: #c9a84c;
  color: #1a1208 !important;
}

@media (min-width: 1024px) {
  .mobile-menu {
    display: none !important;
  }
}

/* ------------------------------------------------------- scroll reveals --- */
/* Progressive enhancement: without JS the .js class is never set, so nothing is
   ever hidden. This replaces the framer-motion entrance animations. */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(26px);
  transition: opacity 0.85s cubic-bezier(0.22, 1, 0.36, 1),
    transform 0.85s cubic-bezier(0.22, 1, 0.36, 1);
  will-change: opacity, transform;
}

html.js [data-reveal].is-visible {
  opacity: 1;
  transform: none;
}

@media (prefers-reduced-motion: reduce) {
  html.js [data-reveal] {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ----------------------------------------------------------- scroll cue --- */

.scroll-cue-icon {
  animation: cue-bounce 2.4s ease-in-out infinite;
}

@keyframes cue-bounce {
  0%,
  100% {
    transform: translateY(0);
  }
  50% {
    transform: translateY(6px);
  }
}

/* ------------------------------------------------- collection card links --- */

[data-scroll] {
  outline-offset: 3px;
}

[data-scroll]:focus-visible,
#gallery-grid [data-lightbox]:focus-visible {
  outline: 2px solid #c9a84c;
}

#gallery-grid [data-lightbox] {
  cursor: zoom-in;
}

/* ------------------------------------------------------------- lightbox --- */

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(0.5rem, 2vw, 2rem);
  padding: clamp(1rem, 4vw, 3rem);
  background: rgba(10, 8, 4, 0.95);
  -webkit-backdrop-filter: blur(6px);
  backdrop-filter: blur(6px);
  opacity: 0;
  transition: opacity 0.35s ease;
}

.lightbox.is-open {
  opacity: 1;
}

.lightbox__figure {
  margin: 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1.1rem;
  max-width: min(1100px, 100%);
  max-height: 100%;
}

.lightbox__img {
  max-width: 100%;
  max-height: 78vh;
  object-fit: contain;
  border: 1px solid rgba(201, 168, 76, 0.25);
}

.lightbox__caption {
  font-family: Montserrat, sans-serif;
  font-size: 10px;
  font-weight: 300;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.5);
  text-align: center;
}

.lightbox__close,
.lightbox__nav {
  background: none;
  border: 1px solid rgba(255, 255, 255, 0.18);
  color: rgba(255, 255, 255, 0.7);
  cursor: pointer;
  line-height: 1;
  transition: color 0.3s ease, border-color 0.3s ease;
}

.lightbox__close:hover,
.lightbox__nav:hover {
  color: #c9a84c;
  border-color: #c9a84c;
}

.lightbox__close {
  position: absolute;
  top: clamp(1rem, 3vw, 2rem);
  right: clamp(1rem, 3vw, 2rem);
  width: 44px;
  height: 44px;
  font-size: 26px;
}

.lightbox__nav {
  flex: 0 0 auto;
  width: 48px;
  height: 48px;
  font-size: 30px;
}

@media (max-width: 640px) {
  .lightbox__nav {
    position: absolute;
    bottom: clamp(1rem, 5vw, 2rem);
  }
  .lightbox__nav--prev {
    left: 1rem;
  }
  .lightbox__nav--next {
    right: 1rem;
  }
}

body.is-locked {
  overflow: hidden;
}
