@import 'variables.css';
@import 'common.css';

/* Hero general */
.foundation-hero {
    background: transparent;
    position: relative;
    overflow: hidden;
    padding: calc(var(--spacing-hero) * 2) var(--spacing-md) var(--spacing-hero);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

/* Fondo fijo con body-background.svg */
.foundation-hero::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image: url('../../images/body-background.svg');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    background-attachment: fixed;
    z-index: -1;
}

/* Overlay sutil */
.foundation-hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, 0.3);
    z-index: 1;
}

.hero-background-effects {
    position: absolute;
    inset: 0;
    z-index: 1;
}

/* Grid */
.grid-background {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(139, 92, 246, 0.08) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.08) 1px, transparent 1px);
    background-size: 60px 60px;
    opacity: 0.4;
    animation: grid-pulse 4s ease-in-out infinite alternate;
}

/* Partículas flotantes */
.floating-elements {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.floating-element {
    position: absolute;
    width: 8px;
    height: 8px;
    background: var(--color-primary);
    border-radius: 50%;
    opacity: 0.6;
    box-shadow: 0 0 10px rgba(139, 92, 246, 0.8);
    animation: float-particle 12s ease-in-out infinite;
}

.floating-element:nth-child(1) {
    top: 15%;
    left: 8%;
    animation-delay: 0s;
    animation-duration: 10s;
}

.floating-element:nth-child(2) {
    top: 35%;
    right: 12%;
    animation-delay: 3s;
    animation-duration: 14s;
}

.floating-element:nth-child(3) {
    bottom: 25%;
    left: 15%;
    animation-delay: 6s;
    animation-duration: 12s;
}

.floating-element:nth-child(4) {
    top: 55%;
    right: 25%;
    animation-delay: 9s;
    animation-duration: 16s;
}

/* Contenedor del título centrado */
.hero-title-container {
    position: relative;
    z-index: 2;
    margin-bottom: var(--spacing-xxl);
    text-align: center;
    width: 100%;
}

/* Contenido - Layout de dos columnas */
.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--spacing-xxl);
    align-items: center;
    position: relative;
    z-index: 2;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-text {
    animation: hero-slide-in 1s ease-out 0.2s both;
    text-align: left;
}

.hero-title {
    font-size: var(--font-size-hero);
    font-weight: 800;
    color: var(--color-primary);
    text-shadow: var(--text-glow);
    margin-bottom: var(--spacing-lg);
    line-height: 0.8;
    font-family: 'Venera', sans-serif;
}

.hero-content h1 {
    line-height: 0.8 !important;
}

.hero-title .highlight {
    background: var(--gradient-purple);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 900;
    position: relative;
    font-size: var(--font-size-xxl);
}

.highlight {
    font-family: 'Poppins', sans-serif;
}

.hero-subtitle {
    font-size: var(--font-size-xl);
    color: var(--text-muted);
    line-height: 1.6;
    max-width: 46ch;
    margin: 0;
    animation: hero-subtitle-fade 1.2s ease-out .3s both;
}

.hero-content p {
    font-size: var(--font-size-md);
}

/* Video en la sección hero */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    animation: hero-fade-in 1s ease-out 0.6s both;
    height: 100%;
}

.hero-video {
    width: 100%;
    max-width: 800px;
}

.video-frame,
.video-placeholder {
    width: 100%;
    aspect-ratio: 16 / 9;
    border-radius: var(--radius-xl, 20px);
    background: var(--bg-card, #1a1a1a);
    box-shadow: var(--shadow-md, 0 25px 50px rgba(0, 0, 0, 0.3));
    border: 1px solid rgba(139, 92, 246, 0.25);
    overflow: hidden;
    display: block;
}

.video-placeholder {
    display: grid;
    place-items: center;
    color: var(--text-muted);
    font-size: 0.95rem;
    padding: var(--spacing-md);
    text-align: center;
}

/* Scroll indicator */
.hero-scroll-indicator {
    display: flex;
    flex-direction: column;
    align-items: center;
    position: relative;
    z-index: 2;
    animation: fade-in-up 1s ease-out 1s both;
}

.scroll-arrow {
    width: 40px;
    height: 40px;
    border: 2px solid var(--color-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--spacing-sm);
    color: var(--color-primary);
    animation: bounce-arrow 2s ease-in-out infinite;
    cursor: pointer;
    transition: var(--transition-normal);
}

.scroll-arrow:hover {
    background: var(--color-primary);
    color: var(--bg-main);
    box-shadow: var(--box-glow);
}

.scroll-text {
    font-size: var(--font-size-sm);
    color: var(--text-muted-dark);
    font-weight: var(--font-weight-medium);
}

/* Animaciones definidas */
@keyframes purple-glow {
    0% {
        /* ... */
    }

    100% {
        /* ... */
    }
}

@keyframes grid-pulse {
    0% {
        opacity: 0.3;
    }

    100% {
        opacity: 0.5;
    }
}

@keyframes hero-slide-in {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes hero-fade-in {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-subtitle-fade {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fade-in-up {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float-particle {

    0%,
    100% {
        transform: translateY(0) rotate(0);
        opacity: 0.6;
    }

    50% {
        transform: translateY(-40px) rotate(180deg);
        opacity: 1;
    }
}

/* Responsive */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.5rem;
        line-height: 0.8;
    }
    
    .hero-content h1 {
        line-height: 0.8 !important;
    }

    .hero-video {
        max-width: 700px;
    }
}

@media (max-width: 768px) {
    .foundation-hero {
        min-height: 90vh;
        padding: calc(var(--spacing-hero)*1.5) var(--spacing-md) var(--spacing-xl);
    }

    .hero-title-container {
        margin-bottom: var(--spacing-lg);
    }

    .hero-content {
        grid-template-columns: 1fr;
        gap: var(--spacing-xl);
    }
    
    .hero-text {
        text-align: center;
    }

    .hero-title {
        font-size: 2rem;
        line-height: 0.8;
    }
    
    .hero-content h1 {
        line-height: 0.8 !important;
    }

    .hero-subtitle {
        font-size: var(--font-size-sm);
        max-width: 100%;
        margin: 0;
        text-align: center;
    }

    .hero-video {
        max-width: 100%;
    }
}

@media (max-width: 480px) {
    .hero-title {
        font-size: 1.8rem;
        line-height: 0.8;
    }
    
    .hero-content h1 {
        line-height: 0.8 !important;
    }

    .grid-background {
        background-size: 40px 40px;
    }
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {

    .foundation-hero::before,
    .grid-background,
    .floating-element,
    .scroll-arrow {
        animation: none;
    }
}