@import url("https://fonts.googleapis.com/css2?family=DM+Sans:opsz,wght@9..40,300&display=swap");

:root {
    --page-padding: clamp(26px, 3.2vw, 48px);
    --footer-copy-size: clamp(13px, 1.35vw, 19px);
    --header-height: 34px;
    --visible-height: 100svh;
    --browser-bottom-space: 0px;
    --logo-ratio: 800 / 254.39;
    --black: #050505;
    --white: #ffffff;
}

* {
    box-sizing: border-box;
}

body {
    margin: 0;
    background: var(--white);
    color: var(--black);
    font-family: "DM Sans", Arial, Helvetica, sans-serif;
    font-weight: 300;
}

.page {
    width: 100%;
    background: var(--white);
    min-height: 100vh;
}

.site-header {
    position: fixed;
    top: 0;
    left: 0;
    z-index: 10;
    width: 100%;
    height: var(--header-height);
    padding-top: 8px;
    text-align: center;
    background: var(--white);
    transition: opacity 180ms ease, visibility 180ms ease;
}

.site-header.is-hidden {
    visibility: hidden;
    opacity: 0;
}

.site-header img {
    display: block;
    width: auto;
    height: 13px;
    margin: 0 auto;
}

.hero {
    display: flex;
    align-items: flex-end;
    justify-content: center;
    min-height: 100svh;
    padding: 0 var(--page-padding) var(--page-padding);
}

.title-video {
    width: 100%;
    aspect-ratio: var(--logo-ratio);
    background: #fff;
    -webkit-mask-image: url("./assets/vivre-riopelle-logo.svg");
    mask-image: url("./assets/vivre-riopelle-logo.svg");
    -webkit-mask-repeat: no-repeat;
    mask-repeat: no-repeat;
    -webkit-mask-position: center;
    mask-position: center;
    -webkit-mask-size: contain;
    mask-size: contain;
}

.title-video video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    transform: scaleX(-1);
}

.intro {
    width: 100%;
    padding: 0 var(--page-padding);
}

.intro p {
    margin: 0 0 28px;
    font-size: 3.6vw;
    line-height: 1.0417;
    font-weight: 300;
    letter-spacing: 0;
    white-space: nowrap;
}

.sketch {
    margin-top: 30px;
    padding: 0 70px;
    text-align: right;
}

.sketch img {
    width: 80%;
    display: block;
    margin-left: auto;
}

.sketch p {
    margin: clamp(-40px, -3vw, -10px) 0 0;
    font-size: clamp(8px, 1.2vw, 16px);
}

.footer {
    display: grid;
    grid-template-columns: clamp(170px, 16vw, 220px) minmax(0, 1fr) clamp(210px, 18vw, 260px);
    gap: clamp(24px, 3vw, 48px);
    align-items: end;
    margin-top: clamp(40px, 5vw, 70px);
    padding: 35px var(--page-padding) 26px;
}

.footer-text {
    align-self: start;
    min-width: 0;
}

.footer-logo img {
    display: block;
    width: clamp(150px, 14vw, 210px);
    max-width: 100%;
    height: auto;
}

.footer-text h2 {
    margin: 0 0 clamp(10px, 1.25vw, 18px);
    font-size: clamp(22px, 2.65vw, 38px);
    line-height: 1;
    font-weight: 300;
    letter-spacing: 0;
}

.footer-text p {
    margin: 0;
    font-size: var(--footer-copy-size);
    line-height: 1.2;
    font-weight: 300;
}

.footer-text strong {
    font-weight: 300;
}

.footer-email {
    position: relative;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    justify-self: end;
    margin-right: 2.45em;
    min-height: 1.6em;
    padding: 0.5em 1.25em 0.5em 0.75em;
    background: #000;
    color: #fff;
    font-size: var(--footer-copy-size);
    text-decoration: none;
    font-weight: 300;
}

.footer-email::after {
    content: "";
    position: absolute;
    top: 0;
    bottom: 0;
    right: -1.5em;
    transform: none;
    width: 1.05em;
    height: 100%;
    background: #000;
    clip-path: polygon(0 0, 100% 50%, 0 100%);
}

@media (max-width: 900px) {
    :root {
        --header-height: 28px;
    }

    .site-header img {
        height: 10px;
    }

    .hero {
        min-height: var(--visible-height);
    }

    .intro p {
        margin-bottom: clamp(9px, 3vw, 14px);
        font-size: 3.35vw;
    }

    .sketch {
        padding: 0 20px;
    }

    .footer {
        grid-template-columns: minmax(95px, 24vw) 1fr;
        column-gap: 16px;
        row-gap: 10px;
        align-items: start;
        padding: 35px 20px 24px;
    }

    .footer-logo {
        grid-column: 1;
        grid-row: 1 / span 2;
    }

    .footer-logo img {
        width: 100%;
        max-width: 130px;
    }

    .footer-text {
        grid-column: 2;
        grid-row: 1;
    }

    .footer-text h2 {
        font-size: 24px;
        margin-bottom: 8px;
    }

    .footer-text p {
        font-size: 10px;
        line-height: 1.08;
    }

    .footer-email {
        grid-column: 2;
        grid-row: 2;
        width: fit-content;
        justify-self: start;
        min-height: 20px;
        padding: 0 12px;
        font-size: 9px;
    }

    .footer-email::after {
        right: -16px;
        border-top-width: 10px;
        border-bottom-width: 10px;
        border-left-width: 12px;
    }
}

@media (max-width: 900px) and (hover: hover) and (pointer: fine) {
    .hero {
        min-height: clamp(500px, 74svh, 620px);
    }
}

@media (max-width: 900px) {
    html.has-coarse-pointer .hero {
        min-height: var(--visible-height);
    }
}

@media (max-width: 505px) {
    html.has-coarse-pointer {
        --browser-bottom-space: 96px;
    }

    html.has-coarse-pointer .hero {
        margin-bottom: var(--browser-bottom-space);
    }

    .footer-text h2 {
        font-size: 20px;
    }

    .footer-text p {
        font-size: 8px;
        line-height: 1.08;
    }

    .footer-text br {
        display: none;
    }

    .footer-email {
        font-size: 8px;
    }
}
