/* Global visual rhythm, navigation state and viewport-aware public layout. */

:root {
    --site-navbar-height: 64px;
}

/* The fixed navbar offset must match its real rendered height. The JS updates this variable. */
body {
    padding-top: var(--site-navbar-height) !important;
}

/* ---------- Navbar active state ---------- */
.navbar .nav-link {
    position: relative;
    transition: color .18s ease, background-color .18s ease;
}

/* The demo link used to be permanently orange. Keep it neutral unless active. */
.navbar .nav-link[href="/demo-sitio-web/"]:not(.site-nav-active) {
    color: rgba(255,255,255,.8) !important;
}

.navbar .nav-link.site-nav-active {
    color: var(--color-main) !important;
    font-weight: 700;
}

.navbar .nav-link.site-nav-active::after {
    content: "";
    position: absolute;
    left: .5rem;
    right: .5rem;
    bottom: .15rem;
    height: 2px;
    border-radius: 999px;
    background: var(--color-main);
    transform-origin: center;
}

/* ---------- Viewport rhythm ---------- */
/* Hero fills the usable first screen exactly, without the old white strip. */
.home-premium .home-hero {
    min-height: calc(100svh - var(--site-navbar-height));
}

.home-premium .home-hero-copy {
    padding-top: clamp(2.8rem, 6vh, 4.4rem);
    padding-bottom: clamp(2.8rem, 6vh, 4.4rem);
}

/* Slightly smaller display type so the complete hero breathes inside one screen. */
.home-premium .home-display {
    font-size: clamp(2.55rem, 4.55vw, 4.65rem);
    line-height: 1.01;
}

.home-premium .home-section-title {
    font-size: clamp(1.9rem, 3vw, 3rem);
}

/* Main content blocks aim to occupy one viewport. min-height avoids clipping dense sections. */
.home-premium .home-section {
    min-height: calc(100svh - var(--site-navbar-height));
    display: flex;
    align-items: center;
    padding-top: clamp(3.5rem, 7vh, 5.25rem);
    padding-bottom: clamp(3.5rem, 7vh, 5.25rem);
}

.home-premium .home-section > .home-container {
    width: min(1180px, calc(100% - 2rem));
}

/* Service landing hero uses the same full-screen first impression. */
.service-landing-hero {
    min-height: calc(100svh - var(--site-navbar-height));
    display: flex;
    align-items: center;
}

/* Contact hero also aligns to the available viewport instead of leaving a top gap. */
.contact-hero {
    min-height: calc(100svh - var(--site-navbar-height));
    display: flex;
    align-items: center;
}

/* ---------- Public-site section rhythm ---------- */
.home-premium .home-section-soft {
    background: #f7f8fa;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
}

/* Sections that explain a process get a barely tinted canvas, while cards remain white. */
.home-premium .home-section:has(.home-conversion-wrap) {
    background: #fbfbfc;
    border-top: 1px solid #f0f1f3;
    border-bottom: 1px solid #f0f1f3;
}

/* Dark feature shells feel intentional when separated from surrounding white. */
.home-premium .home-section:has(.home-growth-shell) {
    background: #f8f9fa;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
}

/* Keep dark sections restrained: solid charcoal with only a tiny tonal shift. */
.home-premium .home-section-dark {
    background: linear-gradient(135deg, #151719 0%, #1a1d20 100%);
}

.home-premium .home-growth-shell {
    background: linear-gradient(135deg, #15181b 0%, #191c20 100%);
}

/* Service landing pages already alternate sections; make the separation clearer but subtle. */
.service-section-soft {
    background: #f7f8fa;
    border-top: 1px solid #eef0f2;
    border-bottom: 1px solid #eef0f2;
}

.service-section-dark {
    background: linear-gradient(135deg, #171717 0%, #1c1d1f 100%);
}

/* Contact page: clear alternating surfaces without gradients on light areas. */
.contact-main {
    background: #f7f8fa;
    border-bottom: 1px solid #eceef1;
}

.contact-after {
    background: #fff;
}

/* Avoid visual gaps where two discreet surfaces meet. */
.home-premium .home-proof-bar,
.service-landing-proof {
    box-shadow: none;
}

@media (max-width: 991.98px) {
    .navbar .nav-link.site-nav-active::after {
        display: none;
    }

    .navbar .nav-link.site-nav-active {
        margin-top: .15rem;
        margin-bottom: .15rem;
        padding-left: .85rem;
        border-radius: 9px;
        background: rgba(255,107,0,.09);
        box-shadow: inset 3px 0 0 var(--color-main);
    }

    /* On tablets, content density matters more than forcing a full viewport per section. */
    .home-premium .home-section {
        min-height: auto;
        padding-top: 4.5rem;
        padding-bottom: 4.5rem;
    }

    .home-premium .home-display {
        font-size: clamp(2.5rem, 8vw, 4rem);
    }
}

@media (max-width: 575.98px) {
    .home-premium .home-hero,
    .service-landing-hero,
    .contact-hero {
        min-height: calc(100svh - var(--site-navbar-height));
    }

    .home-premium .home-hero-copy {
        padding-top: 3rem;
        padding-bottom: 3rem;
    }
}

@media (prefers-reduced-motion: reduce) {
    .navbar .nav-link {
        transition: none;
    }
}
