:root {
  --bg: #0e0f12;
  --card: #17191f;
  --text: #f4f4f4;
  --muted: #b9beca;
  --line: rgba(255,255,255,.14);
  --yellow: #ffd500;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  min-height: 100%;
  background: radial-gradient(circle at top, #252935 0, var(--bg) 45%, #050507 100%);
  color: var(--text);
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

body { overflow-x: hidden; }

.page {
  width: min(1180px, calc(100vw - 28px));
  margin: 0 auto;
  padding: 28px 0 48px;
}

.hero {
  padding: 22px 4px 30px;
  text-align: center;
}

.kicker {
  margin: 0 0 8px;
  color: var(--yellow);
  letter-spacing: .18em;
  text-transform: uppercase;
  font-size: .78rem;
  font-weight: 700;
}

h1 {
  margin: 0;
  font-size: clamp(2rem, 7vw, 5.4rem);
  line-height: .92;
  letter-spacing: -0.05em;
}

.subtitle {
  margin: 18px auto 0;
  max-width: 680px;
  color: var(--muted);
  font-size: clamp(1rem, 2.4vw, 1.25rem);
}

.gallery {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 14px;
}

.tile {
  grid-column: span 4;
  position: relative;
  min-height: 220px;
  border: 1px solid var(--line);
  border-radius: 18px;
  overflow: hidden;
  background: var(--card);
  cursor: zoom-in;
  box-shadow: 0 18px 48px rgba(0,0,0,.28);
}

.tile.wide { grid-column: span 8; }
.tile.tall { grid-column: span 4; grid-row: span 2; }
.tile.big { grid-column: span 7; }

.tile img {
  width: 100%;
  height: 100%;
  min-height: inherit;
  display: block;
  object-fit: cover;
  transform: scale(1.01);
  transition: transform .35s ease, filter .35s ease;
}

.tile:hover img {
  transform: scale(1.055);
  filter: saturate(1.08) contrast(1.04);
}

.tile::after {
  content: attr(data-title);
  position: absolute;
  left: 12px;
  right: 12px;
  bottom: 12px;
  padding: 8px 10px;
  border-radius: 12px;
  color: white;
  background: linear-gradient(90deg, rgba(0,0,0,.62), rgba(0,0,0,.18));
  font-size: .9rem;
  opacity: .95;
}

.lightbox {
  position: fixed;
  inset: 0;
  z-index: 20;
  display: none;
  align-items: center;
  justify-content: center;
  padding: 22px;
  background: rgba(0,0,0,.92);
}

.lightbox.open { display: flex; }

.lightbox-figure {
  margin: 0;
  width: 100%;
  height: 100%;
  display: grid;
  place-items: center;
}

#lightboxImg {
  max-width: 100%;
  max-height: calc(100vh - 80px);
  object-fit: contain;
  border-radius: 12px;
  box-shadow: 0 0 60px rgba(0,0,0,.7);
}

#caption {
  position: fixed;
  left: 50%;
  bottom: 16px;
  transform: translateX(-50%);
  color: rgba(255,255,255,.86);
  font-size: .95rem;
  white-space: nowrap;
}

button {
  font: inherit;
}

.close, .nav {
  position: fixed;
  z-index: 25;
  border: 1px solid rgba(255,255,255,.25);
  color: white;
  background: rgba(20,20,24,.62);
  backdrop-filter: blur(10px);
  cursor: pointer;
}

.close {
  top: 18px;
  right: 18px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  font-size: 2rem;
  line-height: 1;
}

.nav {
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 72px;
  border-radius: 18px;
  font-size: 3rem;
  line-height: 1;
}

.prev { left: 18px; }
.next { right: 18px; }

.close:hover, .nav:hover { background: rgba(255,255,255,.18); }

.missing {
  display: grid;
  place-items: center;
  min-height: 220px;
  padding: 20px;
  text-align: center;
  color: var(--muted);
  background: repeating-linear-gradient(135deg, #17191f, #17191f 12px, #20232c 12px, #20232c 24px);
}

@media (max-width: 850px) {
  .gallery { grid-template-columns: 1fr; }
  .tile, .tile.wide, .tile.tall, .tile.big {
    grid-column: auto;
    grid-row: auto;
    min-height: 62vw;
  }
  .nav { width: 42px; height: 60px; font-size: 2.4rem; }
  .prev { left: 8px; }
  .next { right: 8px; }
  #caption { bottom: 10px; max-width: 90vw; overflow: hidden; text-overflow: ellipsis; }
}
