/* Botanical canopy adapted from Linktree v1.4.2.6 and Webdesign v1.0.5. */
body {
    isolation: isolate;
}

.order-canopy {
    --canopy-opacity: 0.7;
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    opacity: var(--canopy-opacity);
    pointer-events: none;
    user-select: none;
}

/* Applied by the synchronous head script before the first image paint. */
.canopy-fade-pending .order-canopy:not(.canopy-visible) {
    opacity: 0;
}

@media (min-width: 769px) {
    .order-canopy {
        transform: translateY(-20%);
    }
}

/* Also covers a preference change while the image is still loading. */
@media (prefers-reduced-motion: reduce) {
    .canopy-fade-pending .order-canopy:not(.canopy-visible) {
        opacity: var(--canopy-opacity);
    }
}

/* One shared surface bridges the forest floor and the central footer. */
:root {
    --order-forest-transition-color: #242424;
}

/* Keep the last action above decorative foliage without moving it. */
.container {
    z-index: 1;
}

.order-forest-floor {
    position: relative;
    flex: 0 0 auto;
    width: 100%;
    height: clamp(110px, 25vw, 440px);
    margin-top: -56px;
    overflow: hidden;
    pointer-events: none;
    user-select: none;
}

.order-forest-floor img {
    position: absolute;
    bottom: 0;
    left: 0;
    display: block;
    width: 100%;
    max-width: none;
    height: auto;
    opacity: 0.75;
}

.order-forest-floor::after {
    content: "";
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: clamp(56px, 7vw, 112px);
    background: linear-gradient(to bottom, transparent, var(--order-forest-transition-color));
    pointer-events: none;
}

.order-forest-floor + .vegenergy-footer-shell {
    --forest-blend-rise: clamp(48px, 5vw, 80px);
    position: relative;
    z-index: 1;
    flex: 0 0 auto;
    width: 100%;
    min-width: 0;
    margin-top: 0;
}

/* Continuous noise covers the join; the last 16px fade into the loaded footer surface. */
.order-forest-floor + .vegenergy-footer-shell::before {
    content: "";
    position: absolute;
    z-index: 2;
    top: calc(-1 * var(--forest-blend-rise));
    right: 0;
    left: 0;
    height: calc(var(--forest-blend-rise) + 32px);
    background-color: var(--order-forest-transition-color);
    background-image: var(--vg-noise);
    background-size: 200px 200px;
    background-repeat: repeat;
    background-position: 0 var(--forest-blend-rise);
    background-blend-mode: overlay;
    -webkit-mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--forest-blend-rise) - 12px), #000 calc(100% - 16px), transparent);
    mask-image: linear-gradient(to bottom, transparent, #000 calc(var(--forest-blend-rise) - 12px), #000 calc(100% - 16px), transparent);
    pointer-events: none;
}

@media (min-width: 769px) {
    .order-forest-floor {
        margin-bottom: -2px;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(48px, 6vw, 112px));
        mask-image: linear-gradient(to bottom, transparent 0, #000 clamp(48px, 6vw, 112px));
    }

    .order-forest-floor::after {
        height: clamp(120px, 15vw, 240px);
        background-color: var(--order-forest-transition-color);
        background-image: var(--vg-noise);
        background-size: 200px 200px;
        background-repeat: repeat;
        background-position: left bottom;
        background-blend-mode: overlay;
        -webkit-mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 35%, #000 100%);
        mask-image: linear-gradient(to bottom, transparent 0%, rgba(0, 0, 0, 0.35) 35%, #000 100%);
    }
}

@media (max-width: 768px) {
    :root {
        --order-forest-transition-color: #1c1c1c;
    }
}
