/* Forest prologue — scoped to #forest-prologue only (no global body reset) */

#forest-prologue {
    --forest-scroll: 0px;
    --forest-index: calc(1vw + 1vh);
    --forest-text: #f5f0e8;
    position: relative;
    z-index: 2;
    background-color: #0a1016;
}

#forest-prologue .main-header {
    position: relative;
}

#forest-prologue .main-header::after {
    content: '';
    position: absolute;
    z-index: 100;
    width: 100%;
    height: calc(var(--forest-index) * 10);
    background-image: url('https://www.fokuslan.com/ground.png');
    background-size: cover;
    background-repeat: no-repeat;
    background-position: center;
    bottom: calc(var(--forest-index) * -4.5);
}

#forest-prologue .layers {
    height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    overflow: hidden;
    position: relative;
    box-shadow:
        inset 0 0 100px rgba(14, 39, 40, 0.35),
        inset 0 -120px 140px rgba(10, 18, 22, 0.55);
}

#forest-prologue .layer {
    height: 100%;
    width: 100%;
    position: absolute;
    background-size: cover;
    background-position: center;
    will-change: transform;
    z-index: 2;
}

#forest-prologue .layer.layers__base,
#forest-prologue .layer.layers__middle,
#forest-prologue .layer.layers__front {
    filter: saturate(0.88) hue-rotate(-8deg) brightness(0.86);
}

#forest-prologue .layers__base {
    transform: translate3d(0, calc(var(--forest-scroll) / 1.6), 0);
    z-index: 0;
}

#forest-prologue .layers__middle {
    transform: translate3d(0, calc(var(--forest-scroll) / 2.5), 0);
}

#forest-prologue .layers__front {
    transform: translate3d(0, calc(var(--forest-scroll) / 5.7), 0);
}

#forest-prologue .layer__header {
    z-index: 1;
    transform: translate3d(0, calc(var(--forest-scroll) / 2), 0);
    will-change: transform;
    text-transform: uppercase;
    font-family: 'Playfair Display', Georgia, serif;
    font-weight: 700;
    color: var(--forest-text);
    text-shadow:
        0 2px 28px rgba(14, 39, 40, 0.95),
        0 0 2px rgba(212, 168, 83, 0.45);
}

#forest-prologue .layers__title {
    margin: 0;
    font-size: calc(var(--forest-index) * 2.65);
    letter-spacing: calc(var(--forest-index) / 2.25);
    line-height: 1.05;
    font-weight: 700;
}

#forest-prologue .layers__caption {
    margin: 0;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    font-size: calc(var(--forest-index) / 1.175);
    letter-spacing: calc(var(--forest-index) / 3.5);
    margin-top: calc(var(--forest-index) * -0.75);
    font-weight: 500;
    color: rgba(232, 201, 122, 0.98);
}

#forest-prologue .main-article {
    --main-article-transform: translate3d(0, calc(var(--forest-scroll) / -7.5), 0);
    min-height: 100vh;
    background-size: cover;
    background-position: center;
    color: var(--forest-text);
    display: flex;
    justify-content: center;
    align-items: center;
    position: relative;
    text-align: center;
    top: -1px;
    z-index: 10;
}

#forest-prologue .main-article::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
        180deg,
        rgba(14, 39, 40, 0.55) 0%,
        rgba(14, 39, 40, 0.2) 45%,
        rgba(14, 39, 40, 0.65) 100%
    );
    pointer-events: none;
    z-index: 0;
}

#forest-prologue .main-article__content {
    position: relative;
    z-index: 1;
    padding: 0 var(--space-md, 2rem);
}

#forest-prologue .main-article__header {
    text-transform: uppercase;
    font-family: 'Inter', -apple-system, sans-serif;
    font-size: calc(var(--forest-index) * 0.55);
    letter-spacing: 0.28em;
    font-weight: 500;
    color: rgba(232, 201, 122, 0.95);
    transform: var(--main-article-transform);
    will-change: transform;
    margin-bottom: calc(var(--forest-index) / 2);
}

#forest-prologue .main-article__paragraph {
    max-width: calc(var(--forest-index) * 30);
    margin-left: auto;
    margin-right: auto;
    font-family: 'Playfair Display', Georgia, serif;
    font-size: calc(var(--forest-index) * 0.82);
    line-height: 1.55;
    margin-top: calc(var(--forest-index) / 1.25);
    transform: var(--main-article-transform);
    will-change: transform;
    font-weight: 400;
    text-shadow: 0 2px 24px rgba(14, 39, 40, 0.85);
}

@media (max-width: 768px) {
    #forest-prologue {
        margin-top: 0;
    }

    #forest-prologue .layers {
        align-items: center;
        padding-top: calc(3.5rem + env(safe-area-inset-top, 0px));
        box-sizing: border-box;
    }

    #forest-prologue .layer__header {
        transform: translate3d(0, 0, 0);
    }

    #forest-prologue .layers__title {
        font-size: clamp(2.25rem, 12vw, 3.5rem);
    }

    #forest-prologue .layers__caption {
        font-size: clamp(0.7rem, 3.5vw, 0.95rem);
    }

    #forest-prologue .main-article__paragraph {
        font-size: clamp(1rem, 4vw, 1.25rem);
    }
}
