/* =============================================================================
   Narrative Block — Frontend Stylesheet
   1-1 conversion of Narrative.tsx (Tailwind → plain CSS)
   ============================================================================= */

/* --------------------------------------------------------------------------
   Section wrapper
   py-20 md:py-32 bg-[#0a0a0a] text-white overflow-hidden
   -------------------------------------------------------------------------- */
.narrative-block {
    padding-top: 5rem;
    padding-bottom: 5rem;
    background-color: #0a0a0a;
    color: #ffffff;
    overflow: hidden;
    box-sizing: border-box;
}

/* --------------------------------------------------------------------------
   Inner container — max-w-7xl mx-auto px-6
   -------------------------------------------------------------------------- */
.narrative-container {
    max-width: 80rem;
    margin-left: auto;
    margin-right: auto;
    padding-left: 1.5rem;
    padding-right: 1.5rem;
}

/* --------------------------------------------------------------------------
   Two-column grid
   grid grid-cols-1 lg:grid-cols-2 gap-10 md:gap-16 items-center
   -------------------------------------------------------------------------- */
.narrative-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2.5rem;
    align-items: center;
}

/* --------------------------------------------------------------------------
   Text column
   order-2 (mobile) → lg:order-1
   Initial animation state (x: -50, opacity: 0)
   -------------------------------------------------------------------------- */
.narrative-text {
    order: 2;
    /* whileInView animation — initial hidden state */
    opacity: 0;
    transform: translateX(-50px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

/* Class applied by JS when in view */
.narrative-text.is-visible {
    opacity: 1;
    transform: translateX(0);
}

/* --------------------------------------------------------------------------
   Heading — font-display text-3xl md:text-5xl font-bold mb-6 tracking-tight
   -------------------------------------------------------------------------- */
.narrative-heading {
    font-family: "Syne", ui-sans-serif, system-ui, sans-serif;
    font-size: clamp(1.875rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: #ffffff;
}

/* text-white/50 italic */
.narrative-heading__muted {
    color: rgba(255, 255, 255, 0.50);
    font-style: italic;
}

/* --------------------------------------------------------------------------
   Body paragraph — text-white/70 text-base md:text-lg leading-relaxed mb-8
   -------------------------------------------------------------------------- */
.narrative-body {
    color: rgba(255, 255, 255, 0.70);
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
    font-size: 1rem;
    line-height: 1.75;
    margin-bottom: 2rem;
    margin-top: 0;
}

/* --------------------------------------------------------------------------
   Stats grid — grid grid-cols-2 gap-8
   -------------------------------------------------------------------------- */
.narrative-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}


/* font-mono text-4xl md:text-3xl font-bold text-[#FF4E00] mb-2 */
.narrative-stat__value {
    font-family: "JetBrains Mono", ui-monospace, monospace;
    font-size: clamp(1.875rem, 4vw, 2.25rem);
    font-weight: 700;
    color: #FF4E00;
    margin-bottom: 0.5rem;
    line-height: 1;
}

/* text-xs md:text-sm text-white/50 uppercase tracking-widest font-semibold */
.narrative-stat__label {
    font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
    font-size: 0.75rem;
    color: rgba(255, 255, 255, 0.50);
    text-transform: uppercase;
    letter-spacing: 0.1em;
    font-weight: 600;
}

/* --------------------------------------------------------------------------
   Image column — order-1 (mobile) → lg:order-2
   h-[400px] md:h-[600px] rounded-2xl overflow-hidden relative bg-zinc-900
   -------------------------------------------------------------------------- */
.narrative-image-wrap {
    order: 1;
    height: 400px;
    border-radius: 1rem;
    overflow: hidden;
    position: relative;
    background-color: #18181b;
    /* zinc-900 */
}

/* --------------------------------------------------------------------------
   Parallax inner — absolute inset-0 w-full h-[120%]
   JS applies transform: translateY + scale
   -------------------------------------------------------------------------- */
.narrative-image-inner {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 120%;
    /* extra height enables the parallax travel room */
    top: -10%;
    /* centred so it has room to move ±10% */
    will-change: transform;
}

/* --------------------------------------------------------------------------
   Image — w-full h-full object-cover opacity-80
   -------------------------------------------------------------------------- */
.narrative-img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.80;
    display: block;
}

/* --------------------------------------------------------------------------
   Gradient overlay — absolute inset-0
   bg-gradient-to-t from-[#0a0a0a] via-transparent to-transparent opacity-60
   -------------------------------------------------------------------------- */
.narrative-overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, #0a0a0a 0%, transparent 60%, transparent 100%);
    opacity: 0.60;
    pointer-events: none;
}

/* =============================================================================
   Responsive
   ============================================================================= */

/* ≥ 48rem (md) */
@media (min-width: 48rem) {
    .narrative-block {
        padding-top: 8rem;
        padding-bottom: 8rem;
    }

    .narrative-grid {
        gap: 4rem;
    }

    .narrative-image-wrap {
        height: 600px;
    }

    .narrative-body {
        font-size: 1.125rem;
    }

    .narrative-stat__label {
        font-size: 0.875rem;
    }
}

/* ≥ 64rem (lg) — two-column layout + un-swap order */
@media (min-width: 64rem) {
    .narrative-grid {
        grid-template-columns: 1fr 1fr;
    }

    .narrative-text {
        order: 1;
    }

    .narrative-image-wrap {
        order: 2;
    }
}


/* max width 767px */
@media (max-width: 767px) {
    .narrative-image-wrap {
        height: 280px;
    }
}