/* ===========================================================
   Avanor Capital — premium motion system
   GPU-friendly (transform + opacity), scroll-driven where possible.
   Fully guarded by prefers-reduced-motion.
   =========================================================== */

@property --av-num
@keyframes av-reveal { from { opacity: 0; transform: translateY(24px); } to { opacity: 1; transform: translateY(0); } }
@keyframes av-c25  { from { --av-num: 0; } to { --av-num: 25; } }
@keyframes av-c120 { from { --av-num: 0; } to { --av-num: 120; } }
@keyframes av-c100 { from { --av-num: 0; } to { --av-num: 100; } }
@keyframes av-parallax { from { transform: translateY(0); } to { transform: translateY(46px); } }
@keyframes av-draw { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
@keyframes av-navfade { from { background: rgba(10,21,34,0.45); box-shadow: 0 0 0 rgba(0,0,0,0); border-color: rgba(201,168,76,0.10); } to { background: rgba(9,16,27,0.92); box-shadow: 0 14px 34px rgba(3,8,15,0.5); border-color: rgba(201,168,76,0.22); } }
@keyframes av-shimmer { 0% { background-position: 180% 0; } 100% { background-position: -90% 0; } }
@keyframes av-drift { 0% { transform: translate(-26px,-14px) scale(1); } 100% { transform: translate(30px,20px) scale(1.18); } }
@keyframes av-marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes av-shine { 0% { transform: translateX(-140%) skewX(-20deg); } 100% { transform: translateX(280%) skewX(-20deg); } }

/* ---------- scroll reveals ---------- */
.av-reveal { animation: av-reveal 1s both cubic-bezier(.22,.61,.36,1); animation-timeline: view(); animation-range: entry 2% cover 34%; will-change: transform, opacity; }
.av-reveal.s1 { animation-range: entry 7% cover 38%; }
.av-reveal.s2 { animation-range: entry 12% cover 42%; }
.av-reveal.s3 { animation-range: entry 17% cover 46%; }
.av-reveal.s4 { animation-range: entry 22% cover 50%; }
.av-reveal.s5 { animation-range: entry 27% cover 54%; }

/* ---------- hero parallax ---------- */
.av-parallax { animation: av-parallax 1s linear both; animation-timeline: scroll(root); animation-range: 0 100vh; will-change: transform; }
.av-draw { stroke-dasharray: 1400; animation: av-draw 2.6s ease-out .25s both; }

/* ---------- shimmering gold headline ---------- */
.av-shimmer { background-image: linear-gradient(100deg, #B58C34 0%, #C9A84C 28%, #FBEFC6 47%, #ECD488 55%, #C9A84C 72%, #B58C34 100%); background-size: 220% 100%; -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; color: transparent; animation: av-shimmer 7s ease-in-out infinite; }

/* ---------- ambient aurora ---------- */
.av-aurora { position: absolute; border-radius: 50%; filter: blur(80px); pointer-events: none; animation: av-drift 24s ease-in-out infinite alternate; }
.av-aurora.b { animation-duration: 30s; animation-direction: alternate-reverse; }

/* ---------- kinetic marquee ---------- */
.av-marquee-track { animation: av-marquee 38s linear infinite; }
.av-marquee:hover .av-marquee-track { animation-play-state: paused; }

/* ---------- premium buttons ---------- */
.av-btn { position: relative; overflow: hidden; transition: transform .35s cubic-bezier(.22,.61,.36,1), box-shadow .35s; }
.av-btn::after { content: ""; position: absolute; top: 0; left: 0; width: 55%; height: 100%; background: linear-gradient(100deg, transparent, rgba(255,255,255,.5), transparent); transform: translateX(-140%) skewX(-20deg); pointer-events: none; }
.av-btn:hover::after { animation: av-shine 1.05s ease-out; }
.av-btn:hover { box-shadow: 0 18px 44px rgba(201,168,76,.45), 0 0 0 1px rgba(230,208,140,.45); }
.av-mag { transition: transform .3s cubic-bezier(.22,.61,.36,1); transform: translate(var(--mx,0px), var(--my,0px)); }

/* ghost / outlined fill-from-left */
.av-ghost { position: relative; overflow: hidden; z-index: 0; }
.av-ghost::before { content: ""; position: absolute; inset: 0; background: rgba(201,168,76,.14); transform: scaleX(0); transform-origin: left; transition: transform .5s cubic-bezier(.22,.61,.36,1); z-index: -1; }
.av-ghost:hover::before { transform: scaleX(1); }

/* ---------- nav ---------- */
.av-nav-shell { animation: av-navfade 1s linear both; animation-timeline: scroll(root); animation-range: 0 150px; }
.av-navlink::after { content: ""; position: absolute; left: 0; bottom: -2px; height: 2px; width: 100%; background: #C9A84C; border-radius: 2px; transform: scaleX(0); transform-origin: left; transition: transform .38s cubic-bezier(.22,.61,.36,1); }
.av-navlink:hover::after { transform: scaleX(1); }

/* ---------- cards ---------- */
.av-card { transition: transform .5s cubic-bezier(.22,.61,.36,1), border-color .45s ease, box-shadow .45s ease; }
.av-card:hover { transform: translateY(-6px); border-color: rgba(201,168,76,0.5) !important; box-shadow: 0 28px 58px rgba(4,9,18,0.6); }

/* ---------- graceful appear (form <-> confirmation swap) ---------- */
@keyframes av-appear { from { transform: translateY(14px); } to { transform: translateY(0); } }
.av-appear { animation: av-appear .55s cubic-bezier(.22,.61,.36,1) both; }

/* ---------- reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
  .av-reveal, .av-parallax, .av-shimmer, .av-aurora, .av-marquee-track, .av-nav-shell, .av-btn::after, .av-mag, .av-appear, .av-draw { animation: none !important; }
  .av-reveal { opacity: 1 !important; transform: none !important; }
  .av-draw { stroke-dashoffset: 0 !important; }
  .av-parallax, .av-mag { transform: none !important; }
  .av-shimmer { -webkit-text-fill-color: #C9A84C; color: #C9A84C; }
}
