/* CS Integrador · densidad visual v1.1.61
   Objetivo: reducir escala tipográfica y recorrido vertical de las vistas públicas
   sin modificar lógica, contenido, navegación ni componentes funcionales. */

:root {
  --cs-section-y: clamp(46px, 4.8vw, 68px);
  --cs-section-y-compact: clamp(38px, 4vw, 56px);
  --cs-section-head-gap: clamp(18px, 2vw, 28px);
  --cs-component-gap: clamp(16px, 1.7vw, 24px);
}

/* Escala editorial: mantiene protagonismo sin títulos sobredimensionados. */
body main h1 {
  font-size: clamp(2.55rem, 4.25vw, 4.20rem) !important;
  line-height: 1.02 !important;
  letter-spacing: -0.045em !important;
}

body main h2 {
  font-size: clamp(1.75rem, 2.55vw, 2.45rem) !important;
  line-height: 1.09 !important;
  letter-spacing: -0.032em !important;
}

body main h3 {
  font-size: clamp(1.15rem, 1.55vw, 1.45rem) !important;
  line-height: 1.18 !important;
}

/* Menor altura global de las secciones de marketing. */
body main > section {
  padding-top: var(--cs-section-y) !important;
  padding-bottom: var(--cs-section-y) !important;
}

body main > section:first-child {
  padding-top: clamp(54px, 5.5vw, 78px) !important;
  padding-bottom: var(--cs-section-y-compact) !important;
}

/* Evita que márgenes heredados vuelvan a abrir grandes vacíos entre bloques. */
body main > section + section {
  margin-top: 0 !important;
}

body main > section h1,
body main > section h2,
body main > section h3 {
  margin-top: 0;
}

body main > section h1 + p,
body main > section h2 + p,
body main > section h3 + p {
  margin-top: clamp(10px, 1vw, 14px) !important;
}

/* Encabezados internos y grillas: compactación moderada, sin apelmazar. */
body main > section :is(.section-head, .section-header, .section-heading, .section-intro, .section-copy) {
  margin-bottom: var(--cs-section-head-gap) !important;
}

body main > section :is(.grid, [class$="-grid"], [class*=" cards"], [class^="cards"], [class$="-cards"]) {
  row-gap: var(--cs-component-gap) !important;
}

/* Acordeones y detalles consumen menos alto cuando están cerrados. */
body main > section details > summary {
  padding-top: clamp(12px, 1.2vw, 16px) !important;
  padding-bottom: clamp(12px, 1.2vw, 16px) !important;
}

/* Bloques de acciones más próximos al contenido que los precede. */
body main > section :is(.actions, .hero-actions, .cta-actions, .section-actions) {
  margin-top: clamp(18px, 1.8vw, 26px) !important;
  gap: clamp(10px, 1vw, 14px) !important;
}

/* Mantiene anclas legibles con el encabezado fijo. */
body main > section {
  scroll-margin-top: 92px;
}

@media (max-width: 767px) {
  :root {
    --cs-section-y: 42px;
    --cs-section-y-compact: 36px;
    --cs-section-head-gap: 18px;
    --cs-component-gap: 14px;
  }

  body main h1 {
    font-size: clamp(2.15rem, 10vw, 2.85rem) !important;
    line-height: 1.04 !important;
    letter-spacing: -0.038em !important;
  }

  body main h2 {
    font-size: clamp(1.55rem, 7vw, 2rem) !important;
    line-height: 1.10 !important;
  }

  body main h3 {
    font-size: clamp(1.08rem, 4.7vw, 1.30rem) !important;
  }

  body main > section:first-child {
    padding-top: 46px !important;
    padding-bottom: 38px !important;
  }

  body main > section details > summary {
    padding-top: 12px !important;
    padding-bottom: 12px !important;
  }
}

@media (min-width: 768px) and (max-width: 1100px) {
  body main h1 {
    font-size: clamp(2.7rem, 6vw, 3.65rem) !important;
  }

  body main h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.25rem) !important;
  }
}
