/* ============================================================================
   THE NIMBUS PRO WORDMARK
   Its own file, because the home page needs it and must NOT load account.css:
   that file defines .btn, .btn-ghost, .field and more for the account and legal
   pages, and on the home page it silently overrode the site's button sizes.
   ========================================================================== */

/* ---------------------------------------------------------------------------
   THE WORDMARK
   ----------------------------------------------------------------------------
   A gradient that cycles through the accent. It is the one piece of pure
   decoration in either product, so it has to earn its place and stay inside
   the design contract:

   - It is ONE accent, not a rainbow. Every stop is a step of --brand that
     already exists in tokens.css (300, 400, brand, 600, and the sky tints),
     so it reads as the Nimbus blue moving rather than as a second colour
     arriving. AGENTS.md section 4 rule 1 survives.
   - It animates `background-position`, not the gradient itself. Animating
     colour stops re-rasterises the gradient every frame on the main thread;
     sliding an oversized background is cheap and smooth.
   - 8 seconds, linear, infinite. Slow enough to read as a shimmer rather than
     a flash, and nothing in the page depends on where in the cycle it is.
   - It STOPS DEAD under prefers-reduced-motion, falling back to a static
     gradient. Rule 7: everything collapses. A looping animation behind text is
     exactly what that setting is for.
   - Fallback colour first, so a browser without background-clip: text shows
     solid brand rather than invisible text. That failure mode is total, so it
     is worth the two extra lines.
   ------------------------------------------------------------------------ */
.pro-word {
  /* Paint the text itself if the clip below is not supported. */
  color: var(--brand-text);

  /* Every stop is one that clears 4.5:1 on a cloud surface in BOTH themes.
     The brand scale runs backwards in dark (600 and 700 are the LIGHT steps), so
     the old stops through 300 and sky-mid were pale on white in light mode and
     dark on dark in dark mode, and the word faded to nothing for part of every
     cycle. 600 -> brand -> 700 still shimmers, and never disappears. */
  background-image: linear-gradient(
    100deg,
    var(--brand-600) 0%,
    var(--brand) 24%,
    var(--brand-700) 48%,
    var(--brand) 72%,
    var(--brand-600) 100%
  );
  /* Wider than the text, which is what gives the slide somewhere to go. */
  background-size: 260% 100%;
  background-position: 0% 50%;

  -webkit-background-clip: text;
  background-clip: text;

  font-weight: 650;
  white-space: nowrap;
}

/* Only make the text transparent where the clip actually works, so the
   fallback colour above is never clipped away into nothing. */
@supports ((-webkit-background-clip: text) or (background-clip: text)) {
  .pro-word {
    -webkit-text-fill-color: transparent;
    color: transparent;
  }
}

@media (prefers-reduced-motion: no-preference) {
  .pro-word { animation: pro-cycle 8s linear infinite; }
}

@keyframes pro-cycle {
  from { background-position: 0% 50%; }
  to   { background-position: 260% 50%; }
}
