/* Keep the React heading as a fallback; the enhanced heading owns its animation. */
#root section:has(> .mmax-hero-headline) > h1:not(.mmax-hero-headline) {
  display: none !important;
}
#root section:has(> .mmax-hero-description) > p:not(.mmax-hero-description) {
  display: none !important;
}
#root .mmax-hero-description {
  position: relative;
  width: 100%;
  max-width: 650px;
  margin: 0 0 48px;
  color: var(--text-muted, #a1a1aa);
  font-family: Inter, sans-serif;
  font-size: 20px;
  line-height: 1.6;
  text-align: center;
}
.mmax-description-word { display: inline-block; opacity: 0; }
.mmax-hero-description.is-ready .mmax-description-word {
  animation: mmax-line-reveal 700ms ease-out both;
  animation-delay: var(--line-delay, 900ms);
}
#root section:has(> .mmax-hero-headline) > div:first-child > span {
  text-shadow: 0 0 8px rgba(180, 215, 255, .55),
               0 0 18px rgba(125, 190, 255, .4),
               0 0 30px rgba(59, 130, 246, .25);
  animation: mmax-word-reveal 800ms cubic-bezier(.22, 1, .36, 1) both;
}

#root .mmax-hero-headline {
  width: 100%;
  max-width: 1120px;
  margin: 0 0 24px;
  color: #fafafa;
  font-family: Outfit, Inter, sans-serif;
  font-size: clamp(32px, 4.5vw, 64px);
  font-weight: 800;
  line-height: 1.02;
  letter-spacing: -.04em;
  text-align: center;
}

.mmax-headline-line { display: block; }
.mmax-headline-ending {
  display: flex;
  margin-top: -.05em;
  flex-wrap: wrap;
  justify-content: center;
  align-items: baseline;
  column-gap: .22em;
}
.mmax-headline-prefix { white-space: nowrap; }
.mmax-headline-word {
  position: relative;
  display: inline-block;
  isolation: isolate;
  animation: mmax-word-reveal 650ms cubic-bezier(.22, 1, .36, 1) both;
  animation-delay: var(--word-delay);
}
.mmax-headline-selected::before {
  content: "";
  position: absolute;
  inset: .1em -.045em .03em;
  z-index: -1;
  background: var(--accent-color, #0055ff);
  transform-origin: left center;
  animation: mmax-text-selection 1700ms ease-in-out 400ms both;
}
.mmax-headline-speed {
  display: inline-block;
  position: relative;
  white-space: pre;
  font-family: "Playfair Display", "Times New Roman", serif;
  font-style: italic;
  font-weight: 700;
  font-size: 1.14em;
  line-height: 1.05;
  letter-spacing: -.035em;
}
.mmax-headline-reserved { display: grid; visibility: hidden; }
.mmax-headline-reserved > span { grid-area: 1 / 1; }
.mmax-headline-typed {
  position: absolute;
  top: 0;
  left: 0;
  background: linear-gradient(110deg, #d9e6ff 0%, #8ab1ff 45%, var(--accent-color, #0055ff) 100%);
  background-size: var(--speed-width, 100%) 100%;
  background-repeat: no-repeat;
  background-clip: text;
  -webkit-background-clip: text;
  color: transparent;
  -webkit-text-fill-color: transparent;
}
.mmax-headline-speed.is-typing .mmax-headline-typed::after {
  content: "";
  display: inline-block;
  width: 2px;
  height: .75em;
  margin-left: .04em;
  background: var(--accent-light, #3b82f6);
  vertical-align: -.035em;
  animation: mmax-caret 700ms steps(1) infinite;
}
@keyframes mmax-word-reveal {
  from { opacity: 0; transform: translateY(-18px); filter: blur(10px); }
  to { opacity: 1; transform: translateY(0); filter: blur(0); }
}
@keyframes mmax-text-selection {
  0% { transform: scaleX(0); opacity: 0; }
  15% { opacity: 1; }
  40%, 72% { transform: scaleX(1); opacity: 1; }
  100% { transform: scaleX(1); opacity: 1; }
}
@keyframes mmax-line-reveal {
  from { opacity: 0; transform: translateY(-8px); }
  to { opacity: 1; transform: translateY(0); }
}
@keyframes mmax-caret { 50% { opacity: 0; } }
@media (max-width: 600px) {
  #root .mmax-hero-headline { font-size: clamp(24px, 7.5vw, 44px); }
  .mmax-headline-line { white-space: nowrap; }
  .mmax-headline-speed { font-size: clamp(23px, 8vw, 1.14em); }
  .mmax-headline-ending {
    flex-direction: column;
    align-items: center;
    row-gap: 0;
    margin-top: -.03em;
  }
  #root .mmax-hero-description { font-size: 16px; }
}
@media (prefers-reduced-motion: reduce) {
  .mmax-headline-word { animation: none; }
  .mmax-headline-selected::before { animation: none; transform: scaleX(1); opacity: 1; }
  #root section:has(> .mmax-hero-headline) > div:first-child > span,
  .mmax-hero-description.is-ready .mmax-description-word { animation: none; opacity: 1; transform: none; }
  .mmax-headline-speed.is-typing .mmax-headline-typed::after { display: none; }
}
