:root {
  --bg: #14171c;
  --bg-elevated: #1c2028;
  --text: #f0f1f3;
  --text-muted: #9aa1ac;
  --accent: #e08a2c;
  --accent-hover: #f2a13e;
  --border: #2a2f38;
  --radius: 10px;
  --max-width: 1200px;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--bg);
  color: var(--text);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

.site-header {
  text-align: center;
  padding: 48px 16px 24px;
}
.site-header .logo {
  width: 100%;
  max-width: 260px;
  height: auto;
  margin: 0 0 12px;
}

@media (max-width: 600px) {
  .site-header { padding: 32px 16px 16px; }
  .site-header .logo { max-width: 180px; }
}
.subtitle {
  margin: 0;
  color: var(--text-muted);
  font-size: 1.05rem;
}

.event-nav {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: center;
}
.event-nav a {
  color: var(--text);
  background: var(--bg-elevated);
  border: 1px solid var(--border);
  padding: 8px 16px;
  border-radius: 999px;
  text-decoration: none;
  font-size: 0.9rem;
  transition: background 0.15s, border-color 0.15s;
}
.event-nav a:hover {
  border-color: var(--accent);
  color: var(--accent);
}

main#gallery {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px 64px;
}

.loading, .empty {
  text-align: center;
  color: var(--text-muted);
  padding: 64px 0;
}

.event-section {
  margin-bottom: 56px;
  scroll-margin-top: 16px;
}
.event-section h2 {
  font-size: 1.5rem;
  border-bottom: 1px solid var(--border);
  padding-bottom: 10px;
  margin-bottom: 18px;
}

.event-toggle {
  all: unset;
  display: flex;
  align-items: center;
  gap: 10px;
  cursor: pointer;
  width: 100%;
}
.event-toggle .chevron {
  display: inline-block;
  transition: transform 0.2s ease;
  color: var(--accent);
  font-size: 0.85em;
}
.event-section.collapsed .event-toggle .chevron {
  transform: rotate(-90deg);
}
.event-section.collapsed h2 {
  border-bottom-color: transparent;
  margin-bottom: 0;
}
.event-section.collapsed .photo-grid {
  display: none;
}

.photo-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
  gap: 10px;
}
.photo-grid button {
  all: unset;
  cursor: pointer;
  aspect-ratio: 1 / 1;
  border-radius: var(--radius);
  overflow: hidden;
  background: var(--bg-elevated);
  display: block;
}
.photo-grid img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
  transition: transform 0.2s ease;
}
.photo-grid button:hover img {
  transform: scale(1.06);
}

.site-footer {
  text-align: center;
  color: var(--text-muted);
  font-size: 0.85rem;
  padding: 24px 16px 48px;
}

.lightbox {
  position: fixed;
  inset: 0;
  background: rgba(6, 7, 9, 0.96);
  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: 6px;
  box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}

.lightbox-close, .lightbox-prev, .lightbox-next {
  all: unset;
  position: absolute;
  cursor: pointer;
  color: #fff;
  font-size: 2rem;
  padding: 12px 18px;
  border-radius: 8px;
  user-select: none;
}
.lightbox-close:hover, .lightbox-prev:hover, .lightbox-next:hover {
  background: rgba(255,255,255,0.1);
}
.lightbox-close { top: 12px; right: 16px; font-size: 2.2rem; }
.lightbox-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.lightbox-next { right: 8px; top: 50%; transform: translateY(-50%); }

.lightbox-counter {
  position: absolute;
  bottom: 18px;
  left: 50%;
  transform: translateX(-50%);
  color: var(--text-muted);
  font-size: 0.9rem;
  margin: 0;
}

@media (max-width: 600px) {
  .lightbox-prev, .lightbox-next { font-size: 1.4rem; padding: 10px 12px; }
}

.back-to-top {
  all: unset;
  position: fixed;
  right: 20px;
  bottom: 24px;
  width: 46px;
  height: 46px;
  border-radius: 50%;
  background: var(--accent);
  color: #1a1a1a;
  font-size: 1.3rem;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  box-shadow: 0 4px 14px rgba(0,0,0,0.35);
  transition: background 0.15s, transform 0.15s;
  z-index: 500;
}
.back-to-top:hover {
  background: var(--accent-hover);
  transform: translateY(-2px);
}
.back-to-top[hidden] { display: none; }

.footer-links { margin: 6px 0 0; }
.footer-links a, .legal a { color: var(--text-muted); text-decoration: underline; }
.footer-links a:hover, .legal a:hover { color: var(--accent); }

.legal {
  max-width: 720px;
  margin: 0 auto;
  padding: 24px 16px 48px;
  line-height: 1.6;
}
.legal h1 { font-size: 1.8rem; margin: 0 0 20px; }
.legal h2 { font-size: 1.2rem; margin: 28px 0 8px; color: var(--accent); }
.legal p, .legal li { color: var(--text); }
.legal ul { padding-left: 20px; }
.legal .back { display: inline-block; margin-bottom: 20px; }
