/* Premium Website Enhancements */
/* Designed for elegance, sophistication, and wow factor */

/* ============================================
   1. TYPOGRAPHY REFINEMENTS
   ============================================ */

/* Better heading hierarchy and spacing */
h1,
h2,
h3,
h4,
h5,
h6 {
    letter-spacing: -0.02em;
    font-weight: 700;
    line-height: 1.2;
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -0.03em;
}

h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 2rem;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2rem);
}

p {
    line-height: 1.7;
    letter-spacing: 0.01em;
}

/* Animated gradient text for special headings */
.gradient-heading {
    background: linear-gradient(135deg, #fff, #3b82f6, #8b5cf6);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradientFlow 8s ease infinite;
}

@keyframes gradientFlow {

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

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   2. SCROLL PROGRESS INDICATOR
   ============================================ */

.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 3px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6, #06b6d4);
    z-index: 10000;
    transition: width 0.1s ease-out;
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* ============================================
   3. ENHANCED CARD INTERACTIONS
   ============================================ */

/* 3D Tilt effect on cards */
.feature-card,
.portfolio-item,
.blog-card,
.card {
    transform-style: preserve-3d;
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    will-change: transform;
}

.feature-card::before,
.portfolio-item::before,
.blog-card::before,
.card::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #3b82f6, #8b5cf6, #06b6d4, #3b82f6);
    background-size: 300% 300%;
    border-radius: inherit;
    z-index: -1;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: borderGlow 3s ease infinite;
}

.feature-card:hover::before,
.portfolio-item:hover::before,
.blog-card:hover::before,
.card:hover::before {
    opacity: 0.6;
}

@keyframes borderGlow {

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

    50% {
        background-position: 100% 50%;
    }
}

/* Enhanced glassmorphism */
.feature-card:hover,
.portfolio-item:hover,
.blog-card:hover,
.card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow:
        0 20px 60px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(59, 130, 246, 0.2);
}

/* Shine effect on hover */
.feature-card::after,
.portfolio-item::after,
.blog-card::after,
.card::after {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
            transparent,
            rgba(255, 255, 255, 0.1),
            transparent);
    transition: left 0.7s ease;
}

.feature-card:hover::after,
.portfolio-item:hover::after,
.blog-card:hover::after,
.card:hover::after {
    left: 100%;
}

/* ============================================
   4. PREMIUM BUTTON EFFECTS
   ============================================ */

.cta-button,
.custom-hero-button,
.primary-btn,
.secondary-btn,
button[type="submit"],
.submit-btn {
    position: relative;
    overflow: hidden;
    transform-style: preserve-3d;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    will-change: transform;
}

/* Ripple effect container */
.cta-button::before,
.custom-hero-button::before,
.primary-btn::before,
.secondary-btn::before,
button[type="submit"]::before,
.submit-btn::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;
}

.cta-button:active::before,
.custom-hero-button:active::before,
.primary-btn:active::before,
.secondary-btn:active::before,
button[type="submit"]:active::before,
.submit-btn:active::before {
    width: 300px;
    height: 300px;
}

/* 3D press effect */
.cta-button:active,
.custom-hero-button:active,
.primary-btn:active,
.secondary-btn:active,
button[type="submit"]:active,
.submit-btn:active {
    transform: translateY(2px) scale(0.98);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

/* Magnetic hover effect - slight movement toward cursor */
.cta-button:hover,
.custom-hero-button:hover,
.primary-btn:hover,
.secondary-btn:hover,
button[type="submit"]:hover,
.submit-btn:hover {
    box-shadow:
        0 12px 30px rgba(59, 130, 246, 0.3),
        0 0 20px rgba(59, 130, 246, 0.2);
    transform: translateY(-3px);
}

/* Glowing animated border for primary buttons */
.primary-btn,
.cta-button {
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    background-size: 200% 200%;
    animation: buttonGradient 3s ease infinite;
}

@keyframes buttonGradient {

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

    50% {
        background-position: 100% 50%;
    }
}

/* ============================================
   5. CUSTOM CURSOR
   ============================================ */

.custom-cursor {
    width: 20px;
    height: 20px;
    border: 2px solid #3b82f6;
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9999;
    transition: all 0.15s ease;
    transform: translate(-50%, -50%);
    mix-blend-mode: difference;
}

.custom-cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(59, 130, 246, 0.3);
    border-radius: 50%;
    position: fixed;
    pointer-events: none;
    z-index: 9998;
    transition: all 0.3s ease;
    transform: translate(-50%, -50%);
}

.custom-cursor.active {
    transform: translate(-50%, -50%) scale(1.5);
    background: rgba(59, 130, 246, 0.3);
}

/* Hide default cursor on interactive elements */
a,
button,
.card,
input,
textarea {
    cursor: none;
}

/* ============================================
   6. FLOATING PARTICLES
   ============================================ */

.particles-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 1;
    overflow: hidden;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.6), transparent);
    border-radius: 50%;
    pointer-events: none;
    animation: float linear infinite;
}

@keyframes float {
    0% {
        transform: translateY(100vh) translateX(0) scale(0);
        opacity: 0;
    }

    10% {
        opacity: 0.5;
    }

    90% {
        opacity: 0.5;
    }

    100% {
        transform: translateY(-100px) translateX(100px) scale(1);
        opacity: 0;
    }
}

/* ============================================
   7. ENHANCED NAVIGATION
   ============================================ */

/* Animated underline on nav items */
.nav-item {
    position: relative;
}

.nav-item::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 50%;
    width: 0;
    height: 2px;
    background: linear-gradient(90deg, #3b82f6, #8b5cf6);
    transition: all 0.3s ease;
    transform: translateX(-50%);
}

.nav-item:hover::after,
.nav-item.active::after {
    width: 80%;
}

/* ============================================
   8. MICRO-INTERACTIONS
   ============================================ */

/* Icon pulse on hover */
.fas,
.fab,
.far {
    transition: all 0.3s ease;
}

.info-card:hover .fas,
.info-card:hover .fab,
.info-card:hover .far {
    animation: iconPulse 0.6s ease;
    color: var(--primary-color);
}

@keyframes iconPulse {

    0%,
    100% {
        transform: scale(1);
    }

    50% {
        transform: scale(1.2);
    }
}

/* Smooth number counter - will be handled by JS */
.counter {
    font-variant-numeric: tabular-nums;
}

/* Loading skeleton */
.skeleton {
    background: linear-gradient(90deg,
            rgba(255, 255, 255, 0.05) 25%,
            rgba(255, 255, 255, 0.1) 50%,
            rgba(255, 255, 255, 0.05) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    0% {
        background-position: -200% 0;
    }

    100% {
        background-position: 200% 0;
    }
}

/* ============================================
   9. SCROLL-TO-TOP BUTTON
   ============================================ */

.scroll-to-top {
    position: fixed;
    bottom: 30px;
    right: 30px;
    width: 50px;
    height: 50px;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 1.5rem;
    opacity: 0;
    pointer-events: none;
    transition: all 0.3s ease;
    z-index: 1000;
    box-shadow: 0 4px 15px rgba(59, 130, 246, 0.3);
}

.scroll-to-top.visible {
    opacity: 1;
    pointer-events: all;
}

.scroll-to-top:hover {
    transform: translateY(-5px) scale(1.1);
    box-shadow: 0 8px 25px rgba(59, 130, 246, 0.5);
}

.scroll-to-top:active {
    animation: bounce 0.6s ease;
}

@keyframes bounce {

    0%,
    100% {
        transform: translateY(-5px) scale(1.1);
    }

    50% {
        transform: translateY(-15px) scale(1.15);
    }
}

/* ============================================
   10. ACCESSIBILITY & PERFORMANCE
   ============================================ */

/* Respect user's motion preferences */
@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .custom-cursor,
    .custom-cursor-follower,
    .particles-container {
        display: none !important;
    }
}

/* Hardware acceleration for smooth animations */
.feature-card,
.portfolio-item,
.blog-card,
.card,
.cta-button,
.custom-hero-button,
.primary-btn,
.secondary-btn {
    will-change: transform;
    backface-visibility: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ============================================
   11. PARALLAX EFFECTS
   ============================================ */

.parallax-section {
    position: relative;
    overflow: hidden;
}

.parallax-bg {
    position: absolute;
    top: -50px;
    left: 0;
    width: 100%;
    height: calc(100% + 100px);
    background-size: cover;
    background-position: center;
    will-change: transform;
}

/* ============================================
   12. ENHANCED FOCUS STATES
   ============================================ */

*:focus-visible {
    outline: 2px solid #3b82f6;
    outline-offset: 4px;
    border-radius: 4px;
}

input:focus,
textarea:focus {
    box-shadow:
        0 0 0 3px rgba(59, 130, 246, 0.1),
        0 0 20px rgba(59, 130, 246, 0.2);
}