/* ============================================================
   ESTILOS PERSONALIZADOS
   ============================================================
   Complementa a Tailwind (cargado por CDN) con:
   - Animaciones de aparición (fade-in) controladas por JS.
   - Efectos glassmorphism y scrollbar personalizado.
   - Soporte para "prefers-reduced-motion".
   ============================================================ */

/* ---------- Variables ---------- */
:root {
    --spotify-green: #1DB954;
    --spotify-purple: #7c3aed;
}

/* ---------- Scroll suave y anclaje bajo el header sticky ---------- */
html {
    scroll-behavior: smooth;
}

section[id] {
    scroll-margin-top: 80px;
}

/* ---------- Animación de entrada (hero) ---------- */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.animate-fade-in {
    animation: fadeInUp 0.7s ease-out both;
}

/* ---------- Fade-in por scroll (Intersection Observer) ---------- */
.reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ---------- Barra de navegación: fondo al hacer scroll ---------- */
#navbar {
    background-color: transparent;
}

#navbar.scrolled {
    background-color: rgba(18, 18, 18, 0.92);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.4);
}

/* Enlace activo de la navegación */
.nav-link.activo {
    color: #fff;
}

/* ---------- Botón "Seguir" (estado activo) ---------- */
.btn-seguir.seguido {
    border-color: var(--spotify-green);
    color: var(--spotify-green);
}

/* ---------- Glassmorphism genérico ---------- */
.glass {
    background: rgba(24, 24, 24, 0.6);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
}

/* ---------- Scrollbar personalizado (WebKit) ---------- */
::-webkit-scrollbar {
    width: 10px;
}

::-webkit-scrollbar-track {
    background: #121212;
}

::-webkit-scrollbar-thumb {
    background: #3a3a3a;
    border-radius: 8px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--spotify-green);
}

/* ---------- Fallback de line-clamp (Tailwind CDN lo incluye) ---------- */
.line-clamp-2 {
    display: -webkit-box;
    -webkit-line-clamp: 2;
    -webkit-box-orient: vertical;
    overflow: hidden;
}

/* ---------- Accesibilidad: respeta "reduce motion" ---------- */
@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .animate-fade-in,
    .reveal {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}
