/*
 * New-brand takeover for the homepage, live until the new site launches. The hero stays
 * put while the current site slides up over it, fading in from dark. Plain CSS outside the
 * Mix build so it comes out cleanly: delete this folder, _partials/brand_takeover.twig and
 * the brand_takeover lines in _layouts/default.twig and _partials/page_top.twig.
 */

.brand-takeover {
    --takeover-black: #020006;
    --takeover-white: #f6f5f5;
    --takeover-gutter: clamp(1.5rem, 4vw, 4rem);

    position: sticky;
    top: 0;
    z-index: 0;
    height: 100vh;
    height: 100svh;
    min-height: 34rem;
    overflow: hidden;
    color: var(--takeover-white);
    background: linear-gradient(160deg, #1a173b 0%, var(--takeover-black) 55%, color-mix(in srgb, #877bb8 40%, var(--takeover-black)) 100%);
    font-family: "mundial-narrow-variable", "mundial", "Arial Narrow", sans-serif;
}

/* Dims as the current site rises, so the site's shadow reads against it */
.brand-takeover::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #000;
    opacity: calc(var(--takeover-rise, 0) * 0.55);
    pointer-events: none;
}

.brand-takeover__mark {
    position: absolute;
    top: 1.75rem;
    left: var(--takeover-gutter);
    width: 2rem;
    height: auto;
    color: var(--takeover-white);
}

.brand-takeover__swirl {
    position: absolute;
    right: -45%;
    bottom: -6%;
    width: 150%;
    aspect-ratio: 2332 / 1078;
    background-image: image-set(url("/assets/takeover/iridescent-1600.avif") type("image/avif"), url("/assets/takeover/iridescent-1600.webp") type("image/webp"));
    background-position: center;
    background-size: cover;
    -webkit-mask: url("/assets/takeover/swirl-m.svg") center / contain no-repeat;
    mask: url("/assets/takeover/swirl-m.svg") center / contain no-repeat;
    pointer-events: none;
}

.brand-takeover__body {
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    height: 100%;
    padding: 6rem var(--takeover-gutter) 8rem;
}

.brand-takeover__title {
    max-width: 11ch;
    margin: 0;
    font-family: "stinger-variable", "Arial", sans-serif;
    font-variation-settings: "wdth" 103;
    font-weight: 650;
    font-size: 2.75rem;
    line-height: 1;
    letter-spacing: -0.015em;
    text-wrap: balance;
    color: var(--takeover-white);
}

.brand-takeover__copy {
    max-width: 34ch;
    margin: 2rem 0 0;
    font-size: 1.25rem;
    line-height: 1.6;
    color: rgb(246 245 245 / 0.85);
}

.brand-takeover__button {
    align-self: flex-start;
    margin-top: 3rem;
    padding: calc(1rem - 0.106em) 1.5rem calc(1rem + 0.106em);
    border-radius: 9999px;
    background: #eb9b47;
    color: var(--takeover-black);
    font-weight: 700;
    font-size: 0.75rem;
    line-height: 1;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    text-decoration: none;
    transition: background-color 300ms cubic-bezier(0.23, 1, 0.32, 1);
}

.brand-takeover__button:hover {
    background: #f2b06b;
}

.brand-takeover__button:focus-visible {
    outline: 2px solid var(--takeover-white);
    outline-offset: 4px;
}

@media (min-width: 640px) {
    .brand-takeover__button { font-size: 0.875rem; }
}

@media (min-width: 768px) {
    .brand-takeover__swirl { right: -12%; bottom: -14%; width: 80%; }
    .brand-takeover__title { font-size: 4.5rem; max-width: 10ch; }
    .brand-takeover__copy { font-size: 1.5rem; line-height: 1.65; }
    .brand-takeover__button { font-size: 1rem; }
}

@media (min-width: 1280px) {
    .brand-takeover__title { font-size: 6.5rem; }
}

/* The current site, sliding up over the hero */
.brand-takeover-site {
    position: relative;
    z-index: 1;
    background: #fff;
    box-shadow:
        0 -1px 0 rgb(255 255 255 / 0.25),
        0 -12px 24px rgb(0 0 0 / 0.55),
        0 -40px 80px rgb(0 0 0 / 0.6);
}

/* Fades in from the dark of the hero, staying solid so nothing shows through */
.brand-takeover-site::after {
    content: "";
    position: absolute;
    inset: 0;
    background: #020006;
    opacity: calc((1 - var(--takeover-rise, 0)) * 0.85);
    pointer-events: none;
}

@media (prefers-reduced-motion: reduce) {
    .brand-takeover::after,
    .brand-takeover-site::after {
        opacity: 0;
    }
}
