/* ========================================================================
   FIX34 · Escala tipográfica sobria
   Reduce títulos sobredimensionados sin perder jerarquía visual.
   Cargado al final de cada página para normalizar Home, portal, admin y SEO.
   ======================================================================== */

:root {
  --cs-title-h1-max: 3.15rem;
  --cs-title-h2-max: 2.15rem;
  --cs-title-feature-max: 1.9rem;
}

/* Títulos principales de página: más compactos y consistentes. */
main h1 {
  font-size: clamp(2rem, 3.7vw, var(--cs-title-h1-max)) !important;
  line-height: 1.08 !important;
  letter-spacing: -0.022em !important;
  text-wrap: balance;
}

/* Hero público conserva presencia, pero evita tamaños de 4–5rem. */
.home-compact .hero h1,
.service-catalog-hero h1,
.seo-hero h1 {
  font-size: clamp(2.2rem, 4vw, 3.25rem) !important;
  max-width: 920px;
}

/* Títulos internos: jerarquía visible sin ocupar media pantalla. */
main h2:not(.solution-name) {
  font-size: clamp(1.5rem, 2.55vw, var(--cs-title-h2-max)) !important;
  line-height: 1.12 !important;
  letter-spacing: -0.018em !important;
  text-wrap: balance;
}

/* Títulos destacados que antes podían crecer por encima de 3rem. */
.solution-copy h3,
.service-focus-copy h3,
.solution-home-copy h3,
.solution-home-heading h3 {
  font-size: clamp(1.4rem, 2vw, var(--cs-title-feature-max)) !important;
  line-height: 1.14 !important;
}

/* Wordmark de producto: sigue siendo protagonista, pero más sobrio. */
.solution-name,
.sout-showcase-title {
  font-size: clamp(2.5rem, 5vw, 4.1rem) !important;
  line-height: .94 !important;
}

/* Portal autenticado y administración: títulos orientados a operación. */
.dashboard-head h1,
.admin-dashboard-head h1,
.admin-request-head h1,
.admin-request-head-compact h1,
.request-detail-head h1,
.request-create-head h1,
.stage-project-title h1,
.payment-page-head h1,
.payment-review h1,
.auth-copy h1,
.legal-copy h1 {
  font-size: clamp(1.9rem, 3.2vw, 2.7rem) !important;
  line-height: 1.08 !important;
}

/* CTA y paneles importantes: enfatizar sin competir con el H1. */
.cta-inner h2,
.final-cta-card h2,
.portal-trust-section h2,
.solutions-section h2 {
  font-size: clamp(1.55rem, 2.5vw, 2.25rem) !important;
  line-height: 1.12 !important;
}

@media (max-width: 760px) {
  :root {
    --cs-title-h1-max: 2.45rem;
    --cs-title-h2-max: 1.8rem;
    --cs-title-feature-max: 1.65rem;
  }

  main h1,
  .home-compact .hero h1,
  .service-catalog-hero h1,
  .seo-hero h1,
  .dashboard-head h1,
  .admin-dashboard-head h1,
  .admin-request-head h1,
  .admin-request-head-compact h1,
  .request-detail-head h1,
  .request-create-head h1,
  .stage-project-title h1,
  .payment-page-head h1,
  .payment-review h1,
  .auth-copy h1,
  .legal-copy h1 {
    font-size: clamp(1.8rem, 8vw, 2.45rem) !important;
  }

  main h2:not(.solution-name) {
    font-size: clamp(1.32rem, 5.6vw, 1.8rem) !important;
  }

  .solution-name,
  .sout-showcase-title {
    font-size: clamp(2.2rem, 11vw, 3.25rem) !important;
  }
}
