/* Every word shares one grid cell: its longest label reserves the space. */
.hero-title {
  margin: 26px 0 0;
  width: 100%;
  max-width: 820px;
  font-size: clamp(38px, 5.4vw, 66px);
  line-height: 1.06;
  letter-spacing: -.035em;
  font-weight: 800;
}
.hero-title-prefix { display: block; }
.hero-profession { display: block; margin-top: .06em; color: #0066ff; }
.hero-profession-stage {
  display: inline-grid;
  position: relative;
  padding: .16em .12em .3em;
  vertical-align: top;
  perspective: 700px;
  isolation: isolate;
  overflow: hidden;
}
.hero-profession-word {
  grid-area: 1 / 1;
  justify-self: center;
  white-space: nowrap;
  opacity: 0;
  visibility: hidden;
  transform-origin: 50% 65%;
  backface-visibility: hidden;
}
.hero-profession-word.is-active { opacity: 1; visibility: visible; }
.hero-profession-word.is-entering {
  animation: profession-arrive 650ms cubic-bezier(.22, 1, .36, 1) both;
}
.hero-profession-word.is-leaving {
  visibility: visible;
  animation: profession-depart 480ms cubic-bezier(.4, 0, .4, 1) both;
}
.hero-profession-stage::after {
  content: "";
  position: absolute;
  bottom: .12em;
  left: 50%;
  width: var(--profession-width, 4.8em);
  height: .055em;
  min-height: 3px;
  border-radius: 999px;
  background: linear-gradient(90deg, #91c5ff, #0066ff 48%, #71b6ff);
  box-shadow: 0 .06em .2em #0066ff20;
  transform: translateX(-50%);
  transition: width 650ms cubic-bezier(.22, 1, .36, 1);
}
.hero-profession-static { display: none; }
.hero-profession-a11y {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}
.hero-motion-controls { height: 28px; margin-top: 2px; }
.hero-motion-pause {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 28px;
  padding: 4px 10px;
  border: 1px solid #d8e6ff;
  border-radius: 999px;
  background: #ffffffb3;
  color: #48597a;
  font: 500 11px/1.3 'Golos Text', system-ui, sans-serif;
  cursor: pointer;
  transition: color 150ms, border-color 150ms, background 150ms;
}
.hero-motion-pause[hidden] { display: none; }
.hero-motion-pause:hover { color: #0066ff; border-color: #99bfff; background: #fff; }
.hero-motion-pause:focus-visible { outline: 2px solid #0066ff; outline-offset: 3px; }
.hero-motion-icon { width: 10px; height: 10px; fill: currentColor; }
.hero-motion-play { display: none; }
.hero-motion-pause[aria-pressed="true"] .hero-motion-play { display: inline; }
.hero-motion-pause[aria-pressed="true"] .hero-motion-bars { display: none; }
@keyframes profession-arrive {
  from { opacity: 0; filter: blur(5px); transform: translate3d(0, .64em, 0) rotateX(-34deg) scale(.97); }
  to { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) rotateX(0) scale(1); }
}
@keyframes profession-depart {
  from { opacity: 1; filter: blur(0); transform: translate3d(0, 0, 0) rotateX(0); }
  to { opacity: 0; filter: blur(4px); transform: translate3d(0, -.7em, 0) rotateX(32deg); }
}
@media (max-width: 380px) {
  .hero-title { font-size: clamp(30px, 9.6vw, 36px); }
}
@media (prefers-reduced-motion: reduce) {
  .hero-profession-stage { display: none; }
  .hero-profession-static { display: inline-block; padding: .16em .12em .3em; }
  .hero-profession-word { animation: none !important; }
  .hero-motion-pause { display: none; }
}
