/* Ortak bolum animasyonu (corporate::partials.section-anim). Betik <html>'e ct-sa-on + sa-a-{bolum} + sa-i-{icerik}
   siniflarini, bolumlere data-sa-r, ogelere data-sa-i ekler. Bekleyen oge animasyonun ilk karesinde durdurulur
   (sa-wait = paused), gorunur alana girince ayni animasyon oynar (sa-in) ve bitince sinif kaldirilir. Donusumler
   bireysel ozelliklerle (translate / scale) yapilir; temanin kendi transform'u bozulmaz. */

.ct-sa-on {
    --sa-ease: cubic-bezier(.16, 1, .3, 1);
    --sa-root-dur: .95s;
    --sa-item-dur: .8s;
}

.ct-sa-on [data-sa-r].sa-wait,
.ct-sa-on [data-sa-r].sa-in {
    animation-duration: calc(var(--sa-root-dur) * var(--sa-speed, 1));
    animation-timing-function: var(--sa-ease);
    animation-fill-mode: backwards;
}

.ct-sa-on [data-sa-i].sa-wait,
.ct-sa-on [data-sa-i].sa-in {
    animation-duration: calc(var(--sa-item-dur) * var(--sa-speed, 1));
    animation-timing-function: var(--sa-ease);
    animation-delay: var(--sa-d, 0ms);
    animation-fill-mode: backwards;
}

.ct-sa-on .sa-wait { animation-play-state: paused; }
.ct-sa-on .sa-in { animation-play-state: running; }

/* ---- Bolum ---- */
.sa-a-fade [data-sa-r].sa-wait, .sa-a-fade [data-sa-r].sa-in { animation-name: ct-sa-fade; }
.sa-a-rise [data-sa-r].sa-wait, .sa-a-rise [data-sa-r].sa-in { animation-name: ct-sa-rise; }
.sa-a-slide [data-sa-r].sa-wait, .sa-a-slide [data-sa-r].sa-in { animation-name: ct-sa-slide; }
.sa-a-zoom [data-sa-r].sa-wait, .sa-a-zoom [data-sa-r].sa-in { animation-name: ct-sa-zoom; }
.sa-a-blur [data-sa-r].sa-wait, .sa-a-blur [data-sa-r].sa-in { animation-name: ct-sa-blur; }
.sa-a-tilt [data-sa-r].sa-wait, .sa-a-tilt [data-sa-r].sa-in { animation-name: ct-sa-tilt; transform-origin: 50% 0; }
.sa-a-unfold [data-sa-r].sa-wait, .sa-a-unfold [data-sa-r].sa-in { animation-name: ct-sa-unfold; transform-origin: 50% 0; animation-timing-function: cubic-bezier(.34, 1.3, .5, 1); }
.sa-a-curtain [data-sa-r].sa-wait, .sa-a-curtain [data-sa-r].sa-in { animation-name: ct-sa-curtain; animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
.sa-a-wipe [data-sa-r].sa-wait, .sa-a-wipe [data-sa-r].sa-in { animation-name: ct-sa-wipe; animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
.sa-a-split [data-sa-r].sa-wait, .sa-a-split [data-sa-r].sa-in { animation-name: ct-sa-split; animation-timing-function: cubic-bezier(.77, 0, .18, 1); }
.sa-a-circle [data-sa-r].sa-wait, .sa-a-circle [data-sa-r].sa-in { animation-name: ct-sa-circle; animation-timing-function: cubic-bezier(.65, 0, .35, 1); --sa-root-dur: 1.15s; }
.sa-a-card [data-sa-r].sa-wait, .sa-a-card [data-sa-r].sa-in { animation-name: ct-sa-card; --sa-root-dur: 1.1s; }

@keyframes ct-sa-fade { from { opacity: 0; } }
@keyframes ct-sa-rise { from { opacity: 0; translate: 0 70px; } }
@keyframes ct-sa-slide { from { opacity: 0; translate: var(--sa-x, -90px) 0; } }
@keyframes ct-sa-zoom { from { opacity: 0; scale: .9; } }
@keyframes ct-sa-blur { from { opacity: 0; filter: blur(18px); scale: 1.04; } }
@keyframes ct-sa-tilt { from { opacity: 0; transform: perspective(1600px) rotateX(16deg) translateY(60px); } }
@keyframes ct-sa-unfold { from { opacity: 0; scale: 1 .6; } 40% { opacity: 1; } }
@keyframes ct-sa-curtain { from { clip-path: inset(100% 0 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ct-sa-wipe { from { clip-path: inset(0 100% 0 0); } to { clip-path: inset(0 0 0 0); } }
@keyframes ct-sa-split { from { clip-path: inset(0 50% 0 50%); } to { clip-path: inset(0 0 0 0); } }
@keyframes ct-sa-circle { from { clip-path: circle(0% at 50% 45%); } to { clip-path: circle(150% at 50% 45%); } }
@keyframes ct-sa-card {
    from { clip-path: inset(9% 7% round 48px); scale: .94; opacity: .2; }
    to { clip-path: inset(0 0 round 0); }
}

/* ---- Icerik (basliklar + tekrar eden ogeler) ---- */
.sa-i-rise [data-sa-i].sa-wait, .sa-i-rise [data-sa-i].sa-in { animation-name: ct-sa-i-rise; }
.sa-i-pop [data-sa-i].sa-wait, .sa-i-pop [data-sa-i].sa-in { animation-name: ct-sa-i-pop; animation-timing-function: cubic-bezier(.34, 1.56, .64, 1); }
.sa-i-slide [data-sa-i].sa-wait, .sa-i-slide [data-sa-i].sa-in { animation-name: ct-sa-i-slide; }
.sa-i-drop [data-sa-i].sa-wait, .sa-i-drop [data-sa-i].sa-in { animation-name: ct-sa-i-drop; animation-timing-function: linear; --sa-item-dur: .95s; }
.sa-i-flip [data-sa-i].sa-wait, .sa-i-flip [data-sa-i].sa-in { animation-name: ct-sa-i-flip; transform-origin: 50% 0; }
.sa-i-blur [data-sa-i].sa-wait, .sa-i-blur [data-sa-i].sa-in { animation-name: ct-sa-i-blur; }

@keyframes ct-sa-i-rise { from { opacity: 0; translate: 0 38px; } }
@keyframes ct-sa-i-pop { from { opacity: 0; scale: .78; } }
@keyframes ct-sa-i-slide { from { opacity: 0; translate: -46px 0; } }
@keyframes ct-sa-i-drop {
    0% { opacity: 0; translate: 0 -60px; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
    45% { opacity: 1; translate: 0 0; animation-timing-function: cubic-bezier(0, .55, .45, 1); }
    65% { translate: 0 -14px; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
    82% { translate: 0 0; animation-timing-function: cubic-bezier(0, .55, .45, 1); }
    91% { translate: 0 -4px; animation-timing-function: cubic-bezier(.55, 0, 1, .45); }
    100% { translate: 0 0; }
}
@keyframes ct-sa-i-flip { from { opacity: 0; transform: perspective(900px) rotateX(-55deg); } }
@keyframes ct-sa-i-blur { from { opacity: 0; filter: blur(12px); translate: 0 16px; } }

@media (prefers-reduced-motion: reduce) {
    .ct-sa-on .sa-wait, .ct-sa-on .sa-in { animation: none !important; }
}
