/* Masked Heading — vanilla port inspired by React Bits MaskedHeading (MIT) */
.masked-heading {
  position: relative;
  width: 100%;
  margin: 0;
  padding: 0;
  overflow: visible;
  text-wrap: balance;
  -webkit-font-smoothing: antialiased;
}

.hero-masked-title:not(.masked-heading--static) {
  color: transparent;
}

.masked-heading__defs clipPath text {
  fill: #000;
  stroke: none;
}

.masked-heading--static .masked-heading__measure {
  position: relative;
  visibility: visible;
  color: inherit;
  -webkit-text-fill-color: inherit;
}

.masked-heading--static .masked-heading__reveal {
  display: none;
}

.masked-heading__measure {
  display: block;
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  z-index: 0;
  visibility: hidden;
  color: transparent;
  -webkit-text-fill-color: transparent;
  pointer-events: none;
  user-select: none;
}

.masked-heading__baseline {
  display: inline-block;
  width: 0;
  height: 0;
  overflow: hidden;
  vertical-align: baseline;
}

.masked-heading__word {
  display: inline-block;
  white-space: pre;
}

.masked-heading__word:not(:last-child)::after {
  content: ' ';
}

.masked-heading__defs {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
  pointer-events: none;
}

.masked-heading__reveal {
  position: absolute;
  inset: 0;
  display: block;
  pointer-events: none;
  z-index: 1;
  will-change: opacity, transform;
}

.masked-heading__clip {
  position: absolute;
  inset: 0;
  display: block;
}

.masked-heading__media {
  position: absolute;
  inset: 0;
  display: block;
  will-change: transform, filter;
}

.masked-heading__source {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  -webkit-user-drag: none;
  transform: scale(1.02);
}

.hero-masked-title.masked-heading {
  font-weight: 700;
  letter-spacing: -0.03em;
  line-height: 1.12;
  margin-bottom: 1rem;
}

.hero-masked-title .hh-underline,
.hero-masked-title .hh-word .hh-underline {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  .masked-heading__reveal {
    will-change: auto;
  }
}
