/* animations.css — GRS Kumaşçılık × Newsprint */

/* ── Split Text Reveal (GSAP SplitText) ── */
.split-text .word,
.split-text .char {
  display: inline-block;
  overflow: hidden;
  vertical-align: top;
}

.reveal-word {
  transform: translateY(110%);
  opacity: 0;
}

.reveal-line {
  overflow: hidden;
}

/* ── Fade Up — hızlı ve mekanik ── */
.fade-up {
  opacity: 0;
  transform: translateY(32px);
}

.fade-up.in-view {
  opacity: 1;
  transform: none;
  transition: opacity 0.6s var(--ease-out-expo),
              transform 0.6s var(--ease-out-expo);
}

/* ── Fade In ── */
.fade-in {
  opacity: 0;
}

.fade-in.in-view {
  opacity: 1;
  transition: opacity 0.5s ease;
}

/* ── Mask Reveal — soldan sağa ── */
.mask-reveal {
  clip-path: inset(0 100% 0 0);
}

.mask-reveal.in-view {
  clip-path: inset(0 0% 0 0);
  transition: clip-path 0.9s var(--ease-out-expo);
}

/* ── Scale Reveal ── */
.scale-reveal {
  opacity: 0;
  transform: scale(0.96);
}

.scale-reveal.in-view {
  opacity: 1;
  transform: scale(1);
  transition: opacity 0.6s ease,
              transform 0.6s var(--ease-out-expo);
}

/* ── Gecikme sınıfları ── */
[data-delay="1"] { transition-delay: 0.08s; }
[data-delay="2"] { transition-delay: 0.16s; }
[data-delay="3"] { transition-delay: 0.24s; }
[data-delay="4"] { transition-delay: 0.32s; }
[data-delay="5"] { transition-delay: 0.4s; }

/* ── Sayfa Geçiş Örtüsü ── */
#page-transition {
  position: fixed;
  inset: 0;
  z-index: calc(var(--z-loader) - 1);
  pointer-events: none;
}

.transition-panel {
  position: absolute;
  inset: 0;
  background: var(--ink);
  transform: translateY(100%);
}

/* ── Sayaç animasyonu ── */
.counter-wrap {
  overflow: hidden;
}

/* ── Loader çizgi animasyonu ── */
@keyframes loader-draw {
  from {
    stroke-dashoffset: var(--path-length, 2000);
    opacity: 1;
  }
  80% {
    stroke-dashoffset: 0;
    opacity: 1;
  }
  to {
    stroke-dashoffset: 0;
    opacity: 0;
  }
}

@keyframes loader-fill {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ── Hard-shadow hover (newsprint kaldırma efekti) ── */
@keyframes hard-lift-in {
  to {
    box-shadow: 4px 4px 0px 0px var(--ink);
    transform: translate(-2px, -2px);
  }
}

/* ── Nokta titreşim efekti ── */
@keyframes dot-pulse {
  0%, 100% { transform: scaleX(1); }
  50%       { transform: scaleX(1.4); }
}

/* ── Marquee kaydırma ── */
@keyframes marquee-slide {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ── Scroll göstergesi damla ── */
@keyframes scroll-drop {
  to { top: 200%; }
}

/* ── Kumaş hareketleri (sayılar bölümü) ── */
@keyframes fabric-drift {
  from { transform: translate3d(-3%, 0, 0); }
  to { transform: translate3d(3%, 0, 0); }
}

@keyframes fabric-swell {
  0%, 100% { transform: translateY(0) scaleX(1); }
  50% { transform: translateY(-18px) scaleX(1.08); }
}

/* ── Spin (yükleme) ── */
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* ── Accordion — ızgara geçişi ── */
.accordion-content {
  display: grid;
  grid-rows: 0fr;
  overflow: hidden;
  transition: grid-template-rows 0.3s ease-in-out, opacity 0.3s ease;
  opacity: 0;
}

.accordion-content.open {
  grid-template-rows: 1fr;
  opacity: 1;
}

.accordion-content > * {
  overflow: hidden;
}

/* ── prefers-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;
  }

  .marquee-track {
    animation: none;
  }

  .scroll-line::after {
    animation: none;
  }

  .fade-up,
  .fade-in,
  .mask-reveal,
  .scale-reveal {
    opacity: 1;
    transform: none;
    clip-path: none;
    transition: none;
  }
}
