/* ============================================================
   ANIMATIONS — site-wide hafif animasyon paketi
   GPU-only (opacity + transform), 60fps hedef
   prefers-reduced-motion ile otomatik kapanır
   ============================================================ */

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes scaleIn {
  from { opacity: 0; transform: scale(0.96); }
  to   { opacity: 1; transform: scale(1); }
}
@keyframes slideInLeft {
  from { opacity: 0; transform: translate3d(-20px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes slideInRight {
  from { opacity: 0; transform: translate3d(20px, 0, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}
@keyframes floatY {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50%      { transform: translate3d(0, -6px, 0); }
}
@keyframes sheenSlide {
  0%   { background-position: -150% 0; }
  100% { background-position: 150% 0; }
}
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 0 0 0 rgba(250, 204, 21, 0.45); }
  50%      { box-shadow: 0 0 28px -4px rgba(250, 204, 21, 0.55); }
}

/* ===== SCROLL REVEAL ===== */
[data-reveal] {
  opacity: 0;
  transform: translate3d(0, 24px, 0);
  transition:
    opacity 0.6s cubic-bezier(0.16, 1, 0.3, 1),
    transform 0.6s cubic-bezier(0.16, 1, 0.3, 1);
  will-change: opacity, transform;
}
[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0);
  will-change: auto;
}
[data-reveal="left"]  { transform: translate3d(-24px, 0, 0); }
[data-reveal="right"] { transform: translate3d(24px, 0, 0); }
[data-reveal="scale"] { transform: scale(0.94); }
[data-reveal="fade"]  { transform: none; }
[data-reveal="left"].is-visible,
[data-reveal="right"].is-visible,
[data-reveal="scale"].is-visible { transform: none; }

/* Stagger delays */
[data-reveal-delay="1"] { transition-delay: 0.08s; }
[data-reveal-delay="2"] { transition-delay: 0.16s; }
[data-reveal-delay="3"] { transition-delay: 0.24s; }
[data-reveal-delay="4"] { transition-delay: 0.32s; }
[data-reveal-delay="5"] { transition-delay: 0.40s; }
[data-reveal-delay="6"] { transition-delay: 0.48s; }

/* ===== HOVER UTILITIES ===== */
.hover-lift {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}
.hover-lift:hover {
  transform: translate3d(0, -4px, 0);
  box-shadow:
    0 18px 36px -16px rgba(0, 0, 0, 0.45),
    0 0 22px -8px rgba(250, 204, 21, 0.35);
}

.hover-glow {
  transition: box-shadow 0.3s ease, border-color 0.3s ease;
}
.hover-glow:hover {
  box-shadow: 0 0 32px -6px rgba(250, 204, 21, 0.45);
}

.hover-scale {
  transition: transform 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}
.hover-scale:hover {
  transform: scale(1.025);
}

/* ===== GLOBAL CARD HOVER ENHANCE ===== */
.glass-card,
.metric-card,
.connection-card,
.panel-card,
.reg-gift {
  transition:
    transform 0.3s cubic-bezier(0.16, 1, 0.3, 1),
    box-shadow 0.3s ease,
    border-color 0.3s ease;
}

/* ===== BUTTON SHEEN ===== */
/* Apex gold butonları üzerinden hover'da ışık dalgası geçer */
.btn-panel,
.btn-ultra:not(.btn-ultra-ghost),
.apex-auth__submit,
.reg-submit {
  position: relative;
  overflow: hidden;
  isolation: isolate;
}
.btn-panel::after,
.btn-ultra:not(.btn-ultra-ghost)::after,
.apex-auth__submit::after,
.reg-submit::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(110deg,
    transparent 35%,
    rgba(255, 255, 255, 0.32) 50%,
    transparent 65%);
  background-size: 200% 100%;
  background-position: -150% 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.15s ease;
  z-index: 1;
}
.btn-panel:hover::after,
.btn-ultra:not(.btn-ultra-ghost):hover::after,
.apex-auth__submit:hover::after,
.reg-submit:hover::after {
  opacity: 1;
  animation: sheenSlide 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

/* ===== NAV LINK UNDERLINE ===== */
.nav-link-mini {
  position: relative;
}
.nav-link-mini::after {
  content: '';
  position: absolute;
  left: 50%;
  bottom: 2px;
  width: 0;
  height: 2px;
  background: linear-gradient(90deg, var(--theme-primary, #facc15), var(--theme-accent, #f59e0b));
  transform: translateX(-50%);
  transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
  border-radius: 999px;
  pointer-events: none;
}
.nav-link-mini:hover::after,
.nav-link-mini.active::after {
  width: 60%;
}

/* ===== ICON BUTTON BOUNCE ===== */
.auth-btn.glass-mini.icon-btn {
  transition:
    transform 0.25s cubic-bezier(0.16, 1, 0.3, 1),
    background 0.25s ease,
    border-color 0.25s ease;
}
.auth-btn.glass-mini.icon-btn:hover {
  transform: translate3d(0, -2px, 0);
}
.auth-btn.glass-mini.icon-btn:active {
  transform: translate3d(0, 0, 0) scale(0.94);
  transition-duration: 0.1s;
}

/* ===== LINK SUBTLE COLOR TRANSITION ===== */
a:not([class]) {
  transition: color 0.2s ease, opacity 0.2s ease;
}

/* ===== FLOAT UTILITY ===== */
.float-anim {
  animation: floatY 4s ease-in-out infinite;
}

/* ===== SMOOTH SCROLL ===== */
html {
  scroll-behavior: smooth;
}

/* ===== FOCUS-VISIBLE GLOW =====
   Sadece interaktif a, button, [tabindex] için altın outline.
   Form input/textarea/select için outline kapatıldı — wrapper border + soft glow yeterli. */
a:focus-visible,
button:focus-visible,
[tabindex]:focus-visible:not(input):not(textarea):not(select) {
  outline: 2px solid rgba(250, 204, 21, 0.65);
  outline-offset: 3px;
  border-radius: 4px;
}
/* ===== INPUT FOCUS GÖSTERGESİ TAMAMEN İPTAL =====
   Kullanıcı talebi: input'a tıklanınca çevresinde HİÇBİR görsel değişim olmasın
   (border-color, glow, outline, background tint — hepsi kapalı). */

input:focus,
input:focus-visible,
input:focus-within,
textarea:focus,
textarea:focus-visible,
textarea:focus-within,
select:focus,
select:focus-visible {
  outline: none !important;
  box-shadow: none !important;
}

/* Wrapper class'larının focus-within state'i — border/bg/shadow değişmesin */
.err-search:focus-within,
.form-field:focus-within,
.form-field input:focus,
.form-field input:focus-visible,
.form-field select:focus,
.form-field textarea:focus,
.apex-field__wrap:focus-within,
.reg-field__wrap:focus-within,
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus,
.admin-card-form input:focus,
.admin-card-form textarea:focus,
.admin-card-form select:focus,
.card-form input:focus,
.bank-modal__otp-inputs input:focus,
.apex-wiki-search input:focus,
.wiki-hero-search input:focus,
.admin-topbar__search input:focus {
  outline: none !important;
  box-shadow: none !important;
  border-color: inherit !important;
  background: inherit !important;
}

/* Wrapper içindeki icon rengi de değişmesin */
.apex-field__wrap:focus-within i,
.apex-field__wrap:focus-within .apex-field__icon,
.reg-field__wrap:focus-within i,
.reg-field__wrap:focus-within .reg-field__ic,
.form-field:focus-within i {
  color: inherit !important;
}

/* ===== REDUCED MOTION ===== */
@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  [data-reveal] {
    opacity: 1 !important;
    transform: none !important;
  }
  .hover-lift:hover,
  .hover-scale:hover,
  .auth-btn.glass-mini.icon-btn:hover {
    transform: none !important;
  }
  .float-anim {
    animation: none !important;
  }
}
