/**
 * Imágenes editoriales — fotografía documental, sin layout tipo plantilla.
 */

/* Compat: clase legacy sin textura (fondo Papel plano) */
.dwbi-hero-bg--textured {
    background: var(--bg-page);
    background-color: var(--bg-page);
}

/* Banda editorial contenida — una sola foto por página, integrada al flujo */
.lp-editorial-band {
    margin: 0 0 2.25rem;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid var(--hairline, #ECE6DF);
    background: var(--bg-card);
    max-height: 16rem;
}

.lp-editorial-band picture {
    display: block;
    width: 100%;
    height: 100%;
}

.lp-editorial-band img {
    display: block;
    width: 100%;
    height: 16rem;
    object-fit: cover;
    object-position: center;
    filter: saturate(0.88) contrast(1.04) brightness(0.98);
}

.lp-editorial-band--institutional {
    margin-top: -1rem;
    margin-bottom: 0;
    border-radius: 0;
    border-left: none;
    border-right: none;
    max-height: 13rem;
}

.lp-editorial-band--institutional img {
    height: 13rem;
    object-position: center 55%;
    filter: saturate(0.82) contrast(1.05) brightness(0.95);
}

@media (max-width: 768px) {
    .lp-editorial-band,
    .lp-editorial-band--institutional {
        max-height: 11rem;
    }

    .lp-editorial-band img,
    .lp-editorial-band--institutional img {
        height: 11rem;
    }
}

/* Inset lateral — acompaña el texto sin cortar el flujo entre secciones */
.lp-editorial-inset {
    margin: 0;
    margin-left: auto;
    max-width: 18rem;
    overflow: hidden;
    border-radius: 0.5rem;
    border: 1px solid var(--hairline, #E8E2D9);
    background: var(--bg-card, #FFFDF9);
}

.lp-editorial-inset picture {
    display: block;
    width: 100%;
}

.lp-editorial-inset img {
    display: block;
    width: 100%;
    height: 10.5rem;
    object-fit: cover;
    object-position: center 42%;
    filter: saturate(0.84) contrast(1.03) brightness(0.98);
}

.lp-hero--plain .lp-split--hero {
    align-items: center;
    gap: 2.5rem;
}

@media (max-width: 900px) {
    .lp-hero--plain .lp-editorial-inset:not(.lp-editorial-inset--hero) {
        display: none;
    }
}

/* Film de marca (home) — crossfade cinematográfico */
.lp-brand-film {
    max-width: 56rem;
    margin: 0 auto;
}

.lp-brand-film-stage {
    position: relative;
    border-radius: 0.75rem;
    overflow: hidden;
    background: #141414;
    aspect-ratio: 16 / 9;
    border: 1px solid var(--hairline, #ECE6DF);
}

.lp-brand-film-frame {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    margin: 0;
    opacity: 0;
    transform: scale(1.04);
    transition:
        opacity 0.85s cubic-bezier(0.4, 0, 0.2, 1),
        transform 3.2s ease-out;
    will-change: opacity, transform;
    pointer-events: none;
}

.lp-brand-film-frame > img,
picture.lp-brand-film-frame > img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.lp-brand-film-frame.is-active {
    opacity: 1;
    transform: scale(1);
    z-index: 1;
}

.lp-brand-film-frame.is-prev {
    opacity: 0;
    z-index: 0;
}

/* Frame final: logo centrado en eje X/Y del stage */
.lp-brand-film-end {
    display: block;
    background:
        radial-gradient(ellipse 65% 55% at 50% 50%, rgba(233, 78, 26, 0.06), transparent 68%),
        #F5F1EA;
    transform: none;
}

.lp-brand-film-end.is-active {
    transform: none;
}

.lp-brand-film-end-mark {
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    z-index: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    width: max-content;
    max-width: min(92%, 36rem);
    margin: 0;
    padding: 0;
}

/* Proporción web: icon 2.35 / wordmark 1.55 / gap 0.5 — centrados entre sí */
.lp-brand-film-logo.brand-logo {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: clamp(0.7rem, 1.6vw, 1.05rem);
    max-width: 100%;
    line-height: 0;
}

.lp-brand-film-logo .brand-logo__img {
    display: block;
    flex-shrink: 0;
}

.lp-brand-film-logo .brand-logo__img--icon-part {
    height: clamp(3.25rem, 7.2vw, 4.85rem);
    max-width: clamp(3.25rem, 7.2vw, 4.85rem);
    width: auto;
}

.lp-brand-film-logo .brand-logo__img--wordmark-part {
    height: clamp(2.15rem, 4.75vw, 3.2rem);
    max-width: min(100%, 22rem);
    width: auto;
}

.lp-brand-film-veil {
    position: absolute;
    inset: 0;
    background: linear-gradient(180deg, transparent 42%, rgba(20, 20, 20, 0.78) 100%);
    pointer-events: none;
    z-index: 2;
    transition: opacity 0.45s ease, background 0.45s ease;
}

/* En el frame del logo: velo solo bajo el pie de texto, sin tapar el centro */
.lp-brand-film-stage:has(.lp-brand-film-end.is-active) .lp-brand-film-veil {
    background: linear-gradient(180deg, transparent 68%, rgba(20, 20, 20, 0.55) 100%);
}

.lp-brand-film-captions {
    position: absolute;
    left: 1.25rem;
    right: 4.5rem;
    bottom: 1.25rem;
    z-index: 3;
    min-height: 2.5rem;
}

.lp-brand-film-caption {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    margin: 0;
    color: #fff;
    font-family: var(--font-titulares, Georgia, serif);
    font-size: clamp(1.15rem, 2.4vw, 1.65rem);
    font-weight: 600;
    line-height: 1.25;
    text-align: center;
    text-shadow: 0 2px 16px rgba(0, 0, 0, 0.35);
    opacity: 0;
    transform: translateY(0.55rem);
    transition:
        opacity 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.12s,
        transform 0.55s cubic-bezier(0.4, 0, 0.2, 1) 0.12s;
}

.lp-brand-film-caption.is-active {
    opacity: 1;
    transform: translateY(0);
}

.lp-brand-film-bar {
    display: none !important;
}

.lp-brand-film-note {
    margin: 1.15rem auto 0;
    max-width: 40rem;
    text-align: center;
    font-size: 0.9375rem;
    line-height: 1.7;
    color: var(--on-surface-variant);
}

.dwbi-section-intro--on-film {
    margin-bottom: 1.5rem;
}

.dwbi-section-intro--on-film p {
    margin-top: 0.85rem;
}

@media (prefers-reduced-motion: reduce) {
    .lp-brand-film-frame,
    .lp-brand-film-caption {
        transition: none;
        transform: none;
    }
}
