/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-purple: #3e20f4;
    --primary-blue: #126fff;
    --gradient-start: #5a3ef4;
    --gradient-end: #126fff;
    --white: #ffffff;
    --text-dark: #1a1a1a;
    --font-family: 'Poppins', sans-serif;
}

html {
    overflow-x: hidden;
}

body {
    font-family: var(--font-family);
    line-height: 1.6;
    color: var(--text-dark);
    overflow-x: hidden;
}

/* Header */
.header {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    padding: 20px 40px;
    background: transparent;
    transition: background 0.3s ease, padding 0.3s ease;
}

.header.scrolled {
    /* Sin background ni backdrop-filter aquí: ambos van al ::before
       para evitar que backdrop-filter atrape al .mobile-nav (position:fixed)
       dentro del header como bloque contenedor */
    background: transparent;
    padding: 10px 40px;
}

.header.scrolled::before {
    content: '';
    position: absolute;
    inset: 0;
    z-index: -1;
    background: rgba(10, 10, 25, 0.88);
    backdrop-filter: blur(10px);
}

.nav {
    display: flex;
    justify-content: center;
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
    position: relative;
    min-height: 128px; /* contiene el logo (108px) + padding-top (15px) + margen */
    transition: min-height 0.3s ease;
}

.header.scrolled .nav {
    min-height: 54px;
}

.nav-list {
    display: flex;
    list-style: none;
    gap: 80px;
}

.nav-list-right {
    margin-left: auto;
}

.nav-list:first-of-type {
    margin-right: auto;
}

.nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 16px;
    font-weight: 100;
    letter-spacing: 1.6px;
    transition: all 0.3s ease;
    position: relative;
}

.nav-link:hover,
.nav-link.active {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: -8px;
    left: 50%;
    transform: translateX(-50%);
    width: 40px;
    height: 3px;
    background: var(--white);
    border-radius: 2px;
}

.logo {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    padding-top: 15px;
    transition: padding-top 0.3s ease;
}

.header.scrolled .logo {
    padding-top: 0;
}

.logo-img {
    height: 108px;
    width: auto;
    transition: height 0.3s ease;
}

.header.scrolled .logo-img {
    height: 54px;
}

/* Mobile Menu Button */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    justify-content: space-between;
    width: 30px;
    height: 20px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 1001;
}

.mobile-menu-btn span {
    display: block;
    width: 100%;
    height: 2px;
    background: var(--white);
    transition: all 0.3s ease;
}

.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(6px, 6px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(6px, -6px);
}

/* Mobile Navigation */
.mobile-nav {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(62, 32, 244, 0.98);
    z-index: 999;
    justify-content: center;
    align-items: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.mobile-nav.active {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-list {
    list-style: none;
    text-align: center;
}

.mobile-nav-list li {
    margin: 20px 0;
}

.mobile-nav-link {
    color: var(--white);
    text-decoration: none;
    font-size: 24px;
    font-weight: 300;
    letter-spacing: 2px;
    transition: all 0.3s ease;
}

.mobile-nav-link:hover,
.mobile-nav-link.active {
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.8);
}

/* Hero Section */
.hero {
    position: relative;
    width: 100%;
    height: 100dvh; /* dvh = dynamic viewport height: no recalcula al colapsar la barra de URL */
    min-height: 600px;
    overflow: clip; /* clip: recorta sin crear scroll container (fix trackpad double-scroll) */
}

.video-container {
    position: relative;
    width: 100%;
    height: 100%;
}

.hero-video {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: linear-gradient(135deg, #2d1b69 0%, #11998e 100%);
}

.play-btn {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100px;
    height: 100px;
    background: transparent;
    border: none;
    cursor: pointer;
    z-index: 10;
    transition: all 0.3s ease;
}

.play-btn svg {
    width: 100%;
    height: 100%;
    fill: rgba(255, 255, 255, 0.9);
    filter: drop-shadow(0 0 20px rgba(255, 255, 255, 0.5));
    transition: all 0.3s ease;
}

.play-btn:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 30px rgba(255, 255, 255, 0.8));
}

.play-btn.hidden {
    opacity: 0;
    pointer-events: none;
}

.video-progress {
    position: absolute;
    bottom: 100px;
    left: 50%;
    transform: translateX(-50%);
    width: 60%;
    max-width: 800px;
    height: 4px;
    background: rgba(255, 255, 255, 0.3);
    border-radius: 2px;
    overflow: hidden;
}

.progress-bar {
    width: 0%;
    height: 100%;
    background: var(--white);
    transition: width 0.5s linear;
}

/* Info Section */
.info-section {
    background: linear-gradient(180deg, var(--gradient-start) 0%, var(--gradient-end) 100%);
    padding: 0 40px 80px;
    margin-top: 60px;
    position: relative;
    z-index: 1;
}

.info-container {
    max-width: 1100px;
    margin: 0 auto;
}

.info-box {
    background: var(--white);
    border-radius: 78px;
    padding: 60px 80px;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.1);
}

.info-title {
    font-size: 30px;
    font-weight: 200;
    color: var(--primary-purple);
    margin-bottom: 20px;
    line-height: normal;
}

.info-title .highlight {
    font-weight: 600;
}

.info-text {
    font-size: 20px;
    font-weight: 200;
    color: var(--primary-purple);
    line-height: 1.8;
}

/* Contact Section */
.contact-section {
    padding: 100px 40px;
}

.contact-frame {
    max-width: 1279px;
    margin: 0 auto;
    position: relative;
    border-radius: 80px;
    padding: 100px 40px;
    background: linear-gradient(180deg,  11.33%, #fff) border-box;
    border: 1px solid transparent;
    opacity: 0.9;
}

.contact-frame::before {
    content: '';
    position: absolute;
    top: -20px;
    left: 0;
    right: 0;
    bottom: -20px;
    border-radius: 80px;
    padding: 1px;
    background: linear-gradient(180deg, #fff, rgba(255, 255, 255, 0) 11.33%, rgba(255, 255, 255, 0) 91.77%, #fff);
    mask: calc();
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    pointer-events: none;
}

.contact-container {
    max-width: 1100px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: start;
    position: relative;
    z-index: 1;
}

.contact-info {
    color: var(--white);
    padding-top: 40px;
}

.contact-icon {
    width: 100px;
    height: 100px;
    margin-bottom: 30px;
}

.contact-icon svg {
    width: 100%;
    height: 100%;
    fill: var(--white);
}

.contact-title {
    font-size: 36px;
    font-weight: 200;
    margin-bottom: 20px;
}

.contact-text {
    font-size: 20px;
    font-weight: 200;
    line-height: 1.8;
    opacity: 0.9;
}

/* Contact Form */
.contact-form-container {
    background: var(--white);
    border-radius: 79px;
    padding: 40px 45px 50px 75px;
    position: relative;
}

.form-icon {
    width: 131px;
    height: 131px;
    margin: -110px 0 20px auto;
    position: relative;
}

.form-icon img {
    position: absolute;
    top: 0;
    left: 0;

}

.form-icon-bg {
    z-index: 1;
    width: 100%;
    height: 100%;
}

.form-icon-fg {
    z-index: 2;
    width: 49px;
    height: 53px;
    transform: translate(80%, 80%);
}

.form-description {
    text-align: right;
    font-size: 18px;
    font-weight: 200;
    color: var(--primary-purple);
    margin-bottom: 30px;
    line-height: 1.6;
}

.contact-form {
    display: flex;
    flex-direction: column;
    gap: 15px;
}

.form-group input {
    width: 100%;
    padding: 6px 25px;
    border: 1px solid var(--primary-purple);
    border-radius: 25px;
    font-family: var(--font-family);
    font-size: 24px;
    font-weight: 300;
    color: var(--primary-purple);
    background: transparent;
    transition: all 0.3s ease;
    text-align: right;
}

.form-group input::placeholder {
    color: var(--primary-purple);
    opacity: 0.7;
}

.form-group input:focus {
    outline: none;
    border-color: var(--primary-blue);
    box-shadow: 0 0 0 3px rgba(18, 111, 255, 0.1);
}

.submit-btn {
    background: var(--primary-purple);
    color: var(--white);
    border: 1px solid var(--primary-blue);
    border-radius: 25px;
    padding: 6px 20px 6px 60px;
    font-family: var(--font-family);
    font-size: 24px;
    font-weight: 300;
    cursor: pointer;
    transition: all 0.3s ease;
    align-self: flex-end;
    margin-top: 10px;
}

.submit-btn:hover {
    background: var(--primary-blue);
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(62, 32, 244, 0.3);
}

/* Footer */
.footer {
    background: #ffffff;
    padding: 20px 80px;
    text-align: center;
}

.footer-logo img {
    height: 50px;
    width: auto;
}

/* Responsive Design */

/* Tablet */
@media (max-width: 1024px) {
    .nav-list {
        gap: 25px;
    }

    .nav-link {
        font-size: 12px;
    }

    .nav {
        min-height: 120px; /* contiene logo de 100px en tablet */
    }

    .header.scrolled .nav {
        min-height: 50px;
    }

    .logo-img {
        height: 100px;
    }

    .header.scrolled .logo-img {
        height: 50px;
    }

    .info-box {
        padding: 50px 60px;
        border-radius: 40px;
    }

    .info-title {
        font-size: 24px;
    }

    .info-text {
        font-size: 16px;
    }

    .contact-container {
        gap: 40px;
    }

    .contact-title {
        font-size: 30px;
    }

    .contact-form-container {
        padding: 40px 40px 45px ;
        border-radius: 40px;
    }
    .form-group input {
        font-size: 18px;
    }
}

/* Mobile */
@media (max-width: 768px) {
    .header {
        padding: 15px 20px;
    }

    /* En móvil el logo es position:relative (flujo normal),
       no necesita min-height artificial en el nav */
    .nav {
        min-height: 0;
    }

    .header.scrolled {
        padding: 8px 20px;
    }

    .header.scrolled .logo-img {
        height: 55px;
    }

    .nav-list {
        display: none;
    }

    .mobile-menu-btn {
        display: flex;
    }

    .mobile-nav {
        display: flex;
    }

    .logo {
        position: relative;
        left: -12px;
        transform: none;
        margin: 0 auto;
        padding-top: 0px;
    }

    .logo-img {
        height: 90px;
    }

    .hero {
        height: 70vh;
        min-height: 500px;
    }

    .play-btn {
        width: 70px;
        height: 70px;
    }

    .video-progress {
        width: 80%;
        bottom: 60px;
    }

    .info-section {
        padding: 0 20px 60px;
        margin-top: 30px;
    }

    .info-box {
        padding: 40px 30px;
        border-radius: 40px;
    }

    .info-title {
        font-size: 20px;
    }

    .info-text {
        font-size: 14px;
    }

    .contact-section {
        padding: 0px 20px 80px;
    }

    .contact-frame {
        border-radius: 40px;
        padding: 40px 20px;
    }

    .contact-frame::before {
        border-radius: 40px;
        top: 0px;
    }

    .contact-container {
        grid-template-columns: 1fr;
        gap: 80px;
    }

    .contact-info {
        padding-top: 0;
        text-align: center;
    }

    .contact-icon {
        margin: 0 auto 20px;
        width: 131px;
        height: 131px;
    }

    .form-icon-bg{
        width: 120%;
        height: 120%;
        transform: translate(-10%, -5%);
    }

    .form-icon-fg{
        width: 49px;
        height: 53px;
        transform: translate(18%, 18%);
    }

    .contact-title {
        font-size: 26px;
    }

    .contact-text {
        font-size: 14px;
    }

    .contact-form-container {
        padding: 60px 25px 40px;
        border-radius: 30px;
    }

    .form-icon {
        width: 70px;
        height: 70px;
        margin-top: -95px;
    }

    .form-description {
        font-size: 14px;
    }

    .form-group input {
        padding: 10px 20px;
        font-size: 14px;
    }

    .submit-btn {
        padding: 10px 35px;
        font-size: 14px;
    }

    .footer {
        padding: 10px 20px;
    }

    .footer-logo img {
        height: 40px;
    }
}

/* Small Mobile */
@media (max-width: 480px) {
    .hero {
        height: 60vh;
        min-height: 400px;
    }

    .play-btn {
        width: 60px;
        height: 60px;
    }

    .info-box {
        padding: 30px 25px;
    }

    .info-title {
        font-size: 18px;
    }

    .info-text {
        font-size: 13px;
    }

    .contact-frame {
        border-radius: 30px;
        padding: 30px 15px;
    }

    .contact-frame::before {
        border-radius: 30px;
    }

    .contact-title {
        font-size: 22px;
    }

    .contact-form-container {
        padding: 50px 20px 35px;
    }

    .mobile-nav-link {
        font-size: 20px;
    }
}

/* Page-specific Colors and Backgrounds */

/* Creativos - Púrpura con imagen de fondo */
.page-creativos {
    background-image: url('assets/bg-creativos.png');
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.page-creativos .info-section,
.page-creativos .contact-section {
    background: transparent;
}

/* Responsive background for creativos */
@media (max-width: 768px) {
    .page-creativos {
        background-attachment: scroll;
        background-size: cover;
    }
}

/* Fuerzas Básicas - Amarillo */
.page-fuerzas {
    --primary-purple: #f5a623;
    --primary-blue: #ffcc00;
    --gradient-start: #f5a623;
    --gradient-end: #ffcc00;
    background-image: url('assets/bg-fuerzas.png');
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.page-fuerzas .mobile-nav {
    background: rgba(245, 166, 35, 0.98);
}

.page-fuerzas .info-section,
.page-fuerzas .contact-section {
    background: transparent;
}

/* Brantors - Azul */
.page-brantors {
    --primary-purple: #126fff;
    --primary-blue: #0052cc;
    --gradient-start: #126fff;
    --gradient-end: #0052cc;
    background-image: url('assets/bg-brantors.png');
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.page-brantors .mobile-nav {
    background: rgba(18, 111, 255, 0.98);
}

.page-brantors .info-section,
.page-brantors .contact-section {
    background: transparent;
}

/* Projectus - Rosa */
.page-projectus {
    --primary-purple: #e91e63;
    --primary-blue: #ff4081;
    --gradient-start: #e91e63;
    --gradient-end: #ff4081;
    background-image: url('assets/bg-projectus.png');
    background-size: cover;
    background-position: left bottom;
    background-repeat: no-repeat;
    background-attachment: scroll;
}

.page-projectus .mobile-nav {
    background: rgba(233, 30, 99, 0.98);
}

.page-projectus .info-section,
.page-projectus .contact-section {
    background: transparent;
}

/* Responsive backgrounds */
@media (max-width: 768px) {
    .page-fuerzas,
    .page-brantors,
    .page-projectus {
        background-attachment: scroll;
        background-size: cover;
        background-position: center bottom;
        max-width: 100vw;
    }

    .page-creativos {
        background-size: cover;
        background-position: center bottom;
        max-width: 100vw;
    }
}
