/* ==========================================================================
   Gallery page — styles specific to gallery.html.
   Depends on css/base.css, css/navbar.css, css/footer.css being loaded first.
   No exact Figma spec available for this page (API rate-limited) — built to
   match the reference screenshot and stay consistent with the rest of the
   site's design tokens (css/base.css).
   ========================================================================== */
.gl-hero {
  position: relative;
  min-height: 900px;
  display: flex;
  align-items: center;
  padding: 140px 0 48px;
  overflow: hidden;
  color: #FFF;
}

.gl-hero-media {
  position: absolute;
  inset: 0;
}

.gl-hero-media img,
.gl-hero-media video {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gl-hero-media::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, #0B1326 0%, rgba(11, 19, 38, 0.6) 45%, rgba(11, 19, 38, 0.2) 100%);
}

.gl-hero-content {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 20px;
}

.gl-hero-title {
  font-size: clamp(2.25rem, 6vw, 3.75rem);
  letter-spacing: -0.03em;
  line-height: 1.05;
}

.gl-hero-title span {
  display: block;
  color: #FFF;
}

.gl-hero-title .gradient-text {
  background: linear-gradient(131deg, var(--color-accent-cyan-light) 0%, #00D1FF 100%);
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
}

.gl-hero-desc {
  max-width: 42rem;
  color: #CBD5E1;
  font-size: 1.05rem;
  line-height: 1.6;
}

.gl-filterbar {
  border-bottom: 1px solid var(--color-border);
}

.gl-filterbar-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding-block: 20px;
}

.gl-filters {
  display: flex;
  flex-wrap: wrap;
  gap: 32px;
}

.gl-filters a {
  display: inline-block;
  padding-bottom: 16px;
  margin-bottom: -21px;
  border-bottom: 2px solid transparent;
  font-size: 0.85rem;
  font-weight: 600;
  color: var(--color-primary);
}

.gl-filters a.is-active {
  color: var(--color-ink);
  font-weight: 700;
  border-color: var(--color-ink);
}

.gl-filter-count {
  flex-shrink: 0;
  color: var(--color-muted);
  font-size: 0.8rem;
}

.gl-grid-section {
  padding-block: 56px;
}

/* fixed-size tiles: two equal columns, every tile locked to the same aspect
   ratio, and the photo is cropped (object-fit: cover) to fill it - so no tile
   is ever taller or wider than its neighbours, whatever the source image size */
.gl-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.gl-grid-item {
  border-radius: 0;
  overflow: hidden;
  position: relative;
  aspect-ratio: 16 / 9;
}

.gl-grid-item a {
  display: block;
  position: absolute;
  inset: 0;
}

.gl-grid-item-body {
  padding: 20px;
  color: white;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 2;
  background: rgba(34, 37, 42, 0.5);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gl-grid-item-meta {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  margin-bottom: 12px;
}

.gl-grid-item-category {
  font-size: 0.7rem;
  text-transform: uppercase;
  color: #8E959E;
  font-weight: 600;
  letter-spacing: 0.05em;
}

.gl-grid-item-meta svg {
  color: #8E959E;
}

.gl-grid-item-body h3 {
  margin: 0;
  font-size: 20px;
  color: #FFF;
  font-weight: 700;
  line-height: 22.5px;
  letter-spacing: 0px;
  /* tile height is locked, so cap long titles instead of letting the caption
     grow over the photo */
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  line-clamp: 2;
  overflow: hidden;
}

.gl-grid-item-icon {
  width: 18px;
  height: 18px;
  fill: none;
  stroke: currentColor;
  stroke-width: 2px;
  stroke-linecap: round;
  stroke-linejoin: round;
  margin-left: auto;
}

.gl-grid-item img {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.gl-grid-item.is-hidden {
  display: none;
}

.gl-featured {
  position: relative;
  background: var(--color-ink);
  padding-block: 96px;
  overflow: hidden;
}

.gl-featured-watermark {
  position: absolute;
  top: 50%;
  left: 48px;
  transform: translateY(-50%);
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 9rem;
  letter-spacing: -0.03em;
  color: rgba(255, 255, 255, 0.04);
  white-space: nowrap;
}

.gl-featured-grid {
  position: relative;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 64px;
  align-items: center;
}

.gl-featured-text h2 {
  color: #FFF;
  font-size: clamp(1.75rem, 4vw, 2.5rem);
  letter-spacing: -0.03em;
  margin: 16px 0 24px;
}

.gl-featured-text p {
  color: #BBC9CF;
  font-size: 1rem;
  line-height: 1.6;
  margin-bottom: 16px;
}

.gl-featured-stats {
  display: flex;
  gap: 48px;
  margin-top: 32px;
  padding-top: 24px;
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.gl-stat-label {
  display: block;
  color: var(--color-accent-cyan-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: 6px;
}

.gl-featured-stat strong {
  font-family: var(--font-heading);
  color: #FFF;
  font-size: 1.75rem;
}

.gl-featured-media .media-frame {
  position: relative;
  aspect-ratio: 1 / 1;
}

.gl-featured-coord {
  position: absolute;
  top: 16px;
  left: 16px;
  background: rgba(11, 19, 38, 0.6);
  backdrop-filter: blur(6px);
  color: var(--color-accent-cyan-light);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  padding: 6px 12px;
}

/* ---------- responsive ---------- */
@media (max-width: 1024px) {
  .gl-featured-grid {
    grid-template-columns: 1fr;
    gap: 40px;
  }
}

@media (max-width: 768px) {
  .gl-hero {
    padding: 120px 0 48px;
    min-height: 700px;
  }

  .gl-grid {
    grid-template-columns: 1fr;
  }

  .gl-featured-watermark {
    display: none;
  }

  .gl-filterbar-inner {
    flex-direction: column;
    align-items: flex-start;
    gap: 12px;
  }

  /* the padding-bottom/-21px margin pair is a hit-area trick that only
     matters in the desktop row layout; stacked in a column it just adds
     dead space before the count text below, so drop both here. */
  .gl-filters a {
    padding-bottom: 0;
    margin-bottom: 0;
  }
}
