/* ============================================================
   YKA Teknoloji — Animations (animations.css)
   ============================================================
   All keyframe animations and animation utility classes.
   Requires variables.css tokens.
   ============================================================ */


/* ----------------------------------------------------------
   SCROLL PROGRESS BAR
   Gold gradient line at top of page reflecting scroll depth.
   ---------------------------------------------------------- */
#scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(
    90deg,
    var(--color-accent)   0%,
    var(--color-accent-glow) 50%,
    var(--color-cyan)     100%
  );
  z-index: 9999;
  pointer-events: none;
  transition: width 0.1s linear;
  box-shadow: 0 0 8px rgba(196, 137, 26, 0.6), 0 0 20px rgba(56, 189, 248, 0.3);
}


/* ----------------------------------------------------------
   REVEAL ON SCROLL
   ---------------------------------------------------------- */
.reveal {
  opacity: 0;
  transform: translateY(32px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

.reveal.visible {
  opacity: 1;
  transform: translateY(0);
}

/* Directional variants */
.reveal-left {
  opacity: 0;
  transform: translateX(-40px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(40px);
  transition: opacity 0.65s var(--ease-out), transform 0.65s var(--ease-out);
}

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

/* Stagger delay helpers */
.stagger-1 { transition-delay: 0.08s !important; }
.stagger-2 { transition-delay: 0.16s !important; }
.stagger-3 { transition-delay: 0.24s !important; }
.stagger-4 { transition-delay: 0.32s !important; }


/* ----------------------------------------------------------
   GHOST FLOATING PLATES (Hero background)
   ---------------------------------------------------------- */
@keyframes floatPlate {
  0% {
    transform: translateY(0) rotate(var(--r0));
    opacity: 0;
  }
  8%  { opacity: 1; }
  92% { opacity: 1; }
  100% {
    transform: translateY(var(--dy)) rotate(var(--r1));
    opacity: 0;
  }
}

.ghost-plate {
  position: absolute;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.1);
  border-radius: 8px;
  padding: 5px 16px;
  font-family: var(--font-display);
  font-weight: 800;
  letter-spacing: 0.15em;
  color: rgba(255, 255, 255, 0.13);
  white-space: nowrap;
  animation: floatPlate linear infinite;
  backdrop-filter: blur(2px);
}

/* 10 ghost-plate positioning rules */
.ghost-plate:nth-child(1)  { left:  5%; top: 10%; font-size: 0.85rem; --r0: -4deg; --r1:  4deg; --dy: -120px; animation-duration: 12s; animation-delay:  0s; }
.ghost-plate:nth-child(2)  { left: 75%; top:  5%; font-size: 1rem;    --r0:  3deg; --r1: -3deg; --dy: -150px; animation-duration: 14s; animation-delay: -2s; }
.ghost-plate:nth-child(3)  { left: 25%; top: 60%; font-size: 0.75rem; --r0: -2deg; --r1:  6deg; --dy: -100px; animation-duration: 10s; animation-delay: -4s; }
.ghost-plate:nth-child(4)  { left: 60%; top: 70%; font-size: 0.9rem;  --r0:  5deg; --r1: -2deg; --dy: -130px; animation-duration: 13s; animation-delay: -1s; }
.ghost-plate:nth-child(5)  { left: 10%; top: 40%; font-size: 0.8rem;  --r0: -3deg; --r1:  3deg; --dy: -110px; animation-duration: 11s; animation-delay: -6s; }
.ghost-plate:nth-child(6)  { left: 85%; top: 35%; font-size: 0.7rem;  --r0:  2deg; --r1: -5deg; --dy:  -90px; animation-duration: 15s; animation-delay: -3s; }
.ghost-plate:nth-child(7)  { left: 45%; top: 80%; font-size: 0.95rem; --r0: -6deg; --r1:  2deg; --dy: -140px; animation-duration: 12s; animation-delay: -7s; }
.ghost-plate:nth-child(8)  { left: 30%; top: 15%; font-size: 0.65rem; --r0:  4deg; --r1: -4deg; --dy:  -80px; animation-duration: 16s; animation-delay: -5s; }
.ghost-plate:nth-child(9)  { left: 55%; top: 45%; font-size: 0.85rem; --r0: -1deg; --r1:  5deg; --dy: -120px; animation-duration: 11s; animation-delay: -8s; }
.ghost-plate:nth-child(10) { left: 90%; top: 65%; font-size: 0.75rem; --r0:  3deg; --r1: -6deg; --dy: -100px; animation-duration: 14s; animation-delay: -4s; }


/* ----------------------------------------------------------
   SCANLINE — Enhanced with glow trail
   ---------------------------------------------------------- */
@keyframes scanline {
  0%   { top: 5%;  opacity: 0; }
  8%   { opacity: 1; }
  90%  { opacity: 1; }
  100% { top: 95%; opacity: 0; }
}

.scan-line {
  position: absolute;
  left: 0;
  right: 0;
  height: 2px;
  background: linear-gradient(
    to right,
    transparent 0%,
    rgba(196, 137, 26, 0.3) 20%,
    rgba(240, 181, 74, 1)   50%,
    rgba(56, 189, 248, 0.8) 65%,
    rgba(240, 181, 74, 0.3) 80%,
    transparent 100%
  );
  animation: scanline 3s ease-in-out infinite;
  opacity: 0.9;
  pointer-events: none;
  box-shadow: 0 0 8px rgba(240, 181, 74, 0.6), 0 0 20px rgba(56, 189, 248, 0.3);
  filter: blur(0.5px);
}


/* ----------------------------------------------------------
   PLATE BLINK — More vivid
   ---------------------------------------------------------- */
@keyframes plateBlink {
  0%, 100% { box-shadow: 0 0 0 0 rgba(196, 137, 26, 0); }
  50%       { box-shadow: 0 0 0 6px rgba(196, 137, 26, 0.4),
                           0 0 20px rgba(196, 137, 26, 0.2); }
}

.plate-blink {
  animation: plateBlink 2.2s ease-in-out infinite;
}


/* ----------------------------------------------------------
   GLOW PULSE (Popular pricing card)
   ---------------------------------------------------------- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px 2px rgba(196, 137, 26, 0.2),
                0 0 0 2px rgba(196, 137, 26, 0.45);
  }
  50% {
    box-shadow: 0 0 60px 12px rgba(196, 137, 26, 0.45),
                0 0 0 2px rgba(196, 137, 26, 1),
                0 0 80px 20px rgba(56, 189, 248, 0.08);
  }
}


/* ----------------------------------------------------------
   BORDER GLOW SWEEP — animated gradient border
   ---------------------------------------------------------- */
@keyframes borderGlow {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.border-glow-animated {
  background: linear-gradient(
    270deg,
    #C4891A, #F0B54A, #38BDF8, #F0B54A, #C4891A
  );
  background-size: 300% 300%;
  animation: borderGlow 4s ease infinite;
}


/* ----------------------------------------------------------
   MORPH GRADIENT — slowly shifting background
   ---------------------------------------------------------- */
@keyframes morphGradient {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.morph-gradient {
  background: linear-gradient(
    270deg,
    #040B18, #0F2B52, #0a1929, #040B18
  );
  background-size: 400% 400%;
  animation: morphGradient 12s ease infinite;
}


/* ----------------------------------------------------------
   GLOW ORB — floating ambient glow
   ---------------------------------------------------------- */
@keyframes glowOrb {
  0%   { transform: translate(0, 0) scale(1);    opacity: 0.6; }
  33%  { transform: translate(30px, -20px) scale(1.1); opacity: 0.8; }
  66%  { transform: translate(-20px, 15px) scale(0.95); opacity: 0.5; }
  100% { transform: translate(0, 0) scale(1);    opacity: 0.6; }
}

.glow-orb {
  border-radius: 50%;
  filter: blur(60px);
  animation: glowOrb 8s ease-in-out infinite;
  pointer-events: none;
}

.glow-orb--gold {
  background: rgba(196, 137, 26, 0.25);
  width: 300px;
  height: 300px;
}

.glow-orb--cyan {
  background: rgba(56, 189, 248, 0.15);
  width: 250px;
  height: 250px;
  animation-delay: -3s;
}


/* ----------------------------------------------------------
   DATA STREAM — subtle matrix-like vertical lines
   ---------------------------------------------------------- */
@keyframes dataStream {
  0%   { transform: translateY(-100%); opacity: 0; }
  10%  { opacity: 0.6; }
  90%  { opacity: 0.6; }
  100% { transform: translateY(100vh);  opacity: 0; }
}

.data-stream {
  position: fixed;
  top: 0;
  width: 1px;
  height: 60px;
  background: linear-gradient(
    to bottom,
    transparent,
    rgba(196, 137, 26, 0.4),
    rgba(56, 189, 248, 0.3),
    transparent
  );
  animation: dataStream linear infinite;
  pointer-events: none;
  z-index: 0;
}


/* ----------------------------------------------------------
   COUNTER GLOW — pulsing number effect
   ---------------------------------------------------------- */
@keyframes counterGlow {
  0%, 100% { text-shadow: none; }
  50%       { text-shadow: 0 0 20px rgba(196, 137, 26, 0.7),
                           0 0 40px rgba(196, 137, 26, 0.3); }
}

.counter-glow {
  animation: counterGlow 2.5s ease-in-out infinite;
}


/* ----------------------------------------------------------
   SLIDE IN variants (for future use)
   ---------------------------------------------------------- */
@keyframes slideInLeft {
  from { opacity: 0; transform: translateX(-50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInRight {
  from { opacity: 0; transform: translateX(50px); }
  to   { opacity: 1; transform: translateX(0); }
}

@keyframes slideInUp {
  from { opacity: 0; transform: translateY(40px); }
  to   { opacity: 1; transform: translateY(0); }
}

.animate-slide-left  { animation: slideInLeft  0.6s var(--ease-out) both; }
.animate-slide-right { animation: slideInRight 0.6s var(--ease-out) both; }
.animate-slide-up    { animation: slideInUp    0.6s var(--ease-out) both; }


/* ----------------------------------------------------------
   SPIN
   ---------------------------------------------------------- */
@keyframes spin {
  to { transform: rotate(360deg); }
}


/* ----------------------------------------------------------
   WHATSAPP PULSE
   ---------------------------------------------------------- */
@keyframes waPulse {
  0%, 100% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45),
                0 0 0 0 rgba(37, 211, 102, 0.4);
  }
  50% {
    box-shadow: 0 4px 20px rgba(37, 211, 102, 0.45),
                0 0 0 14px rgba(37, 211, 102, 0);
  }
}

.wa-btn {
  animation: waPulse 2.5s ease-in-out infinite;
}


/* ----------------------------------------------------------
   PULSE (generic — live indicator dot)
   ---------------------------------------------------------- */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50%       { opacity: 0.4; transform: scale(0.85); }
}

.animate-pulse {
  animation: pulse 2s cubic-bezier(0.4, 0, 0.6, 1) infinite;
}


/* ----------------------------------------------------------
   TEXT SHIMMER — animated gold gradient text
   ---------------------------------------------------------- */
@keyframes textShimmer {
  0%   { background-position: -200% center; }
  100% { background-position:  200% center; }
}

.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--color-accent)      0%,
    var(--color-accent-glow) 30%,
    #fff                     50%,
    var(--color-cyan)        65%,
    var(--color-accent-glow) 80%,
    var(--color-accent)      100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  animation: textShimmer 3.5s linear infinite;
}


/* ----------------------------------------------------------
   FADE IN UP
   ---------------------------------------------------------- */
@keyframes fadeInUp {
  from { opacity: 0; transform: translateY(30px); }
  to   { opacity: 1; transform: translateY(0); }
}


/* ----------------------------------------------------------
   FLOAT — gentle up-down for decorative elements
   ---------------------------------------------------------- */
@keyframes float {
  0%, 100% { transform: translateY(0); }
  50%       { transform: translateY(-16px); }
}

.animate-float {
  animation: float 5s ease-in-out infinite;
}


/* ----------------------------------------------------------
   ICON BOUNCE — subtle bounce on hover entry
   ---------------------------------------------------------- */
@keyframes iconBounce {
  0%   { transform: scale(1); }
  40%  { transform: scale(1.15); }
  70%  { transform: scale(0.95); }
  100% { transform: scale(1); }
}

.card:hover .card-feature-icon i,
.card-why:hover .card-why-icon i,
.card-trust:hover .card-trust-icon i {
  animation: iconBounce 0.4s var(--ease-spring) both;
}


/* ----------------------------------------------------------
   GRID PULSE — faint background grid glow
   ---------------------------------------------------------- */
@keyframes gridPulse {
  0%, 100% { opacity: 0.03; }
  50%       { opacity: 0.06; }
}

.grid-pulse-bg {
  background-image: radial-gradient(rgba(196, 137, 26, 1) 1px, transparent 1px);
  background-size: 28px 28px;
  animation: gridPulse 4s ease-in-out infinite;
}


/* ----------------------------------------------------------
   COUNTER (marker class for JS counter animation)
   ---------------------------------------------------------- */
.counter {
  cursor: default;
}
