/* ==========================================
   BrightWealth - Parallax & Enhanced Effects
   ========================================== */

/* ========== Parallax Layers ========== */
.parallax-layer {
    position: absolute;
    width: 100%;
    height: 100%;
    will-change: transform;
}

.parallax-slow {
    will-change: transform;
}

.parallax-medium {
    will-change: transform;
}

.parallax-fast {
    will-change: transform;
}

/* ========== Hero Section Enhanced ========== */
.hero-section {
    position: relative;
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 120%;
    background: linear-gradient(135deg, var(--primary-navy) 0%, #1a4d8f 100%);
    z-index: 1;
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 2;
    pointer-events: none;
}

.hero-overlay-pattern {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        radial-gradient(circle at 20% 50%, rgba(255,215,0,0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 80%, rgba(0,201,167,0.1) 0%, transparent 50%);
    z-index: 3;
}

.hero-content {
    position: relative;
    z-index: 10;
}

/* ========== Floating Elements ========== */
@keyframes float {
    0%, 100% {
        transform: translateY(0px);
    }
    50% {
        transform: translateY(-20px);
    }
}

.floating {
    animation: float 6s ease-in-out infinite;
}

.floating-delayed {
    animation: float 6s ease-in-out 2s infinite;
}

/* ========== Parallax Section Backgrounds ========== */
.section-parallax {
    position: relative;
    overflow: hidden;
}

.section-parallax-bg {
    position: absolute;
    top: -20%;
    left: 0;
    width: 100%;
    height: 140%;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 0;
}

.section-parallax .container {
    position: relative;
    z-index: 2;
}

/* ========== Smooth Glassmorphism ========== */
.glass-effect {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    box-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.15);
}

.glass-dark {
    background: rgba(10, 36, 99, 0.8);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 215, 0, 0.2);
}

/* ========== Gradient Text Effect ========== */
.gradient-text {
    background: linear-gradient(135deg, var(--primary-gold), #FFA500, var(--accent-teal));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 5s ease infinite;
    background-size: 200% 200%;
}

@keyframes gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* ========== Scroll Progress Indicator ========== */
.scroll-progress {
    position: fixed;
    top: 0;
    left: 0;
    width: 0%;
    height: 4px;
    background: linear-gradient(90deg, var(--primary-gold), var(--accent-teal));
    z-index: 9999;
    transition: width 0.1s ease;
}

/* ========== Enhanced Card Hover ========== */
.service-card {
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.service-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(255,215,0,0.05), rgba(0,201,167,0.05));
    opacity: 0;
    transition: opacity 0.3s ease;
    border-radius: 16px;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

.service-card:hover {
    transform: translateY(-12px) scale(1.02);
    box-shadow: 0 20px 60px rgba(0,0,0,0.2);
}

/* ========== Stagger Animation for Grid Items ========== */
.scroll-reveal {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

.services-grid .scroll-reveal:nth-child(1) {
    transition-delay: 0.1s;
}

.services-grid .scroll-reveal:nth-child(2) {
    transition-delay: 0.2s;
}

.services-grid .scroll-reveal:nth-child(3) {
    transition-delay: 0.3s;
}

.services-grid .scroll-reveal:nth-child(4) {
    transition-delay: 0.4s;
}

.services-grid .scroll-reveal:nth-child(5) {
    transition-delay: 0.5s;
}

.services-grid .scroll-reveal:nth-child(6) {
    transition-delay: 0.6s;
}

/* ========== Parallax Value Strip ========== */
.value-strip {
    position: relative;
    overflow: hidden;
}

.value-item {
    transition: all 0.3s ease;
}

.value-item:hover {
    transform: scale(1.1);
}

.value-item:hover .value-number {
    color: var(--accent-teal);
}

/* ========== Enhanced Button Interactions ========== */
.btn {
    position: relative;
    overflow: hidden;
}

.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;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.05);
}

/* ========== Coming Soon Card Parallax ========== */
.coming-soon-card {
    position: relative;
    overflow: hidden;
}

.coming-soon-card::before {
    animation: float 8s ease-in-out infinite;
}

/* ========== Calculator Enhanced ========== */
.calculator-container {
    position: relative;
    transition: all 0.3s ease;
}

.calculator-container:hover {
    transform: scale(1.02);
}

.calculator-result {
    transition: all 0.3s ease;
}

.result-amount {
    text-shadow: 2px 2px 4px rgba(0,0,0,0.2);
    transition: all 0.3s ease;
}

/* ========== Smooth Section Transitions ========== */
.section {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100px;
    background: linear-gradient(to bottom, rgba(255,255,255,0), rgba(255,255,255,1));
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.section.section-alt::before {
    background: linear-gradient(to bottom, rgba(245,245,245,0), rgba(245,245,245,1));
}

/* ========== Cursor Trail Effect ========== */
.cursor-trail-dot {
    position: fixed;
    width: 8px;
    height: 8px;
    background: var(--primary-gold);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    opacity: 0.6;
    animation: trail-fade 0.5s forwards;
}

@keyframes trail-fade {
    to {
        transform: scale(0);
        opacity: 0;
    }
}

/* ========== Loading Animation ========== */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.shimmer {
    background: linear-gradient(90deg,
        transparent 0%,
        rgba(255,215,0,0.3) 50%,
        transparent 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

/* ========== Header Scroll Effects ========== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    background: transparent;
}

.site-header.scrolled {
    background: rgba(10, 36, 99, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
}

.site-header.hidden {
    transform: translateY(-100%);
}

/* ========== Depth Layers ========== */
.layer-1 {
    transform: translateZ(0);
}

.layer-2 {
    transform: translateZ(50px);
}

.layer-3 {
    transform: translateZ(100px);
}

/* ========== Glow Effects ========== */
.glow-gold {
    box-shadow: 0 0 20px rgba(255, 215, 0, 0.3);
}

.glow-teal {
    box-shadow: 0 0 20px rgba(0, 201, 167, 0.3);
}

.glow-gold:hover {
    box-shadow: 0 0 40px rgba(255, 215, 0, 0.5);
}

/* ========== Text Reveal Animation ========== */
.text-reveal {
    opacity: 0;
    transform: translateY(30px);
    animation: textReveal 0.8s forwards;
}

@keyframes textReveal {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========== Ripple Effect on Click ========== */
.ripple {
    position: relative;
    overflow: hidden;
}

.ripple::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.ripple:active::after {
    width: 500px;
    height: 500px;
}

/* ========== Performance Optimizations ========== */
* {
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Hardware acceleration for animations */
.hero-section,
.service-card,
.btn,
.scroll-reveal {
    -webkit-transform: translateZ(0);
    transform: translateZ(0);
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    -webkit-perspective: 1000px;
    perspective: 1000px;
}

/* ========== Reduce Motion for Accessibility ========== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }

    .parallax-slow,
    .parallax-medium,
    .parallax-fast {
        transform: none !important;
    }
}

/* ========== Mobile Optimizations ========== */
@media (max-width: 768px) {
    /* Disable parallax on mobile for performance */
    .parallax-slow,
    .parallax-medium,
    .parallax-fast,
    [data-parallax] {
        transform: none !important;
    }

    /* Simplify animations on mobile */
    .floating,
    .floating-delayed {
        animation: none;
    }

    /* Reduce blur effects on mobile */
    .glass-effect,
    .glass-dark {
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }
}

/* ========== Print Styles ========== */
@media print {
    .parallax-slow,
    .parallax-medium,
    .parallax-fast,
    .floating,
    .glass-effect,
    .cursor-trail-dot {
        display: none !important;
    }
}
