/* ==========================================================================
   etkilesim.css — fare etkileşimleri (ana sayfa, akademik bölüm, sanat ve performans)
   Sayfa <body data-etkilesim="..."> ile hangi etkileri istediğini söyler;
   davranış /assets/js/etkilesim.js içinde. Hareket azaltma tercihinde hepsi kapalı.
     iz/krono: imlecin arkasında sıvı kuyruk (tuval)
     glitch  : başlıklarda dilim + renk kanalı ayrışması, hızlı savuruşta sarsıntı
     ters-top: fareyi izleyen, içini ters renge çeviren top
   ========================================================================== */

.etki-tuval {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
}

body[data-etkilesim] main:not(.sahne) {
  position: relative;
  z-index: 1;
}

/* ana sayfa: iz, tam ekran ebru sahnesinin üstünde (tıklamaları engellemez) */
body:has(.sahne) .etki-tuval {
  z-index: 2;
}

/* --- glitch ------------------------------------------------------------ */

.etki-glitch h2 {
  position: relative;
}

.etki-glitch h2.etki-g::before,
.etki-glitch h2.etki-g::after {
  content: attr(data-metin);
  position: absolute;
  left: 0;
  top: 0;
  width: 100%;
  pointer-events: none;
}

.etki-glitch h2.etki-g::before {
  color: var(--renk-sanat);
  transform: translateX(-3px);
  animation: etki-dilim-1 0.35s steps(3) 1;
}

.etki-glitch h2.etki-g::after {
  color: var(--renk-performans);
  transform: translateX(3px);
  animation: etki-dilim-2 0.35s steps(3) 1;
}

@keyframes etki-dilim-1 {
  0%   { clip-path: inset(10% 0 70% 0); }
  33%  { clip-path: inset(55% 0 20% 0); }
  66%  { clip-path: inset(30% 0 45% 0); }
  100% { clip-path: inset(80% 0 5% 0); }
}

@keyframes etki-dilim-2 {
  0%   { clip-path: inset(65% 0 10% 0); }
  33%  { clip-path: inset(15% 0 60% 0); }
  66%  { clip-path: inset(40% 0 35% 0); }
  100% { clip-path: inset(5% 0 80% 0); }
}

main.etki-sars {
  animation: etki-sars 0.2s steps(2) 1;
}

@keyframes etki-sars {
  0% {
    transform: translateX(-4px);
    text-shadow: -2px 0 color-mix(in srgb, var(--renk-sanat) 75%, transparent),
                  2px 0 color-mix(in srgb, var(--renk-performans) 75%, transparent);
  }
  50% {
    transform: translateX(3px);
    text-shadow:  2px 0 color-mix(in srgb, var(--renk-sanat) 75%, transparent),
                 -2px 0 color-mix(in srgb, var(--renk-performans) 75%, transparent);
  }
  100% { transform: none; text-shadow: none; }
}

/* --- ters renk top ----------------------------------------------------- */

.etki-top {
  position: fixed;
  left: 0;
  top: 0;
  width: 110px;
  height: 110px;
  margin: -55px 0 0 -55px;
  border-radius: 50%;
  background: var(--beyaz);
  mix-blend-mode: difference;
  pointer-events: none;
  z-index: 30;
  opacity: 0;
  transition: opacity 0.25s;
  will-change: transform;
}

.etki-top.acik {
  opacity: 1;
}

@media (prefers-reduced-motion: reduce) {
  .etki-tuval,
  .etki-top {
    display: none;
  }
  main.etki-sars,
  .etki-glitch h2.etki-g::before,
  .etki-glitch h2.etki-g::after {
    animation: none;
  }
}

@media print {
  .etki-tuval {
    display: none;
  }
}
