/* ==========================================================================
   DevBarrio — Bespoke Editorial Neon Identity (Aligned to Devbarrio.png)
   Visual Direction:
     - Architectural Swiss-Tech Dark Mode + Neon Lucha Concentric Rings
     - Typography: Space Grotesk (Display) + Inter (Body) + JetBrains Mono (Code)
     - Palette:
         #0A0710 Obsidian Violet-Black (Main BG)
         #120E1B Smoked Plum Surface
         #1A1426 Elevated Surface
         #2A223A Violet Hairline Border
         #C04CFD Neon Purple ("DEV")
         #FACC15 Neon Gold ("BARRIO")
         #EF4444 Neon Crimson (Coyote Halo & Live)
   ========================================================================== */

:root {
  --bg-main: #0a0710;
  --bg-surface: #120e1b;
  --bg-elevated: #1a1426;
  --border-subtle: #2a223a;
  --accent-purple: #c04cfd;
  --accent-gold: #facc15;
  --accent-red: #ef4444;
  --text-primary: #f8fafc;
  --text-secondary: #b4abc2;
}

html {
  scroll-behavior: smooth;
  background-color: var(--bg-main);
  color: var(--text-primary);
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  background-color: var(--bg-main);
  color: var(--text-primary);
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

h1, h2, h3, h4, .font-display {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
}

::selection {
  background-color: rgba(192, 76, 253, 0.35);
  color: #f8fafc;
}

/* Blueprint architectural grid (very subtle) */
.bg-blueprint {
  background-image:
    linear-gradient(to right, rgba(192, 76, 253, 0.05) 1px, transparent 1px),
    linear-gradient(to bottom, rgba(192, 76, 253, 0.05) 1px, transparent 1px);
  background-size: 56px 56px;
}

/* Hero directional ambient glow behind the right-side emblem */
.hero-ambient {
  background:
    radial-gradient(560px circle at 76% 46%, rgba(239, 68, 68, 0.2), transparent 62%),
    radial-gradient(640px circle at 68% 36%, rgba(192, 76, 253, 0.18), transparent 65%),
    radial-gradient(460px circle at 82% 65%, rgba(250, 204, 21, 0.11), transparent 60%),
    radial-gradient(520px circle at 12% 20%, rgba(192, 76, 253, 0.09), transparent 60%);
  pointer-events: none;
}

/* Navbar glassmorphism */
.navbar-glass {
  background-color: rgba(10, 7, 16, 0.72);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
  border-bottom: 1px solid rgba(42, 34, 58, 0.65);
  transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

.navbar-glass.is-scrolled {
  background-color: rgba(10, 7, 16, 0.94);
  border-bottom-color: rgba(192, 76, 253, 0.3);
  box-shadow: 0 10px 30px -14px rgba(0, 0, 0, 0.9);
}

/* Logo glows */
.logo-glow {
  filter: drop-shadow(0 0 8px rgba(192, 76, 253, 0.35))
          drop-shadow(0 0 14px rgba(239, 68, 68, 0.2));
  transition: filter 0.25s ease, transform 0.25s ease;
}

.logo-glow:hover {
  filter: drop-shadow(0 0 12px rgba(192, 76, 253, 0.6))
          drop-shadow(0 0 18px rgba(250, 204, 21, 0.35));
}

.emblem-hero-glow {
  filter: drop-shadow(0 0 28px rgba(239, 68, 68, 0.36))
          drop-shadow(0 0 54px rgba(192, 76, 253, 0.3));
  animation: emblemFloat 6s ease-in-out infinite;
}

@keyframes emblemFloat {
  0%, 100% { transform: translateY(0px); }
  50% { transform: translateY(-7px); }
}

/* Slow concentric ring rotation inspired by Devbarrio.png */
@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

@keyframes spinSlowReverse {
  from { transform: rotate(360deg); }
  to { transform: rotate(0deg); }
}

.ring-spin {
  animation: spinSlow 42s linear infinite;
}

.ring-spin-reverse {
  animation: spinSlowReverse 58s linear infinite;
}

/* Horizontal community ticker */
.marquee-track {
  display: flex;
  width: max-content;
  animation: marqueeScroll 32s linear infinite;
}

.marquee-track:hover {
  animation-play-state: paused;
}

@keyframes marqueeScroll {
  0% { transform: translateX(0); }
  100% { transform: translateX(-50%); }
}

/* Buttons */
.btn-neon-gradient {
  position: relative;
  background: linear-gradient(135deg, #c04cfd 0%, #ef4444 50%, #facc15 100%);
  padding: 1.5px;
  border-radius: 0.5rem;
  transition: transform 0.2s ease, box-shadow 0.25s ease;
}

.btn-neon-gradient:hover {
  transform: translateY(-1px);
  box-shadow:
    0 0 22px rgba(192, 76, 253, 0.42),
    0 0 14px rgba(250, 204, 21, 0.28);
}

.btn-neon-gradient > span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  background-color: #120e1b;
  border-radius: calc(0.5rem - 1.5px);
  transition: background-color 0.2s ease;
}

.btn-neon-gradient:hover > span {
  background-color: rgba(18, 14, 27, 0.75);
}

.btn-primary-glow {
  background: linear-gradient(135deg, #c04cfd 0%, #9333ea 52%, #dc2626 100%);
  box-shadow:
    0 0 0 1px rgba(192, 76, 253, 0.45),
    0 10px 28px -8px rgba(192, 76, 253, 0.6);
  transition: transform 0.2s ease, box-shadow 0.25s ease, filter 0.2s ease;
}

.btn-primary-glow:hover {
  transform: translateY(-2px);
  filter: brightness(1.08);
  box-shadow:
    0 0 0 1px rgba(250, 204, 21, 0.5),
    0 14px 34px -6px rgba(192, 76, 253, 0.72),
    0 0 20px -6px rgba(239, 68, 68, 0.5);
}

/* Interactive cursor-spotlight cards */
.spotlight-card {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  overflow: hidden;
  transition:
    transform 0.25s cubic-bezier(0.22, 1, 0.36, 1),
    border-color 0.25s ease,
    box-shadow 0.25s ease;
}

.spotlight-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(
    360px circle at var(--mx, 50%) var(--my, 50%),
    var(--spot-color, rgba(192, 76, 253, 0.14)),
    transparent 65%
  );
  opacity: 0;
  transition: opacity 0.3s ease;
  pointer-events: none;
}

.spotlight-card:hover::before {
  opacity: 1;
}

.spotlight-card:hover {
  transform: translateY(-3px);
  border-color: rgba(192, 76, 253, 0.52);
  box-shadow: 0 16px 36px -18px rgba(0, 0, 0, 0.9);
}

.spotlight-gold {
  --spot-color: rgba(250, 204, 21, 0.13);
}

.spotlight-gold:hover {
  border-color: rgba(250, 204, 21, 0.55);
}

.spotlight-crimson {
  --spot-color: rgba(239, 68, 68, 0.14);
}

.spotlight-crimson:hover {
  border-color: rgba(239, 68, 68, 0.55);
}

/* Ticket / Pass notches for Upcoming Events */
.ticket-pass {
  position: relative;
}

.ticket-notch-top,
.ticket-notch-bottom {
  position: absolute;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background-color: var(--bg-main);
  border: 1px solid var(--border-subtle);
  z-index: 10;
}

/* Editorial Pillar Rows (¿Qué es DevBarrio?) */
.pillar-row {
  position: relative;
  background-color: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  transition: transform 0.22s ease, border-color 0.22s ease, background-color 0.22s ease;
}

.pillar-row:hover {
  transform: translateX(4px);
  background-color: var(--bg-elevated);
}

/* CFP Stage Banner */
.cfp-stage {
  position: relative;
  background:
    radial-gradient(560px circle at 92% 50%, rgba(239, 68, 68, 0.16), transparent 60%),
    radial-gradient(500px circle at 10% 10%, rgba(192, 76, 253, 0.18), transparent 60%),
    radial-gradient(400px circle at 50% 100%, rgba(250, 204, 21, 0.1), transparent 60%),
    #120e1b;
  border: 1px solid rgba(192, 76, 253, 0.36);
  box-shadow:
    0 0 50px -20px rgba(192, 76, 253, 0.4),
    inset 0 1px 0 0 rgba(250, 204, 21, 0.14);
}

/* Event filter tabs */
.event-tab {
  color: var(--text-secondary);
  border: 1px solid transparent;
  transition: color 0.2s ease, background-color 0.2s ease, border-color 0.2s ease;
}

.event-tab:hover {
  color: var(--text-primary);
}

.event-tab[aria-selected="true"] {
  background-color: rgba(192, 76, 253, 0.18);
  color: var(--text-primary);
  border-color: rgba(192, 76, 253, 0.55);
  box-shadow: 0 0 20px -6px rgba(192, 76, 253, 0.55);
}

/* Fade transition */
@keyframes fadeSlideUp {
  from {
    opacity: 0;
    transform: translateY(8px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

.animate-fade-in {
  animation: fadeSlideUp 0.28s ease forwards;
}

/* Partner logos: grayscale -> full color on hover */
.partner-logo {
  filter: grayscale(100%);
  opacity: 0.5;
  transition: filter 0.3s ease, opacity 0.3s ease, transform 0.25s ease, border-color 0.25s ease;
}

.partner-logo:hover {
  filter: grayscale(0%);
  opacity: 1;
  transform: translateY(-2px);
  border-color: rgba(192, 76, 253, 0.4);
}

/* Modal backdrop */
.modal-backdrop {
  background-color: rgba(10, 7, 16, 0.85);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
  .emblem-hero-glow,
  .ring-spin,
  .ring-spin-reverse,
  .marquee-track {
    animation: none;
  }
}

/* Scrollbar */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: #0a0710;
}

::-webkit-scrollbar-thumb {
  background: #2a223a;
  border-radius: 9999px;
}

::-webkit-scrollbar-thumb:hover {
  background: #4e3b70;
}
