.home-page { overflow: clip; background: var(--progreso-white); }
.home-container { width: min(1360px, calc(100% - 80px)); margin-inline: auto; }

/* Portada */
.home-hero {
    min-height: 650px;
    height: clamp(650px, calc(100svh - 145px), 750px);
    margin-bottom: 0;
    /* La portada termina directamente sobre la siguiente sección azul. */
    background: var(--progreso-ink);
}
.home-hero::after {
    content: '';
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 5;
    height: var(--progreso-v-depth);
    background: var(--progreso-gold);
    clip-path: polygon(0 0, 50% 100%, 100% 0, 50% calc(100% - var(--progreso-v-line)));
    pointer-events: none;
}
.home-hero .progreso-hero__slide {
    bottom: 0;
    clip-path: polygon(0 0, 100% 0, 100% calc(100% - var(--progreso-v-depth)), 50% 100%, 0 calc(100% - var(--progreso-v-depth)));
    transition: opacity .95s ease, visibility .95s ease;
}
.home-hero .progreso-hero__slide::before {
    transform: scale(1.08) translate3d(-.65%, 0, 0);
    transition: none;
    will-change: transform;
}
.home-hero .progreso-hero__slide.is-active::before {
    animation: homeHeroDriftRight 7s cubic-bezier(.2,.55,.25,1) both;
}
.home-hero .progreso-hero__slide:nth-child(even).is-active::before {
    animation-name: homeHeroDriftLeft;
}
.home-hero .progreso-hero__slide.is-active .progreso-hero__content > * {
    animation: homeHeroContentIn .82s cubic-bezier(.2,.7,.25,1) both;
}
.home-hero .progreso-hero__slide.is-active .progreso-hero__content > :nth-child(2) { animation-delay: .08s; }
.home-hero .progreso-hero__slide.is-active .progreso-hero__content > :nth-child(3) { animation-delay: .14s; }
.home-hero .progreso-hero__slide.is-active .progreso-hero__content > :nth-child(4) { animation-delay: .2s; }
.home-hero .progreso-hero__slide.is-active .progreso-hero__content > :nth-child(5) { animation-delay: .26s; }

@keyframes homeHeroDriftRight {
    from { transform: scale(1.08) translate3d(-.65%, 0, 0); }
    to { transform: scale(1.025) translate3d(.35%, 0, 0); }
}

@keyframes homeHeroDriftLeft {
    from { transform: scale(1.08) translate3d(.65%, 0, 0); }
    to { transform: scale(1.025) translate3d(-.35%, 0, 0); }
}

@keyframes homeHeroContentIn {
    from { opacity: 0; transform: translate3d(0, 18px, 0); }
    to { opacity: 1; transform: translate3d(0, 0, 0); }
}
.home-hero .progreso-hero__overlay { background: linear-gradient(90deg, rgba(255,255,255,.98) 0%, rgba(255,255,255,.93) 28%, rgba(255,255,255,.46) 52%, rgba(8,13,23,.04) 76%); }
.home-hero .progreso-hero__content {
    width: min(1360px, calc(100% - 200px));
    margin-inline: auto;
    padding: clamp(110px, 13vh, 138px) 0 calc(var(--progreso-v-depth) + 34px);
    justify-content: flex-start;
}
.home-hero .progreso-hero__content > span { margin-left: 0; color: var(--progreso-bronze); font-size: 13px; letter-spacing: .2em; }
.home-hero .progreso-hero__content h1,
.home-hero .progreso-hero__content h2 { max-width: 620px; margin-block: 16px 14px; font-size: clamp(43px, 3.8vw, 58px); line-height: 1.01; text-wrap: balance; }
.home-hero .progreso-hero__content p { max-width: 585px; color: #5d5a55; font-size: 17px; line-height: 1.65; }
.home-hero .progreso-hero__cta { min-height: 56px; padding-inline: 28px; border-radius: 14px; box-shadow: 0 14px 30px rgba(155,97,37,.14); }
.home-hero .progreso-hero__dots button { position: relative; width: 24px; height: 24px; border: 0; background: transparent; }
.home-hero .progreso-hero__dots button::before { content: ''; position: absolute; top: 50%; left: 50%; width: 11px; height: 11px; border: 1px solid var(--progreso-ink); border-radius: 50%; background: rgba(255,255,255,.82); transform: translate(-50%,-50%); }
.home-hero .progreso-hero__dots button.is-active { width: 42px; border: 0; background: transparent; }
.home-hero .progreso-hero__dots button.is-active::before { width: 34px; border-color: var(--progreso-ink); border-radius: 8px; background: rgba(255,255,255,.9); }

/* Ritmo y transiciones: una sola geometría en V para toda la portada. */
.home-section { --home-section-bg: var(--progreso-white); position: relative; z-index: 1; margin-bottom: var(--progreso-v-depth); padding: clamp(68px, 6vw, 92px) 0 clamp(42px, 4vw, 58px); background: var(--home-section-bg); color: var(--progreso-ink); }
.home-hero + .home-section { padding-top: clamp(48px, 4.5vw, 68px); }
.home-section:not(.home-section--final)::after,
.home-section:not(.home-section--final)::before { content: ''; position: absolute; right: 0; left: 0; clip-path: polygon(0 0, 50% 100%, 100% 0); pointer-events: none; }
.home-section:not(.home-section--final)::after { z-index: 2; bottom: calc(0px - var(--progreso-v-depth)); height: var(--progreso-v-depth); background: var(--progreso-gold); }
.home-section:not(.home-section--final)::before { z-index: 3; bottom: calc(0px - var(--progreso-v-depth) + var(--progreso-v-line)); height: calc(var(--progreso-v-depth) - var(--progreso-v-line)); background: var(--home-section-bg); }
.home-section--white { --home-section-bg: var(--progreso-white); }
.home-section--navy { --home-section-bg: var(--progreso-ink); color: var(--progreso-white); }
.home-section--image {
    --home-photo-overlay: linear-gradient(105deg,rgba(8,13,23,.98) 0%,rgba(8,13,23,.93) 44%,rgba(8,13,23,.82) 100%);
    --home-photo-position: center;
    isolation: isolate;
    background-color: var(--progreso-ink);
    background-image: var(--home-photo-overlay),var(--home-section-image);
    background-position: var(--home-photo-position);
    background-repeat: no-repeat;
    background-size: cover;
}
.home-section--image:not(.home-section--final)::before {
    background-color: var(--progreso-ink);
    background-image: var(--home-photo-overlay),var(--home-section-image);
    background-position: var(--home-photo-position);
    background-repeat: no-repeat;
    background-size: 100vw auto;
}
.home-section--image > .home-container { position: relative; z-index: 4; }
.home-section--intro {
    --home-section-image: url('/assets/images/hero/firma-progreso-centro.webp');
    --home-photo-overlay: linear-gradient(105deg,rgba(8,13,23,.985) 0%,rgba(8,13,23,.95) 52%,rgba(8,13,23,.82) 100%);
    --home-photo-position: center 42%;
}
.home-section--specialties {
    background: var(--home-section-bg);
}
.home-section--path {
    --home-section-image: none;
    --home-photo-overlay: none;
    background-color: var(--progreso-ink);
    background-image: none;
}
.home-section--path:not(.home-section--final)::before {
    background-color: var(--progreso-ink);
    background-image: none;
}
.home-section--modalities {
    background: var(--home-section-bg);
}
.home-section--tools {
    --home-section-image: url('/assets/images/hero/biblioteca-juridica-progreso-v2.jpg');
    --home-photo-overlay: linear-gradient(105deg,rgba(8,13,23,.99) 0%,rgba(8,13,23,.96) 55%,rgba(8,13,23,.84) 100%);
    --home-photo-position: center 48%;
}
.home-section--tools { padding-bottom: clamp(42px, 4vw, 58px); }
.home-section--final { margin-bottom: 0; padding-block: clamp(70px, 6vw, 92px); }

.home-kicker { display: block; color: var(--progreso-bronze); font-size: 13px; font-weight: 800; line-height: 1.35; letter-spacing: .2em; text-transform: uppercase; }
.home-section--navy .home-kicker { color: var(--progreso-gold-bright); }
.home-heading { max-width: 900px; margin-bottom: 46px; }
.home-heading h2,
.home-intro h2,
.home-contact h2 { margin: 16px 0 22px; font-family: Georgia, 'Times New Roman', serif; font-size: clamp(40px, 4vw, 58px); font-weight: 700; line-height: 1.03; text-wrap: balance; }
.home-heading p,
.home-contact p { max-width: 820px; margin: 0; color: rgba(255,255,255,.74); font-size: 17px; line-height: 1.65; }
.home-heading--dark p,
.home-section--white .home-heading p { color: var(--progreso-muted); }

/* Presentación */
.home-intro__grid { display: grid; grid-template-columns: minmax(0,.9fr) minmax(0,1.1fr); gap: clamp(52px, 7vw, 104px); align-items: start; }
.home-intro h2 { max-width: 650px; }
.home-intro__copy { padding-top: 8px; }
.home-intro__copy p { margin: 0 0 16px; color: var(--progreso-muted); font-size: 17px; line-height: 1.7; }
.home-section--navy.home-intro .home-intro__copy p { color: rgba(255,255,255,.78); }
.home-section--navy.home-intro .home-text-link { color: var(--progreso-gold-bright); }
.home-text-link,
.home-dark-card a,
.home-tool-grid a,
.home-modality-grid a { display: inline-flex; align-items: center; gap: 18px; color: var(--progreso-bronze); font-size: 13px; font-weight: 800; letter-spacing: .06em; }
.home-text-link { margin-top: 12px; }
.home-section--navy .home-dark-card a,
.home-section--navy .home-modality-grid a { color: var(--progreso-gold-bright); }

.home-principles { margin-top: 54px; display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 18px; }
.home-principles article { min-height: 228px; padding: 30px; border: 1px solid rgba(213,165,91,.32); border-top: 4px solid var(--progreso-gold); border-radius: 0 0 20px 20px; background: linear-gradient(145deg,#fbf9f5,#f3ede3); box-shadow: 0 16px 36px rgba(8,13,23,.05); }
.home-section--navy .home-principles article { background: rgba(8,13,23,.90); box-shadow: 0 18px 38px rgba(0,0,0,.24); }
.home-section--navy .home-principles h3 { color: var(--progreso-white); }
.home-section--navy .home-principles p { color: rgba(255,255,255,.72); }
.home-section--navy .home-principles span { color: var(--progreso-gold-bright); }
.home-principles span,
.home-dark-card > span,
.home-tool-grid article > span { color: var(--progreso-bronze); font-size: 12px; font-weight: 800; letter-spacing: .15em; }
.home-principles h3,
.home-dark-card h3,
.home-tool-grid h3,
.home-modality-grid h3,
.home-steps h3 { margin: 30px 0 12px; font-family: Georgia,'Times New Roman',serif; font-size: 28px; font-weight: 700; line-height: 1.1; }
.home-principles p,
.home-dark-card p,
.home-tool-grid p,
.home-modality-grid p,
.home-steps p { margin: 0; font-size: 16px; font-weight: 300; line-height: 1.6; }
.home-principles p,
.home-tool-grid p,
.home-steps p { color: var(--progreso-muted); }

/* Especialidades */
.home-specialty-grid,
.home-tool-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 22px; }
.home-dark-card { min-height: 410px; padding: 38px; display: flex; flex-direction: column; border: 1px solid rgba(213,165,91,.5); border-radius: 24px; background: linear-gradient(150deg,rgba(20,32,55,.97) 0%,rgba(8,16,29,.98) 100%); box-shadow: 0 24px 52px rgba(0,0,0,.28); transition: transform .25s ease,border-color .25s ease,box-shadow .25s ease; }
.home-dark-card:hover { transform: translateY(-5px); border-color: var(--progreso-gold); box-shadow: 0 30px 60px rgba(0,0,0,.26); }
.home-dark-card > span { color: var(--progreso-gold-bright); }
.home-dark-card h3 { margin-top: 56px; color: var(--progreso-white); font-size: clamp(34px,3vw,46px); }
.home-dark-card p,
.home-modality-grid p { color: rgba(255,255,255,.72); }
.home-dark-card a { margin-top: auto; padding-top: 32px; justify-content: space-between; }
.home-disclaimer { max-width: 940px; margin: 30px 0 0; color: rgba(255,255,255,.62); font-size: 14px; line-height: 1.65; }
.home-section--white .home-dark-card { border-color: rgba(213,165,91,.42); background: linear-gradient(145deg,#fbf9f5,#f3ede3); box-shadow: 0 18px 42px rgba(8,13,23,.08); }
.home-section--white .home-dark-card:hover { border-color: var(--progreso-gold); box-shadow: 0 24px 48px rgba(8,13,23,.12); }
.home-section--white .home-dark-card > span,
.home-section--white .home-dark-card a { color: var(--progreso-bronze); }
.home-section--white .home-dark-card h3 { color: var(--progreso-ink); }
.home-section--white .home-dark-card p { color: var(--progreso-muted); }
.home-section--white .home-disclaimer { color: var(--progreso-muted); }

/* Ruta */
.home-path { display: grid; grid-template-columns: minmax(0,.82fr) minmax(0,1.18fr); gap: clamp(56px,8vw,116px); align-items: start; }
.home-path .home-heading { position: sticky; top: 154px; margin: 0; }
.home-steps { margin: 0; padding: 0; display: grid; list-style: none; }
.home-steps li { padding: 27px 0; display: grid; grid-template-columns: 68px 1fr; gap: 24px; border-top: 1px solid rgba(155,97,37,.22); }
.home-steps li:last-child { border-bottom: 1px solid rgba(155,97,37,.22); }
.home-steps li > span,
.home-modality-grid article > span { color: var(--progreso-bronze); font-family: Georgia,'Times New Roman',serif; font-size: 31px; font-weight: 700; }
.home-steps h3 { margin: 0 0 8px; font-family: inherit; font-size: 21px; }
.home-inline-actions { grid-column: 2; display: flex; flex-wrap: wrap; gap: 14px; }

.home-section--navy .home-steps h3 { color: var(--progreso-white); }
.home-section--navy .home-steps p { color: rgba(255,255,255,.74); }
.home-section--navy .home-steps li { border-color: rgba(213,165,91,.34); }
.home-section--navy .home-steps li > span { color: var(--progreso-gold-bright); }
.home-section--navy .home-button--outline { border-color: rgba(255,255,255,.68); color: var(--progreso-white); }

.home-button { min-height: 56px; padding: 0 28px; display: inline-flex; align-items: center; justify-content: center; border: 1px solid var(--progreso-gold); border-radius: 14px; background: var(--progreso-gold); color: var(--progreso-ink); font-size: 13px; font-weight: 800; letter-spacing: .04em; transition: transform .2s ease,background .2s ease,color .2s ease; }
.home-button:hover,
.home-button:focus-visible { background: var(--progreso-bronze); color: var(--progreso-white); transform: translateY(-2px); }
.home-button--outline { background: transparent; color: var(--progreso-ink); }

/* Modalidades */
.home-modality-grid { display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 22px; }
.home-modality-grid article { min-height: 286px; padding: 38px; display: grid; grid-template-columns: 62px 1fr; gap: 26px; border: 1px solid rgba(213,165,91,.48); border-radius: 20px; background: linear-gradient(145deg,rgba(20,32,55,.97),rgba(8,16,29,.98)); box-shadow: 0 24px 52px rgba(0,0,0,.22); }
.home-modality-grid article > span { color: var(--progreso-gold-bright); }
.home-modality-grid h3 { margin: 0 0 16px; color: var(--progreso-white); font-size: clamp(30px,3vw,43px); }
.home-modality-grid a { margin-top: 28px; }

.home-section--white .home-modality-grid article { border-color: rgba(213,165,91,.42); background: linear-gradient(145deg,#fbf9f5,#f3ede3); box-shadow: 0 18px 42px rgba(8,13,23,.08); }
.home-section--white .home-modality-grid article > span,
.home-section--white .home-modality-grid a { color: var(--progreso-bronze); }
.home-section--white .home-modality-grid h3 { color: var(--progreso-ink); }
.home-section--white .home-modality-grid p { color: var(--progreso-muted); }

/* Herramientas */
.home-tool-grid article { min-height: 340px; padding: 38px; display: flex; flex-direction: column; border: 1px solid rgba(213,165,91,.36); border-radius: 24px; background: linear-gradient(145deg,#fbf9f5,#f4eee4); box-shadow: 0 18px 42px rgba(8,13,23,.06); transition: transform .25s ease,box-shadow .25s ease; }
.home-tool-grid article:hover { transform: translateY(-5px); box-shadow: 0 26px 52px rgba(8,13,23,.1); }
.home-tool-grid h3 { margin-top: 48px; font-size: clamp(31px,3vw,40px); }
.home-tool-grid a { margin-top: auto; padding-top: 30px; justify-content: space-between; }

.home-section--navy .home-tool-grid article { border-color: rgba(213,165,91,.48); background: linear-gradient(150deg,rgba(20,32,55,.94),rgba(8,16,29,.97)); box-shadow: 0 24px 52px rgba(0,0,0,.24); }
.home-section--navy .home-tool-grid article > span,
.home-section--navy .home-tool-grid a { color: var(--progreso-gold-bright); }
.home-section--navy .home-tool-grid h3 { color: var(--progreso-white); }
.home-section--navy .home-tool-grid p { color: rgba(255,255,255,.74); }

/* Cierre */
.home-contact { display: grid; grid-template-columns: minmax(0,1fr) minmax(280px,340px); gap: 42px 68px; align-items: center; }
.home-contact h2 { max-width: 820px; font-size: clamp(40px,4vw,58px); }
.home-contact p { color: rgba(255,255,255,.72); }
.home-contact__actions { display: grid; justify-items: stretch; gap: 16px; text-align: center; }
.home-contact__actions .home-button { width: 100%; }
.home-contact__actions > a:last-child { color: var(--progreso-gold-bright); font-size: 29px; font-weight: 700; }
.home-contact__sources { grid-column: 1 / -1; padding-top: 22px; display: flex; flex-wrap: wrap; gap: 12px 26px; align-items: center; border-top: 1px solid rgba(213,165,91,.32); }
.home-contact__sources > span { color: var(--progreso-gold-bright); font-size: 12px; font-weight: 800; letter-spacing: .16em; }
.home-contact__sources a { color: rgba(255,255,255,.78); font-size: 14px; font-weight: 300; text-decoration: underline; text-decoration-color: rgba(213,165,91,.5); text-underline-offset: 4px; }
.home-contact__sources a:hover,
.home-contact__sources a:focus-visible { color: var(--progreso-gold-bright); }

.home-section--white .home-contact p { color: var(--progreso-muted); }
.home-section--white .home-contact__actions > a:last-child { color: var(--progreso-bronze); }
.home-section--white .home-contact__sources { border-color: rgba(155,97,37,.24); }
.home-section--white .home-contact__sources > span { color: var(--progreso-bronze); }
.home-section--white .home-contact__sources a { color: var(--progreso-muted); }
.home-section--white .home-contact__sources a:hover,
.home-section--white .home-contact__sources a:focus-visible { color: var(--progreso-bronze); }

@media (max-width: 1120px) {
    .home-hero { min-height: 650px; height: min(720px,calc(100svh - 86px)); }
    .home-hero .progreso-hero__content { width: min(100% - 180px,980px); padding-top: 72px; }
    .home-container { width: min(100% - 48px,980px); }
    .home-principles,
    .home-specialty-grid,
    .home-tool-grid { grid-template-columns: repeat(2,minmax(0,1fr)); }
    .home-specialty-grid article:last-child,
    .home-tool-grid article:last-child { grid-column: 1 / -1; }
    .home-path { grid-template-columns: 1fr; }
    .home-path .home-heading { position: static; }
    .home-inline-actions { grid-column: 1; }
    .home-contact { grid-template-columns: 1fr; gap: 32px; }
    .home-contact__sources { grid-column: 1; }
    .home-contact__actions { width: min(100%,360px); }
}

@media (max-width: 760px) {
    .home-hero { min-height: 620px; height: min(690px,calc(100svh - 76px)); }
    .home-hero .progreso-hero__content { width: calc(100% - 40px); padding: 82px 0 calc(var(--progreso-v-depth) + 38px); }
    .home-hero .progreso-hero__overlay { background: linear-gradient(90deg,rgba(255,255,255,.98),rgba(255,255,255,.88) 66%,rgba(255,255,255,.45)); }
    .home-hero .progreso-hero__content h1,
    .home-hero .progreso-hero__content h2 { max-width: 100%; font-size: clamp(37px,10.5vw,49px); }
    .home-hero .progreso-hero__content p { max-width: calc(100% - 16px); font-size: 16px; }
    .home-container { width: calc(100% - 32px); }
    .home-section { padding: 56px 0 34px; }
    .home-section--tools { padding-bottom: 34px; }
    .home-section--final { padding-block: 60px 72px; }
    .home-section--image {
        --home-photo-overlay: linear-gradient(180deg,rgba(8,13,23,.97),rgba(8,13,23,.92));
        background-position: center;
    }
    .home-intro__grid,
    .home-principles,
    .home-specialty-grid,
    .home-tool-grid,
    .home-modality-grid { grid-template-columns: 1fr; }
    .home-specialty-grid article:last-child,
    .home-tool-grid article:last-child { grid-column: auto; }
    .home-heading { margin-bottom: 34px; }
    .home-heading h2,
    .home-intro h2,
    .home-contact h2 { font-size: clamp(36px,10.8vw,48px); }
    .home-heading p,
    .home-intro__copy p,
    .home-contact p { font-size: 16px; }
    .home-principles { margin-top: 38px; }
    .home-principles article,
    .home-dark-card,
    .home-tool-grid article { min-height: auto; padding: 28px; }
    .home-dark-card h3,
    .home-tool-grid h3 { margin-top: 38px; }
    .home-dark-card a,
    .home-tool-grid a { margin-top: 30px; }
    .home-modality-grid article { min-height: auto; padding: 28px; grid-template-columns: 1fr; gap: 16px; }
    .home-steps li { grid-template-columns: 52px 1fr; gap: 15px; }
    .home-steps li > span { font-size: 27px; }
    .home-inline-actions { display: grid; }
}

@media (max-width: 520px) {
    .home-hero .progreso-hero__content { padding-top: 72px; }
    .home-kicker { font-size: 11px; }
    .home-heading h2,
    .home-intro h2,
    .home-contact h2 { font-size: 37px; }
    .home-contact__actions > a:last-child { font-size: 26px; }
}

@media (min-width: 1121px) and (max-height: 820px) {
    .home-hero {
        min-height: 600px;
        height: calc(100svh - 132px);
    }
    .home-hero .progreso-hero__content {
        padding-top: 100px;
        padding-bottom: calc(var(--progreso-v-depth) + 26px);
    }
    .home-hero .progreso-hero__content h1,
    .home-hero .progreso-hero__content h2 {
        max-width: 590px;
        margin-block: 13px 11px;
        font-size: clamp(41px, 3.45vw, 53px);
    }
    .home-hero .progreso-hero__content p {
        max-width: 560px;
        line-height: 1.5;
    }
}

@media (prefers-reduced-motion: reduce) {
    .home-hero .progreso-hero__slide,
    .home-hero .progreso-hero__slide::before,
    .home-hero .progreso-hero__slide.is-active .progreso-hero__content > * {
        animation: none !important;
        transition: none !important;
        transform: none !important;
    }
    .home-dark-card,
    .home-tool-grid article,
    .home-button { transition: none; }
}
