/* ================================================================
   ENGELSIZ ISPARTA - ANIMATION SYSTEM
   Keyframes, Scroll Animations, Stagger, Hover Effects
   ================================================================ */

/* ===== PAGE TRANSITIONS ===== */
body {
    opacity: 0;
    transition: opacity 0.4s ease, transform 0.4s ease;
}

body.page-loaded {
    opacity: 1;
}

body.page-exit {
    opacity: 0;
    transform: translateY(-6px);
}

/* ===== KEYFRAMES ===== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInDown {
    from { opacity: 0; transform: translateY(-30px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeInLeft {
    from { opacity: 0; transform: translateX(-40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes fadeInRight {
    from { opacity: 0; transform: translateX(40px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes scaleIn {
    from { opacity: 0; transform: scale(0.88); }
    to { opacity: 1; transform: scale(1); }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes pulse {
    0%, 100% { transform: scale(1); opacity: 1; }
    50% { transform: scale(1.04); opacity: 0.9; }
}

@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

@keyframes rotateIn {
    from { opacity: 0; transform: rotate(-6deg) scale(0.92); }
    to { opacity: 1; transform: rotate(0) scale(1); }
}

@keyframes slideUp {
    from { transform: translateY(100%); opacity: 0; }
    to { transform: translateY(0); opacity: 1; }
}

@keyframes gradientShift {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

@keyframes borderDraw {
    from { stroke-dashoffset: 600; }
    to { stroke-dashoffset: 0; }
}

/* ===== SCROLL-TRIGGERED ANIMATIONS ===== */
.anim-fade-up {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-fade-down {
    opacity: 0;
    transform: translateY(-30px);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-fade-left {
    opacity: 0;
    transform: translateX(-40px);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-fade-right {
    opacity: 0;
    transform: translateX(40px);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-scale {
    opacity: 0;
    transform: scale(0.9);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-zoom-in {
    opacity: 0;
    transform: scale(0.94);
    transition: all 0.6s var(--ease-out-expo);
}

.anim-rotate {
    opacity: 0;
    transform: rotate(-5deg) scale(0.93);
    transition: all 0.6s var(--ease-out-expo);
}

/* Visible State */
.anim-fade-up.visible,
.anim-fade-down.visible,
.anim-fade-left.visible,
.anim-fade-right.visible,
.anim-scale.visible,
.anim-zoom-in.visible,
.anim-rotate.visible {
    opacity: 1;
    transform: translateY(0) translateX(0) scale(1) rotate(0);
}

/* ===== STAGGER DELAYS ===== */
.stagger > *:nth-child(1) { transition-delay: 0s; }
.stagger > *:nth-child(2) { transition-delay: 0.08s; }
.stagger > *:nth-child(3) { transition-delay: 0.16s; }
.stagger > *:nth-child(4) { transition-delay: 0.24s; }
.stagger > *:nth-child(5) { transition-delay: 0.32s; }
.stagger > *:nth-child(6) { transition-delay: 0.4s; }
.stagger > *:nth-child(7) { transition-delay: 0.48s; }
.stagger > *:nth-child(8) { transition-delay: 0.56s; }

/* ===== CUSTOM DELAY CLASSES ===== */
.delay-100 { transition-delay: 0.1s !important; }
.delay-200 { transition-delay: 0.2s !important; }
.delay-300 { transition-delay: 0.3s !important; }
.delay-400 { transition-delay: 0.4s !important; }
.delay-500 { transition-delay: 0.5s !important; }

/* ===== FLOATING ANIMATION ===== */
.float {
    animation: float 5s ease-in-out infinite;
}

.float-slow {
    animation: float 7s ease-in-out infinite;
}

.float-delayed {
    animation: float 5s ease-in-out infinite;
    animation-delay: 1s;
}

/* ===== PULSE ===== */
.pulse {
    animation: pulse 3s ease-in-out infinite;
}

/* ===== GRADIENT ANIMATION ===== */
.gradient-animated {
    background-size: 200% 200%;
    animation: gradientShift 10s ease infinite;
}

/* ===== PARALLAX HELPER ===== */
.parallax-layer {
    will-change: transform;
    transition: transform 0.1s linear;
}

/* ===== HOVER EFFECTS ===== */
.hover-lift {
    transition: transform 0.4s var(--ease-out-expo), box-shadow 0.4s ease;
}

.hover-lift:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
}

.hover-scale {
    transition: transform 0.4s var(--ease-out-expo);
}

.hover-scale:hover {
    transform: scale(1.02);
}

.hover-glow {
    transition: box-shadow 0.4s ease;
}

.hover-glow:hover {
    box-shadow: 0 0 20px rgba(var(--blue-rgb), 0.15);
}

/* ===== COUNTER VALUE ===== */
.counter-value {
    display: inline-block;
    font-variant-numeric: tabular-nums;
}

/* ===== SHIMMER EFFECT ===== */
.shimmer {
    background: linear-gradient(
        90deg,
        rgba(255,255,255,0) 0%,
        rgba(255,255,255,0.04) 50%,
        rgba(255,255,255,0) 100%
    );
    background-size: 200% 100%;
    animation: shimmer 4s ease-in-out infinite;
}
