/* ==========================================================================
   Black Friday Landing Page
   Content is ACF-driven via template-parts/sections/bf-*.php

   Sizes come from the two design artboards: mobile at 393px wide and desktop
   at 1600px (the 3200px artboard at 2x). Each clamp() runs in a straight line
   from the mobile value at 393px to the desktop value at 1600px, so the page
   matches each artboard at its width and scales smoothly in between.
   ========================================================================== */

.bf-page {
    --bf-yellow: #ffe561;
    --bf-ink: #231f20;
    --bf-grey: #414141;
    --bf-hero-bg: #242325; /* average colour of the banner's left and right edges */

    font-family: 'Work Sans', sans-serif;
    background: #ffffff;
}
.bf-page *,
.bf-page *::before,
.bf-page *::after {
    box-sizing: border-box;
}

/* Text that screen readers read but sighted visitors don't see. */
.bf-page .bf-sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

/* --------------------------------------------------------------------------
   1. Hero banner; the mobile image swaps in at 640px.
   Same height as the My BBOS Finds hero: the banner fills the width until it
   is 660px tall (620px on phones), then stays centred. bf-hero.php sets
   --bf-hero-max / --bf-hero-max-m to the width that gives that height.
   The background matches the banner's edges, and the edges fade into it so
   the band looks full width with no visible seam.
   -------------------------------------------------------------------------- */
.bf-hero {
    background: var(--bf-hero-bg);
    /* The banner is lighter in the middle and darker top and bottom; this
       follows its edge colour down the height so the sides meet it cleanly. */
    background-image: linear-gradient(to bottom, #212121 0%, #242425 10%, #242426 20%, #252527 30%, #262627 40%, #262527 50%, #252426 60%, #232223 70%, #212021 80%, #1d1d1e 90%, #1a191b 100%);
    line-height: 0;
}
.bf-hero picture {
    display: block;
}
.bf-hero img {
    display: block;
    width: 100%;
    max-width: var(--bf-hero-max, none);
    height: auto;
    margin: 0 auto;
}
@media (min-width: 641px) {
    .bf-hero img {
        -webkit-mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 10%, #000 90%, transparent);
    }
}
@media (max-width: 640px) {
    /* Narrower fade: the mobile banner's logo starts about 7% in. It also
       hides the light 1px column on the right edge of the mobile export. */
    .bf-hero img {
        max-width: var(--bf-hero-max-m, none);
        -webkit-mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
        mask-image: linear-gradient(to right, transparent, #000 3%, #000 97%, transparent);
    }
}

/* --------------------------------------------------------------------------
   Yellow band (used above the deals and above the sign-up)
   Band: 42px -> 130px tall. Text: Work Sans Black, 18.5px -> 65px.
   The design sits the text a little below centre: padding-top minus
   padding-bottom (0.24em) moves it down by 0.12em.
   -------------------------------------------------------------------------- */
.bf-band {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: clamp(36px, 13.35px + 7.291vw, 130px);
    padding: 0.3em 16px 0.06em;
    background: var(--bf-yellow);
    font-size: clamp(16px, 3.36px + 3.853vw, 65px);
}
.bf-page .bf-band__text {
    margin: 0;
    font-family: inherit;
    font-size: 1em;
    font-weight: 900;
    line-height: 1.15;
    color: var(--bf-ink);
    text-align: center;
    text-wrap: balance;
}

/* --------------------------------------------------------------------------
   2. Deal cards. Each card is a finished image (border and corners included),
   1346px wide on desktop and full width less 25px a side on mobile.
   -------------------------------------------------------------------------- */
.bf-deals {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: clamp(24px, 10.98px + 3.314vw, 64px);
    padding:
        clamp(47px, 26.49px + 5.220vw, 110px)
        clamp(16px, -8.21px + 8.451vw, 127px)
        clamp(47px, 18.02px + 7.374vw, 136px);
}
/* With the countdown first, it sits close under the band: 20px -> 40px. */
.bf-deals--countdown {
    padding-top: clamp(20px, 13.49px + 1.657vw, 40px);
}
.bf-deal {
    width: 100%;
    max-width: 1346px;
}
.bf-deal picture,
.bf-deal img {
    display: block;
    width: 100%;
    height: auto;
}
.bf-deal__link {
    display: block;
    border-radius: 3.5%/5%; /* roughly the card's own corners, for the focus ring */
    transition: transform 0.15s ease;
}
.bf-deal__link:hover {
    transform: translateY(-4px);
}
.bf-deal__link:focus-visible {
    outline: 3px solid var(--bf-ink);
    outline-offset: 4px;
}

/* --------------------------------------------------------------------------
   Countdown clock, the first item above the deal cards. Same layout as the
   old Weekly Deals clock (a yellow-edged dark box, one cell per unit) in this
   page's colours, matching the dark cards below it.
   Numbers: Work Sans Black, 30px -> 72px. Labels: 11px -> 18px.
   -------------------------------------------------------------------------- */
.bf-countdown {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
}
.bf-countdown[hidden] {
    display: none;
}
.bf-page .bf-countdown__label {
    margin: 0 0 clamp(8px, 5.40px + 0.663vw, 16px);
    font-family: inherit;
    font-size: clamp(15px, 10.12px + 1.243vw, 30px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--bf-ink);
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.bf-countdown__clock {
    display: inline-flex;
    padding: clamp(10px, 6.74px + 0.829vw, 20px) 0;
    border: clamp(2px, 1.35px + 0.166vw, 4px) solid var(--bf-yellow);
    border-radius: clamp(8px, 5.40px + 0.663vw, 16px);
    background: var(--bf-ink);
}
.bf-countdown__unit {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 0 clamp(14px, 5.53px + 2.154vw, 40px);
    border-right: 2px solid rgba(255, 229, 97, 0.5);
}
.bf-countdown__unit:last-child {
    border-right: 0;
}
.bf-countdown__num {
    font-size: clamp(30px, 16.33px + 3.480vw, 72px);
    font-weight: 900;
    line-height: 1;
    color: var(--bf-yellow);
    font-variant-numeric: tabular-nums; /* digits keep their width as they change */
}
.bf-countdown__name {
    margin-top: 0.4em;
    font-size: clamp(11px, 8.72px + 0.580vw, 18px);
    font-weight: 600;
    line-height: 1;
    color: var(--bf-yellow);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* --------------------------------------------------------------------------
   3. Sign-up block. Heading: Work Sans ExtraBold, 23.5px -> 80.5px, yellow.
   Sub text: Work Sans Regular, 13.75px -> 32.5px, white. Then a band-yellow
   button that opens the sign-up pop-out; the space below it matches above.
   -------------------------------------------------------------------------- */
.bf-signup {
    padding:
        clamp(40px, 18.67px + 5.427vw, 105.5px)
        clamp(24px, 12vw, 47px);
    background: var(--bf-grey);
    color: #ffffff;
    text-align: center;
}
.bf-page .bf-signup__heading {
    margin: 0 0 clamp(11px, 9.70px + 0.331vw, 15px);
    font-family: inherit;
    font-size: clamp(20px, 4.94px + 4.722vw, 80.5px);
    font-weight: 800;
    line-height: 1.2;
    color: var(--bf-yellow);
    text-wrap: balance;
}
.bf-page .bf-signup__subtext {
    margin: 0 0 clamp(25px, 19.14px + 1.491vw, 43px);
    font-family: inherit;
    font-size: clamp(13px, 7.64px + 1.553vw, 32.5px);
    font-weight: 400;
    line-height: 1.2;
    color: #ffffff;
    text-wrap: balance;
}
/* Button: 16px -> 26px text, sized like the rewards page's pop-out button. */
.bf-page .bf-signup__btn {
    display: inline-block;
    margin: 0;
    padding:
        clamp(14px, 11.40px + 0.663vw, 22px)
        clamp(32px, 21.58px + 2.651vw, 64px);
    border: 0;
    border-radius: 6px;
    background: var(--bf-yellow);
    color: var(--bf-ink);
    font-family: inherit;
    font-size: clamp(16px, 12.74px + 0.829vw, 26px);
    font-weight: 800;
    line-height: 1.2;
    cursor: pointer;
    transition: transform 0.2s, background-color 0.2s;
}
.bf-page .bf-signup__btn:hover {
    background: #f5d63a;
    transform: translateY(-2px);
}
.bf-page .bf-signup__btn:focus-visible {
    outline: 3px solid #ffffff;
    outline-offset: 4px;
}
