/* ============================================================================
   2% REALTY CORPORATE — HOME TEMPLATE
   Loaded by templates/home.php only. Depends on tokens from theme.css.
   ============================================================================ */

/* Hero ------------------------------------------------------------------- */
.tp-hero {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.tp-video {
    position: relative;
    line-height: 0;
}

.tp-video video {
    display: block;
    width: 100%;
    height: auto;
}

.tp-video--hero video {
    height: 100%;
    max-height: 70vh;
    object-fit: cover;
}

.tp-video--hero::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: 0;
    width: 100%;
    height: 50px;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0), rgb(255, 255, 255));
}

.tp-hero__text {
    position: absolute;
    inset: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
}

.tp-body .tp-hero__text h1 {
    margin: 0 0 0.2em;
    font-size: clamp(1.75rem, 3.4vw, 3rem);
    font-weight: 800;
}

.tp-hero__sub {
    margin: 0;
    font-family: var(--tp-font-head);
    font-size: clamp(1rem, 2vw, 2rem);
    font-weight: 600;
}

/* Generic section -------------------------------------------------------- */
.tp-section {
    padding: 40px var(--tp-gutter);
}

.tp-section--center {
    text-align: center;
}

.tp-body .tp-section h2 {
    margin: 0 0 0.4em;
    font-size: clamp(1.5rem, 3vw, 2.4rem);
    font-weight: 800;
}

.tp-section__sub {
    font-family: var(--tp-font-head);
    font-size: clamp(1.1rem, 2vw, 1.6rem);
    font-weight: 600;
}

.tp-chart {
    width: min(70vw, 1300px);
    margin: 0 auto;
}

.tp-footnote {
    margin-top: 1rem;
    font-style: italic;
    color: hsl(var(--tp-green));
}

/* Split video / text sections ------------------------------------------- */
.tp-split {
    display: grid;
    align-items: center;
    column-gap: 2rem;
    padding: 2vw 6vw;
}

.tp-split--video-left {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "video title"
        "video cta";
}

.tp-split--video-right {
    grid-template-columns: 1fr 1fr;
    grid-template-areas:
        "title video"
        "cta video";
}

.tp-split .tp-video {
    grid-area: video;
}

.tp-split .tp-video video {
    height: 40vh;
    object-fit: contain;
}

.tp-body .tp-split__title {
    grid-area: title;
    align-self: end;
    margin: 0;
    text-align: center;
    font-size: clamp(1.5rem, 2.6vw, 2.6rem);
    font-weight: 800;
}

.tp-split__cta {
    grid-area: cta;
    justify-self: center;
    align-self: start;
    margin-top: 1.2rem;
}

/* Locations map ---------------------------------------------------------- */
.tp-map {
    position: relative;
}

.tp-video--map video {
    width: 100%;
    height: auto;
}

.tp-map__title {
    position: absolute;
    top: 20px;
    left: 20px;
    z-index: 2;
    width: 50%;
    padding: 40px 0 0 80px;
}

.tp-body .tp-map__title h2 {
    margin: 0 0 0.6em;
    text-align: left;
    font-size: clamp(1.4rem, 3vw, 2.6rem);
    font-weight: 800;
}

/* Responsive ------------------------------------------------------------- */
@media (max-width: 768px) {
    .tp-video--hero video {
        max-height: 30vh;
    }

    .tp-hero__text {
        padding: 0 var(--tp-gutter);
    }

    .tp-chart {
        width: 100%;
        margin-top: 30px;
    }

    .tp-split {
        padding: 1rem var(--tp-gutter);
    }

    .tp-split--video-left,
    .tp-split--video-right {
        grid-template-columns: 1fr;
        grid-template-areas:
            "title"
            "video"
            "cta";
    }

    .tp-split .tp-video video {
        height: 30vh;
    }

    .tp-map__title {
        position: static;
        width: auto;
        padding: 1rem var(--tp-gutter);
        text-align: center;
    }

    .tp-body .tp-map__title h2 {
        text-align: center;
        font-size: 1.5rem;
    }
}
