/* ==========================================================================
   KESİT Mimarlık — animations.css
   Keyframes, initial states for GSAP-driven reveals, reduced-motion rules.
   ========================================================================== */

@keyframes scrollLine {
  0%   { transform: translateY(-100%); }
  50%  { transform: translateY(0); }
  100% { transform: translateY(100%); }
}

@keyframes loaderLine {
  0%   { transform: scaleX(0); transform-origin: left; }
  50%  { transform: scaleX(1); transform-origin: left; }
  51%  { transform-origin: right; }
  100% { transform: scaleX(0); transform-origin: right; }
}

@keyframes pulse {
  0%   { transform: scale(0.4); opacity: 0.9; }
  100% { transform: scale(1.4); opacity: 0; }
}

@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

@keyframes fadeIn {
  from { opacity: 0; }
  to   { opacity: 1; }
}

/* ---- Initial states (only when JS is running) ------------------------ */

html.js [data-reveal] {
  opacity: 0;
  transform: translateY(2.5rem);
  will-change: transform, opacity;
}

html.js [data-reveal="fade"] {
  transform: none;
}

html.js [data-clip] {
  clip-path: inset(100% 0 0 0);
  will-change: clip-path;
}

html.js [data-clip="left"] {
  clip-path: inset(0 100% 0 0);
}

html.js [data-clip] img {
  transform: scale(1.18);
  will-change: transform;
}

html.js [data-split] {
  visibility: hidden;
}

html.js [data-split].is-split {
  visibility: visible;
}

html.js .hero__eyebrow,
html.js .hero__lead,
html.js .hero__cta,
html.js .hero__meta {
  opacity: 0;
}

html.js .hero__slide.is-active img {
  transform: scale(1.18);
}

/* Split text */

.split-line {
  display: block;
  overflow: hidden;
  padding-bottom: 0.08em;
  margin-bottom: -0.08em;
}

.split-word {
  display: inline-block;
  will-change: transform;
}

.split-line > .split-inner {
  display: block;
}

/* Line draw helper */

html.js [data-line] {
  transform: scaleX(0);
  transform-origin: left;
}

/* Counter */

[data-counter] {
  font-variant-numeric: tabular-nums;
}

/* Animations done — release will-change hints */

.is-revealed {
  will-change: auto;
}

/* ---- Reduced motion ---------------------------------------------------- */

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
  }

  html.js [data-reveal],
  html.js [data-clip],
  html.js [data-line],
  html.js .hero__eyebrow,
  html.js .hero__lead,
  html.js .hero__cta,
  html.js .hero__meta {
    opacity: 1;
    transform: none;
    clip-path: none;
  }

  html.js [data-clip] img,
  html.js .hero__slide.is-active img {
    transform: none;
  }

  html.js [data-split] {
    visibility: visible;
  }

  .hero__scene,
  .marquee__track {
    animation: none;
  }

  .scroll-indicator i::after {
    animation: none;
    transform: none;
  }

  .cursor {
    display: none;
  }
}

/* Release line masks once the reveal has played (allows natural re-wrap) */
.is-done .split-line {
  overflow: visible;
}
