/* Responsive typography and line-breaking rules — September 2026 */

/*
  Typography is treated editorially, not left to accidental browser wrapping.
  Display copy uses deliberate phrase/sentence breaks on desktop, while mobile
  can reflow naturally. Short semantic phrases can be kept intact where needed.
*/

.hero-title,
.section-title,
.problem-line,
.sprints-intro,
.sprint-name,
.outcome-list li,
.handoff-cta-title,
.footer-about-title,
.form-title,
.success-title {
  text-wrap: balance;
}

.hero-lead,
.hero-copy,
.hero-helper,
.sprint-description,
.handoff-cta-copy p,
.footer-about-body p,
.form-reassurance,
.success-copy {
  text-wrap: pretty;
}

.hero-title,
.problem-line,
.sprints-intro,
.sprint-description,
.outcome-list li,
.handoff-cta-copy p,
.footer-about-body p,
.form-title,
.success-copy {
  overflow-wrap: normal;
  word-break: normal;
}

/* Desktop editorial breaks: place line endings at complete semantic units. */
.editorial-break {
  display: inline;
}

/* Keep short semantic phrases intact on layouts where there is room. */
@media (min-width: 821px) {
  .keep-together {
    white-space: nowrap;
  }
}

/* Mobile should preserve the same reading order without inheriting desktop-shaped lines. */
@media (max-width: 820px) {
  .editorial-break {
    display: none;
  }

  .hero-title,
  .section-title,
  .sprints-intro,
  .handoff-cta-title,
  .form-title,
  .success-copy,
  .outcome-list li {
    text-wrap: balance;
  }

  .hero-copy,
  .sprint-description,
  .handoff-cta-copy p,
  .footer-about-body p,
  .form-reassurance {
    text-wrap: pretty;
  }
}

/* Hero action composition.
   The proof drum is anchored 40px to the right of the CTA and uses a shorter
   vertical frame so the CTA can sit higher without changing the copy above. */
.hero-actions {
  display: grid;
  grid-template-columns: max-content minmax(220px, 392px);
  grid-template-rows: 76px auto;
  column-gap: 40px;
  align-items: end;
  width: 100%;
  max-width: 100%;
  margin-top: 28px;
}

/* Hero proof drum — one thesis per 2 second slot. */
.hero-marquee {
  position: relative !important;
  left: auto !important;
  right: auto !important;
  top: auto !important;
  width: min(392px, 27vw) !important;
  height: 76px;
  margin: 0 !important;
  overflow: hidden !important;
  color: rgba(0, 0, 0, .48) !important;
  font-size: clamp(11px, .82vw, 13px) !important;
  line-height: 1.25 !important;
  font-weight: 500 !important;
  text-transform: uppercase;
  white-space: normal !important;
  pointer-events: none;
  -webkit-mask-image: none !important;
  mask-image: none !important;
  grid-column: 2;
  grid-row: 1;
  justify-self: start;
  align-self: end;
}

.hero-marquee-track {
  position: relative;
  display: block !important;
  width: 100% !important;
  height: 100%;
  transform: none !important;
  animation: none !important;
  will-change: auto !important;
}

.hero-marquee-group {
  position: absolute;
  inset: 0;
  display: block !important;
  width: 100%;
  height: 100%;
  padding: 0 !important;
}

.hero-marquee-group:last-child {
  display: none !important;
}

.hero-marquee-group:first-child span {
  position: absolute;
  inset: 0;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  width: 100%;
  height: 100%;
  text-align: left;
  opacity: 0;
  transform: translate3d(0, 42%, 0);
  animation: hero-proof-roll 24s linear infinite;
  will-change: transform, opacity;
  backface-visibility: hidden;
}

.hero-marquee-group:first-child span::after {
  content: none !important;
  display: none !important;
}

.hero-marquee-group:first-child span:nth-child(1)  { animation-delay: 0s; }
.hero-marquee-group:first-child span:nth-child(2)  { animation-delay: 2s; }
.hero-marquee-group:first-child span:nth-child(3)  { animation-delay: 4s; }
.hero-marquee-group:first-child span:nth-child(4)  { animation-delay: 6s; }
.hero-marquee-group:first-child span:nth-child(5)  { animation-delay: 8s; }
.hero-marquee-group:first-child span:nth-child(6)  { animation-delay: 10s; }
.hero-marquee-group:first-child span:nth-child(7)  { animation-delay: 12s; }
.hero-marquee-group:first-child span:nth-child(8)  { animation-delay: 14s; }
.hero-marquee-group:first-child span:nth-child(9)  { animation-delay: 16s; }
.hero-marquee-group:first-child span:nth-child(10) { animation-delay: 18s; }
.hero-marquee-group:first-child span:nth-child(11) { animation-delay: 20s; }
.hero-marquee-group:first-child span:nth-child(12) { animation-delay: 22s; }

@keyframes hero-proof-roll {
  0% {
    opacity: 0;
    transform: translate3d(0, 42%, 0);
    animation-timing-function: cubic-bezier(.16, 1, .3, 1);
  }
  1.8% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    animation-timing-function: linear;
  }
  6.45% {
    opacity: 1;
    transform: translate3d(0, 0, 0);
    animation-timing-function: cubic-bezier(.7, 0, .84, 0);
  }
  8.333% {
    opacity: 0;
    transform: translate3d(0, -42%, 0);
  }
  8.334%,
  100% {
    opacity: 0;
    transform: translate3d(0, 42%, 0);
  }
}

.hero-actions .primary-cta {
  grid-column: 1;
  grid-row: 2;
  justify-self: start;
  margin: 0 !important;
}

@media (max-width: 820px) {
  .hero-actions {
    display: block;
    margin-top: var(--screen-gap-lg);
  }

  .hero-marquee {
    width: min(392px, 100%) !important;
    height: 68px;
    margin: 0 !important;
    font-size: 11px !important;
  }

  .hero-marquee-group:first-child span {
    justify-content: flex-start;
    text-align: left;
  }

  .hero-actions .primary-cta {
    margin-top: 12px !important;
  }
}

@media (prefers-reduced-motion: reduce) {
  .hero-marquee-group:first-child span {
    display: none !important;
    animation: none !important;
    opacity: 0;
    transform: none;
  }

  .hero-marquee-group:first-child span:first-child {
    display: flex !important;
    opacity: 1;
  }
}
