/* ============================================
   MyTrustPartner - Advanced Animations
   ============================================ */

/* ============================================
   Preloader
   ============================================ */
.preloader {
    position: fixed;
    inset: 0;
    background: var(--color-white);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    transition: opacity 0.5s ease, visibility 0.5s ease;
}

.preloader.hidden {
    opacity: 0;
    visibility: hidden;
}

.preloader__content {
    text-align: center;
}

.preloader__logo {
    font-size: var(--font-size-2xl);
    font-weight: var(--font-weight-bold);
    margin-bottom: var(--spacing-6);
}

.preloader__spinner {
    width: 48px;
    height: 48px;
    border: 3px solid var(--color-gray-200);
    border-top-color: var(--color-primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
    margin: 0 auto;
}

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

/* ============================================
   Scroll Progress Indicator
   ============================================ */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, var(--color-primary), var(--color-accent));
    z-index: 9999;
    transition: width 0.1s linear;
}

/* ============================================
   Back to Top Button
   ============================================ */
.back-to-top {
    position: fixed;
    bottom: var(--spacing-8);
    right: var(--spacing-8);
    width: 48px;
    height: 48px;
    background: var(--color-primary);
    color: var(--text-inverse);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: var(--shadow-lg);
    opacity: 0;
    visibility: hidden;
    transform: translateY(20px);
    transition: all var(--transition-base);
    z-index: 100;
    cursor: pointer;
}

.back-to-top.visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-to-top:hover {
    background: var(--color-primary-dark);
    transform: translateY(-4px);
}

.back-to-top svg {
    width: 24px;
    height: 24px;
}

/* ============================================
   Text Reveal Animation
   ============================================ */
.text-reveal {
    overflow: hidden;
}

.text-reveal__inner {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.text-reveal.revealed .text-reveal__inner {
    transform: translateY(0);
    opacity: 1;
}

/* Staggered text reveal */
.text-reveal--stagger .text-reveal__inner:nth-child(1) { transition-delay: 0.1s; }
.text-reveal--stagger .text-reveal__inner:nth-child(2) { transition-delay: 0.2s; }
.text-reveal--stagger .text-reveal__inner:nth-child(3) { transition-delay: 0.3s; }
.text-reveal--stagger .text-reveal__inner:nth-child(4) { transition-delay: 0.4s; }
.text-reveal--stagger .text-reveal__inner:nth-child(5) { transition-delay: 0.5s; }

/* ============================================
   Scroll Reveal Animation (generic)
   ============================================ */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

/* Reveal variants */
.reveal--delay-1 { transition-delay: 0.1s; }
.reveal--delay-2 { transition-delay: 0.2s; }
.reveal--delay-3 { transition-delay: 0.3s; }
.reveal--delay-4 { transition-delay: 0.4s; }

.reveal--from-left {
    transform: translateX(-30px);
}

.reveal--from-right {
    transform: translateX(30px);
}

.reveal--from-left.active,
.reveal--from-right.active {
    transform: translateX(0);
}

.reveal--scale {
    transform: scale(0.95);
}

.reveal--scale.active {
    transform: scale(1);
}

/* ============================================
   Fade Up Animation
   ============================================ */
.fade-up {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

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

/* Staggered fade up */
.fade-up-stagger > *:nth-child(1) { transition-delay: 0.1s; }
.fade-up-stagger > *:nth-child(2) { transition-delay: 0.2s; }
.fade-up-stagger > *:nth-child(3) { transition-delay: 0.3s; }
.fade-up-stagger > *:nth-child(4) { transition-delay: 0.4s; }
.fade-up-stagger > *:nth-child(5) { transition-delay: 0.5s; }
.fade-up-stagger > *:nth-child(6) { transition-delay: 0.6s; }

/* ============================================
   Parallax Utilities
   ============================================ */
.parallax-container {
    overflow: hidden;
}

.parallax-element {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* Subtle parallax speeds */
.parallax--slow {
    --parallax-speed: 0.1;
}

.parallax--medium {
    --parallax-speed: 0.2;
}

.parallax--fast {
    --parallax-speed: 0.3;
}

/* ============================================
   Scale In Animation
   ============================================ */
.scale-in {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s cubic-bezier(0.5, 0, 0, 1);
}

.scale-in.visible {
    opacity: 1;
    transform: scale(1);
}

/* ============================================
   Slide In Animations
   ============================================ */
.slide-in-left {
    opacity: 0;
    transform: translateX(-60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.slide-in-left.visible {
    opacity: 1;
    transform: translateX(0);
}

.slide-in-right {
    opacity: 0;
    transform: translateX(60px);
    transition: all 0.8s cubic-bezier(0.5, 0, 0, 1);
}

.slide-in-right.visible {
    opacity: 1;
    transform: translateX(0);
}

/* ============================================
   Magnetic Button Effect
   ============================================ */
.btn-magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.btn-magnetic:hover {
    transform: translate(var(--x, 0), var(--y, 0));
}

/* ============================================
   Hover Lift Effect
   ============================================ */
.hover-lift {
    transition: transform var(--transition-base), box-shadow var(--transition-base);
}

.hover-lift:hover {
    transform: translateY(-8px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
}

/* ============================================
   Tilt Effect
   ============================================ */
.tilt-effect {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-effect:hover {
    transform: perspective(1000px) rotateX(var(--tilt-x, 0deg)) rotateY(var(--tilt-y, 0deg));
}

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

.glow-effect::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent), var(--color-primary));
    border-radius: inherit;
    opacity: 0;
    z-index: -1;
    filter: blur(20px);
    transition: opacity var(--transition-base);
}

.glow-effect:hover::before {
    opacity: 0.5;
}

/* ============================================
   Gradient Border Animation
   ============================================ */
.gradient-border {
    position: relative;
    background: var(--color-white);
    z-index: 1;
}

.gradient-border::before {
    content: '';
    position: absolute;
    inset: 0;
    padding: 2px;
    background: linear-gradient(135deg, var(--color-primary), var(--color-accent));
    border-radius: inherit;
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask-composite: exclude;
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.gradient-border:hover::before {
    opacity: 1;
}

/* ============================================
   Typewriter Effect
   ============================================ */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-primary);
    white-space: nowrap;
    animation: typing 3.5s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0 }
    to { width: 100% }
}

@keyframes blink-caret {
    from, to { border-color: transparent }
    50% { border-color: var(--color-primary) }
}

/* ============================================
   Particle Background (CSS only)
   ============================================ */
.particles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: float-particle 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; }
.particle:nth-child(3) { left: 30%; animation-delay: 4s; }
.particle:nth-child(4) { left: 40%; animation-delay: 6s; }
.particle:nth-child(5) { left: 50%; animation-delay: 8s; }
.particle:nth-child(6) { left: 60%; animation-delay: 10s; }
.particle:nth-child(7) { left: 70%; animation-delay: 12s; }
.particle:nth-child(8) { left: 80%; animation-delay: 14s; }
.particle:nth-child(9) { left: 90%; animation-delay: 1s; }
.particle:nth-child(10) { left: 95%; animation-delay: 3s; }

@keyframes float-particle {
    0%, 100% {
        transform: translateY(100vh) scale(0);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100px) scale(1);
        opacity: 0;
    }
}

/* ============================================
   Morphing Shape
   ============================================ */
.morph-shape {
    animation: morph 8s ease-in-out infinite;
}

@keyframes morph {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

/* ============================================
   Glitch Effect (for special elements)
   ============================================ */
.glitch {
    position: relative;
}

.glitch::before,
.glitch::after {
    content: attr(data-text);
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

.glitch::before {
    left: 2px;
    text-shadow: -2px 0 #ff00ff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim 5s infinite linear alternate-reverse;
}

.glitch::after {
    left: -2px;
    text-shadow: -2px 0 #00ffff;
    clip: rect(44px, 450px, 56px, 0);
    animation: glitch-anim2 5s infinite linear alternate-reverse;
}

@keyframes glitch-anim {
    0% { clip: rect(31px, 9999px, 94px, 0); }
    5% { clip: rect(70px, 9999px, 71px, 0); }
    10% { clip: rect(29px, 9999px, 24px, 0); }
    15% { clip: rect(73px, 9999px, 85px, 0); }
    20% { clip: rect(27px, 9999px, 38px, 0); }
    25% { clip: rect(99px, 9999px, 4px, 0); }
    30% { clip: rect(65px, 9999px, 98px, 0); }
    35% { clip: rect(10px, 9999px, 78px, 0); }
    40% { clip: rect(54px, 9999px, 58px, 0); }
    45% { clip: rect(37px, 9999px, 11px, 0); }
    50% { clip: rect(62px, 9999px, 42px, 0); }
    55% { clip: rect(87px, 9999px, 63px, 0); }
    60% { clip: rect(17px, 9999px, 99px, 0); }
    65% { clip: rect(36px, 9999px, 21px, 0); }
    70% { clip: rect(45px, 9999px, 53px, 0); }
    75% { clip: rect(72px, 9999px, 32px, 0); }
    80% { clip: rect(88px, 9999px, 47px, 0); }
    85% { clip: rect(3px, 9999px, 80px, 0); }
    90% { clip: rect(67px, 9999px, 12px, 0); }
    95% { clip: rect(23px, 9999px, 91px, 0); }
    100% { clip: rect(51px, 9999px, 69px, 0); }
}

@keyframes glitch-anim2 {
    0% { clip: rect(12px, 9999px, 59px, 0); }
    5% { clip: rect(84px, 9999px, 33px, 0); }
    10% { clip: rect(41px, 9999px, 76px, 0); }
    15% { clip: rect(67px, 9999px, 14px, 0); }
    20% { clip: rect(28px, 9999px, 92px, 0); }
    25% { clip: rect(53px, 9999px, 5px, 0); }
    30% { clip: rect(19px, 9999px, 68px, 0); }
    35% { clip: rect(96px, 9999px, 27px, 0); }
    40% { clip: rect(38px, 9999px, 81px, 0); }
    45% { clip: rect(74px, 9999px, 46px, 0); }
    50% { clip: rect(9px, 9999px, 90px, 0); }
    55% { clip: rect(55px, 9999px, 22px, 0); }
    60% { clip: rect(82px, 9999px, 61px, 0); }
    65% { clip: rect(31px, 9999px, 87px, 0); }
    70% { clip: rect(64px, 9999px, 8px, 0); }
    75% { clip: rect(47px, 9999px, 73px, 0); }
    80% { clip: rect(15px, 9999px, 95px, 0); }
    85% { clip: rect(79px, 9999px, 40px, 0); }
    90% { clip: rect(26px, 9999px, 66px, 0); }
    95% { clip: rect(93px, 9999px, 18px, 0); }
    100% { clip: rect(58px, 9999px, 49px, 0); }
}

/* ============================================
   Smooth Cursor Follow (for hero elements)
   ============================================ */
.cursor-follow {
    transition: transform 0.1s ease-out;
}

/* ============================================
   Loading Skeleton
   ============================================ */
.skeleton {
    background: linear-gradient(90deg, var(--color-gray-100) 25%, var(--color-gray-200) 50%, var(--color-gray-100) 75%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s infinite;
}

@keyframes skeleton-loading {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

/* ============================================
   Magnetic Button Effect
   ============================================ */
.btn-magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.2, 0, 0, 1);
}

.btn-magnetic:hover {
    transform: translate(var(--x, 0), var(--y, 0));
}

/* ============================================
   Animated Gradient Text
   ============================================ */
.text-gradient-animated {
    background: linear-gradient(
        90deg,
        var(--color-primary),
        var(--color-accent),
        var(--color-primary)
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: gradient-shift 3s ease infinite;
}

@keyframes gradient-shift {
    0%, 100% { background-position: 0% center; }
    50% { background-position: 200% center; }
}

/* ============================================
   Glassmorphism Card Effect
   ============================================ */
.glass-card {
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.3);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .glass-card {
    background: rgba(18, 18, 26, 0.7);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

/* ============================================
   Shine Effect on Hover
   ============================================ */
.shine-effect {
    position: relative;
    overflow: hidden;
}

.shine-effect::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    transition: left 0.5s ease;
}

.shine-effect:hover::before {
    left: 100%;
}

/* ============================================
   Floating Animation
   ============================================ */
.float {
    animation: float 6s ease-in-out infinite;
}

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

.float-delayed {
    animation: float 6s ease-in-out infinite;
    animation-delay: 1s;
}

/* ============================================
   Ripple Effect on Click
   ============================================ */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    top: 50%;
    left: 50%;
    background: radial-gradient(circle, rgba(255,255,255,0.3) 0%, transparent 70%);
    transform: translate(-50%, -50%) scale(0);
    opacity: 0;
    transition: transform 0.5s ease, opacity 0.5s ease;
}

.ripple:active::after {
    transform: translate(-50%, -50%) scale(2);
    opacity: 1;
    transition: 0s;
}

/* ============================================
   Glow Pulse Animation
   ============================================ */
.glow-pulse {
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {
    0%, 100% {
        box-shadow: 0 0 20px rgba(0, 102, 255, 0.3);
    }
    50% {
        box-shadow: 0 0 40px rgba(0, 102, 255, 0.6);
    }
}

/* ============================================
   Typewriter Effect
   ============================================ */
.typewriter {
    overflow: hidden;
    border-right: 2px solid var(--color-primary);
    white-space: nowrap;
    animation:
        typing 3.5s steps(40, end),
        blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--color-primary); }
}

/* ============================================
   Particle Background Effect
   ============================================ */
.particles {
    position: absolute;
    width: 100%;
    height: 100%;
    overflow: hidden;
    pointer-events: none;
}

.particle {
    position: absolute;
    width: 6px;
    height: 6px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.3;
    animation: particle-float 15s infinite;
}

.particle:nth-child(1) { left: 10%; animation-delay: 0s; animation-duration: 12s; }
.particle:nth-child(2) { left: 20%; animation-delay: 2s; animation-duration: 14s; }
.particle:nth-child(3) { left: 35%; animation-delay: 4s; animation-duration: 11s; }
.particle:nth-child(4) { left: 50%; animation-delay: 1s; animation-duration: 13s; }
.particle:nth-child(5) { left: 65%; animation-delay: 3s; animation-duration: 15s; }
.particle:nth-child(6) { left: 80%; animation-delay: 5s; animation-duration: 10s; }
.particle:nth-child(7) { left: 90%; animation-delay: 2.5s; animation-duration: 12s; }

@keyframes particle-float {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.3;
    }
    90% {
        opacity: 0.3;
    }
    100% {
        transform: translateY(-100vh) rotate(720deg);
        opacity: 0;
    }
}

/* ============================================
   Card 3D Tilt Effect
   ============================================ */
.tilt-card {
    transform-style: preserve-3d;
    transition: transform 0.3s ease;
}

.tilt-card:hover {
    transform: perspective(1000px) rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

.tilt-card__inner {
    transform: translateZ(40px);
}

/* ============================================
   Border Gradient Animation
   ============================================ */
.border-gradient {
    position: relative;
    background: var(--bg-primary);
    border-radius: var(--radius-xl);
}

.border-gradient::before {
    content: '';
    position: absolute;
    inset: -2px;
    background: linear-gradient(45deg, var(--color-primary), var(--color-accent), var(--color-primary));
    background-size: 200% 200%;
    border-radius: inherit;
    z-index: -1;
    animation: border-gradient-rotate 3s linear infinite;
}

@keyframes border-gradient-rotate {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* ============================================
   Reveal Line Animation
   ============================================ */
.reveal-line {
    position: relative;
    display: inline-block;
}

.reveal-line::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-primary);
    transition: width 0.3s ease;
}

.reveal-line:hover::after {
    width: 100%;
}

/* ============================================
   Counter Animation
   ============================================ */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ============================================
   Staggered List Animation
   ============================================ */
.stagger-list > * {
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.4s ease;
}

.stagger-list.visible > *:nth-child(1) { transition-delay: 0.05s; }
.stagger-list.visible > *:nth-child(2) { transition-delay: 0.1s; }
.stagger-list.visible > *:nth-child(3) { transition-delay: 0.15s; }
.stagger-list.visible > *:nth-child(4) { transition-delay: 0.2s; }
.stagger-list.visible > *:nth-child(5) { transition-delay: 0.25s; }
.stagger-list.visible > *:nth-child(6) { transition-delay: 0.3s; }
.stagger-list.visible > *:nth-child(7) { transition-delay: 0.35s; }
.stagger-list.visible > *:nth-child(8) { transition-delay: 0.4s; }

.stagger-list.visible > * {
    opacity: 1;
    transform: translateY(0);
}

/* ============================================
   Advanced Micro-Interactions
   ============================================ */

/* Magnetic hover effect for buttons */
.btn-magnetic {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Text character reveal animation */
.text-reveal {
    overflow: hidden;
}

.text-reveal span {
    display: inline-block;
    transform: translateY(100%);
    opacity: 0;
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1),
                opacity 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.text-reveal.active span {
    transform: translateY(0);
    opacity: 1;
}

/* Card 3D tilt effect */
.card-tilt {
    transform-style: preserve-3d;
    perspective: 1000px;
}

.card-tilt:hover {
    transform: rotateX(var(--rotateX, 0deg)) rotateY(var(--rotateY, 0deg));
}

/* Smooth image zoom */
.image-zoom {
    overflow: hidden;
    border-radius: var(--radius-xl);
}

.image-zoom img {
    transition: transform 0.6s cubic-bezier(0.4, 0, 0.2, 1);
}

.image-zoom:hover img {
    transform: scale(1.08);
}

/* Focus ring animation */
.focus-ring {
    position: relative;
}

.focus-ring::after {
    content: '';
    position: absolute;
    inset: -4px;
    border: 2px solid var(--color-primary);
    border-radius: inherit;
    opacity: 0;
    transform: scale(0.9);
    transition: opacity 0.2s ease, transform 0.2s ease;
    pointer-events: none;
}

.focus-ring:focus-visible::after {
    opacity: 1;
    transform: scale(1);
}

/* Skeleton loading animation */
.skeleton {
    position: relative;
    background: var(--color-gray-100);
    overflow: hidden;
}

.skeleton::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.5),
        transparent
    );
    animation: skeleton-wave 1.5s infinite;
}

@keyframes skeleton-wave {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

/* Counter animation placeholder */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Elastic button press */
.btn-elastic {
    transition: transform 0.15s cubic-bezier(0.4, 0, 0.2, 1);
}

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

/* Link underline animation */
.link-fancy {
    position: relative;
    text-decoration: none;
}

.link-fancy::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 100%;
    height: 2px;
    background: currentColor;
    transform: scaleX(0);
    transform-origin: right;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.link-fancy:hover::after {
    transform: scaleX(1);
    transform-origin: left;
}

/* Icon rotate on hover */
.icon-rotate {
    transition: transform 0.3s ease;
}

.icon-rotate:hover {
    transform: rotate(15deg);
}

/* Bounce in animation */
@keyframes bounce-in {
    0% {
        opacity: 0;
        transform: scale(0.3);
    }
    50% {
        transform: scale(1.05);
    }
    70% {
        transform: scale(0.9);
    }
    100% {
        opacity: 1;
        transform: scale(1);
    }
}

.bounce-in {
    animation: bounce-in 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Slide up reveal */
@keyframes slide-up-reveal {
    from {
        opacity: 0;
        transform: translateY(40px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.slide-up-reveal {
    animation: slide-up-reveal 0.6s cubic-bezier(0.4, 0, 0.2, 1) forwards;
}

/* Fade scale in */
@keyframes fade-scale-in {
    from {
        opacity: 0;
        transform: scale(0.95);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.fade-scale-in {
    animation: fade-scale-in 0.4s ease-out forwards;
}

/* Subtle pulse for attention */
@keyframes subtle-pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 rgba(0, 102, 255, 0.4);
    }
    50% {
        box-shadow: 0 0 0 8px rgba(0, 102, 255, 0);
    }
}

.subtle-pulse {
    animation: subtle-pulse 2s infinite;
}

/* Line draw animation for SVG */
.line-draw {
    stroke-dasharray: 1000;
    stroke-dashoffset: 1000;
    animation: line-draw 2s ease forwards;
}

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

/* Morphing background */
@keyframes morph-bg {
    0%, 100% {
        border-radius: 60% 40% 30% 70% / 60% 30% 70% 40%;
    }
    50% {
        border-radius: 30% 60% 70% 40% / 50% 60% 30% 60%;
    }
}

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

/* ============================================
   Reduced Motion
   ============================================ */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .preloader {
        display: none;
    }

    .text-gradient-animated {
        animation: none;
    }

    .float,
    .float-delayed,
    .glow-pulse,
    .particle,
    .skeleton::after,
    .morph-bg,
    .subtle-pulse {
        animation: none;
    }

    .text-reveal span {
        transform: none;
        opacity: 1;
    }
}
