/* ==========================================================================
   Zahav — premium golden light sweep (metallic reflection on gold text)
   Self-contained layer. Nothing here changes layout, typography, font sizes
   or the existing gold gradients.

   - .z-gold-sweep keeps display:inline so line boxes, wrapping and spacing
     stay identical to the original heading.
   - The original element keeps its own colours; ::after is a copy of the
     same text (attr(data-sweep-text)) carrying the moving highlight.
   - Glyph clipping (-webkit-background-clip:text + background-clip:text)
     is applied to BOTH layers, so the band only ever paints on letterforms.
   - ::after spans the whole element box (inset:0, block-size:auto), so the
     sweep travels across every line of a wrapped heading.
   ========================================================================== */

@media (prefers-reduced-motion: no-preference) {

  .z-gold-sweep {
    position: relative;
    display: inline;
    -webkit-background-clip: text;
    background-clip: text;
  }

  /* the travelling band: champagne -> warm metallic gold -> champagne */
  .z-gold-sweep::after {
    content: attr(data-sweep-text);
    position: absolute;
    inset: 0;
    pointer-events: none;
    white-space: inherit;
    font: inherit;
    line-height: inherit;
    letter-spacing: inherit;
    word-spacing: inherit;
    text-align: inherit;
    background-image: linear-gradient(
      100deg,
      rgba(246, 227, 168, 0) 0%,
      rgba(246, 227, 168, 0) 34%,
      rgba(250, 236, 190, 0.55) 43%,
      rgba(212, 169, 79, 0.92) 48%,
      rgba(255, 246, 214, 0.98) 51%,
      rgba(168, 122, 42, 0.90) 54%,
      rgba(240, 214, 150, 0.45) 60%,
      rgba(240, 214, 150, 0) 70%,
      rgba(240, 214, 150, 0) 100%
    );
    background-size: 260% 100%;
    background-repeat: no-repeat;
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    opacity: 0;
    animation: zGoldSweep 6s cubic-bezier(0.45, 0, 0.55, 1) 1s infinite;
  }

  /* Logo / wordmark: inline-block so the sweep box hugs the text */
  .z-gold-sweep--block {
    display: inline-block;
  }

  /* Headings (h1-h3): inline so the highlight follows the text, not the column */
  .z-gold-sweep--inline {
    display: inline;
  }
}

@keyframes zGoldSweep {
  0%   { background-position: 175% 50%; opacity: 0; }
  6%   { opacity: 0.9; }                 /* gentle fade in, no flash */
  46%  { opacity: 0.9; }
  54%  { background-position: -60% 50%; opacity: 0.75; }
  62%  { opacity: 0; }                   /* fade out before the loop */
  100% { background-position: -60% 50%; opacity: 0; }
} 
@media (prefers-reduced-motion: no-preference) {
  #hero-title .z-gold-sweep--inline {
    display: inline-block;
  }
}
