:root {
  --bg: #120a0e;
  --bg-card: #241620;
  --text: #f4ece1;
  --text-dim: #b9a99a;
  --gold: #d4a857;
  --burgundy: #7a1f3d;
  --burgundy-light: #a8294f;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}

a { color: inherit; }

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.2rem 1.5rem;
  border-bottom: 1px solid rgba(244, 236, 225, 0.08);
}

header a.back {
  text-decoration: none;
  color: var(--gold);
  font-weight: 600;
  font-size: 0.9rem;
  letter-spacing: 0.04em;
}

header .brand {
  font-family: 'Anton', 'Archivo Black', sans-serif;
  letter-spacing: 0.04em;
  font-size: 1.1rem;
}

h1.page-title {
  font-family: 'Anton', 'Archivo Black', sans-serif;
  text-align: center;
  font-size: clamp(1.8rem, 5vw, 3rem);
  margin: 2rem 1rem 0.4rem;
  letter-spacing: 0.02em;
}

p.page-subtitle {
  text-align: center;
  color: var(--text-dim);
  margin: 0 0 2rem;
}

.events-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(260px, 1fr));
  gap: 18px;
  padding: 0 1.5rem 3rem;
  max-width: 1200px;
  margin: 0 auto;
}

.event-card {
  position: relative;
  display: block;
  border-radius: 14px;
  overflow: hidden;
  aspect-ratio: 4 / 5;
  text-decoration: none;
  background: var(--bg-card);
  transition: transform 0.25s ease, box-shadow 0.25s ease;
  box-shadow:
    0 0 0 1px color-mix(in srgb, var(--burgundy-light) 35%, transparent),
    0 6px 24px rgba(0, 0, 0, 0.5);
}

/* No JS tilt effect on this page, so the lift can just be a normal CSS
   :hover transform — gated to real hover-capable pointers and
   non-reduced-motion so touch devices and reduced-motion visitors keep
   the resting rim + shadow with no hover effect layered on. */
@media (hover: hover) and (pointer: fine) and (prefers-reduced-motion: no-preference) {
  .event-card:hover {
    transform: translateY(-4px);
    box-shadow:
      0 0 0 1px color-mix(in srgb, var(--burgundy-light) 70%, transparent),
      0 0 28px color-mix(in srgb, var(--burgundy-light) 40%, transparent);
  }
}

.event-card img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.35s ease;
}

.event-card:hover img {
  transform: scale(1.06);
}

.event-card .overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(0,0,0,0) 40%, rgba(0,0,0,0.85) 100%);
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
  padding: 1rem;
}

.event-card .overlay .name {
  font-family: 'Anton', 'Archivo Black', sans-serif;
  font-size: 1.3rem;
  text-transform: uppercase;
}

.event-card .overlay .count {
  color: var(--text-dim);
  font-size: 0.85rem;
}

.gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 8px;
  padding: 0 8px 3rem;
  max-width: 1400px;
  margin: 0 auto;
}

.gallery figure {
  margin: 0;
  position: relative;
  aspect-ratio: 1 / 1;
  overflow: hidden;
  border-radius: 8px;
  background: var(--bg-card);
  cursor: pointer;
}

.gallery img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  opacity: 0;
  animation: fade-in 0.4s ease forwards;
}

.gallery img:hover { transform: scale(1.05); }

@keyframes fade-in { to { opacity: 1; } }

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.94);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 1000;
}

.lightbox[hidden] { display: none; }

.lightbox img {
  max-width: 92vw;
  max-height: 88vh;
  object-fit: contain;
  border-radius: 4px;
}

.lightbox-btn {
  position: absolute;
  background: rgba(255, 255, 255, 0.08);
  border: none;
  color: var(--text);
  font-size: 1.4rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  width: 48px;
  height: 48px;
  display: flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.lightbox-btn:hover { background: rgba(255, 255, 255, 0.18); }

.lightbox-close { top: 16px; right: 16px; font-size: 1.8rem; }
.lightbox-prev { left: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 16px; top: 50%; transform: translateY(-50%); }
.lightbox-download { bottom: 16px; right: 16px; }

@media (max-width: 600px) {
  .gallery {
    grid-template-columns: repeat(auto-fill, minmax(110px, 1fr));
    gap: 4px;
    padding: 0 4px 2rem;
  }
  .lightbox-btn { width: 40px; height: 40px; font-size: 1.1rem; }
}
