/* ============================================
   SANAL YOLCULUK — Animations
   CSS Keyframes & GSAP-ready classes
   ============================================ */

/* ---------- Reveal Animation Classes (GSAP targets) ---------- */
.reveal {
  opacity: 0;
  transform: translateY(40px);
}

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
}

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
}

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
}

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

/* ---------- CSS Float Animations ---------- */
@keyframes floatSlow {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33% { transform: translateY(-15px) rotate(2deg); }
  66% { transform: translateY(-8px) rotate(-1deg); }
}

@keyframes floatMedium {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-20px) rotate(3deg); }
}

@keyframes floatFast {
  0%, 100% { transform: translateY(0); }
  50% { transform: translateY(-10px); }
}

/* ---------- Gradient Border Animation ---------- */
@keyframes gradientShift {
  0% { background-position: 0% 50%; }
  50% { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

.gradient-border {
  position: relative;
}

.gradient-border::before {
  content: '';
  position: absolute;
  inset: -1px;
  border-radius: inherit;
  background: linear-gradient(135deg, var(--accent-primary), var(--accent-secondary), var(--accent-primary));
  background-size: 200% 200%;
  animation: gradientShift 4s ease-in-out infinite;
  z-index: -1;
  opacity: 0;
  transition: opacity var(--transition-normal);
}

.gradient-border:hover::before {
  opacity: 1;
}

/* ---------- Glow Pulse ---------- */
@keyframes glowPulse {
  0%, 100% {
    box-shadow: 0 0 20px var(--glow-purple),
                0 0 40px var(--glow-purple);
  }
  50% {
    box-shadow: 0 0 30px var(--glow-purple-strong),
                0 0 60px var(--glow-purple);
  }
}

.glow-pulse {
  animation: glowPulse 3s ease-in-out infinite;
}

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

.typing-cursor::after {
  content: '|';
  color: var(--accent-primary);
  animation: blink 1s step-end infinite;
  margin-left: 2px;
}

/* ---------- Ring Expand (for tech items) ---------- */
@keyframes ringExpand {
  0% { transform: scale(0.8); opacity: 0.5; }
  100% { transform: scale(1.5); opacity: 0; }
}

.ring-expand {
  position: relative;
}

.ring-expand::after {
  content: '';
  position: absolute;
  inset: -10px;
  border: 1px solid var(--accent-primary);
  border-radius: inherit;
  opacity: 0;
  animation: ringExpand 2s ease-out infinite;
  pointer-events: none;
}

/* ---------- Hero Floating Shapes ---------- */
.hero-shapes {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  overflow: hidden;
}

.hero-shape {
  position: absolute;
  border: 1px solid var(--border-light);
  opacity: 0.15;
}

.hero-shape-1 {
  width: 100px;
  height: 100px;
  top: 15%;
  left: 10%;
  border-radius: var(--radius-lg);
  transform: rotate(45deg);
  animation: floatSlow 8s ease-in-out infinite;
  border-color: var(--accent-primary);
}

.hero-shape-2 {
  width: 60px;
  height: 60px;
  top: 25%;
  right: 15%;
  border-radius: 50%;
  animation: floatMedium 6s ease-in-out infinite;
  border-color: var(--accent-secondary);
}

.hero-shape-3 {
  width: 80px;
  height: 80px;
  bottom: 20%;
  left: 20%;
  border-radius: 50%;
  animation: floatSlow 10s ease-in-out infinite;
  animation-delay: -3s;
  border-color: var(--accent-warm);
}

.hero-shape-4 {
  width: 50px;
  height: 50px;
  bottom: 30%;
  right: 10%;
  border-radius: var(--radius-sm);
  transform: rotate(30deg);
  animation: floatMedium 7s ease-in-out infinite;
  animation-delay: -2s;
  border-color: var(--accent-primary);
}

.hero-shape-5 {
  width: 120px;
  height: 120px;
  top: 50%;
  left: 5%;
  border-radius: var(--radius-xl);
  transform: rotate(-15deg);
  animation: floatSlow 12s ease-in-out infinite;
  animation-delay: -5s;
  border-color: var(--accent-secondary);
  opacity: 0.08;
}

/* ---------- Card Shine Effect ---------- */
.card-shine {
  position: relative;
  overflow: hidden;
}

.card-shine::after {
  content: '';
  position: absolute;
  top: -50%;
  left: -50%;
  width: 200%;
  height: 200%;
  background: linear-gradient(
    to bottom right,
    rgba(255, 255, 255, 0) 0%,
    rgba(255, 255, 255, 0) 40%,
    rgba(255, 255, 255, 0.03) 50%,
    rgba(255, 255, 255, 0) 60%,
    rgba(255, 255, 255, 0) 100%
  );
  transform: rotate(30deg);
  transition: transform 0.8s ease;
  pointer-events: none;
}

.card-shine:hover::after {
  transform: rotate(30deg) translateY(-30%);
}

/* ---------- Number Counter Flash ---------- */
@keyframes countFlash {
  0% { opacity: 1; }
  50% { opacity: 0.5; }
  100% { opacity: 1; }
}

/* ---------- Stagger children animations ---------- */
.stagger-children > * {
  opacity: 0;
  transform: translateY(20px);
}

.stagger-children.animated > * {
  opacity: 1;
  transform: translateY(0);
  transition: all var(--transition-slow);
}

.stagger-children.animated > *:nth-child(1) { transition-delay: 0.1s; }
.stagger-children.animated > *:nth-child(2) { transition-delay: 0.2s; }
.stagger-children.animated > *:nth-child(3) { transition-delay: 0.3s; }
.stagger-children.animated > *:nth-child(4) { transition-delay: 0.4s; }
.stagger-children.animated > *:nth-child(5) { transition-delay: 0.5s; }
.stagger-children.animated > *:nth-child(6) { transition-delay: 0.6s; }

/* ---------- Magnetic hover effect for buttons ---------- */
.magnetic {
  transition: transform 0.3s ease;
}

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

.text-shimmer {
  background: linear-gradient(
    90deg,
    var(--text-primary) 0%,
    var(--accent-primary) 25%,
    var(--accent-secondary) 50%,
    var(--accent-primary) 75%,
    var(--text-primary) 100%
  );
  background-size: 200% auto;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: shimmer 6s linear infinite;
}

/* ---------- Noise Overlay ---------- */
.noise-overlay {
  position: fixed;
  inset: 0;
  z-index: 10000;
  pointer-events: none;
  opacity: 0.015;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 200 200' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)'/%3E%3C/svg%3E");
  background-repeat: repeat;
  background-size: 200px 200px;
}

/* ---------- Progress bar on scroll ---------- */
.scroll-progress {
  position: fixed;
  top: 0;
  left: 0;
  width: 0%;
  height: 2px;
  background: var(--accent-gradient);
  z-index: calc(var(--z-nav) + 1);
  transition: width 0.1s linear;
}
