/* Shared hero title hierarchy. Keep page-specific composition, unify visual weight. */
:root {
  --nexpro-hero-title-size: clamp(3.75rem, 5.2vw, 5.4rem);
  --nexpro-hero-title-mobile-size: clamp(2.55rem, 11vw, 3rem);
}

body[data-page="home"] .hero-editorial-b .hero-copy h1.hero-message-title {
  max-width: 15ch !important;
  font-size: clamp(3.05rem, 3.95vw, 4.45rem) !important;
  line-height: 1.16 !important;
}

:is(
  body[data-page="about"],
  body[data-page="contact"],
  body[data-page="businesses"],
  body[data-page="privacy-policy"]
) .page-hero h1,
body[data-page="company"] .company-reference-hero h1,
body[data-page="works"] .works-archive-hero h1,
body[data-page="news"] .works-archive-hero h1 {
  font-size: var(--nexpro-hero-title-size) !important;
  line-height: 0.98 !important;
  letter-spacing: -0.035em !important;
}

body[data-page="services"] .service-v2-hero-title,
body[data-page="services"][data-service] .service-detail-v2 .service-v2-hero-title {
  font-size: clamp(3.25rem, 4.2vw, 3.75rem) !important;
  line-height: 1.08 !important;
}

body[data-page="works"] .work-detail-reference-header .work-detail-title,
body[data-page="news"] .news-detail-header h1 {
  max-width: 20ch !important;
  font-size: clamp(2.6rem, 4.2vw, 4rem) !important;
  line-height: 1.12 !important;
  letter-spacing: 0 !important;
  text-wrap: balance;
  word-break: auto-phrase;
}

body[data-page="recruit"]:not([data-job]) .rn-kv-title {
  font-size: clamp(4.75rem, 7vw, 6.8rem) !important;
  line-height: 0.84 !important;
}

@media (max-width: 999px) {
  body[data-page="recruit"]:not([data-job]) .rn-kv-title {
    font-size: clamp(3.8rem, 9vw, 5.4rem) !important;
  }
}

@media (max-width: 760px) {
  body[data-page="home"] .hero-editorial-b .hero-copy h1.hero-message-title {
    max-width: 14ch !important;
    font-size: clamp(1.9rem, 8.2vw, 2.2rem) !important;
    line-height: 1.22 !important;
  }

  :is(
    body[data-page="about"],
    body[data-page="contact"],
    body[data-page="businesses"],
    body[data-page="privacy-policy"]
  ) .page-hero h1,
  body[data-page="company"] .company-reference-hero h1,
  body[data-page="works"] .works-archive-hero h1,
  body[data-page="news"] .works-archive-hero h1 {
    font-size: var(--nexpro-hero-title-mobile-size) !important;
    line-height: 1 !important;
    letter-spacing: -0.025em !important;
  }

  body[data-page="services"] .service-v2-hero-title,
  body[data-page="services"][data-service] .service-detail-v2 .service-v2-hero-title {
    font-size: clamp(2.25rem, 10vw, 2.65rem) !important;
    line-height: 1.12 !important;
  }

  body[data-page="works"] .work-detail-reference-header .work-detail-title,
  body[data-page="news"] .news-detail-header h1 {
    max-width: 100% !important;
    font-size: clamp(2rem, 9vw, 2.5rem) !important;
    line-height: 1.2 !important;
  }

  body[data-page="recruit"]:not([data-job]) .rn-kv-title {
    font-size: clamp(2.35rem, 10vw, 2.9rem) !important;
    line-height: 0.88 !important;
  }
}

@media (max-width: 360px) {
  body[data-page="services"] .service-v2-hero-title,
  body[data-page="services"][data-service] .service-detail-v2 .service-v2-hero-title {
    font-size: 2.1rem !important;
  }
}
