/* SBLM — movimento, profundidade e interação (respeita prefers-reduced-motion) */

@keyframes motion-fade-up {
    from {
        opacity: 0;
        transform: translate3d(0, 28px, 0);
    }
    to {
        opacity: 1;
        transform: translate3d(0, 0, 0);
    }
}

@keyframes motion-aurora {
    0% {
        transform: translate3d(-8%, -4%, 0) scale(1);
        opacity: 0.35;
    }
    50% {
        transform: translate3d(6%, 4%, 0) scale(1.08);
        opacity: 0.55;
    }
    100% {
        transform: translate3d(-4%, 2%, 0) scale(1.02);
        opacity: 0.4;
    }
}

@keyframes motion-feedback-pop {
    0% {
        transform: scale(0.96);
        opacity: 0;
    }
    70% {
        transform: scale(1.01);
        opacity: 1;
    }
    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* Revelação ao rolar */
.motion-reveal {
    opacity: 0;
    transform: translate3d(0, 26px, 0);
    transition:
        opacity 0.65s cubic-bezier(0.22, 1, 0.36, 1),
        transform 0.65s cubic-bezier(0.22, 1, 0.36, 1);
    transition-delay: var(--motion-delay, 0ms);
    will-change: opacity, transform;
}

.motion-reveal.is-inview {
    opacity: 1;
    transform: translate3d(0, 0, 0);
}

/* Hero — entrada em cascata */
.hero {
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: "";
    position: absolute;
    inset: -40% -20% auto -20%;
    height: 85%;
    background: radial-gradient(ellipse 70% 55% at 50% 0%, rgba(201, 162, 39, 0.18), transparent 70%);
    pointer-events: none;
    z-index: 0;
}

.hero-inner {
    position: relative;
    z-index: 1;
}

.hero-media-grid {
    opacity: 0;
    animation: motion-fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.04s forwards;
}

.hero-photo img {
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.8s ease;
}

.hero-inner:hover .hero-photo img {
    transform: scale(1.12);
    filter: blur(2px) saturate(1.18) contrast(1.12);
}

.hero-content {
    opacity: 0;
    animation: motion-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

.hero-content > * {
    opacity: 0;
    animation: motion-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-content > *:nth-child(1) {
    animation-delay: 0.22s;
}

.hero-content > *:nth-child(2) {
    animation-delay: 0.32s;
}

.hero-content > *:nth-child(3) {
    animation-delay: 0.42s;
}

.hero-content > .hero-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
    opacity: 1;
    animation: none;
}

.hero-content .hero-actions .btn {
    opacity: 0;
    animation: motion-fade-up 0.65s cubic-bezier(0.22, 1, 0.36, 1) forwards;
}

.hero-content .hero-actions .btn:nth-child(1) {
    animation-delay: 0.52s;
}

.hero-content .hero-actions .btn:nth-child(2) {
    animation-delay: 0.6s;
}

.hero-content .hero-actions .btn:nth-child(3) {
    animation-delay: 0.68s;
}

/* Cabeçalho ao rolar */
.site-header {
    transition:
        background 0.35s ease,
        box-shadow 0.35s ease,
        border-color 0.35s ease;
}

.site-header.is-scrolled {
    background: rgba(8, 10, 14, 0.94);
    box-shadow: 0 14px 40px rgba(0, 0, 0, 0.42);
    border-bottom-color: rgba(255, 255, 255, 0.06);
}

.logo {
    transition: color 0.2s ease, transform 0.25s ease;
}

.logo:hover {
    transform: scale(1.03);
}

.logo:active {
    transform: scale(0.98);
}

/* Menu — sublinhado suave */
.site-nav a:not(.nav-secondary) {
    position: relative;
    transition: color 0.2s ease;
}

.site-nav a:not(.nav-secondary)::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0.15rem;
    width: 100%;
    height: 2px;
    background: var(--accent);
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.28s cubic-bezier(0.22, 1, 0.36, 1);
    border-radius: 1px;
    opacity: 0.9;
}

.site-nav a:not(.nav-secondary):hover::after,
.site-nav a:not(.nav-secondary):focus-visible::after {
    transform: scaleX(1);
}

.site-nav .nav-secondary {
    transition:
        background 0.22s ease,
        border-color 0.22s ease,
        transform 0.2s ease,
        box-shadow 0.22s ease;
}

.site-nav .nav-secondary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.25);
}

/* Hambúrguer → X */
.nav-toggle {
    transition:
        background 0.2s ease,
        border-color 0.2s ease,
        transform 0.2s ease;
}

.nav-toggle:hover {
    background: var(--bg-elevated);
    border-color: rgba(201, 162, 39, 0.35);
}

.nav-toggle-bar {
    transition:
        transform 0.3s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.25s ease;
    transform-origin: center;
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) {
    transform: translateY(7px) rotate(45deg);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) {
    opacity: 0;
    transform: scaleX(0);
}

.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) {
    transform: translateY(-7px) rotate(-45deg);
}

/* Painel mobile */
@media (max-width: 720px) {
    .site-nav {
        transition:
            transform 0.32s cubic-bezier(0.22, 1, 0.36, 1),
            opacity 0.28s ease,
            visibility 0.28s ease;
    }

    .site-nav a {
        transition: background 0.2s ease, padding-left 0.22s ease;
    }

    .site-nav a:active {
        background: rgba(255, 255, 255, 0.04);
    }
}

/* Cards */
.card {
    transition:
        transform 0.35s cubic-bezier(0.22, 1, 0.36, 1),
        box-shadow 0.35s ease,
        border-color 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 48px rgba(0, 0, 0, 0.38);
    border-color: rgba(255, 255, 255, 0.12);
}

.card--featured:hover {
    transform: translateY(-8px);
    box-shadow:
        0 0 0 1px rgba(201, 162, 39, 0.28),
        0 24px 56px rgba(0, 0, 0, 0.5);
}

.card-artist-avatar {
    transition: transform 0.3s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}

a.card-artist-row:hover .card-artist-avatar {
    transform: scale(1.08);
    border-color: rgba(201, 162, 39, 0.45);
    box-shadow: 0 0 0 3px rgba(201, 162, 39, 0.12);
}

.card-spotify {
    transition:
        transform 0.22s ease,
        background 0.2s ease,
        box-shadow 0.25s ease;
}

.card-spotify:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px rgba(30, 215, 96, 0.35);
}

.card-spotify:active {
    transform: translateY(0) scale(0.98);
}

/* Botões hero */
.btn {
    transition:
        transform 0.22s ease,
        background 0.2s ease,
        border-color 0.2s ease,
        color 0.2s ease,
        box-shadow 0.25s ease;
}

.btn:hover {
    transform: translateY(-2px);
}

.btn:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:hover {
    box-shadow: 0 10px 32px rgba(201, 162, 39, 0.28);
}

/* Formulário */
.contact-form {
    transition: border-color 0.3s ease, box-shadow 0.3s ease;
}

.contact-form:focus-within {
    border-color: rgba(201, 162, 39, 0.25);
    box-shadow: 0 0 0 1px rgba(201, 162, 39, 0.12);
}

.contact-form input,
.contact-form textarea {
    transition:
        border-color 0.25s ease,
        box-shadow 0.25s ease,
        transform 0.2s ease;
}

.contact-form input:hover,
.contact-form textarea:hover {
    border-color: rgba(255, 255, 255, 0.14);
}

.contact-form input:focus,
.contact-form textarea:focus {
    transform: translateY(-1px);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
}

.form-feedback:not([hidden]) {
    animation: motion-feedback-pop 0.45s cubic-bezier(0.22, 1, 0.36, 1) both;
}

/* Rodapé */
.site-footer .footer-inner {
    transition: opacity 0.5s ease;
}

/* Página Sobre — lista */
.page-main li {
    transition: transform 0.22s ease, padding-left 0.22s ease;
}

.page-main li:hover {
    transform: translateX(4px);
}

.back-link {
    transition: color 0.2s ease, transform 0.2s ease;
}

.back-link:hover {
    transform: translateX(-3px);
}

/* Página Artistas (Spotify) */
body.page-spotify-artists .hero-inner > * {
    animation: none;
    opacity: 1;
}

body.page-spotify-artists .spotify-hero {
    position: relative;
    overflow: hidden;
}

body.page-spotify-artists .spotify-hero:not(.artist-hero)::before {
    content: "";
    position: absolute;
    inset: -30% -15% auto;
    height: 120%;
    background: radial-gradient(ellipse 80% 50% at 30% 0%, rgba(30, 215, 96, 0.08), transparent 65%);
    pointer-events: none;
    animation: motion-aurora 22s ease-in-out infinite alternate;
    opacity: 0.6;
}

body.page-spotify-artists .spotify-hero-title,
body.page-spotify-artists .spotify-hero-eyebrow,
body.page-spotify-artists .spotify-hero-lead {
    position: relative;
    z-index: 1;
}

body.page-spotify-artists .artist-hero-bg,
.home-artists-embed .artist-hero-bg {
    opacity: 0;
    animation: motion-fade-up 0.9s cubic-bezier(0.22, 1, 0.36, 1) 0.05s forwards;
}

body.page-spotify-artists .artist-hero-content,
.home-artists-embed .artist-hero-content {
    opacity: 0;
    animation: motion-fade-up 0.75s cubic-bezier(0.22, 1, 0.36, 1) 0.14s forwards;
}

body.page-spotify-artists .artist-hero-tile,
.home-artists-embed .artist-hero-tile {
    transition:
        transform 0.55s cubic-bezier(0.22, 1, 0.36, 1),
        opacity 0.35s ease,
        box-shadow 0.35s ease;
}

body.page-spotify-artists .artist-hero-tile img,
.home-artists-embed .artist-hero-tile img {
    transition: transform 0.8s cubic-bezier(0.22, 1, 0.36, 1), filter 0.6s ease;
}

body.page-spotify-artists .artist-hero:hover .artist-hero-tile,
.home-artists-embed .artist-hero:hover .artist-hero-tile {
    opacity: 0.9;
}

body.page-spotify-artists .artist-hero:hover .artist-hero-tile:nth-child(odd),
.home-artists-embed .artist-hero:hover .artist-hero-tile:nth-child(odd) {
    transform: translateY(-5px);
}

body.page-spotify-artists .artist-hero:hover .artist-hero-tile:nth-child(even),
.home-artists-embed .artist-hero:hover .artist-hero-tile:nth-child(even) {
    transform: translateY(5px);
}

body.page-spotify-artists .artist-hero:hover .artist-hero-tile img,
.home-artists-embed .artist-hero:hover .artist-hero-tile img {
    transform: scale(1.13);
    filter: blur(1.7px) saturate(1.3) contrast(1.12);
}

body.page-spotify-artists .artist-hero-stats div,
.home-artists-embed .artist-hero-stats div {
    transition: transform 0.25s ease, border-color 0.25s ease, background 0.25s ease;
}

body.page-spotify-artists .artist-hero-stats div:hover,
.home-artists-embed .artist-hero-stats div:hover {
    transform: translateY(-3px);
    border-color: rgba(30, 215, 96, 0.24);
    background: rgba(30, 215, 96, 0.08);
}

body.page-spotify-artists .spotify-cover-art,
.home-artists-embed .spotify-cover-art {
    overflow: hidden;
    transition: box-shadow 0.35s ease, transform 0.35s ease;
}

body.page-spotify-artists .spotify-cover-link:hover .spotify-cover-art,
.home-artists-embed .spotify-cover-link:hover .spotify-cover-art {
    box-shadow: 0 16px 40px rgba(0, 0, 0, 0.55);
    transform: translateY(-4px);
}

body.page-spotify-artists .spotify-cover-art img,
body.page-spotify-artists .spotify-cover-placeholder,
.home-artists-embed .spotify-cover-art img,
.home-artists-embed .spotify-cover-placeholder {
    transition: transform 0.45s cubic-bezier(0.22, 1, 0.36, 1);
}

body.page-spotify-artists .spotify-cover-link:hover .spotify-cover-art img,
body.page-spotify-artists .spotify-cover-link:hover .spotify-cover-placeholder,
.home-artists-embed .spotify-cover-link:hover .spotify-cover-art img,
.home-artists-embed .spotify-cover-link:hover .spotify-cover-placeholder {
    transform: scale(1.06);
}

body.page-spotify-artists .spotify-avatar,
.home-artists-embed .spotify-avatar {
    transition: transform 0.35s ease, box-shadow 0.35s ease;
}

body.page-spotify-artists .spotify-artist-card:hover .spotify-avatar,
.home-artists-embed .spotify-artist-card:hover .spotify-avatar {
    transform: scale(1.04);
    box-shadow: 0 16px 56px rgba(0, 0, 0, 0.6);
}

body.page-spotify-artists .spotify-btn,
.home-artists-embed .spotify-btn {
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, box-shadow 0.25s ease;
}

body.page-spotify-artists .spotify-btn:hover,
.home-artists-embed .spotify-btn:hover {
    transform: translateY(-2px);
}

body.page-spotify-artists .spotify-btn:active,
.home-artists-embed .spotify-btn:active {
    transform: translateY(0) scale(0.98);
}

body.page-spotify-artists .spotify-btn--primary:hover,
.home-artists-embed .spotify-btn--primary:hover {
    box-shadow: 0 10px 36px rgba(30, 215, 96, 0.35);
}

/* Fundo do body — leve respiração (site principal) */
body:not(.page-spotify-artists)::before {
    content: "";
    position: fixed;
    inset: 0;
    pointer-events: none;
    z-index: -1;
    background: radial-gradient(ellipse 100% 80% at 50% -30%, rgba(201, 162, 39, 0.1), transparent 55%),
        radial-gradient(ellipse 60% 50% at 100% 40%, rgba(30, 58, 95, 0.15), transparent 50%);
    animation: motion-aurora 28s ease-in-out infinite alternate;
    opacity: 0.85;
}

/* prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .motion-reveal,
    .motion-reveal.is-inview {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }

    .hero-media-grid,
    .hero-content,
    .hero-content > *,
    .hero-content .hero-actions .btn,
    body.page-spotify-artists .artist-hero-bg,
    body.page-spotify-artists .artist-hero-content,
    .home-artists-embed .artist-hero-bg,
    .home-artists-embed .artist-hero-content {
        opacity: 1 !important;
        animation: none !important;
    }

    .hero::before,
    body:not(.page-spotify-artists)::before,
    body.page-spotify-artists .spotify-hero::before {
        animation: none !important;
    }

    .card:hover,
    .card--featured:hover {
        transform: none;
    }

    .site-nav a:not(.nav-secondary)::after {
        transition: none;
    }

    .form-feedback:not([hidden]) {
        animation: none;
    }
}
