/* ================================================
   Page hero – full-width (Partners, Research, Careers, product-category, video)
   Shared frame + scrim with category heroes and products landing hero
   ================================================ */

.page-hero {
    margin: 0;
    border-radius: 0;
    overflow: hidden;
    background: #f5f5f5;
    position: relative;
    isolation: isolate;
}

/* One size spec for all hero image areas (16:9, capped height) */
.page-hero__image {
    width: 100%;
    aspect-ratio: 16 / 9;
    max-height: var(--lionex-page-hero-max-height);
    overflow: hidden;
    display: block;
    position: relative;
    background: #e8e8e8;
}

.page-hero__image::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: var(--lionex-hero-scrim);
}

/* Static hero photos (Careers, Research, category pages, etc.) */
.page-hero__image > img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Hero video — same framing as hero photos (avoid extra center-scale crop) */
.page-hero__image > video,
.page-hero__image > .page-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

.page-hero__content {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 24px 20px;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.55) 0%, rgba(0, 0, 0, 0.28) 55%, transparent 100%);
    z-index: 3;
}

.page-hero__content .page-hero__title,
.page-hero__content .page-hero__subtitle,
.page-hero__content span,
.page-hero__content em {
    color: #fff !important;
}

.page-hero__title {
    margin: 0 0 4px 0;
    font-weight: 700;
    color: #fff;
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

.page-hero .page-hero__subtitle {
    margin: 0;
    color: #fff;
    line-height: 1.5;
    text-shadow: 0 1px 2px rgba(0, 0, 0, 0.3);
}

/* Home: no frame around hero image */
.page-hero--home,
.page-hero--home .page-hero__image,
.page-hero--home .page-hero__image > img {
    border: 0;
    outline: none;
    box-shadow: none;
}

/* Home hero image carousel */
.page-hero__image--carousel {
    display: block;
    position: relative;
}

.page-hero__image--carousel .page-hero-carousel {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.page-hero-carousel__slides {
    position: absolute;
    inset: 0;
}

.page-hero-carousel__slide {
    position: absolute;
    inset: 0;
    opacity: 0;
    transition: opacity 0.9s ease;
    pointer-events: none;
}

.page-hero-carousel__slide.is-active {
    opacity: 1;
    pointer-events: auto;
    z-index: 1;
}

.page-hero-carousel__slide img,
.page-hero-carousel__img--deferred,
.page-hero-carousel__img--noscript {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

/* Per-slide object-position (e.g. careers hero: ~20% top crop on desktop at 1920px) */
.page-hero-carousel__slide--responsive-object-position .page-hero-carousel__img--deferred,
.page-hero-carousel__slide--responsive-object-position .page-hero-carousel__img--noscript,
.page-hero-carousel__slide--responsive-object-position > img {
    object-position: var(--hero-object-position, center center);
}

@media (min-width: 769px) {
    .page-hero-carousel__slide--responsive-object-position .page-hero-carousel__img--deferred,
    .page-hero-carousel__slide--responsive-object-position .page-hero-carousel__img--noscript,
    .page-hero-carousel__slide--responsive-object-position > img {
        object-position: var(--hero-object-position-desktop, center top);
    }
}

/* Home landing: avoid soft scaling on the primary hero photo */
.page-hero--home .page-hero-carousel__slide.is-active img {
    image-rendering: auto;
    -webkit-backface-visibility: hidden;
    backface-visibility: hidden;
}

.page-hero-carousel__slide .page-hero__video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: center center;
    display: block;
}

@media (prefers-reduced-motion: reduce) {
    .page-hero-carousel__slide {
        transition: none;
    }
}

/* Brand-filter overlay on page heroes (tokens in site-base.css) */
.page-hero--brand-filter .page-hero__image::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1; /* below bottom scrim (::before) */
    pointer-events: none;
    background: linear-gradient(
        155deg,
        var(--lionex-primary) 0%,
        var(--lionex-primary-soft) 42%,
        var(--lionex-accent) 100%
    );
    mix-blend-mode: color;
    opacity: 0.2;
}

.page-hero--brand-filter .page-hero__image > img {
    filter: brightness(1.32) saturate(1.2) hue-rotate(-22deg);
}

.page-hero--brand-filter .page-hero-carousel__slide img {
    filter: brightness(1.32) saturate(1.2) hue-rotate(-22deg);
}

/* Per-slide brand tint (e.g. careers photo on home carousel) */
.page-hero-carousel__slide--brand-filter::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    background: linear-gradient(
        135deg,
        rgba(255, 255, 255, 0.52) 0%,
        rgba(255, 255, 255, 0.2) 38%,
        transparent 68%
    );
}

.page-hero-carousel__slide--brand-filter::after {
    content: "";
    position: absolute;
    inset: 0;
    z-index: 1;
    pointer-events: none;
    background: linear-gradient(
        155deg,
        var(--lionex-primary) 0%,
        var(--lionex-primary-soft) 42%,
        var(--lionex-accent) 100%
    );
    mix-blend-mode: color;
    opacity: 0.14;
}

.page-hero-carousel__slide--brand-filter img,
.page-hero-carousel__slide--brand-filter .page-hero-carousel__img--deferred,
.page-hero-carousel__slide--brand-filter .page-hero-carousel__img--noscript {
    filter: brightness(1.52) saturate(1.2) hue-rotate(-22deg);
}
