/* ═══════════════════════════════════════════════════════════
   assets/css/animations.css — AngelCode Labs
   Shared keyframes, transitions, page-entrance animations
   ═══════════════════════════════════════════════════════════ */

/* ── Keyframes ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translateX(32px); }
  to   { opacity: 1; transform: translateX(0); }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(.88); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes float {
  0%, 100% { transform: translateY(0px); }
  50%       { transform: translateY(-8px); }
}
@keyframes pulse-glow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(240,192,64,0); }
  50%       { box-shadow: 0 0 0 8px rgba(240,192,64,.12); }
}
@keyframes spin-cw {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}
@keyframes shimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}
@keyframes border-dance {
  0%   { border-color: rgba(240,192,64,.2); }
  50%  { border-color: rgba(240,192,64,.55); }
  100% { border-color: rgba(240,192,64,.2); }
}
@keyframes wiggle {
  0%,100% { transform: rotate(0deg); }
  20%     { transform: rotate(-4deg); }
  40%     { transform: rotate(4deg); }
  60%     { transform: rotate(-3deg); }
  80%     { transform: rotate(3deg); }
}
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}
@keyframes glitch {
  0%, 90%, 100% { transform: translate(0); }
  91%           { transform: translate(-2px, 1px); }
  93%           { transform: translate(2px, -1px); }
  95%           { transform: translate(-1px, 2px); }
  97%           { transform: translate(1px, -2px); }
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}
@keyframes orbPulse {
  0%,100% { transform: scale(1); opacity: .6; }
  50%     { transform: scale(1.18); opacity: 1; }
}

/* ── Entrance utility classes ── */
.anim-fade-up       { animation: fadeUp .55s ease both; }
.anim-fade-in       { animation: fadeIn .45s ease both; }
.anim-scale-in      { animation: scaleIn .4s cubic-bezier(.34,1.56,.64,1) both; }
.anim-slide-left    { animation: slideInLeft .5s ease both; }
.anim-slide-right   { animation: slideInRight .5s ease both; }

/* Stagger helpers */
.delay-1 { animation-delay: .08s; }
.delay-2 { animation-delay: .16s; }
.delay-3 { animation-delay: .24s; }
.delay-4 { animation-delay: .32s; }
.delay-5 { animation-delay: .40s; }
.delay-6 { animation-delay: .48s; }

/* ── Scroll-reveal: JS adds .reveal-active when element enters viewport ── */
.reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal.reveal-active {
  opacity: 1;
  transform: translateY(0);
}
.reveal-left {
  opacity: 0;
  transform: translateX(-28px);
  transition: opacity .6s ease, transform .6s ease;
}
.reveal-left.reveal-active { opacity: 1; transform: translateX(0); }

/* ── Card hover lift ── */
.card-lift {
  transition: transform .25s cubic-bezier(.34,1.56,.64,1),
              box-shadow .25s ease,
              border-color .25s ease;
}
.card-lift:hover {
  transform: translateY(-5px) scale(1.008);
  box-shadow: 0 16px 48px rgba(0,0,0,.35);
}

/* ── Tilt cards (JS driven via data-tilt) ── */
.card-tilt {
  transform-style: preserve-3d;
  transition: transform .15s ease;
}

/* ── Shimmer text ── */
.text-shimmer {
  background: linear-gradient(90deg, var(--js) 0%, #fff8d6 40%, var(--js) 60%, var(--js) 100%);
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 3s linear infinite;
}

/* ── Floating orbs (decorative background blobs) ── */
.orb {
  position: absolute;
  border-radius: 50%;
  filter: blur(60px);
  pointer-events: none;
  z-index: 0;
  animation: orbPulse 6s ease-in-out infinite;
}
.orb-gold  { background: radial-gradient(circle, rgba(240,192,64,.18) 0%, transparent 70%); }
.orb-blue  { background: radial-gradient(circle, rgba(96,165,250,.12)  0%, transparent 70%); }
.orb-green { background: radial-gradient(circle, rgba(74,222,128,.10)  0%, transparent 70%); }

/* ── Noise grain overlay ── */
.grain::after {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)' opacity='.04'/%3E%3C/svg%3E");
  pointer-events: none;
  z-index: 1;
  opacity: .6;
}

/* ── AngelCode Rotating Badge ── */
.ac-badge {
  position: fixed;
  width: 64px;
  height: 64px;
  cursor: grab;
  z-index: 9999;
  user-select: none;
  filter: drop-shadow(0 4px 16px rgba(240,192,64,.5));
  transition: filter .2s;
}
.ac-badge:active { cursor: grabbing; }
.ac-badge:hover  { filter: drop-shadow(0 6px 24px rgba(240,192,64,.8)); }
.ac-badge-ring {
  width: 64px; height: 64px;
  border-radius: 50%;
  border: 2px solid transparent;
  background: conic-gradient(from 0deg, var(--js), #e8a020, var(--js));
  -webkit-mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
  mask: radial-gradient(farthest-side, transparent calc(100% - 3px), #fff calc(100% - 3px));
  animation: spin-cw 3s linear infinite;
  position: absolute; inset: 0;
}
.ac-badge-inner {
  position: absolute; inset: 6px;
  border-radius: 50%;
  background: var(--bg, #0b0d10);
  display: flex; align-items: center; justify-content: center;
  flex-direction: column;
  gap: 1px;
}
.ac-badge-label {
  font-family: 'JetBrains Mono', monospace;
  font-size: 6.5px;
  font-weight: 700;
  letter-spacing: .8px;
  color: var(--js);
  text-transform: uppercase;
  line-height: 1.1;
  text-align: center;
}
.ac-badge-dot {
  width: 6px; height: 6px;
  border-radius: 50%;
  background: var(--js);
  animation: pulse-glow 2s ease-in-out infinite;
}

/* ── Bottom mobile nav ── */
.mobile-nav {
  display: none;
  position: fixed;
  bottom: 0; left: 0; right: 0;
  height: 64px;
  background: rgba(17,19,24,.96);
  backdrop-filter: blur(16px);
  border-top: 1px solid var(--border, #1f2530);
  z-index: 200;
  padding: 0 4px;
  align-items: center;
  justify-content: space-around;
}
@media (max-width: 768px) {
  .mobile-nav { display: flex; }
  body        { padding-bottom: 64px; }
}
.mobile-nav-item {
  display: flex; flex-direction: column; align-items: center;
  gap: 3px; padding: 8px 14px;
  color: var(--muted, #64748b);
  font-size: 10px; font-weight: 500;
  border-radius: 10px;
  transition: color .2s, background .2s;
  text-decoration: none;
  position: relative;
  flex: 1;
}
.mobile-nav-item svg { width: 22px; height: 22px; }
.mobile-nav-item.active, .mobile-nav-item:hover {
  color: var(--js, #f0c040);
  background: rgba(240,192,64,.06);
}
.mobile-nav-item.active::after {
  content: '';
  position: absolute;
  top: 0; left: 50%; transform: translateX(-50%);
  width: 24px; height: 2px;
  background: var(--js);
  border-radius: 0 0 4px 4px;
}
.mobile-nav-bot {
  background: var(--js);
  border-radius: 50%;
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  color: #0c0900;
  box-shadow: 0 4px 16px rgba(240,192,64,.4);
  flex: 0 0 auto;
  animation: pulse-glow 2.5s ease-in-out infinite;
}

/* ── Scroll-progress bar ── */
#scroll-progress {
  position: fixed; top: 0; left: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--js), #e8a020);
  z-index: 9999;
  transition: width .1s linear;
  pointer-events: none;
}

/* ── Page transition overlay ── */
.page-transition {
  position: fixed; inset: 0;
  background: var(--bg, #0b0d10);
  z-index: 99999;
  pointer-events: none;
  animation: fadeIn .3s ease both;
  transition: opacity .35s ease;
}
.page-transition.out { opacity: 0; }

/* ── Desktop chatbot floating button ── */
.chatbot-toggle {
  position: fixed;
  bottom: 30px;
  right: 24px;
  width: 52px;
  height: 52px;
  border-radius: 50%;
  background: linear-gradient(135deg, var(--js, #f0c040), #e8a020);
  color: #0c0900;
  border: none;
  box-shadow: 0 6px 24px rgba(240,192,64,.45);
  cursor: pointer;
  z-index: 500;
  font-size: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), box-shadow .2s;
  animation: float 4s ease-in-out infinite;
}
.chatbot-toggle:hover {
  transform: scale(1.12);
  box-shadow: 0 10px 36px rgba(240,192,64,.65);
}
/* Hide desktop button on mobile (mobile nav has it instead) */
@media (max-width: 768px) {
  .chatbot-toggle { display: none; }
}