/* ==========================================================
   Çaylar · Animasyonlar (js/animations.js ile birlikte çalışır)
   Hızları ve mesafeleri buradan ayarlayabilirsiniz.
   ========================================================== */

/* Kaydırınca belirme */
.anim .rv {
  opacity: 0;
  translate: 0 34px;
  transition: opacity .8s cubic-bezier(.2,.7,.2,1) var(--d, 0ms), translate .8s cubic-bezier(.2,.7,.2,1) var(--d, 0ms);
  will-change: opacity, translate;
}
.anim .rv.in { opacity: 1; translate: 0 0; }
.anim .rv.rv-load { translate: 0 22px; transition-duration: .9s; }
.anim .rv.rv-load.in { translate: 0 0; }

/* Yüzen telefonlar */
.float { animation: float 6s ease-in-out infinite; animation-delay: var(--fd, 0s); }
@keyframes float {
  0%, 100% { translate: 0 0; }
  50% { translate: 0 -12px; }
}

/* Süzülen dekor halkaları */
.drift { animation: drift 14s ease-in-out infinite alternate; animation-delay: var(--dd, 0s); }
@keyframes drift {
  0% { translate: 0 0; scale: 1; }
  50% { translate: -18px 14px; scale: 1.05; }
  100% { translate: 14px -10px; scale: .97; }
}

/* Üst menü: kaydırınca gölge */
header { transition: box-shadow .3s ease, background-color .3s ease; }
.scrolled header {
  box-shadow: 0 10px 30px rgba(34, 21, 15, .08);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
  backdrop-filter: saturate(1.4) blur(10px);
}

/* Sayfa ilerleme çubuğu */
.progress {
  position: fixed; top: 0; left: 0; right: 0; height: 3px; z-index: 100;
  background: linear-gradient(90deg, var(--c-primary-light), var(--c-primary), var(--c-bordo));
  transform: scaleX(0); transform-origin: 0 50%;
  pointer-events: none;
}

/* Açılır menü ve mobil menü */
nav[aria-label="Mobil menü"] { animation: slideDown .3s cubic-bezier(.2,.8,.2,1); }
nav[aria-label="Mobil menü"] > * { animation: fadeUp .4s cubic-bezier(.2,.8,.2,1) both; }
nav[aria-label="Mobil menü"] > *:nth-child(2) { animation-delay: .03s; }
nav[aria-label="Mobil menü"] > *:nth-child(3) { animation-delay: .06s; }
nav[aria-label="Mobil menü"] > *:nth-child(4) { animation-delay: .09s; }
nav[aria-label="Mobil menü"] > *:nth-child(5) { animation-delay: .12s; }
nav[aria-label="Mobil menü"] > *:nth-child(6) { animation-delay: .15s; }
nav[aria-label="Mobil menü"] > *:nth-child(n+7) { animation-delay: .18s; }
@keyframes slideDown { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* İndirme menüsü paneli: opacity + hafif translateY, 150 ms */
.download-menu__panel { animation: download-menu-in .15s ease-out; }
@keyframes download-menu-in { from { opacity: 0; transform: translateY(var(--download-menu-shift, -6px)); } to { opacity: 1; transform: none; } }

/* SSS cevapları */
button[aria-expanded="true"] + p { animation: fadeUp .35s cubic-bezier(.2,.8,.2,1); }
button[aria-expanded] > span[aria-hidden="true"] { transition: transform .3s ease; }
button[aria-expanded="true"] > span[aria-hidden="true"] { animation: spinIn .35s cubic-bezier(.2,.8,.2,1); }
@keyframes spinIn { from { transform: rotate(-90deg) scale(.8); } to { transform: none; } }

/* Telefon ekranı değişince yumuşak geçiş (Nasıl Çalışır adımları) */
[data-c="Adimlar"] [role="img"] > div:last-child,
[data-c="Adimlar"] [data-c="Phone"] > img { animation: screenIn .45s cubic-bezier(.2,.8,.2,1); }
@keyframes screenIn { from { opacity: 0; transform: translateX(14px); } to { opacity: 1; transform: none; } }

/* Kırmızı butonlarda parıltı */
a.btn-red, button.btn-red { position: relative; overflow: hidden; isolation: isolate; }
a.btn-red::after, button.btn-red::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(110deg, transparent 30%, rgba(255,255,255,.35) 50%, transparent 70%);
  transform: translateX(-120%);
  transition: transform .7s ease;
}
a.btn-red:hover::after, button.btn-red:hover::after { transform: translateX(120%); }

/* "Yeni" rozeti nabız */
section:first-of-type span.badge-new { animation: pulse 2.4s ease-in-out infinite; }
@keyframes pulse {
  0%, 100% { box-shadow: 0 0 0 0 rgba(205, 4, 4, .45); }
  50% { box-shadow: 0 0 0 7px rgba(205, 4, 4, 0); }
}

/* Hareketi azalt tercihi */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .anim .rv { opacity: 1 !important; translate: none !important; }
  .float, .drift { animation: none !important; }
}
