/* The homepage hero (content/homepage_hero.php): the launch video (a drop without a video: its Presale photo,
   .si_hero_still) in a tall white card in the middle, like the products' stickers, the countdown under it, and the
   products' cutouts on a checkerboard behind it, moving a column at a time (the script there). It fills the screen as
   it first opens (svh: a phone's toolbar hiding on scroll doesn't resize it), the header folded into a menu button over it
   until you scroll (below). */
.si_hero {
    --hero_h: max(520px, 100vh);
    --hero_h: max(520px, 100svh);
    --copy_h: 150px; /* the countdown's room under the video */
    --card_gap: 18px; /* the card stops short of the hero's bottom, which clips, so its shadow shows */
    --cell: 150px;
    --video_scale: 1; /* the card's share of its full size: a phone's is smaller (below) */
    --hero_more: 0px; /* how far the hero runs on past the screen (a phone's, below), the card staying as it is */
    position: relative;
    overflow: hidden;
    height: calc(var(--hero_h) + var(--hero_more));
    background: var(--color-blush);
}

.si_hero_defs {
    position: absolute;
    width: 0;
    height: 0;
    overflow: hidden;
}

/* the pattern: columns of cells the script fills and slides */
.si_hero_field {
    position: absolute;
    inset: 0;
    pointer-events: none;
}

.si_hero_col {
    position: absolute;
    top: 0;
    bottom: 0;
    will-change: transform;
}

.si_hero_cell {
    position: absolute;
    left: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.si_hero_cell img {
    display: block;
    object-fit: contain;
    filter: url(#si_hero_sticker);
    transition: scale .2s ease;
}

/* a sticker links to its product: the product takes the click, the space round it doesn't */
a.si_hero_cell img {
    pointer-events: auto;
    cursor: pointer;
}

@media (hover: hover) {
    a.si_hero_cell:hover img {
        scale: 1.08;
    }
}

@media (prefers-reduced-motion: reduce) {
    .si_hero_cell img {
        transition: none;
    }
}

/* the card: as tall as the hero less the gap, as wide as a 9:16 video above the countdown; --video_scale shrinks the
   video both ways, the room it frees under the card */
.si_hero_stage {
    position: absolute;
    z-index: 2;
    top: 0;
    bottom: calc(var(--hero_more) + var(--card_gap) + (var(--hero_h) - var(--copy_h) - var(--card_gap)) * (1 - var(--video_scale)));
    left: 50%;
    translate: -50% 0;
    width: calc((var(--hero_h) - var(--copy_h) - var(--card_gap)) * 9 / 16 * var(--video_scale));
    max-width: calc((100% - 24px) * var(--video_scale));
    display: flex;
    flex-direction: column;
    background: var(--color-white);
    border: 6px solid #fff;
    box-shadow: 0 2px 6px rgba(0, 0, 0, .28);
    container-type: inline-size;
}

.si_hero_media {
    flex: 1 1 0;
    min-height: 0;
    display: block;
}

.si_hero_video,
.si_hero_still {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
    background: var(--color-neutral);
}

.si_hero_video {
    object-position: 50% 28%;
}

/* the Presale photo is tall with the product's name lettered across the bottom: from its top, so the lettering is what
   gets cropped */
.si_hero_still {
    object-position: 50% 0%;
}

.si_hero_play {
    position: absolute;
    z-index: 3;
    top: 14px;
    right: 14px;
    width: 44px;
    height: 44px;
    border-radius: 50%;
    border: none;
    background: var(--color-chip-on-photo);
    color: var(--color-ink);
    font-size: 18px;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
}

.si_hero_play:hover {
    background: var(--color-white);
    color: var(--color-plum);
}

.si_hero_play:focus-visible {
    outline: 2px solid var(--color-plum);
    outline-offset: 3px;
}

.si_hero_copy {
    flex: none;
    min-height: var(--copy_h);
    padding: 18px 16px 12px;
    box-sizing: border-box;
    text-align: center;
}

/* sized to the card: "Today's drop lands in" (about 8.3 times the type's size wide) on one line, the time on the next
   (.si_hero_count), 40px at most */
.si_hero_title {
    font-family: 'Belleza', sans-serif;
    font-weight: 400;
    font-size: min(40px, calc((100cqi - 32px) / 8.8));
    line-height: 1.05;
    margin: 0;
    color: var(--color-ink);
}

.si_hero_count {
    display: block;
}

.si_hero_when {
    margin: 8px 0 0;
    font-size: 15px;
    color: var(--color-body);
}

.si_hero_local {
    font-weight: 600;
    color: var(--color-plum);
}

/* The header over the hero (main_header.php wraps the message bar, the stylist strip and the menu in .si_hero_hdr):
   just the menu button (three bars) at the top, opening out from it into the full header once you scroll (.si_hero_hdr_open, set by
   content/homepage_hero.php), and folding back into it at the top. */
.si_hero_hdr,
.si_hero_mark {
    --cx: 20px;
    --cy: 14px;
    --cs: 60px;
}

.si_hero_hdr {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    overflow-x: clip; /* a long stylist strip mustn't widen the page on a phone */
    background: var(--color-white);
    clip-path: inset(var(--cy) calc(100% - var(--cx) - var(--cs)) calc(100% - var(--cy) - var(--cs)) var(--cx) round calc(var(--cs) / 2));
    transition: clip-path .6s cubic-bezier(.2, .8, .2, 1) .05s, translate .3s cubic-bezier(.2, .8, .2, 1);
}

.si_hero_hdr.si_hero_hdr_open {
    clip-path: inset(0 0 0 0 round 0);
    transition: clip-path .6s cubic-bezier(.2, .8, .2, 1), translate .3s cubic-bezier(.2, .8, .2, 1); /* translate: theme_2026.css .si_hdr_away */
}

/* once open, nothing clipped: the menus drop down below the header */
.si_hero_hdr.si_hero_hdr_open.si_hero_hdr_done {
    clip-path: none;
}

/* the header's own position: inside the fixed wrapper the menu no longer needs to stick */
.si_hero_hdr .header_nav {
    position: relative;
    top: auto;
}

.si_hero_hdr > * {
    visibility: hidden;
    opacity: 0;
    transform: translateX(-24px);
    transition: opacity .2s, transform .3s, visibility 0s .4s;
}

.si_hero_hdr.si_hero_hdr_open > * {
    visibility: visible;
    opacity: 1;
    transform: none;
    transition: opacity .35s .2s, transform .55s cubic-bezier(.2, .8, .2, 1) .2s, visibility 0s;
}

.si_hero_hdr.si_hero_hdr_open > *:nth-child(2) {
    transition-delay: .3s, .3s, 0s;
}

.si_hero_mark {
    position: fixed;
    z-index: 1001;
    left: var(--cx);
    top: var(--cy);
    width: var(--cs);
    height: var(--cs);
    padding: 0;
    border: none;
    border-radius: 50%;
    /* its own circle: the header's clipped one is cut off when the header is shorter than the circle's bottom (the
       slimmer menu row without the message bar: 57px on a desktop, 47 on a phone, under the 74 and 64 it reaches) */
    background: var(--color-white);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity .3s .2s, transform .45s cubic-bezier(.2, .8, .2, 1) .15s, visibility 0s;
}

.si_hero_mark svg {
    width: 28px;
    height: 28px;
    display: block;
    color: var(--text-primary);
}

.si_hero_mark:focus-visible {
    outline: 2px solid var(--color-plum);
    outline-offset: 3px;
}

.si_hero_mark[aria-expanded="true"] {
    opacity: 0;
    transform: scale(.5);
    visibility: hidden;
    pointer-events: none;
    transition: opacity .2s, transform .3s, visibility 0s .3s;
}

@media (prefers-reduced-motion: reduce) {
    .si_hero_hdr,
    .si_hero_hdr > *,
    .si_hero_mark {
        transition: none !important;
    }
}

@media screen and (max-width: 767px) {
    /* a phone's smaller type needs less room under the video: the video gets it */
    .si_hero {
        --hero_h: max(440px, 100vh);
        --hero_h: max(440px, 100svh);
        --copy_h: 112px;
        --video_scale: .9; /* 10% smaller: more of the pattern shows round it */
        /* on past the screen, so a whole row of products passes under the card (the pattern's last row ends at the
           hero's bottom: the script there) */
        --hero_more: 90px;
    }

    .si_hero_hdr,
    .si_hero_mark {
        --cx: 12px;
        --cy: 12px;
        --cs: 52px;
    }

    .si_hero_mark svg {
        width: 24px;
        height: 24px;
    }

    .si_hero_copy {
        padding-top: 14px;
    }

    .si_hero_when {
        margin-top: 4px;
        font-size: 13px;
        line-height: 1.4;
    }
}

/* customers flagged tester: choose a bucket and draw the pattern again (content/homepage_hero.php) */
.si_hero_tester {
    position: absolute;
    right: 16px;
    bottom: 16px;
    z-index: 3;
    display: flex;
    gap: 8px;
    align-items: center;
    padding: 8px;
    background: var(--color-white);
    color: var(--color-ink);
    box-shadow: var(--shadow-menu);
    font-size: 14px;
}

.si_hero_tester select,
.si_hero_tester button {
    height: 36px;
    border: 2px solid var(--color-ink);
    background: var(--color-white);
    color: var(--color-ink);
    font: inherit;
}

.si_hero_tester select {
    padding: 0 8px;
}

.si_hero_tester button {
    padding: 0 14px;
    cursor: pointer;
}

.si_hero_tester button:hover {
    background: var(--color-ink);
    color: var(--color-white);
}

