/* ═══════════════════════════════════════════════════
   ANIMATIONS.CSS — 3D-эффекты, кастомный курсор
   ═══════════════════════════════════════════════════ */

/* ─── 3D Tilt на фото ─── */
.tilt-3d {
    perspective: 800px;
    display: inline-block;
}

.tilt-3d img {
    transition: transform 0.4s ease-out, box-shadow 0.4s ease-out;
    will-change: transform;
    transform-style: preserve-3d;
}

.tilt-3d:hover img {
    box-shadow: var(--shadow-lg);
}

/* ─── Кастомный курсор ─── */
.cursor-dot,
.cursor-ring {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 9999;
    border-radius: 50%;
    mix-blend-mode: difference;
    transition: opacity 0.3s;
}

.cursor-dot {
    width: 8px;
    height: 8px;
    background: #fff;
    transform: translate(-50%, -50%);
}

.cursor-ring {
    width: 36px;
    height: 36px;
    border: 2px solid rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.3s ease, height 0.3s ease, border-color 0.3s ease, background 0.3s ease;
}

/* Эффект при наведении на интерактивные элементы */
.cursor-ring.cursor-hover {
    width: 56px;
    height: 56px;
    border-color: var(--color-accent);
    background: rgba(238, 117, 28, 0.08);
}

/* Эффект при наведении на фото */
.cursor-ring.cursor-photo {
    width: 80px;
    height: 80px;
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.05);
}

/* Эффект при клике */
.cursor-ring.cursor-click {
    width: 28px;
    height: 28px;
}

/* Скрыть на мобильных и при touch */
@media (hover: none), (max-width: 768px) {
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}

/* Уважаем prefers-reduced-motion */
@media (prefers-reduced-motion: reduce) {
    .tilt-3d img {
        transition: none;
    }
    .cursor-dot,
    .cursor-ring {
        display: none !important;
    }
}
