/* ════════════════════════════════════════════════════════════════
   Animations — additional keyframes & helpers
   (preloader keyframes live in preloader.css; section-specific
    animations live with their sections.)
   ════════════════════════════════════════════════════════════════ */

/* Hero title — visible immediately as cream text. After the
   preloader hands off (body.loaded), a single soft gold band
   sweeps RTL across the title via a mix-blend pseudo-element.
   The actual letters never go transparent — selection, copy/paste,
   screenshots, and any failed-JS scenario all degrade gracefully. */
.calligraphy-reveal {
  display: inline-block;
  position: relative;
  color: var(--color-cream);
  -webkit-text-fill-color: var(--color-cream);
  /* Local stacking context so the shimmer pseudo is clipped to the
     title's bounding box, not the surrounding hero-text column. */
  isolation: isolate;
}

/* Shimmer overlay. Hidden by default; the parent body.loaded class
   added by preloader.js triggers a single sweep. */
.calligraphy-reveal::after {
  content: '';
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(
    90deg,
    transparent 0%,
    transparent 35%,
    rgba(201, 152, 94, 0.55) 50%,
    transparent 65%,
    transparent 100%
  );
  transform: translateX(100%);
  opacity: 0;
  mix-blend-mode: overlay;
}

body.loaded .calligraphy-reveal::after {
  animation: calligraphy-shimmer 1.2s cubic-bezier(0.4, 0, 0.2, 1) 0.4s forwards;
}

@keyframes calligraphy-shimmer {
  0%   { transform: translateX(100%);  opacity: 0; }
  15%  { opacity: 1; }
  85%  { opacity: 1; }
  100% { transform: translateX(-100%); opacity: 0; }
}

/* Helper: fade-up base for elements not driven by AOS */
.fade-up {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}

.fade-up.visible {
  opacity: 1;
  transform: translateY(0);
}

/* AOS fallback / overrides — make sure animations don't block first paint */
[data-aos] {
  pointer-events: auto;
}

/* Reduced motion overrides */
@media (prefers-reduced-motion: reduce) {
  .marquee-track,
  .hero-giant-wave,
  .hero-floating-tag,
  .hero-scroll-line,
  .fab-main::before,
  .counter-bg-wave,
  .preloader-wave-pattern,
  .cta-pattern,
  .hero-visual-orbit {
    animation: none !important;
  }
  /* Skip the shimmer entirely. The base text is cream-visible,
     so the title is fully readable without any motion. */
  body.loaded .calligraphy-reveal::after {
    animation: none !important;
    opacity: 0 !important;
  }
}
