/* ===========================
   ANİMASYONLAR
   =========================== */

/* ─── Page Transition ─── */
.page-transition {
  position: fixed; inset: 0;
  background: var(--accent);
  z-index: 9999;
  transform: scaleY(0);
  transform-origin: bottom;
  pointer-events: none;
  transition: transform 0.45s cubic-bezier(0.76,0,0.24,1);
}
.page-transition.enter { transform: scaleY(1); transform-origin: bottom; }
.page-transition.exit { transform: scaleY(0); transform-origin: top; }

/* ─── Typing cursor ─── */
.typing-cursor { display: inline-block; width: 3px; height: 1em; background: var(--accent); margin-left: 4px; vertical-align: middle; animation: blink 0.8s step-end infinite; }
@keyframes blink { 0%,100%{opacity:1} 50%{opacity:0} }

/* ─── Shimmer loading ─── */
.shimmer { background: linear-gradient(90deg, rgba(255,255,255,0.04) 25%, rgba(255,255,255,0.08) 50%, rgba(255,255,255,0.04) 75%); background-size: 200% 100%; animation: shimmer 1.5s infinite; }
@keyframes shimmer { 0%{background-position:200% 0} 100%{background-position:-200% 0} }

/* ─── Pulse ring ─── */
.pulse-ring { position: relative; display: inline-flex; }
.pulse-ring::before {
  content: '';
  position: absolute; inset: -6px;
  border-radius: 50%;
  background: rgba(245,197,24,0.3);
  animation: pulse-ring 2s cubic-bezier(0.4,0,0.6,1) infinite;
}
@keyframes pulse-ring { 0%,100%{transform:scale(1);opacity:0.7} 50%{transform:scale(1.15);opacity:0} }

/* ─── Scroll reveal keyframes ─── */
@keyframes fadeInUp { from{opacity:0;transform:translateY(30px)} to{opacity:1;transform:translateY(0)} }
@keyframes fadeInLeft { from{opacity:0;transform:translateX(-30px)} to{opacity:1;transform:translateX(0)} }
@keyframes fadeInRight { from{opacity:0;transform:translateX(30px)} to{opacity:1;transform:translateX(0)} }
@keyframes scaleIn { from{opacity:0;transform:scale(0.9)} to{opacity:1;transform:scale(1)} }

/* ─── Hero particle dots ─── */
.hero-dots { position: absolute; inset: 0; overflow: hidden; pointer-events: none; }
.hero-dot {
  position: absolute;
  width: 3px; height: 3px;
  background: var(--accent);
  border-radius: 50%;
  opacity: 0;
  animation: dot-float linear infinite;
}
@keyframes dot-float { 0%{opacity:0;transform:translateY(100vh)} 10%{opacity:0.6} 90%{opacity:0.6} 100%{opacity:0;transform:translateY(-100px)} }

/* ─── Gradient text animation ─── */
.gradient-text {
  background: linear-gradient(90deg, #f5c518, #fff, #f5c518);
  background-size: 200% 100%;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  animation: gradient-shift 4s linear infinite;
}
@keyframes gradient-shift { 0%{background-position:0% 50%} 100%{background-position:200% 50%} }

/* ─── Card hover glow ─── */
.card-glow { position: relative; overflow: hidden; }
.card-glow::before {
  content: '';
  position: absolute; width: 200px; height: 200px;
  background: radial-gradient(circle, rgba(245,197,24,0.15) 0%, transparent 70%);
  border-radius: 50%;
  opacity: 0; pointer-events: none;
  transition: opacity 0.3s;
  transform: translate(-50%, -50%);
}
.card-glow:hover::before { opacity: 1; }

/* ─── Number counter ─── */
.counter-animated { display: inline-block; }

/* ─── Hamburger animation ─── */
.hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.hamburger.open span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ─── Smooth underline links ─── */
.hover-underline { position: relative; display: inline-block; }
.hover-underline::after { content:''; position:absolute; width:0; height:2px; bottom:-2px; left:0; background:var(--accent); transition:width 0.3s ease; }
.hover-underline:hover::after { width: 100%; }

/* ─── Ripple effect on buttons ─── */
.ripple { position: relative; overflow: hidden; }
.ripple::after {
  content: '';
  position: absolute;
  width: 0; height: 0;
  background: rgba(255,255,255,0.2);
  border-radius: 50%;
  transform: translate(-50%, -50%);
  opacity: 1;
  transition: width 0.6s ease, height 0.6s ease, opacity 0.6s ease;
}
.ripple:active::after { width: 300px; height: 300px; opacity: 0; }

/* ─── Progress bar (reading) ─── */
#reading-progress {
  position: fixed; top: 0; left: 0;
  height: 3px; background: var(--gradient-accent);
  z-index: 10001; width: 0%;
  transition: width 0.1s linear;
}

/* ─── Smooth image reveal ─── */
.img-reveal { overflow: hidden; border-radius: var(--radius-md); }
.img-reveal img { transition: transform 0.8s cubic-bezier(0.4,0,0.2,1); }
.img-reveal:hover img { transform: scale(1.04); }

/* ─── Floating label form ─── */
.form-float { position: relative; }
.form-float input, .form-float textarea {
  padding-top: 20px;
}
.form-float label {
  position: absolute; top: 14px; left: 16px;
  font-size: 0.9rem; color: var(--gray-600);
  transition: var(--transition);
  pointer-events: none;
}
.form-float input:focus + label,
.form-float input:not(:placeholder-shown) + label,
.form-float textarea:focus + label,
.form-float textarea:not(:placeholder-shown) + label {
  top: 6px; font-size: 0.72rem; color: var(--accent);
}

/* ─── Scroll to top button ─── */
#scroll-top {
  position: fixed; bottom: 100px; right: 28px;
  width: 44px; height: 44px;
  background: var(--primary-light);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 50%;
  color: var(--white); font-size: 1rem;
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; z-index: 998;
  opacity: 0; transform: translateY(20px);
  transition: var(--transition);
}
#scroll-top.visible { opacity: 1; transform: translateY(0); }
#scroll-top:hover { background: var(--accent); color: var(--primary); border-color: var(--accent); }

/* ─── Toast notification ─── */
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%) translateY(100px);
  background: var(--gradient-card);
  border: 1px solid rgba(245,197,24,0.3);
  border-radius: var(--radius-xl);
  padding: 14px 24px;
  color: var(--white); font-size: 0.9rem;
  z-index: 10002;
  transition: transform 0.4s cubic-bezier(0.4,0,0.2,1);
  display: flex; align-items: center; gap: 10px;
}
.toast.show { transform: translateX(-50%) translateY(0); }
