:root {
    --landing-night: #0b1124;
    --landing-blue: rgba(24, 57, 107, .55);
    --section-glow: rgba(24, 57, 107, .2);
    color-scheme: dark;
    font-family: 'Montserrat', Arial, sans-serif;
    -webkit-font-smoothing: antialiased;
    text-rendering: optimizeLegibility;
}

*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: auto; }

body {
    min-width: 320px;
    margin: 0;
    background: var(--landing-night);
    color: #f4f0eb;
}

img { display: block; max-width: 100%; }

/* Ambas secciones descansan sobre un único tono de fondo. */
.landing { background: var(--landing-night); }

.visually-hidden {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

:focus-visible {
    outline: 2px solid #e8dccd;
    outline-offset: 5px;
}

.site-header {
    position: absolute;
    z-index: 5;
    top: 6.4vh;
    left: 2.5vw;
    pointer-events: none;
}

/* Se usa el PNG oficial completo, con su transparencia y proporciones intactas. */
.hero-logo {
    width: min(28.2vw, 550px);
    height: auto;
}

/* Menú de líneas: el monograma oficial queda libre en la esquina. */
.site-nav {
    position: fixed;
    z-index: 90;
    top: 8px;
    right: 10px;
    width: min(298px, calc(100vw - 20px));
    pointer-events: auto;
}
.site-nav__toggle {
    display: flex;
    width: max-content;
    min-height: 50px;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    margin-left: auto;
    padding: 4px 10px;
    border: 1px solid transparent;
    border-radius: 999px;
    background: transparent;
    box-shadow: none;
    color: #e8dccd;
    font: inherit;
    font-size: 11px;
    font-weight: 600;
    letter-spacing: .16em;
    cursor: pointer;
    text-shadow: 0 1px 8px rgba(2, 11, 27, .8);
    transition: background-color .28s ease, border-color .28s ease, box-shadow .28s ease;
}
.site-nav--scrolled .site-nav__toggle {
    background: rgba(7, 19, 39, .52);
    border-color: rgba(232, 220, 205, .27);
    box-shadow: 0 6px 22px rgba(0, 0, 0, .17);
    backdrop-filter: blur(12px) saturate(1.15);
    -webkit-backdrop-filter: blur(12px) saturate(1.15);
}
.site-nav__bars { display: flex; width: 17px; flex-direction: column; gap: 5px; }
.site-nav__bars i { display: block; width: 17px; height: 1px; background: currentColor; }
.site-nav__thread {
    position: absolute;
    top: 49px;
    right: 13px;
    width: 1px;
    height: min(414px, calc(100svh - 66px));
    background: linear-gradient(#e6d5b9, rgba(230, 213, 185, .72) 80%, transparent);
    transform: scaleY(0);
    transform-origin: top center;
    pointer-events: none;
}
.site-nav__panel {
    position: absolute;
    top: 49px;
    right: 0;
    width: 100%;
    max-height: calc(100svh - 60px);
    padding: 20px 0 8px;
    overflow-y: auto;
    overflow-x: hidden;
    background: transparent;
    scrollbar-width: none;
}
.site-nav__panel::-webkit-scrollbar { display: none; }
.site-nav__panel[hidden] { display: none !important; }
.site-nav__links { display: flex; flex-direction: column; align-items: stretch; }
.site-nav__links a {
    display: flex;
    min-height: 45px;
    align-items: center;
    justify-content: flex-end;
    gap: 12px;
    padding: 5px 13px 5px 0;
    color: #f4f0eb;
    font-size: 11px;
    font-weight: 500;
    letter-spacing: .12em;
    line-height: 1.35;
    text-align: right;
    text-decoration: none;
}
.site-nav__label { text-shadow: 0 1px 6px #061426, 0 2px 13px #061426; }
.site-nav__branch {
    display: block;
    flex: 0 0 31px;
    height: 1px;
    background: rgba(232, 220, 205, .8);
    transform: scaleX(0);
    transform-origin: right center;
    box-shadow: 0 0 8px rgba(232, 220, 205, .35);
}
.site-nav__links a:hover, .site-nav__links a:focus-visible { color: #dfc9a4; }
.site-nav__links a:hover .site-nav__branch,
.site-nav__links a:focus-visible .site-nav__branch { background: #dfc9a4; }

@media (max-width: 620px) {
    .site-nav { top: 6px; right: 6px; }
    .site-nav__toggle { min-height: 46px; gap: 8px; font-size: 10px; }
    .site-nav__thread, .site-nav__panel { top: 46px; }
    .site-nav__thread { right: 12px; }
    .site-nav__links a { min-height: 40px; font-size: 10px; }
}

.hero {
    position: relative;
    min-height: 620px;
    min-height: max(620px, 100svh);
    overflow: hidden;
    isolation: isolate;
    background: var(--landing-night);
}

/* La bruma termina sobre el mismo tono con el que empieza la trayectoria. */
.hero::after,
.ministry::before,
.ministry::after,
.vision::before,
.vision::after,
.commitment::before {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    z-index: 0;
    height: min(30vw, 320px);
    pointer-events: none;
}

.hero::after,
.ministry::after,
.vision::after {
    bottom: 0;
    background: radial-gradient(ellipse 85% 115% at 50% 100%, var(--section-glow), transparent 84%);
}

.ministry::before,
.vision::before,
.commitment::before {
    top: 0;
    background: radial-gradient(ellipse 85% 115% at 50% 0%, var(--section-glow), transparent 84%);
}

.hero__scene,
.hero__photo,
.hero__shade,
.hero__blue-wash {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
}

.hero__scene { z-index: -1; overflow: hidden; }

.hero__photo {
    object-fit: cover;
    object-position: center center;
    -webkit-mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
    mask-image: linear-gradient(180deg, #000 0%, #000 62%, transparent 100%);
}

.hero__shade {
    background:
        linear-gradient(180deg, transparent 0%, transparent 88%, var(--landing-night) 100%),
        linear-gradient(90deg, rgba(3, 12, 29, .26), transparent 38%, rgba(3, 12, 29, .1)),
        linear-gradient(180deg, rgba(1, 8, 22, .09) 0%, transparent 36%, rgba(2, 10, 27, .24) 56%, rgba(2, 11, 28, .82) 83%, var(--landing-night) 100%);
}

/* Bruma azul que ScrollTrigger revela al bajar, como en el boceto. */
.hero__blue-wash {
    opacity: 0;
    background: linear-gradient(180deg, transparent 24%, rgba(20, 65, 126, .23) 62%, var(--landing-blue) 100%);
    pointer-events: none;
    will-change: opacity;
}

.hero-logo,
.hero-name__word,
.hero-subtitle,
.hero-content {
    will-change: opacity, filter;
}

.hero__content {
    position: absolute;
    z-index: 2;
    right: clamp(1.5rem, 5.6vw, 7rem);
    bottom: clamp(2.75rem, 6.4vh, 5rem);
    width: min(52vw, 980px);
    text-align: right;
}

.hero__name {
    margin: 0 0 .35rem;
    color: #d3b15e;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(2rem, 4vw, 4.3rem);
    font-weight: 600;
    letter-spacing: .018em;
    line-height: 1.12;
    text-shadow: 0 2px 16px rgba(0, 0, 0, .18);
    white-space: nowrap;
}

.hero-name__word { display: inline-block; }

.hero__eyebrow {
    margin: 0 0 clamp(1.5rem, 4.2vh, 3.5rem);
    font-size: clamp(.73rem, 1vw, 1.1rem);
    font-weight: 800;
    letter-spacing: .13em;
    line-height: 1.6;
    text-shadow: 0 2px 15px rgba(0, 0, 0, .35);
}

.hero__title-frame {
    margin-left: auto;
    padding: clamp(.65rem, 1.05vw, 1rem) clamp(.65rem, 1vw, 1rem);
    border: 1px solid rgba(244, 239, 234, .82);
    background: rgba(2, 13, 35, .16);
    transition: box-shadow .4s ease, border-color .4s ease, background-color .4s ease;
}

.eslogan-box:hover {
    border-color: rgba(255, 255, 255, .9);
    background-color: rgba(255, 255, 255, .08);
    box-shadow: 0 0 20px rgba(255, 255, 255, .25);
}

.hero h1 {
    margin: 0;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(.68rem, 1vw, 1.05rem);
    font-weight: 500;
    letter-spacing: .09em;
    line-height: 1.15;
    text-align: center;
    white-space: nowrap;
}

.hero__scroll-cue {
    position: absolute;
    z-index: 2;
    bottom: clamp(4.25rem, 8vh, 6.5rem);
    left: clamp(1.5rem, 7.6vw, 9rem);
    display: inline-block;
    color: rgba(243, 238, 231, .83);
    font-size: .61rem;
    font-weight: 700;
    letter-spacing: .18em;
    text-decoration: none;
    writing-mode: vertical-rl;
}

/* La misma bruma azul del hero continúa bajo los cuatro bloques. */
.scroll-end {
    position: relative;
    background: var(--landing-night);
}

.scroll-end__wash {
    position: absolute;
    inset: 0;
    opacity: 0;
    background: linear-gradient(180deg, var(--landing-blue) 0%, rgba(14, 36, 76, .2) 18%, transparent 46%);
    pointer-events: none;
    will-change: opacity;
}

/* Composición de tres columnas calcada a las posiciones del boceto de escritorio. */
.ministry {
    overflow: hidden;
    isolation: isolate;
}

.ministry__stage {
    position: relative;
    z-index: 1;
    min-height: max(760px, 61.5vw);
    width: 100%;
}

.ministry__chapter { position: absolute; }

.ministry__chapter--one {
    top: 12.92vw;
    left: 0;
    width: 30vw;
}

.ministry__chapter--two {
    top: 0;
    left: 34.43vw;
    width: 30.75vw;
}

.ministry__chapter--three {
    top: 33.4vw;
    left: 35.1vw;
    width: 30.05vw;
}

.ministry__chapter--four {
    top: 31.1vw;
    left: 69.9vw;
    width: 30.1vw;
}

.ministry__line {
    display: block;
    height: 1px;
    background: #b89a53;
    transform-origin: left center;
    will-change: transform;
}

.ministry__copy {
    color: #f0eef0;
    font-size: clamp(.76rem, 1vw, 1rem);
    font-weight: 400;
    letter-spacing: .012em;
    line-height: 1.24;
    will-change: opacity, filter;
}

.ministry__copy p { margin: 0; }
.ministry__copy p + p { margin-top: 1.25em; }
.ministry__copy em { font-style: italic; }
.ministry__copy strong { font-weight: 700; }

.ministry__photo {
    object-fit: cover;
    object-position: center;
    will-change: opacity, filter;
}

.ministry__chapter--one .ministry__line { margin: 0 .2vw .9vw .3vw; }
.ministry__chapter--one .ministry__copy { margin-left: 4.05vw; }
.ministry__photo--children {
    width: calc(100% - 4.05vw);
    height: 12.8vw;
    margin-top: 2.1vw;
    margin-left: 4.05vw;
}

.ministry__photo--community {
    width: calc(100% - 3.3vw);
    height: 12.92vw;
    margin-left: 3.3vw;
}
.ministry__chapter--two .ministry__line { margin-top: 2.2vw; }
.ministry__chapter--two .ministry__copy {
    margin-top: 1vw;
    margin-left: 3.3vw;
    text-align: justify;
}

.ministry__chapter--three .ministry__copy {
    margin-top: 1.55vw;
    margin-left: 6.65vw;
    text-align: right;
}
.ministry__photo--encounter {
    width: calc(100% - 3.4vw);
    height: 14.43vw;
    margin-top: 1.9vw;
    margin-left: 3.4vw;
}

.ministry__chapter--four .ministry__copy {
    width: 18.6vw;
    margin-right: 3.2vw;
    margin-left: auto;
    text-align: right;
}
.ministry__chapter--four .ministry__line { margin-top: 1.7vw; }

@media (max-width: 1100px) {
    .ministry__stage {
        display: grid;
        grid-template-columns: repeat(2, minmax(0, 1fr));
        align-items: start;
        gap: clamp(3rem, 7vw, 5rem) 5vw;
        min-height: 0;
        padding: 5rem 5vw 6rem;
    }
    .ministry__chapter {
        position: static;
        width: auto;
    }
    .ministry__chapter--one .ministry__line,
    .ministry__chapter--two .ministry__line,
    .ministry__chapter--four .ministry__line { margin: 0 0 1.2rem; }
    .ministry__copy { font-size: clamp(.83rem, 1.4vw, 1rem); line-height: 1.4; }
    .ministry__chapter--one .ministry__copy,
    .ministry__chapter--two .ministry__copy,
    .ministry__chapter--three .ministry__copy,
    .ministry__chapter--four .ministry__copy {
        width: auto;
        margin: 0;
        text-align: left;
    }
    .ministry__photo--children,
    .ministry__photo--community,
    .ministry__photo--encounter {
        width: 100%;
        height: auto;
        aspect-ratio: 2 / 1;
        margin: 1.5rem 0 0;
    }
    .ministry__photo--community { margin: 0 0 1.5rem; }
    .ministry__chapter--three .ministry__line { margin-bottom: 1.2rem; }
    .ministry__chapter--four .ministry__line { margin: 1.5rem 0 0; }
}

@media (max-width: 680px) {
    .ministry__stage {
        display: flex;
        flex-direction: column;
        gap: 3.5rem;
        padding: 3.5rem 1.2rem 5rem;
    }
    .ministry__chapter { width: 100%; }
    .ministry__copy { font-size: .9rem; }
}

@media (min-width: 621px) and (max-width: 940px) {
    .hero__name {
        font-size: clamp(1.5rem, 4vw, 2rem);
        white-space: normal;
    }
    .hero h1 {
        font-size: clamp(.72rem, 1.3vw, .9rem);
        line-height: 1.45;
        white-space: normal;
    }
}

@media (max-width: 620px) {
    .site-header { top: .6rem; left: -.5rem; }
    .hero-logo { width: 185px; }
    .hero { min-height: 100svh; }
    .hero__photo { object-position: 49% center; }
    .hero__shade {
        background: linear-gradient(180deg, rgba(1, 8, 21, .1), transparent 30%, rgba(1, 9, 24, .23) 45%, rgba(2, 11, 28, .86) 75%, var(--landing-night) 100%);
    }
    .hero__content {
        right: 1.2rem;
        bottom: 5.6rem;
        left: 1.2rem;
        width: auto;
    }
    .hero__name {
        font-size: clamp(1.2rem, 5.5vw, 2rem);
        letter-spacing: .005em;
        white-space: normal;
    }
    .hero__eyebrow {
        margin-bottom: 1.2rem;
        font-size: .67rem;
        letter-spacing: .08em;
    }
    .hero__title-frame { padding: .85rem .9rem; }
    .hero h1 { font-size: clamp(.66rem, 2.55vw, .8rem); letter-spacing: .04em; line-height: 1.5; white-space: normal; }
    .hero__scroll-cue { bottom: 2rem; left: .55rem; font-size: .51rem; }
}

/* Visión de vida y legado: fondo compartido y posiciones del boceto. */
.vision {
    position: relative;
    min-height: max(720px, 55.46vw);
    overflow: hidden;
    isolation: isolate;
    background: var(--landing-night);
}

.vision__texture {
    position: absolute;
    inset: 0;
    z-index: -1;
    background: url('../images/vision-texture.png') center / cover no-repeat;
    opacity: .18;
    -webkit-mask-image: radial-gradient(ellipse 85% 82% at 35% 50%, #000 16%, transparent 100%);
    mask-image: radial-gradient(ellipse 85% 82% at 35% 50%, #000 16%, transparent 100%);
    pointer-events: none;
}

.vision__intro {
    position: absolute;
    top: 6%;
    left: 4.1%;
    z-index: 1;
    width: 58%;
}

.vision__title {
    margin: 0;
    color: #f9f3f2;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(3.4rem, 6.8vw, 6.8rem);
    font-weight: 600;
    letter-spacing: -.035em;
    line-height: 1.04;
}

.vision__title-line { display: block; white-space: nowrap; }

.vision-word {
    display: inline-block;
    white-space: nowrap;
    will-change: opacity, filter;
}

.vision__cards {
    position: absolute;
    top: 20.95%;
    left: 46.8%;
    z-index: 1;
    display: grid;
    width: 47.6%;
    gap: 2.25vw;
}

.vision-card {
    position: relative;
    display: grid;
    grid-template-columns: 3.6vw minmax(0, 1fr);
    align-items: center;
    column-gap: 3vw;
    height: 8vw;
    padding: 0 2.2vw;
    overflow: hidden;
    border: 1px solid transparent;
    border-radius: 2.2vw;
    color: #0c1124;
    transform-origin: left center;
    will-change: transform, opacity, background-color, backdrop-filter;
}

.vision-card--light { background: #f9f3f2; }
.vision-card--sand { background: #e8dbcb; }

.vision-card__shine {
    position: absolute;
    inset: 0;
    z-index: 2;
    border-radius: inherit;
    background: linear-gradient(115deg, rgba(255, 255, 255, .56), rgba(255, 255, 255, .14) 32%, transparent 64%);
    opacity: 0;
    pointer-events: none;
}

.vision-card__icon {
    position: relative;
    z-index: 3;
    width: 3.6vw;
    height: 3.1vw;
    object-fit: contain;
    will-change: opacity, filter;
}

.vision-card__text {
    position: relative;
    z-index: 3;
    margin: 0;
    font-size: clamp(.84rem, 1.13vw, 1.12rem);
    font-weight: 400;
    letter-spacing: .015em;
    line-height: 1.2;
}

.vision__spark {
    position: absolute;
    top: -12px;
    left: -12px;
    z-index: 5;
    width: 24px;
    height: 24px;
    color: transparent;
    font-size: 0;
    background: radial-gradient(circle, #fff 0 12%, #f9f3f2 20%, rgba(255, 255, 255, .65) 34%, transparent 72%);
    filter: drop-shadow(0 0 6px #fff) drop-shadow(0 0 15px rgba(255, 255, 255, .9));
    opacity: 0;
    pointer-events: none;
    will-change: transform, opacity;
}

.vision__spark::before,
.vision__spark::after {
    content: '';
    position: absolute;
    inset: -5px;
    background: linear-gradient(90deg, transparent 4%, #fff 50%, transparent 96%);
    clip-path: polygon(50% 0, 54% 43%, 100% 50%, 54% 57%, 50% 100%, 46% 57%, 0 50%, 46% 43%);
}

.vision__spark::after { transform: rotate(90deg); }

.vision__trail {
    position: absolute;
    top: -12px;
    left: -12px;
    z-index: 4;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .9), rgba(255, 255, 255, .42) 28%, transparent 72%);
    filter: blur(3px);
    pointer-events: none;
    will-change: transform, opacity;
}

@media (max-width: 1100px) {
    .vision {
        min-height: 0;
        padding: 4.5rem 5vw 6rem;
    }
    .vision__intro,
    .vision__cards {
        position: relative;
        top: auto;
        left: auto;
        width: auto;
    }
    .vision__intro { width: 100%; }
    .vision__title { font-size: clamp(3rem, 7.2vw, 5.5rem); }
    .vision__cards {
        max-width: 760px;
        gap: 1.3rem;
        margin: 4rem 0 0 auto;
    }
    .vision-card {
        grid-template-columns: 52px minmax(0, 1fr);
        column-gap: 1.7rem;
        min-height: 112px;
        height: auto;
        padding: 1.25rem 1.7rem;
        border-radius: 2rem;
    }
    .vision-card__icon { width: 52px; height: 48px; }
    .vision-card__text { font-size: .96rem; }
}

@media (max-width: 620px) {
    .vision { padding: 3.5rem 1.2rem 4.5rem; }
    .vision__title { font-size: clamp(2.35rem, 9.4vw, 4rem); }
    .vision__title-line { white-space: normal; }
    .vision__cards { margin-top: 3rem; }
    .vision-card {
        grid-template-columns: 42px minmax(0, 1fr);
        column-gap: 1rem;
        min-height: 0;
        padding: 1.15rem 1rem;
        border-radius: 1.45rem;
    }
    .vision-card__icon { width: 42px; height: 42px; }
    .vision-card__text { font-size: .84rem; line-height: 1.35; }
}

/* Compromiso: la misma noche continúa desde Visión, sin un panel nuevo. */
.commitment {
    --commitment-fade-space: clamp(11rem, 17vw, 15rem);
    position: relative;
    isolation: isolate;
    overflow: hidden;
    min-height: 710px;
    padding: 2.7rem 5.7vw 4rem;
    padding-bottom: var(--commitment-fade-space);
    background: var(--landing-night);
}

/* El resplandor comienza después de las fotos y se disuelve en la noche. */
.commitment::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 0;
    height: var(--commitment-fade-space);
    background: linear-gradient(180deg,
        transparent 0%,
        rgba(24, 57, 107, .18) 35%,
        rgba(16, 37, 78, .1) 64%,
        var(--landing-night) 100%);
    pointer-events: none;
}

.commitment__heading {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 48% 52%;
    align-items: end;
    min-height: 194px;
    margin-bottom: 1.75rem;
}

.commitment__title {
    margin: 0;
    color: #c9a962;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(3.2rem, 5.5vw, 5.2rem);
    font-weight: 600;
    letter-spacing: -.04em;
    line-height: 1.02;
}

.commitment__copy {
    max-width: 620px;
    margin: 0 0 .15rem;
    color: #f4f0eb;
    font-size: clamp(.83rem, 1.17vw, 1rem);
    font-weight: 400;
    letter-spacing: .012em;
    line-height: 1.55;
}

.commitment__copy strong { font-weight: 700; }
.commitment__word { display: inline-block; white-space: nowrap; will-change: opacity, filter; }

.commitment__gallery {
    position: relative;
    z-index: 2;
    display: grid;
    grid-template-columns: 1.64fr .92fr 1fr 1fr;
    grid-template-rows: 59% 38%;
    gap: 14px;
    width: 100%;
    height: clamp(355px, 31.3vw, 460px);
}

.commitment__frame {
    min-width: 0;
    min-height: 0;
    margin: 0;
    overflow: hidden;
    background: var(--landing-night);
    will-change: transform, opacity, filter;
}

.commitment__frame--colombia,
.commitment__frame--fellowship { grid-row: 1 / 3; }
.commitment__frame--children { grid-column: 3 / 5; grid-row: 2; }

.commitment__photo {
    width: 100%;
    height: 100%;
    max-width: none;
    object-fit: cover;
    object-position: center;
}

/* Acerca el contenido original sin modificar los archivos entregados. */
.commitment__frame--colombia .commitment__photo { transform: scale(1.24); }
.commitment__frame--fellowship .commitment__photo { transform: scale(1.82); }
.commitment__frame--teaching .commitment__photo,
.commitment__frame--community .commitment__photo { transform: scale(1.17); }
.commitment__frame--children .commitment__photo { transform: scale(1.82); }

@media (max-width: 900px) {
    .commitment { padding: 3.5rem 5vw var(--commitment-fade-space); }
    .commitment__heading { grid-template-columns: 1fr; gap: 1.5rem; min-height: 0; }
    .commitment__title { font-size: clamp(3rem, 8vw, 5.2rem); }
    .commitment__copy { max-width: 680px; font-size: .94rem; }
    .commitment__gallery { height: clamp(350px, 50vw, 490px); gap: 10px; }
}

@media (max-width: 620px) {
    .commitment {
        --commitment-fade-space: 9rem;
        padding: 3.5rem 1.2rem var(--commitment-fade-space);
    }
    .commitment__title { font-size: clamp(2.65rem, 10vw, 4rem); }
    .commitment__copy { font-size: .87rem; }
    .commitment__gallery {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        grid-template-rows: repeat(3, 165px);
        height: auto;
        gap: 8px;
    }
    .commitment__frame--colombia,
    .commitment__frame--fellowship,
    .commitment__frame--children { grid-column: auto; grid-row: auto; }
    .commitment__frame--children { grid-column: 1 / 3; }
}

/* Expandiendo el Reino: cuatro escenas en un carrusel continuo. */
.kingdom {
    position: relative;
    min-height: 100svh;
    overflow: hidden;
    isolation: isolate;
    background: var(--landing-night);
}

.kingdom::before,
.kingdom::after {
    content: '';
    position: absolute;
    right: 0;
    left: 0;
    z-index: 1;
    height: min(24vw, 280px);
    pointer-events: none;
}
.kingdom::before { top: 0; background: linear-gradient(180deg, var(--landing-night), transparent); }
.kingdom::after { bottom: 0; background: linear-gradient(0deg, var(--landing-night), transparent); }
/* El fundido superior acompaña la portada, sin cubrir las fotografías del carrusel. */
.kingdom:has(.kingdom__slide--stories:not([hidden]))::before,
.kingdom:has(.kingdom__slide--closing:not([hidden]))::before { opacity: 0; }

.kingdom__stage { position: relative; min-height: max(720px, 100svh); }
.kingdom__slide {
    position: absolute;
    inset: 0;
    min-height: inherit;
    overflow: hidden;
    background: radial-gradient(ellipse 67% 72% at 42% 48%, rgba(18, 48, 102, .38), transparent 76%), var(--landing-night);
}
.kingdom__slide[hidden], .kingdom-modal[hidden] { display: none !important; }

.kingdom__slide--opening { display: flex; align-items: center; }
.kingdom__opening-copy {
    position: absolute;
    z-index: 2;
    top: 23%;
    left: 38.8%;
    width: 42%;
    color: #f9f3f2;
}
.kingdom__opening-copy h2,
.kingdom__closing-copy h2 {
    margin: 0 0 1.6rem;
    font-family: 'Cinzel', Georgia, serif;
    font-weight: 600;
    line-height: 1.08;
}
.kingdom__opening-copy h2 { width: max-content; max-width: none; white-space: nowrap; font-size: clamp(3rem, 4.5vw, 5.1rem); }
.kingdom__opening-copy h3 { margin: 1.8rem 0 .2rem; font-size: clamp(1rem, 1.3vw, 1.2rem); }
.kingdom__opening-copy p { margin: 0; font-size: clamp(.98rem, 1.18vw, 1.05rem); line-height: 1.46; }
.kingdom__opening-copy .kingdom__verse { font-family: Georgia, serif; font-style: italic; }
.kingdom__opening-copy > p:not(.kingdom__verse) { max-height: 13.2em; overflow: hidden; }

.kingdom__comet {
    position: absolute;
    z-index: 2;
    top: 40%;
    left: 33%;
    width: min(51vw, 700px);
    height: auto;
    transform-origin: center;
    pointer-events: none;
}
.kingdom__comet-image { display: block; width: 100%; height: auto; }
.kingdom__spark,
.kingdom__spark-trail,
.kingdom__flash {
    position: absolute;
    top: 53%;
    left: 50%;
    border-radius: 50%;
    pointer-events: none;
    will-change: transform, opacity;
}
.kingdom__spark {
    z-index: 4;
    width: 15px;
    height: 15px;
    margin: -7.5px;
    background: #fffbd6;
    box-shadow: 0 0 9px 4px #ffe16a, 0 0 30px 13px rgba(255, 199, 55, .8), 0 0 64px 18px rgba(255, 199, 55, .4);
}
.kingdom__spark-trail {
    z-index: 3;
    width: 14px;
    height: 14px;
    margin: -7px;
    background: radial-gradient(circle, rgba(255, 250, 203, .82), rgba(255, 204, 62, .34) 40%, transparent 75%);
    filter: blur(2px);
}
.kingdom__flash {
    z-index: 3;
    width: 100px;
    height: 100px;
    margin: -50px;
    background: radial-gradient(circle, rgba(255, 255, 240, .98), rgba(255, 208, 65, .6) 19%, rgba(255, 208, 65, .15) 50%, transparent 72%);
    mix-blend-mode: screen;
}

.kingdom__slide--stories {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: clamp(2.2rem, 10.8vw, 10rem);
    align-content: start;
    padding: clamp(4rem, 5.4vw, 5.5rem) 5.4vw 4rem;
}
.kingdom-story { position: relative; min-width: 0; color: #f4f0eb; }
.kingdom-story__image { position: relative; height: clamp(170px, 15.2vw, 235px); margin-bottom: 1.5rem; overflow: hidden; }
.kingdom-story__image img { width: 100%; height: 100%; object-fit: cover; transform: scale(1.25); }
/* La foto original tiene franjas negras laterales: encuadre de las cuatro personas desde la cabeza. */
.kingdom__slide[data-slide="2"] .kingdom-story:first-child .kingdom-story__image img {
    position: absolute;
    top: -24%;
    left: -57.8%;
    width: 215.6%;
    max-width: none;
    height: auto;
    object-fit: initial;
    transform: none;
}
.kingdom-story:first-child .kingdom-story__image::after {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: clamp(170px, 15.2vw, 235px);
    background: linear-gradient(0deg, rgba(11, 17, 36, .18), transparent 48%);
    pointer-events: none;
}
.kingdom-story h3 { margin: 0 0 .45rem; color: #d4a645; font-size: clamp(.95rem, 1.14vw, 1.1rem); font-weight: 600; line-height: 1.35; }
.kingdom-story p { display: -webkit-box; overflow: hidden; -webkit-box-orient: vertical; -webkit-line-clamp: 13; margin: 0; font-size: clamp(.84rem, 1.04vw, .98rem); line-height: 1.43; }
.kingdom-story__more { display: inline-block; margin: .35rem 0 0; padding: .2rem 0; border: 0; background: none; color: #e7c070; font: inherit; font-size: .88rem; cursor: pointer; text-decoration: underline; text-underline-offset: .2em; }
.kingdom-story__more:hover { color: #fff0c2; }

.kingdom__slide--closing { display: grid; grid-template-columns: 66.5% 33.5%; }
.kingdom__closing-copy { position: absolute; z-index: 2; top: 11%; left: 5.7%; width: 55%; }
.kingdom__closing-copy h2 { max-width: 760px; color: #b88e42; font-size: clamp(2.45rem, 3.65vw, 4rem); }
.kingdom__closing-copy p { max-width: 670px; margin: 0 0 1.2rem; font-size: clamp(.86rem, 1.08vw, 1rem); line-height: 1.42; }
.kingdom__closing-image { grid-column: 2; width: 100%; height: 100%; object-fit: cover; object-position: 48% 40%; }

.kingdom__nav {
    position: absolute;
    top: 50%;
    z-index: 8;
    display: grid;
    place-items: center;
    width: 42px;
    height: 28px;
    padding: 0;
    border: 1px solid #b99143;
    border-radius: 999px;
    background: rgba(11, 17, 36, .45);
    color: #d4ab54;
    font-size: 1.5rem;
    line-height: 1;
    cursor: pointer;
}
.kingdom__nav--next { right: .6%; }
.kingdom__stage[data-active="0"] .kingdom__nav--next { right: 5.5%; }
.kingdom__nav:hover { background: rgba(201, 169, 98, .2); }

.kingdom-modal { position: fixed; inset: 0; z-index: 100; display: flex; justify-content: flex-end; }
.kingdom-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 9, 23, .75); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); cursor: pointer; }
.kingdom-modal__panel { position: relative; z-index: 1; width: min(590px, 100%); height: 100%; overflow-y: auto; padding: clamp(2rem, 5vw, 4rem); border-left: 1px solid rgba(201, 169, 98, .28); background: rgba(11, 17, 36, .96); box-shadow: -20px 0 70px rgba(0, 0, 0, .32); }
.kingdom-modal__text { padding-top: 2rem; }
.kingdom-modal__text p { font-size: 1rem; line-height: 1.75; }
.kingdom-modal__close { position: absolute; top: 1rem; right: 1.4rem; border: 0; background: none; color: #f9f3f2; font-size: 2rem; cursor: pointer; }

@media (max-width: 900px) {
    .kingdom__stage { min-height: 760px; }
    .kingdom__opening-copy { left: 35%; width: 56%; }
    .kingdom__slide--stories { gap: 2rem; padding: 5rem 5vw; }
    .kingdom-story__image { height: 160px; }
    .kingdom-story:first-child .kingdom-story__image::after { height: 160px; }
    .kingdom__closing-copy { left: 5%; width: 57%; }
}
@media (max-width: 620px) {
    .kingdom__stage { min-height: 840px; }
    .kingdom__comet { top: 20%; left: 30%; width: 78vw; }
    .kingdom__opening-copy { top: auto; right: 0; bottom: 6rem; left: 0; width: auto; padding: 0 1.5rem; }
    .kingdom__opening-copy h2 { width: auto; white-space: normal; font-size: clamp(2.45rem, 9vw, 3.7rem); }
    .kingdom__slide--stories { display: block; padding: 4.5rem 3.2rem 5rem; overflow-y: auto; }
    .kingdom-story { margin-bottom: 2rem; }
    .kingdom-story__image { height: 200px; }
    .kingdom-story:first-child .kingdom-story__image::after { height: 200px; }
    .kingdom-story p { -webkit-line-clamp: 5; }
    .kingdom__slide--closing { display: block; overflow-y: auto; }
    .kingdom__closing-copy { position: relative; top: auto; left: auto; width: auto; padding: 4rem 3rem 2rem; }
    .kingdom__closing-copy h2 { font-size: clamp(2rem, 7vw, 3rem); }
    .kingdom__closing-image { height: 360px; }
    .kingdom__nav { top: auto; bottom: 1.2rem; }
    .kingdom__stage[data-active="0"] .kingdom__nav--next { right: .6%; }
}

/* Mis Libros: apertura nocturna y dos composiciones espejo del boceto. */
.books { position: relative; isolation: isolate; background: var(--landing-night); }
.books::after {
    content: '';
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: 0;
    left: 0;
    height: min(16vw, 130px);
    pointer-events: none;
    background: linear-gradient(0deg, var(--landing-night), transparent);
}
.books__intro {
    position: relative;
    display: flex;
    align-items: flex-end;
    min-height: max(660px, 100svh);
    padding: 8rem 6.8vw 11.5vh;
    overflow: hidden;
    background: radial-gradient(ellipse 80% 64% at 42% 77%, rgba(20, 29, 55, .46), transparent 80%), var(--landing-night);
}
.books__intro::before {
    content: '';
    position: absolute;
    inset: 0 0 auto;
    height: min(24vw, 240px);
    pointer-events: none;
    background: linear-gradient(180deg, var(--landing-night), transparent);
}
.books__intro-inner { position: relative; z-index: 1; max-width: 930px; }
.books__intro h2 {
    margin: 0 0 1.2rem;
    color: #f9f3f2;
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(4.7rem, 7.3vw, 7rem);
    font-weight: 600;
    line-height: .94;
    letter-spacing: -.045em;
}
.books__intro p { max-width: 920px; margin: 1.55rem 0 0; font-size: clamp(.96rem, 1.15vw, 1.1rem); line-height: 1.55; }
.books__intro em { font-style: italic; }
.books-word { display: inline-block; }

.books__book {
    --book-ink: #243b2a;
    --book-accent: #99a889;
    display: grid;
    grid-template-columns: 44% 56%;
    min-height: max(650px, 100svh);
    background: #e8dbcb;
    color: #17231a;
    color-scheme: light;
}
.books__book--proposito { --book-ink: #611b20; --book-accent: #b96c67; grid-template-columns: 56% 44%; }
.books__visual { position: relative; display: block; grid-column: 1; grid-row: 1; min-height: inherit; overflow: hidden; background: #cda983; }
.books__visual img { position: absolute; inset: 0; width: 100%; height: 100%; max-width: none; object-fit: cover; object-position: 50% 50%; }
.books__book--proposito .books__visual { grid-column: 2; }
/* Los originales incluyen espacio lateral transparente: se muestra solo la foto oficial. */
.books__book--adversidad .books__visual img { width: 178.7%; height: auto; min-height: 100%; object-fit: initial; }
.books__book--proposito .books__visual img { right: 0; left: auto; width: 178.7%; height: auto; min-height: 100%; object-fit: initial; }
.books__detail { display: flex; grid-column: 2; grid-row: 1; align-items: center; min-width: 0; padding: clamp(3rem, 6vw, 6rem) clamp(3rem, 8vw, 8rem); }
.books__book--proposito .books__detail { grid-column: 1; justify-content: flex-end; text-align: right; }
.books__detail-inner { width: min(100%, 680px); }
.books__quote {
    margin: 0;
    color: var(--book-ink);
    font-family: 'Cinzel', Georgia, serif;
    font-size: clamp(1.35rem, 1.75vw, 1.9rem);
    font-weight: 500;
    line-height: 1.16;
}
.books__book-name { margin: .3rem 0 2.8rem; color: var(--book-ink); font-family: Georgia, serif; font-size: clamp(1.25rem, 1.7vw, 1.7rem); }
.books__synopsis { max-width: 440px; }
.books__book--proposito .books__synopsis { margin-left: auto; }
.books__synopsis h4 { margin: 0; font-size: .94rem; font-weight: 700; }
.books__synopsis p { margin: .12rem 0 0; font-size: clamp(.86rem, .97vw, .98rem); line-height: 1.4; }
.books__read-more { display: inline; padding: 0; border: 0; background: none; color: inherit; font: inherit; cursor: pointer; text-decoration: underline; text-underline-offset: .18em; }
.books__read-more:hover { color: var(--book-ink); }
.books__actions { display: flex; width: fit-content; flex-direction: column; align-items: center; gap: .62rem; margin-top: 2.2rem; }
.books__book--proposito .books__actions { margin-left: auto; }
.books__quantity { display: flex; align-items: center; justify-content: space-between; width: 126px; height: 26px; border: 1px solid #24332c; border-radius: 999px; }
.books__quantity button { display: grid; place-items: center; width: 25px; height: 25px; padding: 0; border: 0; background: none; color: inherit; font: inherit; font-size: .9rem; line-height: 1; cursor: pointer; }
.books__quantity button:hover { color: var(--book-ink); }
.books__quantity output { font-size: .76rem; }
.books__buy { min-width: 104px; padding: .26rem 1rem; border: 1px solid rgba(255, 255, 255, .85); border-radius: 999px; background: rgba(255, 255, 255, .7); box-shadow: 0 2px 8px rgba(0, 0, 0, .07); color: #24332c; font: inherit; font-size: .68rem; font-weight: 600; cursor: pointer; transition: box-shadow .3s ease, background-color .3s ease; }
.books__buy:hover { background: #fff; box-shadow: 0 0 18px rgba(255, 255, 255, .8); }

.books-modal { position: fixed; inset: 0; z-index: 120; display: grid; place-items: center; padding: 1.2rem; }
.books-modal[hidden], .books-modal__panel[hidden] { display: none !important; }
.books-modal__backdrop { position: absolute; inset: 0; background: rgba(3, 7, 19, .78); backdrop-filter: blur(20px); -webkit-backdrop-filter: blur(20px); cursor: pointer; }
.books-modal__panel { position: relative; z-index: 1; width: min(920px, 100%); max-height: min(80svh, 850px); overflow-y: auto; border: 1px solid rgba(255, 255, 255, .92); border-radius: 28px; background: rgba(238, 226, 210, .88); box-shadow: 0 0 42px rgba(255, 255, 255, .38), 0 22px 80px rgba(0, 0, 0, .25), inset 0 2px 15px rgba(255, 255, 255, .7); backdrop-filter: blur(22px) saturate(1.2); -webkit-backdrop-filter: blur(22px) saturate(1.2); color: #162217; color-scheme: light; }
.books-modal__panel--reading { padding: clamp(2.8rem, 6vw, 5rem); }
.books-modal__reading-copy { max-width: 780px; margin: auto; text-align: center; }
.books-modal__reading-copy p { margin: 0 0 1.25rem; font-size: clamp(.9rem, 1.1vw, 1rem); line-height: 1.66; }
.books-modal__reading-copy p:last-child { margin-bottom: 0; }
.books-modal__close { position: absolute; top: 1rem; right: 1.25rem; z-index: 4; width: 34px; height: 34px; padding: 0; border: 0; border-radius: 50%; background: rgba(255, 255, 255, .62); color: inherit; font-size: 1.5rem; cursor: pointer; }
.books-modal__panel--purchase { --purchase-ink: #35593a; --purchase-accent: #99a889; width: min(475px, 100%); min-height: 590px; overflow: hidden; }
.books-modal__panel--purchase[data-book="proposito"] { --purchase-ink: #722b2d; --purchase-accent: #b96c67; }
.books-modal__shine { position: absolute; z-index: 0; top: -28%; left: -40%; width: 95%; aspect-ratio: 1; border-radius: 50%; background: radial-gradient(circle, rgba(255, 255, 255, .8), rgba(255, 255, 255, .18) 44%, transparent 70%); filter: blur(18px); pointer-events: none; }
.books-modal__purchase-body { position: relative; display: flex; min-height: 590px; flex-direction: column; justify-content: space-between; padding: 6.3rem clamp(2.4rem, 5vw, 4.4rem) 3.9rem; }
.books-modal__specs { margin: 0; color: var(--purchase-ink); font-size: .76rem; line-height: 1.22; }
.books-modal__specs div { display: flex; flex-wrap: wrap; gap: .2rem; }
.books-modal__specs dt { font-weight: 700; }
.books-modal__specs dd { margin: 0; }
.books-modal__formats h3 { margin: 0 0 1.05rem; color: #1c201b; font-size: .75rem; text-align: center; }
.books-modal__choices { display: flex; justify-content: center; gap: 2rem; }
.books-modal__choice { display: flex; min-width: 110px; flex-direction: column; align-items: center; gap: .55rem; color: inherit; text-decoration: none; }
.books-modal__price { min-width: 76px; padding: .36rem .8rem; border-radius: 999px; background: var(--purchase-accent); color: #fff; font-size: 1rem; text-align: center; }
.books-modal__choice-label { min-width: 98px; padding: .22rem .5rem; border-radius: 999px; background: rgba(255, 255, 255, .9); box-shadow: 0 2px 8px rgba(0, 0, 0, .08); font-size: .68rem; text-align: center; }
.books-modal__choice:hover .books-modal__price { filter: brightness(1.08); }

@media (max-width: 900px) {
    .books__book, .books__book--proposito { grid-template-columns: 47% 53%; }
    .books__book--proposito { grid-template-columns: 53% 47%; }
    .books__detail { padding: 3rem; }
}
@media (max-width: 620px) {
    .books__intro { min-height: 680px; padding: 7rem 1.5rem 5rem; }
    .books__intro h2 { font-size: clamp(4.1rem, 17vw, 6rem); }
    .books__intro p { font-size: .9rem; }
    .books__book, .books__book--proposito { display: flex; min-height: 0; flex-direction: column; }
    .books__visual, .books__book--proposito .books__visual { width: 100%; min-height: 480px; order: 0; }
    .books__detail, .books__book--proposito .books__detail { width: 100%; order: 1; padding: 3.5rem 1.6rem 5rem; text-align: left; }
    .books__book--proposito .books__synopsis, .books__book--proposito .books__actions { margin-left: 0; }
    .books__quote { font-size: clamp(1.35rem, 5vw, 1.8rem); }
    .books-modal__panel--purchase, .books-modal__purchase-body { min-height: 560px; }
    .books-modal__purchase-body { padding: 5rem 2rem 3rem; }
}

/* La última ficha se disuelve en el mismo azul nocturno de la galería. */
.books__book--proposito { position: relative; }
.books__book--proposito::after {
    content: '';
    position: absolute;
    z-index: 2;
    right: 0;
    bottom: -1px;
    left: 0;
    height: clamp(28px, 4vw, 54px);
    background: linear-gradient(to bottom, transparent, var(--landing-night));
    pointer-events: none;
}

/* Cuatro cintas continuas, con la bruma situada detrás de las fotografías. */
.gallery {
    position: relative;
    height: clamp(680px, 112svh, 1200px);
    overflow: hidden;
    isolation: isolate;
    background: var(--landing-night);
}
.gallery::before {
    content: '';
    position: absolute;
    z-index: 0;
    inset: 0;
    background: radial-gradient(ellipse at 50% 50%, rgba(25, 52, 100, .16), transparent 70%);
    mask-image: linear-gradient(to bottom, transparent, #000 35%, #000 78%, transparent);
    pointer-events: none;
}
.gallery__grid {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: clamp(.55rem, 1.5vw, 1.4rem);
    width: min(100%, 1600px);
    height: 100%;
    margin: auto;
    padding: 0 clamp(.55rem, 2vw, 2rem);
}
.gallery__column { min-width: 0; overflow: hidden; }
.gallery__track { will-change: transform; }
.gallery__set {
    display: flex;
    flex-direction: column;
    gap: clamp(.55rem, 1.5vw, 1.4rem);
    padding-bottom: clamp(.55rem, 1.5vw, 1.4rem);
}
.gallery__item {
    position: relative;
    display: block;
    width: 100%;
    aspect-ratio: 1 / 1.06;
    padding: 0;
    overflow: hidden;
    border: 1px solid rgba(243, 231, 211, .22);
    border-radius: clamp(10px, 1.1vw, 18px);
    background: #101a2e;
    cursor: zoom-in;
    transform: translateZ(0);
}
.gallery__item--landscape { aspect-ratio: 1.42 / 1; }
.gallery__photo {
    width: 100%;
    height: 100%;
    object-fit: cover;
    backface-visibility: hidden;
}
.gallery__play {
    position: absolute;
    z-index: 1;
    top: 50%;
    left: 50%;
    display: grid;
    place-items: center;
    width: clamp(32px, 4vw, 58px);
    aspect-ratio: 1;
    border: 1px solid rgba(255, 255, 255, .9);
    border-radius: 50%;
    background: rgba(4, 13, 28, .7);
    box-shadow: 0 5px 20px rgba(0, 0, 0, .4);
    pointer-events: none;
    transform: translate(-50%, -50%);
}
.gallery__play::before {
    content: '';
    width: 0;
    height: 0;
    margin-left: 3px;
    border-top: 7px solid transparent;
    border-bottom: 7px solid transparent;
    border-left: 11px solid #fff;
}
.gallery__item:hover, .gallery__item:hover .gallery__photo { will-change: transform; }
.gallery__item:focus-visible { z-index: 2; }

.gallery-modal {
    position: fixed;
    z-index: 150;
    inset: 0;
    display: grid;
    place-items: center;
    padding: clamp(.6rem, 2vw, 2rem);
}
.gallery-modal[hidden] { display: none !important; }
.gallery-modal__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(2, 7, 19, .82);
    backdrop-filter: blur(14px) saturate(.75);
    -webkit-backdrop-filter: blur(14px) saturate(.75);
    cursor: zoom-out;
}
.gallery-modal__frame {
    position: relative;
    z-index: 1;
    display: grid;
    place-items: center;
    grid-template-columns: minmax(0, 1fr);
    grid-template-rows: minmax(0, 1fr);
    width: min(860px, 80vw);
    height: min(690px, 80svh);
    padding: clamp(.5rem, 1.6vw, 1.25rem);
    overflow: hidden;
    border: 1px solid rgba(255, 255, 255, .67);
    border-radius: 24px;
    background: rgba(225, 236, 255, .10);
    box-shadow: 0 28px 90px rgba(0, 0, 0, .58), inset 0 1px 22px rgba(255, 255, 255, .19), 0 0 35px rgba(163, 199, 255, .16);
    backdrop-filter: blur(8px) saturate(1.15);
    -webkit-backdrop-filter: blur(8px) saturate(1.15);
    will-change: transform, opacity;
    transform: translate3d(0, 0, 0);
}
.gallery-modal__frame::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg, rgba(255, 255, 255, .23), transparent 35%, transparent 70%, rgba(255, 255, 255, .09));
    pointer-events: none;
}
.gallery-modal__image,
.gallery-modal__video {
    min-width: 0;
    min-height: 0;
    width: 100%;
    height: 100%;
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
    border-radius: 14px;
}
.gallery-modal__video { background: #020713; }
.gallery-modal__video[hidden], .gallery-modal__image[hidden] { display: none; }
.gallery-modal__shine {
    position: absolute;
    z-index: 2;
    top: -35%;
    left: -45%;
    width: 70%;
    aspect-ratio: 1;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(255, 255, 255, .48), transparent 66%);
    filter: blur(20px);
    pointer-events: none;
}
.gallery-modal__close {
    position: absolute;
    z-index: 3;
    top: clamp(.8rem, 2vw, 1.5rem);
    right: clamp(.8rem, 2vw, 1.5rem);
    display: grid;
    place-items: center;
    width: 42px;
    height: 42px;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, .6);
    border-radius: 50%;
    background: rgba(6, 16, 34, .55);
    color: #fff;
    font: inherit;
    font-size: 1.8rem;
    line-height: 1;
    cursor: pointer;
    backdrop-filter: blur(10px);
}
.gallery-modal__close:hover { background: rgba(6, 16, 34, .85); }

@media (max-width: 620px) {
    .gallery { height: 82svh; min-height: 540px; }
    .gallery__grid { gap: 5px; padding: 0 5px; }
    .gallery__set { gap: 5px; padding-bottom: 5px; }
    .gallery__item { border-radius: 7px; }
    .gallery-modal__frame { width: 90vw; height: min(76svh, 680px); padding: .5rem; border-radius: 18px; }
    .gallery-modal__image { border-radius: 11px; }
}

/* Puntero global: contraste explícito en tarjetas claras y doble contorno sobre fotografías. */
.site-cursor { display: none; }
@media (pointer: fine) {
    body.has-custom-cursor, body.has-custom-cursor * { cursor: none !important; }
    .site-cursor {
        position: fixed;
        z-index: 9999;
        top: -17px;
        left: -17px;
        display: block;
        width: 34px;
        height: 34px;
        opacity: 0;
        pointer-events: none;
        will-change: transform, opacity;
    }
    .site-cursor__ring {
        position: absolute;
        inset: 0;
        border: 2px solid rgba(255, 255, 255, .94);
        border-radius: 50%;
        background: rgba(255, 255, 255, .055);
        box-shadow: 0 0 0 1px rgba(19, 27, 37, .75), 0 0 15px rgba(255, 255, 255, .2), inset 0 0 8px rgba(255, 255, 255, .1);
        transition: border-color .26s ease, background-color .26s ease, box-shadow .26s ease;
        will-change: transform, width, height;
    }
    .site-cursor__dot {
        position: absolute;
        top: 50%;
        left: 50%;
        width: 6px;
        height: 6px;
        border-radius: 50%;
        background: #fff;
        box-shadow: 0 0 0 1px rgba(19, 27, 37, .75), 0 0 9px rgba(255, 255, 255, .95);
        transform: translate(-50%, -50%);
        transition: background-color .26s ease, box-shadow .26s ease;
    }
    .site-cursor--dark .site-cursor__ring,
    body:has(.vision-card:hover, .books__detail:hover, .books-modal__panel:hover, .contact-card:hover) .site-cursor__ring {
        border-color: #0b2344;
        background: rgba(11, 35, 68, .12);
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .85), 0 0 12px rgba(11, 35, 68, .3);
    }
    .site-cursor--dark .site-cursor__dot,
    body:has(.vision-card:hover, .books__detail:hover, .books-modal__panel:hover, .contact-card:hover) .site-cursor__dot {
        background: #0b2344;
        box-shadow: 0 0 0 1px rgba(255, 255, 255, .85), 0 0 7px rgba(11, 35, 68, .55);
    }
}

/* Contacto: composición final del boceto, con la textura detrás de todo. */
.contact {
    position: relative;
    height: max(617px, 100svh);
    overflow: hidden;
    isolation: isolate;
    background:
        radial-gradient(ellipse 78% 76% at 70% 55%, rgba(10, 43, 70, .5), transparent 74%),
        linear-gradient(180deg, var(--landing-night) 0%, #061426 17%, #02111f 100%);
}
.contact__texture {
    position: absolute;
    z-index: 0;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='320' height='320'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.72' numOctaves='2' seed='9' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
    background-size: 320px 320px;
    opacity: .08;
    mix-blend-mode: screen;
    pointer-events: none;
}
.contact-card {
    position: absolute;
    z-index: 1;
    top: 37.3%;
    left: 14.2%;
    width: min(42.9%, 470px);
    height: 156px;
    background: #fff;
    color: #050505;
    color-scheme: light;
    isolation: isolate;
}
.contact-card--fragmented { background: transparent; }
.contact-card__fragments {
    position: absolute;
    z-index: 0;
    top: -120px;
    left: -120px;
    display: none;
    width: calc(100% + 240px);
    height: calc(100% + 240px);
    pointer-events: none;
}
.contact-card--fragmented .contact-card__fragments { display: block; }
.contact-card__content {
    position: relative;
    z-index: 1;
    display: flex;
    width: 100%;
    height: 100%;
    flex-direction: column;
    align-items: flex-start;
    justify-content: flex-end;
    padding: 28px 30px 25px;
    pointer-events: none;
}
.contact-card__content h2 {
    margin: 0 0 6px;
    font-family: 'Montserrat', Arial, sans-serif;
    font-size: 40px;
    font-weight: 400;
    letter-spacing: -.055em;
    line-height: 1.05;
}
.contact-card__content a {
    color: inherit;
    font-size: 10px;
    font-weight: 500;
    letter-spacing: .015em;
    line-height: 1.2;
    text-decoration: none;
    pointer-events: auto;
}
.contact-card__content a:hover { text-decoration: underline; text-underline-offset: .25em; }
.contact__links {
    position: absolute;
    z-index: 1;
    right: 7.5%;
    bottom: 10.1%;
    display: flex;
    align-items: center;
    gap: 20px;
}
.contact__social {
    display: grid;
    width: 30px;
    height: 30px;
    place-items: center;
    color: #d3b15e;
}
.contact__social--instagram { color: #203857; }
.contact__social--pending { cursor: default; }
.contact__mail-icon {
    display: grid;
    place-items: center;
    width: 32px;
    height: 28px;
    color: #e8dccd;
    transition: color .2s ease;
}
.contact__mail-icon:hover { color: #fff; }

@media (max-width: 620px) {
    .contact { height: max(570px, 100svh); }
    .contact-card { top: 36%; left: 6%; width: 88%; height: 150px; }
    .contact-card__content { padding: 25px 24px 24px; }
    .contact-card__content h2 { font-size: clamp(32px, 9vw, 40px); }
    .contact-card__content a { font-size: clamp(8px, 2.3vw, 10px); }
    .contact__links { right: 8%; bottom: 10%; }
}
