/* ======================================================
   CineShelf · animations.css
   Relats-inspired scroll & hover animations
   ====================================================== */

:root {
  --anim-fast: 0.4s;
  --anim-base: 0.8s;
  --anim-slow: 1.2s;
  --ease-out: cubic-bezier(0.16, 1, 0.3, 1);
  --ease-smooth: cubic-bezier(0.65, 0, 0.35, 1);
}

/* Lenis kütüphanesi html.lenis-scrolling sınıfı bekler */
html.lenis,
html.lenis body { height: auto; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ─────────────────────────────────────────────────────
   SCROLL REVEAL — Base
   ───────────────────────────────────────────────────── */
[data-reveal] {
  opacity: 0;
  transition:
    opacity var(--anim-base) var(--ease-out),
    transform var(--anim-base) var(--ease-out),
    filter var(--anim-base) var(--ease-out);
  will-change: transform, opacity;
}

[data-reveal="fade-up"]    { transform: translate3d(0, 40px, 0); }
[data-reveal="fade-down"]  { transform: translate3d(0, -40px, 0); }
[data-reveal="fade-left"]  { transform: translate3d(-40px, 0, 0); }
[data-reveal="fade-right"] { transform: translate3d(40px, 0, 0); }
[data-reveal="scale"]      { transform: scale(0.92); }
[data-reveal="blur"]       { filter: blur(12px); transform: translate3d(0, 24px, 0); }

[data-reveal].is-visible {
  opacity: 1;
  transform: translate3d(0, 0, 0) scale(1);
  filter: blur(0);
}

/* Stagger children — applied via JS */
[data-stagger] > * {
  opacity: 0;
  transform: translate3d(0, 30px, 0);
  transition:
    opacity 0.7s var(--ease-out),
    transform 0.7s var(--ease-out);
}
[data-stagger].is-visible > * {
  opacity: 1;
  transform: translate3d(0, 0, 0);
}

/* ─────────────────────────────────────────────────────
   SCROLL PROGRESS BAR (top of page)
   ───────────────────────────────────────────────────── */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 2px;
  width: 0%;
  background: linear-gradient(90deg, #D4AF37 0%, #F4E5C2 50%, #D4AF37 100%);
  z-index: 9999;
  pointer-events: none;
  transform-origin: left center;
  box-shadow: 0 0 12px rgba(212,175,55,0.6);
  transition: width 0.1s linear;
}

/* ─────────────────────────────────────────────────────
   MAGNETIC HOVER (buttons)
   ───────────────────────────────────────────────────── */
.magnetic,
.btn-primary,
.btn-outline,
.btn-lg {
  transition:
    transform 0.4s var(--ease-out),
    background-color 0.25s ease,
    box-shadow 0.3s ease,
    border-color 0.3s ease;
  will-change: transform;
}

/* ─────────────────────────────────────────────────────
   PAGE TRANSITION OVERLAY
   ───────────────────────────────────────────────────── */
.page-transition-overlay {
  position: fixed;
  inset: 0;
  z-index: 99999;
  pointer-events: none;
  background: #060608;
  transform: translateY(100%);
  transition: transform 0.6s var(--ease-smooth);
}
.page-transition-overlay.is-entering {
  transform: translateY(0);
  pointer-events: all;
}
.page-transition-overlay.is-leaving {
  transform: translateY(-100%);
}

/* ─────────────────────────────────────────────────────
   COUNTER (animated numbers)
   ───────────────────────────────────────────────────── */
[data-counter] {
  display: inline-block;
  font-variant-numeric: tabular-nums;
}

/* ─────────────────────────────────────────────────────
   CURSOR FOLLOWER (subtle dot, desktop only)
   ───────────────────────────────────────────────────── */
.cursor-follow {
  position: fixed;
  top: 0; left: 0;
  width: 14px; height: 14px;
  border: 1.5px solid rgba(212,175,55,0.6);
  border-radius: 50%;
  pointer-events: none;
  z-index: 99998;
  transform: translate(-50%, -50%);
  transition: transform 0.15s var(--ease-out), opacity 0.25s ease, width 0.2s, height 0.2s, background-color 0.2s;
  mix-blend-mode: difference;
  opacity: 0;
}
.cursor-follow.is-active { opacity: 1; }
.cursor-follow.is-hover {
  width: 40px; height: 40px;
  background: rgba(212,175,55,0.15);
  border-color: rgba(212,175,55,0.9);
}

@media (hover: none), (pointer: coarse) {
  .cursor-follow { display: none !important; }
}

/* ─────────────────────────────────────────────────────
   HERO MOUSE PARALLAX — small drift effect
   ───────────────────────────────────────────────────── */
[data-parallax] {
  transition: transform 0.5s var(--ease-out);
  will-change: transform;
}

/* ─────────────────────────────────────────────────────
   FADE-IN ON LOAD (for above-the-fold content)
   ───────────────────────────────────────────────────── */
.fade-in-on-load {
  opacity: 0;
  animation: fadeInOnLoad 1s var(--ease-out) 0.1s forwards;
}
@keyframes fadeInOnLoad {
  from { opacity: 0; transform: translate3d(0, 20px, 0); }
  to   { opacity: 1; transform: translate3d(0, 0, 0); }
}

/* ─────────────────────────────────────────────────────
   GLOBAL FIXES — Faz 3
   ───────────────────────────────────────────────────── */

/* Logo: sadece görsel kullansın, yan yana metin gizlensin
   (logo image'da zaten "CINESHELF" yazısı var) */
.navbar .logo .logo-text,
.navbar .logo .logo-text-fallback,
.navbar .logo > span:not(.logo-slogan) {
  display: none !important;
}

/* Arkadaşımla İzle modalı açıkken sayfanın geri kalanı gizlensin
   (AI chat container modal arkasından sızıyordu) */
body.friend-modal-open > *:not(#friendWatchPopup):not(.intro-splash):not(.page-transition-overlay):not(.cursor-follow):not(.scroll-progress) {
  visibility: hidden !important;
}
body.friend-modal-open #friendWatchPopup {
  visibility: visible !important;
}

/* ═══════════════════════════════════════════════════════
   FAZ 3 POLISH — Page-specific enhancements
   ═══════════════════════════════════════════════════════ */

/* ─── FAQ Accordion (sss.html) ──────────────────────── */
/* Existing styles.css uses max-height — we just smooth & polish it */
.faq-item .faq-answer {
  transition: max-height 0.55s var(--ease-out) !important;
}
.faq-item.active .faq-answer {
  max-height: 1200px !important; /* enough for long answers */
}
.faq-item .faq-question {
  cursor: pointer;
  transition: background-color 0.25s ease, padding 0.3s ease;
}
.faq-item .faq-question:hover {
  background: rgba(212,175,55,0.04);
}
.faq-item .faq-question i.fa-chevron-down {
  transition: transform 0.4s var(--ease-out);
}
.faq-item.active .faq-question i.fa-chevron-down {
  transform: rotate(180deg);
  color: var(--gold, #D4AF37);
}
.faq-item {
  transition: border-color 0.3s ease, background 0.3s ease, box-shadow 0.3s ease;
}
.faq-item.active {
  border-color: rgba(212,175,55,0.25) !important;
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
}
.faq-category-btn {
  transition: transform 0.25s var(--ease-out), background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease;
}
.faq-category-btn:hover {
  transform: translateY(-2px);
}

/* ─── 404 Page Polish ────────────────────────────────── */
.error-illustration {
  display: inline-block;
  animation: error-float 3.5s ease-in-out infinite;
  filter: drop-shadow(0 8px 24px rgba(212,175,55,0.25));
  transition: transform 0.3s var(--ease-out);
}
.error-illustration:hover {
  animation-play-state: paused;
  transform: scale(1.15) rotate(-8deg);
}
@keyframes error-float {
  0%, 100% { transform: translateY(0) rotate(0deg); }
  50% { transform: translateY(-12px) rotate(3deg); }
}
.error-code {
  background: linear-gradient(135deg, #D4AF37 0%, #F4E5C2 50%, #D4AF37 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  animation: error-shimmer 4s linear infinite;
}
@keyframes error-shimmer {
  to { background-position: 200% 0; }
}
.error-buttons a, .suggestion-links a {
  transition: transform 0.3s var(--ease-out), background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.3s ease;
}
.suggestion-links a:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 20px rgba(212,175,55,0.18);
}

/* ─── Auth Forms (giris.html / kayit.html) ───────────── */
.input-wrapper {
  position: relative;
  transition: transform 0.2s var(--ease-out);
}
.form-group:focus-within .input-wrapper {
  transform: translateX(2px);
}
.input-wrapper .form-control {
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.3s ease;
}
.input-wrapper .form-control:focus {
  border-color: rgba(212,175,55,0.55) !important;
  box-shadow:
    0 0 0 4px rgba(212,175,55,0.10),
    0 8px 20px rgba(0,0,0,0.25);
  outline: none;
}
.input-wrapper .input-icon {
  transition: color 0.25s ease, transform 0.25s var(--ease-out);
}
.form-group:focus-within .input-wrapper .input-icon {
  color: var(--gold, #D4AF37) !important;
  transform: scale(1.15);
}
.form-group label {
  transition: color 0.25s ease;
}
.form-group:focus-within label {
  color: var(--gold, #D4AF37);
}

/* Password strength bars (kayit.html) — smooth color/width */
#password-strength .strength-bar {
  transition: background-color 0.35s ease, box-shadow 0.35s ease;
}
.strength-bar.weak { background: linear-gradient(90deg, #ef4444, #f87171) !important; }
.strength-bar.fair { background: linear-gradient(90deg, #f59e0b, #fbbf24) !important; }
.strength-bar.good { background: linear-gradient(90deg, #84cc16, #a3e635) !important; }
.strength-bar.strong {
  background: linear-gradient(90deg, #22c55e, #4ade80) !important;
  box-shadow: 0 0 8px rgba(34,197,94,0.4);
}

/* Auth submit button polish (sign-in / sign-up) */
.auth-form button[type="submit"],
.auth-form .btn-primary {
  position: relative;
  overflow: hidden;
}
.auth-form button[type="submit"]::after {
  content: '';
  position: absolute;
  top: 50%; left: 50%;
  width: 6px; height: 6px;
  background: rgba(255,255,255,0.45);
  border-radius: 50%;
  transform: translate(-50%, -50%) scale(0);
  pointer-events: none;
}
.auth-form button[type="submit"]:active::after {
  animation: ripple 0.5s ease-out;
}
@keyframes ripple {
  to { transform: translate(-50%, -50%) scale(40); opacity: 0; }
}

/* ─── Contact Form (iletisim.html) ───────────────────── */
.submit-btn {
  position: relative;
  overflow: hidden;
  transition: transform 0.3s var(--ease-out), box-shadow 0.3s ease, background-color 0.25s ease;
}
.submit-btn:not(:disabled):hover {
  transform: translateY(-2px);
  box-shadow: 0 10px 24px rgba(212,175,55,0.3);
}
#formMessage {
  transition: opacity 0.4s ease, transform 0.4s var(--ease-out);
}
#formMessage.is-shown {
  animation: form-msg-pop 0.5s var(--ease-out);
}
@keyframes form-msg-pop {
  from { opacity: 0; transform: translateY(-12px) scale(0.95); }
  to { opacity: 1; transform: translateY(0) scale(1); }
}
.form-group input,
.form-group textarea,
.form-group select {
  transition: border-color 0.25s ease, background-color 0.25s ease, box-shadow 0.3s ease;
}
.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
  border-color: rgba(212,175,55,0.5) !important;
  box-shadow: 0 0 0 3px rgba(212,175,55,0.08);
}

/* ─── 3D Tilt (opt-in only via [data-tilt]) ─────────── */
/* NOT applied to .movie-card by default — it breaks the hero card stack layout */
[data-tilt] {
  transform-style: preserve-3d;
  perspective: 1000px;
  transition: transform 0.4s var(--ease-out);
  will-change: transform;
}

/* ─── Hero Text Reveal (index.html h1) ───────────────── */
/* SAFE: span'lerin DEFAULT halinde görünür kalsın, sadece animasyon enhancement */
.split-line {
  display: inline-block;
  vertical-align: top;
}
.split-line > span {
  display: inline-block;
  /* DEFAULT visible — animasyon body.split-ready ile aktif olur */
}
/* Sadece animations.js başarıyla split kurduğunda gizli başla */
body.split-ready .split-line {
  overflow: hidden;
}
body.split-ready .split-line > span {
  transform: translate3d(0, 110%, 0);
  opacity: 0;
  transition:
    transform 0.85s var(--ease-out),
    opacity 0.55s ease;
}
body.split-ready .split-line.is-revealed > span {
  transform: translate3d(0, 0, 0);
  opacity: 1;
}

/* ─── About Page Polish (hakkimizda.html) ────────────── */
.story-section p,
.feature-block,
.team-card,
.tech-card,
.value-card {
  transition: transform 0.35s var(--ease-out), border-color 0.3s ease, box-shadow 0.3s ease;
}
.feature-block:hover,
.tech-card:hover,
.value-card:hover {
  transform: translateY(-4px);
  border-color: rgba(212,175,55,0.25);
  box-shadow: 0 12px 28px rgba(0,0,0,0.3);
}

/* ─── Footer: Sirius Dijital credit ──────────────────── */
.footer-credit {
  font-size: 0.7rem;
  color: rgba(255,255,255,0.22);
  margin-top: 10px;
  letter-spacing: 0.04em;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
}
.footer-credit::before,
.footer-credit::after {
  content: '';
  width: 24px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}
.footer-credit a.sirius-link {
  color: rgba(255,255,255,0.45);
  font-weight: 700;
  letter-spacing: 0.05em;
  text-decoration: none;
  background: linear-gradient(135deg, #4FA8FF 0%, #B8D4FF 50%, #4FA8FF 100%);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  background-size: 200% 100%;
  transition: filter 0.35s ease, transform 0.3s var(--ease-out, ease);
  display: inline-block;
}
.footer-credit a.sirius-link:hover {
  filter: drop-shadow(0 0 8px rgba(79,168,255,0.55)) brightness(1.2);
  transform: translateY(-1px);
  animation: sirius-shimmer 2.5s linear infinite;
}
@keyframes sirius-shimmer {
  to { background-position: 200% 0; }
}

/* ─── Mobile FAQ tightening ──────────────────────────── */
@media (max-width: 640px) {
  .faq-item .faq-answer { transition-duration: 0.35s; }
  .error-illustration { font-size: clamp(4rem, 18vw, 7rem) !important; }
}

/* ─────────────────────────────────────────────────────
   INTRO SPLASH (first visit, home page only)
   ───────────────────────────────────────────────────── */
.intro-splash {
  position: fixed;
  inset: 0;
  z-index: 100000;
  background: #060608;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 18px;
  overflow: hidden;
  transition: transform 0.9s var(--ease-smooth), opacity 0.5s ease 0.4s;
  will-change: transform, opacity;
}
.intro-splash::before {
  /* Subtle radial glow behind logo */
  content: '';
  position: absolute;
  width: 600px; height: 600px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(212,175,55,0.18) 0%, transparent 60%);
  filter: blur(40px);
  opacity: 0;
  animation: intro-glow 1.6s var(--ease-out) 0.1s forwards;
  pointer-events: none;
}
.intro-splash.is-hiding {
  transform: translateY(-100%);
  opacity: 0;
}

.intro-splash-logo {
  display: flex;
  align-items: center;
  justify-content: center;
  opacity: 0;
  transform: translate3d(0, 24px, 0) scale(0.92);
  animation: intro-fade-up 1s var(--ease-out) 0.25s forwards;
  position: relative;
  z-index: 2;
}
.intro-splash-logo img {
  width: auto;
  height: clamp(56px, 9vw, 88px);
  max-width: 80vw;
  object-fit: contain;
  filter: drop-shadow(0 6px 24px rgba(212,175,55,0.4));
}

.intro-splash-tagline {
  font-size: clamp(0.9rem, 2vw, 1.05rem);
  color: rgba(255,255,255,0.55);
  font-weight: 500;
  letter-spacing: 0.06em;
  opacity: 0;
  transform: translate3d(0, 16px, 0);
  animation: intro-fade-up 0.9s var(--ease-out) 0.55s forwards;
  position: relative;
  z-index: 2;
}

.intro-splash-bar {
  position: absolute;
  bottom: 40px;
  left: 50%;
  transform: translateX(-50%);
  width: 120px;
  height: 2px;
  background: rgba(255,255,255,0.08);
  border-radius: 4px;
  overflow: hidden;
  opacity: 0;
  animation: intro-fade-up 0.6s ease 0.8s forwards;
}
.intro-splash-bar::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, #D4AF37, transparent);
  transform: translateX(-100%);
  animation: intro-bar-shimmer 1.6s ease 1s forwards;
}

@keyframes intro-fade-up {
  to { opacity: 1; transform: translate3d(0, 0, 0) scale(1); }
}
@keyframes intro-glow {
  to { opacity: 1; }
}
@keyframes intro-bar-shimmer {
  to { transform: translateX(100%); }
}

/* Prevent body scroll while splash is showing */
body.intro-splash-active {
  overflow: hidden;
}

/* ─────────────────────────────────────────────────────
   REDUCED MOTION RESPECT
   ───────────────────────────────────────────────────── */
@media (prefers-reduced-motion: reduce) {
  [data-reveal],
  [data-stagger] > *,
  .magnetic,
  .btn-primary,
  .btn-outline,
  .page-transition-overlay,
  [data-parallax],
  .fade-in-on-load,
  .intro-splash-logo,
  .intro-splash-tagline,
  .intro-splash-bar {
    opacity: 1 !important;
    transform: none !important;
    filter: none !important;
    animation: none !important;
    transition: none !important;
  }
  .cursor-follow,
  .scroll-progress,
  .intro-splash { display: none !important; }
}

/* ─────────────────────────────────────────────────────
   MOBILE — disable heavy effects
   ───────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .cursor-follow { display: none !important; }
  [data-reveal] { transition-duration: 0.5s; }

  /* Splash mobilde daha kısa süre + daha hafif glow */
  .intro-splash::before {
    width: 360px; height: 360px;
    filter: blur(20px);
  }
  .intro-splash-logo {
    animation-duration: 0.7s;
    animation-delay: 0.15s;
  }
  .intro-splash-tagline {
    animation-duration: 0.6s;
    animation-delay: 0.35s;
  }
  .intro-splash-bar {
    animation-delay: 0.5s;
  }
  .intro-splash {
    transition-duration: 0.6s;
  }

  /* Orb blur mobilde GPU bombası — küçült */
  .orb {
    filter: blur(60px) !important;
    opacity: 0.15 !important;
  }
  .orb-1, .orb-2, .orb-3 {
    width: 280px !important;
    height: 280px !important;
  }

  /* Navbar backdrop-filter mobilde pahalı */
  .navbar {
    backdrop-filter: blur(10px) !important;
    -webkit-backdrop-filter: blur(10px) !important;
  }
}
