/* Integración segura del lenguaje visual Pro dentro del proyecto Astro. */
:root {
  --container-wide: var(--max-width-wide);
  --font: var(--font-family-sans);
  --header-h: var(--header-height);
}

.cursor-glow,
.hero-canvas {
  display: none !important;
}

.hero-stage__halo::before,
.hero-stage__halo::after,
.hero-core,
.hero-card,
.hero-orbit-dot,
.scroll-cue__mouse::before,
.abstract-orbit::before,
.abstract-orbit::after,
.service-visual::before,
.service-visual::after {
  animation: none !important;
}

/*
 * Corrección tipográfica y UX
 *
 * La referencia Pro usa displays de hasta 116 px dentro de medidas menores a
 * 12ch. Esta capa conserva su identidad, pero devuelve el lead y los CTA al
 * primer viewport, fija un piso legible para microtexto y estabiliza tablet.
 *
 * Refinamiento tipográfico transversal (2026-08-19)
 * La primera corrección seguía creciendo hasta 88 px fuera de la matriz de
 * 1440 px. La escala siguiente suaviza la pendiente hasta 1920 px, diferencia
 * el display de Inicio del H1 interno y conserva cuerpo y controles.
 */
.site-header,
.site-header.is-scrolled {
  padding-block: 5px;
}

/*
 * El fondo opaco mantiene el contraste de los enlaces cuando la cabecera fija
 * cruza superficies claras. No dependemos de que cada motor componga
 * `backdrop-filter` de la misma forma para cumplir WCAG 2.2 AA.
 */
.site-header.is-scrolled {
  background: #050812;
  backdrop-filter: none;
}

.site-header.is-scrolled .nav-shell {
  background: #050812;
  backdrop-filter: none;
}

.nav-shell {
  min-height: 54px;
}

.nav-link,
.header-actions .btn,
.btn--small {
  font-size: 0.875rem;
}

.btn--small {
  min-height: 44px;
}

/*
 * Mantiene continua la zona interactiva entre el enlace y el megamenú. El
 * panel se dibuja 18 px por debajo del activador; sin este puente transparente,
 * `mouseleave` cerraba el menú mientras el puntero cruzaba ese espacio.
 */
.mega-menu::before {
  position: absolute;
  right: 0;
  bottom: 100%;
  left: 0;
  height: 20px;
  content: "";
}

/* Con JavaScript, el estado anunciado y el visual comparten una sola fuente. */
html.animations-ready .nav-item:not(.is-open) > .mega-menu {
  opacity: 0;
  pointer-events: none;
  transform: translate(-50%, -8px) scale(0.98);
}

.display,
.h1 {
  font-size: var(--font-size-h1);
  letter-spacing: var(--tracking-display);
  line-height: var(--line-height-tight);
}

.h2 {
  font-size: var(--font-size-h2);
  letter-spacing: var(--tracking-tight);
  line-height: var(--line-height-heading);
}

.h3 {
  font-size: var(--font-size-h3);
  letter-spacing: var(--tracking-tight);
}

.hero {
  padding: clamp(7rem, 8vw, 8.5rem) 0 clamp(3.5rem, 5vw, 4.5rem);
}

.hero__inner {
  grid-template-columns: minmax(0, 1.06fr) minmax(430px, 0.94fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.hero__copy .display {
  max-width: 14ch;
}

.hero__lead {
  max-width: 57ch;
  font-size: clamp(1rem, 0.86rem + 0.23vw, 1.125rem);
  line-height: 1.65;
}

.hero__visual {
  min-height: 580px;
}

.subhero {
  min-height: 600px;
  padding: clamp(7.5rem, 9vw, 9rem) 0 clamp(4rem, 6vw, 5rem);
}

.subhero__grid {
  grid-template-columns: minmax(0, 1.05fr) minmax(360px, 0.75fr);
  gap: clamp(2rem, 5vw, 5rem);
}

.subhero__copy .h1 {
  max-width: 13.5ch;
  font-size: var(--font-size-h1);
}

.subhero--services-index {
  min-height: clamp(31rem, 43vw, 35.5rem);
  padding: clamp(4.25rem, 5vw, 5.25rem) 0 clamp(2.5rem, 3.5vw, 3.25rem);
}

.subhero--products-index {
  min-height: clamp(32rem, 44vw, 37.5rem);
  padding: clamp(4.25rem, 5vw, 4.75rem) 0 clamp(3.25rem, 5vw, 4.25rem);
}

.subhero--services-index .breadcrumbs {
  margin-bottom: clamp(1rem, 1.5vw, 1.2rem);
}

.subhero--products-index .breadcrumbs {
  margin-bottom: clamp(1rem, 1.4vw, 1.25rem);
}

.subhero--services-index .subhero__grid {
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.68fr);
  gap: clamp(2rem, 4vw, 4rem);
}

.subhero--products-index .subhero__grid {
  align-items: start;
  grid-template-columns: minmax(0, 1.08fr) minmax(340px, 0.7fr);
  gap: clamp(2rem, 4vw, 4.5rem);
}

.subhero--services-index .subhero__copy .h1 {
  max-width: 19ch;
  font-size: clamp(3.25rem, 3.45vw, 3.75rem);
  letter-spacing: 0;
  line-height: 1.04;
}

.subhero--services-index .subhero__copy .lede {
  max-width: 58ch;
  margin-bottom: 1.35rem;
}

.subhero--services-index .subhero__visual {
  min-height: 360px;
}

.subhero--products-index .subhero__visual {
  min-height: 360px;
}

.subhero--services-index .abstract-orbit {
  width: min(360px, 100%);
}

.subhero--products-index .abstract-orbit {
  width: min(360px, 100%);
}

.section {
  padding-block: clamp(4.5rem, 6.5vw, 7rem);
}

.section--tight {
  padding-block: clamp(3.5rem, 5vw, 5rem);
}

.section--products-overview {
  padding-block: clamp(2.75rem, 3.9vw, 3.55rem);
}

.section--products-overview .section-head {
  gap: clamp(1.5rem, 3vw, 2.5rem);
  margin-bottom: clamp(1.35rem, 2.1vw, 1.85rem);
}

.section--products-overview .section-kicker {
  margin-bottom: clamp(0.65rem, 1vw, 0.85rem);
}

.section--products-overview .h2 {
  margin-bottom: 0;
  font-size: clamp(2.25rem, 3vw, 3.25rem);
  line-height: 0.98;
}

.section--products-overview .section-lede {
  max-width: 41ch;
  font-size: clamp(1rem, 1.2vw, 1.1rem);
  line-height: 1.55;
}

.section--products-overview .product-card-grid {
  gap: clamp(0.85rem, 1.25vw, 1.05rem);
  scroll-margin-block-start: 0;
}

@media (min-width: 48rem) {
  .section--products-overview .product-card-grid--unified {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .section--products-overview .product-card-grid--unified .product-card {
    grid-column: auto;
  }
}

@media (min-width: 64rem) {
  .section--products-overview .product-card-grid--unified .product-card__visual {
    height: 13rem;
    aspect-ratio: auto;
  }

  .section--products-overview .product-card-grid--unified .product-card__visual img {
    object-fit: contain;
    transform: none;
  }
}

.section--products-overview .product-card {
  min-height: 0;
  padding: clamp(0.85rem, 1vw, 1rem);
  border-radius: 24px;
}

.section--products-overview .product-card__visual {
  aspect-ratio: 1.78;
  margin-bottom: clamp(0.75rem, 1.1vw, 0.95rem);
  border-radius: 18px;
}

.section--products-overview .product-card__visual img {
  transform: scale(1.08);
}

.section--products-overview .product-card:hover .product-card__visual img {
  transform: scale(1.13);
}

.section--products-overview .product-card__body {
  padding-inline: 0.1rem;
}

.section--products-overview .product-card__body h3 {
  margin: 0.6rem 0 0.45rem;
  font-size: clamp(1.38rem, 2vw, 1.55rem);
  line-height: 1.08;
}

.section--products-overview .product-card__body p {
  margin-bottom: 1rem;
  font-size: 0.88rem;
  line-height: 1.48;
}

.section--products-overview .product-card .link-arrow {
  min-height: 2.75rem;
  color: var(--color-brand-strong);
}

.section--products-overview .product-card .link-arrow:is(:hover, :focus-visible) {
  color: var(--color-brand-strong);
  text-decoration: underline;
  text-underline-offset: 0.2em;
}

.section--products-diagnostic .cta {
  display: grid;
  align-items: center;
  gap: 1.5rem;
  padding: clamp(1.4rem, 4.4vw, 4rem);
  text-align: left;
}

.section--products-diagnostic .cta__content {
  min-width: 0;
  margin: 0;
}

.section--products-diagnostic .h2 {
  max-width: 22ch;
  margin-inline: 0;
  font-size: clamp(1.8rem, 3.2vw, 3rem);
  line-height: 1.12;
  text-wrap: balance;
}

.section--products-diagnostic .cta p {
  max-width: 45ch;
  margin-inline: 0;
}

.section--products-diagnostic .cluster {
  justify-content: flex-start;
}

.products-diagnostic__image {
  position: relative;
  width: 100%;
  max-width: 28rem;
  height: auto;
  margin-inline: auto;
}

@media (min-width: 768px) {
  .section--products-diagnostic .cta {
    grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
    gap: clamp(1.5rem, 4vw, 3.5rem);
  }
}

@media (max-width: 767px) {
  .section--products-diagnostic .eyebrow {
    font-size: 0.75rem;
  }

  .products-diagnostic__image {
    max-width: 18rem;
  }
}

html.animations-ready .reveal,
html.animations-ready .reveal--left,
html.animations-ready .reveal--right,
html.animations-ready .reveal--scale {
  opacity: 1;
  transform: none;
  transition: none;
}

.badge,
.mega-copy,
.hero-core__label,
.hero-card__meta,
.mini-bubble,
.mini-games span,
.proof-label,
.product-visual__tag,
.ecosystem-node__step,
.ecosystem-node__flow span,
.service-card__index,
.sector-card__top span:last-child,
.contact-method span,
.field-error,
.check-field label,
.form-footer p,
.spec span,
.use-case__number,
.value-card__number,
.article-card__meta,
.service-visual__label,
.footer-legal-pro {
  font-size: 0.75rem;
}

.footer-legal-pro {
  margin: 0 0 1rem;
  color: var(--muted-2);
}

.footer-bottom p,
.footer-bottom__links a {
  font-size: 0.75rem;
}

.ambient--hero-pro {
  top: 5%;
  right: -12%;
}

[data-pro-margin="1.2"] {
  margin-top: 1.2rem;
}

[data-pro-margin="1.5"] {
  margin-top: 1.5rem;
}

@media (max-width: 1120px) {
  .nav-links,
  .header-actions .btn {
    display: none;
  }

  .menu-toggle {
    display: grid;
    margin-left: auto;
  }

  .mobile-nav {
    display: block;
  }

  .display,
  .h1 {
    font-size: var(--font-size-h1);
  }

  .hero {
    min-height: auto;
  }

  .hero__inner,
  .subhero__grid {
    grid-template-columns: 1fr;
  }

  .hero__copy,
  .subhero__copy {
    max-width: 52rem;
  }

  .hero__visual,
  .subhero__visual {
    width: min(100%, 45rem);
    margin-inline: auto;
  }

  .hero__visual {
    min-height: 36rem;
  }

  .subhero {
    min-height: auto;
  }

  .subhero--services-index {
    padding-block: 5rem 3rem;
  }

  .subhero--products-index {
    padding-block: 5.25rem 3.25rem;
  }

  .subhero--services-index .subhero__grid {
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .subhero--products-index .subhero__grid {
    align-items: center;
    grid-template-columns: 1fr;
    gap: 2.25rem;
  }

  .subhero__copy .h1 {
    font-size: var(--font-size-h1);
  }

  .subhero--services-index .subhero__copy .h1 {
    max-width: 22ch;
    font-size: clamp(2.75rem, 4.65vw, 3.25rem);
  }

  .subhero__visual {
    min-height: 22rem;
  }

  .subhero--services-index .subhero__visual {
    display: none;
  }

  .subhero--products-index .subhero__visual {
    min-height: 19rem;
  }

  .subhero--products-index .abstract-orbit {
    width: min(330px, 82vw);
  }

  .scroll-cue {
    display: none;
  }
}

@media (max-width: 768px) {
  .page-tabs {
    position: relative;
    top: auto;
  }

  .page-tabs__inner {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.25rem;
    padding-block: 0.5rem;
    overflow: visible;
  }

  .page-tab {
    display: flex;
    min-height: 44px;
    align-items: center;
    padding: 0.65rem 0.7rem;
    border-radius: 0.75rem;
    font-size: 0.75rem;
    line-height: 1.3;
    white-space: normal;
  }
}

@media (max-width: 720px) {
  .display,
  .h1 {
    font-size: var(--font-size-h1);
    letter-spacing: -0.045em;
    line-height: 1.02;
  }

  .h2 {
    font-size: var(--font-size-h2);
    line-height: 1.08;
  }

  .hero {
    padding-top: 6.5rem;
  }

  .hero__copy .display {
    max-width: 13.5ch;
  }

  .hero__lead {
    font-size: 1rem;
    line-height: 1.65;
  }

  .hero__visual {
    min-height: 30rem;
  }

  .subhero {
    padding-top: 6.75rem;
  }

  .subhero--services-index {
    padding-block: 4.25rem 2.5rem;
  }

  .subhero--products-index {
    padding-block: 5.25rem 3rem;
  }

  .subhero__copy .h1 {
    max-width: 13.5ch;
    font-size: var(--font-size-h1);
  }

  .subhero--services-index .subhero__copy .h1 {
    max-width: 18ch;
    font-size: clamp(2.25rem, 9vw, 2.75rem);
    line-height: 1.06;
  }

  .subhero--services-index .subhero__copy .lede {
    margin-bottom: 1.15rem;
  }

  .hero-card__title,
  .hero-card__meta,
  .mini-bubble,
  .hero-core__label,
  .proof-label,
  .product-visual__tag,
  .service-visual__label {
    font-size: 0.75rem;
  }

}

@media (max-width: 500px) {
  .hero__visual {
    min-height: 28rem;
  }
}

@media (max-width: 430px) {
  .site-footer {
    padding-block: 3rem 1.5rem;
  }

  .footer-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 2rem 1rem;
  }

  .footer-brand,
  .footer-column:last-child {
    grid-column: 1 / -1;
  }

  .footer-column:last-child .footer-links {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .footer-bottom {
    margin-top: 2rem;
  }

  .site-header .brand,
  .site-footer a {
    display: inline-flex;
    min-width: 44px;
    min-height: 44px;
    align-items: center;
  }
}

@media (max-width: 720px) {
  .section--products-overview {
    padding-block: 3.6rem;
  }

  .section--products-overview .section-head {
    margin-bottom: 1.45rem;
  }

  .section--products-overview .h2 {
    font-size: clamp(2rem, 9vw, 2.7rem);
  }

  .section--products-overview .product-card {
    min-height: 0;
  }

  .section--products-overview .product-card__visual {
    aspect-ratio: 1.55;
  }


}
