/* ============================================
   HERO SECTION STYLES - MIGRATIVE PARTNERS
   Main Hero, Badge, Typography, CTAs, Tech Elements
   ============================================ */

/* Hero Section Container */
.hero {
    position: relative;
    z-index: var(--z-dropdown);
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding: calc(var(--spacing-3xl) + 80px) var(--container-padding) var(--spacing-lg);
    overflow: hidden;
}

/* Hero Content Wrapper */
.hero-content {
    max-width: var(--container-max);
    margin: 0 auto;
    width: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--spacing-lg);
    position: relative;
}

/* Hero Text Container */
.hero-text {
    max-width: 900px;
    animation: fadeInUp 0.8s ease-out 0.3s both;
    display: flex;
    flex-direction: column;
}

/* Badge Component */
.badge {
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-sm);
    background: rgba(0, 255, 170, 0.1);
    border: 1px solid rgba(0, 255, 170, 0.3);
    color: var(--neon-green);
    padding: var(--spacing-xs) var(--spacing-md);
    font-size: var(--text-xs);
    font-weight: var(--font-semibold);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    margin-bottom: var(--spacing-lg);
    animation: badgeGlow 4s ease-in-out infinite;
    position: relative;
    width: fit-content;
    border-radius: var(--radius-sm);
}

@keyframes badgeGlow {
    0%, 100% { 
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.2); 
    }
    50% { 
        box-shadow: 0 0 20px rgba(0, 255, 170, 0.4); 
    }
}


/* AI Sparkle Icon */
.badge .ai-sparkle {
    font-size: 1.2rem;
    animation: sparkleGlow 4s ease-in-out infinite;
    filter: drop-shadow(0 0 5px rgba(0, 255, 170, 0.5));
}

@keyframes sparkleGlow {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.7;
        transform: scale(1.1);
    }
}

/* Main Heading */
.hero h1 {
    font-size: clamp(2.5rem, 7vw, 5.5rem);
    font-weight: var(--font-black);
    line-height: var(--leading-tight);
    letter-spacing: var(--tracking-tight);
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(
        180deg, 
        var(--white) 0%, 
        rgba(255, 255, 255, 0.8) 100%
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    position: relative;
}

/* Accent Text in Heading */
.hero h1 .accent {
    display: block;
    background: linear-gradient(
        90deg, 
        var(--neon-green) 0%, 
        #00FFD4 50%,
        var(--neon-green) 100%
    );
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    text-shadow: 0 0 40px rgba(0, 255, 170, 0.5);
    animation: gradient-shift 3s ease-in-out infinite;
}

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

/* Hero Description */
.hero-description {
    font-size: var(--text-xl);
    line-height: var(--leading-relaxed);
    color: var(--gray);
    margin-bottom: var(--spacing-2xl);
    max-width: 650px;
    font-weight: var(--font-light);
    animation: fadeInUp 0.8s ease-out 0.5s both;
}

/* Hero CTA Container */
.hero-cta {
    display: flex;
    gap: var(--spacing-md);
    align-items: center;
    flex-wrap: wrap;
    animation: fadeInUp 0.8s ease-out 0.7s both;
}

/* Primary Button */
.primary-button {
    background: var(--neon-green);
    color: var(--bg-primary);
    border: 2px solid var(--neon-green);
    padding: var(--spacing-md) var(--spacing-xl);
    font-weight: var(--font-bold);
    font-size: var(--text-base);
    letter-spacing: var(--tracking-wide);
    cursor: pointer;
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
    text-transform: uppercase;
    box-shadow: 0 4px 15px rgba(0, 255, 170, 0.3);
}

.primary-button::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 50%;
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.primary-button:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(0, 255, 170, 0.25);
    background: var(--neon-green-dark);
}

.primary-button:hover::before {
    width: 300px;
    height: 300px;
}

.primary-button:active {
    transform: translateY(0);
}

/* Secondary Link */
.secondary-link {
    color: var(--white);
    text-decoration: none;
    font-weight: var(--font-medium);
    font-size: var(--text-base);
    display: inline-flex;
    align-items: center;
    gap: var(--spacing-xs);
    transition: all var(--transition-base);
    position: relative;
    padding-bottom: 2px;
}

.secondary-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 1px;
    background: var(--white);
    transition: width var(--transition-base);
}

.secondary-link:hover {
    gap: var(--spacing-md);
    color: var(--neon-green);
}

.secondary-link:hover::after {
    width: calc(100% - 20px);
    background: var(--neon-green);
}

/* Arrow Icon */
.secondary-link .arrow {
    display: inline-block;
    transition: transform var(--transition-base);
    font-size: 1.2rem;
}

.secondary-link:hover .arrow {
    transform: translateX(5px);
}

/* Tech Badge (Floating Code) */
.tech-badge {
    position: absolute;
    top: 20%;
    right: 10%;
    background: rgba(0, 255, 170, 0.05);
    border: 1px solid rgba(0, 255, 170, 0.2);
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: var(--text-xs);
    color: var(--neon-green);
    animation: float 6s ease-in-out infinite;
    z-index: var(--z-sticky);
    border-radius: var(--radius-sm);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.3);
    opacity: 0;
    animation: float 6s ease-in-out infinite, fadeIn 1s ease-out 1.5s forwards;
}

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

.tech-badge:hover {
    background: rgba(0, 255, 170, 0.1);
    transform: scale(1.05);
    box-shadow: 0 15px 40px rgba(0, 255, 170, 0.2);
}

/* Background Elements */
.hero::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -25%;
    width: 100%;
    height: 100%;
    background: radial-gradient(
        circle,
        rgba(0, 255, 170, 0.1) 0%,
        transparent 70%
    );
    pointer-events: none;
    animation: rotate 30s linear infinite;
}

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

/* Trust Section with Avatars - Below CTAs */
.trust-section {
    display: flex;
    flex-direction: column;
    align-items: center; /* Center elements within container */
    gap: 7px; /* Increased by 1px for more spacing between avatars and text */
    margin-top: var(--spacing-2xl);
    animation: fadeInUp 0.8s ease-out 0.8s both;
    align-self: flex-start; /* Left align on desktop */
}

.avatar-stack {
    display: flex;
    align-items: center;
    position: relative;
}

.avatar {
    width: 52px; /* Increased 4 more points */
    height: 52px;
    border-radius: 50%;
    border: 2px solid var(--bg-primary);
    position: relative;
    margin-left: -10px;
    transition: all var(--transition-base);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.2);
}

.avatar:first-child {
    margin-left: 0;
}

.avatar:hover {
    transform: translateY(-2px) scale(1.05);
    z-index: 10;
}

.trust-text {
    font-size: var(--text-xs);
    color: rgba(255, 255, 255, 0.7);
    margin: 0;
    letter-spacing: 0.02em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

.trust-text strong {
    font-weight: var(--font-semibold);
}

.trust-stars {
    display: flex;
    gap: 2px;
}

.star {
    width: 16px;
    height: 16px;
}

/* Responsive - Tablet */
@media (max-width: 1024px) {
    .hero {
        min-height: 90vh;
        padding: calc(var(--spacing-2xl) + 80px) var(--container-padding) var(--spacing-2xl);
    }
    
    .hero h1 {
        font-size: clamp(2.5rem, 8vw, 4.5rem);
    }
    
    .hero-description {
        font-size: var(--text-lg);
        max-width: 100%;
    }
    
    .tech-badge {
        top: 20%;
        right: 5%;
        font-size: 0.7rem;
        padding: var(--spacing-sm);
    }
}

/* Responsive - Mobile */
@media (max-width: 768px) {
    .hero {
        min-height: 100vh;
        padding: calc(var(--spacing-xl) + 70px) var(--container-padding) var(--spacing-sm);
        align-items: flex-start;
        padding-top: 120px;
    }
    
    .hero-text {
        text-align: left;
    }
    
    .badge {
        font-size: 0.7rem;
        padding: var(--spacing-xs) var(--spacing-sm);
        margin-bottom: var(--spacing-md);
    }
    
    .badge .ai-sparkle {
        font-size: 1rem;
    }
    
    .hero h1 {
        font-size: clamp(2rem, 10vw, 3.5rem);
        margin-bottom: var(--spacing-md);
        color: var(--white);
        -webkit-text-fill-color: var(--white);
    }
    
    .hero-description {
        font-size: var(--text-lg);
        margin-bottom: var(--spacing-xl);
        color: rgba(255, 255, 255, 0.95);
        font-weight: var(--font-normal);
        line-height: 1.5;
    }
    
    .hero-cta {
        flex-direction: column;
        align-items: center;
        gap: var(--spacing-md);
        width: 100%;
    }
    
    /* Mobile: Trust section centered */
    .trust-section {
        margin-top: var(--spacing-xl);
        margin-bottom: var(--spacing-xs); /* Reduced bottom padding */
        margin-left: 0; /* Reset left margin on mobile */
        align-items: center;
        text-align: center;
        gap: 4px; /* Even smaller gap on mobile */
        align-self: center; /* Center section in mobile */
    }
    
    .avatar-stack {
        justify-content: center;
    }
    
    .trust-stars {
        justify-content: center;
    }
    
    .avatar {
        width: 42px; /* Decreased 6 points on mobile (48px - 6px) */
        height: 42px;
        margin-left: -8px; /* Adjusted overlap for larger avatars */
    }
    
    .star {
        width: 14px;
        height: 14px;
    }
    
    .trust-text {
        font-size: 11px;
        color: rgba(255, 255, 255, 0.4);
    }
    
    .primary-button {
        width: 100%;
        padding: var(--spacing-md) var(--spacing-lg);
        font-size: var(--text-sm);
        text-align: center;
        justify-content: center;
    }
    
    .secondary-link {
        font-size: var(--text-sm);
    }
    
    .tech-badge {
        display: none;
    }
    
    .hero::before {
        top: -30%;
        right: -50%;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero {
        padding-top: 100px;
    }
    
    .hero h1 {
        font-size: clamp(1.75rem, 12vw, 3rem);
    }
    
    .hero h1 .accent {
        display: inline;
    }
    
    .hero-description {
        font-size: var(--text-base);
        line-height: 1.6;
        color: rgba(255, 255, 255, 0.95);
        font-weight: var(--font-normal);
    }
    
    .primary-button {
        font-size: var(--text-xs);
        letter-spacing: var(--tracking-wide);
    }
}

/* Animations for slow connections */
@media (prefers-reduced-motion: reduce) {
    .hero-text,
    .hero-description,
    .hero-cta,
    .badge::before,
    .tech-badge,
    .hero::before,
    .hero h1 .accent {
        animation: none;
    }
    
    .badge {
        animation: none;
        box-shadow: 0 0 10px rgba(0, 255, 170, 0.2);
    }
}

/* High contrast mode */
@media (prefers-contrast: high) {
    .badge {
        border-width: 2px;
        font-weight: var(--font-bold);
    }
    
    .primary-button {
        border-width: 3px;
    }
    
    .hero h1 {
        -webkit-text-stroke: 1px var(--white);
    }
}

/* ============================================
   HERO STATS - CRISP & RECTANGULAR
   ============================================ */

/* Hero Stats Container */
.hero-stats {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 1rem;
    max-width: 900px;
    margin-top: var(--spacing-xl);
    margin-left: auto;
    margin-right: auto;
    position: relative;
    z-index: 2;
}

/* Stat Item - Rectangular & Compact */
.stat-item {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-lg);
    padding: 1rem 0.75rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100px;
    aspect-ratio: 2 / 1;
}

.stat-item:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(0, 255, 170, 0.3);
    transform: translateY(-2px);
}

/* Stat Metric - Bold & Crisp */
.stat-metric {
    display: block;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(1.75rem, 3vw, 2.25rem);
    font-weight: 800;
    color: var(--neon-green);
    line-height: 1;
    margin-bottom: 0.35rem;
    letter-spacing: -0.02em;
}

/* Stat Text - Same font as service cards */
.stat-item p {
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: clamp(0.75rem, 1.2vw, 0.85rem);
    line-height: 1.3;
    color: rgba(255, 255, 255, 0.75);
    margin: 0;
    font-weight: 400;
    letter-spacing: 0.01em;
}

/* Desktop Large */
@media (min-width: 1280px) {
    .hero-stats {
        gap: 1.25rem;
        max-width: 950px;
    }

    .stat-item {
        padding: 1.25rem 1rem;
        min-height: 110px;
    }

    .stat-metric {
        font-size: 2.5rem;
        margin-bottom: 0.5rem;
    }

    .stat-item p {
        font-size: 0.9rem;
    }
}

/* Tablet */
@media (min-width: 640px) and (max-width: 1023px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1rem;
        max-width: 600px;
        margin-left: auto;
        margin-right: auto;
    }

    .stat-item {
        min-height: 120px;
        aspect-ratio: auto;
    }
}

/* Mobile */
@media (max-width: 639px) {
    .hero-stats {
        grid-template-columns: repeat(2, 1fr);
        gap: 1.25rem;
        margin-top: var(--spacing-sm);
        padding: 0 var(--spacing-md);
        max-width: 100%;
    }

    .stat-item {
        padding: 1.25rem 0.875rem;
        min-height: 105px;
        aspect-ratio: auto;
        border-radius: 18px;
    }

    .stat-metric {
        font-size: 2.125rem;
        margin-bottom: 0.5rem;
    }

    .stat-item p {
        font-size: 0.8125rem;
        line-height: 1.3;
    }
}

/* Accessibility */
@media (prefers-reduced-motion: reduce) {
    .stat-item {
        transition: none;
    }

    .stat-item:hover {
        transform: none;
    }
}

/* Print styles */
@media print {
    .hero {
        min-height: auto;
        padding: var(--spacing-lg) 0;
    }

    .tech-badge,
    .hero::before,
    .hero-stats {
        display: none;
    }
}