/* ===== HERO ADVANCED EFFECTS ===== */
/* Showcases advanced CSS capabilities with theme-aware visual enhancements */

/* ===== CANVAS CONTAINER ===== */
.hero-canvas-container {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-canvas {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
}

/* ===== GRADIENT ORBS ===== */
/* Animated background orbs that add depth and atmosphere */
.hero-orbs {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.5;
    animation: orbFloat 20s ease-in-out infinite;
    will-change: transform;
}

.hero-orb-1 {
    width: 600px;
    height: 600px;
    top: -200px;
    left: -100px;
    background: radial-gradient(circle, var(--accent-primary) 0%, transparent 70%);
    animation-delay: 0s;
}

.hero-orb-2 {
    width: 500px;
    height: 500px;
    top: 50%;
    right: -150px;
    background: radial-gradient(circle, var(--accent-secondary) 0%, transparent 70%);
    animation-delay: -7s;
    animation-duration: 25s;
}

.hero-orb-3 {
    width: 400px;
    height: 400px;
    bottom: -100px;
    left: 30%;
    background: radial-gradient(circle, var(--accent-tertiary) 0%, transparent 70%);
    animation-delay: -14s;
    animation-duration: 22s;
}

@keyframes orbFloat {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    25% {
        transform: translate(30px, -30px) scale(1.05);
    }
    50% {
        transform: translate(-20px, 20px) scale(0.95);
    }
    75% {
        transform: translate(20px, 10px) scale(1.02);
    }
}

/* ===== SPOTLIGHT EFFECT ===== */
/* Mouse-following glow that adds interactivity */
.hero-spotlight {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    opacity: 0;
    transition: opacity 0.3s ease;
    background: radial-gradient(
        600px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
        var(--glow-primary) 0%,
        transparent 50%
    );
}

/* ===== GRID PATTERN OVERLAY ===== */
/* Subtle grid that adds technical depth */
.hero::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: 0;
    opacity: 0.03;
    background-image: 
        linear-gradient(var(--text-primary) 1px, transparent 1px),
        linear-gradient(90deg, var(--text-primary) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 50%, black 30%, transparent 80%);
}

/* ===== ENHANCED FLOATING CARDS ===== */
/* More dynamic floating elements */
.hero-float {
    transition: box-shadow 0.3s ease;
}

.hero-float::before {
    content: '';
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    background: var(--theme-gradient);
    opacity: 0;
    transition: opacity 0.5s ease;
    z-index: -1;
    filter: blur(20px);
}

.hero-float:hover::before {
    opacity: 0.3;
}

/* Animated data visualization in floating cards */
.hero-float-graph-bar {
    animation: graphPulse 3s ease-in-out infinite;
}

.hero-float-graph-bar:nth-child(1) { animation-delay: 0s; }
.hero-float-graph-bar:nth-child(2) { animation-delay: 0.2s; }
.hero-float-graph-bar:nth-child(3) { animation-delay: 0.4s; }
.hero-float-graph-bar:nth-child(4) { animation-delay: 0.6s; }
.hero-float-graph-bar:nth-child(5) { animation-delay: 0.8s; }
.hero-float-graph-bar:nth-child(6) { animation-delay: 1s; }

@keyframes graphPulse {
    0%, 100% {
        transform: scaleY(1);
        opacity: 0.6;
    }
    50% {
        transform: scaleY(1.2);
        opacity: 0.9;
    }
}

/* ===== TYPING CURSOR EFFECT ===== */
/* For dynamic text elements */
.hero-cursor {
    display: inline-block;
    width: 3px;
    height: 1em;
    background: var(--accent-primary);
    margin-left: 4px;
    animation: blink 1s step-end infinite;
    vertical-align: text-bottom;
}

@keyframes blink {
    0%, 50% { opacity: 1; }
    51%, 100% { opacity: 0; }
}

/* ===== BADGE GLOW ===== */
.hero-badge .badge {
    position: relative;
    overflow: hidden;
}

.hero-badge .badge::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.2),
        transparent
    );
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% { left: -100%; }
    100% { left: 200%; }
}

/* ===== ACCENT TEXT GLOW ===== */
.hero-title .accent {
    position: relative;
    text-shadow: 0 0 40px var(--glow-primary);
}


/* ================================================================ */
/* ===== THEME-SPECIFIC HERO ENHANCEMENTS ===== */
/* ================================================================ */

/* ===== NEON TECH THEME ===== */
[data-theme="neon-tech"] .hero-orb {
    opacity: 0.4;
    filter: blur(100px);
}

[data-theme="neon-tech"] .hero::after {
    opacity: 0;
    animation: scanLine 8s linear infinite;
}

[data-theme="neon-tech"] .hero-spotlight {
    background: radial-gradient(
        600px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
        rgba(0, 212, 255, 0.15) 0%,
        transparent 50%
    );
}

[data-theme="neon-tech"] .hero::before {
    opacity: 0.04;
    background-image: 
        linear-gradient(rgba(0, 212, 255, 0.3) 1px, transparent 1px),
        linear-gradient(90deg, rgba(0, 212, 255, 0.3) 1px, transparent 1px);
}

[data-theme="neon-tech"] .hero-float {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.5),
        0 0 60px -15px var(--glow-primary);
}

[data-theme="neon-tech"] .hero-title .accent {
    background: linear-gradient(135deg, var(--accent-secondary) 0%, var(--accent-primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    animation: textGlow 3s ease-in-out infinite alternate;
}

@keyframes textGlow {
    0% {
        filter: drop-shadow(0 0 20px var(--glow-primary));
    }
    100% {
        filter: drop-shadow(0 0 40px var(--glow-secondary));
    }
}


/* ===== LUXURY THEME ===== */
[data-theme="luxury"] .hero-orb {
    opacity: 0.2;
    filter: blur(120px);
}

[data-theme="luxury"] .hero-orb-1 {
    background: radial-gradient(circle, rgba(201, 169, 98, 0.4) 0%, transparent 70%);
}

[data-theme="luxury"] .hero-orb-2 {
    background: radial-gradient(circle, rgba(232, 220, 196, 0.3) 0%, transparent 70%);
}

[data-theme="luxury"] .hero-orb-3 {
    background: radial-gradient(circle, rgba(139, 115, 85, 0.3) 0%, transparent 70%);
}

[data-theme="luxury"] .hero::after {
    display: none; /* No scan line for luxury */
}

[data-theme="luxury"] .hero::before {
    opacity: 0;
}

[data-theme="luxury"] .hero-spotlight {
    background: radial-gradient(
        800px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
        rgba(201, 169, 98, 0.08) 0%,
        transparent 50%
    );
}

[data-theme="luxury"] .hero-float {
    box-shadow: 
        0 25px 50px -12px rgba(0, 0, 0, 0.4),
        0 0 1px rgba(201, 169, 98, 0.5);
    border: 1px solid rgba(201, 169, 98, 0.15);
}

[data-theme="luxury"] .hero-title .accent {
    background: linear-gradient(135deg, #C9A962 0%, #E8DCC4 50%, #C9A962 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
    background-size: 200% auto;
    animation: goldShimmer 4s linear infinite;
}

@keyframes goldShimmer {
    0% { background-position: 0% center; }
    100% { background-position: 200% center; }
}

/* Elegant particle trails for luxury */
[data-theme="luxury"] .hero-badge .badge::before {
    background: linear-gradient(
        90deg,
        transparent,
        rgba(201, 169, 98, 0.3),
        transparent
    );
}


/* ===== NATURE THEME ===== */
[data-theme="nature"] .hero-orb {
    opacity: 0.25;
    filter: blur(100px);
}

[data-theme="nature"] .hero-orb-1 {
    background: radial-gradient(circle, rgba(74, 124, 89, 0.4) 0%, transparent 70%);
    animation-duration: 30s;
}

[data-theme="nature"] .hero-orb-2 {
    background: radial-gradient(circle, rgba(139, 154, 109, 0.35) 0%, transparent 70%);
    animation-duration: 35s;
}

[data-theme="nature"] .hero-orb-3 {
    background: radial-gradient(circle, rgba(196, 167, 125, 0.3) 0%, transparent 70%);
    animation-duration: 28s;
}

[data-theme="nature"] .hero::after {
    display: none;
}

[data-theme="nature"] .hero::before {
    opacity: 0;
}

[data-theme="nature"] .hero-spotlight {
    background: radial-gradient(
        600px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
        rgba(74, 124, 89, 0.08) 0%,
        transparent 50%
    );
}

[data-theme="nature"] .hero-float {
    box-shadow: 0 20px 40px -15px rgba(74, 124, 89, 0.2);
    background: rgba(255, 255, 255, 0.9);
}

[data-theme="nature"] .hero-title .accent {
    color: var(--accent-primary);
    text-shadow: 0 0 30px rgba(74, 124, 89, 0.2);
}

/* Organic floating animation */
[data-theme="nature"] .hero-float {
    animation: floatOrganic 8s ease-in-out infinite;
}

[data-theme="nature"] .hero-float-2 {
    animation-delay: 2s;
}

@keyframes floatOrganic {
    0%, 100% {
        transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateY(0) rotate(0deg);
    }
    33% {
        transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateY(-15px) rotate(1deg);
    }
    66% {
        transform: perspective(1000px) rotateY(15deg) rotateX(5deg) translateY(-25px) rotate(-1deg);
    }
}

/* Nature: Add leaf-like particle effect */
[data-theme="nature"] .hero-badge .badge {
    border: 1px solid rgba(74, 124, 89, 0.3);
}


/* ===== BRUTALIST THEME ===== */
[data-theme="brutalist"] .hero-orbs {
    display: none;
}

[data-theme="brutalist"] .hero::after {
    display: none;
}

[data-theme="brutalist"] .hero::before {
    opacity: 0.08;
    background-image: 
        linear-gradient(#000 2px, transparent 2px),
        linear-gradient(90deg, #000 2px, transparent 2px);
    background-size: 80px 80px;
    mask-image: none;
    -webkit-mask-image: none;
}

[data-theme="brutalist"] .hero-spotlight {
    display: none;
}

[data-theme="brutalist"] .hero-float {
    border-radius: 0;
    border: 3px solid #000;
    box-shadow: 8px 8px 0 #000;
    backdrop-filter: none;
    background: #fff;
    animation: none;
}

[data-theme="brutalist"] .hero-float:hover {
    box-shadow: 12px 12px 0 #000;
    transform: translate(-4px, -4px);
}

[data-theme="brutalist"] .hero-title .accent {
    color: #FF0000;
    text-shadow: 4px 4px 0 #000;
    font-style: normal;
    text-decoration: underline;
    text-decoration-thickness: 6px;
    text-underline-offset: 8px;
}

[data-theme="brutalist"] .hero-badge .badge {
    border-radius: 0;
    border: 2px solid #000;
    background: #FFCC00;
    color: #000;
}

[data-theme="brutalist"] .hero-badge .badge::before {
    display: none;
}

/* Brutalist: Glitch effect on hover */
[data-theme="brutalist"] .hero-title:hover .accent {
    animation: glitch 0.3s infinite;
}

@keyframes glitch {
    0% { transform: translate(0); }
    20% { transform: translate(-3px, 3px); }
    40% { transform: translate(3px, -3px); }
    60% { transform: translate(-3px, -3px); }
    80% { transform: translate(3px, 3px); }
    100% { transform: translate(0); }
}


/* ===== CORPORATE THEME ===== */
[data-theme="corporate"] .hero-orb {
    opacity: 0.15;
    filter: blur(150px);
}

[data-theme="corporate"] .hero-orb-1 {
    background: radial-gradient(circle, rgba(37, 99, 235, 0.3) 0%, transparent 70%);
}

[data-theme="corporate"] .hero-orb-2 {
    background: radial-gradient(circle, rgba(14, 165, 233, 0.25) 0%, transparent 70%);
}

[data-theme="corporate"] .hero-orb-3 {
    background: radial-gradient(circle, rgba(99, 102, 241, 0.2) 0%, transparent 70%);
}

[data-theme="corporate"] .hero::after {
    display: none;
}

[data-theme="corporate"] .hero::before {
    opacity: 0.015;
    background-image: 
        radial-gradient(circle, var(--accent-primary) 1px, transparent 1px);
    background-size: 40px 40px;
}

[data-theme="corporate"] .hero-spotlight {
    background: radial-gradient(
        500px circle at var(--spotlight-x, 50%) var(--spotlight-y, 50%),
        rgba(37, 99, 235, 0.06) 0%,
        transparent 50%
    );
}

[data-theme="corporate"] .hero-float {
    box-shadow: 0 20px 40px -15px rgba(0, 0, 0, 0.1);
    background: rgba(255, 255, 255, 0.95);
    border: 1px solid rgba(37, 99, 235, 0.1);
}

[data-theme="corporate"] .hero-title .accent {
    background: linear-gradient(135deg, var(--accent-primary) 0%, var(--accent-secondary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: none;
}

[data-theme="corporate"] .hero-badge .badge {
    background: linear-gradient(135deg, rgba(37, 99, 235, 0.1) 0%, rgba(14, 165, 233, 0.1) 100%);
    border: 1px solid rgba(37, 99, 235, 0.2);
}


/* ===== RESPONSIVE ADJUSTMENTS ===== */
@media (max-width: 1024px) {
    .hero-canvas-container {
        opacity: 0.5;
    }
    
    .hero-orb {
        filter: blur(60px);
    }
    
    .hero-orb-1 {
        width: 400px;
        height: 400px;
    }
    
    .hero-orb-2 {
        width: 350px;
        height: 350px;
    }
    
    .hero-orb-3 {
        width: 300px;
        height: 300px;
    }
}

@media (max-width: 768px) {
    .hero-canvas-container {
        opacity: 0.3;
    }
    
    .hero-spotlight {
        display: none;
    }
    
    .hero::before {
        opacity: 0.02;
    }
    
    .hero::after {
        display: none;
    }
}


/* ===== PERFORMANCE: REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
    .hero-orb,
    .hero-float,
    .hero-float-graph-bar,
    .hero-cursor,
    .hero-badge .badge::before,
    .hero-title .accent,
    .hero::after {
        animation: none;
    }
    
    .hero-canvas-container {
        display: none;
    }
    
    .hero-spotlight {
        display: none;
    }
}
