/*
 * The Hive - home page sections
 * Intro statement, "What to expect", "Explore The Hive" carousel.
 * Sizes follow the 1440px Figma frame through --u (see app.css).
 */

/* ------------------------------------------------------------------ Intro */

.intro {
    padding: max(100px, calc(199 * var(--u))) 0 max(80px, calc(152 * var(--u)));
    text-align: center;
}

.intro__text {
    max-width: 21.9em;
    margin: 0 auto;
    font-family: var(--font-display);
    font-weight: 400;
    font-size: max(24px, calc(40 * var(--u)));
    line-height: 1.05;
}

.intro .btn {
    margin-top: max(32px, calc(56 * var(--u)));
}

/* ------------------------------------------------------------------ What to expect */

.expect {
    padding-bottom: max(72px, calc(110 * var(--u)));
}

.expect__grid {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 72px max(12px, calc(15 * var(--u)));
    margin-top: max(72px, calc(97 * var(--u)));
}

/* The icon sits left of the title; its Figma artboard (padding included) is
   placed by the offsets in inc/site-content.php */
.expect__title {
    position: relative;
    padding-left: max(88px, calc(122 * var(--u)));
    font-family: var(--font-display);
    font-weight: 800;
    font-size: max(20px, calc(24 * var(--u)));
    line-height: 25px;
}

.expect__icon {
    position: absolute;
    top: var(--y);
    left: var(--x);
    max-width: none;
    pointer-events: none;
}

.expect__text {
    margin-top: 48px;
    font-size: max(16px, calc(18 * var(--u)));
    line-height: 1.1667;
}

/* Figma text box widths, so the lines break as designed */
@media (min-width: 1200px) {
    .expect__item:nth-child(1) .expect__text { max-width: 13.75em; }
    .expect__item:nth-child(2) .expect__text { max-width: 15.25em; }
    .expect__item:nth-child(3) .expect__text { max-width: 15.3em; }
    .expect__item:nth-child(4) .expect__text { max-width: 16.75em; }
}

/* The designed line breaks only make sense in the four-up row */
@media (max-width: 1199px) {
    .expect__text br {
        display: none;
    }
}

/* ------------------------------------------------------------------ Explore carousel */

.explore {
    padding-bottom: max(72px, calc(129 * var(--u)));
}

/* Position indicator in place of the hairline: a thin track and a thicker
   bar, one card's share of the width, that slides with the leading card. */
.explore__progress {
    position: relative;
    height: 1px;
    background: var(--rule);
}

.explore__thumb {
    position: absolute;
    top: -1px;
    left: 0;
    width: calc(100% / var(--count, 3));
    height: 2px;
    background: #fff;
    transform: translateX(calc(var(--index, 0) * 100%));
    transition: transform 0.6s var(--ease);
}

.explore__body {
    padding-top: max(18px, calc(26 * var(--u)));
}

.explore__head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 24px;
}

/* Nudged down without adding to the row's height */
.explore__arrows {
    position: relative;
    top: max(2px, calc(11 * var(--u)));
    display: flex;
    flex: none;
    gap: 9px;
}

.arrow-btn {
    border-radius: 50%;
    transition: transform 0.2s var(--ease), opacity 0.2s var(--ease);
}

.arrow-btn img {
    width: 36px;
    height: 36px;
}

.arrow-btn:hover {
    transform: translateX(3px);
}

.arrow-btn--prev img {
    transform: rotate(180deg);
}

.arrow-btn--prev:hover {
    transform: translateX(-3px);
}

.explore__viewport {
    margin-top: max(28px, calc(44 * var(--u)));
    overflow: hidden;
    touch-action: pan-y;
}

.explore__track {
    --gap: max(16px, calc(44 * var(--u)));
    display: flex;
    gap: var(--gap);
}

.explore__card {
    flex: 0 0 calc((100% - 2 * var(--gap)) / 3);
    min-width: 0;
}

.explore__image {
    width: 100%;
    aspect-ratio: 412 / 513;
    object-fit: cover;
    border-radius: var(--radius);
    -webkit-user-drag: none;
    user-select: none;
}

/* Caption with a short hairline that fades in from the top */
.explore__caption {
    position: relative;
    min-height: 60px;
    margin-top: 18px;
    padding: 12px 0 0 24px;
    font-weight: 600;
    font-size: max(15px, calc(18 * var(--u)));
    line-height: 1.1667;
    text-transform: uppercase;
}

.explore__caption::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 1px;
    height: 60px;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0), #fff 37.98%);
}

/* ------------------------------------------------------------------ Tablet */

@media (max-width: 1023px) {
    .expect__grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        column-gap: 40px;
    }

    .explore__card {
        flex-basis: calc((100% - var(--gap)) / 2.2);
    }
}

/* ------------------------------------------------------------------ Phone */

@media (max-width: 767px) {
    /* Two across, to save scrolling; the icon moves above its title */
    .expect__grid {
        gap: 48px 16px;
    }

    .expect__title {
        padding: 72px 0 0;
    }

    .expect__icon {
        top: var(--py);
        left: var(--px);
    }

    .expect__text {
        margin-top: 16px;
    }

    .explore__card {
        flex-basis: 82%;
    }

    .explore__caption {
        padding-left: 16px;
    }
}
