/* css/home/hero.css */

/* === Hero Section Styles === */

.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    background: linear-gradient(135deg, 
        var(--background) 0%,
        var(--surface) 100%);
    overflow: hidden;
}

.hero-background {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
    background: 
        radial-gradient(circle at 20% 80%, 
            rgba(37, 99, 235, 0.1) 0%, 
            transparent 50%),
        radial-gradient(circle at 80% 20%, 
            rgba(124, 58, 237, 0.1) 0%, 
            transparent 50%),
        radial-gradient(circle at 40% 40%, 
            rgba(6, 182, 212, 0.05) 0%, 
            transparent 50%);
}

.hero-particles {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        radial-gradient(circle at 25% 25%, 
            rgba(37, 99, 235, 0.2) 2px, transparent 0),
        radial-gradient(circle at 75% 75%, 
            rgba(124, 58, 237, 0.2) 2px, transparent 0),
        radial-gradient(circle at 50% 10%, 
            rgba(6, 182, 212, 0.15) 1px, transparent 0);
    background-size: 50px 50px, 70px 70px, 90px 90px;
    animation: particle-float 20s ease-in-out infinite;
}

@keyframes particle-float {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
    }
    33% {
        transform: translateY(-20px) rotate(120deg);
    }
    66% {
        transform: translateY(10px) rotate(240deg);
    }
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-text {
    max-width: 600px;
}

.hero-title {
    font-size: 4rem;
    line-height: 1.1;
    margin-bottom: var(--space-lg);
    font-weight: 300;
}

.title-main {
    display: block;
    font-weight: 300;
    color: var(--text-primary);
}

.title-gradient {
    display: block;
    background: linear-gradient(135deg, var(--primary), var(--secondary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 700;
    position: relative;
}

.title-gradient::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        var(--primary) 25%, 
        var(--secondary) 50%, 
        var(--accent) 75%, 
        transparent 100%);
    border-radius: 2px;
}

.title-sub {
    display: block;
    font-size: 1.5rem;
    font-weight: 400;
    color: var(--text-secondary);
    margin-top: var(--space-md);
    line-height: 1.4;
}

.hero-description {
    font-size: 1.25rem;
    line-height: 1.7;
    margin-bottom: var(--space-2xl);
    color: var(--text-secondary);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    gap: var(--space-2xl);
    padding-top: var(--space-xl);
    border-top: 1px solid var(--border);
}

.stat {
    text-align: center;
    flex: 1;
}

.stat-number {
    display: block;
    font-size: 2rem;
    font-weight: 700;
    color: var(--primary);
    line-height: 1;
    margin-bottom: var(--space-xs);
}

.stat-label {
    font-size: 0.875rem;
    color: var(--text-tertiary);
    font-weight: 500;
}

/* Hero Code Section */
.hero-code {
    position: relative;
}

.code-window {
    background: var(--surface-elevated);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg);
    transition: all var(--transition-normal);
    position: relative;
}

.code-window::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, 
        rgba(37, 99, 235, 0.1) 0%,
        rgba(124, 58, 237, 0.1) 100%);
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.code-window:hover {
    transform: perspective(1000px) rotateY(0deg) rotateX(0deg);
    box-shadow: var(--shadow-2xl);
}

.code-window:hover::before {
    opacity: 1;
}

.code-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: var(--space-md) var(--space-lg);
    background: var(--surface);
    border-bottom: 1px solid var(--border);
    position: relative;
    z-index: 2;
}

.code-dots {
    display: flex;
    gap: var(--space-sm);
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    transition: all var(--transition-fast);
}

.dot.red { 
    background: #ef4444; 
    box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
}

.dot.yellow { 
    background: #f59e0b; 
    box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
}

.dot.green { 
    background: #10b981; 
    box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
}

.code-window:hover .dot.red {
    animation: dot-pulse-red 2s infinite;
}

.code-window:hover .dot.yellow {
    animation: dot-pulse-yellow 2s infinite 0.5s;
}

.code-window:hover .dot.green {
    animation: dot-pulse-green 2s infinite 1s;
}

@keyframes dot-pulse-red {
    0%, 100% {
        box-shadow: 0 0 0 rgba(239, 68, 68, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(239, 68, 68, 0.4);
    }
}

@keyframes dot-pulse-yellow {
    0%, 100% {
        box-shadow: 0 0 0 rgba(245, 158, 11, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.4);
    }
}

@keyframes dot-pulse-green {
    0%, 100% {
        box-shadow: 0 0 0 rgba(16, 185, 129, 0.4);
    }
    50% {
        box-shadow: 0 0 0 4px rgba(16, 185, 129, 0.4);
    }
}

.code-title {
    font-family: var(--font-mono);
    font-size: 0.875rem;
    color: var(--text-secondary);
    font-weight: 500;
}

.code-content {
    padding: var(--space-lg);
    overflow-x: auto;
    position: relative;
    z-index: 2;
    background: var(--surface-elevated);
}

/* Scroll Indicator */
.scroll-indicator {
    position: absolute;
    bottom: var(--space-2xl);
    left: 50%;
    transform: translateX(-50%);
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    z-index: 10;
}

.scroll-arrow {
    width: 20px;
    height: 20px;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
    margin: var(--space-sm) auto 0;
    animation: bounce 2s infinite;
}

@keyframes bounce {
    0%, 20%, 50%, 80%, 100% {
        transform: rotate(45deg) translateY(0);
        opacity: 1;
    }
    40% {
        transform: rotate(45deg) translateY(-10px);
        opacity: 0.7;
    }
    60% {
        transform: rotate(45deg) translateY(-5px);
        opacity: 0.9;
    }
}

/* Responsive Hero */
@media (max-width: 1200px) {
    .hero-title {
        font-size: 3.5rem;
    }
    
    .code-window {
        transform: none;
    }
}

@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--space-2xl);
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .title-sub {
        font-size: 1.25rem;
    }
    
    .hero-description {
        font-size: 1.125rem;
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .btn-large {
        width: 100%;
        max-width: 280px;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .code-window {
        margin: 0 auto;
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 2rem;
    }
    
    .title-sub {
        font-size: 1.125rem;
    }
    
    .hero-description {
        font-size: 1rem;
    }
    
    .hero-stats {
        flex-direction: column;
        gap: var(--space-lg);
    }
    
    .stat-number {
        font-size: 1.75rem;
    }
}

/* Reduced motion support */
@media (prefers-reduced-motion: reduce) {
    .hero-particles {
        animation: none;
    }
    
    .code-window {
        transform: none;
        transition: none;
    }
    
    .dot {
        animation: none !important;
    }
    
    .scroll-arrow {
        animation: none;
    }
}