/* ==========================================================
   BEHIND THE HYPE — sección de historia con parallax
   Archivo: /public/css/behind-the-hype.css
========================================================== */

.story-section {
    position: relative;
    overflow: hidden;
    background-color: #0a0a0a;
    color: #ffffff;
}

/* ---------- Fondo parallax ---------- */
.story-bg {
    position: absolute;
    inset: 0;
    z-index: 0;
    overflow: hidden;
    pointer-events: none;
}

.story-bg__img {
    position: absolute;
    left: 0;
    top: -12%;
    width: 100%;
    height: 124%;          /* margen extra para que el movimiento no deje huecos */
    object-fit: cover;
    object-position: center;
    will-change: transform;
    transform: translate3d(0, 0, 0) scale(1.05);
}

.story-overlay {
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background:
        linear-gradient(to bottom, #0a0a0a 0%, rgba(10, 10, 10, 0.35) 12%, rgba(10, 10, 10, 0.35) 88%, #0a0a0a 100%),
        rgba(0, 0, 0, 0.45);
}

.story-container {
    position: relative;
    z-index: 2;
}

/* ---------- Bloques ---------- */
.story-block {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    min-height: 0;
    padding: 2.5rem 0;
}

.story-block:first-child {
    padding-top: 7.5rem;
}

.story-block:last-child {
    padding-bottom: 5rem;
}

.story-block--center {
    align-items: center;
    text-align: center;
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
}

.story-block--left,
.story-block--right {
    justify-content: center;
}

.story-block--left,
.story-block--right {
    align-items: center;
    text-align: center;
}

.story-block--left .story-content,
.story-block--right .story-content {
    max-width: 1100px;
    width: 100%;
    margin: 0 auto;
    text-align: center;
}

.story-content {
    position: relative;
    z-index: 2;
}

/* ---------- Palabra gigante de fondo (se mueve con el scroll) ---------- */
.story-ghost {
    position: absolute;
    top: 50%;
    left: 50%;
    z-index: 0;
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: clamp(5rem, 16vw, 13rem);
    font-style: italic;
    line-height: 1;
    text-transform: uppercase;
    white-space: nowrap;
    color: transparent;
    -webkit-text-stroke: 2px rgba(255, 255, 255, 0.10);
    pointer-events: none;
    user-select: none;
    will-change: transform;
    transform: translate3d(-50%, -50%, 0);
}

/* ---------- Tipografía ---------- */
.story-section .section-title-wrap {
    position: relative;
    z-index: 2;
    gap: 2.75rem !important;
    margin-bottom: 1.25rem !important;
}

/* Mismo tamaño y estilo que los otros dos títulos */
.story-section .section-title {
    font-size: clamp(1.7rem, 3.2vw, 2.6rem) !important;
    line-height: 0.95 !important;
    letter-spacing: -0.01em !important;
}

.story-heading {
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: clamp(1.7rem, 3.2vw, 2.6rem);
    line-height: 0.95;
    text-transform: uppercase;
    color: #ffffff;
    margin: 0 0 1rem;
    white-space: nowrap;
    letter-spacing: -0.01em;
}

.story-lead {
    position: relative;
    z-index: 2;
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: clamp(1.1rem, 1.6vw, 1.4rem);
    text-transform: uppercase;
    color: #4cff00;
    line-height: 1.25;
    margin: 0 0 0.9rem;
}

.story-text {
    position: relative;
    z-index: 2;
    font-size: 0.95rem;
    line-height: 1.7;
    color: rgba(255, 255, 255, 0.88);
    margin: 0 0 0.75rem;
}

.story-highlight {
    position: relative;
    z-index: 2;
    display: inline-block;
    margin: 0.75rem 0 0;
    padding: 0.3rem 0;
    font-family: 'QarantaBold', Arial, sans-serif;
    font-size: clamp(1rem, 1.5vw, 1.3rem);
    font-style: italic;
    text-transform: uppercase;
    color: #ffffff;
}

.story-block--right .story-highlight {
    border-bottom: 3px solid #4cff00;
    padding-bottom: 0.5rem;
}

/* ---------- Animaciones de entrada (scroll reveal) ---------- */
.reveal {
    opacity: 0;
    transform: translate3d(0, 50px, 0);
    filter: blur(6px);
    transition:
        opacity 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
        transform 0.9s cubic-bezier(0.16, 1, 0.3, 1) var(--d, 0s),
        filter 0.9s ease var(--d, 0s);
    will-change: opacity, transform;
}

.reveal--left,
.reveal--right { transform: translate3d(0, 50px, 0); }
.reveal--fade  { transform: none; }

.reveal.is-visible {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    filter: blur(0);
}

/* Líneas verdes del título: se dibujan desde el centro */
.story-line {
    transform: scaleX(0);
    transition: transform 1.1s cubic-bezier(0.16, 1, 0.3, 1) 0.3s;
}

.story-line--left  { transform-origin: right center; }
.story-line--right { transform-origin: left center; }

.reveal.is-visible .story-line,
.is-visible > .story-line {
    transform: scaleX(1);
}

/* ---------- Móvil / tablet ---------- */
@media (max-width: 950px) {
    .story-block {
        min-height: 0;
        padding: 2rem 0;
    }

    .story-block:first-child {
        padding-top: 5rem;
    }

    .story-block:last-child {
        padding-bottom: 3.5rem;
    }

    .story-block--left .story-content,
    .story-block--right .story-content {
        max-width: 100%;
        margin: 0 auto;
        text-align: center;
    }

    .story-ghost {
        -webkit-text-stroke: 1.5px rgba(255, 255, 255, 0.08);
    }

    .story-section .section-title {
        white-space: normal !important;
    }

    .story-section .section-title-wrap {
        gap: 1.25rem !important;
    }

    .story-heading {
        white-space: normal;
    }

    .reveal--left,
    .reveal--right {
        transform: translate3d(0, 50px, 0);
    }
}

/* ---------- Accesibilidad: sin movimiento ---------- */
@media (prefers-reduced-motion: reduce) {
    .reveal,
    .story-line {
        transition: none;
        opacity: 1;
        transform: none;
        filter: none;
    }

    .story-bg__img,
    .story-ghost {
        will-change: auto;
    }
}