/* ============================================================
   Marvilous DJs · Gallery
   Dark editorial aesthetic, brand red, club-flyer DNA.
   ============================================================ */

@import url('https://fonts.googleapis.com/css2?family=Anton&family=Inter+Tight:wght@400;500;600;700;800&display=swap');

:root {
  --bg: #0d0d0d;
  --surface: #131313;
  --surface-2: #1a1a1a;
  --line: rgba(255,255,255,0.08);
  --text: #ffffff;
  --text-dim: #b0b0b0;
  --text-fade: #666666;
  --red: #cc0000;
  --red-bright: #ff1a1a;
  --red-dim: rgba(204,0,0,0.18);
  --display: 'Anton', 'Impact', sans-serif;
  --body: 'Inter Tight', 'Helvetica Neue', Arial, sans-serif;
}

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

html, body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--body);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

a { color: inherit; text-decoration: none; }

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

/* ============================================================
   HEADER (matches music site)
   ============================================================ */

.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(13,13,13,0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
  padding: 18px 32px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.brand { display: flex; align-items: center; gap: 12px; }

.brand-mark {
  display: inline-flex;
  align-items: center; justify-content: center;
  width: 32px; height: 32px;
  background: var(--red);
  color: var(--text);
  font-family: var(--display);
  font-size: 22px;
  line-height: 1;
}

.brand-text {
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 800;
}

.brand-sub {
  display: block;
  font-size: 9px;
  color: var(--red);
  letter-spacing: 0.3em;
  margin-top: 2px;
}

.header-links {
  display: flex; gap: 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
}
.header-links a { color: var(--text-dim); transition: color 0.15s; }
.header-links a:hover { color: var(--red); }

/* ============================================================
   HERO (homepage featured)
   ============================================================ */

.hero {
  position: relative;
  height: calc(100vh - 70px);
  min-height: 480px;
  background: var(--surface-2) center/cover no-repeat;
  display: flex;
  align-items: center;
  overflow: hidden;
}

.hero-empty {
  background: linear-gradient(135deg, #0d0d0d 0%, #1a0000 100%);
}

.hero-overlay {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(0,0,0,0.85) 0%, rgba(0,0,0,0.5) 50%, rgba(0,0,0,0.2) 100%),
    linear-gradient(180deg, transparent 60%, rgba(0,0,0,0.6) 100%);
}

.hero-content {
  position: relative;
  z-index: 2;
  padding: 0 64px;
  max-width: 1200px;
  width: 100%;
}

.hero-eyebrow {
  font-size: 11px;
  letter-spacing: 0.4em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
  margin-bottom: 18px;
  display: inline-block;
}

.hero-title {
  font-family: var(--display);
  font-size: clamp(48px, 8vw, 96px);
  line-height: 0.92;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  margin-bottom: 18px;
  font-weight: 400;
  max-width: 920px;
}

.hero-meta {
  font-size: 13px;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
  margin-bottom: 36px;
}

.hero-cta {
  display: inline-block;
  font-size: 12px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 16px 32px;
  background: var(--red);
  color: var(--text);
  transition: all 0.15s;
  margin-right: 16px;
}
.hero-cta:hover { background: var(--red-bright); transform: translateY(-1px); }

.hero-secondary {
  display: inline-block;
  font-size: 11px;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  border-bottom: 1px solid var(--line);
  padding: 4px 0;
  transition: all 0.15s;
}
.hero-secondary:hover {
  color: var(--text);
  border-color: var(--red);
}

/* Decorative tilted accent bar (matches music site DNA) */
.hero::after {
  content: '';
  position: absolute;
  bottom: -30px;
  right: -50px;
  width: 380px;
  height: 6px;
  background: var(--red);
  transform: rotate(-3deg);
  opacity: 0.5;
  z-index: 1;
}

@media (max-width: 720px) {
  .hero { height: 70vh; min-height: 440px; }
  .hero-content { padding: 0 24px; }
  .hero-title { line-height: 0.9; }
  .hero-cta, .hero-secondary { display: block; margin: 8px 0; }
  .hero-cta { text-align: center; }
}

/* ============================================================
   SECTION HEADER
   ============================================================ */

.section-head {
  padding: 80px 64px 24px;
  max-width: 1400px;
  margin: 0 auto;
}

.section-eyebrow {
  font-size: 11px;
  letter-spacing: 0.35em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
  margin-bottom: 8px;
}

.section-title {
  font-family: var(--display);
  font-size: clamp(36px, 5vw, 56px);
  line-height: 1;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  font-weight: 400;
}

@media (max-width: 720px) {
  .section-head { padding: 48px 24px 16px; }
}

/* ============================================================
   FILTER ROW
   ============================================================ */

.filter-row {
  padding: 0 64px 24px;
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.filter-chip {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  padding: 8px 16px;
  background: var(--surface);
  color: var(--text-dim);
  border: 1px solid var(--line);
  transition: all 0.15s;
}
.filter-chip:hover {
  color: var(--text);
  border-color: var(--red);
}
.filter-chip.active {
  background: var(--red);
  color: var(--text);
  border-color: var(--red);
}
.chip-count {
  display: inline-block;
  margin-left: 4px;
  font-size: 9px;
  opacity: 0.6;
}

@media (max-width: 720px) {
  .filter-row { padding: 0 24px 16px; }
  .filter-chip { padding: 6px 12px; font-size: 10px; }
}

/* ============================================================
   GALLERY GRID (homepage)
   ============================================================ */

.galleries-grid {
  padding: 0 64px 80px;
  max-width: 1400px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 16px;
}

.gallery-card {
  display: block;
  position: relative;
  overflow: hidden;
  background: var(--surface-2);
  transition: transform 0.2s ease;
}

.gallery-card.featured {
  outline: 2px solid var(--red);
  outline-offset: -2px;
}

.gallery-cover {
  aspect-ratio: 4/5;
  background: var(--surface-2) center/cover no-repeat;
  position: relative;
  overflow: hidden;
}

.gallery-cover.empty {
  display: flex; align-items: center; justify-content: center;
}

.cover-fallback {
  font-family: var(--display);
  font-size: 100px;
  color: var(--red-dim);
  line-height: 1;
}

/* Hover zoom effect on cover image */
.gallery-cover {
  transition: transform 0.5s ease;
}
.gallery-card:hover .gallery-cover {
  transform: scale(1.04);
}

.card-overlay {
  position: absolute;
  left: 0; right: 0; bottom: 0;
  padding: 20px 18px;
  background: linear-gradient(180deg, transparent 0%, rgba(0,0,0,0.85) 80%);
  color: var(--text);
  pointer-events: none;
}

.card-title {
  font-family: var(--display);
  font-size: 22px;
  text-transform: uppercase;
  line-height: 1.05;
  letter-spacing: 0.005em;
  font-weight: 400;
}

@media (max-width: 720px) {
  .galleries-grid { padding: 0 24px 64px; gap: 12px; grid-template-columns: 1fr 1fr; }
  .card-title { font-size: 16px; }
}

/* ============================================================
   EMPTY STATE
   ============================================================ */

.empty-state {
  padding: 80px 32px 120px;
  text-align: center;
  color: var(--text-dim);
}
.empty-state h3 {
  font-family: var(--display);
  font-size: 36px;
  text-transform: uppercase;
  margin-bottom: 12px;
  color: var(--text);
}
.empty-state p { font-size: 14px; line-height: 1.7; }
.empty-state a { color: var(--red); font-weight: 700; }
.empty-icon { font-size: 48px; margin-bottom: 16px; opacity: 0.3; }

/* ============================================================
   GALLERY DETAIL PAGE
   ============================================================ */

.gallery-header {
  padding: 60px 64px 40px;
  max-width: 1100px;
  margin: 0 auto;
  position: relative;
}

.back-link {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 700;
  display: inline-block;
  margin-bottom: 24px;
  transition: color 0.15s;
}
.back-link:hover { color: var(--red); }

.gallery-eyebrow {
  font-size: 11px;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--red);
  font-weight: 800;
  margin-bottom: 12px;
}

.gallery-title {
  font-family: var(--display);
  font-size: clamp(40px, 7vw, 80px);
  line-height: 0.95;
  text-transform: uppercase;
  font-weight: 400;
  margin-bottom: 16px;
  letter-spacing: -0.005em;
}

.gallery-description {
  font-size: 15px;
  line-height: 1.6;
  color: var(--text-dim);
  max-width: 720px;
  margin-bottom: 18px;
}

.gallery-counts {
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: var(--text-fade);
  font-weight: 700;
  display: flex;
  gap: 16px;
}

@media (max-width: 720px) {
  .gallery-header { padding: 32px 24px 28px; }
}

/* ============================================================
   MASONRY GRID
   Using CSS columns — supports natural aspect ratios without JS
   ============================================================ */

.masonry {
  padding: 0 64px 80px;
  max-width: 1400px;
  margin: 0 auto;
  column-count: 3;
  column-gap: 12px;
}

@media (max-width: 980px) {
  .masonry { column-count: 2; padding: 0 24px 64px; }
}
@media (max-width: 560px) {
  .masonry { column-count: 1; padding: 0 16px 48px; column-gap: 10px; }
}

.masonry-item {
  display: block;
  width: 100%;
  margin-bottom: 12px;
  break-inside: avoid;
  position: relative;
  overflow: hidden;
  background: var(--surface);
  cursor: zoom-in;
}

.masonry-item img {
  width: 100%;
  height: auto;
  display: block;
  transition: transform 0.4s ease, opacity 0.2s ease;
}

.masonry-item:hover img {
  transform: scale(1.03);
  opacity: 0.9;
}

/* Video items in masonry */
.masonry-item.video {
  cursor: pointer;
  aspect-ratio: 16/9;
  background: #000;
}

.masonry-item.video img {
  width: 100%; height: 100%;
  object-fit: cover;
}

.video-fallback {
  width: 100%;
  height: 100%;
  background:
    radial-gradient(circle at center, rgba(204,0,0,0.2) 0%, transparent 60%),
    var(--surface-2);
}

.video-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  background: rgba(0,0,0,0.3);
  transition: background 0.2s ease;
}
.masonry-item.video:hover .video-overlay { background: rgba(0,0,0,0.15); }

.play-icon {
  width: 64px; height: 64px;
  background: var(--red);
  display: flex; align-items: center; justify-content: center;
  position: relative;
  transition: transform 0.2s ease;
}
.play-icon::after {
  content: '';
  width: 0; height: 0;
  border-style: solid;
  border-width: 14px 0 14px 22px;
  border-color: transparent transparent transparent #fff;
  margin-left: 4px;
}
.masonry-item.video:hover .play-icon { transform: scale(1.1); }

.video-badge {
  position: absolute; bottom: 12px; left: 12px;
  background: rgba(0,0,0,0.7);
  color: var(--text);
  font-size: 9px;
  letter-spacing: 0.15em;
  font-weight: 800;
  padding: 4px 8px;
}

/* ============================================================
   LIGHTBOX
   ============================================================ */

body.lb-open { overflow: hidden; }

.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.95);
  z-index: 100;
  display: flex; align-items: center; justify-content: center;
  animation: lb-fade-in 0.2s ease;
}
.lightbox[hidden] { display: none; animation: none; }

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

.lb-stage {
  max-width: 92vw;
  max-height: 86vh;
  display: flex; align-items: center; justify-content: center;
}

.lb-image {
  max-width: 92vw;
  max-height: 86vh;
  width: auto; height: auto;
  display: block;
  user-select: none;
}

.lb-iframe {
  width: min(1200px, 92vw);
  aspect-ratio: 16/9;
  height: auto;
  max-height: 86vh;
  border: none;
  background: #000;
}

.lb-caption {
  position: absolute;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: rgba(0,0,0,0.6);
  color: var(--text);
  padding: 8px 16px;
  font-size: 13px;
  max-width: 80vw;
  text-align: center;
}

.lb-counter {
  position: absolute;
  top: 24px;
  left: 24px;
  font-size: 11px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-dim);
  font-variant-numeric: tabular-nums;
}

.lb-close, .lb-prev, .lb-next {
  position: absolute;
  background: transparent;
  border: 1px solid rgba(255,255,255,0.2);
  color: var(--text);
  font-family: inherit;
  cursor: pointer;
  transition: all 0.15s;
}

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

.lb-prev, .lb-next {
  top: 50%;
  transform: translateY(-50%);
  width: 56px; height: 56px;
  font-size: 36px;
  line-height: 1;
}
.lb-prev { left: 24px; }
.lb-next { right: 24px; }

.lb-close:hover, .lb-prev:hover:not(:disabled), .lb-next:hover:not(:disabled) {
  background: var(--red);
  border-color: var(--red);
}
.lb-prev:disabled, .lb-next:disabled { opacity: 0.2; cursor: default; }

@media (max-width: 720px) {
  .lb-prev, .lb-next { width: 44px; height: 44px; font-size: 28px; }
  .lb-prev { left: 12px; }
  .lb-next { right: 12px; }
  .lb-close { top: 12px; right: 12px; }
  .lb-counter { top: 16px; left: 16px; font-size: 10px; }
  .lb-caption { bottom: 16px; font-size: 12px; }
}

/* ============================================================
   404 / NOT FOUND
   ============================================================ */

.not-found {
  min-height: 70vh;
  display: flex; align-items: center; justify-content: center;
  padding: 64px 32px;
}
.not-found-inner {
  max-width: 480px; text-align: center;
}
.not-found h1 {
  font-family: var(--display);
  font-size: 56px;
  text-transform: uppercase;
  margin-bottom: 16px;
  font-weight: 400;
}
.not-found p {
  color: var(--text-dim);
  margin-bottom: 28px;
}

/* ============================================================
   GALLERY DETAIL CTA
   ============================================================ */

.gallery-cta {
  background: var(--surface-2);
  padding: 80px 32px;
  text-align: center;
  border-top: 3px solid var(--red);
  margin-top: 40px;
}
.gallery-cta-inner { max-width: 600px; margin: 0 auto; }
.gallery-cta h3 {
  font-family: var(--display);
  font-size: 44px;
  text-transform: uppercase;
  margin-bottom: 12px;
  font-weight: 400;
  letter-spacing: -0.005em;
}
.gallery-cta p {
  color: var(--text-dim);
  margin-bottom: 28px;
  font-size: 14px;
}

/* ============================================================
   FOOTER
   ============================================================ */

.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--line);
  padding: 32px 64px;
  margin-top: 80px;
}

.footer-row {
  max-width: 1400px;
  margin: 0 auto;
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 16px;
}

.footer-brand {
  display: flex; align-items: center; gap: 12px;
  font-size: 12px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--text-dim);
  font-weight: 600;
}

.footer-links {
  display: flex; gap: 24px;
  font-size: 11px;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  font-weight: 700;
  color: var(--text-fade);
}
.footer-links a:hover { color: var(--red); }

@media (max-width: 720px) {
  .site-footer { padding: 24px; }
}
