/* =========================================
   HERO EDITORIAL
   ========================================= */
.hero-editorial {
    position: relative;
    width: 100%;
    height: 100vh;
    max-height: calc(100vw / 1.6); /* Límite máximo de proporción 16:10 */
    min-height: 600px; /* Layout autocontenido mínimo para navegadores sin cabeza */
    display: flex;
    align-items: center;
    justify-content: center;
    background-color: var(--color-white);
    overflow: hidden;
    padding-top: 5rem; /* Compensa el header fijo según la métrica global */
    box-sizing: border-box;
}

.hero-editorial__container {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    width: 100%;
    max-width: 1400px;
    margin: 3% auto 0;
    height: 100%;
    padding: 0 var(--spacing-base);
    gap: clamp(2rem, 4vw, 4rem);
}

/* =========================================
   TEXTO
   ========================================= */
.hero-editorial__text {
    flex: 0 0 45%;
    position: relative;
    z-index: 10;
    color: var(--color-black);
    margin-top: 14%;
}

.hero__title {
    display: flex;
    flex-direction: column;
    margin: 0 0 2rem 0;
}

.title-main {
    font-size: clamp(4rem, 8vw, 8.5rem);
    line-height: 0.9;
    letter-spacing: -0.03em;
}

.title-sub {
    display: flex;
    align-items: baseline;
    font-size: clamp(3rem, 6vw, 6.5rem);
    line-height: 0.9;
    letter-spacing: -0.02em;
    margin-left: 15%; /* Desplazamiento hacia la derecha para crear asimetría */
}

.title-prep {
    font-size: clamp(2rem, 4vw, 4.5rem);
    color: var(--color-grey-dark);
    margin-right: 1.5rem;
    font-weight: 300;
}

.hero-editorial__text .hero__subtitle {
    font-size: clamp(0.8rem, 1.2vw, 1.1rem);
    letter-spacing: 0.25em;
    text-transform: uppercase;
    color: var(--color-grey-dark);
    margin-left: 16%; /* Alineado con el bloque secundario del título */
    position: relative;
}

/* Línea decorativa sutil para asentar el subtítulo */
.hero__subtitle::before {
    content: '';
    position: absolute;
    left: -40px;
    top: 50%;
    width: 30px;
    height: 1px;
    background-color: var(--color-black);
}

.hero__script {
    font-size: clamp(4rem, 7vw, 7.5rem);
    line-height: 1;
    color: var(--color-black);
    margin: 0.5rem 0 0 14%; /* Desplazamiento para mantener la asimetría visual */
    letter-spacing: 0.02em;
}

/* =========================================
   BLOQUE DE FRANJAS
   ========================================= */
.hero-editorial__stripes {
    flex: 0 0 50%;
    height: 76%;
    min-height: 400px;
    display: flex;
    gap: 1.5rem;
    align-items: center;
    overflow: visible;
    margin-top: 0;
    --scroll-progress: 0;
    --scroll-y: 0;
}

/* 1. Contenedor Padre */
.stripe {
    flex: 1;
    position: relative;
    overflow: hidden;
    opacity: 0;
    transition: opacity 1s ease, transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, opacity;

    /* Añadir propiedades para aislar la capa del clip-path en la GPU */
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
    transform: translateZ(0);
    perspective: 1000px;
}

/* 2. Contenedor Hijo */
.stripe__inner {
    position: absolute;
/*     top: -15%; */
    left: 0;
    width: 100%;
    height: 130%;
/*     background-size: cover; */
/*     background-position: center; */
    outline: 1px solid transparent;
    transform-style: preserve-3d;
    backface-visibility: hidden;

    /* Mantener las transiciones */
    transition: transform 1s cubic-bezier(0.25, 1, 0.5, 1), scale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);

    /* Modificación: Eliminar 'scale' para evitar conflicto de asignación en GPU */
    will-change: transform;
}

.stripe.is-ready .stripe__inner {
    transition: scale 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    background-repeat: no-repeat;
}

.stripe.is-ready:hover .stripe__inner {
    scale: 1.05 1.05 1; /* Definición vectorial 3D para la escala */
    rotate: 0.0001deg; /* Impide que el navegador destruya la capa GPU al concluir la transición */
}

.stripe-1 {
    height: 80%;
    margin-top: 12%;
    clip-path: polygon(0 15%, 100% 4%, 100% 94%, 0 100%);
    transform: translateY(150px);
}
.stripe-1 .stripe__inner {
    background-image: url('/assets/img/hero/20260301-28.webp');
    background-position: 38% 70%;
    background-size: auto 137%;
    transform: translateY(-80px);
}

.stripe-2 {
    height: 88%;
    margin-top: 6%;
    clip-path: polygon(0 4%, 100% 11%, 100% 100%, 0 92%);
    transform: translateY(-150px);
}
.stripe-2 .stripe__inner {
    background-image: url('/assets/img/hero/20260301-98.webp');
    background-position: 38% 0%;
    background-size: auto 149%;
    transform: translateY(80px);
}

.stripe-3 {
    height: 84%;
    margin-top: 7%;
    clip-path: polygon(0 0%, 100% 11%, 100% 84%, 0 100%);
    transform: translateY(150px);
}
.stripe-3 .stripe__inner {
    background-image: url('/assets/img/hero/20260301-44.webp');
    background-position: 30% 0%;
    background-size: auto 160%;
    transform: translateY(-80px);
}

.stripe-1 .stripe__inner {
    background-position: 40% 54%;
    background-size: auto 167%;
    top: -10%;
}

.stripe-2 .stripe__inner {
    background-position: 39% 44%;
    background-size: auto 100%;
    top: 2%;
}

.stripe-3 .stripe__inner {
    background-position: 45% 36%;
    background-size: auto 88%;
    top: -5%;
}


/* =========================================
   INTEGRACIÓN CERO ESTILOS EN LÍNEA
   ========================================= */
.stripe.is-loaded {
    opacity: max(calc(1 - (var(--scroll-progress) * 1.5)), 0);
}

.stripe.is-loaded:nth-child(1),
.stripe.is-loaded:nth-child(3) {
    transform: translate3d(0, calc(250px * var(--scroll-progress)), 0);
}

.stripe.is-loaded:nth-child(2) {
    transform: translate3d(0, calc(-250px * var(--scroll-progress)), 0);
}

.stripe.is-loaded .stripe__inner {
    transform: translate3d(0, calc(var(--scroll-y) * 0.3px), 0);
}

/* =========================================
   PURPOSE SECTION (Declaración de Propósito)
   ========================================= */
.purpose {
    background-color: var(--color-white);
}

.purpose__container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--spacing-base);
}

.purpose__text {
    font-size: clamp(1.5rem, 4vw, 2.5rem);
    line-height: 1.4;
    color: var(--color-black);
    margin: 0;
}

/* =========================================
   METHOD HOOK SECTION
   ========================================= */
.method-hook__content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: flex-start;
}

.text-spaced {
    font-size: 1.125rem;
    line-height: 1.8;
    color: var(--color-grey-dark);
    margin: 0;
}

/* =========================================
   AJUSTES RESPONSIVOS
   ========================================= */

@media (max-width: 1920px) {
    .hero-editorial__container {
        max-width: 1200px;
    }
}

@media (max-width: 1024px) {
    .hero-editorial {
        height: auto;
        max-height: none; /* Desactiva el límite 16:10 en pantallas verticales */
        min-height: 100vh;
        align-items: flex-start;
    }

    .hero-editorial__container {
        display: block;
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 2rem;
        padding-top: 1rem;
        padding-bottom: 4rem;
    }

    .hero-editorial__text {
        flex: none;
        width: 100%;
        margin-top: 0;
    }

    .hero__title {
        position: relative;
/*         left: -1rem; */
        margin: 0 0 1.5rem 0;
    }
    .hero-editorial__text .hero__subtitle {
/*         margin-left: 0; */
        position: relative;
    }
    .hero__subtitle::before {
/*         display: none; */
        left: 0;
    }
    .title-prep {
        margin-right: .85rem;
    }

    .hero__script {
        margin-left: 0;
        text-align: center;
    }

    .hero-editorial__stripes {
        flex: none;
        width: 100%;
        height: 50vh;
        min-height: auto;
        gap: 1rem;
    }

    .stripe {
        background-attachment: scroll;
    }
}

@media (max-width: 768px) {
    .hero-editorial {
        padding-top: 5rem; /* Mantiene la compensación del header fijo en móvil */
    }

    .hero-editorial__text .hero__title {
        font-size: clamp(3rem, 12vw, 4rem);
    }

    .hero__script {
        font-size: clamp(3.5rem, 12vw, 4.5rem);
    }

    .grid-2-col {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .section-padding {
        padding-top: calc(var(--spacing-macro) / 2);
        padding-bottom: calc(var(--spacing-macro) / 2);
    }
}
