/* =========================================
   FVC STUDIOS - PREMIUM DESIGN SYSTEM
   ========================================= */

:root {
    --bg-dark: #050505;
    --text-light: #f8f9fa;
    --text-muted: #a0aab2;
    --primary: #00f0ff;
    /* Neon Cyan */
    --secondary: #8a2be2;
    /* Deep Purple */
    --glass-bg: rgba(20, 20, 25, 0.6);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-highlight: rgba(255, 255, 255, 0.15);

    --transition-fast: 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-smooth: 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-dark);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

/* =========================================
   BACKGROUND VIDEO
   ========================================= */
.video-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    overflow: hidden;
}

#bg-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scale(1.05);
    /* Slight zoom to prevent edge bleeding on blur/scale */
    filter: brightness(0.7) contrast(1.1);
}

.video-overlay {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle at center, rgba(5, 5, 5, 0.75) 0%, rgba(5, 5, 5, 0.98) 100%);
    pointer-events: none;
    opacity: 0;
    /* Empieza totalmente transparente */
    animation: overlayDarken 2s ease-out 0s forwards;
    /* Tarda 2 segundos en oscurecerse desde el segundo 0 */
}

/* =========================================
   UTILITIES & EFFECTS
   ========================================= */
.glass-effect {
    background: var(--glass-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--glass-border);
    box-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.3);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    color: transparent;
    display: inline-block;
}

.mt-4 {
    margin-top: 2rem;
}

/* Buttons */
.btn-primary,
.btn-secondary {
    display: inline-block;
    padding: 12px 28px;
    border-radius: 30px;
    font-weight: 600;
    text-decoration: none;
    letter-spacing: 0.5px;
    transition: var(--transition-smooth);
    cursor: pointer;
    font-size: 1rem;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: #fff;
    border: none;
    box-shadow: 0 4px 15px rgba(0, 240, 255, 0.3);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, var(--secondary), var(--primary));
    z-index: -1;
    transition: opacity var(--transition-smooth);
    opacity: 0;
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(138, 43, 226, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-light);
    border: 1px solid var(--glass-highlight);
    backdrop-filter: blur(5px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--text-light);
    transform: translateY(-2px);
}

/* =========================================
   NAVIGATION
   ========================================= */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 100;
    padding: 15px 0;
    border-top: none;
    border-left: none;
    border-right: none;
    border-radius: 0;
    transition: padding var(--transition-smooth), background var(--transition-smooth);
}

.navbar.scrolled {
    padding: 10px 0;
    background: rgba(5, 5, 5, 0.85);
}

.nav-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0 2rem;
}

.nav-logo {
    height: 40px;
    width: auto;
    object-fit: contain;
    transition: transform var(--transition-fast);
}

.nav-logo:hover {
    transform: scale(1.05);
}

.nav-links {
    list-style: none;
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links a:not(.btn-primary) {
    color: var(--text-light);
    text-decoration: none;
    font-weight: 400;
    font-size: 0.95rem;
    position: relative;
    transition: color var(--transition-fast);
}

.nav-links a:not(.btn-primary):hover {
    color: var(--primary);
}

.nav-links a:not(.btn-primary)::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -4px;
    left: 0;
    background: linear-gradient(90deg, var(--primary), var(--secondary));
    transition: width var(--transition-smooth);
}

.nav-links a:not(.btn-primary):hover::after {
    width: 100%;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: 0 2rem;
    padding-top: 80px;
    /* Offset for nav */
}

.hero-content {
    max-width: 800px;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
}

/* Base starting state for all hero content to animate in */
.hero-content>* {
    opacity: 0;
}

/* Logo */
.hero-content> :nth-child(1) {
    animation-delay: 0.4s;
}

/* Título principal */
.hero-content> :nth-child(2) {
    animation-delay: 0.9s;
}

/* Subtítulo */
.hero-content> :nth-child(3) {
    animation-delay: 1.6s;
}

/* Botón Descubre Más */
.hero-content> :nth-child(4) {
    animation-delay: 2.4s;
}

.hero-logo-large {
    max-width: 300px;
    height: auto;
    margin-bottom: 1rem;
    filter: drop-shadow(0 0 20px rgba(0, 0, 0, 0.5));
    /* Combine both the load animation AND the float animation */
    animation: heroLoad 1.5s cubic-bezier(0.16, 1, 0.3, 1) 0.8s forwards,
        float 6s ease-in-out infinite 0.8s;
}

.hero h1 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    font-weight: 800;
    line-height: 1.1;
    letter-spacing: -1px;
    animation: heroLoad 1.2s cubic-bezier(0.16, 1, 0.3, 1) 0.9s forwards;
}

.hero-subtitle {
    font-size: clamp(1.1rem, 2vw, 1.4rem);
    color: var(--text-muted);
    font-weight: 300;
    max-width: 600px;
    animation: heroLoad 1.2s cubic-bezier(0.16, 1, 0.3, 1) 1.6s forwards;
}

.hero-buttons {
    display: flex;
    gap: 1rem;
    margin-top: 1rem;
    animation: fadeInOpacity 1.2s ease-out 2.4s forwards;
}

/* =========================================
   MAIN SECTIONS (SERVICES & PROJECTS)
   ========================================= */
main {
    position: relative;
    z-index: 10;
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 3rem;
    font-weight: 800;
}

.services {
    max-width: 1200px;
    margin: 0 auto;
    padding: 6rem 2rem;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.service-card {
    padding: 2.5rem 2rem;
    border-radius: 20px;
    text-align: center;
    transition: transform var(--transition-smooth), background var(--transition-smooth), border-color var(--transition-smooth);
    display: flex;
    flex-direction: column;
    height: 100%;
}

.service-card:hover {
    transform: translateY(-10px);
    background: rgba(30, 30, 35, 0.75);
    border-color: var(--primary);
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.4), 0 0 20px rgba(0, 240, 255, 0.1);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 1rem;
    font-weight: 600;
    min-height: 4.5rem;
    /* Reserve space for up to two lines so paragraphs align perfectly */
    display: flex;
    align-items: flex-start;
    justify-content: center;
    line-height: 1.3;
}

.service-card p {
    color: var(--text-muted);
    font-size: 0.95rem;
    text-align: justify;
}

/* =========================================
   FOOTER
   ========================================= */
.footer {
    padding: 4rem 2rem 2rem;
    border-radius: 30px 30px 0 0;
    border-bottom: none;
    border-left: none;
    border-right: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 1.5rem;
}

.footer-logo {
    max-width: 200px;
    opacity: 0.8;
    transition: opacity var(--transition-fast);
}

.footer-logo:hover {
    opacity: 1;
}

.contact-email {
    font-size: 1.5rem;
    font-weight: 800;
}

.contact-email a {
    text-decoration: none;
}

.copyright {
    color: #666;
    font-size: 0.9rem;
    margin-top: 2rem;
}

/* =========================================
   ANIMATIONS & RESPONSIVE
   ========================================= */
@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-15px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes heroLoad {
    0% {
        opacity: 0;
        transform: translateY(50px);
    }

    100% {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes overlayDarken {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

@keyframes fadeInOpacity {
    0% {
        opacity: 0;
    }

    100% {
        opacity: 1;
    }
}

.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.fade-in-up.visible {
    opacity: 1;
    transform: translateY(0);
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        /* For simplicity, hiding on mobile. Can add hamburger later */
    }

    .hero h1 {
        font-size: 2.5rem;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
        max-width: 300px;
    }

    .featured-project {
        padding: 3rem 1.5rem;
        margin: 2rem 1.5rem 5rem;
    }
}