/* =========================================
   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: center;
    width: 100%;
    max-width: 1400px;
    margin: 0 auto;
    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: 0;
}

.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);
}

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

.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;
}

.stripe__inner {
    position: absolute;
    top: -15%;
    left: 0;
    width: 100%;
    height: 130%;
    background-size: cover;
    background-position: center;
    filter: grayscale(0%);
    transition: filter 0.6s ease, transform 1s cubic-bezier(0.25, 1, 0.5, 1);
    will-change: transform, filter;
}

.stripe:hover .stripe__inner {
    filter: grayscale(100%);
}

.stripe-1 {
    height: 85%;
    margin-top: 0%;
    clip-path: polygon(0 16%, 100% 0, 100% 84%, 0 100%);
    transform: translateY(150px);
}
.stripe-1 .stripe__inner {
    background-image: url('/assets/img/20260301-57.webp');
    transform: translateY(-80px);
}

.stripe-2 {
    height: 82%;
    margin-top: 8%;
    clip-path: polygon(0 0, 100% 16%, 100% 100%, 0 84%);
    transform: translateY(-150px);
}
.stripe-2 .stripe__inner {
    background-image: url('/assets/img/20260301-86.webp');
    transform: translateY(80px);
}

.stripe-3 {
    height: 82%;
    margin-top: 4%;
    clip-path: polygon(0 0, 100% 16%, 100% 84%, 0 100%);
    transform: translateY(150px);
}
.stripe-3 .stripe__inner {
    background-image: url('/assets/img/20260301-94.webp');
    transform: translateY(-80px);
}

.stripe-1, .stripe-1 .stripe__inner { transition-delay: 0s; }
.stripe-2, .stripe-2 .stripe__inner { transition-delay: 0.15s; }
.stripe-3, .stripe-3 .stripe__inner { transition-delay: 0.3s; }

/* =========================================
   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: translateY(calc(250px * var(--scroll-progress)));
}

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

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

.stripe.is-ready {
    transition: opacity 0.1s linear;
}

.stripe.is-ready .stripe__inner {
    transition: filter 0.6s ease;
}

/* =========================================
   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: 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 {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 2rem;
        padding-top: 2rem;
        padding-bottom: 4rem;
    }

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

    .hero__title {
        position: relative;
        left: -1rem;
        margin: 0 0 1.5rem 0;
    }

    .title-prep {
        margin-right: .85rem;
    }

    .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);
    }

    .img-main {
        width: 85%;
        right: 0;
    }

    .img-secondary {
        width: 65%;
        left: 0;
        border-width: 0.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);
    }
}
