/* ============================================================
   PAST EVENTS — SG Digital Cards
   Aesthetic: Dark luxury editorial / archival
   ============================================================ */


/* ── GRAIN OVERLAY ─────────────────────────────────────────── */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 0;
  opacity: 0.6;
}

/* ── HERO ──────────────────────────────────────────────────── */
.pe-hero {
  position: relative;
  padding: 180px 0 100px;
  text-align: center;
  overflow: hidden;
}

.pe-hero::before {
  content: 'ARCHIVE';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-family: var(--font-display);
  font-size: clamp(6rem, 20vw, 18rem);
  font-weight: 300;
  letter-spacing: 0.3em;
  color: rgba(168, 85, 247, 0.04);
  white-space: nowrap;
  pointer-events: none;
  user-select: none;
  z-index: 0;
}

.pe-hero__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 32px;
  position: relative;
  z-index: 1;
}

.pe-hero__eyebrow::before,
.pe-hero__eyebrow::after {
  content: '';
  width: 40px;
  height: 1px;
  background: var(--gold);
  opacity: 0.5;
}

.pe-hero__title {
  font-family: 'Syne', sans-serif;
  font-size: 5rem;
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.03em;
  margin-bottom: 24px;
  animation: fadeUp 0.8s 0.12s ease both;
}

.pe-hero__title em {
  font-style: normal;
  background: linear-gradient(135deg, #c084fc 0%, var(--purple-glow) 40%, var(--purple-dark) 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
}

.pe-hero__sub {
  max-width: 560px;
  margin: 0 auto;
  font-size: 1rem;
  line-height: 1.75;
  color: var(--text-muted);
  position: relative;
  z-index: 1;
}

/* ── DIVIDER ───────────────────────────────────────────────── */
.pe-divider {
  width: 100%;
  height: 1px;
  background: linear-gradient(90deg, transparent, var(--glass-border) 40%, var(--glass-border) 60%, transparent);
  margin: 0 auto 80px;
  position: relative;
}

.pe-divider::after {
  content: '◆';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  color: var(--purple-glow);
  font-size: 10px;
  background: var(--bg);
  padding: 0 10px;
  opacity: 0.6;
}

/* ── CONTAINER ─────────────────────────────────────────────── */
.pe-container {
  max-width: 1280px;
  margin: 0 auto;
  padding: 0 40px;
  position: relative;
  z-index: 1;
}

/* ── EVENT BLOCK ───────────────────────────────────────────── */
.pe-event-block {
  margin-bottom: 140px;
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.9s var(--ease-out-expo), transform 0.9s var(--ease-out-expo);
}

.pe-event-block.visible {
  opacity: 1;
  transform: translateY(0);
}

/* EVENT HEADER */
.pe-event-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 36px;
  padding-bottom: 24px;
  border-bottom: 1px solid var(--glass-border);
  gap: 20px;
}

.pe-event-header__left {
  flex: 1;
}

.pe-event-year {
  display: block;
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--gold);
  margin-bottom: 10px;
  opacity: 0.8;
}

.pe-event-name {
  font-family: var(--font-display);
  font-size: clamp(1.8rem, 4vw, 3.2rem);
  font-weight: 300;
  line-height: 1.1;
  color: #fff;
}

.pe-event-name em {
  font-style: italic;
  color: var(--purple-glow);
}

.pe-event-meta {
  display: flex;
  align-items: center;
  gap: 24px;
  flex-shrink: 0;
}

.pe-meta-item {
  text-align: right;
}

.pe-meta-value {
  display: block;
  font-size: 1.5rem;
  font-weight: 300;
  font-family: var(--font-display);
  color: var(--purple-glow);
  line-height: 1;
}

.pe-meta-label {
  display: block;
  font-size: 0.65rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 4px;
}

.pe-meta-sep {
  width: 1px;
  height: 36px;
  background: var(--glass-border);
}

/* GALLERY GRID — uniform 4-column */
.pe-gallery {
  display: flex;
  flex-wrap: wrap;
  gap: 20px;
}



/* Gallery item */
.pe-gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid var(--glass-border);
  cursor: pointer;
  flex: 1 1 300px;
  max-width: 100%;
  transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.pe-gallery__item:hover {
  transform: translateY(-5px);
  box-shadow: 0 20px 40px rgba(0,0,0,0.4), 0 0 20px rgba(168,85,247,0.1);
}

.pe-gallery__item img {
  width: 100%;
  height: auto;
  max-height: 500px;
  object-fit: contain;
  display: block;
  transition: transform 0.8s var(--ease-out-expo), filter 0.5s ease;
  filter: brightness(0.9);
}

/* Lazy load states */
.pe-gallery__item img.lazy {
  opacity: 0;
  transition: opacity 0.6s ease, transform 0.8s var(--ease-out-expo), filter 0.5s ease;
}

.pe-gallery__item img.lazy.loaded {
  opacity: 1;
}

.pe-gallery__item:hover img {
  transform: scale(1.06);
  filter: grayscale(0%) brightness(1);
}

/* Shimmer placeholder */
.pe-gallery__item::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(168,85,247,0.05) 25%, rgba(168,85,247,0.12) 50%, rgba(168,85,247,0.05) 75%);
  background-size: 200% 100%;
  animation: shimmer 1.6s infinite;
  z-index: 0;
  transition: opacity 0.4s ease;
}

.pe-gallery__item.img-loaded::before {
  opacity: 0;
}

@keyframes shimmer {
  0%   { background-position: 200% 0; }
  100% { background-position: -200% 0; }
}

/* Hover overlay */
.pe-gallery__overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(0deg, rgba(5,5,7,0.7) 0%, transparent 55%);
  opacity: 0;
  transition: opacity 0.4s ease;
  z-index: 1;
  display: flex;
  align-items: flex-end;
  padding: 20px;
}

.pe-gallery__item:hover .pe-gallery__overlay {
  opacity: 1;
}

.pe-gallery__caption {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.8);
  letter-spacing: 0.05em;
  transform: translateY(8px);
  transition: transform 0.4s var(--ease-out-expo);
}

.pe-gallery__item:hover .pe-gallery__caption {
  transform: translateY(0);
}

/* Count badge (for +N more) */
.pe-gallery__more {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.75);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  z-index: 2;
  pointer-events: none;
}

.pe-gallery__more-count {
  font-family: var(--font-display);
  font-size: 2.5rem;
  font-weight: 300;
  color: #fff;
  line-height: 1;
}

.pe-gallery__more-text {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-muted);
  margin-top: 6px;
}

/* ── LIGHTBOX ──────────────────────────────────────────────── */
.pe-lightbox {
  position: fixed;
  inset: 0;
  z-index: 9999;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.35s ease;
}

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

.pe-lightbox__backdrop {
  position: absolute;
  inset: 0;
  background: rgba(5, 5, 7, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}

.pe-lightbox__inner {
  position: relative;
  z-index: 1;
  max-width: 90vw;
  max-height: 88vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 20px;
}

.pe-lightbox__img-wrap {
  position: relative;
  border-radius: 4px;
  overflow: hidden;
  box-shadow: 0 40px 100px rgba(0,0,0,0.8);
}

.pe-lightbox__img-wrap img {
  max-width: 85vw;
  max-height: 78vh;
  object-fit: contain;
  display: block;
}

.pe-lightbox__info {
  text-align: center;
}

.pe-lightbox__event-name {
  font-family: var(--font-display);
  font-size: 1.3rem;
  color: rgba(255,255,255,0.8);
  font-weight: 300;
}

.pe-lightbox__counter {
  font-size: 0.7rem;
  letter-spacing: 0.2em;
  color: var(--text-muted);
  margin-top: 6px;
}

.pe-lightbox__btn {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--glass-border);
  color: #fff;
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s, transform 0.2s;
  z-index: 2;
}

.pe-lightbox__btn:hover { background: rgba(168, 85, 247, 0.3); }
.pe-lightbox__btn--prev { left: -70px; }
.pe-lightbox__btn--next { right: -70px; }

.pe-lightbox__close {
  position: absolute;
  top: -20px;
  right: -20px;
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.2);
  border: 1px solid var(--glass-border);
  color: #fff;
  font-size: 0.85rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: background 0.2s;
  z-index: 3;
}

.pe-lightbox__close:hover { background: rgba(168, 85, 247, 0.4); }

/* ── FOOTER STRIP ──────────────────────────────────────────── */
.pe-footer-strip {
  text-align: center;
  padding: 80px 40px;
  border-top: 1px solid var(--glass-border);
  color: var(--text-muted);
  font-size: 0.8rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  position: relative;
  z-index: 1;
}

.pe-footer-strip a {
  color: var(--purple-glow);
  text-decoration: none;
  margin-left: 4px;
}

/* ── SCROLL TO TOP ─────────────────────────────────────────── */
.pe-scroll-top {
  position: fixed;
  bottom: 40px;
  right: 40px;
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: rgba(168, 85, 247, 0.15);
  border: 1px solid var(--glass-border);
  color: var(--purple-glow);
  font-size: 1rem;
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.3s, background 0.2s;
  z-index: 100;
  backdrop-filter: blur(10px);
}

.pe-scroll-top.show {
  opacity: 1;
  pointer-events: all;
}

.pe-scroll-top:hover {
  background: rgba(168, 85, 247, 0.3);
}

/* ═══════════════════════════════════════════════════════════
   RESPONSIVE BREAKPOINTS
   ═══════════════════════════════════════════════════════════ */

/* ── XL > 1280px — full design as-is ─────────────────────── */

/* ── LG 1024–1280px ───────────────────────────────────────── */
@media (max-width: 1280px) {
  .pe-container { padding: 0 32px; }
  .pe-lightbox__btn--prev { left: -60px; }
  .pe-lightbox__btn--next { right: -60px; }
}

/* ── MD 768–1024px — 4 col → 2 col ───────────────────────── */
@media (max-width: 1024px) {
  .pe-hero { padding: 140px 0 80px; }

  .pe-event-header {
    flex-direction: column;
    align-items: flex-start;
    gap: 20px;
  }

  .pe-event-meta { align-self: flex-start; }

  .pe-gallery { gap: 16px; }

  .pe-lightbox__btn--prev { left: -48px; }
  .pe-lightbox__btn--next { right: -48px; }
}

/* ── SM 640–768px — 2 col ─────────────────────────────────── */
@media (max-width: 768px) {
  .pe-hero { padding: 120px 0 60px; }
  .pe-hero::before { display: none; }
  .pe-container { padding: 0 20px; }
  .pe-event-block { margin-bottom: 90px; }

  .pe-gallery { gap: 12px; }

  .pe-lightbox__btn--prev { left: 8px; top: auto; bottom: 80px; transform: none; }
  .pe-lightbox__btn--next { right: 8px; top: auto; bottom: 80px; transform: none; }
  .pe-lightbox__close { top: 10px; right: 10px; }
  .pe-lightbox__inner { max-width: 100vw; }
  .pe-lightbox__img-wrap img { max-width: 100vw; }
  .pe-scroll-top { bottom: 20px; right: 20px; }
}

/* ── XS < 480px — 2 col (tight) ──────────────────────────── */
@media (max-width: 480px) {
  .pe-hero { padding: 100px 0 50px; }
  .pe-gallery { gap: 10px; }
  .pe-gallery__item { flex: 1 1 100%; }
  .pe-event-meta { gap: 16px; }
  .pe-meta-item { text-align: left; }
}