/* ===================================================
   AUREVIA EXPORTS — ADVANCED ANIMATION ENGINE
   ===================================================*/

/* ── PAGE LOADER ──────────────────────────────────── */
#au-loader {
  position: fixed; inset: 0; z-index: 99999;
  background: #0e1f16;
  display: flex; flex-direction: column;
  align-items: center; justify-content: center;
  transition: opacity 0.7s ease, visibility 0.7s ease;
}
#au-loader.hide { opacity: 0; visibility: hidden; pointer-events: none; }

.au-loader-emblem {
  width: 72px; height: 72px;
  background: url("data:image/svg+xml,<svg viewBox='0 0 44 44' fill='none' xmlns='http://www.w3.org/2000/svg'><circle cx='22' cy='22' r='20' stroke='%23c9a84c' stroke-width='1.5'/><path d='M14 30L22 13L30 30' stroke='%23c9a84c' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round' fill='none'/><line x1='17' y1='24.5' x2='27' y2='24.5' stroke='%23c9a84c' stroke-width='1.6' stroke-linecap='round'/><path d='M22 13C21 10 18 9 18 11C18 13 20.5 13.5 22 13Z' fill='%23c9a84c'/><path d='M22 13C23 10 26 9 26 11C26 13 23.5 13.5 22 13Z' fill='%23c9a84c'/></svg>") center/contain no-repeat;
  animation: loaderEmblemIn 0.9s cubic-bezier(0.16,1,0.3,1) forwards, loaderGlow 1.4s 0.5s ease-in-out infinite alternate;
  opacity: 0;
}
.au-loader-brand {
  font-family: 'Cinzel', Georgia, serif;
  font-size: 1.9rem; color: #c9a84c;
  letter-spacing: 0.4em; margin-top: 22px;
  overflow: hidden; display: flex;
}
.au-loader-brand .lchar {
  display: inline-block;
  animation: charUp 0.5s cubic-bezier(0.16,1,0.3,1) forwards;
  opacity: 0; transform: translateY(36px);
}
.au-loader-tagline {
  font-size: 0.58rem; letter-spacing: 0.26em;
  text-transform: uppercase; color: rgba(201,168,76,0.55);
  margin-top: 6px;
  animation: fadeInUp 0.6s 1.2s ease forwards; opacity: 0;
}
.au-loader-bar {
  width: 100px; height: 1px;
  background: rgba(201,168,76,0.15);
  margin-top: 28px; position: relative; overflow: hidden;
}
.au-loader-bar::after {
  content: '';
  position: absolute; inset-block: 0; left: -100%; width: 100%;
  background: linear-gradient(90deg, transparent, #c9a84c, transparent);
  animation: loaderScan 1s 0.4s ease forwards;
}

@keyframes loaderEmblemIn {
  0%   { opacity: 0; transform: scale(0.4) rotate(-90deg); }
  70%  { opacity: 1; transform: scale(1.08) rotate(5deg); }
  100% { opacity: 1; transform: scale(1) rotate(0deg); }
}
@keyframes loaderGlow {
  from { filter: drop-shadow(0 0 6px rgba(201,168,76,0.3)); }
  to   { filter: drop-shadow(0 0 22px rgba(201,168,76,0.75)); }
}
@keyframes charUp {
  to { opacity: 1; transform: translateY(0); }
}
@keyframes loaderScan {
  0%   { left: -100%; }
  100% { left: 100%; }
}
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}

/* ── SCROLL PROGRESS BAR ──────────────────────────── */
#au-progress {
  position: fixed; top: 0; left: 0; z-index: 10001;
  height: 2px; width: 0%;
  background: linear-gradient(90deg, #1a3829, #c9a84c 60%, #f0d080);
  pointer-events: none;
  transition: width 0.08s linear;
  box-shadow: 0 0 8px rgba(201,168,76,0.4);
}

/* ── CUSTOM CURSOR ────────────────────────────────── */
.au-cursor {
  position: fixed; pointer-events: none; z-index: 99998;
  width: 7px; height: 7px;
  background: #c9a84c; border-radius: 50%;
  transform: translate(-50%,-50%);
  transition: transform 0.08s ease, width 0.25s ease, height 0.25s ease;
  will-change: left, top;
}
.au-cursor-ring {
  position: fixed; pointer-events: none; z-index: 99997;
  width: 30px; height: 30px;
  border: 1.5px solid rgba(201,168,76,0.45);
  border-radius: 50%;
  transform: translate(-50%,-50%);
  will-change: left, top;
  transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease;
}
.au-cursor.is-hover   { width: 12px; height: 12px; background: rgba(201,168,76,0.6); }
.au-cursor-ring.is-hover { width: 44px; height: 44px; border-color: rgba(201,168,76,0.7); }
.au-cursor.is-click   { transform: translate(-50%,-50%) scale(0.6); }

/* ── FLOATING PARTICLES ───────────────────────────── */
.au-particles {
  position: absolute; inset: 0; pointer-events: none; overflow: hidden; z-index: 0;
}
.au-particle {
  position: absolute; border-radius: 50%;
  background: radial-gradient(circle, rgba(201,168,76,0.9) 0%, rgba(201,168,76,0) 70%);
  animation: particleFly linear infinite;
}
@keyframes particleFly {
  0%   { transform: translateY(110vh) scale(0); opacity: 0; }
  8%   { opacity: 1; }
  92%  { opacity: 0.6; }
  100% { transform: translateY(-5vh) scale(1); opacity: 0; }
}

/* ── SCROLL REVEAL ────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transition: opacity 0.85s cubic-bezier(0.16,1,0.3,1),
              transform 0.85s cubic-bezier(0.16,1,0.3,1);
}
[data-reveal="up"]    { transform: translateY(55px); }
[data-reveal="down"]  { transform: translateY(-55px); }
[data-reveal="left"]  { transform: translateX(-55px); }
[data-reveal="right"] { transform: translateX(55px); }
[data-reveal="scale"] { transform: scale(0.86); }
[data-reveal="fade"]  { transform: none; }
[data-reveal].is-visible { opacity: 1 !important; transform: none !important; }

[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.4s;  }
[data-delay="6"] { transition-delay: 0.48s; }

/* ── GOLD SHIMMER TEXT ────────────────────────────── */
@keyframes goldShimmer {
  0%   { background-position: -200% center; }
  100% { background-position: 200% center; }
}
.au-shimmer {
  background: linear-gradient(
    100deg,
    #b8922e 0%,
    #c9a84c 30%,
    #f0d988 48%,
    #ffe57f 52%,
    #c9a84c 70%,
    #b8922e 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text; background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: goldShimmer 4s linear infinite;
}

/* ── HERO TITLE REVEAL ───────────────────────────── */
.hero h1 {
  animation: heroReveal 1s 0.4s cubic-bezier(0.16,1,0.3,1) both;
}
@keyframes heroReveal {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}
.hero .hero-badge {
  animation: heroBadgeIn 0.7s 0.1s cubic-bezier(0.16,1,0.3,1) both,
             floatBadge 3.5s 1s ease-in-out infinite;
}
@keyframes heroBadgeIn {
  from { opacity: 0; transform: translateY(-16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes floatBadge {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-7px); }
}
.hero .hero-desc {
  animation: heroReveal 1s 0.6s cubic-bezier(0.16,1,0.3,1) both;
}
.hero .hero-btns {
  animation: heroReveal 0.8s 0.8s cubic-bezier(0.16,1,0.3,1) both;
}
.hero .hero-stats {
  animation: heroReveal 0.8s 1s cubic-bezier(0.16,1,0.3,1) both;
}

/* ── 3D CARD TILT ────────────────────────────────── */
.cat-showcase-card, .product-card, .feature-card,
.why-card, .value-card, .service-card, .market-card {
  transform-style: preserve-3d;
  will-change: transform;
}
/* Glow on hover */
.cat-showcase-card:hover {
  box-shadow: 0 24px 60px rgba(201,168,76,0.18), 0 0 0 1px rgba(201,168,76,0.12) !important;
}
.product-card:hover {
  box-shadow: 0 16px 48px rgba(201,168,76,0.14) !important;
}

/* ── MAGNETIC BUTTON INNER LIGHT ─────────────────── */
.btn-primary, .btn-outline-white, .nav-cta, .btn {
  position: relative; overflow: hidden;
}
.btn-primary::before, .nav-cta::before {
  content: '';
  position: absolute; inset: 0;
  background: radial-gradient(circle at var(--bmx,50%) var(--bmy,50%), rgba(255,255,255,0.22) 0%, transparent 65%);
  opacity: 0; transition: opacity 0.35s;
  pointer-events: none;
}
.btn-primary:hover::before, .nav-cta:hover::before { opacity: 1; }

/* ── RIPPLE ──────────────────────────────────────── */
.au-ripple {
  position: absolute; border-radius: 50%;
  background: rgba(255,255,255,0.3);
  transform: scale(0);
  animation: rippleOut 0.65s cubic-bezier(0,0.5,0.5,1) forwards;
  pointer-events: none;
}
@keyframes rippleOut {
  to { transform: scale(5); opacity: 0; }
}

/* ── NAV GLASS EFFECT ────────────────────────────── */
.navbar {
  transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}
.navbar.au-glass {
  background: rgba(245,240,230,0.82) !important;
  box-shadow: 0 2px 24px rgba(26,56,41,0.12) !important;
}
/* backdrop-filter on an ancestor creates a new containing block for any
   position:fixed descendant (e.g. the mobile nav-links dropdown), which
   breaks it — confined inside the navbar instead of the viewport. Scope
   the blur to desktop only, where there's no fixed-position mobile menu
   living inside .navbar. */
@media (min-width: 769px) {
  .navbar.au-glass {
    backdrop-filter: blur(20px) saturate(1.8);
    -webkit-backdrop-filter: blur(20px) saturate(1.8);
  }
}

/* ── IMAGE REVEAL ────────────────────────────────── */
.au-img-wrap {
  position: relative; overflow: hidden;
}
.au-img-wrap::after {
  content: '';
  position: absolute; inset: 0;
  background: #1a3829;
  transform-origin: left center;
  transform: scaleX(1);
  transition: transform 1s cubic-bezier(0.76,0,0.24,1);
}
.au-img-wrap.is-visible::after { transform: scaleX(0); transform-origin: right center; }

/* ── TOPBAR TICKER ───────────────────────────────── */
.topbar-left, .topbar-right {
  overflow: hidden; white-space: nowrap;
}
.topbar-ticker {
  display: inline-flex; gap: 48px;
  animation: tickerRun 18s linear infinite;
}
.topbar-ticker:hover { animation-play-state: paused; }
@keyframes tickerRun {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── SECTION TAG PULSE ───────────────────────────── */
.section-tag {
  position: relative;
}
.section-tag::before {
  content: '';
  position: absolute; left: -12px; top: 50%; transform: translateY(-50%);
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--secondary);
  animation: tagPulse 2s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(201,168,76,0.5); }
  50%       { box-shadow: 0 0 0 6px rgba(201,168,76,0); }
}

/* ── DIVIDER LINE REVEAL ─────────────────────────── */
.divider.is-visible {
  animation: dividerReveal 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes dividerReveal {
  from { transform: scaleX(0); transform-origin: left center; }
  to   { transform: scaleX(1); transform-origin: left center; }
}
.divider.center.is-visible {
  animation: dividerRevealCenter 0.9s cubic-bezier(0.16,1,0.3,1) forwards;
}
@keyframes dividerRevealCenter {
  from { transform: scaleX(0) translateX(-50%); }
  to   { transform: scaleX(1) translateX(0); }
}

/* ── LOGO EMBLEM SPIN ON HOVER ───────────────────── */
.nav-logo:hover::before {
  animation: emblemSpin 0.6s cubic-bezier(0.16,1,0.3,1);
}
@keyframes emblemSpin {
  from { transform: rotate(-15deg) scale(0.9); }
  to   { transform: rotate(0deg) scale(1); }
}

/* ── STAT NUMBER GLOW ON COUNT ───────────────────── */
.stat-num { transition: color 0.3s, text-shadow 0.3s; }
.stat-num.counting {
  text-shadow: 0 0 20px rgba(201,168,76,0.4);
}
