/* ==========================================================================
   NAVOA — sistema tipográfico. Único lugar con fuentes, escala y reglas de texto.
   Se carga como ÚLTIMA hoja de cada página: gana a las hojas propias sin trucos de especificidad.
   Familias: Inter (texto, botones, nav) · Inter Display (solo H1/H2) · IBM Plex Mono (etiquetas).
   Pesos: 400 · 500 · 600.
   ========================================================================== */

/* --- Fuentes locales (woff2, OFL: assets/fonts/LICENSE-*.txt) --------------------------------- */
@font-face { font-family: 'Inter'; src: url('assets/fonts/inter-400.woff2') format('woff2'); font-weight: 100 449; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/inter-500.woff2') format('woff2'); font-weight: 450 549; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter'; src: url('assets/fonts/inter-600.woff2') format('woff2'); font-weight: 550 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('assets/fonts/inter-display-400.woff2') format('woff2'); font-weight: 100 449; font-style: normal; font-display: swap; }
@font-face { font-family: 'Inter Display'; src: url('assets/fonts/inter-display-500.woff2') format('woff2'); font-weight: 450 900; font-style: normal; font-display: swap; }
@font-face { font-family: 'IBM Plex Mono'; src: url('assets/fonts/ibm-plex-mono-500.woff2') format('woff2'); font-weight: 100 900; font-style: normal; font-display: swap; }

/* --- Tokens ------------------------------------------------------------------------------------
   Tamaños fluidos con clamp(): mínimo en celular, máximo en ≥1440 px. */
:root {
  --font-heading: 'Inter Display', 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-body: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, Arial, sans-serif;
  --font-mono: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --accent: #3A82F6;

  --fs-label: clamp(0.75rem, 0.7356rem + 0.0641vw, 0.8125rem);   /* 12 → 13 px (etiquetas mono) */
  --fs-small: clamp(0.875rem, 0.8606rem + 0.0641vw, 0.9375rem);  /* 14 → 15 px (texto secundario) */
  --fs-body: clamp(1rem, 0.9286rem + 0.1488vw, 1.0625rem);       /* 16 → 17 px */
  --fs-lead: clamp(1.125rem, 0.9821rem + 0.2976vw, 1.25rem);     /* 18 → 20 px */
  --fs-h3: clamp(1.5rem, 0.8846rem + 0.9615vw, 1.75rem);         /* 24 → 28 px */
  --fs-h2: clamp(1.75rem, 1.2692rem + 1.9231vw, 3rem);           /* 28 (390) · 40 (1024) → 48 px (1440) */
  --fs-h1: clamp(2rem, 1.0385rem + 3.8462vw, 4.5rem);            /* 32 (390) · 56 (1024) → 72 px (1440) */

  --lh-h1: 1.08;
  --lh-h2: 1.1;
  --lh-h3: 1.2;
  --lh-body: 1.6;
  --ls-heading: -0.02em;
  --ls-label: 0.08em;
  --measure: 68ch;

  --btn-primary: #206EF3;        /* blanco sobre este azul: 4.6:1 */
  --btn-primary-hover: #1A5FD6;
  --focus-ring: #3A82F6;
}

/* --- Base ------------------------------------------------------------------------------------- */
body { font-family: var(--font-body); font-size: var(--fs-body); line-height: var(--lh-body); letter-spacing: 0; }
:where(b, strong) { font-weight: 500; }
:where(h4, h5, h6, th, dt) { font-weight: 500; }

/* Texto corrido: interlineado 1.6, sin tracking, ancho de lectura */
main :is(p, li, dd, blockquote, figcaption) { line-height: var(--lh-body) !important; letter-spacing: 0 !important; }
main p { max-width: var(--measure); }

/* --- Titulares --------------------------------------------------------------------------------
   H1/H2 en Inter Display 400; H3 en Inter 500. Los hijos heredan tamaño y familia del titular
   (salvo la marca NAVOA y las bajadas __sub, que tienen su propio estilo). */
:is(h1, h2, h3) :not(.navoa-word):not([class*="__sub"]):not(svg):not(svg *):not(img) {
  font-family: inherit !important; font-weight: inherit !important; letter-spacing: inherit !important; font-size: inherit !important;
}
h1:not(.report-pill), .navoa-h1 {
  font-family: var(--font-heading) !important; font-weight: 400 !important;
  letter-spacing: var(--ls-heading) !important; text-transform: none !important;
}
/* Tamaño de H1 en todo el sitio, salvo el titular del Inicio (.hero-title), que conserva su tamaño original de home.css */
h1:not(.report-pill):not(.hero-title), .navoa-h1 { font-size: var(--fs-h1) !important; line-height: var(--lh-h1) !important; }
h2 {
  font-family: var(--font-heading) !important; font-weight: 400 !important; font-size: var(--fs-h2) !important;
  line-height: var(--lh-h2) !important; letter-spacing: var(--ls-heading) !important; text-transform: none !important;
}
h3 {
  font-family: var(--font-body) !important; font-weight: 500 !important; font-size: var(--fs-h3) !important;
  line-height: var(--lh-h3) !important; letter-spacing: -0.015em !important; text-transform: none !important;
}
/* Titulares de componente (nombres en fichas, índice lateral, subtítulos de artículo): tamaño H3 */
:is(.leadership-info, .strategy-index__inner, .article-shell, .re-article, .re-featured__content) h2 {
  font-family: var(--font-body) !important; font-weight: 500 !important; font-size: var(--fs-h3) !important;
  line-height: var(--lh-h3) !important; letter-spacing: -0.015em !important;
}

/* Palabra destacada: misma familia del titular, en azul */
.navoa-accent { font-family: inherit !important; font-weight: inherit !important; letter-spacing: inherit !important; color: var(--accent) !important; }

/* --- Etiquetas mono: IBM Plex Mono 500, 12–13 px, tracking +0.08em. Únicas con mayúsculas. ---- */
.navoa-global-footer__nav h2, .article-share h2, .article-sources h2, .leadership-info h3,
.clinic-breadcrumb, .clinic-breadcrumb *, .hero-title .hero-title__sub {
  font-family: var(--font-mono) !important; font-weight: 500 !important; font-size: var(--fs-label) !important;
  line-height: 1.4 !important; letter-spacing: var(--ls-label) !important;
}
.navoa-global-footer__nav h2, .article-share h2, .article-sources h2, .clinic-breadcrumb, .hero-title .hero-title__sub { text-transform: uppercase !important; }
.leadership-info h3 { text-transform: none !important; }

/* --- Navegación: Inter 500, 15 px, sin mayúsculas ni caja con borde ------------------------------ */
.nav .nav-links > a:not(.nav-links__mobile-cta), .nav .nav-item > a, .nav .lang-switch__item {
  font-family: var(--font-body) !important; font-weight: 500 !important; font-size: 0.9375rem !important;
  letter-spacing: 0 !important; text-transform: none !important;
}
@media (min-width: 1024px) {
  .nav .nav-links > a:not(.nav-links__mobile-cta), .nav .nav-item > a { border-color: transparent !important; }
  .nav .nav-links > a:not(.nav-links__mobile-cta):hover, .nav .nav-item > a:hover, .nav .nav-item.open > a { border-color: transparent !important; }
}

/* --- CTA primario (nav "Conversemos" y barra del hero): sólido, Inter 600, ≥44 px ---------------- */
.nav .nav-talk, .nav.nav--hero-overlay:not(.is-scrolled) .nav-talk {
  min-height: 44px !important; height: 44px !important; padding: 0 18px !important;
  border: 0 !important; border-radius: 8px !important; background: var(--btn-primary) !important; color: #fff !important;
  font-family: var(--font-body) !important; font-weight: 600 !important; font-size: 1rem !important;
  letter-spacing: 0 !important; text-transform: none !important;
}
.nav .nav-talk:hover, .nav.nav--hero-overlay:not(.is-scrolled) .nav-talk:hover { background: var(--btn-primary-hover) !important; }
.hero-banner { min-height: 44px !important; height: auto !important; background: var(--btn-primary) !important; }
.hero-banner:hover { background: var(--btn-primary-hover) !important; filter: none !important; }
.hero-banner__title, .hero-banner__cta {
  font-family: var(--font-body) !important; font-size: 1rem !important; letter-spacing: 0 !important; text-transform: none !important;
}
.hero-banner__title { font-weight: 500 !important; }
.hero-banner__cta { font-weight: 600 !important; }

/* Resto de botones y enlaces-botón: Inter 600, sin mayúsculas (antes Geist Mono en mayúsculas) */
:is(a[class*="button"], a[class*="btn"], a[class*="__cta"], [class*="btn-split"], [class*="btn-split"] *, .strategy-button, .diagnostico-v2-button,
    button[type="submit"], .leadership-connect-form button, .re-subscribe button, .asmt-btn, .academy-next__start, .academy-next__login, .academy-next__button) {
  font-family: var(--font-body) !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important;
}
:is(a[class*="button"], a[class*="btn"], a[class*="__cta"], .strategy-button, .diagnostico-v2-button,
    button[type="submit"], .leadership-connect-form button, .re-subscribe button, .asmt-btn, .academy-next__start, .academy-next__login, .academy-next__button) {
  font-size: 1rem !important;
}

/* Foco visible para teclado */
:is(a, button, [role="button"], input, select, textarea, summary):focus-visible { outline: 2px solid var(--focus-ring) !important; outline-offset: 3px !important; }
:is(.nav-talk, .hero-banner):focus-visible { outline-color: #fff !important; }

/* --- Hero del Inicio: titular con su tamaño original (home.css) y el interlineado de antes --- */
body.navoa-home .hero-title, body.navoa-home .hero-title .hero-title__dark { line-height: 1.1 !important; letter-spacing: -0.035em !important; }
html[lang="es-CL"] body.navoa-home .hero-title .hero-title__dark { font-size: calc(1em + 1pt) !important; } /* +1 pt de la versión ES */
body.navoa-home .hero-title .hero-title__sub { color: #fff !important; } /* blanco pleno: al 80 % no llegaba a 4.5:1 */

/* --- Mínimo de lectura: fichas de liderazgo y footer ≥14 px -------------------------------------- */
.leadership-info p, .navoa-global-footer__nav a, .navoa-global-footer__bottom p,
.footer-nav a, .footer-nav span, .footer-brand p, .footer-legal, .leadership-footer p { font-size: var(--fs-small) !important; }

/* --- Texto secundario ≥14 px (lista medida en todas las páginas; las etiquetas mono quedan en 12–13 px) --- */
:is(
  .academia-subnav__inner > a,
  .academy-next__audiences > span,
  .academy-next__card > b,
  .academy-next__card > p,
  .academy-next__card > small,
  .academy-next__chips > span,
  .academy-next__detail-copy > ul > li,
  .academy-next__nav > a > span,
  .academy-next__tools > a,
  .academy-next__tools-heading > div > p,
  .adoption-change__elements > article > p,
  .adoption-evidence > article > p,
  .adoption-index__action > a,
  .adoption-index__action > a > span,
  .adoption-index__delta,
  .adoption-index__dimension-name,
  .adoption-index__legend > span,
  .article-hero__author,
  .article-hero__author > b,
  .article-related__card > div > span,
  .article-sources > ol > li > a,
  .asmt-landing-badge,
  .asmt-landing__note,
  .asmt-meta,
  .build-applications > article > a,
  .build-applications > article > a > b,
  .build-applications > article > ul > li,
  .clinic-accordion-card > button > span > small,
  .clinic-accordion-card__body > div > a,
  .clinic-accordion-card__body > div > a > span,
  .clinic-accordion-card__body > div > ul > li,
  .clinic-capabilities__set > span,
  .clinic-nav-fixed > a,
  .clinic-nav-group > nav > a,
  .clinic-nav-overview,
  .decision-demo__disclaimer,
  .diagnostico-v2-concepts > li,
  .diagnostico-v2-dimension > dt,
  .diagnostico-v2-meta,
  .diagnostico-v2-method-tab > span,
  .diagnostico-v2-org-dimension,
  .health-course-card > p,
  .home-services__callout,
  .home-services__detail,
  .index-flow__text > small,
  .lab-agent-capabilities > div > span,
  .lab-agent-details > div > p,
  .lab-agent-sources > div > span,
  .lab-promo-flow > div > span,
  .leadership-connect-form__full,
  .leadership-connect-form__full > b,
  .leadership-connect-form__grid > label,
  .leadership-connect-form__grid > label > b,
  .leadership-phone-bubble > small,
  .navoa-agent__bubble,
  .navoa-agent__wa,
  .navoa-agent__wa > a,
  .re-article > a,
  .re-article > a > span,
  .re-article > p,
  .re-featured__content > a,
  .re-featured__content > a > span,
  .re-latest-head > p,
  .re-newsletter__form-wrap > small,
  .so-hero__body,
  .so-service-index > a,
  .so-shell > a,
  .so-shell > a > span,
  .strategy-index__inner > nav > a,
  .strategy-inline-cta,
  .strategy-inline-cta > span,
  .strategy-module-chips > span,
  .strategy-module-subtitle,
  .strategy-pill-grid > span,
  .tool-card__when,
  .tool-card__when > strong,
  .track-card__for
) { font-size: var(--fs-small) !important; }

/* Controles de formulario: misma familia que el texto (el navegador usa system-ui por defecto) */
:where(button, input, select, textarea) { font-family: inherit; }

/* Ajustes de layout que exige el mínimo de 14 px (sin cambiar el diseño): las columnas pueden encoger */
.diagnostico-v2-org { min-width: 0; }
.diagnostico-v2-org-dimension { grid-template-columns: minmax(0, 1fr) 65px !important; }
@media (min-width: 480px) { .adoption-evidence article { grid-template-columns: auto minmax(0, 1fr); } }

/* --- Contraste AA (≥4.5:1) en textos chicos sobre fondo sólido: solo se ajusta el tono que no cumplía --- */
.home-services__service:nth-child(1) .home-services__category { color: #1A5FD6; }          /* 4.3 → 5.3:1 */
.home-services__service:nth-child(2) .home-services__category { color: #5B4BD6; }          /* 4.1 → 5.7:1 */
.home-services__meta { color: #5E6B78; }                                                    /* 3.5 → 5.2:1 */
.services-editorial-page .so-service-index a[href$="#diagnostico"] > span { color: #3A82F6; } /* 4.4 → 5.2:1 sobre negro */
.services-editorial-page .so-service-index a[href$="#adoptar"] > span { color: #4C9A5A; }     /* 3.2 → 5.8:1 sobre negro */
.re-section-label, .re-meta { color: #5F6C77; }                                             /* 4.5 → 5.2:1 */
.re-article a, .re-featured__content > a { color: #1A5FD6; }                                /* 4.4 → 5.4:1 */
.navoa-global-footer__bottom p { color: rgba(218, 229, 242, .62) !important; }  /* 4.1 → 6.0:1 (el footer inyecta su CSS después) */
.footer-bottom .footer-legal { color: rgba(213, 225, 239, .62) !important; }     /* 4.0 → 5.6:1 */

/* Texto corrido sin tracking también en páginas que lo heredaban negativo */
.resources-editorial, .work-course-page main { letter-spacing: 0; }

/* Textos chicos que solo aparecen en celular */
.strategy-index__toggle > span, .academy-next__mobile-nav > a, .lab-unified-hero__impact { font-size: var(--fs-small) !important; }

/* Etiquetas mono que heredaban 14–16 px: vuelven a 12–13 px */
.so-service-index > a > span:first-child, .diagnostico-v2-method-tab > .diagnostico-v2-method-tabnum, .adoption-index__dimension-id { font-size: var(--fs-label) !important; }
.so-service-index > a > span:last-child { font-size: var(--fs-small) !important; } /* flecha ↓ */

/* CTA del menú móvil: sin mayúsculas, Inter 600 */
.nav .nav-links__mobile-cta { font-family: var(--font-body) !important; font-weight: 600 !important; letter-spacing: 0 !important; text-transform: none !important; }
/* Herramientas: nombre (H3) + nivel en una fila; en celulares angostos el nivel baja si no cabe */
.tool-card__top { flex-wrap: wrap; row-gap: 8px; }

/* --- Inicio en celular horizontal (alto ≤ 500 px): esfera a la derecha, texto a la izquierda, sin solaparse.
   La esfera conserva diseño y animación; solo se ubica y dimensiona su contenedor, como ya se hace en celular vertical. */
@media (orientation: landscape) and (max-height: 500px) and (min-width: 560px) and (max-width: 1023px) {
  body.navoa-home .hero { min-height: 100svh !important; }
  body.navoa-home .hero-orb {
        left: auto !important; right: 24px !important; top: 16px !important;
    width: min(44vw, calc(100svh - var(--nav-h, 66px) - 32px)) !important; transform: none !important;
  }
  body.navoa-home .hero-viewport { display: flex !important; flex-direction: column !important; align-items: flex-start !important; justify-content: flex-start !important; min-height: 0 !important; padding-top: 20px !important; padding-bottom: 24px !important; gap: 18px !important; }
  body.navoa-home .hero-copy { min-height: 0 !important; margin-top: 0 !important; padding-top: 0 !important; top: 0 !important; max-width: calc(100% - min(44vw, calc(100svh - var(--nav-h, 66px) - 32px)) - 32px); }
  body.navoa-home .hero-banner { position: relative !important; left: auto !important; bottom: auto !important; margin-top: 0 !important;
    max-width: calc(100% - min(44vw, calc(100svh - var(--nav-h, 66px) - 32px)) - 32px) !important; height: auto !important; flex-wrap: wrap; row-gap: 4px; padding: 10px 14px !important; }
  body.navoa-home .hero-banner__title { white-space: normal !important; overflow: visible !important; text-overflow: clip !important; }
}

/* Heroes de servicios (Estrategia, IA a medida, IA Enterprise, Adopción): título completo en blanco, sin frase en azul */
.strategy-hero h1, .strategy-hero h1 .navoa-accent { color: #fff !important; }
/* Academia — "IA para el trabajo real" (ES) y "Learn AI. Apply it to real work." (EN): título completo en blanco */
#hero-academy-title, #hero-academy-title :is(.hero-academy__accent, .navoa-accent),
#work-hero-title, #work-hero-title .navoa-accent { color: #fff !important; }
/* Heroes de servicios: frase bajo el párrafo ("15 días · de la oportunidad a la hoja de ruta", "De la oportunidad a producción") en blanco */
.strategy-hero__copy > strong { color: #fff !important; }
