/* Animated background for the hero section */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    -45deg,
    var(--hero-gradient-1),
    var(--hero-gradient-2),
    var(--hero-gradient-3),
    var(--hero-gradient-4)
  );
  background-size: 520% 520%;
  animation: gradientBG 18s ease infinite;
  /* Cursor-reactive background offsets (set by JS) */
  --bg-shift-x: 0%;
  --bg-shift-y: 0%;
  background-position: calc(50% + var(--bg-shift-x)) calc(50% + var(--bg-shift-y));
  border: 1px solid rgba(255, 255, 255, 0.18);
  will-change: background-position;
}

html.dark .hero {
  border-color: rgba(148, 163, 209, 0.25);
}


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

/* Add a subtle overlay to ensure text readability */
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background: radial-gradient(
      circle at 18% 18%,
      rgba(255, 255, 255, 0.9) 0%,
      rgba(255, 255, 255, 0.68) 42%,
      rgba(255, 255, 255, 0.36) 100%
    );
  opacity: 0.72;
  mix-blend-mode: lighten;
  z-index: 1;
}

html.dark .hero::before {
  background: radial-gradient(
      circle at 18% 18%,
      rgba(15, 23, 42, 0.92) 0%,
      rgba(15, 23, 42, 0.78) 48%,
      rgba(15, 23, 42, 0.62) 100%
    );
  mix-blend-mode: normal;
  opacity: 0.9;
}

/* Ensure hero content is above the overlay */
.hero > * {
  position: relative;
  z-index: 2;
}

.hero__orbs {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  /* Static positioning (no cursor parallax) */
}

.hero__orb {
  --hero-orb-size: clamp(160px, 26vw, 280px);
  position: absolute;
  width: var(--hero-orb-size);
  height: var(--hero-orb-size);
  border-radius: 50%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.88) 0%,
    rgba(99, 102, 241, 0.55) 52%,
    rgba(99, 102, 241, 0) 85%
  );
  mix-blend-mode: screen;
  opacity: 0.68;
  filter: blur(0px);
  animation: floatOrb 18s ease-in-out infinite;
}

.hero__orb--one {
  --hero-orb-size: clamp(180px, 30vw, 320px);
  top: -16%;
  left: -8%;
  animation-delay: 0s;
}

.hero__orb--two {
  --hero-orb-size: clamp(140px, 22vw, 240px);
  bottom: -22%;
  right: -10%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(217, 70, 239, 0.6) 48%,
    rgba(217, 70, 239, 0) 85%
  );
  animation-delay: 3s;
}

.hero__orb--three {
  --hero-orb-size: clamp(120px, 20vw, 220px);
  top: 28%;
  right: 18%;
  background: radial-gradient(
    circle at 35% 35%,
    rgba(255, 255, 255, 0.85) 0%,
    rgba(34, 211, 238, 0.55) 50%,
    rgba(34, 211, 238, 0) 85%
  );
  animation-delay: 6s;
}

@keyframes floatOrb {
  0%,
  100% {
    transform: translate3d(0, 0, 0) scale(1);
    opacity: 0.68;
  }
  25% {
    transform: translate3d(12px, -18px, 0) scale(1.05);
    opacity: 0.78;
  }
  50% {
    transform: translate3d(-16px, 12px, 0) scale(0.96);
    opacity: 0.62;
  }
  75% {
    transform: translate3d(10px, 20px, 0) scale(1.04);
    opacity: 0.75;
  }
}

/* Styles for scroll animations */
.feature-grid,
.faq,
.trust,
.sample,
section[aria-label='İçerik ve örnekler'] {
  opacity: 0;
  transform: translateY(20px);
  transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

.feature-grid.visible,
.faq.visible,
.trust.visible,
.sample.visible,
section[aria-label='İçerik ve örnekler'].visible {
  opacity: 1;
  transform: translateY(0);
}

/* Enhanced interactive element feedback */
.button.primary,
.site-banner__link,
.feature-card,
.site-menu__link {
  transition: transform 0.3s ease, box-shadow 0.3s ease, color 0.3s ease;
}

.button.primary:hover,
.button.primary:focus-visible {
  background-position: 80% 50%;
}

body.home .button.primary {
  animation: ctaPulse 9s ease-in-out infinite;
}

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

.site-banner__link:hover,
.site-banner__link:focus,
.site-menu__link:hover,
.site-menu__link:focus {
  color: var(--primary);
  text-decoration: none;
}

.feature-card {
  transition: transform 0.4s ease, box-shadow 0.4s ease, border-color 0.35s ease, background 0.35s ease;
}

.feature-card:hover,
.feature-card:focus-within {
  transform: translateY(-12px);
  box-shadow: 0 34px 70px rgba(15, 23, 42, 0.18);
}

.feature-card:hover::before,
.feature-card:focus-within::before {
  transform: scale(1.05);
  opacity: 0.85;
}

.feature-card:hover::after,
.feature-card:focus-within::after {
  opacity: 0.99;
}

/* Refined Typography & Spacing */
.hero h1 {
  font-size: clamp(2.5rem, 5vw, 3.5rem);
  line-height: 1.2;
  margin-bottom: 0.5em;
}

.hero .hero__subtitle {
  font-size: clamp(1.1rem, 3vw, 1.25rem);
  margin-bottom: 1.5em;
}

.hero .hero__description {
  max-width: 720px;
  font-size: 1.1rem;
  line-height: 1.6;
}

.feature-grid {
    margin-top: 80px;
    margin-bottom: 80px;
}

/* Spacing and styling for integrated sections */
#nasil-calisir,
#hakkimizda {
  padding-top: 60px;
  padding-bottom: 60px;
  border-top: 1px solid var(--border);
  margin-top: 0;
}

#nasil-calisir h2,
#hakkimizda h2 {
  text-align: center;
  margin-bottom: 2em;
}

/* Reduced motion: disable continuous and pointer-driven effects */
@media (prefers-reduced-motion: reduce) {
  .hero { animation: none !important; }
  /* Stop continuous orb animation */
  .hero__orb { animation: none !important; }
  .hero__orbs { transform: none !important; }
  body.home .button.primary { animation: none !important; }
}
