/* Premium Effects and Animations */

/* ============================
   Google Fonts Import
   ============================ */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800;900&family=Playfair+Display:wght@700;900&family=Space Grotesk:wght@400;500;700&family=Syne:wght@700;800&display=swap');

/* ============================
   CSS Variables for Effects
   ============================ */
:root {
    --magnetic-strength: 0.3;
    --gooey-blur: 8px;
    --glow-intensity: 0.5;
    --tilt-perspective: 1000px;
    --animation-elastic: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --animation-smooth: cubic-bezier(0.4, 0, 0.2, 1);
}

/* ============================
   Typography with Mixed Fonts
   ============================ */
.hero-text {
    font-family: 'Syne', sans-serif;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.hero-subtitle {
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 700;
}

/* Accent word styling */
.accent-font {
    font-family: 'Playfair Display', serif;
    font-weight: 900;
    font-style: italic;
    background: linear-gradient(135deg, #a855f7 0%, #7c3aed 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    display: inline-block;
    transform: skewX(-5deg);
}

/* ============================
   Gooey Effect with SVG Filters
   ============================ */
.gooey-container {
    filter: url('#gooey-filter');
}

/* SVG Filter Definition (add to HTML) */
.gooey-filter-svg {
    position: absolute;
    visibility: hidden;
    pointer-events: none;
}

/* ============================
   Magnetic Button Effect
   ============================ */
.magnetic-button {
    position: relative;
    transition: transform 0.3s var(--animation-smooth);
    cursor: pointer;
}

.magnetic-button::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    pointer-events: none;
}

.magnetic-button:hover {
    transform: scale(1.05);
}

/* ============================
   3D Card Tilt Effect
   ============================ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.5s var(--animation-smooth);
    will-change: transform;
}

.tilt-card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        transparent 40%,
        rgba(168, 85, 247, 0.1) 45%,
        rgba(168, 85, 247, 0.2) 50%,
        rgba(168, 85, 247, 0.1) 55%,
        transparent 60%
    );
    transform: translateZ(1px);
    opacity: 0;
    transition: opacity 0.5s;
}

.tilt-card:hover::before {
    opacity: 1;
}

.tilt-card-inner {
    transform: translateZ(50px);
}

/* ============================
   Liquid Cursor Effect
   ============================ */
.liquid-cursor {
    position: fixed;
    width: 30px;
    height: 30px;
    border: 2px solid rgba(168, 85, 247, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: 10000;
    transition: transform 0.15s ease-out, width 0.3s, height 0.3s;
    mix-blend-mode: difference;
}

.liquid-cursor.hover {
    width: 60px;
    height: 60px;
    background: rgba(168, 85, 247, 0.1);
}

.cursor-trail {
    position: fixed;
    width: 10px;
    height: 10px;
    background: rgba(168, 85, 247, 0.3);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    animation: cursor-trail-fade 1s ease-out forwards;
}

@keyframes cursor-trail-fade {
    to {
        transform: scale(2);
        opacity: 0;
    }
}

/* ============================
   Floating Geometric Shapes
   ============================ */
.floating-shape {
    position: absolute;
    opacity: 0.1;
    animation: float-shape 20s infinite ease-in-out;
}

.floating-shape.triangle {
    width: 0;
    height: 0;
    border-left: 25px solid transparent;
    border-right: 25px solid transparent;
    border-bottom: 50px solid rgba(168, 85, 247, 0.3);
}

.floating-shape.circle {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: rgba(124, 58, 237, 0.3);
}

.floating-shape.square {
    width: 40px;
    height: 40px;
    background: rgba(168, 85, 247, 0.3);
    transform: rotate(45deg);
}

@keyframes float-shape {
    0%, 100% {
        transform: translateY(0) rotate(0deg);
    }
    25% {
        transform: translateY(-20px) rotate(90deg);
    }
    50% {
        transform: translateY(10px) rotate(180deg);
    }
    75% {
        transform: translateY(-15px) rotate(270deg);
    }
}

/* ============================
   Reveal Animations with Masks
   ============================ */
.reveal-text {
    position: relative;
    overflow: hidden;
}

.reveal-text::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent 0%,
        rgba(255, 255, 255, 0.2) 50%,
        transparent 100%
    );
    animation: reveal-slide 2s ease-out forwards;
}

@keyframes reveal-slide {
    to {
        left: 100%;
    }
}

/* ============================
   Elastic Scale Transitions
   ============================ */
.elastic-scale {
    transition: transform 0.5s var(--animation-elastic);
}

.elastic-scale:hover {
    transform: scale(1.1);
}

.elastic-scale:active {
    transform: scale(0.95);
}

/* ============================
   Staggered Entrance Animation
   ============================ */
.stagger-container {
    --stagger-delay: 0.1s;
}

.stagger-item {
    opacity: 0;
    transform: translateY(30px);
    animation: stagger-in 0.6s var(--animation-smooth) forwards;
    animation-delay: calc(var(--stagger-index, 0) * var(--stagger-delay));
}

.stagger-item:nth-child(1) { --stagger-index: 0; }
.stagger-item:nth-child(2) { --stagger-index: 1; }
.stagger-item:nth-child(3) { --stagger-index: 2; }
.stagger-item:nth-child(4) { --stagger-index: 3; }
.stagger-item:nth-child(5) { --stagger-index: 4; }
.stagger-item:nth-child(6) { --stagger-index: 5; }

@keyframes stagger-in {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ============================
   Breathing/Pulse Effect
   ============================ */
.breathing {
    animation: breathing 3s ease-in-out infinite;
}

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

/* ============================
   Glow Propagation Effect
   ============================ */
.glow-propagate {
    position: relative;
}

.glow-propagate::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, #7c3aed, #a855f7, #7c3aed);
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s;
    filter: blur(10px);
}

.glow-propagate:hover::before {
    opacity: 0.6;
    animation: glow-rotate 2s linear infinite;
}

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

/* ============================
   Self-Drawing SVG Animation
   ============================ */
.svg-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: draw-svg 3s ease-out forwards;
}

@keyframes draw-svg {
    to {
        stroke-dashoffset: 0;
    }
}

/* ============================
   Parallax Layers
   ============================ */
.parallax-container {
    position: relative;
    transform-style: preserve-3d;
    perspective: 1000px;
}

.parallax-layer {
    position: absolute;
    inset: 0;
    will-change: transform;
}

.parallax-layer-1 {
    transform: translateZ(-50px) scale(1.05);
}

.parallax-layer-2 {
    transform: translateZ(-100px) scale(1.1);
}

.parallax-layer-3 {
    transform: translateZ(-150px) scale(1.15);
}

/* ============================
   Performance Optimizations
   ============================ */
.hardware-accelerated {
    transform: translateZ(0);
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================
   Mesh Gradient Animations
   ============================ */
#mesh-gradient-container {
    animation: gradient-shift 10s ease-in-out infinite;
}

@keyframes gradient-shift {
    0%, 100% {
        filter: hue-rotate(0deg) brightness(1);
    }
    50% {
        filter: hue-rotate(30deg) brightness(1.1);
    }
}

/* ============================
   Premium Button Styles
   ============================ */
.btn-premium {
    position: relative;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, #7c3aed 0%, #a855f7 100%);
    border: none;
    border-radius: 50px;
    color: white;
    font-family: 'Space Grotesk', sans-serif;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    overflow: hidden;
    transition: all 0.3s var(--animation-smooth);
    z-index: 1;
}

.btn-premium::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
    z-index: -1;
}

.btn-premium:hover::before {
    width: 300px;
    height: 300px;
}

.btn-premium:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

/* ============================
   Smooth Scroll Indicator
   ============================ */
.scroll-indicator {
    position: fixed;
    top: 0;
    left: 0;
    height: 3px;
    background: linear-gradient(90deg, #7c3aed 0%, #a855f7 100%);
    z-index: 9999;
    transition: width 0.2s ease-out;
    will-change: width;
}