/* ═══════════════════════════════════════════════════════════════
   FABULA KINOAU — WHIMSY MAGIC STYLES
   Shimmer, Holographic, Aura, Crystal effects
   ═══════════════════════════════════════════════════════════════ */

/* ─── 1. HOLOGRAPHIC SHIMMER ON SECTION TITLES ─── */
.section-title {
    position: relative;
    background: linear-gradient(
        90deg,
        var(--clr-text) 0%,
        var(--clr-text) 35%,
        #fbbf24 45%,
        var(--clr-accent) 50%,
        var(--clr-accent2) 55%,
        var(--clr-text) 65%,
        var(--clr-text) 100%
    );
    background-size: 300% 100%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: holographicShimmer 6s ease-in-out infinite;
}

@keyframes holographicShimmer {
    0%, 100% { background-position: 100% 50%; }
    50% { background-position: 0% 50%; }
}

/* ─── 2. HERO HEADLINE AURA ─── */
.hero h1 .line-2 {
    text-shadow: none;
    filter: drop-shadow(0 0 30px rgba(167, 139, 250, 0.3))
            drop-shadow(0 0 60px rgba(244, 114, 182, 0.15));
}

.hero h1 .line-1 {
    text-shadow: 0 0 40px rgba(200, 200, 255, 0.08);
}

/* Pulsating aura behind hero headline */
.hero h1 {
    position: relative;
}
.hero h1::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 120%;
    height: 150%;
    background: radial-gradient(
        ellipse at center,
        rgba(167, 139, 250, 0.08) 0%,
        rgba(244, 114, 182, 0.04) 40%,
        transparent 70%
    );
    animation: auraPulse 4s ease-in-out infinite;
    pointer-events: none;
    z-index: -1;
}

@keyframes auraPulse {
    0%, 100% { opacity: 0.6; transform: translate(-50%, -50%) scale(1); }
    50% { opacity: 1; transform: translate(-50%, -50%) scale(1.1); }
}

/* ─── 3. CRYSTAL LIGHT REFRACTION ON GLASSMORPHISM CARDS ─── */
.cat-card {
    position: relative;
}

.cat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(
        from 0deg at 30% 30%,
        transparent 0deg,
        rgba(167, 139, 250, 0.06) 60deg,
        transparent 120deg,
        rgba(244, 114, 182, 0.04) 200deg,
        transparent 260deg,
        rgba(251, 191, 36, 0.03) 320deg,
        transparent 360deg
    );
    opacity: 0;
    transition: opacity 0.8s ease, transform 4s linear;
    pointer-events: none;
    will-change: opacity;
}

.cat-card:hover::after {
    opacity: 1;
    animation: crystalRotate 8s linear infinite;
}

@keyframes crystalRotate {
    to { transform: rotate(360deg); }
}

/* Prismatic edge highlight on hover */
.cat-card:hover {
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(167, 139, 250, 0.08),
        inset 0 1px 0 rgba(255, 255, 255, 0.06),
        inset 0 0 20px rgba(167, 139, 250, 0.03);
}

/* ─── 4. SHIMMER SWEEP ON BUTTONS ─── */
.btn-primary {
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 80%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.08),
        rgba(255, 255, 255, 0.18),
        rgba(255, 255, 255, 0.08),
        transparent
    );
    transform: skewX(-20deg);
    animation: btnShimmer 4s ease-in-out infinite;
    pointer-events: none;
}

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

/* ─── 5. STORY CARD SHIMMER LINE ─── */
.story-card {
    position: relative;
    overflow: hidden;
}

.story-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--clr-accent), var(--clr-accent2), transparent);
    transition: left 0.8s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 2;
}

.story-card:hover::before {
    left: 100%;
}

/* ─── 6. STAT NUMBERS GLOW ─── */
.stat-number {
    position: relative;
    filter: drop-shadow(0 0 15px rgba(167, 139, 250, 0.3));
}

.stat-item:hover .stat-number {
    filter: drop-shadow(0 0 25px rgba(167, 139, 250, 0.5))
            drop-shadow(0 0 50px rgba(244, 114, 182, 0.2));
    transition: filter 0.5s ease;
}

/* ─── 7. CTA BOX ENHANCED GLOW ─── */
.cta-box {
    position: relative;
}

.cta-box::after {
    content: '';
    position: absolute;
    inset: 2px;
    border-radius: 30px;
    background: var(--clr-bg);
    z-index: -1;
    box-shadow: inset 0 0 60px rgba(167, 139, 250, 0.04),
                inset 0 0 120px rgba(244, 114, 182, 0.02);
}

/* ─── 8. SECTION LABEL SPARKLE ─── */
.section-label {
    position: relative;
}

.section-label::after {
    content: '';
    display: inline-block;
    width: 4px;
    height: 4px;
    background: var(--clr-gold);
    border-radius: 50%;
    margin-left: 8px;
    box-shadow: 0 0 6px var(--clr-gold), 0 0 12px var(--clr-gold);
    animation: labelSparkle 2s ease-in-out infinite;
}

@keyframes labelSparkle {
    0%, 100% { opacity: 0.4; transform: scale(0.8); }
    50% { opacity: 1; transform: scale(1.3); }
}

/* ─── 9. HERO BADGE SUBTLE GLOW ─── */
.hero-badge {
    box-shadow: 0 0 20px rgba(52, 211, 153, 0.08),
                0 0 40px rgba(52, 211, 153, 0.04);
}

/* ─── 10. NAVIGATION LOGO SHIMMER ─── */
.logo-text {
    position: relative;
    background-size: 200% auto;
    animation: logoShimmer 5s ease-in-out infinite;
}

@keyframes logoShimmer {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 100% center; }
}

/* ─── 11. WHIMSY TITLE REVEAL ANIMATION ─── */
.whimsy-title-revealed {
    animation: titleRevealGlow 1.5s ease-out;
}

@keyframes titleRevealGlow {
    0% { filter: brightness(1); }
    30% { filter: brightness(1.3) drop-shadow(0 0 20px rgba(167, 139, 250, 0.4)); }
    100% { filter: brightness(1); }
}

/* ─── 12. DIVIDER ENHANCED GLOW ─── */
.divider {
    position: relative;
    overflow: visible;
}

.divider::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 200px;
    height: 1px;
    background: radial-gradient(ellipse, rgba(167, 139, 250, 0.5), transparent);
    filter: blur(1px);
    animation: dividerPulse 4s ease-in-out infinite;
}

@keyframes dividerPulse {
    0%, 100% { opacity: 0.3; width: 200px; }
    50% { opacity: 0.7; width: 300px; }
}

/* ─── 13. HERO CONTAINER SMOOTH TRANSITION FOR PARALLAX ─── */
.hero .container {
    transition: transform 0.15s ease-out;
    will-change: transform;
}

.hero-decoration {
    transition: transform 0.2s ease-out;
    will-change: transform;
}

/* ─── REDUCED MOTION ─── */
@media (prefers-reduced-motion: reduce) {
    .section-title,
    .logo-text {
        animation: none !important;
        background-size: 100% 100% !important;
    }

    .hero h1::before,
    .cat-card::after,
    .btn-primary::before,
    .story-card::before,
    .section-label::after,
    .divider::after {
        animation: none !important;
        display: none !important;
    }

    .whimsy-title-revealed {
        animation: none !important;
    }

    #fairyDust {
        display: none !important;
    }
}
