/* ── Fullscreen hero media (image / video) ── */
.homepage-section:has(.hero-media) {
    position: relative;
    overflow: hidden;
    height: 100vh;
    min-height: 100vh;
}

.hero-media {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    overflow: hidden;
}

.hero-media img,
.hero-media iframe {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
    border: none;
}

.hero-media-video iframe {
    /* Scale up to eliminate Vimeo letterbox bars */
    width: 120%;
    height: 120%;
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

/* Darken overlay so text stays readable */
.homepage-section:has(.hero-media) .hero-text-content,
.homepage-section:has(.hero-media) .homepage-section-socials,
.homepage-section:has(.hero-media) .newsletter-outer {
    position: relative;
    z-index: 1;
}


/* Fade transition between image and video */
.hero-media {
    transition: opacity 0.8s ease;
}

.hero-media[aria-hidden="true"] {
    opacity: 0;
    pointer-events: none;
}

/* ── Hero media text overlay ── */
.hero-media-text {
    position: absolute;
    bottom: 100px;
    right: max(28px, 3vw);
    width: max(300px, calc(20vw * var(--scale)));
    z-index: 2;
    color: #fff;
    font-family: var(--font1);
    font-weight: 300;
    letter-spacing: 0.04em;
    line-height: 1.3;
    text-align: left;
    pointer-events: none;
}

@media (max-width: 991px) {
    .hero-media-text {
        right: max(20px, 3vw);
        width: max(240px, 50vw);
    }
}

.hero-media-description {
    font-family: var(--font2);
    font-size: max(15px, calc(1.04vw * var(--scale)));
    font-weight: 300;
    letter-spacing: 0.1em;
    line-height: 1.6;
    margin-top: max(12px, calc(0.83vw * var(--scale)));
    opacity: 0.7;
}

.hero-media-link {
    display: contents;
    text-decoration: none;
    color: inherit;
    cursor: pointer;
}

.hero-media-link .hero-media {
    cursor: pointer;
}

.hero-text-content {
    width: max(386px, calc(26.8vw * var(--scale)));
}

h1.hero-title {
    font-size: max(32px, calc(2.22vw * var(--scale)));
    letter-spacing: -.02em;
    margin-bottom: max(9px, calc(0.63vw * var(--scale)));
    line-height: 130%;
}

.hero-paragraph {
    margin-bottom: max(15px, calc(1.04vw * var(--scale)));
}

.hero-section,
.homepage-section {
    display: flex;
    flex-direction: column;
    padding-right: var(--big-padding);
    padding-left: var(--small-padding);
}

.full-width-homepage {
    padding-left: 0px !important;
    padding-right: 0px !important;
    width: 100vw;
    min-width: 100vw;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.full-width-homepage .hero-text-content {
    max-width: none;
    width: 100%;
    align-items: center;
}

.full-width-homepage .homepage-section-socials .socials {
    justify-content: center;
}

.full-width-homepage .newsletter-outer {
    align-items: center;
}

.hero-subtitle {
    margin-bottom: max(9px, calc(0.625vw * var(--scale)));
}

.custom-hero-bottom {
    margin-top: auto;
}

.custom-hero-bottom-text {
    display: none;
}

.show-on-desktop {
    display: block;
}

.sticky-hero-section-mobile {
    display: none;
}

.sticky-hero-section {
    width: 100vw;
    right: 0;
    left: 0;
    position: fixed;
    top: 14vh;
    padding-left: var(--small-padding);
}

.sticky-hero-section .title-and-subtitle {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    flex-direction: row-reverse;
    width: calc(100vw - 2 * var(--small-padding));
}

.sticky-hero-section .title-and-subtitle .hero-subtitle {
    font-size: max(16px, calc(1.11vw * var(--scale)));
    margin-bottom: max(15px, calc(1.04vw * var(--scale)));
}

.sticky-posts-section {
    padding-left: var(--small-padding);
    margin-top: auto;
    margin-bottom:  max(81px, calc(5.7vw * var(--scale)));
}

.sticky-posts-section .grid {
    min-width: calc(100vw - 2 * var(--small-padding));
}

.sticky-posts-section .dashed-border-outer,
.sticky-posts-section .absolute-subtitle {
    display: none;
}

.sticky-hero-section .medium-text {
    font-size: max(16px, calc(1.11vw * var(--scale)));
}

.padding-top-on-mobile .dashed-border-outer {
    display: none;
}

html[data-card-image-aspect-ratio-desktop="Alternate Align Top"][data-show-excerpt-on-cards="true"] .sticky-posts-section {
    margin-bottom: max(120px, calc(8.3vw * var(--scale)));
}

@media (max-width: 991px) {    
    .hero-text-content {
        max-width: max(386px, calc(26.8vw * var(--scale)));
        width: 100%;
    }
    
    .hero-section,
    .homepage-section {
        width: 100%;
        padding-right: 0px;
        min-height: 100vh;
        align-items: center;
        justify-content: center;
        text-align: center;
        padding-left: 0px;
    }

    .full-width-homepage {
        min-width: unset;
        width: 100%;
    }

    .custom-hero-bottom {
        margin-top: 130px;
    }

    .hide-on-mobile {
        display: none;
    }

    .custom-hero-bottom-text {
        display: block;
        font-size: 16px;
    }

    .sticky-hero-section-mobile {
        display: flex;
    }

    .sticky-hero-section .medium-text {
        font-size: 18px;
    }

    .sticky-hero-section-mobile {
        display: none;
    }
    
    .sticky-hero-section {
        width: 100% !important;
        position: static !important;
        padding-left: 0px !important;
    }
    
    .sticky-hero-section .title-and-subtitle {
        align-items: center;
        justify-content: center;
        width: 100% !important;
    }
    
    .sticky-hero-section .title-and-subtitle .hero-subtitle {
        font-size: max(16px, calc(1.11vw * var(--scale)));
        margin-bottom: max(15px, calc(1.04vw * var(--scale)));
    }
    
    .sticky-posts-section {
        padding-left: 0px;
        margin-top: 0px;
        margin-bottom: 0px;
    }
    
    .sticky-posts-section .grid {
        min-width: unset !important;
    }
    
    .sticky-posts-section .dashed-border-outer,
    .sticky-posts-section .absolute-subtitle {
        display: flex;
    }
    
    .sticky-hero-section .medium-text {
        font-size: max(16px, calc(1.11vw * var(--scale)));
    }

    .custom-layout-hero-section {
        padding-top: 7vh;
    }

    .padding-top-on-mobile .dashed-border-outer {
        display: block;
    }

    .webstore-content {
        padding: 0 var(--small-padding);
    }
}

/* ── Web Store section ── */
.webstore-section {
    flex-direction: column;
    justify-content: center;
}

.webstore-content {
    display: flex;
    flex-direction: column;
    justify-content: center;
    flex: 1;
    gap: max(12px, calc(0.83vw * var(--scale)));
}

.webstore-title {
    font-family: var(--font1);
    font-size: max(28px, calc(1.94vw * var(--scale)));
    letter-spacing: -0.02em;
    line-height: 130%;
}

.webstore-description {
    max-width: 400px;
    opacity: 0.7;
}

.webstore-button {
    margin-top: max(8px, calc(0.56vw * var(--scale)));
    width: fit-content;
}