:root {
    --home-brand: #1d4ed8;
    --home-brand-deep: #1e3a8a;
    --home-accent: #0ea5e9;
    --home-ink: #0f172a;
    --home-ink-soft: #334155;
    --home-muted: #64748b;
    --home-paper: #f8fafc;
    --home-line: #e2e8f0;
    --home-white: #ffffff;
    --home-ease: cubic-bezier(0.22, 1, 0.36, 1);
    --home-max: 1120px;
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    color: var(--home-ink);
    font-family: 'Lato', sans-serif;
    font-size: 1.0625rem;
    line-height: 1.6;
    background: var(--home-paper);
    -webkit-font-smoothing: antialiased;
}

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

a {
    color: inherit;
    text-decoration: none;
}

.site-header {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    z-index: 20;
    padding: 1.25rem 1.5rem;
}

.site-header__inner {
    max-width: var(--home-max);
    margin: 0 auto;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.brand {
    font-family: 'Montserrat', sans-serif;
    font-weight: 700;
    font-size: 1.05rem;
    letter-spacing: 0.02em;
    color: var(--home-white);
}

.nav-link {
    font-family: 'Montserrat', sans-serif;
    font-size: 0.85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, 0.88);
    transition: color 0.2s ease;
}

.nav-link:hover,
.nav-link:focus-visible {
    color: var(--home-white);
}

/* ---- Hero: one composition, brand first, full-bleed image ---- */
.hero {
    position: relative;
    min-height: 100vh;
    min-height: 100dvh;
    display: grid;
    align-items: end;
    overflow: hidden;
    color: var(--home-white);
}

.hero__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(120deg, rgba(15, 23, 42, 0.82) 0%, rgba(29, 78, 216, 0.55) 48%, rgba(14, 165, 233, 0.35) 100%),
        url('../template/images/cliente-satisfecho-color.jpg') center / cover no-repeat;
    transform: scale(1.04);
    animation: hero-zoom 12s var(--home-ease) both;
}

.hero__content {
    position: relative;
    z-index: 1;
    max-width: var(--home-max);
    width: 100%;
    margin: 0 auto;
    padding: 7.5rem 1.5rem 4.5rem;
}

.hero__brand {
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(2.75rem, 7vw, 5.25rem);
    font-weight: 700;
    line-height: 0.95;
    letter-spacing: -0.03em;
    margin: 0 0 1.25rem;
    max-width: 12ch;
    opacity: 0;
    transform: translateY(28px);
    animation: rise 0.9s var(--home-ease) 0.15s forwards;
}

.hero__lead {
    margin: 0 0 2rem;
    max-width: 34rem;
    font-size: clamp(1.05rem, 2.2vw, 1.25rem);
    line-height: 1.55;
    color: rgba(255, 255, 255, 0.9);
    opacity: 0;
    transform: translateY(28px);
    animation: rise 0.9s var(--home-ease) 0.35s forwards;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.85rem;
    opacity: 0;
    transform: translateY(28px);
    animation: rise 0.9s var(--home-ease) 0.55s forwards;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 3rem;
    padding: 0.85rem 1.4rem;
    border-radius: 0.5rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 0.9rem;
    font-weight: 700;
    border: 1px solid transparent;
    transition: transform 0.2s ease, background 0.2s ease, border-color 0.2s ease, color 0.2s ease;
}

.btn:hover,
.btn:focus-visible {
    transform: translateY(-1px);
}

.btn--primary {
    background: var(--home-white);
    color: var(--home-brand-deep);
}

.btn--primary:hover,
.btn--primary:focus-visible {
    background: #e8f0ff;
}

.btn--ghost {
    background: transparent;
    color: var(--home-white);
    border-color: rgba(255, 255, 255, 0.45);
}

.btn--ghost:hover,
.btn--ghost:focus-visible {
    border-color: var(--home-white);
    background: rgba(255, 255, 255, 0.08);
}

/* ---- Features: one job ---- */
.features {
    padding: 5.5rem 1.5rem;
    background:
        radial-gradient(ellipse 80% 50% at 10% 0%, rgba(37, 99, 235, 0.08), transparent 55%),
        radial-gradient(ellipse 60% 40% at 90% 100%, rgba(14, 165, 233, 0.08), transparent 50%),
        var(--home-paper);
}

.features__inner {
    max-width: var(--home-max);
    margin: 0 auto;
}

.features__title {
    margin: 0 0 3rem;
    text-align: center;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.75rem, 3.5vw, 2.35rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
    color: var(--home-ink);
}

.feature-grid {
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2rem 1.75rem;
    width: 100%;
    align-items: start;
}

.feature {
    text-align: center;
    min-width: 0;
    opacity: 0;
    transform: translateY(22px);
    transition: opacity 0.7s var(--home-ease), transform 0.7s var(--home-ease);
}

.feature.is-visible {
    opacity: 1;
    transform: translateY(0);
}

.feature:nth-child(2) {
    transition-delay: 0.1s;
}

.feature:nth-child(3) {
    transition-delay: 0.2s;
}

.feature__icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 5rem;
    height: 5rem;
    margin: 0 auto 1.35rem;
    border-radius: 1.25rem;
    color: var(--home-brand);
    background: linear-gradient(145deg, rgba(37, 99, 235, 0.14), rgba(14, 165, 233, 0.1));
    box-shadow: inset 0 0 0 1px rgba(37, 99, 235, 0.12);
}

.feature__icon svg {
    width: 2.4rem;
    height: 2.4rem;
}

.feature:nth-child(2) .feature__icon {
    color: #0369a1;
    background: linear-gradient(145deg, rgba(14, 165, 233, 0.16), rgba(37, 99, 235, 0.08));
    box-shadow: inset 0 0 0 1px rgba(14, 165, 233, 0.16);
}

.feature:nth-child(3) .feature__icon {
    color: #1e3a8a;
    background: linear-gradient(145deg, rgba(30, 58, 138, 0.12), rgba(37, 99, 235, 0.1));
    box-shadow: inset 0 0 0 1px rgba(30, 58, 138, 0.14);
}

.feature h3 {
    margin: 0 0 0.55rem;
    font-family: 'Montserrat', sans-serif;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--home-ink);
}

.feature p {
    margin: 0 auto;
    color: var(--home-ink-soft);
    max-width: 18rem;
    line-height: 1.55;
}

.feature strong {
    color: var(--home-ink);
    font-weight: 700;
}

/* ---- Closing CTA ---- */
.closing {
    position: relative;
    padding: 5.5rem 1.5rem;
    color: var(--home-white);
    overflow: hidden;
}

.closing__media {
    position: absolute;
    inset: 0;
    background:
        linear-gradient(160deg, rgba(15, 23, 42, 0.88) 0%, rgba(30, 58, 138, 0.78) 55%, rgba(29, 78, 216, 0.7) 100%),
        url('../template/images/libros.jpg') center / cover no-repeat;
}

.closing__inner {
    position: relative;
    z-index: 1;
    max-width: 40rem;
    margin: 0 auto;
    text-align: center;
}

.closing__inner h2 {
    margin: 0 0 0.75rem;
    font-family: 'Montserrat', sans-serif;
    font-size: clamp(1.85rem, 4vw, 2.6rem);
    font-weight: 700;
    letter-spacing: -0.02em;
    line-height: 1.15;
}

.closing__inner p {
    margin: 0 0 1.75rem;
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.88);
}

.site-footer {
    padding: 1.5rem;
    background: var(--home-ink);
    color: rgba(255, 255, 255, 0.65);
}

.site-footer__inner {
    max-width: var(--home-max);
    margin: 0 auto;
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem 1.5rem;
    justify-content: space-between;
    align-items: center;
    font-size: 0.9rem;
}

.site-footer .brand {
    font-size: 0.95rem;
}

@keyframes rise {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes hero-zoom {
    from {
        transform: scale(1.08);
    }
    to {
        transform: scale(1.04);
    }
}

@media (prefers-reduced-motion: reduce) {
    html {
        scroll-behavior: auto;
    }

    .hero__media,
    .hero__brand,
    .hero__lead,
    .hero__actions,
    .feature {
        animation: none;
        transition: none;
        opacity: 1;
        transform: none;
    }
}

@media (max-width: 560px) {
    .feature-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
    }

    .hero__content {
        padding-top: 6.5rem;
        padding-bottom: 3.25rem;
    }

    .features,
    .closing {
        padding: 4rem 1.25rem;
    }

    .features__title {
        margin-bottom: 2.25rem;
    }
}
