/* ============================================
   HAYAT DENGESI — Animations & Keyframes
   ============================================ */

/* --- Keyframes --- */

@keyframes gradientShift {
  0%   { background-position: 0% 50%; }
  50%  { background-position: 100% 50%; }
  100% { background-position: 0% 50%; }
}

@keyframes morphBlob {
  0%, 100% { border-radius: 60% 40% 70% 30% / 40% 50% 60% 50%; }
  25%      { border-radius: 40% 60% 30% 70% / 50% 40% 50% 60%; }
  50%      { border-radius: 50% 50% 40% 60% / 60% 40% 70% 30%; }
  75%      { border-radius: 70% 30% 60% 40% / 30% 60% 40% 70%; }
}

@keyframes float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(-15px) rotate(3deg); }
  66%      { transform: translateY(10px) rotate(-2deg); }
}

@keyframes floatReverse {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  33%      { transform: translateY(12px) rotate(-2deg); }
  66%      { transform: translateY(-10px) rotate(3deg); }
}

@keyframes scrollBounce {
  0%, 100% { transform: translateX(-50%) translateY(0); opacity: 1; }
  50%      { transform: translateX(-50%) translateY(8px); opacity: 0.5; }
}

@keyframes preloaderPulse {
  0%   { transform: scale(0.3); opacity: 0.8; }
  50%  { transform: scale(1); opacity: 0; }
  100% { transform: scale(1); opacity: 0; }
}

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

@keyframes fadeInLeft {
  from {
    opacity: 0;
    transform: translateX(-60px);
  }
  to {
    opacity: 1;
    transform: translateX(0);
  }
}

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

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

@keyframes slideReveal {
  from {
    transform: translateY(105%);
  }
  to {
    transform: translateY(0);
  }
}

@keyframes leafSway {
  0%, 100% { transform: rotate(-30deg); }
  50%      { transform: rotate(-25deg); }
}

@keyframes spinSlow {
  from { transform: rotate(0deg); }
  to   { transform: rotate(360deg); }
}

/* --- Scroll Reveal Classes --- */

.reveal {
  opacity: 0;
  transform: translateY(40px);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-left {
  opacity: 0;
  transform: translateX(-60px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-right {
  opacity: 0;
  transform: translateX(60px);
  transition: opacity 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.9s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.reveal-scale {
  opacity: 0;
  transform: scale(0.9);
  transition: opacity 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94),
              transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

/* Stagger delays for children */
.stagger-children .reveal:nth-child(1),
.stagger-children .reveal-scale:nth-child(1) { transition-delay: 0s; }
.stagger-children .reveal:nth-child(2),
.stagger-children .reveal-scale:nth-child(2) { transition-delay: 0.1s; }
.stagger-children .reveal:nth-child(3),
.stagger-children .reveal-scale:nth-child(3) { transition-delay: 0.2s; }
.stagger-children .reveal:nth-child(4),
.stagger-children .reveal-scale:nth-child(4) { transition-delay: 0.3s; }
.stagger-children .reveal:nth-child(5),
.stagger-children .reveal-scale:nth-child(5) { transition-delay: 0.4s; }
.stagger-children .reveal:nth-child(6),
.stagger-children .reveal-scale:nth-child(6) { transition-delay: 0.5s; }

/* --- Text Reveal --- */

.text-reveal-line {
  overflow: hidden;
}

.text-reveal-line span {
  display: block;
  transform: translateY(105%);
  transition: transform 0.7s cubic-bezier(0.77, 0, 0.175, 1);
}

.text-reveal-line.active span {
  transform: translateY(0);
}

.text-reveal-line.active span:nth-child(2) { transition-delay: 0.12s; }
.text-reveal-line.active span:nth-child(3) { transition-delay: 0.24s; }

/* --- Hero Load Animation --- */

.hero-load .overline {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.3s forwards;
}

.hero-load .display-text {
  opacity: 0;
  transform: translateY(30px);
  animation: fadeInUp 0.7s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.5s forwards;
}

.hero-load .hero-subtitle {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.7s forwards;
}

.hero-load .hero-buttons {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.9s forwards;
}

.hero-load .hero-trust {
  opacity: 0;
  transform: translateY(20px);
  animation: fadeInUp 0.6s cubic-bezier(0.25, 0.46, 0.45, 0.94) 1.1s forwards;
}

.hero-load .hero-photo-wrapper {
  opacity: 0;
  transform: translateX(40px);
  animation: fadeInRight 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94) 0.6s forwards;
}

/* --- Floating Elements --- */

.floating-element {
  position: absolute;
  pointer-events: none;
  animation: float 6s ease-in-out infinite;
}

.floating-element:nth-child(2) {
  animation: floatReverse 8s ease-in-out infinite;
  animation-delay: -2s;
}

.floating-element:nth-child(3) {
  animation: float 7s ease-in-out infinite;
  animation-delay: -4s;
}

.floating-element:nth-child(4) {
  animation: floatReverse 9s ease-in-out infinite;
  animation-delay: -1s;
}

/* --- Reduced Motion --- */

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.2s !important;
    scroll-behavior: auto !important;
  }

  .hero {
    animation: none;
    background-position: 50% 50%;
    background-size: 100% 100%;
  }

  .hero-photo-blob img {
    animation: none;
    border-radius: 30% 70% 50% 50% / 50% 30% 70% 50%;
  }

  .hero-photo-outline {
    animation: none;
  }

  .reveal,
  .reveal-left,
  .reveal-right,
  .reveal-scale {
    opacity: 1;
    transform: none;
  }

  .hero-load .overline,
  .hero-load .display-text,
  .hero-load .hero-subtitle,
  .hero-load .hero-buttons,
  .hero-load .hero-trust,
  .hero-load .hero-photo-wrapper {
    opacity: 1;
    transform: none;
    animation: none;
  }

  .floating-element {
    animation: none;
  }

}
