/* EFV Animations - High Performance Motion System */

/* Rotating Sacred Geometry */
@keyframes rotateRing {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(360deg);
    }
}

@keyframes logoRotate {
    from {
        transform: scale(1.1) rotate(0deg);
    }

    to {
        transform: scale(1.1) rotate(360deg);
    }
}

.spinning-logo {
    animation: logoRotate 20s linear infinite;
}

@keyframes revolveLogo {
    0% {
        transform: scale(1.1) rotateY(0deg);
    }

    100% {
        transform: scale(1.1) rotateY(360deg);
    }
}

.revolving-logo {
    animation: revolveLogo 12s linear infinite;
    transform-style: preserve-3d;
}

@keyframes rotateRingInverse {
    0% {
        transform: rotate(0deg);
    }

    100% {
        transform: rotate(-360deg);
    }
}

.sacred-circle {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 80vw);
    height: min(600px, 80vw);
    opacity: 0.15;
    pointer-events: none;
    z-index: 1;
}

.ring {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-energy);
    border-radius: 50%;
}

.ring-inner {
    width: 80%;
    height: 80%;
    top: 10%;
    left: 10%;
    animation: rotateRing 25s linear infinite;
}

.ring-mid {
    width: 90%;
    height: 90%;
    top: 5%;
    left: 5%;
    animation: rotateRingInverse 35s linear infinite;
    border-style: dashed;
    opacity: 0.6;
}

.ring-outer {
    width: 100%;
    height: 100%;
    animation: rotateRing 45s linear infinite;
    border-width: 0.5px;
    opacity: 0.3;
}

/* Floating Animation - Natural buoyancy */
@keyframes float {
    0% {
        transform: translateY(0px) rotate(0deg);
    }

    33% {
        transform: translateY(-15px) rotate(1deg);
    }

    66% {
        transform: translateY(5px) rotate(-1deg);
    }

    100% {
        transform: translateY(0px) rotate(0deg);
    }
}

.float {
    animation: float 8s ease-in-out infinite;
}

/* Glow Pulse - Energy radiating */
@keyframes glowPulse {
    0% {
        box-shadow: 0 0 10px var(--glow-gold);
    }

    50% {
        box-shadow: 0 0 30px var(--gold-energy);
    }

    100% {
        box-shadow: 0 0 10px var(--glow-gold);
    }
}

.glow-pulse {
    animation: glowPulse 4s ease-in-out infinite;
}

/* Scroll Reveal - Cinematic blur-to-focus */
.reveal {
    opacity: 0;
    transform: translateY(50px) scale(0.97);
    transition:
        opacity 1.5s cubic-bezier(0.16, 1, 0.3, 1),
        transform 1.5s cubic-bezier(0.16, 1, 0.3, 1);
    will-change: opacity, transform;
}

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

/* Text Masking effect for headers */
@keyframes maskReveal {
    0% {
        clip-path: inset(0 100% 0 0);
        transform: translateX(-20px);
    }

    100% {
        clip-path: inset(0 0 0 0);
        transform: translateX(0);
    }
}

.mask-reveal {
    animation: maskReveal 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* ========================================
   ADVANCED HEADING TEXT ANIMATIONS
   ======================================== */

/* 1. Text Reveal Split - Character-by-character reveal */
@keyframes textRevealChar {
    0% {
        opacity: 0;
        transform: translateY(30px) rotateX(-90deg);
    }

    100% {
        opacity: 1;
        transform: translateY(0) rotateX(0);
    }
}

.text-reveal-split {
    display: inline-block;
    animation: textRevealChar 0.8s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 2. Gradient Wipe - Animated gradient text effect */
@keyframes gradientWipe {
    0% {
        background-position: -200% center;
        opacity: 0;
        transform: scale(0.95);
    }

    50% {
        opacity: 1;
    }

    100% {
        background-position: 200% center;
        transform: scale(1);
    }
}

.gradient-wipe {
    background: linear-gradient(90deg,
            rgba(255, 211, 105, 0.3) 0%,
            var(--gold-energy) 25%,
            #fff 50%,
            var(--gold-energy) 75%,
            rgba(255, 211, 105, 0.3) 100%);
    background-size: 200% auto;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradientWipe 2.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 3. Glow Pulse Text - Pulsing golden glow */
@keyframes glowPulseText {
    0% {
        text-shadow:
            0 0 10px rgba(255, 211, 105, 0.3),
            0 0 20px rgba(255, 211, 105, 0.2);
        opacity: 0;
        transform: scale(0.9);
    }

    50% {
        text-shadow:
            0 0 30px rgba(255, 211, 105, 0.8),
            0 0 60px rgba(255, 211, 105, 0.4),
            0 0 90px rgba(255, 211, 105, 0.2);
    }

    100% {
        text-shadow:
            0 0 20px rgba(255, 211, 105, 0.6),
            0 0 40px rgba(255, 211, 105, 0.3);
        opacity: 1;
        transform: scale(1);
    }
}

.glow-pulse-text {
    animation: glowPulseText 1.5s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 4. Slide Blur In - Slide from side with blur-to-focus */
@keyframes slideBlurIn {
    0% {
        opacity: 0;
        transform: translateX(-60px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
    }
}

.slide-blur-in {
    animation: slideBlurIn 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 5. Letter Expand - Letter spacing expansion */
@keyframes letterExpand {
    0% {
        letter-spacing: -0.1em;
        opacity: 0;
        transform: scale(0.8);
    }

    100% {
        letter-spacing: normal;
        opacity: 1;
        transform: scale(1);
    }
}

.letter-expand {
    animation: letterExpand 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

/* 6. Underline Draw - Animated underline effect */
@keyframes underlineDraw {
    0% {
        width: 0;
        opacity: 0;
    }

    100% {
        width: 100%;
        opacity: 1;
    }
}

.underline-draw {
    position: relative;
    display: inline-block;
}

.underline-draw::after {
    content: '';
    position: absolute;
    bottom: -10px;
    left: 0;
    height: 3px;
    width: 0;
    background: linear-gradient(90deg, var(--gold-energy), rgba(255, 211, 105, 0.3));
    box-shadow: 0 0 15px var(--gold-energy);
    border-radius: 10px;
    animation: underlineDraw 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
}

/* 7. Float Ethereal - Enhanced floating for hero text */
@keyframes floatEthereal {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-20px);
    }
}

.float-ethereal {
    animation: floatEthereal 6s ease-in-out infinite;
}

/* 8. Scale Fade In - Scale up with fade */
@keyframes scaleFadeIn {
    0% {
        opacity: 0;
        transform: scale(0.85);
    }

    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.scale-fade-in {
    animation: scaleFadeIn 1.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}


/* Shine Effect - Premium light sweep */
@keyframes shine {
    0% {
        left: -100%;
        opacity: 0;
    }

    50% {
        opacity: 0.2;
    }

    100% {
        left: 100%;
        opacity: 0;
    }
}

.shine-box {
    position: relative;
    overflow: hidden;
}

.shine-box::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 60%;
    height: 100%;
    background: linear-gradient(120deg,
            transparent,
            rgba(255, 211, 105, 0.2),
            transparent);
    transform: skewX(-25deg);
    animation: shine 5s cubic-bezier(0.4, 0, 0.2, 1) infinite;
    z-index: 2;
    pointer-events: none;
}

/* Magnetic Interaction */
.magnetic {
    transition: transform 0.4s cubic-bezier(0.23, 1, 0.32, 1);
}

.magnetic:hover {
    transform: translateY(-8px) scale(1.03);
    z-index: 10;
}

/* Custom Delay classes for staggered reveals */
.delay-1 {
    transition-delay: 0.1s !important;
}

.delay-2 {
    transition-delay: 0.2s !important;
}

.delay-3 {
    transition-delay: 0.3s !important;
}

.delay-4 {
    transition-delay: 0.4s !important;
}

/* Underline Animation */
.wave-underline {
    position: relative;
    padding-bottom: 12px;
}

.wave-underline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 60px;
    height: 3px;
    background: var(--gold-energy);
    box-shadow: 0 0 15px var(--gold-energy);
    border-radius: 10px;
}

/* Page-Specific Unique Geometries */

/* 1. About - Lotus Bloom */
.lotus-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: min(600px, 90vw);
    height: min(600px, 90vw);
    opacity: 0.12;
    pointer-events: none;
    z-index: 0;
}

.lotus-petal {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-energy);
    border-radius: 60% 40% 60% 40% / 40% 60% 40% 60%;
    animation: lotusRotation 40s linear infinite;
}

.lotus-petal:nth-child(2) {
    transform: rotate(45deg);
    animation-duration: 50s;
    animation-direction: reverse;
}

.lotus-petal:nth-child(3) {
    transform: rotate(90deg);
    animation-duration: 60s;
}

@keyframes lotusRotation {
    0% {
        transform: scale(1) rotate(0deg);
    }

    50% {
        transform: scale(1.1) rotate(180deg);
    }

    100% {
        transform: scale(1) rotate(360deg);
    }
}

/* 2. Gallery - Resonance Hexagons */
.hex-grid-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0.05;
    background-image: radial-gradient(circle, var(--gold-energy) 1px, transparent 1px);
    background-size: 60px 60px;
    animation: gridFlow 80s linear infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes gridFlow {
    0% {
        background-position: 0 0;
    }

    100% {
        background-position: 600px 600px;
    }
}

/* 3. Marketplace - Energy Vortex */
.vortex-container {
    position: absolute;
    top: 55%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    opacity: 0.1;
    perspective: 1000px;
    pointer-events: none;
    z-index: 0;
}

.vortex-ring {
    position: absolute;
    top: 50%;
    left: 50%;
    border: 1px solid var(--gold-energy);
    border-radius: 50%;
    transform: translate(-50%, -50%) rotateX(70deg);
    animation: vortexRotate 15s linear infinite;
}

.vortex-ring:nth-child(1) {
    width: 400px;
    height: 400px;
    animation-duration: 10s;
}

.vortex-ring:nth-child(2) {
    width: 600px;
    height: 600px;
    animation-duration: 20s;
    animation-direction: reverse;
}

.vortex-ring:nth-child(3) {
    width: 800px;
    height: 800px;
    animation-duration: 30s;
}

@keyframes vortexRotate {
    0% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(0deg);
    }

    100% {
        transform: translate(-50%, -50%) rotateX(70deg) rotateZ(360deg);
    }
}

/* 4. Contact - Signal Pulse */
.signal-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 0;
}

.signal-wave {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 20px;
    height: 20px;
    border: 1px solid var(--gold-energy);
    border-radius: 50%;
    animation: signalWave 6s cubic-bezier(0.165, 0.84, 0.44, 1) infinite;
    opacity: 0;
}

.signal-wave:nth-child(1) {
    animation-delay: 0s;
}

.signal-wave:nth-child(2) {
    animation-delay: 2s;
}

.signal-wave:nth-child(3) {
    animation-delay: 4s;
}

@keyframes signalWave {
    0% {
        width: 0;
        height: 0;
        opacity: 0.8;
    }

    100% {
        width: 800px;
        height: 800px;
        opacity: 0;
    }
}

/* 5. App - Orbital Halo */
.halo-container {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.15;
}

.halo-ring {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 2px solid var(--gold-energy);
    border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    animation: haloMorph 12s linear infinite;
}

.halo-ring:nth-child(2) {
    animation-duration: 18s;
    animation-direction: reverse;
    border-color: var(--nebula-purple);
}

@keyframes haloMorph {
    0% {
        transform: rotate(0deg) scale(1);
        border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    }

    50% {
        transform: rotate(180deg) scale(1.1);
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }

    100% {
        transform: rotate(360deg) scale(1);
        border-radius: 38% 62% 63% 37% / 41% 44% 56% 59%;
    }
}

/* 6. Books - Knowledge Sphere */
.knowledge-sphere {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 500px;
    height: 500px;
    pointer-events: none;
    z-index: 0;
    opacity: 0.1;
    perspective: 800px;
}

.sphere-line {
    position: absolute;
    width: 100%;
    height: 100%;
    border: 1px solid var(--gold-energy);
    border-radius: 50%;
    animation: sphereSpin 20s linear infinite;
}

.sphere-line:nth-child(2) {
    transform: rotateY(60deg);
    animation-delay: -5s;
}

.sphere-line:nth-child(3) {
    transform: rotateY(120deg);
    animation-delay: -10s;
}

@keyframes sphereSpin {
    0% {
        transform: rotateY(0deg) rotateX(20deg);
    }

    100% {
        transform: rotateY(360deg) rotateX(20deg);
    }
}