/*
 * effects.css — PoManOS Visual Effects Layer
 * Owns: ambient atmosphere, conversion CTA polish, scroll fade-in, hover glows, badges.
 * Does NOT own: layout, typography, component structure (those live in each page's <style>).
 *
 * All animations use CSS only or a tiny IntersectionObserver in effects.js.
 * No heavy libraries. GPU-accelerated transforms + opacity only.
 */

/* ═══════════════════════════════════════════════
   HERO SECTION — Animated Gradient Atmosphere
═══════════════════════════════════════════════ */

/*
 * Contain the aurora inside its section — without overflow:hidden the
 * animated pseudo-element bleeds past the hero bounds, and Chrome
 * recalculates body overflow-x clipping every frame → sub-pixel text jitter.
 */
.hero,
.hero-pitch {
    overflow: hidden;
}

/* Animated radial aurora behind hero text */
.hero::before,
.hero-pitch::before {
    content: '';
    position: absolute;
    inset: -60px;
    background:
        radial-gradient(ellipse 60% 50% at 30% 40%, rgba(200,168,78,0.09) 0%, transparent 65%),
        radial-gradient(ellipse 50% 40% at 70% 60%, rgba(232,145,58,0.07) 0%, transparent 60%),
        radial-gradient(ellipse 40% 60% at 50% 20%, rgba(200,168,78,0.05) 0%, transparent 55%);
    animation: heroAurora 8s ease-in-out infinite alternate;
    pointer-events: none;
    z-index: 0;
    border-radius: 50%;
    /* Force own GPU layer so transform/opacity changes never repaint text */
    will-change: transform, opacity;
}

@keyframes heroAurora {
    0%   { transform: scale(1) rotate(0deg); opacity: 0.7; }
    50%  { transform: scale(1.08) rotate(3deg); opacity: 1; }
    100% { transform: scale(0.96) rotate(-2deg); opacity: 0.8; }
}

/* Make hero content sit above the aurora */
.hero > *,
.hero-pitch > * {
    position: relative;
    z-index: 1;
}

/* ═══════════════════════════════════════════════
   CONVERSION CTAs — Glowing Pulse Effect
═══════════════════════════════════════════════ */

/* Primary money buttons: hero-cta, btn-gold, any .cta-pulse */
.hero-cta,
.btn-gold,
.nav-sub-btn,
.cta-pulse {
    position: relative;
    overflow: visible !important;
}

/* Outer glow ring that pulses */
.hero-cta::after,
.btn-gold::after,
.cta-pulse::after {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: inherit;
    background: linear-gradient(135deg, #C8A84E, #E8913A);
    opacity: 0;
    z-index: -1;
    filter: blur(8px);
    animation: ctaPulse 2.8s ease-in-out infinite;
}

@keyframes ctaPulse {
    0%, 100% { opacity: 0; transform: scale(0.95); }
    50%       { opacity: 0.45; transform: scale(1.04); }
}

/* Subtle shimmer sweep across the button surface */
.hero-cta::before,
.btn-gold::before,
.cta-pulse::before {
    content: '';
    position: absolute;
    top: 0; left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.18), transparent);
    transform: skewX(-20deg);
    animation: btnShimmer 3.5s ease-in-out infinite;
    pointer-events: none;
    z-index: 1;
    border-radius: inherit;
}

@keyframes btnShimmer {
    0%   { left: -100%; }
    40%  { left: 150%; }
    100% { left: 150%; }
}

/* ═══════════════════════════════════════════════
   PRICING / SERVICE CARDS — Glow Shimmer
═══════════════════════════════════════════════ */

.service-card,
.pricing-card,
.tier-card,
.plan-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease !important;
}

.service-card:hover,
.pricing-card:hover,
.tier-card:hover,
.plan-card:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 16px 48px rgba(200,168,78,0.18), 0 4px 16px rgba(0,0,0,0.4) !important;
    border-color: rgba(200,168,78,0.35) !important;
}

/* Animated top-edge gold glow on pricing cards */
.service-card::before,
.pricing-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, rgba(200,168,78,0.6), rgba(232,145,58,0.5), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: inherit;
}

.service-card:hover::before,
.pricing-card:hover::before {
    opacity: 1;
}

/* ═══════════════════════════════════════════════
   FEATURE / PRODUCT CARDS — Lift + Glow on Hover
═══════════════════════════════════════════════ */

.feature-card,
.beat-card,
.song-card,
.merch-card,
.event-card,
.artist-card,
.video-card,
.card-hover-glow {
    transition: transform 0.28s ease, box-shadow 0.28s ease, border-color 0.28s ease !important;
}

.feature-card:hover,
.beat-card:hover,
.song-card:hover,
.merch-card:hover,
.event-card:hover,
.card-hover-glow:hover {
    transform: translateY(-4px) !important;
    box-shadow: 0 12px 36px rgba(200,168,78,0.15), 0 2px 8px rgba(0,0,0,0.5) !important;
}

.artist-card:hover {
    box-shadow: 0 12px 36px rgba(200,168,78,0.2), 0 4px 16px rgba(0,0,0,0.4) !important;
}

/* ═══════════════════════════════════════════════
   "NEW" / "HOT" BADGES
═══════════════════════════════════════════════ */

.badge-new,
.badge-hot,
.badge-live {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    font-family: 'Syne', sans-serif;
    font-size: 0.58rem;
    font-weight: 800;
    letter-spacing: 1.5px;
    text-transform: uppercase;
    padding: 3px 8px;
    border-radius: 6px;
    vertical-align: middle;
    margin-left: 6px;
    animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1) both;
}

.badge-new {
    background: linear-gradient(135deg, #C8A84E, #E8D48B);
    color: #080808;
    box-shadow: 0 2px 8px rgba(200,168,78,0.5);
}

.badge-hot {
    background: linear-gradient(135deg, #E8913A, #FF6B35);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,145,58,0.5);
    animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1) both, hotPulse 2s ease-in-out 0.5s infinite;
}

.badge-live {
    background: linear-gradient(135deg, #E85D5D, #ff4444);
    color: #fff;
    box-shadow: 0 2px 8px rgba(232,93,93,0.5);
    animation: badgePop 0.4s cubic-bezier(0.34,1.56,0.64,1) both, hotPulse 1.5s ease-in-out 0.3s infinite;
}

@keyframes badgePop {
    from { transform: scale(0.5); opacity: 0; }
    to   { transform: scale(1); opacity: 1; }
}

@keyframes hotPulse {
    0%, 100% { box-shadow: 0 2px 8px rgba(232,145,58,0.4); }
    50%       { box-shadow: 0 2px 16px rgba(232,145,58,0.8); }
}

/* ═══════════════════════════════════════════════
   SCROLL FADE-IN ANIMATIONS (JS-driven via effects.js)
═══════════════════════════════════════════════ */

.fade-up {
    opacity: 0;
    transform: translateY(28px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.fade-up.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered delay for children */
.fade-up-stagger > * {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.fade-up-stagger.visible > *:nth-child(1) { opacity: 1; transform: none; transition-delay: 0.05s; }
.fade-up-stagger.visible > *:nth-child(2) { opacity: 1; transform: none; transition-delay: 0.12s; }
.fade-up-stagger.visible > *:nth-child(3) { opacity: 1; transform: none; transition-delay: 0.19s; }
.fade-up-stagger.visible > *:nth-child(4) { opacity: 1; transform: none; transition-delay: 0.26s; }
.fade-up-stagger.visible > *:nth-child(5) { opacity: 1; transform: none; transition-delay: 0.33s; }
.fade-up-stagger.visible > *:nth-child(6) { opacity: 1; transform: none; transition-delay: 0.40s; }
.fade-up-stagger.visible > *:nth-child(n+7) { opacity: 1; transform: none; transition-delay: 0.46s; }

/* ═══════════════════════════════════════════════
   SECTION DIVIDERS — Animated Shimmer Line
═══════════════════════════════════════════════ */

.shimmer-divider {
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(200,168,78,0) 10%,
        rgba(200,168,78,0.4) 50%,
        rgba(232,145,58,0.3) 60%,
        rgba(200,168,78,0) 90%,
        transparent 100%);
    background-size: 200% 100%;
    animation: shimmerSlide 4s ease-in-out infinite;
    margin: 0;
    border: none;
}

@keyframes shimmerSlide {
    0%   { background-position: 200% center; }
    100% { background-position: -200% center; }
}

/* ═══════════════════════════════════════════════
   NAV CTA — Extra Pop
═══════════════════════════════════════════════ */

.nav-cta-primary,
a.nav-cta-primary {
    animation: navCtaGlow 3s ease-in-out infinite;
}

@keyframes navCtaGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,168,78,0); }
    50%       { box-shadow: 0 0 12px 2px rgba(200,168,78,0.3); }
}

/* ═══════════════════════════════════════════════
   SUBSCRIBE / STREAM BUTTON — Persistent Attention
═══════════════════════════════════════════════ */

/* Applied to the $4.99/mo subscribe button on stream page */
.nav-sub-btn {
    animation: subBtnPulse 2.4s ease-in-out infinite !important;
}

@keyframes subBtnPulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(200,168,78,0.5); }
    50%       { box-shadow: 0 0 0 6px rgba(200,168,78,0); }
}

/* ═══════════════════════════════════════════════
   PERFORMANCE / MOBILE SAFETY
═══════════════════════════════════════════════ */

/* Respect reduced-motion preference */
@media (prefers-reduced-motion: reduce) {
    .hero::before,
    .hero-pitch::before,
    .hero-cta::after,
    .btn-gold::after,
    .hero-cta::before,
    .btn-gold::before,
    .cta-pulse::after,
    .cta-pulse::before,
    .badge-hot,
    .badge-live,
    .nav-cta-primary,
    .nav-sub-btn,
    .shimmer-divider {
        animation: none !important;
    }

    .fade-up,
    .fade-up-stagger > * {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}

/* On very small screens, dial back the aurora intensity */
@media (max-width: 480px) {
    .hero::before,
    .hero-pitch::before {
        opacity: 0.5;
    }

    .hero-cta::after,
    .btn-gold::after,
    .cta-pulse::after {
        filter: blur(6px);
    }
}
