/* ============================================
   VECTORE GLOBAL — Hero Section
   Fullscreen split: Copy left + 3D right
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding: 100px 0 40px;
    background: rgb(17, 0, 58);
}

/* === Ambient Background === */
.hero__ambient {
    position: absolute;
    inset: 0;
    pointer-events: none;
    z-index: 0;
}

.hero__orb {
    position: absolute;
    border-radius: var(--radius-circle);
    filter: blur(100px);
    opacity: 0.25;
    will-change: transform;
}

.hero__orb--1 {
    width: 600px;
    height: 600px;
    background: var(--accent-primary);
    top: -15%;
    right: -10%;
    animation: orbFloat1 18s ease-in-out infinite alternate;
}

.hero__orb--2 {
    width: 400px;
    height: 400px;
    background: #5a35cc;
    bottom: -10%;
    left: -5%;
    animation: orbFloat2 14s ease-in-out infinite alternate;
}

.hero__orb--3 {
    width: 300px;
    height: 300px;
    background: var(--accent-glow);
    top: 40%;
    left: 30%;
    opacity: 0.1;
    animation: orbFloat3 20s ease-in-out infinite alternate;
}

@keyframes orbFloat1 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(-60px, 40px) scale(1.15); }
}
@keyframes orbFloat2 {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(50px, -30px) scale(0.85); }
}
@keyframes orbFloat3 {
    0% { transform: translate(0, 0) scale(1); opacity: 0.1; }
    50% { opacity: 0.2; }
    100% { transform: translate(-40px, -50px) scale(1.2); opacity: 0.08; }
}

/* === Grid Overlay Pattern === */
.hero__grid {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(134, 85, 255, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(134, 85, 255, 0.03) 1px, transparent 1px);
    background-size: 60px 60px;
    pointer-events: none;
    mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at 50% 50%, rgba(0,0,0,0.5) 0%, transparent 80%);
}

/* === Hero Layout === */
.hero__container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--container-padding);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    position: relative;
    z-index: 1;
    pointer-events: none;
}

.hero__content {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    pointer-events: auto;
}

.hero__badge {
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.2s backwards;
    align-self: flex-start;
}

.hero__title {
    font-size: clamp(2.2rem, 1.8rem + 4vw, 4.5rem);
    font-weight: var(--font-black);
    letter-spacing: var(--tracking-tighter);
    line-height: var(--leading-tight);
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.35s backwards;
}

.hero__subtitle {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    max-width: 480px;
    line-height: var(--leading-relaxed);
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.5s backwards;
}

.hero__actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.65s backwards;
}

.hero__stats {
    display: flex;
    gap: var(--space-12);
    margin-top: var(--space-4);
    animation: fadeInUp 0.6s var(--ease-out-expo) 0.8s backwards;
}

.hero__stat {
    text-align: left;
}

.hero__stat-number {
    display: block;
    font-size: var(--text-2xl);
    font-weight: var(--font-extrabold);
    color: var(--text-primary);
}

.hero__stat-label {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-wider);
    text-transform: uppercase;
}

/* === 3D / Spline Area === */
.hero__visual {
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: fadeInScale 0.8s var(--ease-out-expo) 0.4s backwards;
}

.hero__spline-container {
    width: 100%;
    min-height: 650px; /* Instead of fixed aspect ratio */
    position: relative;
    /* Removed border-radius and overflow hidden to avoid clipping and border lines */
    display: flex;
    align-items: center;
    justify-content: center;
}

.hero__spline-container canvas,
.hero__spline-container iframe {
    width: 100%;
    height: 100%;
    border: none;
    position: absolute;
    inset: 0;
    pointer-events: auto; /* Ensure hover works */
}

/* Dual Background Spline Setup */
.spline-frame--dark {
    opacity: 1;
    pointer-events: auto;
}
.spline-frame--light {
    opacity: 0;
    pointer-events: none;
}

[data-theme="light"] .spline-frame--dark {
    opacity: 0 !important;
    pointer-events: none !important;
}
[data-theme="light"] .spline-frame--light {
    opacity: 1 !important;
    pointer-events: auto !important;
    mix-blend-mode: multiply; /* Fixes baked-in background color edges */
}

/* Spline fallback (glassmorphism logo) */
.hero__spline-fallback {
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: radial-gradient(circle at 50% 50%, rgba(134, 85, 255, 0.08), transparent 70%);
    position: relative;
}

.hero__spline-fallback img {
    width: 55%;
    height: auto;
    filter: drop-shadow(0 0 40px rgba(134, 85, 255, 0.3));
    animation: logoFloat 6s ease-in-out infinite;
}

@keyframes logoFloat {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50% { transform: translateY(-15px) rotate(2deg); }
}

/* Removed Glow ring to avoid box letterboxing */

/* === Animations === */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInScale {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* === Scroll Indicator === */
.hero__scroll {
    position: absolute;
    bottom: 40px;
    left: 50%;
    transform: translateX(-50%);
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-2);
    animation: fadeInUp 0.6s var(--ease-out-expo) 1.2s backwards;
}

.hero__scroll-line {
    width: 1px;
    height: 40px;
    background: linear-gradient(180deg, var(--accent-primary), transparent);
    animation: scrollPulse 2s ease-in-out infinite;
}

@keyframes scrollPulse {
    0%, 100% { opacity: 0.3; transform: scaleY(1); }
    50% { opacity: 1; transform: scaleY(1.2); }
}

.hero__scroll-text {
    font-size: var(--text-xs);
    color: var(--text-tertiary);
    letter-spacing: var(--tracking-widest);
    text-transform: uppercase;
    writing-mode: vertical-lr;
}

/* === Responsive === */
@media (max-width: 1024px) {
    .hero {
        align-items: flex-start;
        overflow: visible;
        padding: 128px 0 72px;
    }

    .hero__container {
        grid-template-columns: 1fr;
        text-align: center;
        gap: var(--space-8);
        align-items: start;
    }

    .hero__content {
        align-items: center;
        width: 100%;
    }

    .hero__badge {
        align-self: center;
    }

    .hero__subtitle {
        max-width: 600px;
    }

    .hero__actions {
        justify-content: center;
    }

    .hero__stats {
        justify-content: center;
        width: 100%;
    }

    .hero__spline-container {
        max-width: 400px;
    }

    .hero__scroll {
        display: none;
    }
}

@media (max-width: 640px) {
    .hero {
        min-height: auto;
        padding: 132px 0 max(88px, calc(env(safe-area-inset-bottom, 0px) + 64px));
    }

    .hero__stats {
        display: grid;
        grid-template-columns: 1fr 1fr;
        gap: var(--space-5);
        text-align: center;
        margin-top: var(--space-6);
        padding-bottom: var(--space-2);
    }

    .hero__stat {
        min-width: 0;
    }

    .hero__stat:last-child {
        grid-column: span 2;
        margin-top: var(--space-2);
    }
    
    .hero__stat-number {
        font-size: var(--text-xl);
        line-height: 1.05;
    }

    .hero__stat-label {
        line-height: 1.35;
    }

    .hero__spline-container {
        max-width: 280px;
    }
}

/* === Light Mode Overrides === */
[data-theme="light"] .hero {
    background: #FFFFFF;
}

@media (prefers-color-scheme: light) {
    :root:not([data-theme="dark"]) .hero {
        background: #FFFFFF;
    }
}

/* === Mobile Dynamic Background (Peru Web Style) === */
.hero-bg--mobile {
    display: none;
    position: absolute;
    inset: 0;
    overflow: hidden;
    z-index: 0;
}
.shape-container {
    position: absolute;
    inset: 0;
    pointer-events: none;
    transition: transform 0.6s cubic-bezier(0.165, 0.84, 0.44, 1);
    will-change: transform;
}
.floating-shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.35;
    will-change: transform;
}
@keyframes firefly-float-1 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.2; }
    33% { transform: translate(25vw, 15vh) scale(1.2) rotate(120deg); opacity: 0.5; }
    66% { transform: translate(-15vw, 25vh) scale(0.8) rotate(240deg); opacity: 0.3; }
}
@keyframes firefly-float-2 {
    0%, 100% { transform: translate(0, 0) scale(1.1) rotate(0deg); opacity: 0.4; }
    50% { transform: translate(-25vw, -20vh) scale(0.7) rotate(-180deg); opacity: 0.1; }
}
@keyframes firefly-float-3 {
    0%, 100% { transform: translate(0, 0) scale(1) rotate(0deg); opacity: 0.3; }
    25% { transform: translate(20vw, -20vh) scale(1.1) rotate(90deg); opacity: 0.6; }
    50% { transform: translate(30vw, 10vh) scale(0.9) rotate(180deg); opacity: 0.2; }
    75% { transform: translate(10vw, 30vh) scale(1.2) rotate(270deg); opacity: 0.4; }
}
@keyframes firefly-float-4 {
    0%, 100% { transform: translate(0, 0) scale(1); opacity: 0.4; }
    33% { transform: translate(-20vw, 20vh) scale(1.3); opacity: 0.1; }
    66% { transform: translate(25vw, -15vh) scale(0.7); opacity: 0.5; }
}
.shape-1 { width: 600px; height: 600px; background: var(--primary, #8655FF); top: -200px; right: -100px; animation: firefly-float-1 15s infinite ease-in-out alternate; }
.shape-2 { width: 450px; height: 450px; background: var(--primary-light, #a67fff); bottom: -150px; left: -100px; animation: firefly-float-2 12s infinite ease-in-out alternate; }
.shape-3 { width: 350px; height: 350px; background: var(--primary-dark, #6b3fd9); top: 15%; left: 15%; animation: firefly-float-3 18s infinite ease-in-out alternate; }
.shape-4 { width: 400px; height: 400px; background: #5a35cc; bottom: 10%; right: 10%; animation: firefly-float-4 14s infinite ease-in-out alternate; }

@media (max-width: 768px) {
    .hero-bg--mobile {
        display: block;
    }
    .hero__spline-background {
        display: none !important;
    }
    .hero__ambient {
        display: none;
    }
}

/* === Light Mode Mobile Shape Overrides === */
[data-theme="light"] .floating-shape {
    background: #E0E0E0 !important;
    opacity: 0.15;
}

[data-theme="light"] .shape-1 { background: #E0E0E0 !important; }
[data-theme="light"] .shape-2 { background: #D5D5D5 !important; }
[data-theme="light"] .shape-3 { background: #EAEAEA !important; }
[data-theme="light"] .shape-4 { background: #F0F0F0 !important; }
