/* MANP — Identidad visual
 * Tipografías de marca: coloca los archivos .woff2 en /fonts/
 *   - Avenir-Heavy.woff2 (tagline)
 *   - Avenir-Roman.woff2 / Avenir-Medium.woff2 (cuerpo)
 *   - BebasNeuePro-Bold.woff2 (titulares)
 * Mientras tanto se usan fallbacks web cercanos.
 */

@font-face {
    font-family: "Avenir";
    src: local("Avenir"), local("Avenir Next"), local("Avenir-Roman");
    font-weight: 400;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Avenir";
    src: local("Avenir Heavy"), local("Avenir-Heavy"), local("Avenir Next Demi Bold");
    font-weight: 800;
    font-style: normal;
    font-display: swap;
}

@font-face {
    font-family: "Bebas Neue Pro";
    src: local("Bebas Neue Pro Bold"), local("BebasNeuePro-Bold");
    font-weight: 700;
    font-style: normal;
    font-display: swap;
}

:root {
    --manp-primary: #1b3f8c;
    --manp-blue-2: #3264ad;
    --manp-blue-3: #678fca;
    --manp-blue-4: #92c8ed;
    --manp-dark: #0f1f3d;
    --manp-text: #2a3548;
    --manp-muted: #5c6b82;
    --manp-light: #f4f7fb;
    --manp-white: #ffffff;
    --font-display: "Bebas Neue Pro", "Bebas Neue", sans-serif;
    --font-body: "Avenir", "Nunito Sans", "Segoe UI", sans-serif;
    --font-tagline: "Avenir", "Nunito Sans", sans-serif;
    --chamfer: 14px;
    --section-pad: clamp(4rem, 8vw, 6.5rem);
    --container: min(1140px, 92vw);
}

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

html {
    scroll-behavior: smooth;
}

body {
    margin: 0;
    font-family: var(--font-body);
    font-weight: 400;
    font-size: 1.05rem;
    line-height: 1.65;
    color: var(--manp-text);
    background: var(--manp-white);
    -webkit-font-smoothing: antialiased;
}

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

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

ul {
    list-style: none;
    margin: 0;
    padding: 0;
}

/* —— Utilidades —— */
.container {
    width: var(--container);
    margin-inline: auto;
}

.section {
    padding-block: var(--section-pad);
}

.section--light {
    background: var(--manp-light);
}

.section--contact {
    background: linear-gradient(
        180deg,
        var(--manp-light) 0%,
        rgba(146, 200, 237, 0.14) 100%
    );
    border-top: 1px solid rgba(27, 63, 140, 0.1);
}

.section--gradient {
    background: linear-gradient(
        135deg,
        var(--manp-primary) 0%,
        var(--manp-blue-2) 40%,
        var(--manp-blue-3) 75%,
        var(--manp-blue-4) 100%
    );
    color: var(--manp-white);
}

.tagline {
    font-family: var(--font-tagline);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.22em;
    text-transform: uppercase;
    color: var(--manp-blue-2);
    margin-bottom: 0.75rem;
}

.section--gradient .tagline {
    color: rgba(255, 255, 255, 0.85);
}

.heading {
    font-family: var(--font-display);
    font-weight: 700;
    font-size: clamp(2.4rem, 5vw, 3.5rem);
    line-height: 1.05;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    color: var(--manp-primary);
    margin: 0 0 1rem;
}

.section--gradient .heading {
    color: var(--manp-white);
}

.lead {
    font-size: 1.125rem;
    color: var(--manp-muted);
    max-width: 52ch;
    margin: 0;
}

.section--gradient .lead {
    color: rgba(255, 255, 255, 0.92);
}

/* Esquinas biseladas (motivo del logo) */
.chamfer {
    clip-path: polygon(
        var(--chamfer) 0,
        100% 0,
        100% calc(100% - var(--chamfer)),
        calc(100% - var(--chamfer)) 100%,
        0 100%,
        0 var(--chamfer)
    );
}

.chamfer--tr {
    clip-path: polygon(
        0 0,
        calc(100% - var(--chamfer)) 0,
        100% var(--chamfer),
        100% 100%,
        0 100%
    );
}

/* —— Botones —— */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.9rem 1.75rem;
    font-family: var(--font-tagline);
    font-weight: 800;
    font-size: 0.8rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    border: none;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.btn--primary {
    background: var(--manp-primary);
    color: var(--manp-white);
    box-shadow: 0 8px 24px rgba(27, 63, 140, 0.35);
}

.btn--primary:hover {
    background: var(--manp-blue-2);
    transform: translateY(-2px);
}

.btn--outline {
    background: transparent;
    color: var(--manp-primary);
    border: 2px solid var(--manp-primary);
}

.btn--outline:hover {
    background: var(--manp-primary);
    color: var(--manp-white);
}

.btn--light {
    background: var(--manp-white);
    color: var(--manp-primary);
}

.btn--light:hover {
    background: var(--manp-blue-4);
    color: var(--manp-dark);
}

/* —— Placeholders de imagen —— */
.img-placeholder {
    position: relative;
    width: 100%;
    aspect-ratio: 16 / 10;
    background: linear-gradient(
        145deg,
        #e8edf5 0%,
        #d4dce8 50%,
        #c5d0e2 100%
    );
    border: 2px dashed rgba(27, 63, 140, 0.25);
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
}

.img-placeholder::before {
    content: "";
    position: absolute;
    inset: 0;
    background: repeating-linear-gradient(
        -45deg,
        transparent,
        transparent 12px,
        rgba(27, 63, 140, 0.04) 12px,
        rgba(27, 63, 140, 0.04) 24px
    );
}

.img-placeholder span {
    position: relative;
    z-index: 1;
    font-family: var(--font-tagline);
    font-weight: 800;
    font-size: 0.75rem;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    color: var(--manp-blue-2);
    padding: 0.5rem 1rem;
    background: rgba(255, 255, 255, 0.85);
}

.img-placeholder--square {
    aspect-ratio: 1;
}

.img-placeholder--wide {
    aspect-ratio: 21 / 9;
}

.img-placeholder--portrait {
    aspect-ratio: 3 / 4;
}

/* —— Barra superior —— */
.topbar {
    background: var(--manp-dark);
    color: rgba(255, 255, 255, 0.88);
    font-size: 0.85rem;
    padding: 0.45rem 0;
}

.topbar .container {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.5rem 1.5rem;
}

.topbar a {
    color: var(--manp-blue-4);
}

.topbar a:hover {
    color: var(--manp-white);
}

/* —— Navegación —— */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: var(--manp-dark);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    transition: box-shadow 0.25s ease;
}

.header.is-scrolled {
    box-shadow: 0 4px 24px rgba(0, 0, 0, 0.35);
}

.nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
    padding: 0.85rem 0;
}

.nav__brand img {
    height: 48px;
    width: auto;
}

.nav__toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
    background: none;
    border: none;
    cursor: pointer;
}

.nav__toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--manp-blue-4);
    transition: transform 0.25s ease, opacity 0.25s ease;
}

.nav__menu {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav__link {
    font-family: var(--font-tagline);
    font-weight: 800;
    font-size: 0.78rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.88);
    position: relative;
}

.nav__link::after {
    content: "";
    position: absolute;
    left: 0;
    bottom: -4px;
    width: 0;
    height: 2px;
    background: var(--manp-blue-3);
    transition: width 0.25s ease;
}

.nav__link:hover,
.nav__link.is-active {
    color: var(--manp-blue-4);
}

.nav__link:hover::after,
.nav__link.is-active::after {
    width: 100%;
}

/* —— Hero —— */
.hero {
    position: relative;
    min-height: min(92vh, 820px);
    display: grid;
    align-items: center;
    overflow: hidden;
}

.hero__media {
    position: absolute;
    inset: 0;
}

.hero__media .img-placeholder {
    height: 100%;
    aspect-ratio: unset;
    min-height: 100%;
    border: none;
}

.hero__media .img-placeholder span {
    display: none;
}

.hero__overlay {
    position: absolute;
    inset: 0;
    background: linear-gradient(
        105deg,
        rgba(15, 31, 61, 0.92) 0%,
        rgba(27, 63, 140, 0.78) 45%,
        rgba(50, 100, 173, 0.55) 100%
    );
}

.hero__content {
    position: relative;
    z-index: 2;
    padding-block: clamp(3rem, 10vw, 6rem);
}

.hero__content .tagline {
    color: var(--manp-blue-4);
}

.hero__title {
    font-family: var(--font-display);
    font-size: clamp(3rem, 9vw, 5.5rem);
    line-height: 0.95;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    color: var(--manp-white);
    margin: 0 0 1.25rem;
    max-width: 14ch;
}

.hero__text {
    color: rgba(255, 255, 255, 0.9);
    max-width: 48ch;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.hero__actions {
    display: flex;
    flex-wrap: wrap;
    gap: 1rem;
}

.hero__stats {
    display: flex;
    flex-wrap: wrap;
    gap: 2.5rem;
    margin-top: 3rem;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.2);
}

.hero__stat strong {
    display: block;
    font-family: var(--font-display);
    font-size: 2.5rem;
    color: var(--manp-blue-4);
    line-height: 1;
}

.hero__stat span {
    font-size: 0.85rem;
    color: rgba(255, 255, 255, 0.75);
    letter-spacing: 0.05em;
}

/* —— Servicios —— */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(min(100%, 300px), 1fr));
    gap: 1.5rem;
    margin-top: 2.5rem;
}

.service-card {
    background: var(--manp-white);
    padding: 2rem 1.75rem;
    border: 1px solid rgba(27, 63, 140, 0.1);
    transition: transform 0.25s ease, box-shadow 0.25s ease;
}

.service-card:hover {
    transform: translateY(-6px);
    box-shadow: 0 20px 40px rgba(27, 63, 140, 0.12);
}

.service-card__icon {
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--manp-white);
    margin-bottom: 1.25rem;
}

.service-card:nth-child(1) .service-card__icon {
    background: var(--manp-primary);
}

.service-card:nth-child(2) .service-card__icon {
    background: var(--manp-blue-2);
}

.service-card:nth-child(3) .service-card__icon {
    background: var(--manp-blue-3);
}

.service-card:nth-child(4) .service-card__icon {
    background: var(--manp-blue-4);
    color: var(--manp-dark);
}

.service-card:nth-child(5) .service-card__icon {
    background: var(--manp-primary);
}

.service-card h3 {
    font-family: var(--font-display);
    font-size: 1.65rem;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--manp-primary);
    margin: 0 0 0.75rem;
}

.service-card p {
    margin: 0;
    color: var(--manp-muted);
    font-size: 0.98rem;
}

.service-card ul {
    margin: 0;
    padding-left: 1.2rem;
    list-style: disc;
}

.service-card li {
    color: var(--manp-muted);
    font-size: 0.95rem;
    line-height: 1.55;
    margin-bottom: 0.55rem;
}

.service-card li:last-child {
    margin-bottom: 0;
}

.service-card li::marker {
    color: var(--manp-blue-3);
}

/* —— Sobre nosotros —— */
.about-layout {
    display: flex;
    flex-direction: column;
    gap: 2.5rem;
}

.about-intro-row {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3rem;
    align-items: center;
}

.about-intro__image {
    width: 100%;
    height: 100%;
    min-height: 280px;
    object-fit: cover;
    object-position: center;
    box-shadow: 0 12px 40px rgba(27, 63, 140, 0.15);
}

.about-mv-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1.5rem;
}

.about-mv {
    padding: 1.75rem 1.5rem;
    background: var(--manp-light);
    border: 1px solid rgba(27, 63, 140, 0.1);
}

.about-mv__label {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    margin-bottom: 1rem;
    font-family: var(--font-display);
    font-size: 1.25rem;
    color: var(--manp-white);
    background: var(--manp-primary);
}

.about-mv:nth-child(2) .about-mv__label {
    background: var(--manp-blue-2);
}

.about-mv h4 {
    margin: 0 0 0.75rem;
    font-family: var(--font-display);
    font-size: 1.2rem;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    color: var(--manp-primary);
}

.about-mv p {
    margin: 0;
    font-size: 0.95rem;
    color: var(--manp-muted);
    line-height: 1.6;
}

/* —— Clientes —— */
.clients-intro {
    margin-inline: auto;
    text-align: center;
    max-width: 62ch;
}

.clients-carousel {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-top: 2.5rem;
}

.clients-carousel__viewport {
    flex: 1;
    overflow: hidden;
}

.clients-carousel__track {
    display: flex;
    gap: 1.5rem;
    transition: transform 0.45s ease;
    will-change: transform;
}

.clients-carousel__slide {
    flex: 0 0 calc((100% - 4.5rem) / 4);
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 175px;
    padding: 0.85rem 1rem;
    background: var(--manp-white);
    border: 1px solid rgba(27, 63, 140, 0.1);
    box-shadow: 0 6px 20px rgba(27, 63, 140, 0.06);
}

.clients-carousel__slide img {
    width: 100%;
    height: 135px;
    max-width: 100%;
    object-fit: contain;
    object-position: center;
    filter: grayscale(100%);
    opacity: 0.85;
    transition: filter 0.25s ease, opacity 0.25s ease;
}

.clients-carousel__slide:hover img {
    filter: grayscale(0%);
    opacity: 1;
}

.clients-carousel__btn {
    flex-shrink: 0;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--manp-primary);
    color: var(--manp-white);
    border: none;
    cursor: pointer;
    font-size: 1.25rem;
    transition: background 0.2s ease, transform 0.2s ease;
}

.clients-carousel__btn:hover {
    background: var(--manp-blue-2);
}

.clients-carousel__btn:disabled {
    opacity: 0.4;
    cursor: not-allowed;
}

/* —— Galería —— */
.gallery-grid {
    display: grid;
    grid-template-columns: repeat(12, 1fr);
    gap: 1rem;
    margin-top: 2rem;
}

.gallery-grid .img-placeholder {
    grid-column: span 4;
}

.gallery-grid .img-placeholder:nth-child(1) {
    grid-column: span 8;
    aspect-ratio: 16 / 9;
}

.gallery-grid .img-placeholder:nth-child(2),
.gallery-grid .img-placeholder:nth-child(3) {
    aspect-ratio: 4 / 3;
}

/* —— CTA —— */
.cta-box {
    display: grid;
    grid-template-columns: 1.2fr 1fr;
    gap: 2.5rem;
    align-items: center;
    padding: clamp(2rem, 5vw, 3.5rem);
    background: var(--manp-white);
    margin-top: -3rem;
    position: relative;
    z-index: 2;
    box-shadow: 0 24px 60px rgba(27, 63, 140, 0.15);
}

.cta-box .heading {
    margin-bottom: 0.5rem;
}

/* —— Contacto —— */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.1fr;
    gap: 3rem;
    align-items: start;
}

.contact-intro .heading {
    margin-bottom: 1.5rem;
}

.contact-info {
    display: grid;
    gap: 1.5rem;
}

.contact-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}

.contact-item i {
    font-size: 1.25rem;
    color: var(--manp-blue-3);
    margin-top: 0.15rem;
}

.contact-item strong {
    display: block;
    font-family: var(--font-display);
    font-size: 1rem;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: var(--manp-primary);
    margin-bottom: 0.25rem;
}

.contact-form {
    display: grid;
    gap: 1rem;
}

.contact-form label {
    font-family: var(--font-tagline);
    font-weight: 800;
    font-size: 0.72rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--manp-muted);
}

.contact-form input,
.contact-form textarea {
    width: 100%;
    padding: 0.85rem 1rem;
    border: 1px solid rgba(27, 63, 140, 0.2);
    font-family: var(--font-body);
    font-size: 1rem;
    background: var(--manp-white);
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

.contact-form input:focus,
.contact-form textarea:focus {
    outline: none;
    border-color: var(--manp-blue-3);
    box-shadow: 0 0 0 3px rgba(103, 143, 202, 0.25);
}

.contact-form textarea {
    min-height: 120px;
    resize: vertical;
}

/* —— Footer —— */
.footer {
    background: var(--manp-dark);
    color: rgba(255, 255, 255, 0.8);
    padding-block: 3rem 1.5rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.4fr 1fr 1fr;
    gap: 2.5rem;
    padding-bottom: 2.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.footer__logo {
    height: 56px;
    width: auto;
    margin-bottom: 1rem;
}

.footer h4 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--manp-blue-4);
    margin: 0 0 1rem;
}

.footer ul li {
    margin-bottom: 0.5rem;
}

.footer a:hover {
    color: var(--manp-blue-4);
}

.footer-bottom {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding-top: 1.5rem;
    font-size: 0.88rem;
}

.footer-bottom .tagline {
    color: var(--manp-blue-4);
    margin: 0;
}

/* —— WhatsApp flotante —— */
.whatsapp-float {
    position: fixed;
    right: 1.5rem;
    bottom: 5.75rem;
    z-index: 91;
    width: 56px;
    height: 56px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: #25d366;
    color: var(--manp-white);
    font-size: 1.75rem;
    box-shadow: 0 8px 24px rgba(37, 211, 102, 0.45);
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.whatsapp-float:hover {
    background: #20bd5a;
    color: var(--manp-white);
    transform: translateY(-3px);
    box-shadow: 0 12px 28px rgba(37, 211, 102, 0.5);
}

/* —— Volver arriba —— */
.back-top {
    position: fixed;
    right: 1.5rem;
    bottom: 1.5rem;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--manp-primary);
    color: var(--manp-white);
    border: none;
    cursor: pointer;
    opacity: 0;
    visibility: hidden;
    transform: translateY(12px);
    transition: opacity 0.25s ease, visibility 0.25s ease, transform 0.25s ease;
    z-index: 90;
}

.back-top.is-visible {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.back-top:hover {
    background: var(--manp-blue-2);
}

/* —— Responsive —— */
@media (max-width: 992px) {
    .services-grid {
        grid-template-columns: 1fr;
    }

    .about-intro-row,
    .contact-grid,
    .cta-box,
    .footer-grid {
        grid-template-columns: 1fr;
    }

    .clients-carousel__slide {
        flex: 0 0 calc((100% - 1.5rem) / 2);
        min-height: 155px;
    }

    .clients-carousel__slide img {
        height: 110px;
    }

    .gallery-grid .img-placeholder,
    .gallery-grid .img-placeholder:nth-child(1) {
        grid-column: span 12;
    }
}

@media (max-width: 768px) {
    .nav__toggle {
        display: flex;
    }

    .nav__menu {
        position: fixed;
        top: 0;
        right: 0;
        width: min(300px, 85vw);
        height: 100vh;
        flex-direction: column;
        align-items: flex-start;
        padding: 5rem 2rem 2rem;
        background: var(--manp-dark);
        box-shadow: -8px 0 40px rgba(0, 0, 0, 0.4);
        transform: translateX(100%);
        transition: transform 0.3s ease;
        gap: 1.5rem;
    }

    .nav__menu.is-open {
        transform: translateX(0);
    }

    .nav__toggle.is-active span:nth-child(1) {
        transform: translateY(7px) rotate(45deg);
    }

    .nav__toggle.is-active span:nth-child(2) {
        opacity: 0;
    }

    .nav__toggle.is-active span:nth-child(3) {
        transform: translateY(-7px) rotate(-45deg);
    }

    .clients-carousel__slide {
        flex: 0 0 100%;
        min-height: 140px;
    }

    .clients-carousel__slide img {
        height: 100px;
    }

    .about-intro-row,
    .about-mv-grid {
        grid-template-columns: 1fr;
    }

    .hero__stats {
        gap: 1.5rem;
    }
}
