/* ═══════════════════════════════════════════════════════
   DESTINO DEL ALMA — Animations & Effects
   ═══════════════════════════════════════════════════════ */

/* ─── Keyframes ─── */
@keyframes pulse-light {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.6; transform: scale(1.3); }
}

@keyframes rotate-slow {
    from { transform: translate(-50%, -50%) rotate(0deg); }
    to { transform: translate(-50%, -50%) rotate(360deg); }
}

@keyframes shimmer {
    0% { transform: translateX(-100%) rotate(45deg); }
    100% { transform: translateX(100%) rotate(45deg); }
}

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

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes glow-pulse {
    0%, 100% { 
        box-shadow: 0 0 20px rgba(212, 168, 67, 0.2);
    }
    50% { 
        box-shadow: 0 0 40px rgba(212, 168, 67, 0.4), 0 0 60px rgba(212, 168, 67, 0.1);
    }
}

@keyframes emanation-flow {
    0% { background-position: 0% 0%; }
    100% { background-position: 0% 100%; }
}

@keyframes star-twinkle {
    0%, 100% { opacity: 0.3; }
    50% { opacity: 1; }
}

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

@keyframes breathe {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.05); opacity: 1; }
}

/* ─── Scroll-triggered animations ─── */
.animate-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }
.delay-5 { transition-delay: 0.5s; }

/* ─── Hero eye animation ─── */
.hero-sacred-eye {
    animation: float 6s ease-in-out infinite;
}

.eye-diamond {
    animation: breathe 4s ease-in-out infinite;
}

/* ─── Emanation nodes entrance ─── */
.emanation-node {
    opacity: 0;
    transform: translateY(20px) scale(0.95);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

.emanation-node.visible {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.emanation-line {
    opacity: 0;
    transform: scaleY(0);
    transform-origin: top;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

.emanation-line.visible {
    opacity: 1;
    transform: scaleY(1);
}

/* ─── Card hover effects ─── */
.tradition-card,
.pack-card,
.gnostic-feature-card,
.why-card {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease, transform 0.6s ease, 
                border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
}

.tradition-card.visible,
.pack-card.visible,
.gnostic-feature-card.visible,
.why-card.visible {
    opacity: 1;
    transform: translateY(0);
}

/* ─── Glow effect on featured items ─── */
.tradition-card.featured {
    animation: glow-pulse 4s ease-in-out infinite;
}

.pack-card.ultimate {
    animation: glow-pulse 4s ease-in-out infinite;
}

/* ─── Loading screen ─── */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--bg-primary);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    transition: opacity 0.8s ease, visibility 0.8s ease;
}

.loading-screen.hidden {
    opacity: 0;
    visibility: hidden;
}

.loading-symbol {
    font-size: 48px;
    color: var(--gold-primary);
    animation: breathe 2s ease-in-out infinite;
    margin-bottom: 20px;
}

.loading-text {
    font-family: var(--font-display);
    font-size: 14px;
    color: var(--gold-muted);
    letter-spacing: 4px;
    text-transform: uppercase;
    animation: fadeIn 1s ease-in-out infinite alternate;
}

/* ─── Smooth scroll indicator ─── */
.scroll-indicator {
    position: absolute;
    bottom: 30px;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 8px;
    animation: float 3s ease-in-out infinite;
}

.scroll-indicator span {
    font-size: 10px;
    color: var(--text-dim);
    letter-spacing: 2px;
    text-transform: uppercase;
}

.scroll-arrow {
    width: 24px;
    height: 24px;
    border-right: 2px solid var(--gold-muted);
    border-bottom: 2px solid var(--gold-muted);
    transform: rotate(45deg);
    opacity: 0.5;
}

/* ─── Staggered card animations ─── */
.traditions-grid .tradition-card:nth-child(1) { transition-delay: 0.05s; }
.traditions-grid .tradition-card:nth-child(2) { transition-delay: 0.1s; }
.traditions-grid .tradition-card:nth-child(3) { transition-delay: 0.15s; }
.traditions-grid .tradition-card:nth-child(4) { transition-delay: 0.2s; }
.traditions-grid .tradition-card:nth-child(5) { transition-delay: 0.25s; }
.traditions-grid .tradition-card:nth-child(6) { transition-delay: 0.3s; }
.traditions-grid .tradition-card:nth-child(7) { transition-delay: 0.35s; }
.traditions-grid .tradition-card:nth-child(8) { transition-delay: 0.4s; }

.packs-grid .pack-card:nth-child(1) { transition-delay: 0.05s; }
.packs-grid .pack-card:nth-child(2) { transition-delay: 0.1s; }
.packs-grid .pack-card:nth-child(3) { transition-delay: 0.15s; }
.packs-grid .pack-card:nth-child(4) { transition-delay: 0.2s; }
.packs-grid .pack-card:nth-child(5) { transition-delay: 0.25s; }
.packs-grid .pack-card:nth-child(6) { transition-delay: 0.3s; }
.packs-grid .pack-card:nth-child(7) { transition-delay: 0.35s; }
.packs-grid .pack-card:nth-child(8) { transition-delay: 0.4s; }
.packs-grid .pack-card:nth-child(9) { transition-delay: 0.45s; }
.packs-grid .pack-card:nth-child(10) { transition-delay: 0.5s; }
.packs-grid .pack-card:nth-child(11) { transition-delay: 0.55s; }
.packs-grid .pack-card:nth-child(12) { transition-delay: 0.6s; }

.emanation-node:nth-child(1) { transition-delay: 0.1s; }
.emanation-node:nth-child(3) { transition-delay: 0.2s; }
.emanation-node:nth-child(5) { transition-delay: 0.3s; }
.emanation-node:nth-child(7) { transition-delay: 0.4s; }
.emanation-node:nth-child(9) { transition-delay: 0.5s; }
.emanation-node:nth-child(11) { transition-delay: 0.6s; }
.emanation-node:nth-child(13) { transition-delay: 0.7s; }
.emanation-node:nth-child(15) { transition-delay: 0.8s; }

.emanation-line:nth-child(2) { transition-delay: 0.15s; }
.emanation-line:nth-child(4) { transition-delay: 0.25s; }
.emanation-line:nth-child(6) { transition-delay: 0.35s; }
.emanation-line:nth-child(8) { transition-delay: 0.45s; }
.emanation-line:nth-child(10) { transition-delay: 0.55s; }
.emanation-line:nth-child(12) { transition-delay: 0.65s; }
.emanation-line:nth-child(14) { transition-delay: 0.75s; }

/* ─── Selection styles ─── */
::selection {
    background: rgba(212, 168, 67, 0.3);
    color: var(--text-primary);
}

/* ─── Scrollbar ─── */
::-webkit-scrollbar {
    width: 6px;
}
::-webkit-scrollbar-track {
    background: var(--bg-primary);
}
::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 3px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--gold-dark);
}