.home .cinema-copy {
  container-type: inline-size;
}

.hero-headline .hero-question {
  display: block;
  max-width: 14ch;
}

.hero-headline .hero-phone {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  margin-top: .35em;
  padding-block: .12em;
  color: #cdeeff;
  font: italic 800 clamp(1.875rem, 9.7cqi, 3.45rem)/1.12 Inter, Arial, sans-serif;
  letter-spacing: -.052em;
  text-decoration: none;
  white-space: nowrap;
  touch-action: manipulation;
}

.hero-headline .hero-phone:focus-visible {
  outline: 3px solid #f6d59b;
  outline-offset: 4px;
  border-radius: .14em;
}

.hero-phone-digits {
  padding-inline-end: .08em;
  filter: drop-shadow(0 2px 1px #091c29) drop-shadow(0 0 .15em #8cd9fa40);
}

@supports ((background-clip: text) or (-webkit-background-clip: text)) {
  .hero-phone-digits {
    background-image:
      linear-gradient(108deg, transparent 43%, #fff 50%, transparent 57%),
      linear-gradient(90deg, #88dfff, #edfaff 12%, #f7c781 28%, #fff4d8 39%, #88dfff 50%, #edfaff 62%, #f7c781 78%, #fff4d8 89%, #88dfff);
    background-size: 250% 100%, 200% 100%;
    background-repeat: no-repeat, repeat-x;
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: phone-light-sweep 6s linear infinite;
  }
}

@keyframes phone-light-sweep {
  from { background-position: 100% 50%, 100% 50%; }
  to   { background-position: 0% 50%, 0% 50%; }
}

.hero-headline .hero-phone::after {
  content: "";
  position: absolute;
  pointer-events: none;
  width: 1.24em;
  aspect-ratio: 2;
  right: .02em;
  top: -.17em;
  background: var(--assessment-stars, url("/assets/assessment-star-trio.svg")) center / contain no-repeat;
}

.hero-headline .hero-phone:is(:hover, :focus-visible) .hero-phone-digits {
  filter: drop-shadow(0 2px 1px #091c29) drop-shadow(0 0 .17em #b6ebff88);
}

/* Use the open space beside the last line when the two fit comfortably.
   Smaller layouts keep the full number immediately beneath the headline. */
@supports (grid-template-columns: subgrid) {
  @container (min-width: 20.75rem) {
    .hero-headline {
      display: grid;
      grid-template-columns: max-content minmax(0, 1fr);
      column-gap: clamp(.45rem, 2cqi, 1.5rem);
    }
    .cinema-copy .hero-headline h1 {
      grid-area: 1 / 1 / 3 / 3;
      display: grid;
      grid-template: subgrid / subgrid;
      max-width: none;
    }
    .hero-headline .hero-question {
      grid-column: 1 / -1;
      grid-row: 1;
    }
    .cinema-copy .hero-headline h1 em {
      grid-area: 2 / 1;
      align-self: center;
      font-size: min(1.08em, 10.1cqi);
    }
    .hero-headline h1::after { display: none; }
    .hero-headline .hero-phone {
      grid-area: 2 / 2;
      justify-self: start;
      align-self: center;
      margin: 0;
      font-size: clamp(1.4rem, 7.05cqi, 3.25rem);
    }
  }
}

html[data-diamond-motion="paused"] .hero-phone-digits { animation-play-state: paused; }
@media (prefers-reduced-motion: reduce) {
  .hero-phone-digits { animation: none; background-position: 0% 50%; }
}
@media (forced-colors: active) {
  .hero-phone-digits {
    background: none;
    color: LinkText;
    -webkit-text-fill-color: currentColor;
    text-decoration: underline;
    filter: none;
  }
}
