/* =========================================================
   Nuevo León · Manufactura en México (/nuevo-leon/manufactura-mexico)
   Diseño del PDF "ERP para Manufactura en México" (base 1024 px).
   Piezas comunes (pill, botón, navbar, FAQ, formulario, eslogan) copiadas de nuevo-leon/mantenimiento-industrial.css;
   usa el mismo proyectos.js, por eso conserva los nombres .pj-*. Lo propio de esta landing va con .mx-*.
   Imágenes en public/img/nuevo-leon/manufactura-mexico/; cada hueco (.pj-slot) muestra su data-file mientras falte.
   ========================================================= */
:root {
    --pj-navy: #002b66;
    --pj-deep: #001c43;
    --pj-blue: #0066ff;
    --pj-sky: #38b6ff;
    --pj-ink: #0b1a4f;
    --pj-text: #283350;
    --pj-muted: #4a5675;
    --pj-soft: #deeefe;
    --pj-line: #d6e4fb;
    --pj-white: #ffffff;
    --pj-ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

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

.pj-page {
    margin: 0;
    overflow-x: hidden;
    color: var(--pj-text);
    background: var(--pj-white);
    font-family: "Montserrat", Arial, sans-serif;
}

.pj-page h1,
.pj-page h2,
.pj-page h3,
.pj-page p,
.pj-page ul,
.pj-page ol {
    margin: 0;
}

.pj-page ul,
.pj-page ol {
    padding: 0;
    list-style: none;
}

.pj-container {
    width:80%;
    margin-inline: auto;
}

.pj-section {
    padding: clamp(64px, 8vw, 120px) 0;
}

.pj-split {
    display: grid;
    grid-template-columns: minmax(0, 42fr) minmax(0, 58fr);
    gap: clamp(32px, 4vw, 64px);
    align-items: center;
}

.pj-center {
    text-align: center;
}

.pj-blue {
    color: var(--pj-blue);
}

.pj-sky {
    color: var(--pj-sky);
}

/* ---------- Huecos de imagen ---------- */
.pj-slot {
    position: relative;
}

.pj-slot img {
    display: block;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.pj-slot.is-missing {
    background: rgba(0, 102, 255, 0.07);
    outline: 2px dashed rgba(0, 102, 255, 0.4);
    outline-offset: -2px;
}

.pj-slot.is-missing img {
    visibility: hidden;
}

.pj-slot.is-missing::after {
    content: "Imagen: " attr(data-file);
    position: absolute;
    inset: 0;
    display: grid;
    place-items: center;
    padding: 12px;
    color: var(--pj-blue);
    font-size: calc(1.2 * 0.85rem);
    font-weight: 600;
    text-align: center;
}


/* ---------- Piezas comunes ---------- */
.pj-pill {
    display: inline-block;
    margin-bottom: 18px;
    padding: 7px clamp(22px, 3vw, 40px);
    border-radius: 999px;
    background: var(--pj-soft);
    color: var(--pj-blue);
    font-size: calc(1.2 * 1.35rem);
    font-weight: 700;
    letter-spacing: 0.02em;
    text-transform: uppercase;
}

.pj-pill--solid {
    background: var(--pj-blue);
    color: var(--pj-white);
}

.pj-title {
    color: var(--pj-ink);
    font-size: calc(1.2 * clamp(2.1rem, 3.6vw, 3.3rem));
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.01em;
    text-wrap: pretty;
}

.pj-title span {
    display: block;
}

.pj-title--white {
    color: var(--pj-white);
}

.pj-title--xl {
    font-size: calc(1.2 * clamp(2.1rem, 4.2vw, 3.8rem));
}

.pj-text {
    margin-top: 18px !important;
    max-width: 62ch;
    color: var(--pj-text);
    font-size: calc(1.2 * clamp(1rem, 1.15vw, 1.15rem));
    line-height: 1.55;
}

.pj-text--light {
    color: rgba(255, 255, 255, 0.86);
}

/* .pj-page p pone margin: 0; por eso se sube la especificidad */
.pj-page .pj-measure {
    max-width: 64ch;
    margin-inline: auto;
}

.pj-btn {
    display: inline-flex;
    align-items: center;
    gap: 14px;
    margin-top: 28px;
    padding: 15px 30px;
    border: 2px solid transparent;
    border-radius: 999px;
    background: var(--pj-blue);
    color: var(--pj-white);
    font-size: calc(1.2 * 1rem);
    font-weight: 600;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease;
}

.pj-btn:hover {
    color: var(--pj-white);
    transform: translateY(-2px);
    box-shadow: 0 14px 30px -12px rgba(0, 102, 255, 0.8);
}

.pj-btn--outline {
    border-color: #7fb3ff;
    padding-inline: 48px;
}

.pj-btn:focus-visible,
.pj-form__submit:focus-visible,
.pj-form__advisor:focus-visible {
    outline: 3px solid rgba(56, 182, 255, 0.6);
    outline-offset: 3px;
}

/* ---------- Navbar: <x-header-landing> en píldora azul sobre el hero (igual que comercializadoras) ---------- */
.pj-navbar {
    padding: 1rem 2.5% 0;
}

.pj-navbar .header-landing-nav {
    padding-block: 0.8rem;
    padding-inline: 2rem 0.8rem;
    border-radius: 999px;
    background: var(--pj-blue);
    box-shadow: 0 18px 40px -22px rgba(1, 8, 32, 0.9);
}

.pj-navbar .header-landing-cta {
    color: var(--pj-blue);
}

@media (min-width: 1024px) and (max-width: 1199px) {
    .mx-page .pj-navbar .header-landing-nav {
        padding-inline: 1.25rem 0.5rem;
        column-gap: 12px;
    }

    .mx-page .pj-navbar .header-landing-nav--lg .header-landing-menus {
        column-gap: 6px !important;
    }

    .mx-page .pj-navbar .header-landing-nav--lg .header-landing-menus button {
        font-size: 0.8125rem !important;
    }

    .mx-page .pj-navbar .header-landing-nav--lg .header-landing-cta {
        padding: 0.5rem 1rem;
        font-size: 0.8125rem !important;
        white-space: nowrap;
    }

    .mx-page .pj-navbar .header-landing-nav--lg svg.h-7 {
        height: 1.25rem;
    }
}

@media (min-width: 1024px) and (max-width: 1365px) {
    .pj-navbar .header-landing-nav--lg .header-landing-menus {
        column-gap: 14px;
    }

    .pj-navbar .header-landing-nav--lg .header-landing-menus button,
    .pj-navbar .header-landing-nav--lg .header-landing-cta {
        font-size: 0.9375rem;
    }
}

/* =========================================================
   PREGUNTAS FRECUENTES
   ========================================================= */
.pj-faq {
    padding-top: clamp(24px, 3vw, 48px);
}

.pj-faq__lead {
    margin-top: 14px !important;
    color: var(--pj-text);
    font-size: calc(1.2 * clamp(1rem, 1.3vw, 1.15rem));
}

.pj-faq__grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: start;
    gap: 14px 22px;
    margin-top: 32px;
}

.pj-faq__col {
    display: grid;
    gap: 14px;
}

.pj-faq details {
    padding: 20px 24px;
    border: 1px solid #e6edf8;
    border-radius: 14px;
    background: var(--pj-white);
    box-shadow: 0 8px 22px -12px rgba(10, 60, 160, 0.22);
    transition: background-color 0.3s ease;
}

/* .is-closing lo pone proyectos.js (compartido) mientras se cierra, para que el color y la flecha regresen desde el inicio */
.pj-faq details[open]:not(.is-closing) {
    background: #e2efff;
}

.pj-faq summary {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 16px;
    color: var(--pj-ink);
    font-size: calc(1.2 * 1.05rem);
    font-weight: 600;
    line-height: 1.35;
    list-style: none;
    cursor: pointer;
}

.pj-faq summary::-webkit-details-marker {
    display: none;
}

/* flecha de Font Awesome (fa-chevron-down) */
.pj-faq summary::after {
    content: "\f078";
    flex: none;
    color: var(--pj-blue);
    font-family: "Font Awesome 5 Pro";
    font-weight: 400;
    transition: rotate 0.3s var(--pj-ease);
}

.pj-faq details[open]:not(.is-closing) summary::after {
    rotate: 180deg;
}

.pj-faq summary:focus-visible {
    outline: 3px solid rgba(0, 102, 255, 0.45);
    outline-offset: 6px;
    border-radius: 6px;
}

.pj-faq details p {
    margin-top: 12px;
    overflow: hidden;
    color: var(--pj-text);
    font-size: calc(1.2 * 0.98rem);
    line-height: 1.55;
}

/* =========================================================
   FORMULARIO (base de nuevo-leon/comercializadoras)
   ========================================================= */
.pj-demo {
    padding: clamp(64px, 7vw, 110px) 0;
    /* fondo-formularios.webp (1672 × 941): azul con destellos; el color de respaldo es su tono medio */
    background: #03175a url("../../img/nuevo-leon/logistica/fondo-formularios.webp") center / cover no-repeat;
}

.pj-demo__layout {
    display: grid;
    grid-template-columns: minmax(0, 40fr) minmax(0, 52fr);
    align-items: center;
    gap: clamp(40px, 6vw, 90px);
    width: min(90%, 1320px);
    margin: 0 auto;
}

.pj-demo__copy h2 {
    margin-bottom: 18px;
    color: var(--pj-white);
    font-size: calc(1.2 * clamp(1.8rem, 2.8vw, 2.6rem));
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: 0.02em;
}

.pj-demo__copy p {
    max-width: 52ch;
    color: rgba(255, 255, 255, 0.88);
    font-size: calc(1.2 * clamp(0.95rem, 1.1vw, 1.08rem));
    line-height: 1.55;
}

.pj-form {
    width: 100%;
    max-width: 760px;
    margin-left: auto;
    padding: clamp(26px, 3vw, 40px);
    border-radius: 20px;
    background: var(--pj-white);
    box-shadow: 0 24px 60px rgba(10, 20, 64, 0.22);
    color: var(--pj-ink);
}

.pj-form__title {
    margin-bottom: 24px !important;
    color: var(--pj-navy);
    font-size: calc(1.2 * clamp(1.25rem, 1.6vw, 1.55rem));
    font-weight: 700;
}

.pj-form__grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 18px 20px;
}

.pj-form__field {
    display: flex;
    min-width: 0;
    flex-direction: column;
    gap: 8px;
    font-size: calc(1.2 * 0.85rem);
    font-weight: 600;
}

.pj-form__field input,
.pj-form__field select {
    width: 100%;
    min-height: 52px;
    padding: 0 16px;
    border: 1px solid #ccd4e1;
    border-radius: 12px;
    outline: none;
    background: var(--pj-white);
    color: var(--pj-ink);
    font: inherit;
    font-weight: 500;
    transition: border-color 180ms ease, box-shadow 180ms ease;
}

.pj-form__field input::placeholder {
    color: #9098a8;
}

.pj-form__field input:focus,
.pj-form__field select:focus {
    border-color: var(--pj-blue);
    box-shadow: 0 0 0 4px rgba(0, 102, 255, 0.13);
}

.pj-form__captcha {
    margin-top: 20px;
}

.pj-form__newsletter input {
    accent-color: var(--pj-blue);
}

.pj-form__submit,
.pj-form__advisor {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    width: 100%;
    min-height: 52px;
    border-radius: 999px;
    font-size: calc(1.2 * 1rem);
    font-weight: 600;
    text-decoration: none;
    transition: transform 180ms ease, box-shadow 180ms ease, opacity 180ms ease;
}

.pj-form__submit {
    margin-top: 22px;
    border: 0;
    background: linear-gradient(90deg, #8fc2ff 0%, var(--pj-blue) 100%);
    color: var(--pj-white);
    cursor: pointer;
}

.pj-form__advisor {
    margin-top: 12px;
    border: 1px solid #ccd4e1;
    background: var(--pj-white);
    color: var(--pj-ink);
}

.pj-form__advisor i {
    color: #198b4a;
    font-size: calc(1.2 * 1.3rem);
}

.pj-form__submit:hover:not(:disabled),
.pj-form__advisor:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 28px rgba(17, 23, 59, 0.16);
}

.pj-form__submit:disabled {
    cursor: wait;
    opacity: 0.65;
}

.pj-form__privacy {
    margin-top: 16px !important;
    color: #7a8291;
    font-size: calc(1.2 * 0.76rem);
    line-height: 1.5;
}

.pj-form__privacy a {
    color: var(--pj-blue);
    font-weight: 600;
}

.pj-form__status {
    margin-top: 16px !important;
    padding: 12px 14px;
    border-radius: 9px;
    font-size: calc(1.2 * 0.86rem);
    font-weight: 600;
    text-align: center;
}

.pj-form__status.is-success {
    background: #e7f8ed;
    color: #146b36;
}

.pj-form__status.is-error {
    background: #fff0f0;
    color: #a82b2b;
}

/* =========================================================
   ESLOGAN (igual que nuevo-leon/comercializadoras): el fondo se desliza y un brillo recorre las letras
   ========================================================= */
.pj-slogan {
    display: grid;
    place-items: center;
    min-height: clamp(140px, 14vw, 200px);
    padding: 32px 16px;
    background:
        linear-gradient(rgba(3, 17, 58, 0.35), rgba(3, 17, 58, 0.35)),
        url("../../img/nuevo-leon/ordenes-servicio/hero-fondo.webp") center 78% / cover no-repeat;
    color: var(--pj-white);
    text-align: center;
}

.pj-slogan__text {
    font-size: clamp(1.5rem, 1rem + 2.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.15;
    letter-spacing: -0.02em;
    text-wrap: balance;
}

@media (prefers-reduced-motion: no-preference) {
    .pj-slogan {
        animation: pj-pan 18s ease-in-out infinite alternate;
    }

    @supports ((-webkit-background-clip: text) or (background-clip: text)) {
        .pj-slogan__text {
            /* el #fff de fondo cubre el texto que queda fuera del degradado mientras este se desplaza */
            background: linear-gradient(110deg, #fff 42%, #8ff3ff 50%, #fff 58%) 120% 0 / 250% 100% no-repeat #fff;
            -webkit-background-clip: text;
            background-clip: text;
            color: transparent;
            animation: pj-shine 6s ease-in-out 1s infinite;
        }
    }
}

@keyframes pj-pan {
    from {
        background-position: 0 0, center 62%;
    }

    to {
        background-position: 0 0, center 92%;
    }
}

@keyframes pj-shine {
    0% {
        background-position: 120% 0;
    }

    35%,
    100% {
        background-position: -20% 0;
    }
}




/* Navbar: misma contraccion y expansion de la pagina principal. */
.mx-page .pj-navbar .header-landing-nav {
    position: relative;
    isolation: isolate;
    background: transparent;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    transform-origin: 50% 0;
}

.mx-page .pj-navbar .header-landing-nav::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    border: 1px solid rgba(255, 255, 255, 0.14);
    border-radius: inherit;
    background: rgba(10, 42, 122, 0.92);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
}

.mx-page .pj-navbar.is-floating {
    position: fixed;
    z-index: 60;
}

.mx-page .pj-navbar.is-floating .header-landing-nav::before {
    background: rgba(2, 18, 102, 0.9);
    box-shadow: 0 18px 40px rgba(0, 10, 81, 0.28);
}

.mx-page .pj-navbar.is-floating .header-landing-nav {
    animation: mx-nav-open 0.72s linear both;
}

.mx-page .pj-navbar.is-floating .header-landing-nav>* {
    animation: mx-nav-content-in 0.32s ease 0.34s both;
}

.mx-page .pj-navbar.is-floating.is-hidden .header-landing-nav {
    animation: mx-nav-min 0.5s linear forwards;
    pointer-events: none;
}

.mx-page .pj-navbar.is-floating.is-hidden .header-landing-nav>* {
    animation: mx-nav-content-out 0.14s ease forwards;
}

/* al entrar a modo flotante ya escondido (fuera de pantalla) no se ve animación */
.mx-page .pj-navbar.is-instant .header-landing-nav,
.mx-page .pj-navbar.is-instant .header-landing-nav>* {
    animation-duration: 0s !important;
    animation-delay: 0s !important;
}

@keyframes mx-nav-min {
    0% {
        opacity: 1;
        transform: none;
        animation-timing-function: cubic-bezier(0.6, 0, 0.35, 1);
    }

    55% {
        opacity: 1;
        transform: scale(0.2, 0.8);
        animation-timing-function: cubic-bezier(0.5, 0, 0.8, 0.4);
    }

    100% {
        opacity: 0;
        transform: translateY(-36px) scale(0.12, 0.5);
    }
}

@keyframes mx-nav-open {
    0% {
        opacity: 0;
        transform: translateY(-30px) scale(0.12, 0.5);
        animation-timing-function: cubic-bezier(0.2, 0.7, 0.3, 1);
    }

    24% {
        opacity: 1;
        transform: scale(0.22, 0.84);
        animation-timing-function: cubic-bezier(0.25, 0.9, 0.3, 1);
    }

    68% {
        transform: scale(1.025, 1.02);
        animation-timing-function: ease-in-out;
    }

    100% {
        opacity: 1;
        transform: none;
    }
}

@keyframes mx-nav-content-in {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

@keyframes mx-nav-content-out {
    from {
        opacity: 1;
    }

    to {
        opacity: 0;
    }
}

@media (prefers-reduced-motion: reduce) {

    .mx-page .pj-navbar.is-floating .header-landing-nav,
    .mx-page .pj-navbar.is-floating .header-landing-nav>* {
        animation: none;
    }

    .mx-page .pj-navbar.is-floating.is-hidden {
        visibility: hidden;
    }
}


/* El menu fixed necesita un ancestro sin transformaciones al abrirse. */
.mx-page .pj-navbar.mx-menu-open .header-landing-nav,
.mx-page .pj-navbar.mx-menu-open .header-landing-nav > * {
    animation: none;
    transform: none;
    opacity: 1;
}

/* reCAPTCHA horizontal a su medida real (304 x 78), sin escalar el iframe. */
.mx-page .pj-form__captcha {
    display: flex;
    justify-content: flex-start;
    margin-top: 24px;
    min-height: 78px;
}

.mx-page .pj-form__captcha .g-recaptcha {
    flex: 0 0 304px;
    min-height: 78px;
}

@media (max-width: 389px) {
    .mx-page .pj-demo__layout {
        width: calc(100% - 24px);
    }

    .mx-page .pj-form {
        padding: 24px 10px;
    }
}

@media (max-width: 359px) {
    .mx-page .pj-demo__layout {
        width: calc(100% - 16px);
    }

    .mx-page .pj-form {
        padding: 24px 0;
    }

    .mx-page .pj-form > :not(.pj-form__captcha):not(input) {
        width: calc(100% - 32px);
        margin-inline: 16px;
    }

    /* en celulares de menos de 360 px el reCAPTCHA (304 px) ocupa casi todo el ancho: ahí sí va centrado */
    .mx-page .pj-form__captcha {
        justify-content: center;
    }
}


/* =========================================================
   MANUFACTURA MÉXICO: secciones propias (.mx-*)
   Base móvil en una columna; desde 1024 px cada sección sigue el acomodo del PDF (1024 pt de ancho).
   ========================================================= */
.mx-page {
    --pj-blue: #1857f5;
    --mx-night: #020b3a;
    --mx-ink: #0b2a78;
    --mx-band: #172e78;
    --mx-band-hi: #1c2a5f;
    --mx-sky: #3d8bff;
    --mx-cyan: #2fd3f0;
    --mx-ice: #e6f0ff;
    --mx-coral: #ff7a5c;
    --mx-grey: #626b7d;
    --mx-shadow: 0 18px 40px -20px rgba(4, 22, 74, 0.45);
    --mx-out: cubic-bezier(0.16, 1, 0.3, 1);
    --fs-h1: clamp(2.1rem, 9.4vw, 3.4rem);
    --fs-h2: clamp(1.75rem, 1.3rem + 1.8vw, 3rem);
    --fs-h3: clamp(1.25rem, 1.1rem + 0.48vw, 1.6rem);
    --fs-lead: clamp(1.05rem, 1rem + 0.24vw, 1.2rem);
    --fs-body: clamp(1.05rem, 1rem + 0.2vw, 1.2rem);
    --fs-small: 0.95rem;
    --fs-label: 0.95rem;
}

/* todo en Montserrat, también navbar, formulario y footer; los íconos conservan Font Awesome */
.mx-page *:not(i):not(.fa):not(.fas):not(.far):not(.fal):not(.fab) {
    font-family: "Montserrat", Arial, sans-serif;
}

.mx-sr {
    position: absolute;
    width: 1px;
    height: 1px;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
}

/* el acento va en la misma línea (pj-title span es block) */
.pj-title .mx-inline {
    display: inline;
}

.mx-page em {
    font-style: italic;
}

.mx-sky { color: var(--mx-sky); }
.mx-cyan { color: var(--mx-cyan); }

.mx-page main .pj-title {
    color: var(--mx-ink);
    font-size: calc(1.2 * var(--fs-h2));
    line-height: 1.12;
    text-wrap: balance;
}

.mx-page main .pj-title--white {
    color: var(--pj-white);
}

.mx-page main .pj-pill {
    margin-bottom: 14px;
    padding: 6px 24px;
    font-size: calc(1.2 * var(--fs-label));
    letter-spacing: 0.02em;
}

.mx-page main .pj-text {
    max-width: 62ch;
    color: var(--mx-grey);
    font-size: calc(1.2 * var(--fs-body));
    line-height: 1.5;
}

.mx-page main .pj-text--light {
    color: rgba(255, 255, 255, 0.92);
}

.mx-page main .pj-btn {
    justify-content: center;
    min-width: 220px;
    padding: 14px 28px;
    border-color: rgba(160, 200, 255, 0.6);
    font-size: calc(1.2 * 1.05rem);
}

/* sin foto todavía: el nombre del archivo se lee sobre fondos oscuros */
:is(.mx-hero, .mx-prep, .mx-cta) .pj-slot.is-missing::after {
    color: #9fd0ff;
}

/* navbar en píldora azul noche translúcida, como en el diseño */
.mx-page .pj-navbar .header-landing-cta {
    color: var(--mx-ink);
}

/* ---------- HERO ---------- */
.mx-hero {
    position: relative;
    isolation: isolate;
    overflow: hidden;
    padding-top: 116px;
    background:
        radial-gradient(55% 70% at 80% 42%, rgba(40, 125, 255, 0.55), transparent 70%),
        linear-gradient(100deg, #01082e 0%, #03196a 38%, #0a4fe0 76%, #0b6dff 100%);
    color: var(--pj-white);
}

.mx-hero__copy {
    position: relative;
    z-index: 2;
}

.mx-hero__title {
    font-size: var(--fs-h1);
    font-weight: 800;
    line-height: 1;
    letter-spacing: -0.015em;
    text-transform: uppercase;
}

.mx-hero__title em {
    color: #2563ff;
    font-weight: 900;
    padding-right: 0.06em;
}

.mx-hero__big {
    display: block;
}

.mx-hero__headline-line {
    display: block;
}

.mx-hero__end {
    display: block;
    margin-top: 0.08em;
    font-size: 0.78em;
    font-weight: 500;
}

.mx-hero__lead {
    max-width: 30ch;
    margin-top: clamp(24px, 3vw, 44px) !important;
    color: rgba(255, 255, 255, 0.94);
    font-size: calc(1.15 * var(--fs-lead));
    line-height: 1.5;
}

.mx-hero__media {
    position: relative;
    z-index: 1;
    margin-top: 28px;
}

.mx-hero__stage {
    position: relative;
    container-type: inline-size;
    aspect-ratio: 4 / 5;
}

/* hero-operario.webp (1243 × 1266) trae aire transparente: el operario ocupa el 68 % central del ancho */
.mx-hero__person {
    position: absolute;
    bottom: 0;
    left: -6%;
    width: 112%;
    aspect-ratio: 1243 / 1266;
}

.mx-hero__person img {
    object-fit: contain;
    object-position: 50% 100%;
}

/* tableros de vidrio */
.mx-board {
    position: absolute;
    z-index: 2;
    padding: 0.8em 1em 0.9em;
    border: 1px solid rgba(200, 225, 255, 0.5);
    border-radius: 0.7em;
    background: linear-gradient(150deg, rgba(130, 175, 255, 0.3), rgba(30, 70, 170, 0.22));
    box-shadow: 0 1.4em 3em -1em rgba(0, 10, 60, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.25);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    color: var(--pj-white);
    font-size: 3.3cqw;
}

.mx-page .mx-board__head {
    display: flex;
    align-items: center;
    gap: 0.6em;
    font-weight: 500;
    line-height: 1.2;
}

.mx-board__head i {
    flex: none;
    display: grid;
    place-items: center;
    width: 2.1em;
    height: 2.1em;
    border: 1px solid rgba(255, 255, 255, 0.35);
    border-radius: 0.45em;
    background: linear-gradient(160deg, #5c97ff, #1f4fc0);
    font-size: 1em;
}

.mx-board--capacity { top: 26%; left: 0; width: 46%; }
.mx-board--costs { top: 44%; right: 0; width: 50%; }
.mx-board--status { top: 63%; left: 0; width: 54%; }

.mx-bars {
    display: flex;
    align-items: flex-end;
    gap: 0.35em;
    width: 68%;
    height: 3em;
    margin: 0.4em 0 0 auto;
}

.mx-bars i {
    flex: 1;
    height: var(--h);
    border-radius: 0.15em 0.15em 0 0;
    background: linear-gradient(180deg, #33d6ff, #1a6bff);
    transform-origin: 50% 100%;
}

.mx-wave {
    display: block;
    width: 100%;
    height: 3.2em;
    margin-top: 0.5em;
}

.mx-wave__area {
    fill: url(#mx-wave-fill);
}

.mx-wave__line {
    fill: none;
    stroke: #33d6ff;
    stroke-width: 2.5;
    stroke-linecap: round;
    vector-effect: non-scaling-stroke;
}

.mx-status {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.8em;
    margin-top: 0.6em;
}

.mx-status li {
    display: flex;
    align-items: center;
    gap: 0.55em;
    font-size: 0.86em;
    line-height: 1.75;
}

.mx-status li::before {
    content: "";
    flex: none;
    width: 0.85em;
    height: 0.85em;
    border-radius: 50%;
    background: var(--k);
}

.mx-status__k0, .mx-donut__s0 { --k: #1f7bff; }
.mx-status__k1, .mx-donut__s1 { --k: #2fd3ff; }
.mx-status__k2, .mx-donut__s2 { --k: #7de8ff; }
.mx-status__k3, .mx-donut__s3 { --k: var(--mx-coral); }

.mx-donut {
    flex: none;
    width: 5.4em;
    height: 5.4em;
    rotate: -90deg;
}

.mx-donut circle {
    fill: none;
    stroke: var(--k);
    stroke-width: 7.5;
    stroke-dasharray: var(--len) 100;
    stroke-dashoffset: calc(-1 * var(--o));
}

/* el final de la frase del hero, en recuadro azul noche */
.mx-hero__note {
    position: relative;
    z-index: 3;
    margin: -1px 5% 0 !important;
    padding: 18px 22px;
    border-radius: 14px 14px 0 0;
    background: rgba(2, 10, 48, 0.94);
    color: var(--pj-white);
    font-size: calc(1.1 * var(--fs-lead));
    line-height: 1.45;
    text-align: right;
}

/* ---------- EL PROBLEMA ---------- */
.mx-problem__grid {
    display: grid;
    gap: 40px;
}

.mx-problem__img {
    width: min(100%, 460px);
    aspect-ratio: 656 / 831;
    margin-inline: auto;
}

.mx-problem__img img {
    object-fit: contain;
    object-position: 50% 100%;
}

.mx-problem__img.is-missing {
    border-radius: 0 0 32px 32px;
}

.mx-problem__copy {
    text-align: right;
}

.mx-page .mx-problem__copy .pj-text {
    margin-left: auto;
}

/* banda de módulos */
.mx-page .mx-modules {
    display: grid;
    grid-template-columns: minmax(0, 1fr);
    gap: 8px;
    width: min(100%, 1200px);
    margin: clamp(48px, 6vw, 96px) auto 0;
    padding: 12px;
    border-radius: 16px;
    background: var(--mx-band);
    box-shadow: var(--mx-shadow);
    color: var(--pj-white);
}

.mx-modules {
    position: relative;
    isolation: isolate;
}

.mx-module {
    position: relative;
    padding: 20px 20px 26px;
    border-radius: 12px;
    outline: none;
    transition: background-color 0.35s ease, box-shadow 0.35s ease;
}

/* sin JS: la casilla resaltada es la primera mientras nadie apunta; luego la que tiene el cursor o el foco */
.mx-modules:not(.has-hl):not(:hover):not(:focus-within) .mx-module:first-child,
.mx-modules:not(.has-hl) .mx-module:hover,
.mx-modules:not(.has-hl) .mx-module:focus-visible {
    background: var(--mx-band-hi);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 28px -18px rgba(0, 0, 0, 0.6);
}

.mx-module:focus-visible {
    box-shadow: inset 0 0 0 2px var(--mx-cyan);
}

/* con JS (manufactura-mexico.js): un solo resaltado que viaja hasta la casilla elegida.
   Se mueve como pieza en la banda: la orilla de adelante arranca y la de atrás la alcanza,
   así se estira mientras recorre y se recoge al llegar. --hl-* son sus orillas en px. */
.mx-modules.has-hl::before {
    content: "";
    position: absolute;
    top: var(--hl-t, 12px);
    right: var(--hl-r, 75%);
    bottom: var(--hl-b, 12px);
    left: var(--hl-l, 12px);
    z-index: -1;
    border-radius: 12px;
    background: linear-gradient(180deg, #22346f, var(--mx-band-hi));
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08), 0 14px 28px -18px rgba(0, 0, 0, 0.6);
    --lead: 0.36s cubic-bezier(0.3, 0.75, 0.25, 1);
    --trail: 0.62s cubic-bezier(0.65, 0, 0.25, 1) 0.05s;
    transition: left var(--lead), right var(--lead), top var(--lead), bottom var(--lead);
}

/* hacia adelante (derecha/abajo) guían la orilla derecha y la de abajo; hacia atrás, la izquierda y la de arriba */
.mx-modules.has-hl[data-dir="next"]::before {
    transition: right var(--lead), bottom var(--lead), left var(--trail), top var(--trail);
}

.mx-modules.has-hl[data-dir="prev"]::before {
    transition: left var(--lead), top var(--lead), right var(--trail), bottom var(--trail);
}

/* al cargar o al cambiar el tamaño de la ventana se coloca sin animar */
.mx-modules.is-snap::before {
    transition: none !important;
}

/* la casilla donde está el resaltado lleva el ícono girado */
.mx-module.is-on > i {
    transform: rotate(-8deg) scale(1.08);
}

@media (prefers-reduced-motion: reduce) {
    .mx-modules.has-hl::before {
        transition: none !important;
    }
}

.mx-module > i {
    display: grid;
    place-items: center;
    width: 54px;
    height: 54px;
    margin-bottom: 16px;
    border-radius: 50%;
    background: #93e8f6;
    color: var(--mx-band);
    font-size: 1.5rem;
    transition: transform 0.4s var(--mx-out);
}

.mx-module:hover > i,
.mx-module:focus-visible > i {
    transform: rotate(-8deg) scale(1.08);
}

.mx-page .mx-module h3 {
    margin-bottom: 14px;
    font-size: calc(1.2 * var(--fs-h3));
    /* "requerimientos" es la palabra más larga: si aun así no cabe, se parte con guion en vez de invadir la columna vecina */
    hyphens: auto;
    font-weight: 700;
    line-height: 1.1;
}

.mx-page .mx-module p {
    color: rgba(255, 255, 255, 0.9);
    font-size: calc(1.2 * 0.9rem);
    line-height: 1.4;
}

/* ---------- PROCESO ---------- */
.mx-process {
    padding-bottom: clamp(56px, 6vw, 96px);
}

.mx-process__grid {
    display: grid;
    gap: 56px;
    align-items: center;
}

.mx-process__media {
    position: relative;
    width: min(100%, 520px);
    margin-inline: auto;
}

/* proceso-tecnico.webp (573 × 675) ya trae el disco azul abajo y la cabeza saliendo por arriba.
   Su recorte de abajo (el pantalón sale recto del círculo) se disimula desvaneciendo el último 22 % */
.mx-process__person img {
    height: auto;
    -webkit-mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
    mask-image: linear-gradient(to bottom, #000 78%, transparent 99%);
}

.mx-stations {
    position: absolute;
    inset: 0;
    z-index: 2;
    pointer-events: none;
    container-type: inline-size;
}

.mx-stations li {
    position: absolute;
    display: flex;
    align-items: center;
    gap: 0.6em;
    padding: 0.55em 1.3em 0.55em 0.9em;
    border-radius: 999px;
    background: var(--pj-white);
    box-shadow: 0 10px 22px -10px rgba(4, 22, 74, 0.45), 0 2px 0 rgba(4, 22, 74, 0.06);
    color: var(--mx-ink);
    font-size: clamp(0.95rem, 4cqw, 1.45rem);
    font-weight: 700;
    white-space: nowrap;
}

.mx-stations li::before {
    content: "";
    width: 0.62em;
    height: 0.62em;
    border-radius: 50%;
    background: #2d7bff;
    box-shadow: 0 0 0 0 rgba(45, 123, 255, 0.5);
}

.mx-stations li:nth-child(1) { top: 62%; left: -5%; }
.mx-stations li:nth-child(2) { top: 74%; left: 0; }
.mx-stations li:nth-child(3) { top: 86%; left: 11%; }

/* banda del recorrido */
.mx-flow-wrap {
    width: min(98%, 1560px);
    margin: clamp(40px, 5vw, 70px) auto 0;
}

.mx-page .mx-flow {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.35em 0.5em;
    padding: 0.75em 1.4em;
    border-radius: 28px;
    background: #062a7a;
    box-shadow: var(--mx-shadow);
    color: var(--pj-white);
    /* tope de 1.4rem: con más, en 1920 el recorrido ya no cabía en una línea */
    font-size: clamp(1rem, 1.32vw, 1.4rem);
    font-weight: 700;
    line-height: 1.3;
}

.mx-flow li {
    display: inline-flex;
    align-items: center;
    gap: 0.5em;
}

.mx-flow li + li::before {
    content: "\f061";
    font-family: "Font Awesome 5 Pro";
    font-size: 0.6em;
    font-weight: 400;
    opacity: 0.8;
}

/* ---------- BENEFICIO PARA CADA RESPONSABLE ---------- */
.mx-page .mx-roles__grid {
    display: grid;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 32px;
    max-width: 440px;
    margin-top: clamp(36px, 4vw, 60px);
}

/* Retratos recortados (solo la persona) sobre un panel de color dibujado aquí: un solo elemento por tarjeta (::before).
   En reposo empieza al 35 % (la cabeza sale por arriba); con el mouse sube hasta arriba, así el relleno no tiene unión.
   Va con top y no con clip-path: el recorte con esquinas redondeadas pintaba el borde de arriba 1 px más abajo
   en la tarjeta de la izquierda que en las otras; un fondo normal se alinea al píxel igual en las tres.
   --r: esquinas redondeadas del panel y --cr las de abajo de la franja del texto; en fila solo van las de afuera
   para que los tres queden pegados. */
.mx-role {
    --bg: #4a86de;
    --r: 22px 0 0 22px;
    --cr: 0 0 0 22px;
    position: relative;
    isolation: isolate;
    aspect-ratio: 0.93;
    outline: none;
    border-radius: 22px;
    transition: transform 0.55s var(--mx-out), box-shadow 0.55s var(--mx-out);
}

.mx-role--2 { --bg: #0a3aa0; --r: 0; --cr: 0; }
.mx-role--3 { --bg: #364a7e; --r: 0 22px 22px 0; --cr: 0 0 22px 0; }

.mx-role::before {
    content: "";
    position: absolute;
    top: 35%;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: -1;
    border-radius: var(--r);
    background:
        radial-gradient(90% 55% at 50% 100%, rgba(3, 12, 48, 0.35), transparent 70%),
        var(--bg);
    transition: top 0.55s var(--mx-out), border-radius 0.4s ease;
}

/* el retrato se apoya en la base del panel y su cabeza queda dentro de la tarjeta */
.mx-role__img {
    position: absolute;
    inset: 0;
}

.mx-page .mx-role__img img {
    position: absolute;
    bottom: 0;
    left: 50%;
    width: auto;
    max-width: 104%;
    height: 96%;
    object-fit: contain;
    object-position: 50% 100%;
    translate: -50% 0;
}

/* nombre y beneficio sobre la parte baja del panel */
.mx-role__copy {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 2;
    padding: 64px 22px 22px;
    border-radius: var(--cr);
    background: linear-gradient(to top, rgba(3, 12, 48, 0.45), rgba(3, 12, 48, 0));
    transition: border-radius 0.3s ease;
    color: var(--pj-white);
    text-align: center;
}

/* oscurecido extra para leer el beneficio: degradado suave que aparece con el mouse */
.mx-role__copy::before {
    content: "";
    position: absolute;
    inset: -48px 0 0;
    z-index: -1;
    border-radius: inherit;
    background: linear-gradient(to top, rgba(3, 12, 48, 0.62) 0%, rgba(3, 12, 48, 0.38) 55%, rgba(3, 12, 48, 0));
    opacity: 0;
    transition: opacity 0.45s ease;
}

.mx-role:is(:hover, :focus-visible) .mx-role__copy::before {
    opacity: 1;
}

.mx-role:is(:hover, :focus-visible) .mx-role__copy {
    border-radius: 0 0 22px 22px;
}

/* al pasar el mouse (o con el foco): el panel se llena hasta arriba, la tarjeta se amplía y queda encima de sus vecinas */
.mx-role:is(:hover, :focus-visible) {
    z-index: 3;
    box-shadow: 0 34px 60px -24px rgba(4, 22, 74, 0.6);
    transform: scale(1.06);
}

.mx-role:is(:hover, :focus-visible)::before {
    top: 0;
    border-radius: 22px;
}

.mx-page .mx-role h3 {
    font-size: calc(1.2 * 1.12rem);
    font-weight: 700;
    line-height: 1.2;
    text-shadow: 0 2px 14px rgba(0, 10, 50, 0.6);
}

/* el beneficio sube con el cursor o el foco; en pantallas táctiles queda visible */
.mx-page .mx-role p {
    display: grid;
    max-height: 0;
    margin-top: 0;
    overflow: hidden;
    opacity: 0;
    font-size: calc(1.2 * 0.86rem);
    line-height: 1.45;
    transition: max-height 0.5s var(--mx-out), opacity 0.35s ease, margin-top 0.5s var(--mx-out);
}

.mx-role:is(:hover, :focus-visible) p {
    max-height: 9em;
    margin-top: 10px;
    opacity: 1;
}

.mx-role:focus-visible {
    box-shadow: 0 0 0 3px var(--pj-white), 0 0 0 6px var(--pj-blue), 0 34px 60px -24px rgba(4, 22, 74, 0.6);
}

@media (hover: none) {
    .mx-page .mx-role p {
        max-height: none;
        margin-top: 10px;
        opacity: 1;
    }
}

/* ---------- PREPARACIÓN ---------- */
.mx-prep {
    padding-bottom: clamp(56px, 6vw, 96px);
}

.mx-prep__panel {
    position: relative;
    isolation: isolate;
    display: grid;
    margin-inline: 4%;
    padding: 0 0 36px;
    border-radius: 26px;
    background:
        radial-gradient(70% 110% at 0% 100%, #0b6cf0 0%, rgba(11, 108, 240, 0) 60%),
        linear-gradient(100deg, #0846c8 0%, #031a7a 42%, #020a3c 100%);
    color: var(--pj-white);
}

.mx-prep__img {
    width: min(62%, 300px);
    aspect-ratio: 355 / 532;
    margin: -72px auto 0;
}

.mx-prep__img img {
    object-fit: contain;
    object-position: 50% 100%;
}

.mx-prep__copy {
    padding: 24px 22px 0;
    text-align: center;
}

.mx-page .mx-prep__copy .pj-text {
    margin-inline: auto;
}

/* ---------- EJEMPLO PRÁCTICO ---------- */
.mx-example__grid {
    display: grid;
    gap: 40px;
    align-items: center;
}

/* ejemplo-planeadora.webp ya trae esquinas redondeadas y las dos tarjetas encima */
.mx-example__img {
    aspect-ratio: 705 / 540;
}

.mx-page .mx-example .pj-title {
    font-size: calc(1.05 * var(--fs-h2));
}

.mx-page .mx-example .pj-text,
.mx-page .mx-example__note {
    color: #1b2a55;
    font-size: calc(1.05 * var(--fs-body));
    line-height: 1.45;
}

.mx-calc {
    display: grid;
    gap: 18px;
    margin-top: 22px;
}

.mx-calc__table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0 10px;
}

.mx-calc__table th {
    padding: 0;
    color: var(--mx-ink);
    font-size: calc(1.2 * 0.86rem);
    font-weight: 700;
    line-height: 1.25;
    text-align: left;
}

.mx-calc__k {
    display: flex;
    align-items: center;
    gap: 14px;
}

.mx-calc__k i {
    flex: none;
    display: grid;
    place-items: center;
    width: 46px;
    height: 46px;
    border-radius: 50%;
    background: var(--mx-ice);
    box-shadow: 0 0 0 5px #f4f8ff;
    color: var(--pj-blue);
    font-size: 1.3rem;
}

.mx-calc__k small {
    display: block;
    margin-top: 2px;
    color: #3a4560;
    font-size: 0.86em;
    font-weight: 500;
}

.mx-calc__table td {
    padding: 4px 0 4px 16px;
    border-left: 2px solid #c9d3e4;
    color: var(--mx-ink);
    font-size: calc(1.2 * 1rem);
    font-weight: 700;
    white-space: nowrap;
    font-variant-numeric: tabular-nums;
}

.mx-shortage {
    align-self: start;
    overflow: hidden;
    padding: 20px 16px 0;
    border: 1px solid #d6e4fb;
    border-radius: 18px;
    background: linear-gradient(180deg, #f6f9ff, #e8f1ff);
    box-shadow: 0 16px 34px -22px rgba(4, 22, 74, 0.45);
    color: var(--mx-ink);
    text-align: center;
}

.mx-page .mx-shortage__title {
    font-size: calc(1.2 * 0.9rem);
    font-weight: 700;
}

.mx-page .mx-shortage__value {
    margin-top: 8px;
    font-size: calc(1.2 * clamp(2rem, 1.5rem + 1.6vw, 2.8rem));
    font-weight: 800;
    line-height: 1;
    font-variant-numeric: tabular-nums;
}

.mx-page .mx-shortage__formula {
    margin-top: 10px;
    color: #3a4560;
    font-size: calc(1.2 * 0.85rem);
}

/* medidor: azul lo que cubre la existencia, rayado coral el faltante */
.mx-meter {
    display: block;
    height: 10px;
    margin: 14px 4px 16px;
    overflow: hidden;
    border-radius: 999px;
    background: repeating-linear-gradient(-45deg, var(--mx-coral) 0 5px, #ffc2b3 5px 10px);
}

.mx-meter i {
    display: block;
    width: var(--stock);
    height: 100%;
    border-radius: inherit;
    background: linear-gradient(90deg, #8fc2ff, var(--pj-blue));
}

.mx-page .mx-shortage__action {
    margin: 0 -16px;
    padding: 12px 16px;
    border-top: 1px solid #c8dcfb;
    background: #d6e7ff;
    font-size: calc(1.2 * 0.85rem);
    font-weight: 700;
}

.mx-page .mx-example__note {
    margin-top: 18px;
    max-width: 66ch;
}

/* ---------- CONTROLES ---------- */
.mx-page .mx-compare {
    display: grid;
    margin-inline: auto;
    grid-template-columns: minmax(0, 1fr);
    gap: 18px;
    margin-top: clamp(36px, 4vw, 60px);
}

.mx-compare__card {
    padding: 30px 26px 34px;
    border-radius: 22px;
    background: linear-gradient(160deg, #f5f9ff 0%, #e3efff 60%, #d2e6ff 100%);
    box-shadow: 0 22px 34px -24px rgba(4, 22, 74, 0.45), 0 6px 0 -1px #dbe2ee;
    color: #1b2a55;
}

.mx-compare__card:nth-child(2) {
    position: relative;
    z-index: 1;
    background: linear-gradient(170deg, #1a3c76 0%, #0f2b5f 100%);
    box-shadow: 0 30px 50px -24px rgba(4, 22, 74, 0.7);
    color: var(--pj-white);
}

.mx-page .mx-compare h3 {
    display: flex;
    align-items: center;
    gap: 18px;
    color: var(--mx-ink);
    font-size: calc(1.2 * clamp(1.4rem, 1rem + 1.1vw, 2rem));
    font-weight: 700;
    line-height: 1.1;
}

.mx-page .mx-compare__card:nth-child(2) h3 {
    color: var(--pj-white);
}

.mx-compare__n {
    padding-right: 18px;
    border-right: 2px solid rgba(11, 42, 120, 0.25);
    color: #1772e0;
    font-size: 1.3em;
    font-weight: 800;
}

.mx-compare__card:nth-child(2) .mx-compare__n {
    border-color: rgba(255, 255, 255, 0.3);
    color: #33b4f2;
}

.mx-compare dl {
    margin: 0;
}

.mx-compare dt {
    display: inline-block;
    margin-top: 30px;
    padding: 0.4em 1.1em;
    border-radius: 999px;
    background: #cfe3ff;
    color: var(--mx-ink);
    font-size: calc(1.2 * clamp(0.9rem, 0.7rem + 0.5vw, 1.1rem));
    font-weight: 700;
}

.mx-compare__card:nth-child(2) dt {
    background: linear-gradient(90deg, #1778e6, #2aa6f0);
    color: var(--pj-white);
}

.mx-compare dd {
    margin: 14px 0 0;
    font-size: calc(1.2 * clamp(1rem, 0.75rem + 0.6vw, 1.3rem));
    line-height: 1.35;
}

/* ---------- FAQ ---------- */
.mx-page .pj-faq .pj-title span {
    color: var(--pj-blue);
}

.mx-page .pj-faq__lead {
    color: #1b2a55;
}

/* ---------- CTA ---------- */
/* cta-operario.webp (1424 × 310): foto a la izquierda fundida con #002c6f; la columna muestra la parte de la foto */
.mx-cta {
    display: grid;
    background: #002c6f;
    color: var(--pj-white);
    overflow: hidden;
}

.mx-cta__img img {
    object-position: 0 50%;
}

.mx-cta__img {
    aspect-ratio: 16 / 9;
    -webkit-mask-image: linear-gradient(180deg, #000 60%, transparent);
    mask-image: linear-gradient(180deg, #000 60%, transparent);
}

.mx-cta__copy {
    padding: 8px 6% 48px;
}

.mx-page .mx-cta h2 {
    font-size: calc(1.2 * clamp(1.6rem, 1.2rem + 1.4vw, 2.5rem));
    font-weight: 700;
    line-height: 1.15;
    text-wrap: balance;
}

.mx-page .mx-cta p {
    max-width: 58ch;
    margin-top: 14px;
    color: rgba(255, 255, 255, 0.9);
    font-size: calc(1.05 * var(--fs-body));
    line-height: 1.5;
}

/* ---------- FORMULARIO: fondo claro con la planta deslavada a la derecha ---------- */
.mx-demo {
    position: relative;
    isolation: isolate;
    background: #f1f3f7 url("../../img/nuevo-leon/manufactura-mexico/fondo-formulario.webp") right center / cover no-repeat;
}

.mx-demo::before {
    content: "";
    position: absolute;
    inset: 0;
    z-index: -1;
    background: linear-gradient(90deg, rgba(255, 255, 255, 0.75) 0%, rgba(255, 255, 255, 0) 45%);
}

.mx-demo .pj-demo__copy h2 {
    color: var(--mx-ink);
    font-size: calc(1.2 * clamp(1.6rem, 1.3rem + 1vw, 2.25rem));
    letter-spacing: 0;
}

.mx-demo .pj-demo__copy p {
    color: #1b2a55;
    font-size: calc(1.0 * var(--fs-body));
    line-height: 1.6;
}

.mx-page .pj-form__title {
    color: var(--mx-ink);
}

.mx-page .pj-form__submit {
    background: var(--pj-blue);
}

/* =========================================================
   TABLETA Y CELULAR (< 1024 px)
   ========================================================= */
@media (max-width: 1023px) {
    .mx-page .pj-section {
        padding-block: clamp(48px, 7vw, 72px);
    }

    .mx-page main :is(.pj-container, .pj-demo__layout) > * {
        min-width: 0;
    }

    .mx-page main :is(h2, h3, .pj-pill, .pj-btn) {
        overflow-wrap: break-word;
    }

    .mx-page main .pj-btn {
        min-width: 0;
        max-width: 100%;
        min-height: 48px;
        text-align: center;
    }

    .mx-page .pj-navbar .header-landing-nav {
        padding: 8px 16px;
        backdrop-filter: none;
        -webkit-backdrop-filter: none;
    }

    .mx-page #btnOpenMenu {
        min-width: 44px;
        min-height: 44px;
        align-items: center;
        justify-content: center;
    }

    .pj-demo__layout {
        grid-template-columns: minmax(0, 1fr);
    }

    .mx-page .pj-form {
        min-width: 0;
        margin-inline: auto;
    }

    .mx-demo::before {
        background: rgba(246, 248, 251, 0.75);
    }

    /* El técnico se desvanece sobre el panel para suavizar el recorte inferior. */
    .mx-prep__img img {
        -webkit-mask-image: linear-gradient(to bottom, #000 76%, transparent 100%);
        mask-image: linear-gradient(to bottom, #000 76%, transparent 100%);
    }

    .mx-page .pj-faq summary {
        min-height: 44px;
    }

    .mx-page > footer > div {
        padding-inline: 5%;
    }

    /* en una columna el problema se lee a la izquierda, como el resto */
    .mx-problem__copy {
        text-align: left;
    }

    .mx-page .mx-problem__copy .pj-text {
        margin-left: 0;
    }
}

@media (min-width: 600px) and (max-width: 1023px) {
    .mx-hero__stage {
        width: min(100%, 640px);
        margin-inline: auto;
        aspect-ratio: 1 / 1;
    }

    .mx-board {
        font-size: 2.6cqw;
    }

    .mx-hero__person {
        left: 4%;
        width: 92%;
    }

    .mx-board--capacity { left: 2%; width: 38%; }
    .mx-board--costs { right: 2%; width: 42%; }
    .mx-board--status { left: 2%; width: 44%; }

    .mx-hero__note {
        width: min(90%, 640px);
        margin-inline: auto !important;
    }

    .mx-page .mx-modules {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .mx-page .mx-roles__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        max-width: none;
        margin-top: 80px;
    }

    .mx-role__copy {
        padding-inline: 12px;
    }

    .mx-calc {
        grid-template-columns: minmax(0, 1fr) minmax(0, 14em);
    }
}

@media (max-width: 599px) {
    .mx-page .pj-form {
        padding: 24px 18px;
    }

    .mx-page .pj-faq details {
        padding: 16px;
    }

    .pj-form__grid,
    .pj-faq__grid {
        grid-template-columns: minmax(0, 1fr);
    }

    .mx-page main .pj-btn {
        width: 100%;
    }

    /* responsables apilados: cada panel suelto lleva sus cuatro esquinas redondeadas */
    .mx-page .mx-role {
        --r: 18px;
        --cr: 0 0 18px 18px;
    }

    /* en celular el anillo basta: la lista de estatus no cabe legible */
    .mx-status ul {
        display: none;
    }

    .mx-status {
        justify-content: flex-end;
    }

    .mx-stations li {
        font-size: 4.6cqw;
    }

    .mx-page .mx-flow {
        flex-direction: column;
        align-items: flex-start;
        padding: 18px 22px;
        border-radius: 20px;
    }

    .mx-flow li + li::before {
        rotate: 90deg;
    }
}

/* =========================================================
   ESCRITORIO (≥ 1024 px): acomodo del PDF
   ========================================================= */
@media (min-width: 1024px) {
    /* HERO: texto a la izquierda; operario y tableros ocupan el 62 % derecho hasta abajo */
    .mx-hero {
        display: flex;
        align-items: center;
        min-height: calc(min(62vw, 1180px) * 0.83 + 70px);
        padding: 110px 0 60px;
    }

    .mx-hero__copy {
        width: 90%;
    }

    .mx-hero__title {
        font-size: min(5.15vw, 6.2rem);
    }

    .mx-hero__lead {
        max-width: min(30ch, 34vw);
    }

    .mx-hero__media {
        position: absolute;
        right: 0;
        bottom: 0;
        width: min(62vw, 1180px);
        margin: 0;
        aspect-ratio: 965 / 800;
    }

    .mx-hero__stage {
        position: absolute;
        inset: 0;
        aspect-ratio: auto;
    }

    /* la cabeza toca el borde de arriba del recuadro y el operario queda entre el 17 % y el 71 % */
    .mx-hero__person {
        left: 7.5%;
        width: 75%;
    }

    .mx-board {
        font-size: 2.05cqw;
    }

    /* a la altura del casco del operario */
    .mx-board--capacity { top: 9%; left: 1.6%; width: 31%; }
    .mx-board--costs { top: 54.5%; left: 42%; right: auto; width: 34%; }
    .mx-board--status { top: 69%; left: 3.4%; width: 34%; }

    /* el recuadro va detrás del operario (como en el diseño) y su codo entra hasta el 75.7 % del escenario,
       que es el 13.3 % del ancho de .mx-hero__media dentro del recuadro (empieza en 62.4 %): el relleno izquierdo
       en % (del mismo ancho) más 1.6 % de respiro deja el texto siempre a la derecha del codo, en cualquier pantalla */
    .mx-hero__note {
        position: absolute;
        top: 71%;
        right: 2.6%;
        width: 35%;
        margin: 0 !important;
        padding: 1.2em 1.6em 1.2em 14.9%;
        border-radius: 14px;
        font-size: clamp(1rem, 1.25vw, 1.4rem);
        line-height: 1.4;
    }

    /* EL PROBLEMA: foto 41 % a la izquierda, texto alineado a la derecha */
    .mx-problem {
        padding-top: clamp(40px, 4vw, 70px);
    }

    .mx-problem__grid {
        grid-template-columns: minmax(0, 45fr) minmax(0, 55fr);
        gap: 4vw;
        align-items: start;
    }

    .mx-problem__img {
        width: 100%;
    }

    .mx-problem__copy {
        padding-top: 15%;
    }

    .mx-page .mx-problem__copy .pj-text {
        max-width: 50ch;
    }

    .mx-page .mx-modules {
        grid-template-columns: repeat(4, minmax(0, 1fr));
        width: min(100%, 1240px);
    }

    .mx-page .mx-module h3 {
        font-size: calc(1.2 * clamp(1.15rem, 0.55rem + 1.05vw, 1.6rem));
    }

    /* PROCESO */
    .mx-process__grid {
        grid-template-columns: minmax(0, 52fr) minmax(0, 48fr);
        gap: 4vw;
    }

    .mx-process__media {
        width: min(100%, 640px);
        margin-right: 0;
    }

    /* RESPONSABLES: tres paneles pegados; solo las esquinas de afuera van redondeadas */
    .mx-page .mx-roles__grid {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        gap: 0;
        width: min(96%, 1520px);
        max-width: none;
        margin-top: clamp(60px, 6vw, 100px);
    }

    /* PREPARACIÓN: panel que llega al borde derecho; el técnico sobresale arriba a la izquierda */
    .mx-prep__panel {
        grid-template-columns: minmax(0, 30fr) minmax(0, 70fr);
        align-items: center;
        min-height: clamp(380px, 32vw, 560px);
        margin: 0 0 0 3%;
        padding: 0;
        border-radius: 26px 0 0 26px;
    }

    .mx-prep__img {
        position: absolute;
        bottom: 0;
        left: 1%;
        width: 27%;
        height: 116%;
        aspect-ratio: auto;
        margin: 0;
    }

    .mx-prep__copy {
        grid-column: 2;
        max-width: 860px;
        padding: 48px 8% 48px 0;
    }

    .mx-prep .pj-title {
        font-size: calc(1.15 * var(--fs-h2));
    }

    /* EJEMPLO */
    .mx-example__grid {
        grid-template-columns: minmax(0, 49fr) minmax(0, 51fr);
        gap: 2vw;
        width: 94%;
    }

    .mx-calc {
        grid-template-columns: minmax(0, 1fr) minmax(0, 15em);
        align-items: center;
    }

    /* CONTROLES: el de en medio se levanta y monta sobre sus vecinos */
    .mx-page .mx-compare {
        grid-template-columns: repeat(3, minmax(0, 1fr));
        align-items: center;
        gap: 0;
        width: min(96%, 1500px);
    }

    /* laterales altas; la de en medio sobresale arriba y abajo de sus vecinas */
    .mx-compare__card {
        padding: 56px clamp(24px, 2.6vw, 44px) 68px;
    }

    .mx-compare__card:nth-child(2) {
        margin-inline: -6px;
        padding-block: 84px 104px;
    }

    /* CTA: foto a la izquierda que se funde con el azul de la franja */
    .mx-cta {
        grid-template-columns: minmax(0, 43fr) minmax(0, 57fr);
        align-items: center;
        min-height: clamp(320px, 24vw, 440px);
    }

    .mx-cta__img {
        height: 100%;
        aspect-ratio: auto;
        -webkit-mask-image: linear-gradient(90deg, #000 62%, transparent);
        mask-image: linear-gradient(90deg, #000 62%, transparent);
    }

    .mx-cta__copy {
        padding: 40px 8% 40px 1vw;
    }

    .mx-demo .pj-demo__layout {
        grid-template-columns: minmax(0, 40fr) minmax(0, 56fr);
        width: min(90%, 1320px);
    }
}

@media (min-width: 1024px) and (max-width: 1279px) {
    .mx-page .mx-module p {
        font-size: calc(1.2 * 0.84rem);
    }

    /* aquí el recuadro de 35 % dejaba ~100 px de texto: va pegado a la orilla y más ancho.
       Empieza en 59.2 % del escenario; el codo llega a 75.7 % → 16.5 % + 1.6 % de respiro */
    .mx-hero__note {
        right: 0.8%;
        width: 40%;
        padding: 0.9em 1em 0.9em 18.1%;
        font-size: 0.9rem;
        line-height: 1.35;
    }
}

/* =========================================================
   MOVIMIENTO: lenguaje de planta
   - Hero: el tablero "se enciende": las barras de capacidad suben en orden, la curva de costos se traza
     y el anillo de estatus se completa rebanada por rebanada; los tableros flotan despacio.
   - Proceso: las tres estaciones entran en orden y su luz late; en la banda del recorrido una luz cian
     avanza de etapa en etapa, como una pieza en la línea.
   - Ejemplo: la foto enfoca, las cifras cuentan desde 0 (manufactura-mexico.js) y el medidor de existencia se llena.
   - Problema: una línea de inspección recorre la foto del supervisor una sola vez.
   - Módulos: entran como piezas en banda transportadora (con tope al llegar) y cada ícono se troquela.
   - Preparación: el panel sale del borde derecho, como la cama de una máquina.
   - Controles: las tres tarjetas arrancan juntas detrás de la del medio y se separan (escritorio).
   - CTA: la foto se asienta despacio.
   Todo es transform/opacity y corre una sola vez al entrar en pantalla; sin JS extra.
   .pj-motion lo pone el script del <head> (no aplica con "reducir movimiento"); proyectos.js añade .is-in a cada [data-reveal].
   ========================================================= */
@media (prefers-reduced-motion: no-preference) {

    /* ---------- HERO: entrada ---------- */
    .pj-motion .mx-hero__headline-line,
    .pj-motion .mx-hero__big,
    .pj-motion .mx-hero__end {
        animation: mx-headline-reveal 0.85s var(--mx-out) both;
    }

    .pj-motion .mx-hero__big { animation-delay: 0.12s; }
    .pj-motion .mx-hero__end { animation-delay: 0.24s; }

    .pj-motion .mx-hero__copy > :is(.mx-hero__lead, .pj-btn) {
        animation: mx-rise 0.9s var(--mx-out) both;
    }

    .pj-motion .mx-hero__lead { animation-delay: 0.38s; }
    .pj-motion .mx-hero__copy > .pj-btn { animation-delay: 0.52s; }

    .pj-motion .mx-hero__person {
        animation: mx-person-in 1.2s var(--mx-out) 0.1s both;
    }

    .pj-motion .mx-board {
        animation: mx-dock 0.9s var(--mx-out) both, mx-float 7s ease-in-out infinite;
    }

    .pj-motion .mx-board--capacity { animation-delay: 0.5s, 1.6s; }
    .pj-motion .mx-board--costs { animation-delay: 0.7s, 2.4s; }
    .pj-motion .mx-board--status { animation-delay: 0.9s, 3.2s; }

    .pj-motion .mx-hero__note {
        animation: mx-rise 0.9s var(--mx-out) 1.1s both;
    }

    /* barras: suben en orden, de la menor a la mayor */
    .pj-motion .mx-bars i {
        animation: mx-bar 0.7s var(--mx-out) both;
        animation-delay: calc(1.1s + var(--i) * 0.09s);
    }

    /* curva de costos: se traza y luego aparece el relleno */
    .pj-motion .mx-wave__line {
        stroke-dasharray: 1;
        animation: mx-draw 1.4s ease-in-out 1.2s both;
    }

    .pj-motion .mx-wave__area {
        animation: mx-fade 0.8s ease 2.2s both;
    }

    /* anillo: cada rebanada se completa después de la anterior */
    .pj-motion .mx-donut circle {
        animation: mx-slice 0.55s ease-out both;
        animation-delay: calc(1.4s + var(--i) * 0.4s);
    }

    /* ---------- BLOQUES ---------- */
    /* entrada base discreta: el movimiento con carácter lo llevan las piezas de cada sección */
    .pj-motion [data-reveal] {
        opacity: 0;
        transform: translateY(16px);
        transition: opacity 0.7s ease, transform 0.9s var(--mx-out);
    }

    .pj-motion [data-reveal].is-in {
        opacity: 1;
        transform: none;
    }

    /* títulos: se descubren de izquierda a derecha (el recorte va en el título, nunca en el bloque observado) */
    .pj-motion [data-reveal] :is(.pj-title, .mx-cta__copy h2, .pj-demo__copy h2) {
        clip-path: inset(-0.3em 100% -0.3em -0.3em);
        transition: clip-path 1s cubic-bezier(0.65, 0, 0.35, 1) 0.15s;
    }

    .pj-motion [data-reveal].is-in :is(.pj-title, .mx-cta__copy h2, .pj-demo__copy h2) {
        clip-path: inset(-0.3em -0.3em -0.3em -0.3em);
    }

    /* piezas que llegan después de su bloque, escalonadas por --d */
    .pj-motion [data-reveal] :is(.mx-calc__table tr, .mx-compare__card, .pj-faq__col > details) {
        opacity: 0;
        translate: 0 28px;
        transition: opacity 0.7s var(--mx-out) var(--d, 0.2s), translate 0.9s var(--mx-out) var(--d, 0.2s),
            background-color 0.35s ease, box-shadow 0.35s ease;
    }

    .pj-motion [data-reveal].is-in :is(.mx-calc__table tr, .mx-compare__card, .pj-faq__col > details) {
        opacity: 1;
        translate: 0 0;
    }

    .pj-faq__col > details:nth-child(2) { --d: 0.3s; }
    .pj-faq__col > details:nth-child(3) { --d: 0.4s; }

    /* responsables: cada panel sube desde su base, como plataforma, y luego se asoma la persona
       (el retraso solo va en la entrada; el relleno con el mouse responde de inmediato) */
    .pj-motion [data-reveal] .mx-role::before {
        transform: scaleY(0);
        transform-origin: 50% 100%;
        transition: transform 0.8s var(--mx-out) var(--rd, 0s), top 0.55s var(--mx-out), border-radius 0.4s ease;
    }

    .pj-motion [data-reveal].is-in .mx-role::before {
        transform: none;
    }

    .pj-motion [data-reveal] .mx-role__img {
        opacity: 0;
        translate: 0 10%;
        transition: opacity 0.7s ease calc(var(--rd, 0s) + 0.35s), translate 0.9s var(--mx-out) calc(var(--rd, 0s) + 0.35s);
    }

    .pj-motion [data-reveal].is-in .mx-role__img {
        opacity: 1;
        translate: 0 0;
    }

    .mx-role--2 { --rd: 0.12s; }
    .mx-role--3 { --rd: 0.24s; }


    /* preparación: el técnico entra desde la izquierda */
    .pj-motion [data-reveal] .mx-prep__img {
        opacity: 0;
        translate: -10% 0;
        transition: opacity 0.9s var(--mx-out) 0.2s, translate 1.1s var(--mx-out) 0.2s;
    }

    .pj-motion [data-reveal].is-in .mx-prep__img {
        opacity: 1;
        translate: 0 0;
    }

    /* medidor: la existencia se llena hasta su parte de la necesidad bruta */
    .pj-motion [data-reveal] .mx-meter i {
        width: 0;
        transition: width 1.3s var(--mx-out) 0.9s;
    }

    .pj-motion [data-reveal].is-in .mx-meter i {
        width: var(--stock);
    }

    /* ---------- PROCESO: estaciones y línea ---------- */
    .pj-motion [data-reveal] .mx-stations li {
        opacity: 0;
        translate: -24px 0;
        transition: opacity 0.6s ease, translate 0.8s var(--mx-out);
        transition-delay: calc(0.5s + var(--i) * 0.22s);
    }

    .pj-motion [data-reveal].is-in .mx-stations li {
        opacity: 1;
        translate: 0 0;
    }

    .mx-stations li::before {
        animation: mx-beacon 3.6s ease-out infinite;
        animation-delay: calc(var(--i) * 1.2s);
    }

    /* una luz recorre la banda: cada etapa se enciende en su turno (6 etapas × 1.2 s) */
    .mx-flow li {
        animation: mx-station calc(var(--steps, 6) * 1.2s) linear infinite;
        animation-delay: calc(var(--i) * 1.2s);
    }

    /* ---------- PROBLEMA: inspección ---------- */
    /* La imagen trae aire transparente (la cabeza empieza al 2 % y la foto al 17 %): la línea lleva de máscara
       la silueta de la propia imagen, así solo aparece sobre el muchacho y la foto, nunca en el área vacía.
       Recorre de la cabeza a la base moviendo su fondo dentro de la máscara fija. */
    .mx-problem__img::before {
        content: "";
        position: absolute;
        inset: 0;
        z-index: 1;
        background: linear-gradient(180deg, rgba(90, 210, 255, 0) 0%, rgba(140, 230, 255, 0.55) 50%, rgba(90, 210, 255, 0) 100%)
            0 -12% / 100% 22% no-repeat;
        -webkit-mask: url("../../img/nuevo-leon/manufactura-mexico/problema-supervisor.webp") 0 0 / 100% 100% no-repeat;
        mask: url("../../img/nuevo-leon/manufactura-mexico/problema-supervisor.webp") 0 0 / 100% 100% no-repeat;
        mix-blend-mode: screen;
        opacity: 0;
        pointer-events: none;
    }

    .pj-motion [data-reveal].is-in .mx-problem__img::before {
        animation: mx-scan 1.9s cubic-bezier(0.4, 0, 0.35, 1) 0.6s both;
    }

    /* ---------- MÓDULOS: banda transportadora ---------- */
    .pj-motion [data-reveal] .mx-module {
        opacity: 0;
        translate: -64px 0;
        transition: opacity 0.45s ease var(--d), translate 0.85s cubic-bezier(0.3, 1.35, 0.55, 1) var(--d),
            background-color 0.35s ease, box-shadow 0.35s ease;
    }

    .pj-motion [data-reveal].is-in .mx-module {
        opacity: 1;
        translate: 0 0;
    }

    /* el resaltado aparece cuando las piezas ya llegaron */
    .pj-motion [data-reveal]:not(.is-in) .mx-modules.has-hl::before {
        opacity: 0;
    }

    .pj-motion [data-reveal].is-in .mx-modules.has-hl::before {
        animation: mx-fade 0.5s ease 0.75s both;
    }

    /* el ícono se troquela cuando su pieza ya llegó */
    .pj-motion [data-reveal] .mx-module > i {
        opacity: 0;
        scale: 0.35;
        transition: scale 0.5s cubic-bezier(0.3, 1.9, 0.5, 1) calc(var(--d) + 0.4s), opacity 0.2s linear calc(var(--d) + 0.4s),
            transform 0.5s var(--mx-out), background-color 0.35s ease;
    }

    .pj-motion [data-reveal].is-in .mx-module > i {
        opacity: 1;
        scale: 1;
    }

    /* ---------- PREPARACIÓN: el panel sale del borde derecho ---------- */
    .pj-motion .mx-prep__panel[data-reveal] {
        transform: translateX(14%);
        transition: opacity 0.6s ease, transform 1.1s var(--mx-out);
    }

    .pj-motion .mx-prep__panel[data-reveal].is-in {
        transform: none;
    }

    /* ---------- EJEMPLO: la foto enfoca ---------- */
    .pj-motion [data-reveal] .mx-example__img img {
        scale: 1.07;
        transition: scale 1.6s var(--mx-out) 0.1s;
    }

    .pj-motion [data-reveal].is-in .mx-example__img img {
        scale: 1;
    }

    /* ---------- CTA: la foto se asienta (data-sweep: proyectos.js le pone .is-in sin la entrada base) ---------- */
    .pj-motion .mx-cta__img[data-sweep] img {
        scale: 1.12;
        transform-origin: 0 50%;
        transition: scale 2.2s var(--mx-out);
    }

    .pj-motion .mx-cta__img[data-sweep].is-in img {
        scale: 1;
    }
}

/* ---------- CONTROLES: de separados a juntos y de vuelta, solo con las tres en fila ---------- */
@media (prefers-reduced-motion: no-preference) and (min-width: 1024px) {
    /* las laterales esperan detrás de la del medio (que va encima) y luego se separan a su lugar */
    .pj-motion [data-reveal] .mx-compare__card:nth-child(1) { translate: calc(100% - 12px) 0; }
    .pj-motion [data-reveal] .mx-compare__card:nth-child(3) { translate: calc(-100% + 12px) 0; }
    .pj-motion [data-reveal] .mx-compare__card:nth-child(2) { translate: 0 22px; }

    .pj-motion [data-reveal] .mx-compare__card:is(:nth-child(1), :nth-child(3)) {
        transition: opacity 0.25s linear 0.55s, translate 1s cubic-bezier(0.7, 0, 0.2, 1) 0.6s;
    }

    .pj-motion [data-reveal] .mx-compare__card:nth-child(2) {
        transition: opacity 0.5s ease 0.1s, translate 0.8s var(--mx-out) 0.1s;
    }

    /* :nth-child(n) solo sube la especificidad por encima de las reglas de arriba */
    .pj-motion [data-reveal].is-in .mx-compare__card:nth-child(n) {
        translate: 0 0;
    }
}

@keyframes mx-rise {
    from { opacity: 0; transform: translateY(28px); }
    to { opacity: 1; transform: none; }
}

@keyframes mx-headline-reveal {
    from {
        opacity: 0;
        filter: blur(7px);
        translate: 0 0.18em;
    }

    to {
        opacity: 1;
        filter: blur(0);
        translate: 0 0;
    }
}

@keyframes mx-person-in {
    from { opacity: 0; transform: translateY(6%) scale(0.97); }
    to { opacity: 1; transform: none; }
}

@keyframes mx-dock {
    from { opacity: 0; transform: translateY(24px) scale(0.92); }
    to { opacity: 1; transform: none; }
}

@keyframes mx-float {
    0%, 100% { translate: 0 0; }
    50% { translate: 0 -8px; }
}

@keyframes mx-bar {
    from { transform: scaleY(0); }
    to { transform: scaleY(1); }
}

@keyframes mx-draw {
    from { stroke-dashoffset: 1; }
    to { stroke-dashoffset: 0; }
}

@keyframes mx-fade {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes mx-slice {
    from { stroke-dasharray: 0 100; }
    to { stroke-dasharray: var(--len) 100; }
}

/* fondo de 22 % de alto: en -12 % su centro cae en la coronilla (2 % de la imagen); en 114 % su centro llega a la base */
@keyframes mx-scan {
    0% { opacity: 0; background-position: 0 -12%; }
    6%, 90% { opacity: 1; }
    100% { opacity: 0; background-position: 0 114%; }
}

@keyframes mx-beacon {
    0% { box-shadow: 0 0 0 0 rgba(45, 123, 255, 0.55); }
    60%, 100% { box-shadow: 0 0 0 0.7em rgba(45, 123, 255, 0); }
}

@keyframes mx-station {
    0%, 12% {
        color: #8ff0ff;
        text-shadow: 0 0 14px rgba(47, 211, 240, 0.7);
    }

    18%, 100% {
        color: var(--pj-white);
        text-shadow: none;
    }
}

/* =========================================================
   RESPONSIVO: ajustes de la auditoría de 320 a 1920 px
   Los tamaños con "Nvw - Mrem" crecen en línea recta entre dos anchos clave
   (p. ej. el título de controles: ~22 px en 1024 → ~37 px en 1366, que es el tamaño del diseño).
   ========================================================= */

/* el iframe oculto del reCAPTCHA (331 px) agregaba scroll lateral en celulares de 320 px */
html:has(.mx-page) {
    overflow-x: clip;
}

/* módulos: "requerimientos" debe caber completo en su columna */
@media (max-width: 1023px) {
    .mx-page .mx-module h3 {
        font-size: calc(1.2 * clamp(1.05rem, 0.85rem + 0.9vw, 1.5rem));
    }

    /* controles: "02 Actualización" en una línea aun en 320 px */
    .mx-page .mx-compare h3 {
        gap: 14px;
        font-size: clamp(1.25rem, 0.9rem + 1.6vw, 1.9rem);
    }

    .mx-compare__n {
        padding-right: 14px;
    }
}

/* 600–767: tres columnas de responsables quedaban de 180 px; van apiladas como en celular.
   FAQ y formulario en una columna (en dos, las preguntas ocupaban 4 líneas y los ejemplos se cortaban) */
@media (min-width: 600px) and (max-width: 767px) {
    .mx-page .mx-roles__grid {
        grid-template-columns: minmax(0, 1fr);
        gap: 32px;
        max-width: 440px;
        margin-top: clamp(36px, 4vw, 60px);
    }

    .mx-page .mx-role {
        --r: 18px;
        --cr: 0 0 18px 18px;
    }

    .pj-faq__grid,
    .pj-form__grid {
        grid-template-columns: minmax(0, 1fr);
    }
}

/* 768–1023: tres responsables en fila; el nombre más largo cabe en su panel */
@media (min-width: 768px) and (max-width: 1023px) {
    .mx-page .mx-role h3 {
        font-size: calc(1.2 * 0.95rem);
    }
}

@media (min-width: 1024px) {
    /* controles: título, etiqueta y texto escalan desde 1024 sin salirse de la tarjeta */
    .mx-page .mx-compare h3 {
        font-size: clamp(1.35rem, 4.4vw - 1.45rem, 2.4rem);
    }

    .mx-compare dt {
        font-size: clamp(1rem, 1.64vw - 0.05rem, 1.35rem);
    }
}

/* 1024–1279: el hero no cabe con las medidas de 1366; el operario ocupa menos y el título baja de tamaño
   para que "MANUFACTURA" no choque con la tarjeta de capacidad */
@media (min-width: 1024px) and (max-width: 1279px) {
    .mx-hero {
        min-height: calc(58vw * 0.83 + 70px);
    }

    .mx-hero__media {
        width: 58vw;
    }

    .mx-hero__title {
        font-size: 4.2vw;
    }

    .mx-hero__lead {
        max-width: 34vw;
    }

    /* formulario: más ancho para la tarjeta, así los textos de ejemplo no se cortan */
    .mx-demo .pj-demo__layout {
        grid-template-columns: minmax(0, 34fr) minmax(0, 62fr);
        width: 94%;
        gap: 32px;
    }
}

/* =========================================================
   ESPACIO ENTRE SECCIONES
   Escritorio: problema, proceso y ejemplo sin relleno arriba ni abajo (ajuste hecho a mano en la vista;
   estaba en línea con !important y también pegaba las secciones en celular, por eso vive aquí solo para ≥ 1024).
   Celular y tableta: cada sección con su aire.
   ========================================================= */
@media (min-width: 1024px) {
    .mx-page .pj-section:is(.mx-problem, .mx-process, .mx-example) {
        padding-block: 0;
    }
}

@media (max-width: 1023px) {
    /* hero → foto del supervisor */
    .mx-page .pj-section.mx-problem {
        padding-block: clamp(40px, 7vw, 64px) 0;
    }

    /* banda de módulos → "Proceso" */
    .mx-page .pj-section.mx-process {
        padding-block: clamp(56px, 9vw, 80px) 0;
    }

    /* la cabeza del técnico sobresale 72 px del panel: necesita ese aire más el respiro con "Administración" */
    .mx-page .mx-prep {
        padding-top: clamp(96px, 14vw, 120px);
    }

    /* preparación ya deja aire abajo; el ejemplo solo agrega el suyo antes de "Controles" */
    .mx-page .pj-section.mx-example {
        padding-block: 0 clamp(16px, 3vw, 32px);
    }
}
