/* ============================================
   RaveGear — Premium electronic music brand
   Dark, editorial, high-contrast
   ============================================ */

:root {
  --bg: #0a0a0b;
  --bg-elevated: #111113;
  --surface: #161619;
  --text: #e8e8ea;
  --text-muted: #8c8c94;
  --accent: #c9a962;
  --accent-2: #a78bfa;
  --accent-3: #22d3ee;
  --accent-dim: rgba(201, 169, 98, 0.4);
  --accent-glow: rgba(201, 169, 98, 0.35);
  --gradient-accent: linear-gradient(135deg, #c9a962 0%, #a78bfa 50%, #22d3ee 100%);
  --gradient-accent-soft: linear-gradient(135deg, rgba(201, 169, 98, 0.15) 0%, rgba(167, 139, 250, 0.12) 50%, rgba(34, 211, 238, 0.1) 100%);
  --border: rgba(255, 255, 255, 0.06);
  --overlay: rgba(0, 0, 0, 0.55);
  --transition: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
  --font-display: "Outfit", -apple-system, BlinkMacSystemFont, sans-serif;
  --font-body: "DM Sans", -apple-system, BlinkMacSystemFont, sans-serif;
  --max-width: 1200px;
  --section-padding: clamp(4rem, 10vw, 7rem);
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}

/* ----- Animated background ----- */
.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  position: relative;
}

.page::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background:
    radial-gradient(ellipse 120% 100% at 5% 10%, rgba(201, 169, 98, 0.12) 0%, transparent 50%),
    radial-gradient(ellipse 100% 120% at 95% 85%, rgba(167, 139, 250, 0.1) 0%, transparent 50%),
    radial-gradient(ellipse 80% 80% at 50% 50%, rgba(34, 211, 238, 0.06) 0%, transparent 55%);
  animation: bg-pulse 18s ease-in-out infinite alternate;
  pointer-events: none;
}

.page::after {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  background: var(--bg);
  opacity: 0.88;
  pointer-events: none;
}

/* Floating gradient orbs */
.page .gradient-orb {
  position: fixed;
  border-radius: 50%;
  filter: blur(80px);
  opacity: 0.4;
  pointer-events: none;
  z-index: 0;
}
.page .gradient-orb--1 {
  width: 400px;
  height: 400px;
  background: radial-gradient(circle, rgba(201, 169, 98, 0.25) 0%, transparent 70%);
  top: -100px;
  left: -100px;
  animation: float-orb 20s ease-in-out infinite;
}
.page .gradient-orb--2 {
  width: 350px;
  height: 350px;
  background: radial-gradient(circle, rgba(167, 139, 250, 0.2) 0%, transparent 70%);
  bottom: 10%;
  right: -80px;
  animation: float-orb 22s ease-in-out infinite reverse;
  animation-delay: -5s;
}
.page .gradient-orb--3 {
  width: 280px;
  height: 280px;
  background: radial-gradient(circle, rgba(34, 211, 238, 0.15) 0%, transparent 70%);
  top: 50%;
  left: 30%;
  animation: float-orb 18s ease-in-out infinite;
  animation-delay: -10s;
}

@keyframes float-orb {
  0%, 100% { transform: translate(0, 0) scale(1); }
  33% { transform: translate(30px, -20px) scale(1.05); }
  66% { transform: translate(-20px, 25px) scale(0.98); }
}

@keyframes bg-pulse {
  0% { opacity: 1; transform: scale(1) translate(0, 0) rotate(0deg); }
  50% { opacity: 1; transform: scale(1.08) translate(1%, 0.5%) rotate(0.5deg); }
  100% { opacity: 1; transform: scale(1.05) translate(-1%, -0.5%) rotate(-0.3deg); }
}

.page > * {
  position: relative;
  z-index: 1;
}

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

/* ----- Hero ----- */
.hero {
  position: relative;
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
}

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

.hero-slide {
  position: absolute;
  inset: 0;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 1.2s ease-in-out;
}

.hero-slide--active {
  opacity: 1;
  z-index: 1;
}

.hero-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0.72) 50%, rgba(0, 0, 0, 0.65) 100%);
  z-index: 2;
}

.hero-content {
  position: relative;
  z-index: 3;
  text-align: center;
  padding: 2rem;
}

.hero-logo-wrap {
  margin: 0 0 0.5em;
  line-height: 0;
}

.hero-logo {
  max-width: min(94vw, 780px);
  height: auto;
  display: block;
  margin: 0 auto;
  position: relative;
  filter: drop-shadow(0 0 30px var(--accent-glow)) drop-shadow(0 0 60px rgba(201, 169, 98, 0.12)) drop-shadow(0 4px 24px rgba(0, 0, 0, 0.4));
  animation: logo-glow 4s ease-in-out infinite alternate;
}

.hero-logo-wrap {
  position: relative;
  overflow: hidden;
}

.hero-logo-wrap::after {
  content: "";
  position: absolute;
  top: 0;
  left: -100%;
  width: 60%;
  height: 100%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.08), transparent);
  animation: logo-shine 5s ease-in-out infinite;
}

@keyframes logo-shine {
  0% { left: -100%; }
  60%, 100% { left: 150%; }
}

@keyframes logo-glow {
  from { filter: drop-shadow(0 0 20px var(--accent-glow)) drop-shadow(0 0 40px rgba(201, 169, 98, 0.08)) drop-shadow(0 4px 24px rgba(0, 0, 0, 0.4)); }
  to { filter: drop-shadow(0 0 36px var(--accent-glow)) drop-shadow(0 0 70px rgba(167, 139, 250, 0.12)) drop-shadow(0 4px 24px rgba(0, 0, 0, 0.4)); }
}

.hero-tagline {
  margin: 0;
  font-family: var(--font-body);
  font-size: clamp(0.95rem, 2.5vw, 1.15rem);
  font-weight: 400;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.98);
  text-shadow:
    0 1px 2px rgba(0, 0, 0, 0.9),
    0 2px 8px rgba(0, 0, 0, 0.8),
    0 0 24px rgba(0, 0, 0, 0.6);
}

.hero-tagline-year {
  display: block;
  margin-top: 0.35em;
  font-style: italic;
  text-transform: none;
  letter-spacing: 0.15em;
  background: var(--gradient-accent);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  background-size: 200% 100%;
  animation: gradient-shift 6s ease-in-out infinite;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.9)) drop-shadow(0 2px 8px rgba(0, 0, 0, 0.8));
}

@keyframes gradient-shift {
  0%, 100% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
}

@media (min-width: 768px) {
  .hero-tagline {
    letter-spacing: 0.35em;
  }
  .hero-tagline-year {
    letter-spacing: 0.2em;
  }
}

/* ----- Story ----- */
.story {
  position: relative;
  padding: var(--section-padding) 1.5rem;
  background: var(--bg);
  background-image: url("../img/dj-event-scorpion.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.story::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.72);
  z-index: 0;
}

.story-inner {
  position: relative;
  z-index: 1;
  max-width: 720px;
  margin: 0 auto;
}

/* ----- Section headings with icons ----- */
.section-heading {
  display: inline-flex;
  align-items: center;
  gap: 0.65rem;
  flex-wrap: wrap;
}

.section-heading-icon {
  display: inline-flex;
  color: var(--accent);
  filter: drop-shadow(0 0 10px var(--accent-glow));
  transition: filter var(--transition), transform var(--transition);
}

.section-heading:hover .section-heading-icon {
  filter: drop-shadow(0 0 20px rgba(167, 139, 250, 0.5));
  transform: scale(1.08);
}

.story-heading {
  margin: 0 0 2.5rem;
  font-family: var(--font-display);
  font-size: clamp(2rem, 4vw, 2.75rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
}

.story-heading::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 0.5rem;
  background: var(--gradient-accent);
  border-radius: 2px;
  opacity: 0.9;
  animation: gradient-line 4s ease-in-out infinite;
}

@keyframes gradient-line {
  0%, 100% { opacity: 0.7; transform: scaleX(1); }
  50% { opacity: 1; transform: scaleX(1.1); }
}

.story-body {
  display: flex;
  flex-direction: column;
  gap: 1.5rem;
}

.story-body p {
  margin: 0;
  font-size: 1.0625rem;
  line-height: 1.75;
  color: var(--text);
}

.story-lead {
  font-size: 1.2rem;
  line-height: 1.7;
  color: var(--text-muted);
  font-weight: 400;
}

.section-title {
  position: relative;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: clamp(1.85rem, 3.5vw, 2.5rem);
  font-weight: 600;
  color: var(--text);
  letter-spacing: 0.03em;
  transition: text-shadow var(--transition);
}

.section-title::after {
  content: "";
  display: block;
  width: 60px;
  height: 3px;
  margin-top: 0.5rem;
  margin-left: 0.15rem;
  background: var(--gradient-accent);
  border-radius: 2px;
  opacity: 0.9;
  animation: gradient-line 4s ease-in-out infinite;
}

.section-title:hover {
  text-shadow: 0 0 24px var(--accent-glow);
}

.section-subtitle {
  margin: 0 0 2.5rem;
  font-size: 0.95rem;
  font-weight: 400;
  color: var(--text-muted);
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

/* ----- Media ----- */
.media {
  padding: var(--section-padding) 1.5rem;
  background: var(--bg-elevated);
}

.media-inner {
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.media-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 2.5rem;
  margin-top: 2rem;
}

@media (min-width: 768px) {
  .media-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 3rem;
  }
}

.media-card {
  margin: 0;
}

.media-video-wrap {
  position: relative;
  width: 100%;
  padding-bottom: 56.25%;
  background: var(--surface);
  border: 1px solid var(--border);
  overflow: hidden;
  transition: box-shadow var(--transition);
}

.media-video-wrap:hover {
  box-shadow: 0 0 24px var(--accent-glow), 0 0 0 1px var(--accent-dim);
}

.media-video-wrap iframe {
  position: absolute;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.media-caption {
  margin: 1.25rem 0 0;
  font-family: var(--font-display);
  font-size: 1.25rem;
  font-weight: 500;
  color: var(--text);
}

/* ----- Gallery ----- */
.gallery {
  position: relative;
  padding: var(--section-padding) 1.5rem;
  background: var(--bg);
  background-image: url("../img/scorpion-events%20(4).jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}

.gallery::before {
  content: "";
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.75);
  z-index: 0;
}

.gallery-inner {
  position: relative;
  z-index: 1;
  max-width: var(--max-width);
  margin: 0 auto;
  text-align: center;
}

.gallery-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.25rem;
  margin-top: 2rem;
  list-style: none;
  padding: 0;
  margin-left: 0;
  margin-right: 0;
}

.gallery-item {
  margin: 0;
}

.gallery-link {
  display: block;
  position: relative;
  aspect-ratio: 1;
  overflow: hidden;
  background: var(--surface);
  border: 1px solid var(--border);
  text-decoration: none;
  color: inherit;
  transition: border-color var(--transition), box-shadow var(--transition);
}

.gallery-link:hover {
  border-color: var(--accent-dim);
  box-shadow: 0 0 28px var(--accent-glow), 0 0 48px rgba(167, 139, 250, 0.25), 0 8px 32px rgba(0, 0, 0, 0.4);
}

.gallery-link:focus {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.gallery-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  transition: transform var(--transition);
}

.gallery-link:hover .gallery-img {
  transform: scale(1.03);
}

/* ----- Footer ----- */
.footer {
  padding: 2.5rem 1.5rem;
  text-align: center;
  background: var(--bg-elevated);
  border-top: 1px solid var(--border);
}

.footer-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  margin: 0 0 0.5rem;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  color: var(--text-muted);
}

.footer-icon {
  display: inline-flex;
  color: var(--accent);
  opacity: 0.9;
  filter: drop-shadow(0 0 6px var(--accent-glow));
}

.footer-copy {
  margin: 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  opacity: 0.8;
}

@media (min-width: 600px) {
  .gallery-grid {
    grid-template-columns: repeat(5, 1fr);
  }
}

@media (min-width: 900px) {
  .gallery-grid {
    gap: 1.5rem;
  }
}

/* ----- Lightbox ----- */
.lightbox {
  position: fixed;
  inset: 0;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 4rem;
}

.lightbox[hidden] {
  display: none;
}

.lightbox-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(0, 0, 0, 0.92);
  cursor: pointer;
}

.lightbox-content {
  position: relative;
  z-index: 2;
  max-width: 85vw;
  max-height: 80vh;
  display: flex;
  align-items: center;
  justify-content: center;
}

.lightbox-content img {
  max-height: 80vh;
  max-width: 100%;
  width: auto;
  object-fit: contain;
  box-shadow: 0 0 40px var(--accent-glow), 0 24px 64px rgba(0, 0, 0, 0.5);
}

.lightbox-close {
  position: absolute;
  top: 1rem;
  right: 1rem;
  z-index: 4;
  width: 48px;
  height: 48px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition);
}

.lightbox-close:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 20px var(--accent-glow);
}

.lightbox-close:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-prev,
.lightbox-next {
  position: absolute;
  top: 50%;
  transform: translateY(-50%);
  z-index: 4;
  width: 56px;
  height: 56px;
  padding: 0;
  border: 0;
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
  font-size: 2.5rem;
  line-height: 1;
  cursor: pointer;
  border-radius: 50%;
  transition: background var(--transition), box-shadow var(--transition);
  display: flex;
  align-items: center;
  justify-content: center;
  user-select: none;
}

.lightbox-prev {
  left: 1rem;
}

.lightbox-next {
  right: 1rem;
}

.lightbox-prev:hover,
.lightbox-next:hover {
  background: rgba(255, 255, 255, 0.25);
  box-shadow: 0 0 24px var(--accent-glow);
}

.lightbox-prev:focus,
.lightbox-next:focus {
  outline: 2px solid #fff;
  outline-offset: 2px;
}

.lightbox-counter {
  position: absolute;
  bottom: 1.5rem;
  left: 50%;
  transform: translateX(-50%);
  z-index: 4;
  margin: 0;
  font-size: 0.9rem;
  font-weight: 500;
  color: rgba(255, 255, 255, 0.9);
  letter-spacing: 0.05em;
}

@media (max-width: 767px) {
  .lightbox {
    padding: 2rem 3rem;
  }

  .lightbox-prev,
  .lightbox-next {
    width: 48px;
    height: 48px;
    font-size: 2rem;
  }

  .lightbox-prev {
    left: 0.5rem;
  }

  .lightbox-next {
    right: 0.5rem;
  }
}

/* ----- Responsive ----- */
@media (max-width: 767px) {
  .gallery-grid {
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
  }
}

.skip-link {
  position: absolute;
  top: -3rem;
  left: 1rem;
  z-index: 100;
  padding: 0.6rem 1rem;
  background: var(--surface);
  color: var(--text);
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid var(--border);
  transition: top var(--transition);
}

.skip-link:focus {
  top: 1rem;
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* ----- Scroll-in animations ----- */
.animate-in {
  opacity: 0;
  transform: translateY(24px);
  transition: opacity 0.7s cubic-bezier(0.4, 0, 0.2, 1), transform 0.7s cubic-bezier(0.4, 0, 0.2, 1);
}

.animate-in.is-visible {
  opacity: 1;
  transform: translateY(0);
}

.animate-in .story-body p,
.animate-in .media-card,
.animate-in .gallery-item {
  opacity: 0;
  transform: translateY(16px);
  transition: opacity 0.5s ease-out, transform 0.5s ease-out;
}

.animate-in.is-visible .story-body p:nth-child(1) { transition-delay: 0.1s; }
.animate-in.is-visible .story-body p:nth-child(2) { transition-delay: 0.15s; }
.animate-in.is-visible .story-body p:nth-child(3) { transition-delay: 0.2s; }
.animate-in.is-visible .story-body p:nth-child(4) { transition-delay: 0.25s; }
.animate-in.is-visible .story-body p:nth-child(5) { transition-delay: 0.3s; }
.animate-in.is-visible .story-body p:nth-child(6) { transition-delay: 0.35s; }
.animate-in.is-visible .story-body p:nth-child(7) { transition-delay: 0.4s; }
.animate-in.is-visible .story-body p { opacity: 1; transform: translateY(0); }
.animate-in.is-visible .media-card:nth-child(1) { transition-delay: 0.1s; }
.animate-in.is-visible .media-card:nth-child(2) { transition-delay: 0.2s; }
.animate-in.is-visible .media-card { opacity: 1; transform: translateY(0); }
.animate-in.is-visible .gallery-item { opacity: 1; transform: translateY(0); }
.animate-in.is-visible .gallery-item:nth-child(1) { transition-delay: 0.05s; }
.animate-in.is-visible .gallery-item:nth-child(2) { transition-delay: 0.1s; }
.animate-in.is-visible .gallery-item:nth-child(3) { transition-delay: 0.15s; }
.animate-in.is-visible .gallery-item:nth-child(4) { transition-delay: 0.2s; }
.animate-in.is-visible .gallery-item:nth-child(5) { transition-delay: 0.25s; }
.animate-in.is-visible .gallery-item:nth-child(6) { transition-delay: 0.3s; }
.animate-in.is-visible .gallery-item:nth-child(7) { transition-delay: 0.35s; }
.animate-in.is-visible .gallery-item:nth-child(8) { transition-delay: 0.4s; }
.animate-in.is-visible .gallery-item:nth-child(9) { transition-delay: 0.45s; }
.animate-in.is-visible .gallery-item:nth-child(10) { transition-delay: 0.5s; }

@media (prefers-reduced-motion: reduce) {
  .hero-slide,
  .gallery-link .gallery-img {
    transition: none;
  }
  .page::before {
    animation: none;
  }
  .gradient-orb {
    display: none;
  }
  .hero-icon {
    animation: none;
  }
  .hero-logo {
    animation: none;
  }
  .animate-in {
    opacity: 1;
    transform: none;
  }
  .animate-in .story-body p,
  .animate-in .media-card,
  .animate-in .gallery-item {
    opacity: 1;
    transform: none;
  }
}
