/* ============================================
   Vera Teknoloji Sistemleri — Animasyonlar
   ============================================ */

/* ── Keyframe Animasyonları ── */

/* Orb floating effect */
@keyframes orbFloat {
  0%, 100% { transform: translate(0, 0) scale(1); }
  25% { transform: translate(30px, -30px) scale(1.05); }
  50% { transform: translate(-20px, 20px) scale(0.95); }
  75% { transform: translate(20px, 10px) scale(1.02); }
}

/* Pulse dot */
@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.5; transform: scale(1.5); }
}

/* Float Y axis */
@keyframes floatY {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-20px); }
}

/* Gentle rotate */
@keyframes gentleRotate {
  0% { transform: rotate(0deg); }
  100% { transform: rotate(360deg); }
}

/* Shimmer effect */
@keyframes shimmer {
  0% { background-position: -200% 0; }
  100% { background-position: 200% 0; }
}

/* Slide up in */
@keyframes slideUpIn {
  from {
    opacity: 0;
    transform: translateY(30px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

/* Scale in */
@keyframes scaleIn {
  from {
    opacity: 0;
    transform: scale(0.9);
  }
  to {
    opacity: 1;
    transform: scale(1);
  }
}

/* Fade in */
@keyframes fadeIn {
  from { opacity: 0; }
  to { opacity: 1; }
}

/* Counter increment visual */
@keyframes countUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* Gradient flow for hero background */
@keyframes gradientFlow {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

/* Typing cursor blink */
@keyframes blink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0; }
}

/* Border glow pulse */
@keyframes borderGlow {
  0%, 100% { 
    border-color: rgba(0, 102, 255, 0.3);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.1);
  }
  50% { 
    border-color: rgba(0, 102, 255, 0.6);
    box-shadow: 0 0 30px rgba(0, 102, 255, 0.2);
  }
}

/* Spin */
@keyframes spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

/* ── Hero Specific Animations ── */
.hero-content {
  animation: slideUpIn 0.8s ease-out;
}

.hero-visual {
  animation: fadeIn 1s ease-out 0.3s both;
}

.hero-badge {
  animation: slideUpIn 0.6s ease-out;
}

.hero-title {
  animation: slideUpIn 0.8s ease-out 0.1s both;
}

.hero-description {
  animation: slideUpIn 0.8s ease-out 0.2s both;
}

.hero-buttons {
  animation: slideUpIn 0.8s ease-out 0.3s both;
}

.hero-stats {
  animation: slideUpIn 0.8s ease-out 0.4s both;
}

/* Mockup entrance */
.mockup-browser {
  animation: scaleIn 1s ease-out 0.5s both;
}

.floating-element {
  animation: fadeIn 0.6s ease-out 0.8s both;
}

/* ── Hover & Interactive Animations ── */

/* Button ripple effect */
.btn-primary::before {
  content: '';
  position: absolute;
  top: 50%;
  left: 50%;
  width: 0;
  height: 0;
  background: rgba(255, 255, 255, 0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::before {
  width: 300px;
  height: 300px;
}

/* Service card icon glow */
.service-card:hover .service-icon {
  animation: borderGlow 2s ease-in-out infinite;
}

/* Portfolio item zoom */
.portfolio-item::after {
  content: '🔍';
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%) scale(0);
  font-size: 2rem;
  z-index: 3;
  transition: transform 0.3s ease;
  filter: grayscale(1) brightness(2);
}

.portfolio-item:hover::after {
  transform: translate(-50%, -50%) scale(1);
}

/* ── Stagger Reveal for Grid Items ── */
.services-grid .service-card:nth-child(1) { transition-delay: 0.05s; }
.services-grid .service-card:nth-child(2) { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) { transition-delay: 0.15s; }
.services-grid .service-card:nth-child(4) { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(5) { transition-delay: 0.25s; }
.services-grid .service-card:nth-child(6) { transition-delay: 0.3s; }

.portfolio-grid .portfolio-item:nth-child(1) { transition-delay: 0.05s; }
.portfolio-grid .portfolio-item:nth-child(2) { transition-delay: 0.1s; }
.portfolio-grid .portfolio-item:nth-child(3) { transition-delay: 0.15s; }
.portfolio-grid .portfolio-item:nth-child(4) { transition-delay: 0.2s; }
.portfolio-grid .portfolio-item:nth-child(5) { transition-delay: 0.25s; }
.portfolio-grid .portfolio-item:nth-child(6) { transition-delay: 0.3s; }

.pricing-grid .pricing-card:nth-child(1) { transition-delay: 0.05s; }
.pricing-grid .pricing-card:nth-child(2) { transition-delay: 0.15s; }
.pricing-grid .pricing-card:nth-child(3) { transition-delay: 0.25s; }

/* ── Loading shimmer for images ── */
.portfolio-item img {
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 0.03) 25%,
    rgba(255, 255, 255, 0.08) 50%,
    rgba(255, 255, 255, 0.03) 75%
  );
  background-size: 200% 100%;
  animation: shimmer 1.5s infinite;
}

/* ── Smooth Scrollbar ── */
::-webkit-scrollbar {
  width: 8px;
}

::-webkit-scrollbar-track {
  background: var(--bg-darker);
}

::-webkit-scrollbar-thumb {
  background: var(--primary);
  border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
  background: var(--primary-light);
}

/* ── Selection ── */
::selection {
  background: rgba(0, 102, 255, 0.3);
  color: var(--text-white);
}

/* ── Reduced Motion ── */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }

  html {
    scroll-behavior: auto;
  }

  .reveal {
    opacity: 1;
    transform: none;
  }
}
