/* ============================================================
   Photo hero band
   The Our Story hero background (apiary photo under a warm brown
   scrim, grey Himalayan ridges along the bottom) reused on:
     - Shop / Products & Services  (woocommerce/archive-product.php)
     - Product detail              (woocommerce/single-product.php)
     - Learn With Us               (learn-with-us.php)
     - Learn article               (single-learn_with_us.php)
     - Photo Gallery               (gallery.php)
     - Contact Us                  (contact-page.php)
     - Blog post                   (single.php)
     - Cart, Checkout, My Account  (page.php)
   Markup: <section class="breadcrumb hbk-hero"> plus hbk_hero_ridges().
   Loaded by inc/page-hero.php.
   ============================================================ */

.hbk-hero {
    /* Colour of the front ridge: set to whatever sits directly below the
       band, so the mountains dissolve into the page. Default is the body
       background used by plain pages, posts, cart and account. */
    --hbk-hero-floor: #f9f9f9;

    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 500px;
    margin: 0;
    padding: 0;
    overflow: hidden;
    border-radius: 0;
    box-shadow: none;
    color: #fff;

    /* Same stack as .hbk-story-hero: photo, then the sunrise scrim. */
    background-color: #2a1309;
    background-image:
        linear-gradient(180deg, rgba(29, 14, 7, .90) 0%, rgba(48, 22, 10, .76) 22%, rgba(74, 34, 14, .58) 46%, rgba(90, 44, 18, .48) 62%, rgba(38, 18, 8, .72) 84%, rgba(26, 13, 6, .88) 100%),
        url("../images/our-story-hero.jpg");
    background-size: cover, cover;
    background-position: center center, center 55%;
    background-repeat: no-repeat;
}

/* Front ridge takes the colour of the section underneath. */
body.post-type-archive-product .hbk-hero,   /* .hbk-shop #f6f7f8 */
body.tax-product_cat .hbk-hero,
body.tax-product_tag .hbk-hero,
body.single-product .hbk-hero              { --hbk-hero-floor: #f6f7f8; }
body.page-template-learn-with-us .hbk-hero, /* .hbk-learn-page #f7f4e6 */
body.single-learn_with_us .hbk-hero        { --hbk-hero-floor: #f7f4e6; }
body.page-template-gallery .hbk-hero      { --hbk-hero-floor: #f2f2f2; }
body.page-template-contact-page .hbk-hero { --hbk-hero-floor: beige; }

/* The old per-page parallax photo is replaced by the shared background. */
.hbk-hero .parallax-image {
    display: none;
}

/* ---------- Ridges (same shapes and colours as /our-story/) ---------- */

.hbk-hero__ridges {
    position: absolute;
    left: 0;
    right: 0;
    bottom: -1px;
    width: 100%;
    height: 180px;
    pointer-events: none;
}

.hbk-hero__ridges .r0 { fill: #bab7b0; opacity: .5; }
.hbk-hero__ridges .r1 { fill: #7d7972; }
.hbk-hero__ridges .r2 { fill: var(--hbk-hero-floor); }
.hbk-hero__ridges .snow { fill: rgba(240, 238, 232, .85); }

/* Slight parallax as the page scrolls: --sy is the scroll offset, written by
   assets/js/page-hero.js. The far ridge moves most, the front one not at all,
   which is what makes the band feel like depth rather than a flat cut-out. */
.hbk-hero__ridges .r0 { transform: translateY(calc(var(--sy, 0) * .30px)); }
.hbk-hero__ridges .r1,
.hbk-hero__ridges .snow { transform: translateY(calc(var(--sy, 0) * .14px)); }

/* The page title keeps its position but gets a soft shadow so it reads
   against the photograph. */
.hbk-hero h2 {
    top: 50%;
    text-shadow: 0 2px 22px rgba(20, 11, 4, .45);
}

/* ---------- Small screens ---------- */

@media (max-width: 991px) {
    .hbk-hero {
        min-height: 380px;
    }

    .hbk-hero__ridges {
        height: 130px;
    }

    .hbk-hero h2 {
        top: 50%;
    }
}

@media (max-width: 575px) {
    .hbk-hero {
        min-height: 320px;
    }

    .hbk-hero__ridges {
        height: 100px;
    }
}

@media (prefers-reduced-motion: reduce) {
    .hbk-hero__ridges .r0,
    .hbk-hero__ridges .r1,
    .hbk-hero__ridges .snow {
        transform: none;
    }
}
