/* ============================================================
   HEIRLOOM GOLD — include/homeHero.css
   The homepage banner carousel (include/homeHero.inc), edited in
   the back office at finmixback/homeHero.php. Mobile first.
   Loaded by index.php after homepage.css, whose .hp-hero rules
   it builds on.
   ============================================================ */

/* ── BANNER CAROUSEL ─────────────────────────────────────── */
.hp-hero--carousel { display: block; }
.hp-hero--carousel::after { display: none; }          /* each pane has its own shade */
/* The grain overlay would have to sit above the panes, and there it greys
   the whole banner out, so the carousel goes without it. */
.hp-hero--carousel::before { display: none; }
.hp-hero--carousel .hp-scroll-hint { display: none; }

.hp-hero-slides { position: absolute; inset: 0; }
.hp-hero-slide {
    position:        absolute;
    inset:           0;
    display:         flex;
    align-items:     center;
    justify-content: center;
    padding:         0 0 72px;                       /* room for the controls */
    opacity:         0;
    visibility:      hidden;
    transition:      opacity 1.1s ease, visibility 0s linear 1.1s;
}
.hp-hero-slide.is-active {
    opacity:    1;
    visibility: visible;
    transition: opacity 1.1s ease, visibility 0s;
}
.hp-hero-slide picture { position: absolute; inset: 0; }
.hp-hero-slide::after {
    content:    '';
    position:   absolute;
    inset:      0;
    z-index:    2;
    background: linear-gradient(to bottom, rgba(0,0,0,.1) 0%, rgba(0,0,0,0) 40%, rgba(0,0,0,.55) 100%);
    pointer-events: none;
}
/* Per-pane focus point (back office: "Keep in view"). */
.hp-hero-slide .hp-hero-img { object-position: var(--hh-focus, 50% 40%); }
@media (max-width: 767px) {
    .hp-hero-slide .hp-hero-img { object-position: var(--hh-focus-m, var(--hh-focus, 50% 40%)); }
}
/* The shade over the picture (back office: "Shade over the picture").
   1 Light:  for a photo that is already dark, like the Christmas tree.
   2 Medium: the usual homepage banner (homepage.css dims the photo).
   3 Dark:   for a pale or busy photo. */
.hp-hero-slide--shade1::after {
    background:
        radial-gradient(ellipse at 50% 45%, rgba(20,19,15,.25) 0%, rgba(20,19,15,.0) 60%),
        linear-gradient(to bottom, rgba(20,19,15,.35) 0%, rgba(20,19,15,.15) 40%, rgba(20,19,15,.75) 100%);
}
.hp-hero-slide--shade1 .hp-hero-img { filter: brightness(.9) contrast(1.05); }
.hp-hero-slide--shade3 .hp-hero-img { filter: brightness(.42) contrast(1.1) saturate(.9); }
.hp-hero-slide--shade3::after {
    background: linear-gradient(to bottom, rgba(20,19,15,.35) 0%, rgba(20,19,15,.2) 40%, rgba(20,19,15,.7) 100%);
}

/* A single pane: no controls, so no room kept for them. */
.hp-hero--single .hp-hero-slide { padding-bottom: 0; }

.hp-hero-slide .hp-hero-content { animation: none; opacity: 0; }
.hp-hero-slide.is-active .hp-hero-content { animation: heroFade 1.2s ease both; animation-delay: .25s; }

.hp-hero-fx {
    position: absolute;
    inset:    0;
    width:    100%;
    height:   100%;
    z-index:  2;
    pointer-events: none;
}
.hp-xstar {
    display:   inline-block;
    font-size: 9px;
    color:     #e8c77a;
    transform: translateY(-1px);
    margin:    0 .4em;
}

/* Controls: thin gold bars, centred at the foot. */
.hp-hero-nav {
    position:        absolute;
    left:            0;
    right:           0;
    bottom:          22px;
    z-index:         5;
    display:         flex;
    align-items:     center;
    justify-content: center;
    gap:             8px;
}
.hp-hero-dots { display: flex; align-items: center; gap: 2px; }
.hp-hero-dot,
.hp-hero-pause,
.hp-hero-arrow {
    appearance:  none;
    background:  none;
    border:      0;
    cursor:      pointer;
    color:       rgba(239,225,190,.85);
    min-width:   44px;
    min-height:  44px;
    display:     inline-flex;
    align-items: center;
    justify-content: center;
}
.hp-hero-dot i {
    display:    block;
    width:      28px;
    height:     2px;
    background: rgba(239,225,190,.35);
    transition: background .3s, width .3s;
}
.hp-hero-dot.is-active i { width: 40px; background: #cfaa5c; }
.hp-hero-dot:hover i     { background: rgba(239,225,190,.7); }
.hp-hero-arrow { font-size: 28px; line-height: 1; font-family: var(--ff-display); }
.hp-hero-arrow:hover,
.hp-hero-pause:hover { color: #cfaa5c; }
.hp-hero-pause i {
    width: 9px; height: 10px;
    border-left: 2px solid currentColor; border-right: 2px solid currentColor;
}
.hp-hero--carousel.is-paused .hp-hero-pause i {
    width: 0; height: 0; border-right: 0;
    border-left: 9px solid currentColor;
    border-top: 5px solid transparent; border-bottom: 5px solid transparent;
}
.hp-hero-dot:focus-visible,
.hp-hero-pause:focus-visible,
.hp-hero-arrow:focus-visible { outline: 1px solid #cfaa5c; outline-offset: -6px; }

@media (prefers-reduced-motion: reduce) {
    .hp-hero-slide, .hp-hero-slide.is-active { transition: none; }
    .hp-hero-slide.is-active .hp-hero-content { animation: none; opacity: 1; }
}
