/* Sitewide hero/title alignment. This file is loaded on every public page. */
h1.hero-title,
h1.page-title,
h1.vr-title,
.blog-hero h1 {
  font-family: var(--font-display, "Syne", sans-serif) !important;
  font-weight: 800 !important;
  font-size: clamp(4.1rem, 8.8vw, 9.2rem) !important;
  line-height: 0.9 !important;
  letter-spacing: 0 !important;
  width: 100%;
  max-width: 1120px;
  padding-bottom: 0.14em !important;
  margin-bottom: clamp(1.2rem, 2vw, 2rem) !important;
  margin-left: auto !important;
  margin-right: auto !important;
  overflow: visible !important;
  text-wrap: balance;
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  text-wrap: balance;
}

h1,
h2,
h3,
h4,
h5,
h6,
.hero-title,
.page-title,
.vr-title,
.section-title,
.cta-title,
.blog-featured-title,
.blog-card-title,
.service-card h3,
.p-overlay h3,
.p-overlay h4,
.faq-question {
  overflow-wrap: normal !important;
  word-break: normal !important;
  hyphens: none !important;
  -webkit-hyphens: none !important;
  text-wrap: balance;
}

nav#mainNav {
  transform: translateY(0);
  transition: transform 0.28s ease, background 0.4s, padding 0.4s, border-bottom 0.4s;
  will-change: transform;
}

nav#mainNav.nav-hidden {
  transform: translateY(-110%);
}

nav#mainNav:focus-within {
  transform: translateY(0);
}

h2.section-title,
.cta-title {
  font-family: var(--font-display, "Syne", sans-serif) !important;
  font-weight: 800 !important;
  letter-spacing: 0 !important;
  line-height: 1.02 !important;
  max-width: 980px;
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
}

.cta-title {
  font-size: clamp(2.6rem, 5.6vw, 5.2rem) !important;
  max-width: 860px;
}

h1.vr-title {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center;
}

.hero-content,
.page-hero,
.blog-hero {
  text-align: center !important;
}

.hero {
  justify-content: center !important;
}

.hero-content {
  width: min(1120px, calc(100% - 3rem)) !important;
  max-width: 1120px !important;
  margin-left: auto !important;
  margin-right: auto !important;
  display: flex !important;
  flex-direction: column;
  align-items: center;
}

.page-hero,
.blog-hero {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

.page-hero::before,
.blog-hero::before {
  left: 50% !important;
  right: auto !important;
  transform: translateX(-50%);
  text-align: center;
  width: max-content;
  max-width: 100vw;
}

.hero-content,
.page-hero > :not(.glow-orb),
.blog-hero > * {
  position: relative;
  z-index: 2;
}

.hero-sub,
.vr-sub,
.blog-hero-sub {
  margin-left: auto !important;
  margin-right: auto !important;
}

.hero-actions,
.vr-actions {
  justify-content: center !important;
}

.hero-tag,
.page-tag,
.vr-tag,
.blog-hero-tag {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  width: fit-content;
  max-width: min(100%, 34rem);
  font-family: var(--font-mono, "DM Mono", monospace) !important;
  font-size: 0.74rem !important;
  letter-spacing: 0.15em !important;
  text-transform: uppercase;
  color: var(--accent, #c8ff00) !important;
  color: color-mix(in srgb, var(--accent, #c8ff00) 88%, #fff 12%) !important;
  border: 1px solid rgba(200, 255, 0, 0.34);
  background:
    linear-gradient(135deg, rgba(200, 255, 0, 0.12), rgba(255, 255, 255, 0.035)),
    rgba(10, 10, 14, 0.42);
  backdrop-filter: blur(5px);
  -webkit-backdrop-filter: blur(5px);
  padding: 0.5rem 1.2rem !important;
  border-radius: 30px;
  margin: 0 auto 2.2rem !important;
  line-height: 1.2;
  box-shadow: 0 0 0 1px rgba(255, 255, 255, 0.035), 0 16px 45px rgba(0, 0, 0, 0.22);
}

h1.hero-title,
h1.page-title,
h1.vr-title,
.blog-hero h1 {
  text-align: center !important;
  line-height: 0.9 !important;
  isolation: isolate;
}

h1.hero-title span,
h1.page-title span,
h1.vr-title span,
.blog-hero h1 span {
  display: block;
  width: 100%;
  text-align: center;
  background: linear-gradient(180deg, #ffffff 0%, #d7d7e3 48%, rgba(232, 232, 240, 0.72) 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  -webkit-text-stroke: 0 !important;
  text-shadow: 0 18px 70px rgba(255, 255, 255, 0.08);
}

h1.hero-title em,
h1.page-title em,
h1.vr-title em,
.blog-hero h1 em {
  display: block;
  width: 100%;
  text-align: center;
  font-style: normal !important;
  background: linear-gradient(180deg, #f0ff9a 0%, var(--accent, #c8ff00) 50%, #88b700 100%);
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent !important;
  text-shadow: 0 0 28px rgba(200, 255, 0, 0.34), 0 24px 80px rgba(200, 255, 0, 0.12);
  -webkit-text-stroke: 0 !important;
}

h1.hero-title::after,
h1.page-title::after,
h1.vr-title::after,
.blog-hero h1::after {
  content: "";
  display: block;
  width: clamp(5rem, 12vw, 9rem);
  height: 2px;
  margin: clamp(1.2rem, 2vw, 1.8rem) auto 0;
  border-radius: 999px;
  background: linear-gradient(90deg, transparent, var(--accent, #c8ff00), transparent);
  box-shadow: 0 0 24px rgba(200, 255, 0, 0.35);
}

h1.hero-title em::after,
h1.page-title em::after {
  content: none !important;
  display: none !important;
}

.cta-title,
.cta-title em {
  text-align: center !important;
}

.cta-title em {
  display: inline-block;
}

.cta-text,
.cta-buttons-center {
  margin-left: auto !important;
  margin-right: auto !important;
  text-align: center !important;
  justify-content: center !important;
}

.blog-hero h1 {
  position: relative;
  z-index: 2;
}

@media (min-width: 901px) {
  .page-hero {
    min-height: 66vh;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  .blog-hero {
    min-height: 58vh;
    padding-left: 2rem !important;
    padding-right: 2rem !important;
  }

  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    transform: translateX(0) !important;
  }
}

@media (max-width: 900px) {
  *,
  *::before,
  *::after {
    min-width: 0;
  }

  nav#mainNav {
    transform: translateY(0);
    transition: transform 0.28s ease, background 0.4s, padding 0.4s, border-bottom 0.4s;
    will-change: transform;
    z-index: 1002 !important;
  }

  nav#mainNav.nav-hidden {
    transform: translateY(-110%);
  }

  body.mobile-menu-open nav#mainNav,
  nav#mainNav:focus-within {
    transform: translateY(0);
  }

  body.mobile-menu-open {
    overflow: hidden;
  }

  body.mobile-menu-open nav#mainNav {
    z-index: 1002 !important;
  }

  .nav-hamburger {
    display: flex !important;
    width: 44px;
    height: 44px;
    align-items: center;
    justify-content: center;
    flex-direction: column;
    gap: 5px;
    position: absolute;
    top: 50%;
    right: 1rem;
    transform: translateY(-50%);
    z-index: 1004 !important;
    flex: 0 0 44px;
  }

  nav#mainNav .nav-links {
    display: none !important;
  }

  .nav-hamburger span {
    display: block !important;
    width: 24px !important;
    height: 2px !important;
    background: var(--text, #e8e8f0) !important;
    border-radius: 2px;
  }

  nav#mainNav::after {
    content: none !important;
    display: none !important;
  }

  body.mobile-menu-open nav#mainNav::after {
    opacity: 0;
  }

  .mobile-menu {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 1001 !important;
    min-height: 100dvh;
    padding: 6.5rem 1.4rem 2rem !important;
    align-items: center !important;
    justify-content: center !important;
    flex-direction: column !important;
    gap: clamp(1rem, 3vh, 1.6rem) !important;
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
  }

  .mobile-menu.open {
    display: flex !important;
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: auto !important;
    z-index: 1001 !important;
  }

  .mobile-menu a {
    display: block;
    max-width: min(24rem, calc(100vw - 2.8rem));
    text-align: center;
    line-height: 1.08 !important;
    overflow-wrap: normal !important;
    word-break: normal !important;
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }

  .mobile-menu.open + nav#mainNav,
  body.mobile-menu-open nav#mainNav {
    z-index: 1002 !important;
  }

  nav#mainNav .mobile-menu.open {
    z-index: 1001 !important;
  }

  body.mobile-menu-open nav#mainNav .nav-hamburger {
    position: absolute;
    z-index: 1004 !important;
  }

  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    font-size: clamp(2.85rem, 11vw, 5.5rem) !important;
    line-height: 0.96 !important;
    letter-spacing: 0 !important;
    max-width: 100%;
  }

  h1,
  h2,
  h3,
  .hero-title,
  .page-title,
  .section-title,
  .cta-title,
  .parallax-quote,
  .stat-num,
  .service-card h3,
  .p-overlay h3,
  .p-overlay h4,
  .faq-question {
    line-height: 1.08 !important;
    padding-bottom: 0.12em;
    overflow: visible;
    overflow-wrap: normal;
    word-break: normal;
    hyphens: none !important;
    -webkit-hyphens: none !important;
  }

  p,
  a,
  span,
  li,
  button,
  input,
  textarea,
  .hero-sub,
  .cta-text,
  .footer-desc,
  .footer-copy,
  .faq-answer-inner,
  .faq-a-inner {
    overflow-wrap: anywhere;
    word-break: normal;
  }

  .btn-primary,
  .btn-ghost,
  .filter-btn,
  .nav-cta {
    max-width: 100%;
    min-height: 44px;
    white-space: normal;
    text-align: center;
    justify-content: center;
  }

  .service-full {
    grid-template-columns: 1fr !important;
  }

  .service-full .s-content,
  .service-full:nth-child(odd) .s-content,
  .service-full:nth-child(even) .s-content {
    order: 1 !important;
    border-left: 0 !important;
    border-right: 0 !important;
  }

  .service-full .s-visual,
  .service-full:nth-child(odd) .s-visual,
  .service-full:nth-child(even) .s-visual {
    order: 2 !important;
  }

  .footer-bottom {
    overflow: visible !important;
  }

  .footer-social {
    display: flex !important;
    justify-content: center;
    align-items: center;
    overflow: visible !important;
    position: relative;
    z-index: 2;
  }

  .footer-social a {
    flex: 0 0 auto;
    width: 42px !important;
    height: 42px !important;
    min-width: 42px;
    min-height: 42px;
    overflow: visible !important;
    color: var(--text, #e8e8f0) !important;
  }

  .footer-social a i,
  .fa-brands,
  .fa-solid {
    display: inline-block !important;
    line-height: 1 !important;
    opacity: 1 !important;
    visibility: visible !important;
  }

  .fa-brands,
  .fab {
    font-family: "Font Awesome 6 Brands" !important;
    font-weight: 400 !important;
  }

  .fa-solid,
  .fas {
    font-family: "Font Awesome 6 Free" !important;
    font-weight: 900 !important;
  }

  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    font-size: clamp(2.85rem, 11vw, 5.5rem) !important;
    line-height: 0.96 !important;
    letter-spacing: 0 !important;
    max-width: 100%;
  }
}

@media (max-width: 600px) {
  h1,
  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    font-size: clamp(2.45rem, 12.5vw, 4rem) !important;
    letter-spacing: 0 !important;
    line-height: 1 !important;
    text-wrap: balance;
  }

  h2,
  h2.section-title,
  .cta-title,
  .parallax-quote {
    font-size: clamp(1.75rem, 7.8vw, 2.65rem) !important;
    letter-spacing: 0 !important;
    line-height: 1.08 !important;
  }

  .section-label,
  .hero-tag,
  .page-tag,
  .vr-tag,
  .blog-hero-tag,
  .filter-btn,
  .btn-primary,
  .btn-ghost,
  .footer-legal a {
    letter-spacing: 0.06em !important;
  }

  .hero-actions,
  .cta-buttons-center {
    width: 100%;
  }

  .hero-actions .btn-primary,
  .hero-actions .btn-ghost,
  .cta-buttons-center .btn-primary,
  .cta-buttons-center .btn-ghost {
    width: 100%;
  }

  .p-overlay {
    opacity: 1 !important;
    padding: 1.1rem !important;
  }

  .p-content-inner,
  .p-overlay h3,
  .p-overlay h4,
  .p-overlay span {
    opacity: 1 !important;
    transform: none !important;
  }

  .p-arrow {
    transform: scale(1) !important;
  }

  .lb {
    padding: 5rem 0.8rem 5.8rem;
  }

  .lb img {
    max-width: calc(100vw - 1.6rem) !important;
    max-height: calc(100vh - 12rem) !important;
  }

  .lb-close,
  .lb-prev,
  .lb-next {
    z-index: 4;
    width: 46px !important;
    height: 46px !important;
    min-width: 46px;
    min-height: 46px;
    background: rgba(15, 15, 21, 0.96) !important;
    color: var(--text, #e8e8f0) !important;
    border-color: rgba(255, 255, 255, 0.2) !important;
  }

  .lb-close i,
  .lb-prev i,
  .lb-next i {
    display: inline-block !important;
    color: inherit !important;
    font-size: 1.05rem !important;
    line-height: 1 !important;
  }

  .lb-close {
    top: 1rem !important;
    right: 1rem !important;
  }

  .lb-prev,
  .lb-next {
    top: auto !important;
    bottom: 1.1rem !important;
    transform: none !important;
  }

  .lb-prev {
    left: 1rem !important;
  }

  .lb-next {
    right: 1rem !important;
  }

  .lb-counter {
    bottom: 2rem !important;
    left: 50% !important;
    width: max-content;
    max-width: calc(100vw - 8rem);
    text-align: center;
  }

  .lb-prev:hover,
  .lb-next:hover,
  .lb-close:hover {
    transform: none !important;
  }
}

@media (max-width: 480px) {
  .hero-tag,
  .page-tag,
  .vr-tag,
  .blog-hero-tag {
    display: inline-flex !important;
    font-size: 0.62rem !important;
    padding: 0.42rem 0.9rem !important;
    margin-bottom: 1.6rem !important;
  }

  h1.hero-title span,
  h1.page-title span,
  h1.vr-title span,
  .blog-hero h1 span {
    -webkit-text-stroke-width: 1px;
  }
}

/* Final H1 polish: consistent hero rhythm on every public page. */
.hero-content,
.vr-hero-content {
  gap: 0;
}

.hero,
.page-hero,
.blog-hero,
.vr-hero {
  overflow: clip;
}

.hero-tag,
.page-tag,
.vr-tag,
.blog-hero-tag {
  margin-bottom: clamp(1.25rem, 2.2vw, 2rem) !important;
}

h1.hero-title,
h1.page-title,
h1.vr-title,
.blog-hero h1 {
  display: flex !important;
  flex-direction: column;
  align-items: center;
  gap: clamp(0.02em, 0.35vw, 0.09em);
  width: min(100%, 11ch);
  max-width: 11ch;
  margin: 0 auto clamp(1.05rem, 1.8vw, 1.75rem) !important;
  padding: 0 0 0.08em !important;
  font-size: clamp(4.25rem, 8.4vw, 8.7rem) !important;
  line-height: 0.86 !important;
  letter-spacing: 0 !important;
  text-align: center !important;
  text-wrap: balance;
  overflow: visible !important;
}

h1.hero-title br,
h1.page-title br,
h1.vr-title br,
.blog-hero h1 br {
  display: none !important;
}

h1.hero-title span,
h1.hero-title em,
h1.page-title span,
h1.page-title em,
h1.vr-title span,
h1.vr-title em,
.blog-hero h1 span,
.blog-hero h1 em {
  display: block;
  width: auto;
  max-width: 100%;
  padding: 0 0.03em 0.08em;
  line-height: 0.88 !important;
  white-space: nowrap;
}

h1.hero-title::after,
h1.page-title::after,
h1.vr-title::after,
.blog-hero h1::after {
  width: clamp(4.75rem, 10vw, 8.5rem);
  margin: clamp(0.95rem, 1.6vw, 1.45rem) auto 0;
}

.hero-sub,
.vr-sub,
.blog-hero-sub {
  max-width: min(680px, 100%);
  margin-top: 0 !important;
  line-height: 1.65 !important;
}

.hero-actions,
.vr-actions {
  margin-top: clamp(0.2rem, 0.8vw, 0.75rem);
}

@media (min-width: 1200px) {
  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    max-width: 10.5ch;
    font-size: clamp(5.4rem, 7.7vw, 8.9rem) !important;
  }
}

@media (max-width: 900px) {
  .hero-content {
    width: min(100%, calc(100% - 2rem)) !important;
    padding-top: clamp(6.8rem, 16vh, 8.5rem) !important;
    padding-bottom: clamp(3rem, 8vh, 4.8rem) !important;
  }

  .page-hero,
  .blog-hero {
    min-height: auto;
    padding-top: clamp(7.6rem, 17vh, 9.5rem) !important;
    padding-bottom: clamp(3.4rem, 8vh, 5rem) !important;
  }

  .vr-hero-content {
    width: min(100%, calc(100% - 2rem)) !important;
    padding-left: 0 !important;
    padding-right: 0 !important;
  }

  .hero-tag,
  .page-tag,
  .vr-tag,
  .blog-hero-tag {
    max-width: min(100%, 28rem);
    margin-bottom: clamp(1rem, 4vw, 1.55rem) !important;
  }

  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    width: min(100%, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    margin-bottom: clamp(0.95rem, 4vw, 1.45rem) !important;
    font-size: clamp(3rem, 10.8vw, 5rem) !important;
    line-height: 0.9 !important;
    gap: 0.06em;
  }

  h1.hero-title span,
  h1.hero-title em,
  h1.page-title span,
  h1.page-title em,
  h1.vr-title span,
  h1.vr-title em,
  .blog-hero h1 span,
  .blog-hero h1 em {
    line-height: 0.94 !important;
    padding-bottom: 0.06em;
  }

  h1.hero-title::after,
  h1.page-title::after,
  h1.vr-title::after,
  .blog-hero h1::after {
    margin-top: clamp(0.75rem, 3vw, 1.1rem);
  }

  .hero-sub,
  .vr-sub,
  .blog-hero-sub {
    max-width: min(35rem, 100%);
    font-size: clamp(1rem, 3.6vw, 1.14rem) !important;
    line-height: 1.55 !important;
  }
}

@media (max-width: 600px) {
  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    width: min(100%, calc(100vw - 2rem));
    max-width: calc(100vw - 2rem);
    font-size: clamp(2.58rem, 11.3vw, 3.9rem) !important;
    line-height: 0.93 !important;
    gap: 0.04em;
  }

  h1.hero-title span,
  h1.hero-title em,
  h1.page-title span,
  h1.page-title em,
  h1.vr-title span,
  h1.vr-title em,
  .blog-hero h1 span,
  .blog-hero h1 em {
    line-height: 0.97 !important;
    padding-bottom: 0.04em;
  }
}

@media (max-width: 420px) {
  h1.hero-title,
  h1.page-title,
  h1.vr-title,
  .blog-hero h1 {
    width: min(100%, calc(100vw - 1.8rem));
    max-width: calc(100vw - 1.8rem);
    font-size: clamp(2.45rem, 10.8vw, 3.05rem) !important;
  }

  .hero-tag,
  .page-tag,
  .vr-tag,
  .blog-hero-tag {
    max-width: min(100%, 20rem);
  }
}

/* Page-specific finishing: VR headline clipping and centered index section headers. */
.vr-hero {
  overflow: hidden !important;
}

.vr-hero-content {
  width: min(100%, 1400px) !important;
  max-width: 1400px !important;
  overflow: visible !important;
}

h1.vr-title {
  width: min(100%, calc(100vw - 5rem)) !important;
  max-width: min(13.5ch, calc(100vw - 5rem)) !important;
  padding-left: 0.18em !important;
  padding-right: 0.18em !important;
  padding-bottom: 0.16em !important;
  font-size: clamp(4.8rem, 7.2vw, 8.2rem) !important;
}

h1.vr-title span,
h1.vr-title em {
  max-width: none !important;
  padding-left: 0.08em !important;
  padding-right: 0.08em !important;
  overflow: visible !important;
}

body:has(.hero) section[aria-labelledby="services-heading"],
body:has(.hero) section[aria-labelledby="portfolio-heading"] {
  max-width: 2048px;
  margin-left: auto;
  margin-right: auto;
}

body:has(.hero) section[aria-labelledby="services-heading"] .section-header-flex,
body:has(.hero) section[aria-labelledby="portfolio-heading"] .section-header-flex {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  align-items: end;
  gap: 2rem;
}

body:has(.hero) section[aria-labelledby="services-heading"] .section-title,
body:has(.hero) section[aria-labelledby="portfolio-heading"] .section-title {
  grid-column: 2;
  justify-self: center;
  text-align: center !important;
  margin-left: auto !important;
  margin-right: auto !important;
}

body:has(.hero) section[aria-labelledby="services-heading"] .section-header-flex .btn-ghost,
body:has(.hero) section[aria-labelledby="portfolio-heading"] .section-header-flex .btn-ghost {
  grid-column: 3;
  justify-self: end;
}

body:has(.hero) .services-grid,
body:has(.hero) .portfolio-grid {
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

@media (max-width: 900px) {
  h1.vr-title {
    width: min(100%, calc(100vw - 1.5rem)) !important;
    max-width: calc(100vw - 1.5rem) !important;
    padding-left: 0.12em !important;
    padding-right: 0.12em !important;
    padding-bottom: 0.18em !important;
    font-size: clamp(2.75rem, 10.4vw, 4.8rem) !important;
  }

  body:has(.hero) section[aria-labelledby="services-heading"] .section-header-flex,
  body:has(.hero) section[aria-labelledby="portfolio-heading"] .section-header-flex {
    display: flex;
    flex-direction: column;
    align-items: center !important;
    text-align: center;
  }

  body:has(.hero) section[aria-labelledby="services-heading"] .section-header-flex .btn-ghost,
  body:has(.hero) section[aria-labelledby="portfolio-heading"] .section-header-flex .btn-ghost {
    align-self: center;
  }
}

@media (max-width: 600px) {
  h1.vr-title {
    width: min(100%, calc(100vw - 1rem)) !important;
    max-width: calc(100vw - 1rem) !important;
    font-size: clamp(2.35rem, 9.9vw, 3.55rem) !important;
    gap: 0.08em;
  }

  h1.vr-title span,
  h1.vr-title em {
    padding-bottom: 0.08em !important;
  }
}

/* Counter polish and mobile page-title clipping guard. */
.stat-card {
  overflow: visible !important;
}

.stat-num {
  display: block;
  line-height: 1.18 !important;
  padding: 0.16em 0 0.12em !important;
  overflow: visible !important;
}

@media (max-width: 700px) {
  .stats-grid {
    overflow: hidden !important;
  }

  .stat-card {
    min-width: 0;
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  .stat-num {
    max-width: 100%;
    font-size: clamp(2.35rem, 9.2vw, 3.15rem) !important;
    line-height: 1.22 !important;
    padding-top: 0.18em !important;
    padding-bottom: 0.16em !important;
    white-space: nowrap;
  }
}

@media (max-width: 600px) {
  .stats-grid {
    overflow: hidden !important;
  }

  .stat-card {
    padding-top: 2.05rem !important;
    padding-bottom: 2.05rem !important;
  }

  .stat-num {
    font-size: clamp(2.3rem, 10.2vw, 2.9rem) !important;
    line-height: 1.2 !important;
    padding-top: 0.18em !important;
    padding-bottom: 0.14em !important;
    margin-bottom: 0.45rem !important;
  }

  .page-hero {
    overflow: visible !important;
  }

  h1.page-title {
    width: min(100%, calc(100vw - 0.75rem)) !important;
    max-width: calc(100vw - 0.75rem) !important;
    padding-left: 0.14em !important;
    padding-right: 0.14em !important;
    padding-bottom: 0.18em !important;
    font-size: clamp(2.38rem, 10.4vw, 3.45rem) !important;
  }

  h1.page-title span,
  h1.page-title em {
    max-width: none !important;
    padding-left: 0.1em !important;
    padding-right: 0.1em !important;
    padding-bottom: 0.08em !important;
    overflow: visible !important;
  }
}

@media (max-width: 420px) {
  h1.page-title {
    width: min(100%, calc(100vw - 1.5rem)) !important;
    max-width: calc(100vw - 1.5rem) !important;
    font-size: clamp(2.2rem, 9.7vw, 3.15rem) !important;
  }
}

/* Large desktop index hero guard: keep glyph edges away from the H1 box. */
@media (min-width: 1200px) {
  h1.hero-title {
    width: min(100%, calc(100vw - 6rem)) !important;
    max-width: min(13.5ch, calc(100vw - 6rem)) !important;
    padding-left: 0.2em !important;
    padding-right: 0.2em !important;
    padding-bottom: 0.16em !important;
    font-size: clamp(5.4rem, 6.6vw, 8.25rem) !important;
  }

  h1.hero-title span,
  h1.hero-title em {
    max-width: none !important;
    padding-left: 0.1em !important;
    padding-right: 0.1em !important;
    overflow: visible !important;
  }
}
