/* ==========================================================================
   ANIMATIONS.CSS - Motion Keyframes & Light Theme Loaders
   ========================================================================== */

/* typing caret blinking */
@keyframes blink-caret {
  from, to { border-color: transparent }
  50%       { border-color: #d4873a; }
}

/* Pulsing welcome indicator dot */
@keyframes pulse-glow {
  0%   { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 135, 58, 0.6); }
  70%  { transform: scale(1);    box-shadow: 0 0 0 10px rgba(212, 135, 58, 0); }
  100% { transform: scale(0.95); box-shadow: 0 0 0 0 rgba(212, 135, 58, 0); }
}

/* Float animation for the visual backdrop */
@keyframes float-slow {
  0% {
    transform: translate(0px, 0px) rotate(0deg);
  }

  33% {
    transform: translate(10px, -15px) rotate(3deg);
  }

  66% {
    transform: translate(-8px, 8px) rotate(-3deg);
  }

  100% {
    transform: translate(0px, 0px) rotate(0deg);
  }
}

/* Float animation for technology floating icons */
@keyframes float-icon {
  0% {
    transform: translateY(0px) rotate(0deg);
  }

  50% {
    transform: translateY(-12px) rotate(5deg);
  }

  100% {
    transform: translateY(0px) rotate(0deg);
  }
}

/* Infinite Marquee Scrolling */
@keyframes scroll-marquee {
  0% {
    transform: translateX(0);
  }

  100% {
    transform: translateX(-100%);
  }
}

/* Float animation for individual marquee pills */
@keyframes float-marquee-pill {
  0% {
    transform: translateY(0);
  }

  100% {
    transform: translateY(-5px);
  }
}

/* Shake Animation for Invalid Inputs */
@keyframes shake {

  0%,
  100% {
    transform: translateX(0);
  }

  20%,
  60% {
    transform: translateX(-5px);
  }

  40%,
  80% {
    transform: translateX(5px);
  }
}

/* Ambient glow orb breathing */
@keyframes breathe-glow {

  0%,
  100% {
    opacity: 0.1;
    transform: scale(1);
  }

  50% {
    opacity: 0.16;
    transform: scale(1.08);
  }
}

/* Splash Loader Text Pulse for Light Theme */
@keyframes text-glow-pulse {
  0%, 100% {
    text-shadow: 0 4px 10px rgba(212,135,58,0.15), 0 2px 4px rgba(212,135,58,0.08);
    color: #fdf6ee;
  }
  50% {
    text-shadow: 0 4px 18px rgba(139,94,60,0.35), 0 2px 8px rgba(139,94,60,0.18);
    color: #d4873a;
  }
}

/* Entrance transitions classes (revealed by scroll/IntersectionObserver) */
.reveal {
  position: relative;
  opacity: 0;
  transition: all 0.8s cubic-bezier(0.25, 1, 0.5, 1);
}

.reveal-fade {
  opacity: 0;
}

.reveal-fade.active {
  opacity: 1;
}

.reveal-up {
  transform: translateY(30px);
}

.reveal-up.active {
  opacity: 1;
  transform: translateY(0);
}

.reveal-left {
  transform: translateX(-30px);
}

.reveal-left.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-right {
  transform: translateX(30px);
}

.reveal-right.active {
  opacity: 1;
  transform: translateX(0);
}

.reveal-scale {
  transform: scale(0.95);
}

.reveal-scale.active {
  opacity: 1;
  transform: scale(1);
}

/* Delay modifiers for sequenced reveals */
.delay-100 {
  transition-delay: 100ms;
}

.delay-200 {
  transition-delay: 200ms;
}

.delay-300 {
  transition-delay: 300ms;
}

.delay-400 {
  transition-delay: 400ms;
}

.delay-500 {
  transition-delay: 500ms;
}

/* Custom Loading Spinner */
.spinner {
  width: 18px;
  height: 18px;
  border: 2px solid rgba(212, 135, 58, 0.25);
  border-top-color: #d4873a;
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

/* Brand Loader Splash Screen (Split-Panel Reveal System) */
.splash-container {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: transparent;
  /* transparent backdrop, slide panels do the covering */
  z-index: 99999;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  transition: visibility 1.2s;
}

.splash-container.fade-out {
  visibility: hidden;
  pointer-events: none;
}

/* Slide Away Panels */
.splash-panel {
  position: absolute;
  left: 0;
  width: 100%;
  height: 50%;
  background-color: #212121;  /* Match the site's dark section background color (espresso) */
  transition: transform 1.2s cubic-bezier(0.85, 0, 0.15, 1);
  z-index: 1;
}

.splash-panel-top    { top: 0;    border-bottom: 1px solid rgba(253,246,238,0.06); }
.splash-panel-bottom { bottom: 0; border-top:    1px solid rgba(253,246,238,0.06); }

.splash-container.fade-out .splash-panel-top {
  transform: translateY(-100%);
}

.splash-container.fade-out .splash-panel-bottom {
  transform: translateY(100%);
}

.splash-content {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 2.2rem;
  max-width: 450px;
  width: 90%;
  transition: opacity 0.5s cubic-bezier(0.85, 0, 0.15, 1);
}

.splash-container.fade-out .splash-content {
  opacity: 0;
}

/* Percentage Loader Typography & Font Style */
.splash-percentage-container {
  display: flex;
  align-items: baseline;
  justify-content: center;
  font-family: 'Plus Jakarta Sans', sans-serif;
  color: var(--text-primary);
  opacity: 0;
  animation: fade-in 0.6s ease forwards 0.2s;
}

.splash-percentage-num {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 8rem;
  font-weight: 850;
  line-height: 1;
  letter-spacing: -0.05em;
  color: #fafafa;
  animation: text-color-cycle 4s ease-in-out infinite;
  filter: drop-shadow(0 4px 12px rgba(0,0,0,0.5));
}

.splash-percentage-symbol {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 2.8rem;
  font-weight: 800;
  color: #d4873a;
  margin-left: 0.2rem;
  text-shadow: 0 0 10px rgba(212, 135, 58, 0.4);
}

.splash-logo-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  opacity: 0;
  transform: translateY(10px);
  animation: splash-logo-reveal 1s cubic-bezier(0.16, 1, 0.3, 1) forwards 0.3s;
}

.splash-logo-row img {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  box-shadow: 0 4px 15px rgba(74, 144, 226, 0.3);
}

.splash-logo {
  font-family: 'Plus Jakarta Sans', sans-serif;
  font-size: 1.6rem;
  font-weight: 800;
  letter-spacing: 0.15em;
  color: #fafafa;
  perspective: 1000px;
  display: flex;
}

.splash-logo span {
  display: inline-block;
  opacity: 0;
  transform: translateY(20px) rotateX(-90deg);
  animation: letter-reveal 0.6s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
  animation-delay: calc(var(--i) * 0.05s);
  color: #fafafa;
  text-shadow: 0 2px 10px rgba(255, 255, 255, 0.15);
}

@keyframes letter-reveal {
  to {
    opacity: 1;
    transform: translateY(0) rotateX(0deg);
  }
}

.splash-progressbar-bg {
  width: 85%;
  height: 4px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: var(--radius-full);
  overflow: hidden;
  position: relative;
  opacity: 0;
  animation: fade-in 0.5s ease forwards 0.4s;
  box-shadow: inset 0 1px 2px rgba(0,0,0,0.5);
}

.splash-progressbar {
  height: 100%;
  width: 0%;
  background: linear-gradient(90deg, #4a90e2 0%, #d4873a 50%, #ff6f61 100%);
  background-size: 200% auto;
  box-shadow: 0 0 15px rgba(74, 144, 226, 0.8), 0 0 5px rgba(255, 111, 97, 0.5);
  animation: progress-color-flow 3s linear infinite;
}

.splash-glow {
  position: absolute;
  width: 500px; height: 500px;
  filter: blur(60px);
  z-index: -1;
  animation: color-shift-glow 8s ease-in-out infinite;
}

/* Animations */
@keyframes color-shift-glow {
  0% {
    background: radial-gradient(circle, rgba(74, 144, 226, 0.25) 0%, rgba(255, 111, 97, 0.08) 50%, transparent 70%);
    transform: scale(1) translate(0px, 0px);
  }
  33% {
    background: radial-gradient(circle, rgba(255, 111, 97, 0.25) 0%, rgba(212, 135, 58, 0.08) 50%, transparent 70%);
    transform: scale(1.1) translate(-20px, 10px);
  }
  66% {
    background: radial-gradient(circle, rgba(212, 135, 58, 0.25) 0%, rgba(74, 144, 226, 0.08) 50%, transparent 70%);
    transform: scale(0.9) translate(15px, -15px);
  }
  100% {
    background: radial-gradient(circle, rgba(74, 144, 226, 0.25) 0%, rgba(255, 111, 97, 0.08) 50%, transparent 70%);
    transform: scale(1) translate(0px, 0px);
  }
}

@keyframes text-color-cycle {
  0%, 100% {
    color: #fafafa;
    text-shadow: 0 0 20px rgba(74, 144, 226, 0.6);
  }
  50% {
    color: #fafafa;
    text-shadow: 0 0 20px rgba(255, 111, 97, 0.6);
  }
}

@keyframes progress-color-flow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes splash-logo-reveal {
  to {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes fade-in {
  to {
    opacity: 1;
  }
}