
html:has(body.home-page),
body.home-page {
  width: 100%;
  min-height: 100%;
  margin: 0;
}

body.home-page {
  overflow-x: hidden;
  background-color: var(--color-ivory);
}

/* Single outer canvas containing the entire homepage composition. */
.home-shapes {
  position: relative;
  width: 100%;
  width: 100dvw;
  height: 100vh;
  height: 100dvh;
  min-height: 100vh;
  min-height: 100dvh;
  overflow-x: hidden;
  overflow-y: auto;
  background-color: var(--color-ivory);
}

/* Common base class for each individual visual layer */
.home-shape {
  position: absolute;
  inset: 0;
  overflow: hidden;
}

.home-shape--ivory {
  z-index: 1;
  background-color: var(--color-ivory);
}

.home-shape--forest {
  z-index: 2;
  background-color: var(--color-forest);
}

.home-shape--leaf {
  z-index: 3;
  background-color: var(--color-leaf);
}

.home-shape__content {
  position: absolute;
  inset: 0;
  box-sizing: border-box;
}

.home-intro {
  color: var(--color-forest);
}

.home-intro__heading {
  max-width: 100%;
  margin: 0;
  font-weight: 400;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.home-intro__description {
  max-width: 100%;
/*  margin: 24px 0 0;*/
  font-weight: 400;
  line-height: 1.5;
  overflow-wrap: anywhere;
}

/* Desktop view: viewport width greater than 600px. */
@media (min-width: 601px) {
    .home-shapes {
        --desktop-ivory-width: calc(100% / 2.36);
        --desktop-ivory-content-padding: min(48px, 3.817vw);
        --desktop-ivory-content-padding: min(48px, 3.817dvw);
        --desktop-forest-left-top: 32px;
        --desktop-forest-right-top: 12px;
        --desktop-leaf-mid-height: 48px;
        --desktop-leaf-right-height: 32px;
        /*        --desktop-ivory-content-padding: 48px;*/
    }

    .site-header--home {
        position: absolute;
        inset: 0;
        align-items: flex-end;
        height: 72px;
        margin: 0 var(--desktop-ivory-content-padding);
        pointer-events: none;
    }

        .site-header--home > * {
            pointer-events: auto;
        }

        .site-header--home .site-header-navigation-container {
            display: contents;
        }

        .site-header--home .site-header-navigation-hamburger-button {
            display: none;
        }

        .site-header--home .site-header-navigation-link-area {
            display: flex;
            flex: 0 1 auto;
            align-items: flex-end;
            flex-wrap: wrap;
            justify-content: flex-end;
            gap: 4px 28px;
            margin-left: auto;
            font-size: min(16px, 8vw, 4vh);
            font-size: min(16px, 8dvw, 4dvh);
            line-height: 24px;
        }

        .site-header--home .site-header__link {
            padding: 0;
            color: var(--color-ivory);
        }

        .site-header--home .site-header__link--current {
            display: none;
        }

        .site-header--home .site-header__link--current,
        .site-header--home .site-header__link:hover,
        .site-header--home .site-header__link:focus-visible {
            background-color: transparent;
            text-decoration: underline;
            text-underline-offset: 4px;
        }

    .site-header--home .site-header-site-name-area {
        flex: 0 1 auto;
        max-width: calc(var(--desktop-ivory-width) - var(--desktop-ivory-content-padding));
        font-size: min(24px, 5vw, 5vh);
        font-size: min(24px, 5dvw, 5dvh);
    }

        .site-header--home .site-header-site-name-area-text {
            min-width: 0;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 2;
        }

    .home-shape--ivory {
        clip-path: polygon( 0 0, var(--desktop-ivory-width) 0, var(--desktop-ivory-width) calc(100% - 64px), 15% 100%, 0 100% );
    }

        .home-shape--ivory .home-shape__content {
            width: var(--desktop-ivory-width);
            height: calc(100% - 64px);
            padding: 24px var(--desktop-ivory-content-padding) 0;
        }

    .home-intro {
        position: absolute;
        top: 50vh;
        top: 50dvh;
        right: var(--desktop-ivory-content-padding);
        left: var(--desktop-ivory-content-padding);
        width: auto;
        box-sizing: border-box;
        transform: translateY(-50%);
    }

    .home-intro__heading {
        /*    font-size: 64px;*/
        font-size: min(64px, 8vw, 6vh);
        font-size: min(64px, 8dvw, 6dvh);
    }

    .home-intro__description {
        font-size: min(2.44898vw, 4vh, 24px);
        font-size: min(2.44898dvw, 4dvh, 24px);
        font-style: italic;
    }



    .home-shape--forest {
        clip-path: polygon( 
            /* top-left, top-right,  bottom-right, bottom-left*/
            var(--desktop-ivory-width) var(--desktop-forest-left-top), 
            100% var(--desktop-forest-right-top), 
            100% calc(100% - var(--desktop-leaf-right-height)), 
            var(--desktop-ivory-width) calc(100% - var(--desktop-leaf-mid-height)) 
        );
    }

    .home-shape--leaf {
        clip-path: polygon( 
            15% 100%, var(--desktop-ivory-width) 
            calc(100% - var(--desktop-leaf-mid-height)), 
            100% calc(100% - var(--desktop-leaf-right-height)), 
            100% 100% 
        );
    }
}

/* Mobile view: viewport width 600px or less. */
@media (max-width: 600px) {
    .home-shapes {
        --mobile-upper-ivory-left-height: 45vh;
        --mobile-upper-ivory-left-height: 45dvh;
        --mobile-content-horizontal-padding: min(28px, 7vw);
        --mobile-content-horizontal-padding: min(28px, 7dvw);
        --mobile-trapezoid-one-side-height-diff: 24px;
        --mobile-upper-ivory-right-height: calc(var(--mobile-upper-ivory-left-height) - var(--mobile-trapezoid-one-side-height-diff));
        --mobile-lower-ivory-right-height: calc(var(--mobile-content-horizontal-padding) * 0.4 );
        --mobile-leaf-height-right: 36px;
        --mobile-leaf-height-left: calc(var(--mobile-leaf-height-right) * 0.75);
    }

    .home-shape--ivory {
        clip-path: none;
    }

    .home-intro {
        margin: 56px 0 0px 0;
        font-size: 20px;
    }

    .home-intro__heading {
        /*        margin-top: 24px;*/
        margin: 0;
        padding: 0;
        font-size: clamp(12px, min(10vw, 10vh), 26px);
        font-size: clamp(12px, min(10vw, 10vh), 26px);
    }

    .home-intro__description {
        margin: 16px 0 0 0;
        padding: 0;
        /*        margin-bottom: 28px;*/
        font-size: clamp(12px, min(4vw, 4vh), 16px);
        font-size: clamp(12px, min(4dvw, 4dvh), 16px);
        font-style: italic;
        display: -webkit-box;
        overflow: hidden;
        text-overflow: ellipsis;
        -webkit-box-orient: vertical;
        -webkit-line-clamp: 3;
    }

    .home-shape--ivory .home-shape__content {
        width: 100%;
        height: var(--mobile-upper-ivory-right-height);
        padding: 18px min(32px, 8vw) 0 0;
        padding: 18px min(32px, 8dvw) 0 var(--mobile-content-horizontal-padding);
    }

    .home-shape--forest {
        clip-path: polygon( 
            var(--mobile-content-horizontal-padding) calc(var(--mobile-upper-ivory-right-height) + var(--mobile-trapezoid-one-side-height-diff)), 
            100% var(--mobile-upper-ivory-right-height), 
            100% calc(100% - var(--mobile-lower-ivory-right-height) - var(--mobile-leaf-height-right)), 
            var(--mobile-lower-ivory-right-height) calc(100% - var(--mobile-lower-ivory-right-height) - var(--mobile-leaf-height-right) - var(--mobile-trapezoid-one-side-height-diff)) 
        );
    }

    .home-shape--leaf {
        clip-path: polygon( 
            0 calc(100% - var(--mobile-leaf-height-left)), 
            100% calc(100% - var(--mobile-leaf-height-right)), 
            100% 108%, 
            0 100% 
        );
    }
}
