/* ============ base ============ */
:root {
  --bg: #08080d;
  --bg-2: #0e0e16;
  --panel: #14141f;
  --text: #e9e9f2;
  --text-dim: #9a9ab0;
  --line: rgba(255, 255, 255, 0.08);
  --spectrum: linear-gradient(90deg,
      #ff3b6b, #ff9d3b, #ffe83b, #3bff8a, #3bc8ff, #7b5bff, #ff3bd4, #ff3b6b);
  --radius: 14px;
  --nav-h: 64px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  font-weight: 300;
  line-height: 1.6;
  overflow-x: hidden;
}

img { display: block; max-width: 100%; }

@keyframes spectrum-pan {
  0%   { background-position: 0% 50%; }
  100% { background-position: 200% 50%; }
}

/* ============ nav ============ */
.nav {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--nav-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 clamp(16px, 4vw, 48px);
  background: rgba(8, 8, 13, 0.55);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
  z-index: 100;
}

.nav-brand {
  font-family: "Cinzel", serif;
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text);
  text-decoration: none;
}

.nav-brand .spectrum-dot {
  font-family: "Kaushan Script", "Brush Script MT", cursive;
  font-weight: 400;
  font-size: 1.2em;
  letter-spacing: 0.02em;
}

.spectrum-dot {
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.nav-links { display: flex; gap: clamp(14px, 3vw, 36px); }

.nav-links a {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  font-weight: 400;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 6px 2px;
  position: relative;
  transition: color 0.25s;
}

.nav-links a::after {
  content: "";
  position: absolute;
  left: 0; right: 100%; bottom: 0;
  height: 2px;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  transition: right 0.3s ease;
}

.nav-links a:hover, .nav-links a.current { color: var(--text); }
.nav-links a:hover::after, .nav-links a.current::after { right: 0; }

/* pages without a hero start below the fixed nav */
.page-main { padding-top: var(--nav-h); }

/* animated canvas backdrop (gallery page) */
.fx-orbitals {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100vw;
  height: 100vh;
  opacity: 0.55;
  pointer-events: none;
}

/* ============ hero ============ */
.hero {
  position: relative;
  height: 100svh;
  min-height: 560px;
  display: grid;
  place-items: center;
  overflow: hidden;
}

.hero-slides, .hero-slides .slide {
  position: absolute;
  inset: 0;
}

.hero-slides .slide {
  background-size: cover;
  background-position: center;
  opacity: 0;
  transition: opacity 1.6s ease;
  transform: scale(1.06);
}

.hero-slides .slide.active {
  opacity: 1;
  animation: kenburns 9s ease-out forwards;
}

@keyframes kenburns {
  from { transform: scale(1.12); }
  to   { transform: scale(1.0); }
}

.hero-veil {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse at center, rgba(8, 8, 13, 0.25) 0%, rgba(8, 8, 13, 0.72) 100%),
    linear-gradient(to top, var(--bg) 0%, transparent 28%);
}

.hero-content {
  position: relative;
  z-index: 2;
  text-align: center;
  padding: 0 20px;
  max-width: 900px;
}

.hero-kicker {
  font-size: 0.9rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.92);
  text-shadow: 0 1px 4px rgba(0, 0, 0, 0.9), 0 0 18px rgba(0, 0, 0, 0.7);
  margin-bottom: 18px;
}

.hero-title {
  font-family: "Cinzel", serif;
  font-size: clamp(2.4rem, 7vw, 4.8rem);
  font-weight: 700;
  line-height: 1.12;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 10s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  filter: drop-shadow(0 2px 24px rgba(0, 0, 0, 0.6));
}

.hero-actions {
  margin-top: 36px;
  display: flex;
  gap: 16px;
  justify-content: center;
  flex-wrap: wrap;
}

.btn {
  display: inline-block;
  padding: 13px 30px;
  border-radius: 999px;
  font-size: 0.92rem;
  font-weight: 500;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  text-decoration: none;
  transition: transform 0.25s, box-shadow 0.25s;
}

.btn:hover { transform: translateY(-2px); }

.btn-spectrum {
  color: #0a0a10;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  box-shadow: 0 4px 30px rgba(123, 91, 255, 0.35);
}

.btn-spectrum:hover { box-shadow: 0 6px 40px rgba(255, 59, 107, 0.45); }

.btn-ghost {
  color: var(--text);
  border: 1px solid rgba(255, 255, 255, 0.25);
  background: rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(6px);
}

.btn-ghost:hover { border-color: rgba(255, 255, 255, 0.55); }

.hero-progress {
  position: absolute;
  left: 0; bottom: 0;
  height: 3px;
  width: 100%;
  transform-origin: left;
  transform: scaleX(0);
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  z-index: 3;
}

.hero-progress.running {
  transition: transform linear;
}

.hero-dots {
  position: absolute;
  bottom: 26px;
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  gap: 10px;
  z-index: 3;
}

.hero-dots button {
  width: 9px; height: 9px;
  border-radius: 50%;
  border: none;
  background: rgba(255, 255, 255, 0.3);
  cursor: pointer;
  transition: background 0.3s, transform 0.3s;
}

.hero-dots button.active {
  background: #fff;
  transform: scale(1.3);
}

/* ============ sections ============ */
.section {
  max-width: 1500px;
  margin: 0 auto;
  padding: clamp(60px, 9vw, 110px) clamp(16px, 4vw, 48px);
  scroll-margin-top: var(--nav-h);
}

.section-head { margin-bottom: 42px; }

.section-head h2 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.7rem, 4vw, 2.5rem);
  font-weight: 700;
  display: inline-block;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 8s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.section-head p { color: var(--text-dim); margin-top: 6px; }

.section-head.row {
  display: flex;
  justify-content: space-between;
  align-items: flex-end;
  gap: 20px;
  flex-wrap: wrap;
}

.see-all {
  color: var(--text-dim);
  text-decoration: none;
  font-size: 0.92rem;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding-bottom: 4px;
  transition: color 0.25s;
}

.see-all:hover { color: var(--text); }

/* ============ masonry grid ============ */
.masonry {
  columns: 3 320px;
  column-gap: 16px;
}

.masonry .tile { margin-bottom: 16px; }

.tile {
  position: relative;
  border-radius: var(--radius);
  overflow: hidden;
  cursor: zoom-in;
  background: var(--panel);
  break-inside: avoid;
  isolation: isolate;
}

.tile img {
  width: 100%;
  height: auto;
  transition: transform 0.5s ease;
}

.tile::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: var(--radius);
  border: 1px solid transparent;
  background: linear-gradient(120deg, transparent 30%, rgba(255,255,255,0.06)) border-box;
  pointer-events: none;
  transition: box-shadow 0.35s, border-color 0.35s;
}

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

.tile:hover::after {
  border-color: rgba(255, 255, 255, 0.22);
  box-shadow: inset 0 -60px 60px -30px rgba(0, 0, 0, 0.55);
}

.tile .tile-date {
  position: absolute;
  left: 12px; bottom: 10px;
  font-size: 0.75rem;
  color: rgba(255, 255, 255, 0.85);
  text-shadow: 0 1px 6px rgba(0, 0, 0, 0.9);
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 0.3s, transform 0.3s;
  pointer-events: none;
}

.tile:hover .tile-date { opacity: 1; transform: none; }

/* ============ upcoming events ============ */
.up-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(280px, 100%), 1fr));
  gap: 16px;
}

.up-card {
  position: relative;
  display: flex;
  align-items: center;
  gap: 18px;
  padding: 20px 22px;
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 16px;
  overflow: hidden;
}

.up-card::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
}

.up-logo {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 12px;
  background: var(--panel);
  object-fit: contain;
  padding: 6px;
  box-sizing: border-box;
}

.up-logo-fallback {
  display: grid;
  place-items: center;
}

.up-logo-fallback span {
  font-family: "Cinzel", serif;
  font-size: 1.7rem;
  font-weight: 700;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 8s linear infinite;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.up-body h3 {
  font-family: "Cinzel", serif;
  font-size: 1.1rem;
  font-weight: 500;
  letter-spacing: 0.02em;
}

.up-body p {
  color: var(--text-dim);
  font-size: 0.88rem;
  margin-top: 4px;
}

/* ============ events ============ */
.event {
  margin-bottom: clamp(48px, 7vw, 80px);
  padding: clamp(18px, 3vw, 32px);
  background: var(--bg-2);
  border: 1px solid var(--line);
  border-radius: 20px;
  position: relative;
  overflow: hidden;
}

.event::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
}

.event-head {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 8px 20px;
  margin-bottom: 22px;
}

.event-head h3 {
  font-family: "Cinzel", serif;
  font-size: clamp(1.2rem, 2.6vw, 1.65rem);
  font-weight: 500;
  letter-spacing: 0.02em;
}

.event-meta {
  color: var(--text-dim);
  font-size: 0.88rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* --- event viewer: slideshow stage + thumbnail rail --- */
.event-viewer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) clamp(150px, 16vw, 220px);
  gap: 14px;
}

.ev-stage {
  position: relative;
  aspect-ratio: 16 / 9;
  border-radius: var(--radius);
  overflow: hidden;
  background: #000;
}

.ev-track {
  display: flex;
  height: 100%;
  transition: transform 0.65s cubic-bezier(0.55, 0, 0.15, 1);
}

.ev-slide {
  position: relative;
  flex: 0 0 100%;
  height: 100%;
  overflow: hidden;
  cursor: zoom-in;
}

.ev-img {
  position: relative;
  width: 100%; height: 100%;
  z-index: 1;
}

.ev-img.cover { object-fit: cover; }
.ev-img.contain { object-fit: contain; }

.ev-backdrop {
  position: absolute;
  inset: 0;
  width: 100%; height: 100%;
  object-fit: cover;
  filter: blur(28px) brightness(0.45) saturate(1.2);
  transform: scale(1.15);
}

.ev-arrow {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 2;
  width: 42px; height: 42px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.18);
  background: rgba(10, 10, 16, 0.55);
  backdrop-filter: blur(6px);
  color: var(--text);
  font-size: 1.6rem;
  padding-bottom: 3px;
  display: grid;
  place-items: center;
  cursor: pointer;
  opacity: 0;
  transition: opacity 0.3s, background 0.25s;
}

.ev-stage:hover .ev-arrow { opacity: 1; }
.ev-arrow:hover { background: rgba(255, 255, 255, 0.18); }
.ev-prev { left: 14px; }
.ev-next { right: 14px; }

.ev-counter {
  position: absolute;
  right: 14px; bottom: 12px;
  z-index: 2;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  color: rgba(255, 255, 255, 0.85);
  background: rgba(10, 10, 16, 0.55);
  backdrop-filter: blur(6px);
  padding: 4px 10px;
  border-radius: 999px;
}

.ev-thumbs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-auto-rows: max-content;
  gap: 8px;
  align-content: start;
  overflow-y: auto;
  max-height: 100%;
  scrollbar-width: thin;
  scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

/* keep the rail from growing past the stage */
.event-viewer { align-items: stretch; }
.ev-thumbs { height: 0; min-height: 100%; }

/* portrait variant: tall stage on the left, thumbs fill the rest */
.event-viewer.portrait { grid-template-columns: auto minmax(0, 1fr); }

.event-viewer.portrait .ev-stage {
  aspect-ratio: 3 / 4;
  height: clamp(420px, 72vh, 700px);
  width: auto;
}

.event-viewer.portrait .ev-thumbs {
  grid-template-columns: repeat(auto-fill, minmax(92px, 1fr));
}

.ev-thumb {
  position: relative;
  padding: 0;
  border: none;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  align-self: start;   /* keep height derived from aspect-ratio, never row-stretched */
  cursor: pointer;
  background: var(--panel);
  opacity: 0.55;
  transition: opacity 0.25s, transform 0.25s;
}

.ev-thumb img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.ev-thumb:hover { opacity: 0.85; }

.ev-thumb.active { opacity: 1; }

.ev-thumb.active::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 8px;
  border: 2px solid transparent;
  background: var(--spectrum) border-box;
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask-composite: exclude;
}

@media (max-width: 760px) {
  .event-viewer, .event-viewer.portrait { grid-template-columns: 1fr; }
  .event-viewer.portrait .ev-stage {
    width: 100%;
    height: auto;
    max-height: 80svh;
  }
  .ev-thumbs {
    height: auto;
    min-height: 0;
    display: flex;
    overflow-x: auto;
    overflow-y: hidden;
    padding-bottom: 4px;
  }
  .ev-thumb { flex: 0 0 72px; }
}

/* ============ footer ============ */
.footer {
  text-align: center;
  padding: 40px 20px 50px;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.spectrum-line {
  display: block;
  height: 1px;
  max-width: 720px;
  margin: 0 auto 28px;
  background: var(--spectrum);
  background-size: 200% 100%;
  animation: spectrum-pan 6s linear infinite;
  opacity: 0.6;
}

/* ============ lightbox ============ */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 200;
  display: grid;
  place-items: center;
  background: rgba(4, 4, 8, 0.94);
  backdrop-filter: blur(8px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s ease;
}

.lightbox.open { opacity: 1; pointer-events: auto; }

.lb-figure {
  max-width: min(94vw, 1800px);
  max-height: 92vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.lb-figure img {
  max-width: 100%;
  max-height: calc(92vh - 46px);
  object-fit: contain;
  border-radius: 8px;
  box-shadow: 0 10px 60px rgba(0, 0, 0, 0.8);
}

.lb-figure figcaption {
  color: var(--text-dim);
  font-size: 0.88rem;
  letter-spacing: 0.04em;
}

.lb-close, .lb-arrow {
  position: fixed;
  z-index: 210;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  color: var(--text);
  cursor: pointer;
  border-radius: 50%;
  display: grid;
  place-items: center;
  transition: background 0.25s, transform 0.25s;
  user-select: none;
}

.lb-close:hover, .lb-arrow:hover {
  background: rgba(255, 255, 255, 0.16);
  transform: scale(1.08);
}

.lb-close {
  top: 20px; right: 24px;
  width: 44px; height: 44px;
  font-size: 1.5rem;
  line-height: 1;
}

.lb-arrow {
  top: 50%;
  transform: translateY(-50%);
  width: 52px; height: 52px;
  font-size: 1.9rem;
  padding-bottom: 4px;
}

.lb-arrow:hover { transform: translateY(-50%) scale(1.08); }
.lb-prev { left: 22px; }
.lb-next { right: 22px; }

@media (max-width: 640px) {
  .lb-arrow { width: 42px; height: 42px; }
  .lb-prev { left: 8px; }
  .lb-next { right: 8px; }
}

/* ============ motion preferences ============ */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .hero-slides .slide.active { animation: none; transform: none; }
  .spectrum-dot, .hero-title, .section-head h2, .btn-spectrum,
  .hero-progress, .event::before, .spectrum-line, .nav-links a::after {
    animation: none;
  }
}
