/* =========================================================
   itw-shell.css — cabecera, barra superior, mega menú, drawer
   y pie del diseño 2026-07. Extraído de index.html para que las
   páginas internas compartan la misma navegación.
   NO contiene el sistema completo de la home: solo el "shell".
   Cárgalo DESPUÉS del CSS propio de cada página.
   Generado: 2026-07-31
   ========================================================= */

:root {
    /* Marca */
    --c-primary: #667eea;
    --c-primary-deep: #764ba2;
    /* variante accesible de la marca para texto pequeño sobre claro */
    --c-primary-ink: #4c56c0;
    /* marca sobre fondo oscuro */
    --c-primary-soft: #aab6f2;
    --c-primary-tint: #eef0fc;
    --c-primary-wash: #f3f4fd;
    --grad-primary: linear-gradient(135deg, #667eea 0%, #764ba2 100%);

    /* Tinta y superficies */
    --c-ink: #1d1d1f;
    --c-on-ink: #f5f5f7;
    --c-on-ink-soft: #a1a1a6;
    --c-on-ink-faint: #8e8e93;
    --c-white: #ffffff;
    --c-surface: var(--c-white);
    --c-surface-alt: #fbfbfd;
    --c-surface-2: #f0f2f5;
    --c-bg: #f5f7fa;
    --c-hero-top: #eceef9;

    /* Texto */
    --c-text-strong: #2d2d2f;
    --c-text: #515154;
    --c-text-muted: #6e6e73;

    /* Bordes y detalles */
    --c-border: rgba(29, 29, 31, .10);
    --c-border-soft: rgba(29, 29, 31, .07);
    --c-border-strong: rgba(29, 29, 31, .16);
    --c-border-on-ink: rgba(255, 255, 255, .12);
    --c-dot: #d2d2d7;

    /* Estados */
    --c-green: #10b981;
    --c-green-ink: #076f4c;
    --c-green-tint: #d9f5e9;
    --c-green-bright: #34d399;
    --c-amber-ink: #8a5a08;
    --c-amber-tint: #fdf1dc;

    /* Maquetas ilustrativas */
    --c-skeleton-a: #e4e6ec;
    --c-skeleton-b: #f0f2f5;

    /* Sombras */
    --sh-card: 0 24px 50px -32px rgba(29, 29, 31, .30);
    --sh-pop: 0 30px 60px -24px rgba(29, 29, 31, .32);
    --sh-hero: 0 40px 80px -40px rgba(29, 29, 31, .35);
}
*,
*::before,
*::after {
    box-sizing: border-box;
}
button {
    font: inherit;
}

:focus-visible {
    outline: 2px solid var(--c-primary-ink);
    outline-offset: 3px;
    border-radius: 4px;
}

.mono {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
}

.skip-link {
    position: absolute;
    left: -9999px;
    top: 0;
    z-index: 100;
    padding: 12px 18px;
    background: var(--c-ink);
    color: var(--c-on-ink);
    font-weight: 700;
    border-radius: 0 0 10px 0;
}

.skip-link:focus {
    left: 0;
    color: var(--c-on-ink);
}
/* ================= BOTONES ================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    border: 1px solid transparent;
    border-radius: 12px;
    padding: 15px 26px;
    font-size: 16px;
    font-weight: 700;
    letter-spacing: -.015em;
    line-height: 1.2;
    cursor: pointer;
    text-align: center;
    transition: transform .18s ease, box-shadow .18s ease, background-color .18s ease;
}

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

.btn--grad {
    background: var(--grad-primary);
    color: var(--c-white);
    box-shadow: 0 8px 20px -8px rgba(102, 126, 234, .75);
}

.btn--grad:hover {
    color: var(--c-white);
    box-shadow: 0 12px 26px -8px rgba(118, 75, 162, .75);
}

.btn--ink {
    background: var(--c-ink);
    color: var(--c-on-ink);
}

.btn--ink:hover {
    color: var(--c-white);
    background: var(--c-text-strong);
}

.btn--light {
    background: var(--c-surface);
    border-color: var(--c-border-strong);
    color: var(--c-ink);
}

.btn--light:hover {
    color: var(--c-ink);
    background: var(--c-surface-alt);
}

.btn--on-ink {
    background: var(--c-on-ink);
    color: var(--c-ink);
}

.btn--on-ink:hover {
    color: var(--c-ink);
}

.btn--sm {
    padding: 11px 20px;
    font-size: 14.5px;
    border-radius: 10px;
}
/* ================= BARRA SUPERIOR ================= */
.topbar {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    text-align: center;
    gap: 8px 14px;
    padding: 11px 20px;
    background: var(--c-ink);
    color: var(--c-on-ink);
    font-size: 13.5px;
    font-weight: 500;
    letter-spacing: -.01em;
}

.topbar a {
    color: var(--c-on-ink);
    text-decoration: underline;
    text-underline-offset: 3px;
    font-weight: 600;
}

.topbar__sep {
    opacity: .35;
}

/* En pantallas estrechas la barra parte en dos lineas y el separador
   se queda huerfano al final de la primera: es decorativo, se oculta. */
@media (max-width: 639px) {
    .topbar__sep {
        display: none;
    }
}

.topbar__phone {
    display: inline-flex;
    align-items: center;
    gap: 7px;
    padding: 4px 10px;
    border: 1px solid rgba(255, 255, 255, .18);
    border-radius: 999px;
    font-size: 11px;
    letter-spacing: .02em;
    color: var(--c-on-ink);
    text-decoration: none;
}

/* ================= CABECERA ================= */
.site-header {
    position: sticky;
    top: 0;
    z-index: 50;
    background: rgba(251, 251, 253, .88);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--c-border);
}

.site-header__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 clamp(14px, 3vw, 32px);
    height: clamp(72px, 6.4vw, 92px);
    position: relative;
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    align-items: center;
    gap: clamp(12px, 2.2vw, 36px);
}

.brand {
    display: flex;
    align-items: center;
    gap: 10px;
    min-width: 0;
    color: var(--c-ink);
}

.brand:hover {
    color: var(--c-ink);
}

/* El logotipo ya incluye el nombre de marca: se usa como lockup
   completo, sin duplicarlo con texto al lado. */
.brand__logo {
    /* El logo es 2000x574 (ratio 3.5): a 32px se veía mucho menor que en la
       web anterior, que lo servía a 65px. Subido a 48 px el 2026-08-08. */
    height: clamp(36px, 4.6vw, 64px);
    width: auto;
    flex: none;
}

.nav-desktop {
    display: none;
    align-items: center;
    justify-content: center;
    gap: clamp(14px, 1.8vw, 28px);
    font-size: 14.5px;
    font-weight: 600;
    white-space: nowrap;
}

.nav-desktop a {
    color: var(--c-text-strong);
}

.nav-desktop a:hover {
    color: var(--c-primary-ink);
}

.nav-item {
    display: flex;
    align-items: center;
    height: 72px;
    gap: 4px;
}

.nav-caret {
    display: inline-grid;
    place-items: center;
    width: 22px;
    height: 22px;
    padding: 0;
    border: 0;
    border-radius: 6px;
    background: transparent;
    color: var(--c-text-muted);
    cursor: pointer;
}

.nav-caret svg {
    transition: transform .2s ease;
}

.nav-caret[aria-expanded="true"] svg {
    transform: rotate(180deg);
}

.header-actions {
    display: flex;
    align-items: center;
    justify-content: flex-end;
    gap: 10px;
    white-space: nowrap;
    flex: none;
}

.header-actions__wa {
    display: none;
    font-size: 14.5px;
    font-weight: 600;
    color: var(--c-text-strong);
}

.burger {
    display: flex;
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    width: 42px;
    height: 42px;
    padding: 0 11px;
    border: 1px solid var(--c-border-strong);
    border-radius: 10px;
    background: var(--c-surface);
    cursor: pointer;
}

.burger span {
    display: block;
    height: 1.8px;
    background: var(--c-ink);
    border-radius: 2px;
    transition: transform .2s ease, opacity .2s ease;
}

.burger[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(5.8px) rotate(45deg);
}

.burger[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}

.burger[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-5.8px) rotate(-45deg);
}

/* ---- Mega menú ---- */
.megamenu {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    margin: 0 auto;
    width: 100%;
    max-width: 880px;
    padding: 24px;
    background: var(--c-surface);
    border: 1px solid var(--c-border);
    border-radius: 16px;
    box-shadow: var(--sh-pop);
    grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
    gap: 24px;
    white-space: normal;
}

.megamenu.is-open {
    display: grid;
}

.megamenu__col {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.megamenu__label {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--c-text-muted);
    padding: 0 0 8px;
}

.mm-link {
    display: flex;
    align-items: flex-start;
    gap: 11px;
    padding: 9px 10px;
    border-radius: 10px;
    color: var(--c-ink);
}

.mm-link:hover {
    background: var(--c-primary-wash);
    color: var(--c-ink);
}

.mm-link--row {
    align-items: center;
}

.mm-icon {
    flex: none;
    width: 30px;
    height: 30px;
    border-radius: 9px;
    background: var(--c-primary-tint);
    display: grid;
    place-items: center;
}

.mm-icon--neutral {
    background: var(--c-surface-2);
    font-size: 11.5px;
    font-weight: 800;
    color: var(--c-text-muted);
}

.mm-text {
    display: flex;
    flex-direction: column;
    gap: 2px;
    min-width: 0;
}

.mm-title {
    font-size: 14px;
    font-weight: 700;
    letter-spacing: -.015em;
    display: flex;
    align-items: center;
    gap: 7px;
    flex-wrap: wrap;
}

.mm-title--grow {
    flex: 1;
}

.mm-desc {
    font-size: 12.5px;
    color: var(--c-text-muted);
    font-weight: 500;
}

.tag {
    padding: 2px 6px;
    border-radius: 5px;
    font-size: 9.5px;
    font-weight: 800;
    letter-spacing: .06em;
}

.tag--green {
    background: var(--c-green-tint);
    color: var(--c-green-ink);
}

.tag--amber {
    background: var(--c-amber-tint);
    color: var(--c-amber-ink);
}

.tag--brand {
    background: var(--c-primary-tint);
    color: var(--c-primary-ink);
}

.megamenu__cta {
    display: flex;
    flex-direction: column;
    gap: 14px;
    padding: 20px;
    border-radius: 12px;
    background: var(--c-surface-2);
    border: 1px solid var(--c-border);
}

.megamenu__cta h3 {
    font-size: 15.5px;
    font-weight: 800;
    letter-spacing: -.025em;
    line-height: 1.3;
    color: var(--c-ink);
}

.megamenu__cta p {
    font-size: 13px;
    line-height: 1.5;
    color: var(--c-text-muted);
    font-weight: 500;
    flex: 1;
}

.megamenu__wa {
    font-size: 13px;
    font-weight: 700;
    text-align: center;
}

/* ---- Drawer móvil ---- */
.drawer {
    display: none;
    position: absolute;
    top: 72px;
    left: 0;
    right: 0;
    padding: 16px clamp(14px, 3vw, 32px) 22px;
    background: var(--c-surface);
    border-top: 1px solid var(--c-border);
    box-shadow: 0 24px 40px -20px rgba(29, 29, 31, .28);
    flex-direction: column;
    gap: 6px;
    max-height: calc(100vh - 120px);
    overflow-y: auto;
    white-space: normal;
}

.drawer.is-open {
    display: flex;
}

.drawer__label {
    font-family: "IBM Plex Mono", ui-monospace, monospace;
    font-size: 10.5px;
    letter-spacing: .1em;
    color: var(--c-text-muted);
    padding: 4px 2px 8px;
}

.drawer__item {
    display: flex;
    align-items: center;
    gap: 11px;
    padding: 11px 10px;
    border-radius: 10px;
    color: var(--c-ink);
    background: var(--c-surface-alt);
}

.drawer__item:hover {
    color: var(--c-ink);
    background: var(--c-surface-2);
}

.drawer__item .label {
    flex: 1;
    font-size: 15px;
    font-weight: 700;
    letter-spacing: -.015em;
}

.drawer__sep {
    height: 1px;
    background: var(--c-border);
    margin: 10px 0;
}

.drawer__plain {
    padding: 11px 10px;
    font-size: 15.5px;
    font-weight: 700;
    color: var(--c-ink);
}

.drawer__plain--brand {
    color: var(--c-primary-ink);
}

.drawer__cta {
    margin-top: 8px;
    width: 100%;
}

/* ================= PIE ================= */
.site-footer {
    background: var(--c-ink);
    color: var(--c-on-ink-soft);
    padding: clamp(44px, 6vw, 64px) clamp(16px, 4vw, 32px) 32px;
}

.site-footer__inner {
    display: flex;
    flex-direction: column;
    gap: 44px;
}

.site-footer__cols {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
    gap: clamp(24px, 4vw, 40px);
}

.site-footer__brand {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* El logotipo es azul oscuro: sobre fondo tinta necesita placa clara. */
.site-footer__brand img {
    height: 42px;
    width: auto;
    border-radius: 8px;
    background: var(--c-on-ink);
    padding: 7px 10px;
}

.site-footer__about {
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.site-footer__about p {
    font-size: 14px;
    line-height: 1.6;
    max-width: 340px;
    font-weight: 500;
}

.site-footer__col {
    display: flex;
    flex-direction: column;
    gap: 11px;
}

.site-footer__col .mono {
    font-size: 12px;
    letter-spacing: .1em;
    color: var(--c-on-ink-faint);
}

.site-footer a {
    font-size: 14px;
    font-weight: 600;
    color: var(--c-on-ink-soft);
    overflow-wrap: anywhere;
}

.site-footer a:hover {
    color: var(--c-on-ink);
}

.site-footer__hr {
    height: 1px;
    background: var(--c-border-on-ink);
}

.site-footer__bottom {
    display: flex;
    justify-content: space-between;
    gap: 20px;
    flex-wrap: wrap;
    font-size: 13px;
    font-weight: 500;
}

@media (min-width: 900px) {
    .site-header__inner {
        grid-template-columns: 1fr auto 1fr;
    }

    .nav-desktop {
        display: flex;
    }

    .header-actions__wa {
        display: inline;
    }

    .burger {
        display: none;
    }
}

/* =========================================================
   COMPATIBILIDAD con el CSS antiguo de las páginas internas.
   Ellas declaran reglas por ELEMENTO (`nav {position:fixed}`,
   `footer {background:#1d1d1f;padding:60px 40px 30px}`,
   `body {font-family:-apple-system…}`) que alcanzarían al
   marcado nuevo. Se reafirma aquí lo del diseño 2026-07 con
   especificidad suficiente. Cargar SIEMPRE este archivo el
   último del <head>.
   ========================================================= */
.topbar,
.site-header,
.site-header input,
.site-header button,
.site-footer {
    font-family: Manrope, system-ui, -apple-system, "Segoe UI", sans-serif;
}

.topbar .mono,
.site-header .mono,
.site-footer .mono,
.megamenu__label {
    font-family: "IBM Plex Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
}

/* `nav {position:fixed;…}` de las páginas antiguas */
.site-header nav.nav-desktop,
.site-footer nav.site-footer__col {
    position: static;
    top: auto;
    width: auto;
    background: none;
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    border-bottom: 0;
    box-shadow: none;
    z-index: auto;
    padding: 0;
    margin: 0;
}

/* `footer {…}` de las páginas antiguas */
footer.site-footer {
    background: var(--c-ink);
    color: var(--c-on-ink-soft);
    padding: clamp(44px, 6vw, 64px) clamp(16px, 4vw, 32px) 32px;
    margin: 0;
    width: auto;
}

/* Ancla del enlace «saltar al contenido» en páginas sin <main> */
#contenido {
    scroll-margin-top: 96px;
}
