/* Local hero transition previews. No visual change unless html[data-hero] is set. */

.hero-preview-bar {
    position: fixed;
    left: 16px;
    bottom: 16px;
    z-index: 9999;
    display: none;
    flex-wrap: wrap;
    gap: 6px;
    max-width: 420px;
    padding: 10px 12px;
    background: #fff;
    border: 1px solid #eadfce;
    border-radius: 12px;
    box-shadow: 0 10px 28px rgba(28, 25, 23, 0.16);
    font-family: Montserrat, Helvetica, Arial, sans-serif;
}

.hero-preview-bar.is-on {
    display: flex;
}

.hero-preview-bar span {
    flex: 1 0 100%;
    font-size: 11px;
    font-weight: 700;
    color: #78716c;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 2px;
}

.hero-preview-bar button {
    border: 1px solid #eadfce;
    background: #f7f3ec;
    color: #1c1917;
    font-size: 12px;
    font-weight: 700;
    padding: 6px 10px;
    border-radius: 8px;
    cursor: pointer;
}

.hero-preview-bar button.is-active {
    background: #c2410c;
    border-color: #c2410c;
    color: #fff;
}

.hero-portrait {
    display: none;
}

/* 1. Soft fade: photo itself dissolves into cream (no milky overlay) */
html[data-hero="fade"] .main-wrap {
    background-image: none !important;
    background-color: #f3eee6;
}

html[data-hero="fade"] .hero {
    position: relative;
    background: transparent;
    padding-bottom: 300px;
}

html[data-hero="fade"] .hero::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    background-color: #120e0c;
    background-image: url("../img/bg_hero.webp");
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
    -webkit-mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 58%,
        rgba(0, 0, 0, 0.97) 66%,
        rgba(0, 0, 0, 0.88) 73%,
        rgba(0, 0, 0, 0.7) 80%,
        rgba(0, 0, 0, 0.48) 86%,
        rgba(0, 0, 0, 0.26) 91%,
        rgba(0, 0, 0, 0.1) 95%,
        rgba(0, 0, 0, 0.03) 98%,
        transparent 100%
    );
    mask-image: linear-gradient(
        to bottom,
        #000 0%,
        #000 58%,
        rgba(0, 0, 0, 0.97) 66%,
        rgba(0, 0, 0, 0.88) 73%,
        rgba(0, 0, 0, 0.7) 80%,
        rgba(0, 0, 0, 0.48) 86%,
        rgba(0, 0, 0, 0.26) 91%,
        rgba(0, 0, 0, 0.1) 95%,
        rgba(0, 0, 0, 0.03) 98%,
        transparent 100%
    );
}

html[data-hero="fade"] .hero::after {
    display: none;
}

html[data-hero="fade"] .hero > * {
    position: relative;
    z-index: 5;
}

html[data-hero="fade"] .main {
    padding-top: 8px;
    margin-top: -48px;
    position: relative;
    z-index: 6;
    background: transparent;
}

@media (max-width: 767px) {
    html[data-hero="fade"] .hero {
        padding-bottom: 160px;
    }

    html[data-hero="fade"] .hero::before {
        background-image: url("../img/bg_hero-sm.webp");
    }
}

.no-webp html[data-hero="fade"] .hero::before {
    background-image: url("../img/bg_hero.jpg");
}

@media (max-width: 767px) {
    .no-webp html[data-hero="fade"] .hero::before {
        background-image: url("../img/bg_hero-sm.jpg");
    }
}

/* 2. Dark island: rounded card sitting on cream, no full-width black strip */
html[data-hero="card"] .main-wrap {
    background-image: none !important;
    background-color: #f3eee6;
}

html[data-hero="card"] .hero {
    margin: 12px 18px 8px;
    border-radius: 28px;
    overflow: hidden;
    background-color: #120e0c;
    background-image: url("../img/bg_hero.webp");
    background-repeat: no-repeat;
    background-position: 50% 0;
    background-size: cover;
    box-shadow: 0 18px 48px rgba(20, 18, 16, 0.28);
}

@media (max-width: 767px) {
    html[data-hero="card"] .hero {
        margin: 8px 10px;
        border-radius: 18px;
        background-image: url("../img/bg_hero-sm.webp");
    }
}

.no-webp html[data-hero="card"] .hero {
    background-image: url("../img/bg_hero.jpg");
}

@media (max-width: 767px) {
    .no-webp html[data-hero="card"] .hero {
        background-image: url("../img/bg_hero-sm.jpg");
    }
}

/* 3. Cutout: cream page, original portrait faded onto the right */
html[data-hero="cutout"] .main-wrap {
    background-image: none !important;
    background-color: #f3eee6;
}

html[data-hero="cutout"] .hero {
    position: relative;
    overflow: visible;
    background: linear-gradient(
        105deg,
        #1a1210 0%,
        #241814 38%,
        rgba(36, 24, 20, 0.35) 62%,
        transparent 78%
    );
    min-height: 520px;
}

html[data-hero="cutout"] .hero-portrait {
    display: block;
    position: absolute;
    right: -2%;
    top: -8%;
    width: min(52vw, 640px);
    height: 118%;
    background: url("../img/hero-portrait.webp") right center / contain no-repeat;
    pointer-events: none;
    z-index: 1;
}

html[data-hero="cutout"] .hero__main {
    position: relative;
    z-index: 2;
}

html[data-hero="cutout"] .hero-title,
html[data-hero="cutout"] .hero-title__main,
html[data-hero="cutout"] .hero-title__blur {
    color: #ff1a1f;
}

@media (max-width: 900px) {
    html[data-hero="cutout"] .hero-portrait {
        width: min(58vw, 420px);
        opacity: 0.7;
    }
}

@media (max-width: 767px) {
    html[data-hero="cutout"] .hero {
        min-height: 0;
        background: linear-gradient(180deg, #1a1210 0%, #241814 70%, #f3eee6 100%);
    }

    html[data-hero="cutout"] .hero-portrait {
        display: none;
    }
}
