/**
 * Copyright (c) 2026 DNA Genics, S.L. All rights reserved.
 *
 * Shared editorial hero and mobile section navigation for regional ancestry products.
 */

.rph-hero {
    --rph-accent: #25a08f;
    --rph-accent-strong: #d4a017;
    --rph-background: #0d1a17;
    --rph-panel: #142822;
    --rph-text: #ffffff;
    --rph-muted: rgba(255, 255, 255, 0.72);
    --rph-line: rgba(255, 255, 255, 0.14);
    align-items: flex-start;
    background-color: var(--rph-background);
    box-sizing: border-box;
    color: var(--rph-text);
    display: flex;
    min-height: 100svh;
    overflow: hidden;
    padding: calc(var(--nav-height, 72px) + 42px) 0 82px;
    position: relative;
}

.rph-hero::before {
    background-color: var(--rph-accent);
    content: "";
    height: 5px;
    left: 0;
    position: absolute;
    top: var(--nav-height, 72px);
    width: clamp(90px, 16vw, 240px);
    /* Keep the accent bar above the optional full-bleed background layer below. */
    z-index: 1;
}

/* Optional full-bleed hero artwork (RegionalProductHeroModel.BackgroundImageUrl). Sits
   behind the copy/visual grid under a darkening overlay so headline text keeps contrast. */
.rph-hero__bg {
    inset: 0;
    position: absolute;
    z-index: 0;
}

.rph-hero__bg-image {
    display: block;
    height: 100%;
    object-fit: cover;
    object-position: center 35%;
    width: 100%;
}

.rph-hero__bg-overlay {
    background:
        radial-gradient(120% 90% at 18% 40%, rgba(6, 12, 10, 0.94) 0%, rgba(6, 12, 10, 0.74) 44%, rgba(6, 12, 10, 0.56) 100%),
        rgba(6, 12, 10, 0.32);
    inset: 0;
    position: absolute;
}

.rph-hero__grid {
    align-items: start;
    display: grid;
    gap: clamp(36px, 5vw, 72px);
    grid-template-columns: minmax(0, 1.04fr) minmax(0, 0.96fr);
    max-width: 1440px;
    padding-left: clamp(28px, 4vw, 64px);
    padding-right: clamp(28px, 4vw, 64px);
    position: relative;
    width: 100%;
    z-index: 2;
}

.rph-hero__copy {
    max-width: 720px;
    padding-top: 2px;
}

.rph-hero__badge {
    align-items: center;
    color: var(--rph-accent);
    display: inline-flex;
    font-size: 0.72rem;
    font-weight: 700;
    gap: 9px;
    letter-spacing: 0.17em;
    margin-bottom: 26px;
    text-transform: uppercase;
}

.rph-hero__badge .dna-icon {
    height: 17px;
    width: 17px;
}

.rph-hero__eyebrow {
    color: var(--rph-accent-strong) !important;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.25rem, 2.2vw, 1.75rem);
    font-style: italic;
    line-height: 1.35;
    margin: 0 0 12px;
}

.rph-hero__title {
    color: var(--rph-text);
    font-family: "Josefin Sans", "Cormorant Garamond", Georgia, serif;
    font-size: clamp(3rem, 3.8vw, 4.25rem);
    font-weight: 500;
    letter-spacing: -0.025em;
    line-height: 1.02;
    margin: 0 0 24px;
    max-width: 14ch;
    text-wrap: balance;
}

.rph-hero__lead {
    color: var(--rph-muted) !important;
    font-size: clamp(1rem, 1.5vw, 1.18rem);
    line-height: 1.75;
    margin: 0 0 28px;
    max-width: 620px;
}

.rph-hero__actions {
    align-items: center;
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-bottom: 26px;
}

.rph-button {
    align-items: center;
    border-radius: 3px;
    display: inline-flex;
    font-size: 0.9rem;
    font-weight: 700;
    gap: 9px;
    justify-content: center;
    letter-spacing: 0.015em;
    min-height: 48px;
    padding: 12px 17px;
    text-decoration: none;
    transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.rph-button .dna-icon {
    height: 17px;
    width: 17px;
}

.rph-button:hover,
.rph-button:focus {
    text-decoration: none;
    transform: translateY(-2px);
}

.rph-button:focus-visible {
    outline: 3px solid var(--rph-accent-strong);
    outline-offset: 3px;
}

.rph-button--primary {
    background-color: var(--rph-accent);
    border: 1px solid var(--rph-accent);
    color: var(--rph-background);
}

.rph-button--primary:hover,
.rph-button--primary:focus {
    background-color: var(--rph-text);
    border-color: var(--rph-text);
    color: var(--rph-background);
}

.rph-button--secondary {
    background-color: transparent;
    border: 1px solid var(--rph-line);
    color: var(--rph-text);
}

.rph-button--secondary:hover,
.rph-button--secondary:focus,
.rph-button--text:hover,
.rph-button--text:focus {
    background-color: var(--rph-panel);
    border-color: var(--rph-accent);
    color: var(--rph-text);
}

.rph-button--text {
    border: 1px solid var(--rph-line);
    color: var(--rph-muted);
}

/*
 * Inline "Preview a Live Demo Report" link used outside the hero section (e.g. Report Preview
 * chapter headers). Deliberately self-contained (currentColor only) rather than relying on the
 * --rph-* custom properties above, which are only defined within .rph-hero: this link is rendered
 * on both light-themed and dark-themed report-preview sections across the regional report pages.
 */
.rph-inline-demo {
    align-items: center;
    border: 1px solid currentColor;
    border-radius: 999px;
    display: inline-flex;
    font-size: 0.82rem;
    font-weight: 600;
    gap: 8px;
    margin-top: 14px;
    opacity: 0.85;
    padding: 8px 16px;
    text-decoration: none;
    transition: opacity 0.2s ease, transform 0.2s ease;
}

.rph-inline-demo .dna-icon {
    height: 15px;
    width: 15px;
}

.rph-inline-demo:hover,
.rph-inline-demo:focus {
    opacity: 1;
    text-decoration: none;
    transform: translateY(-1px);
}

@media print {
    .rph-inline-demo {
        display: none !important;
    }
}

.rph-hero__trust {
    display: flex;
    flex-wrap: wrap;
    gap: 13px 24px;
}

.rph-hero__trust > span {
    align-items: center;
    color: var(--rph-muted);
    display: inline-flex;
    font-size: 0.76rem;
    gap: 7px;
}

.rph-hero__trust .dna-icon {
    color: var(--rph-accent);
    height: 14px;
    width: 14px;
}

.rph-hero__visual {
    min-width: 0;
    padding-top: 72px;
    position: relative;
}

.rph-hero__figure {
    background-color: var(--rph-panel);
    border: 1px solid var(--rph-line);
    border-bottom: 0;
    margin: 0;
    min-height: 300px;
    overflow: hidden;
    position: relative;
}

.rph-hero__image {
    aspect-ratio: 16 / 9;
    display: block;
    height: auto;
    object-fit: cover;
    object-position: center;
    width: 100%;
}

.rph-hero__figure--image-unavailable {
    align-items: center;
    display: flex;
    justify-content: center;
}

.rph-hero__figure--image-unavailable::after {
    color: var(--rph-muted);
    content: "Regional report artwork";
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
}

.rph-hero__image-note {
    background-color: rgba(10, 15, 14, 0.92);
    color: rgba(255, 255, 255, 0.78);
    font-size: 0.67rem;
    line-height: 1.45;
    margin: 0;
    padding: 9px 12px;
    position: relative;
    z-index: 3;
}

.rph-hero__offer {
    background-color: var(--rph-panel);
    border-left: 4px solid var(--rph-accent);
    box-shadow: 0 18px 42px rgba(0, 0, 0, 0.28);
    margin: 0;
    padding: 22px 24px;
    position: relative;
    width: 100%;
    z-index: 4;
}

.rph-hero__stats {
    display: grid;
    gap: 0;
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.rph-hero__stat {
    border-right: 1px solid var(--rph-line);
    min-width: 0;
    padding: 0 14px;
}

.rph-hero__stat:first-child {
    padding-left: 0;
}

.rph-hero__stat:last-child {
    border-right: 0;
    padding-right: 0;
}

.rph-hero__stat strong {
    color: var(--rph-accent-strong);
    display: block;
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: clamp(1.25rem, 2vw, 1.7rem);
    font-weight: 600;
    line-height: 1.05;
}

.rph-hero__stat span {
    color: var(--rph-muted);
    display: block;
    font-size: 0.63rem;
    letter-spacing: 0.09em;
    line-height: 1.4;
    margin-top: 7px;
    text-transform: uppercase;
}

.rph-hero__price {
    align-items: flex-end;
    border-top: 1px solid var(--rph-line);
    display: flex;
    gap: 20px;
    justify-content: space-between;
    margin-top: 22px;
    padding-top: 18px;
}

.rph-hero__price-label,
.rph-hero__price-note {
    color: var(--rph-muted);
    display: block;
    font-size: 0.69rem;
    line-height: 1.45;
}

.rph-hero__price-label {
    color: var(--rph-text);
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.rph-hero__price-amount {
    color: var(--rph-accent-strong);
    font-family: "Cormorant Garamond", Georgia, serif;
    font-size: 2.35rem;
    font-weight: 700;
    line-height: 1;
    white-space: nowrap;
}

.rph-hero__scroll {
    align-items: center;
    bottom: 24px;
    color: var(--rph-muted);
    display: flex;
    flex-direction: column;
    font-size: 0.65rem;
    gap: 5px;
    left: 50%;
    letter-spacing: 0.13em;
    position: absolute;
    text-decoration: none;
    text-transform: uppercase;
    transform: translateX(-50%);
    z-index: 4;
}

.rph-hero__scroll:hover,
.rph-hero__scroll:focus {
    color: var(--rph-text);
    text-decoration: none;
}

.rph-hero__scroll .dna-icon {
    height: 14px;
    width: 14px;
}

.aam-regional-hero {
    --rph-accent: var(--aam-jade-light);
    --rph-accent-strong: var(--aam-gold);
    --rph-background: var(--aam-obsidian);
    --rph-panel: var(--aam-forest);
}

.ane-regional-hero {
    --rph-accent: var(--ane-primary-light);
    --rph-accent-strong: var(--ane-gold);
    --rph-background: var(--ane-deep);
    --rph-panel: var(--ane-sand);
}

.asa-regional-hero {
    --rph-accent: var(--asa-primary-light, #c9874f);
    --rph-accent-strong: var(--asa-gold, #d7b56d);
    --rph-background: var(--asa-deep, #1a0f0a);
    --rph-panel: var(--asa-sand, #291a12);
}

.aea-regional-hero {
    --rph-accent: var(--aea-primary-light, #c64f4f);
    --rph-accent-strong: var(--aea-gold, #d7b56d);
    --rph-background: var(--aea-deep, #160e12);
    --rph-panel: var(--aea-sand, #261820);
}

.aso-regional-hero {
    --rph-accent: var(--aso-primary-light);
    --rph-accent-strong: var(--aso-gold);
    --rph-background: var(--aso-deep);
    --rph-panel: var(--aso-sand);
}

.ssa-regional-hero {
    --rph-accent: var(--ssa-primary-light, #b77742);
    --rph-accent-strong: var(--ssa-gold, #d4a94f);
    --rph-background: var(--ssa-deep, #17100b);
    --rph-panel: var(--ssa-sand, #2a1c13);
}

.aca-regional-hero {
    --rph-accent: var(--aca-lapis-light);
    --rph-accent-strong: var(--aca-gold);
    --rph-background: var(--aca-deep);
    --rph-panel: var(--aca-warm);
}

.ait-regional-hero {
    --rph-accent: var(--ait-primary-light);
    --rph-accent-strong: var(--ait-accent);
    --rph-background: var(--ait-bg-dark);
    --rph-panel: var(--ait-bg-medium);
}

.asg-regional-hero {
    --rph-accent: var(--asg-teal-light);
    --rph-accent-strong: var(--asg-gold);
    --rph-background: var(--asg-deep);
    --rph-panel: var(--asg-warm);
}

.aeb-regional-hero,
.awe-regional-hero,
.ace-regional-hero,
.abe-regional-hero {
    --rph-accent: #4d9ac5;
    --rph-accent-strong: #c8a951;
    --rph-background: #0d1a2b;
    --rph-panel: #142236;
}

.bri-regional-hero {
    --rph-accent: var(--bri-primary-light);
    --rph-accent-strong: var(--bri-accent);
    --rph-background: var(--bri-bg-dark);
    --rph-panel: var(--bri-bg-medium);
}

.ibr-regional-hero {
    --rph-accent: var(--ibr-amber);
    --rph-accent-strong: var(--ibr-gold);
    --rph-background: var(--ibr-deep);
    --rph-panel: var(--ibr-terracotta);
}

.rph-mobile-nav {
    align-items: stretch;
    background-color: rgba(13, 18, 17, 0.94);
    border-top: 1px solid rgba(255, 255, 255, 0.16);
    bottom: 0;
    box-shadow: 0 -8px 28px rgba(0, 0, 0, 0.32);
    display: flex;
    gap: 2px;
    left: 0;
    overflow-x: auto;
    padding: 7px 8px calc(7px + env(safe-area-inset-bottom));
    position: fixed;
    right: 0;
    scrollbar-width: none;
    z-index: 1250;
}

.rph-mobile-nav::-webkit-scrollbar {
    display: none;
}

@supports (backdrop-filter: blur(12px)) {
    .rph-mobile-nav {
        backdrop-filter: blur(12px);
    }
}

.rph-mobile-nav__item {
    align-items: center;
    border-radius: 3px;
    color: rgba(255, 255, 255, 0.66);
    display: flex;
    flex: 0 0 78px;
    flex-direction: column;
    font-size: 0.63rem;
    font-weight: 700;
    gap: 4px;
    justify-content: center;
    min-height: 49px;
    padding: 5px 3px;
    text-align: center;
    text-decoration: none;
}

.rph-mobile-nav__item .dna-icon {
    height: 16px;
    width: 16px;
}

.rph-mobile-nav__item.active,
.rph-mobile-nav__item:hover,
.rph-mobile-nav__item:focus {
    background-color: rgba(255, 255, 255, 0.1);
    color: #ffffff;
    text-decoration: none;
}

.rph-mobile-nav__item:focus-visible {
    outline: 2px solid #ffffff;
    outline-offset: -2px;
}

@media (max-width: 1199px) {
    .rph-hero {
        min-height: auto;
        padding-top: calc(var(--nav-height, 72px) + 30px);
    }

    .rph-hero__grid {
        gap: 32px;
        grid-template-columns: minmax(0, 1.05fr) minmax(0, 0.95fr);
    }

    .rph-hero__title {
        font-size: 2.75rem;
        max-width: 13ch;
    }

    .rph-hero__lead {
        font-size: 1rem;
        line-height: 1.65;
    }

    .rph-hero__visual {
        padding-top: 62px;
    }

    .rph-button {
        font-size: 0.82rem;
        padding-left: 14px;
        padding-right: 14px;
    }
}

@media (max-width: 991px) {
    .rph-hero {
        padding-bottom: 76px;
    }

    .rph-hero__grid {
        gap: 42px;
        grid-template-columns: 1fr;
        max-width: 860px;
    }

    .rph-hero__copy {
        max-width: 780px;
    }

    .rph-hero__title {
        font-size: clamp(3rem, 7.2vw, 4rem);
        max-width: 15ch;
    }

    .rph-hero__visual {
        max-width: 780px;
        padding-top: 0;
        width: 100%;
    }

    .rph-button {
        font-size: 0.9rem;
        padding-left: 17px;
        padding-right: 17px;
    }
}

@media (max-width: 767px) {
    body:has(.rph-mobile-nav) main {
        padding-bottom: 72px;
    }

    .rph-hero {
        padding: calc(var(--nav-height-mobile, 64px) + 28px) 0 44px;
    }

    .rph-hero::before {
        top: var(--nav-height-mobile, 64px);
    }

    .rph-hero__scroll {
        display: none;
    }

    .rph-hero__grid {
        gap: 30px;
        padding-left: 20px;
        padding-right: 20px;
    }

    .rph-hero__badge {
        margin-bottom: 18px;
    }

    .rph-hero__eyebrow {
        font-size: 1.18rem;
    }

    .rph-hero__title {
        font-size: clamp(2.35rem, 10.5vw, 3rem);
        line-height: 1.04;
        max-width: none;
    }

    .rph-hero__actions {
        align-items: stretch;
        flex-direction: column;
    }

    .rph-button {
        width: 100%;
    }

    .rph-hero__trust {
        display: grid;
        gap: 10px;
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .rph-hero__figure {
        min-height: 210px;
    }

    .rph-hero__offer {
        padding: 18px;
    }

    .rph-hero__stats {
        gap: 0;
        grid-template-columns: 1fr;
    }

    .rph-hero__stat,
    .rph-hero__stat:first-child,
    .rph-hero__stat:last-child {
        align-items: baseline;
        border-bottom: 1px solid var(--rph-line);
        border-right: 0;
        display: flex;
        gap: 16px;
        justify-content: space-between;
        padding: 9px 0;
    }

    .rph-hero__stat:last-child {
        border-bottom: 0;
        border-right: 0;
    }

    .rph-hero__stat strong {
        font-size: 1.25rem;
    }

    .rph-hero__stat span {
        font-size: 0.55rem;
        letter-spacing: 0.06em;
        margin-top: 0;
        text-align: right;
    }

    .rph-hero__price {
        align-items: center;
    }

    .rph-hero__price-amount {
        font-size: 2rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .rph-button {
        transition: none;
    }
}

@media print {
    .rph-mobile-nav,
    .rph-hero__scroll {
        display: none !important;
    }

    .rph-hero {
        background: #ffffff !important;
        color: #111111 !important;
        min-height: auto;
        padding: 30px 0;
    }

    .rph-hero__grid {
        grid-template-columns: 1fr;
    }

    .rph-hero__title,
    .rph-hero__lead,
    .rph-hero__eyebrow {
        color: #111111 !important;
    }

    .rph-hero__image-note {
        background: #ffffff;
        color: #111111;
        position: static;
    }
}
