/* ============================================================
   FERNEX MEDIA — Ortak hareket katmani (17.11.2026)
   Cagri: <link rel="stylesheet" href="/fernex-motion.css?v=1">
          <script src="/fernex-motion.js?v=1" defer></script>

   KURALLAR
   - Her sey yalniz "html.fxm" altinda calisir; bu sinifi JS ekler.
     JS yuklenmezse veya "hareketi azalt" aciksa HICBIR SEY gizlenmez.
   - Yalniz opacity / translate / scale canlandirilir (GPU dostu).
   - Mevcut "transform" hover efektleriyle cakismamak icin "translate"
     ve "scale" ozellikleri kullanilir.
   ============================================================ */

/* ---------- 1) Kaydirinca belirme ---------- */
.fxm .fxm-r{
  opacity:0; translate:0 30px;
  transition:opacity .85s cubic-bezier(.16,1,.3,1), translate .85s cubic-bezier(.16,1,.3,1), scale .85s cubic-bezier(.16,1,.3,1), filter .85s ease;
  transition-delay:calc(var(--fxi,0) * 75ms);
  will-change:opacity, translate;
}
.fxm .fxm-r.fxm-card-r{ scale:.965; }
.fxm .fxm-r.fxm-head-r{ translate:0 22px; filter:blur(6px); }
.fxm .fxm-r.fxm-left-r{ translate:-34px 0; }
.fxm .fxm-r.fxm-in{ opacity:1; translate:0 0; scale:1; filter:none; }

/* ---------- 2) Baslik: kelime kelime acilis ---------- */
.fxm .fxm-w{ display:inline-block; opacity:0; translate:0 .55em; rotate:2.5deg;
  animation:fxmWord .8s cubic-bezier(.16,1,.3,1) forwards; animation-delay:calc(var(--fxi,0) * 70ms + 120ms); }
@keyframes fxmWord{ to{ opacity:1; translate:0 0; rotate:0deg; } }

/* ---------- 3) Vurgulu kelimelerde akan renk ---------- */
.fxm .it{
  background:linear-gradient(100deg,#3ba6e7 0%,#8af0ff 28%,#69b9f5 50%,#3ba6e7 72%,#8af0ff 100%);
  background-size:220% 100%;
  -webkit-background-clip:text; background-clip:text;
  -webkit-text-fill-color:transparent; color:transparent;
  animation:fxmShine 7s linear infinite;
}
@keyframes fxmShine{ to{ background-position:-220% 0; } }
/* Baslik icindeki vurgulu kelime: hem acilis hem akan renk */
.fxm .it.fxm-w{ animation:fxmWord .8s cubic-bezier(.16,1,.3,1) forwards, fxmShine 7s linear infinite; animation-delay:calc(var(--fxi,0) * 70ms + 120ms), 0s; }

/* ---------- 4) Kartlarda imleci izleyen isik ----------
   DOM'a eleman eklenmez; yalniz arka plan gorseli katmani kullanilir
   (JS, zaten arka plan gorseli olan kartlara bu sinifi vermez). */
@property --fxo{ syntax:'<number>'; inherits:false; initial-value:0; }
.fxm .fxm-card{
  --fxo:0;
  background-image:radial-gradient(360px circle at var(--fxx,50%) var(--fxy,50%), rgb(105 185 245 / calc(.17 * var(--fxo))), rgb(59 166 231 / calc(.05 * var(--fxo))) 42%, transparent 68%);
  transition-property:--fxo, border-color, transform, box-shadow, background-color;
  transition-duration:.35s;
}
.fxm .fxm-card:hover{ --fxo:1; }

/* ---------- 5) Miknatis butonlar ---------- */
.fxm .fxm-mag{ transition:translate .35s cubic-bezier(.16,1,.3,1); }
.fxm .fxm-mag.fxm-mag-on{ transition:translate .08s linear; }

/* ---------- 6) Ust ilerleme cubugu (ana sayfada zaten var) ---------- */
.fxm-prog{ position:fixed; top:0; left:0; height:2px; width:100%; z-index:90; pointer-events:none;
  transform-origin:0 50%; transform:scaleX(0);
  background:linear-gradient(90deg,#3ba6e7,#8af0ff); box-shadow:0 0 12px rgba(59,166,231,.7); }

/* ---------- 7) Kaydirmaya bagli gorsel hareketi (destekleyen tarayicilarda) ---------- */
@supports (animation-timeline: view()){
  .fxm .cs-cover img, .fxm .bc-cover img, .fxm .team-photo img{
    animation:fxmZoom linear both; animation-timeline:view(); animation-range:entry 0% cover 55%;
  }
  @keyframes fxmZoom{ from{ scale:1.14; } to{ scale:1; } }
}

/* ---------- 8) Rakam sayaci: sayarken genislik oynamasin ---------- */
.fxm .fxm-num{ font-variant-numeric:tabular-nums; }

/* ---------- 9) Sayfalar arasi yumusak gecis ---------- */
@media (prefers-reduced-motion:no-preference){
  @view-transition{ navigation:auto; }
  ::view-transition-old(root){ animation:fxmOut .22s ease both; }
  ::view-transition-new(root){ animation:fxmInPage .38s cubic-bezier(.16,1,.3,1) both; }
  @keyframes fxmOut{ to{ opacity:0; } }
  @keyframes fxmInPage{ from{ opacity:0; translate:0 14px; } }
}

/* ---------- Guvenlik: hareket istemeyenlerde her sey kapali ---------- */
@media (prefers-reduced-motion:reduce){
  .fxm .fxm-r, .fxm .fxm-w{ opacity:1!important; translate:none!important; scale:none!important; rotate:none!important; filter:none!important; animation:none!important; transition:none!important; }
  .fxm .it{ animation:none; }
  .fxm-prog{ display:none; }
}
