/*
 * Hero: title, lead and sport tiles beside the athlete and the next event on sale; the reassurance
 * strip below. The athlete is the largest paint, so it has fixed dimensions and its entrance only
 * moves it (no fade) — the title too. Only secondary pieces fade in.
 */

.home-hero {
    display: grid;
    grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
        "copy visual"
        "sports visual";
    grid-template-rows: auto 1fr;
    column-gap: 40px;
    max-width: 1520px;
    margin: 0 auto;
    padding: 56px var(--home-gutter) 0;
}

.home-hero__copy {
    grid-area: copy;
    display: flex;
    flex-direction: column;
    gap: var(--rg-space-8);
    padding-top: 40px;
}

.home-hero__title {
    margin: 0;
    max-width: 640px;
    font-size: clamp(56px, 6.4vw, 92px);
    font-weight: var(--rg-font-weight-regular);
    line-height: 0.96;
    letter-spacing: -0.04em;
    text-wrap: balance;
}

.home-hero__lead {
    margin: 0;
    max-width: 470px;
    color: var(--rg-color-ink-muted);
    font-size: 19px;
    line-height: 28px;
    text-wrap: pretty;
}

.home-hero__lead-short {
    display: none;
}

.home-hero__sports {
    grid-area: sports;
    display: flex;
    flex-direction: column;
    gap: var(--rg-space-3);
    padding: var(--rg-space-8) 0 56px;
}

.home-hero__question {
    margin: 0;
    color: var(--rg-color-text-muted);
    font-size: var(--rg-font-size-md);
}

.home-tiles {
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: var(--rg-space-2);
    max-width: 560px;
}

.home-tile {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 18px;
    height: 100%;
    padding: 14px;
    border-radius: 20px;
    background: var(--rg-color-surface);
    transition: background var(--rg-transition), color var(--rg-transition), transform var(--rg-transition);
}

.home-tile:hover {
    transform: translateY(-3px);
}

.home-tile.is-empty {
    color: var(--rg-color-text-faint);
}

.home-page .home-tile.is-active {
    background: var(--home-ink);
    color: var(--rg-color-inverse-text);
}

.home-tile__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: var(--rg-radius-md);
    background: var(--rg-color-surface-sunken);
    font-size: 21px;
}

.home-tile.is-active .home-tile__icon {
    background: var(--rg-color-brand);
}

.home-tile__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.home-tile__name {
    overflow: hidden;
    font-size: var(--rg-font-size-lg);
    text-overflow: ellipsis;
    white-space: nowrap;
}

.home-tile__count {
    color: var(--rg-color-text-muted);
    font-size: var(--rg-font-size-sm);
}

.home-tile.is-active .home-tile__count {
    color: var(--home-mute-on-ink);
}

/* Athlete and the featured event */
.home-hero__visual {
    grid-area: visual;
    position: relative;
    align-self: end;
    height: 600px;
}

.home-hero__backdrop {
    position: absolute;
    top: 60px;
    right: 4%;
    bottom: 0;
    left: 8%;
    overflow: hidden;
    border-radius: 40px 40px 0 0;
    background: var(--home-ink);
}

.home-hero__backdrop::after {
    content: "";
    position: absolute;
    top: -80px;
    right: -80px;
    width: 340px;
    height: 340px;
    border-radius: 50%;
    background: var(--rg-color-brand);
    opacity: 0.9;
}

.home-hero__athlete {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: auto;
    max-width: 100%;
    height: 100%;
    object-fit: contain;
    object-position: bottom;
    translate: -50% 0;
}

.home-featured {
    position: absolute;
    bottom: 40px;
    left: 0;
    z-index: 2;
    display: flex;
    flex-direction: column;
    gap: var(--rg-space-3);
    width: 330px;
    padding: 10px 10px 14px;
    border-radius: var(--rg-radius-xl);
    background: var(--rg-color-surface);
    box-shadow: var(--home-pop-shadow);
}

.home-featured__top {
    display: flex;
    align-items: center;
    gap: var(--rg-space-3);
}

.home-featured__thumb {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 64px;
    overflow: hidden;
    border-radius: var(--rg-radius-md);
    background: #e4e4e0;
    color: var(--rg-color-text-muted);
    font-size: 24px;
}

.home-featured__thumb img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.home-featured__text {
    display: flex;
    flex-direction: column;
    gap: 3px;
    min-width: 0;
}

.home-featured__label {
    color: var(--rg-color-brand);
    font-size: var(--rg-font-size-xs);
}

.home-featured__title {
    font-size: var(--rg-font-size-lg);
    line-height: 19px;
    letter-spacing: -0.2px;
}

/* The title link covers the whole card; the quick button sits above it */
.home-featured__title::after {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
}

.home-featured__name--short {
    display: none;
}

.home-featured__range {
    color: var(--rg-color-text-muted);
    font-size: var(--rg-font-size-sm);
}

.home-featured__bottom {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 var(--rg-space-1) 0 6px;
}

.home-featured__price {
    display: flex;
    flex-direction: column;
}

.home-featured__from {
    color: var(--rg-color-text-muted);
    font-size: var(--rg-font-size-xs);
}

.home-featured__amount {
    font-size: 22px;
    letter-spacing: -0.5px;
}

.home-featured__quick {
    position: relative;
    z-index: 1;
    height: 42px;
    padding: 0 18px;
    font-size: var(--rg-font-size-base);
}

/* Entrances: secondary pieces fade in; the title and the athlete only rise */
.js .home-hero__title {
    animation: home-rise 0.9s var(--home-ease-out) both;
}

.js .home-hero__athlete {
    animation: home-rise 1.1s 0.1s var(--home-ease-out) both;
}

.js .home-hero__lead {
    animation: home-fade-up 0.9s 0.15s both;
}

.js .home-hero__sports {
    animation: home-fade-up 0.9s 0.25s both;
}

.js .home-featured {
    animation: home-fade-up 0.9s 0.5s both;
}

/* Reassurance strip */
.home-trust {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: var(--rg-space-6);
    width: calc(min(1520px, 100%) - 2 * var(--home-gutter));
    margin: 0 auto;
    padding: 20px 28px;
    border-radius: var(--rg-radius-xl);
    background: var(--rg-color-surface);
}

.home-trust__item {
    display: flex;
    align-items: center;
    gap: 14px;
}

.home-trust__icon {
    display: flex;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    background: var(--rg-color-surface-sunken);
    font-size: 20px;
}

.home-trust__text {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.home-trust__title {
    font-size: var(--rg-font-size-lg);
    font-weight: var(--rg-font-weight-regular);
}

.home-trust__detail {
    color: var(--rg-color-text-muted);
    font-size: var(--rg-font-size-md);
}

/* Tablets: stacked hero */
@media (max-width: 899px) {
    .home-hero {
        grid-template-columns: minmax(0, 1fr);
        grid-template-areas:
            "copy"
            "visual"
            "sports";
        grid-template-rows: none;
        padding-top: 32px;
    }

    .home-hero__copy {
        gap: var(--rg-space-4);
        padding-top: 0;
    }

    .home-hero__title {
        font-size: clamp(42px, 8.5vw, 72px);
        line-height: 1;
        letter-spacing: -0.035em;
    }

    .home-hero__visual {
        --home-visual-height: 440px;

        display: flex;
        flex-direction: column;
        width: 100%;
        max-width: 620px;
        height: auto;
        margin: var(--rg-space-2) auto 0;
    }

    .home-hero__backdrop {
        top: 40px;
        right: 0;
        bottom: auto;
        left: 0;
        height: calc(var(--home-visual-height) - 40px);
        border-radius: 28px;
    }

    .home-hero__backdrop::after {
        top: -60px;
        right: -60px;
        width: 220px;
        height: 220px;
    }

    .home-hero__athlete {
        position: relative;
        bottom: auto;
        left: auto;
        align-self: center;
        height: var(--home-visual-height);
        translate: none;
    }

    .home-featured {
        position: relative;
        bottom: auto;
        left: auto;
        align-self: center;
        width: min(420px, calc(100% - 48px));
        margin-top: -48px;
    }

    .home-hero__sports {
        padding: 28px 0 40px;
    }

    .home-tiles {
        max-width: none;
    }

    .home-trust {
        gap: var(--rg-space-3);
        padding: var(--rg-space-4);
    }

    .home-trust__item {
        flex-direction: column;
        align-items: flex-start;
        gap: var(--rg-space-2);
    }
}

/* Phones */
@media (max-width: 699px) {
    .home-hero {
        padding-top: var(--rg-space-6);
    }

    .home-hero__title {
        font-size: 42px;
        line-height: 42px;
        letter-spacing: -1.8px;
    }

    .home-hero__lead {
        font-size: var(--rg-font-size-lg);
        line-height: 22px;
    }

    .home-hero__lead-long {
        display: none;
    }

    .home-hero__lead-short {
        display: inline;
    }

    .home-hero__visual {
        --home-visual-height: 330px;
    }

    .home-featured {
        flex-direction: row;
        align-items: center;
        width: calc(100% - 16px);
        margin-top: -36px;
        padding: var(--rg-space-2);
        border-radius: 20px;
    }

    .home-featured__top {
        flex: 1;
        min-width: 0;
    }

    .home-featured__thumb {
        width: 56px;
        height: 56px;
    }

    .home-featured__title {
        overflow: hidden;
        font-size: var(--rg-font-size-base);
        line-height: 18px;
        text-overflow: ellipsis;
        white-space: nowrap;
    }

    .home-featured__name {
        display: none;
    }

    .home-featured__name--short {
        display: inline;
    }

    .home-featured__range,
    .home-featured__price {
        display: none;
    }

    .home-featured__bottom {
        padding: 0;
    }

    .home-featured__quick {
        width: 44px;
        height: 44px;
        padding: 0;
        border-radius: 50%;
    }

    .home-featured__quick .home-quick-button__label {
        position: absolute;
        width: 1px;
        height: 1px;
        overflow: hidden;
        clip: rect(0, 0, 0, 0);
    }

    .home-featured__quick .home-icon {
        font-size: 18px;
    }

    .home-hero__question {
        display: none;
    }

    .home-hero__sports {
        padding: 28px 0 32px;
    }

    .home-tiles {
        gap: 6px;
    }

    .home-tile {
        align-items: center;
        gap: var(--rg-space-2);
        padding: var(--rg-space-3) var(--rg-space-1);
        border-radius: 18px;
    }

    .home-tile__text {
        align-items: center;
        max-width: 100%;
    }

    .home-tile__name {
        max-width: 100%;
        font-size: var(--rg-font-size-sm);
    }

    .home-tile__count {
        display: none;
    }

    .home-trust {
        display: none;
    }
}

.home-tiles--2 {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.home-tiles--3 {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}
