html {
    scroll-behavior: smooth;
}

body {
	box-sizing: border-box;
    margin: 0;
    padding: 0;
}

h1, h2, h3, h4, h5, h6 {
	padding: 0;
	margin: 0;
}

p, a, ol, ul, li {
	padding: 0;
	margin: 0;
}

/* --- VARIABLES Y ESTILOS GLOBALES --- */
:root {
    --bg-color: #f5f5f5;
    --text-color: #000000;
    --subtext-color: #666666;
    --primary-purple: #8e44ad;
    --primary-blue: #3498db;
    --primary-green: #2ecc71;
    --dark-bg: #111111;
    --light-text: #ffffff;
    --border-color: #e0e0e0;
    --button-dark: #000000;
    --navbar-height: 4rem;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-color);
    font-family: "Geist", sans-serif;
    font-size: 16px;
    color: var(--text-color);
    line-height: 1.6;
}

span {
    font-family: "Geist", sans-serif;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

/* --- HEADER Y NAVEGACIÓN --- */
.main-header {
    position: fixed;
    top: 1.5rem;
    left: 0;
    width: 100%;
    z-index: 1000;
    height: var(--navbar-height);
    transition: background-color 0.3s ease;
    padding: 0 2.5rem;
}

.nav-container {
    display: flex;
    justify-content: space-between;
    padding: .4375rem;
    align-items: center;
    max-width: 85.5rem;
    background-color: var(--bg-color);
    backdrop-filter: blur(10px);
    border-radius: 1rem;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

.nav-container.scrolled {
    background-color: #ffffff;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.logo {
    font-family: "DM Sans", sans-serif;
    font-size: 1.5rem;
    font-weight: 300;
    text-decoration: none;
    color: var(--text-color);
    padding: 0 .75rem;
}

.x-logo {
    font-weight: 700;
}

.main-nav ul {
    display: flex;
    list-style: none;
    gap: 1.5rem;
}

.main-nav li a{
    font-weight: 500;
    padding: .5rem;
    border-radius: .375rem;
}

.main-nav a {
    text-decoration: none;
    color: var(--subtext-color);
    font-weight: 300;
    transition: color 0.3s ease;
}

.main-nav a:hover {
    color: #000000;
    background-color: #E6E6E6;
}

.btn {
    font-family: "Geist", sans-serif;
    padding: .875rem 1rem;
    border-radius: 8px;
    text-decoration: none;
    font-size: .875rem;
    font-weight: 400;
    transition: all 0.3s ease;
    display: inline-block;
}

.btn-dark {
    background-color: var(--button-dark);
    color: var(--light-text);
}

.btn-light {
    background-color: var(--light-text);
    color: var(--button-dark);
}

.btn-dark-hero, .btn-light-hero {
    font-size: 1rem;
    padding: 1.125rem 1rem;
    font-weight: 400;
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
    display: flex;
    justify-content: center;
}

.btn-hero {
    padding: .25rem;
    border: 1px rgb(255 255 255 / .3) solid;
    border-radius: .75rem;
    transition: all .3s;
    text-decoration: none;
}

.btn-dark-cta, .btn-light-cta {
    font-size: 1rem;
    border: 1px #E6E6E6 solid;
}

.btn-dark-cta:hover, .btn-light-cta:hover {
    font-weight: 500;
}

.btn-hero:hover {
    border: 1px #000000 solid;
}

.hamburger-menu {
    display: none;
    flex-direction: column;
    justify-content: space-around;
    width: 1rem;
    height: 1.25rem;
    background: transparent;
    border: none;
    cursor: pointer;
    margin: 0 .35rem 0 0;
    z-index: 1001;
}

.hamburger-menu:focus {
    outline: none;
}

.hamburger-menu .line {
    width: 100%;
    height: 0.15rem;
    background: var(--text-color);
    transition: all 0.3s ease;
}

.hamburger-menu.open .line:nth-child(1) {
  transform: translateY(.441rem) rotate(45deg); /* Rota y desplaza la primera línea */
}

.hamburger-menu.open .line:nth-child(2) {
  opacity: 0; /* Oculta la línea del medio */
}

.hamburger-menu.open .line:nth-child(3) {
  transform: translateY(-.441rem) rotate(-45deg); /* Rota y desplaza la tercera línea */
}


/* --- HERO SECTION --- */
#hero {
    padding-top: calc(var(--navbar-height) + 3rem);
    padding-left: 1.5rem;
    padding-right: 1.5rem;
    padding-bottom: 1.5rem;
    text-align: center;
    position: relative;
    height: calc(100svh - 1.5rem);
    min-height: 48rem;
    max-height: min(80rem, 300vw);
    overflow: hidden;
    margin: 0 0 7rem;
}

/* --- DEFINICIÓN DE LA ANIMACIÓN DE FONDO --- */
/* --- DEFINICIÓN DE LA ANIMACIÓN DE FONDO (VERSIÓN MEJORADA) --- */
@keyframes slowDrift {
    0% {
        background-position: 40% 0%; /* Empieza ligeramente a la izquierda del centro */
    }
    50% {
        background-position: 60% 100%; /* Se mueve a la derecha y hacia abajo */
    }
    100% {
        background-position: 40% 0%; /* Vuelve suavemente al inicio */
    }
}

.hero-content {
    position: relative;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
    z-index: 1;
    max-width: 1392px;
    padding: 6rem 2.5rem 0 2.5rem;
    background-color: #111111;
    border-radius: 1rem;
    height: 100%;
    overflow: hidden;

    /* --- LÍNEAS PARA LA ANIMACIÓN --- */
    background-size: 120% 120%;                /* 1. Hacemos el fondo más grande */
    animation: slowDrift 40s linear infinite;   /* 2. Aplicamos la animación */
    
    /* Tu código de gradientes se mantiene exactamente igual */
    background-image:
        /* 1. Rosa Eléctrico (Nuevo) - Centro Izquierda */
        radial-gradient(at 10% 50%, hsla(330, 100%, 50%, 0.7), transparent 60%),

        /* 2. Café Claro / Arena (Nuevo) - Abajo al centro */
        radial-gradient(at 50% 95%, hsla(34, 43%, 65%, 0.6), transparent 70%),

        /* 3. Magenta Neón (Evolución) - Esquina inferior izquierda */
        radial-gradient(at 20% 85%, hsla(305, 85%, 52%, 0.7), transparent 50%),
        
        /* 4. Verde Lima (Evolución) - Esquina inferior derecha */
        radial-gradient(at 80% 90%, hsla(145, 100%, 56%, 0.7), transparent 70%),
        
        /* 5. Naranja Vibrante (Evolución) - Esquina superior derecha */
        radial-gradient(at 90% 15%, hsla(32, 100%, 55%, 0.8), transparent 90%),
        
        /* 6. Azul Eléctrico (Evolución) - Esquina superior izquierda */
        radial-gradient(at 10% 20%, hsla(220, 100%, 50%, 0.7), transparent 70%);
}

#hero h1 {
    font-size: clamp(3.625rem, 1.625rem + 8.3333vw, 128px) !important;
    font-weight: 600;
    color: var(--light-text);
    letter-spacing: -.04em;
    line-height: .95;
    text-wrap: balance;
}

#hero p {
    font-size: 1.375rem;
    font-weight: 300;
    color: var(--light-text);
    text-wrap: balance;
    line-height: 1.6875rem;
    margin: 0 0 1rem;
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin: 0 0 1rem;
    padding: 0 1.25rem;
}

.hero-video-placeholder {
    border-radius: .375rem;
    max-width: 1180px;
    margin: 0 auto;
    display: flex;
    align-items: flex-end;
}

.hero-video-placeholder img {
    display: block;
    width: 100%;
    background-color: #fff;
    border-radius: .375rem .375rem 0 0;
    object-fit: cover;
}

/* --- CLIENTS SECTION --- */
#clients {
    text-align: center;
}

#clients h3 {
    font-family: "Geist Mono", monospace;
    font-size: 1rem;
    font-weight: 300;
    color: #999999;
    text-transform: uppercase;
    margin: 0 0 3rem;
}

.logo-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
    gap: 40px;
    align-items: center;
}

.logo-grid img {
    max-width: 140px;
    filter: grayscale(100%);
    opacity: 0.6;
    transition: all 0.3s ease;
    margin: 0 auto;
}

.logo-grid img:hover {
    filter: grayscale(0%);
    opacity: 1;
}

/* --- SERVICE SECTIONS --- */
.service-section {
    text-align: center;
    padding: 4.5rem 0;
}

#development {
    padding: 8.5rem 0 4.5rem;
}

.service-container {
    max-width: 1296px;
    padding: 0 1.5rem;
}

.service-section h2 {
    font-size: 3rem;
    max-width: 90%;
    font-weight: 600;
    line-height: 3.375rem;
    margin: 0 auto 1rem;
}

.service-section p {
    font-size: 1.375rem;
    font-weight: 300;
    max-width: 90%;
    margin: 0 auto 3.375rem;
    color: var(--subtext-color);
}

.service-image-wrapper {
    margin: 0 auto;
    border-radius: 1.5rem;
    display: flex;
    justify-content: center;
    align-items: end;
    aspect-ratio: 1296 / 670;
}

.service-video {
    object-fit: contain;
    border-radius: 0.5rem 0.5rem 0 0;
    background-color: #fff;
    max-width: 100%;
    max-height: 90%;
}

#development .service-image-wrapper { 
    background-color: #1a1a1a;
    background-image:
        /* Magenta DOMINANTE - Más grande y centrado */
        radial-gradient(circle at 50% 50%, hsla(305, 85%, 52%, 0.8), transparent 90%),
        /* Azul de apoyo */
        radial-gradient(circle at 10% 20%, hsla(220, 100%, 50%, 0.7), transparent 75%),
        /* Rosa de apoyo */
        radial-gradient(circle at 85% 80%, hsla(330, 100%, 50%, 0.7), transparent 70%),
        /* Naranja de apoyo */
        radial-gradient(circle at 15% 90%, hsla(32, 100%, 55%, 0.6), transparent 75%); 
}
#performance .service-image-wrapper { 
    background-color: #1a1a1a;
    background-image:
        /* Naranja DOMINANTE - Foco principal y brillante */
        radial-gradient(circle at 80% 20%, hsla(32, 100%, 55%, 0.9), transparent 90%),
        /* Rosa de apoyo */
        radial-gradient(circle at 15% 85%, hsla(330, 100%, 50%, 0.7), transparent 75%),
        /* Café de apoyo */
        radial-gradient(circle at 20% 20%, hsla(34, 43%, 65%, 0.7), transparent 70%),
        /* Verde de apoyo */
        radial-gradient(circle at 90% 90%, hsla(145, 100%, 56%, 0.6), transparent 75%);
}
#email .service-image-wrapper { 
    background-color: #1a1a1a;
    background-image:
        /* Verde DOMINANTE - Protagonista central-inferior */
        radial-gradient(circle at 40% 80%, hsla(145, 100%, 56%, 0.8), transparent 90%),
        /* Azul de apoyo */
        radial-gradient(circle at 10% 15%, hsla(220, 100%, 50%, 0.7), transparent 45%),
        /* Naranja de apoyo */
        radial-gradient(circle at 90% 20%, hsla(32, 100%, 55%, 0.7), transparent 70%),
        /* Café de apoyo */
        radial-gradient(circle at 85% 85%, hsla(34, 43%, 65%, 0.6), transparent 75%); 
}
#cro .service-image-wrapper { 
    background-color: #1a1a1a;
    background-image:
        /* Azul DOMINANTE - Grande en la esquina superior */
        radial-gradient(circle at 20% 25%, hsla(220, 100%, 50%, 0.85), transparent 95%),
        /* Verde de apoyo */
        radial-gradient(circle at 80% 80%, hsla(145, 100%, 56%, 0.7), transparent 70%),
        /* Magenta de apoyo */
        radial-gradient(circle at 90% 10%, hsla(305, 85%, 52%, 0.6), transparent 70%),
        /* Café de apoyo */
        radial-gradient(circle at 50% 100%, hsla(34, 43%, 65%, 0.6), transparent 70%); }

.service-section img {
    max-width: 100%;
    height: 90%;
    border-radius: 0.5rem 0.5rem 0 0;
}

/* --- FINAL CTA SECTION --- */
#final-cta {
    padding: 4.5rem 0 9.5rem;
}

.cta-container {
    max-width: 1296px;
}

.cta-box {
    background-color: #fff;
    border: 1px solid var(--border-color);
    border-radius: 20px;
    padding: 3.5rem;
    display: grid;
    grid-template-rows: repeat(1, minmax(0px, 1fr));
    grid-template-columns: repeat(12, minmax(0px, 1fr));
    gap: 3rem;
}

.cta-content {
    display: flex; 
    grid-area: 1 / 1 / 2 / 6;
    flex-direction: column;
    justify-content: space-between;
}

.cta-text {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

#final-cta h2 {
    font-size: 3rem;
    font-weight: 500;
    line-height: 3.375rem;
    text-wrap: balance;
}

#final-cta p {
    font-size: 1.375rem;
    font-weight: 300;
    color: var(--subtext-color);
}

.cta-buttons {
    display: flex;
    gap: 15px;
}

.cta-calendar {
    position: relative;
    grid-area: 1 / 6 / 2 / 13;
    aspect-ratio: 714 / 409;
    background-color: #1a1a1a;
    background-image:
        radial-gradient(at 10% 50%, hsla(330, 100%, 50%, 0.7), transparent 60%),
        radial-gradient(at 50% 95%, hsla(34, 43%, 65%, 0.6), transparent 70%),
        radial-gradient(at 20% 85%, hsla(305, 85%, 52%, 0.7), transparent 50%),
        radial-gradient(at 80% 90%, hsla(145, 100%, 56%, 0.7), transparent 70%),
        radial-gradient(at 90% 15%, hsla(32, 100%, 55%, 0.8), transparent 90%),
        radial-gradient(at 10% 20%, hsla(220, 100%, 50%, 0.7), transparent 70%);
    border-radius: 1rem;
    display: flex;
    align-items: center;
}

.cta-calendar img {
    aspect-ratio: 714 / 409;
    height: 90%;
    width: 95%;
    margin: 0 auto;
}

/* --- FOOTER --- */
/* Estilos para el footer general */
.main-footer {
    background-color: #fff;
    padding: 4rem 0;
    border-top: 1px solid var(--border-color);
}

.footer-container {
    max-width: 1296px;
    padding: 0 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 4fr 2fr;
    gap: 5rem;
    padding: 0 0 1rem;
}

.footer-menu {
    display: grid;
    grid-template-columns: 1fr 1fr 1fr 1fr;
    gap: 6rem;
}

.footer-col {
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

#footer-logo {
    font-weight: 300;
    font-size: 1.5rem;
}

.footer-col h4 {
    font-size: 1rem;
    font-weight: 300;
    color: var(--button-dark);
}

.footer-col ul {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    list-style: none;
}

.footer-col a {
    text-decoration: none;
    color: var(--subtext-color);
    transition: color 0.3s ease;
    font-weight: 300;
}

.footer-col a:hover {
    color: var(--text-color);
}

.social-icons {
    display: flex;
    align-items: center;
    justify-content: start;
    gap: .5rem
}

.social-icons a {
    font-size: 1.125rem;
    color: #555;
    align-self: center;
    width: 1.5rem;
    height: 1.5rem;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 20px;
    border-top: 1px solid var(--border-color);
    font-size: 0.9rem;
    color: #888;
}

.footer-controls {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Estilos específicos para el selector de idioma */
.language-selector {
    position: relative;
    display: inline-block;
}

.language-button {
    font-family: "Geist", sans-serif;
    font-size: 1rem;
    font-weight: 300;
    color: var(--subtext-color);
    border: 1px solid #cccccc;
    padding: .125rem .375rem .125rem .5rem;
    cursor: pointer;
    border-radius: .5rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    text-align: left;
    line-height: 1.5rem;
}

.language-button:hover {
    background-color: #eee;
}

.language-content {
    display: flex;
    gap: .5rem;
}

.language-dropdown {
    position: absolute;
    top: calc(100% + .25rem);
    left: 0;
    background-color: var(--bg-color);
    border: 1px solid #cccccc;
    border-radius: .5rem;
    padding: .25rem;
    list-style: none;
    margin: 0;
    width: 100%;
    display: none;
    z-index: 1000;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.language-dropdown li a {
    font-size: .875rem;
    line-height: 1.5rem;
    display: block;
    padding: .25rem .5rem;
    text-decoration: none;
    color: var(--text-color);
    display: flex;
    align-items: center;
    justify-content: space-between;
    border-radius: .5rem;
}

.language-dropdown li a:hover {
    background-color: #333;
    color: var(--light-text);
}

.language-dropdown li .checkmark {
    display: none;
}

.language-dropdown li.selected .checkmark {
    display: inline;
}

.language-selector.open .language-dropdown {
    display: block;
}

.icon {
    font-size: 1rem;
}

.arrow {
    font-size: 12px;
}

/* Estilos del selector de tema */
.theme-switcher {
    display: flex;
    background-color: var(--bg-color);
    border: 1px solid #ccc;
    border-radius: .5rem;
    overflow: hidden;
    align-self: flex-start;
}

.theme-button {
    background-color: transparent;
    border: none;
    padding: .25rem .5rem;
    cursor: pointer;
    font-size: 1rem;
    color: #ccc;
    transition: background-color 0.3s, color 0.3s;
}

.theme-button:hover {
    background-color: #ddd;
}

.theme-button.active {
    background-color: #fff;
    color: #999;
    border-radius: .4rem;
    border: 1px solid #ccc;
}

/* Estilos del modo noche (ejemplo básico) */
body.dark-mode {
    background-color: #000;
    color: #fff;
}

body.dark-mode h1,
body.dark-mode h2,
body.dark-mode h3 {
    color: #fff;
}

body.dark-mode p {
    color: #ccc;
}

/* Iconos de Font Awesome */
.theme-button i {
    font-size: 1.2em;
}

/* --- RESPONSIVE DESIGN --- */
@media (max-width: 992px) {
    .main-nav { display: none; }
    .footer-grid { grid-template-columns: 1fr 1fr 1fr; }
    .footer-about { grid-column: 1 / -1; }
}

@media (max-width: 768px) {
    :root {
        --navbar-height: 2.75rem;
    }

    /* -- NAVBAR -- */
    .main-header {
        top: 1rem;
        padding: 0 1.5rem;
    }

    .main-header.open {
        top: 0;
        padding-top: 1rem;
        width: 100vw;
        height: 100vh;
        background-color: var(--bg-color);
        .main-nav {
            position: absolute;
            top: calc(var(--navbar-height) + 1rem);
            display: flex;
        }
        .nav-container.nav-container.scrolled{
            background-color: var(--bg-color);
            box-shadow: none;
        }
        .nav-container > a.btn {
            position: absolute;
            top: calc(88vh);
            display: flex;
        }
    }

    .main-nav ul {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
    }

    .main-nav ul li a {
        color: #4d4d4d;
        text-decoration: none;
        font-size: 2rem;
        font-weight: 500;
        display: block;
        width: 100%;
        padding: 0;
    }

    .nav-container {
        border-radius: .5rem;
    }

    .logo {
        font-size: 1.25rem;
        line-height: 1.5;
    }

    .nav-container > a.btn {
        display: none;
    }

    .hamburger-menu {
        display: flex;
    }

    /* --- HERO --- */
    #hero {
        padding-top: calc(var(--navbar-height) + 2rem);
        padding-left: 1rem;
        padding-right: 1rem;
        height: auto;
        min-height: 40rem;
        margin: 0 0 4.5rem;
    }

    #hero h1 { 
        font-size: 3rem; 
        padding: 0 1rem 0 1rem;
    }

    #hero p {
        font-size: 1rem;
        line-height: 1.25rem;
    }

    .hero-content {
        padding: 3rem 0 0 0;
    }

    .hero-buttons {
        position: absolute;
        bottom: 0;
        left: 0;
        padding: 0 1rem;
        gap: .5rem;
        width: 100%;
        z-index: 999;
    }

    .btn-dark-hero, .btn-light-hero {
        font-size: .875rem;
        line-height: 1rem;
        padding: .9375rem .875rem;
    }

    .hero-video-placeholder {
        padding: 0 .5rem;
    }

    .hero-video-placeholder::after {
        content: '';
        position: absolute;
        top: 0;
        left: 0;
        width: 100%;
        height: 100%;
        background: linear-gradient(to top, rgba(0, 0, 0, 1) 0%, rgba(0, 0, 0, 0) 45%);

        pointer-events: none; 
    }

    /* --- CLIENTS SECTION --- */
    #clients h3 {
        font-size: .875rem;
        margin: 0 0 2rem;
    }

    .logo-grid {
        row-gap: 1.5rem;
        column-gap: 2rem;
    }

    /* --- SERVICE SECTION --- */
    .service-section {
        padding: 2rem 0;
    }

    #development {
        padding: 5rem 0 2rem;
    }

    .service-container {
        padding: 0 1rem;
    }

    .service-section p {
        font-size: 1rem;
        line-height: 1.25rem;
        margin-bottom: 1.5rem;
    }

    .service-image-wrapper {
        padding: 1rem 1rem 0 1rem;
        aspect-ratio: unset;
        border-radius: 1rem;
    }

    /* --- FINAL CTA SECTION --- */
    #final-cta {
        padding: 3.5rem 0 6rem;
    }

    .cta-box { 
        display: flex;
        flex-direction: column;
        padding: 1.5rem;
        gap: 1.5rem;
    }

    .cta-content {
        gap: 1rem;
    }

    .cta-text {
        gap: 1rem;
    }

    #final-cta p {
        font-size: 1rem;
    }

    .btn-dark-cta, .btn-light-cta {
        font-size: .875rem;
        line-height: 1rem;
        padding: .75rem;
    }

    /* --- FOOTER --- */
    .footer-grid { 
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .footer-menu {
        grid-template-columns: 1fr 1fr;
        row-gap: 3rem;
        column-gap: 6rem;
        order: 1;
    }

    .footer-about {
        display: flex;
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
        order: 2;
    }

    .social-icons {
        margin: 0;
    }

    .footer-controls {
        order: 3;
    }
}

@media (max-width: 576px) {
    .hero-buttons { flex-direction: column; }
    .logo-grid { grid-template-columns: 1fr 1fr; }
    .footer-grid { grid-template-columns: 1fr;}
    .footer-bottom { flex-direction: column; gap: 10px; }
}