/* Adequate Apparel Gallery page
   Shared navigation, footer, page hero, and reveal behavior live in site.css. */

.gallery-hero {
  min-height: 540px;
}

.gallery-section {
  padding-block: clamp(76px, 9vw, 120px);
}

.gallery-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.55fr);
  gap: 32px 72px;
  align-items: end;
  margin-bottom: clamp(44px, 6vw, 72px);
}

.gallery-kicker {
  margin: 0 0 14px;
  color: var(--gold);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 3px;
  text-transform: uppercase;
}

.gallery-kicker-light {
  color: var(--gold-light);
}

.gallery-heading h2,
.gallery-social h2,
.gallery-cta h2 {
  margin: 0;
  font-family: "Bebas Neue", sans-serif;
  font-weight: 400;
  letter-spacing: 2px;
  line-height: 0.98;
}

.gallery-heading h2 {
  max-width: 720px;
  font-size: clamp(48px, 6vw, 78px);
}

.gallery-heading > p {
  margin: 0;
  color: var(--mid);
  font-size: 16px;
  line-height: 1.8;
}

.gallery-grid {
  display: grid;
  grid-auto-flow: dense;
  grid-auto-rows: 250px;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 18px;
}

.gallery-card {
  position: relative;
  overflow: hidden;
  min-width: 0;
  border-radius: 10px;
  background: var(--gray);
}

.gallery-card-featured,
.gallery-card-wide {
  grid-column: span 2;
}

.gallery-card-featured {
  grid-row: span 2;
}

.gallery-card-tall {
  grid-row: span 2;
}

.gallery-open {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
  background: transparent;
  padding: 0;
  color: inherit;
  cursor: zoom-in;
  text-align: left;
}

.gallery-open::after {
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(0, 0, 0, 0.78), rgba(0, 0, 0, 0.04) 56%);
  content: "";
  pointer-events: none;
}

.gallery-open img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform 0.45s ease, filter 0.45s ease;
}

.gallery-card:hover .gallery-open img,
.gallery-open:focus-visible img {
  transform: scale(1.035);
  filter: contrast(1.02);
}

.gallery-open:focus-visible {
  outline: 3px solid var(--gold-light);
  outline-offset: -4px;
}

.gallery-zoom {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 2;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  background: rgba(10, 10, 10, 0.58);
  color: var(--white);
  padding: 7px 12px;
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.2px;
  opacity: 0;
  text-transform: uppercase;
  transform: translateY(-5px);
  transition: opacity 0.2s ease, transform 0.2s ease;
}

.gallery-card:hover .gallery-zoom,
.gallery-open:focus-visible .gallery-zoom {
  opacity: 1;
  transform: translateY(0);
}

.gallery-card figcaption {
  position: absolute;
  right: 0;
  bottom: 0;
  left: 0;
  z-index: 2;
  padding: 22px;
  pointer-events: none;
}

.gallery-card figcaption strong {
  display: block;
  color: var(--white);
  font-size: 15px;
  font-weight: 700;
  line-height: 1.35;
}

.gallery-card figcaption span {
  display: block;
  margin-top: 5px;
  color: var(--gold-light);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 1.3px;
  text-transform: uppercase;
}

.gallery-social {
  background: var(--black);
  color: var(--white);
}

.gallery-social-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 36px;
  padding-block: clamp(64px, 8vw, 90px);
}

.gallery-social-inner > div {
  max-width: 680px;
}

.gallery-social h2 {
  font-size: clamp(44px, 6vw, 68px);
}

.gallery-social p:not(.gallery-kicker) {
  max-width: 620px;
  margin: 18px 0 0;
  color: rgba(255, 255, 255, 0.58);
  font-size: 15px;
  line-height: 1.75;
}

.gallery-social-link,
.gallery-button {
  display: inline-flex;
  min-height: 48px;
  align-items: center;
  justify-content: center;
  border: 1px solid transparent;
  border-radius: 4px;
  padding: 13px 25px;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 1.3px;
  text-decoration: none;
  text-transform: uppercase;
  transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.gallery-social-link {
  flex-shrink: 0;
  background: var(--gold);
  color: var(--black);
}

.gallery-social-link:hover,
.gallery-button:hover {
  transform: translateY(-2px);
}

.gallery-social-link:hover,
.gallery-button-gold:hover {
  background: var(--gold-light);
}

.gallery-cta {
  background: var(--gray);
}

.gallery-cta-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 36px 64px;
  align-items: center;
  padding-block: clamp(72px, 9vw, 110px);
}

.gallery-cta-inner > div:first-child {
  max-width: 760px;
}

.gallery-cta h2 {
  font-size: clamp(46px, 6vw, 72px);
}

.gallery-cta p:not(.gallery-kicker) {
  max-width: 650px;
  margin: 20px 0 0;
  color: var(--mid);
  font-size: 16px;
  line-height: 1.8;
}

.gallery-cta-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-end;
}

.gallery-button-gold {
  background: var(--gold);
  color: var(--black);
}

.gallery-button-dark {
  background: var(--black);
  color: var(--white);
}

.gallery-button-dark:hover {
  background: #222;
}

.gallery-lightbox {
  width: min(94vw, 1180px);
  max-width: none;
  height: min(92vh, 900px);
  max-height: none;
  overflow: hidden;
  border: 0;
  border-radius: 12px;
  background: #080808;
  color: var(--white);
  padding: 0;
}

.gallery-lightbox::backdrop {
  background: rgba(0, 0, 0, 0.88);
  backdrop-filter: blur(5px);
}

.lightbox-shell {
  position: relative;
  display: grid;
  width: 100%;
  height: 100%;
  grid-template-columns: 72px minmax(0, 1fr) 72px;
  align-items: center;
}

.lightbox-content {
  display: grid;
  min-width: 0;
  height: 100%;
  grid-template-rows: minmax(0, 1fr) auto;
  margin: 0;
  padding: 28px 0 22px;
}

.lightbox-content img {
  width: 100%;
  height: 100%;
  min-height: 0;
  object-fit: contain;
}

.lightbox-content figcaption {
  padding: 18px 12px 0;
  text-align: center;
}

.lightbox-content figcaption strong {
  display: block;
  font-size: 16px;
  line-height: 1.4;
}

.lightbox-content figcaption span {
  display: block;
  margin-top: 5px;
  color: var(--gold);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 1.4px;
  text-transform: uppercase;
}

.lightbox-close,
.lightbox-nav {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, 0.16);
  background: rgba(255, 255, 255, 0.06);
  color: var(--white);
  cursor: pointer;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.lightbox-close:hover,
.lightbox-nav:hover {
  border-color: rgba(201, 168, 76, 0.7);
  background: rgba(201, 168, 76, 0.16);
}

.lightbox-close:focus-visible,
.lightbox-nav:focus-visible {
  outline: 2px solid var(--gold-light);
  outline-offset: 3px;
}

.lightbox-close {
  position: absolute;
  top: 18px;
  right: 18px;
  z-index: 3;
  width: 42px;
  height: 42px;
  border-radius: 50%;
  font-size: 28px;
}

.lightbox-nav {
  width: 48px;
  height: 62px;
  justify-self: center;
  border-radius: 8px;
  font-size: 42px;
  line-height: 1;
}

body.has-lightbox-open {
  overflow: hidden;
}

@media (max-width: 980px) {
  .gallery-grid {
    grid-auto-rows: 230px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-card-featured,
  .gallery-card-wide {
    grid-column: span 2;
  }

  .gallery-heading,
  .gallery-cta-inner {
    grid-template-columns: 1fr;
    align-items: start;
  }

  .gallery-cta-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .gallery-hero {
    min-height: 500px;
  }

  .gallery-heading {
    gap: 20px;
  }

  .gallery-grid {
    grid-auto-flow: row;
    grid-auto-rows: auto;
    grid-template-columns: 1fr;
  }

  .gallery-card,
  .gallery-card-featured,
  .gallery-card-wide,
  .gallery-card-tall {
    grid-column: auto;
    grid-row: auto;
    min-height: 0;
    aspect-ratio: 4 / 4.6;
  }

  .gallery-card-featured,
  .gallery-card-wide {
    aspect-ratio: 4 / 3.3;
  }

  .gallery-zoom {
    opacity: 1;
    transform: none;
  }

  .gallery-social-inner {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-social-link,
  .gallery-button {
    width: 100%;
  }

  .gallery-cta-actions {
    display: grid;
    width: 100%;
    grid-template-columns: 1fr;
  }

  .gallery-lightbox {
    width: 100vw;
    height: 100dvh;
    border-radius: 0;
  }

  .lightbox-shell {
    grid-template-columns: 52px minmax(0, 1fr) 52px;
  }

  .lightbox-content {
    padding: 70px 0 20px;
  }

  .lightbox-nav {
    width: 40px;
    height: 54px;
    font-size: 34px;
  }

  .lightbox-close {
    top: 14px;
    right: 14px;
  }
}

@media (hover: none) {
  .gallery-card:hover .gallery-open img,
  .gallery-social-link:hover,
  .gallery-button:hover {
    transform: none;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-open img,
  .gallery-zoom,
  .gallery-social-link,
  .gallery-button {
    transition: none;
  }
}


/* Portfolio category filters and project captions */
.gallery-filter-shell {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px 30px;
  margin: -18px 0 30px;
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 18px 0;
}

.gallery-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.gallery-filter {
  min-height: 40px;
  border: 1px solid #d7d7d2;
  border-radius: 999px;
  background: var(--white);
  color: #525252;
  padding: 9px 15px;
  font: inherit;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 1px;
  text-transform: uppercase;
  cursor: pointer;
  transition:
    border-color 180ms ease,
    background 180ms ease,
    color 180ms ease,
    transform 180ms ease;
}

.gallery-filter:hover {
  border-color: var(--gold);
  color: var(--black);
  transform: translateY(-1px);
}

.gallery-filter.is-active {
  border-color: var(--black);
  background: var(--black);
  color: var(--white);
}

.gallery-filter:focus-visible {
  outline: 3px solid rgba(201, 168, 76, 0.42);
  outline-offset: 2px;
}

.gallery-result-count {
  flex-shrink: 0;
  margin: 0;
  color: var(--mid);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
}

.gallery-card[hidden] {
  display: none;
}

.gallery-card.is-filter-entering {
  animation: gallery-filter-enter 280ms ease both;
}

@keyframes gallery-filter-enter {
  from {
    opacity: 0;
    transform: translateY(10px) scale(0.985);
  }
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.gallery-open img {
  object-position: var(--gallery-position, 50% 50%);
}

.lightbox-content figcaption p {
  max-width: 660px;
  margin: 11px auto 0;
  color: rgba(255, 255, 255, 0.62);
  font-size: 12px;
  line-height: 1.65;
}

@media (max-width: 980px) {
  .gallery-filter-shell {
    align-items: flex-start;
    flex-direction: column;
  }

  .gallery-result-count {
    align-self: flex-start;
  }
}

@media (max-width: 620px) {
  .gallery-filter-shell {
    margin-top: -8px;
  }

  .gallery-filters {
    display: grid;
    width: 100%;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .gallery-filter {
    width: 100%;
    padding-inline: 9px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .gallery-filter,
  .gallery-card.is-filter-entering {
    animation: none;
    transition: none;
  }
}
