/* Gallery-specific additions on top of specifications.css tokens */

/* Lighter hero treatment so the first photo reads clearly, and nudge
   the title block down a touch now that the eyebrow label is gone. */
.spec-hero::after {
  background: linear-gradient(180deg, rgba(10,13,20,0.04) 0%, rgba(10,13,20,0.20) 50%, rgba(10,13,20,0.72) 100%);
}

.spec-hero-content {
  padding-bottom: 40px;
}

.spec-hero {
  min-height: 100vh;
  min-height: 100dvh;
}

@media (min-width: 641px) {
  .spec-hero {
    min-height: calc(100vh + 384px);
    min-height: calc(100dvh + 384px);
  }
}

/* ---------- Photo grid ---------- */
.photo-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: 220px;
  gap: 18px;
  margin-top: 40px;
}

.photo-tile {
  position: relative;
  overflow: hidden;
  border-radius: 6px;
  border: 1px solid var(--line);
  cursor: pointer;
  background: var(--bg-panel);
}

.photo-tile img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center center;
  transition: transform 0.5s ease;
  display: block;
}

.tile-c img {
  object-position: center 88%;
}

.photo-tile:hover img {
  transform: scale(1.045);
}

.photo-tile::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(8,11,18,0) 55%, rgba(8,11,18,0.75) 100%);
  opacity: 0;
  transition: opacity 0.3s ease;
}

.photo-tile:hover::after {
  opacity: 1;
}

.photo-caption {
  position: absolute;
  left: 18px;
  right: 18px;
  bottom: 14px;
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--ink);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s ease, transform 0.3s ease;
  z-index: 2;
}

.photo-tile:hover .photo-caption {
  opacity: 1;
  transform: translateY(0);
}

.photo-expand {
  position: absolute;
  top: 14px;
  right: 14px;
  width: 30px;
  height: 30px;
  border-radius: 50%;
  background: rgba(8, 11, 18, 0.55);
  border: 1px solid rgba(245, 246, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transition: opacity 0.3s ease;
  z-index: 2;
}

.photo-tile:hover .photo-expand {
  opacity: 1;
}

.photo-expand svg {
  width: 13px;
  height: 13px;
  color: var(--ink);
}

/* Tile spans — creates an editorial, non-uniform grid */
.tile-a { grid-column: span 3; grid-row: span 2; }
.tile-b { grid-column: span 3; grid-row: span 1; }
.tile-c { grid-column: span 3; grid-row: span 1; }
.tile-d { grid-column: span 6; grid-row: span 2; }

/* ---------- Video grid ---------- */
.video-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 28px;
  margin-top: 40px;
}

.video-card {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 6px;
  overflow: hidden;
}

.video-frame {
  position: relative;
  aspect-ratio: 16 / 10;
  background: #000;
}

.video-frame video {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.video-body {
  padding: 20px 24px 26px;
}

.video-index {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.2em;
  color: var(--red);
  margin-bottom: 8px;
}

.video-body h3 {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin-bottom: 8px;
}

.video-body p {
  font-size: 13.5px;
  line-height: 1.6;
  color: var(--ink-dim);
  font-weight: 300;
}

/* ---------- Lightbox ---------- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 100;
  background: rgba(6, 8, 13, 0.94);
  display: none;
  align-items: center;
  justify-content: center;
  padding: 60px 24px;
  backdrop-filter: blur(6px);
}

.lightbox.open {
  display: flex;
}

.lightbox img {
  max-width: min(1100px, 92vw);
  max-height: 82vh;
  width: auto;
  height: auto;
  border-radius: 4px;
  box-shadow: 0 30px 80px rgba(0,0,0,0.5);
}

.lightbox-caption {
  position: absolute;
  bottom: 34px;
  left: 0;
  right: 0;
  text-align: center;
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--ink-dim);
}

.lightbox-close {
  position: absolute;
  top: calc(24px + env(safe-area-inset-top));
  right: calc(24px + env(safe-area-inset-right));
  width: 42px;
  height: 42px;
  border-radius: 50%;
  background: rgba(245, 246, 248, 0.08);
  border: 1px solid rgba(245, 246, 248, 0.25);
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  transition: background 0.2s ease;
}

.lightbox-close:hover {
  background: rgba(245, 246, 248, 0.16);
}

.lightbox-close svg {
  width: 16px;
  height: 16px;
  color: var(--ink);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .video-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px) {
  .photo-grid {
    grid-template-columns: repeat(2, 1fr);
    grid-auto-rows: 160px;
    gap: 12px;
  }

  .tile-a, .tile-b, .tile-c, .tile-d {
    grid-column: span 2;
    grid-row: span 1;
  }

  .tile-a { grid-row: span 2; }

  .photo-caption,
  .photo-expand {
    opacity: 1;
    transform: none;
  }

  .photo-tile::after {
    opacity: 1;
    background: linear-gradient(180deg, rgba(8,11,18,0) 65%, rgba(8,11,18,0.7) 100%);
  }
}
