/* ============================================
   ELEGANT VISIT — Animations & Effects
   ============================================ */

/* --- Scroll Reveal --- */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.7s var(--ease-out),
        transform 0.7s var(--ease-out);
}

.reveal--visible {
    opacity: 1;
    transform: translateY(0);
}

.reveal--delay-1 {
    transition-delay: 0.1s;
}

.reveal--delay-2 {
    transition-delay: 0.2s;
}

.reveal--delay-3 {
    transition-delay: 0.3s;
}

.reveal--delay-4 {
    transition-delay: 0.4s;
}

/* --- Fade In Up (keyframe for wizard panels) --- */
@keyframes fadeUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Float (bubbles) --- */
@keyframes float {

    0%,
    100% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.6;
    }

    33% {
        transform: translateY(-20px) rotate(3deg);
        opacity: 0.8;
    }

    66% {
        transform: translateY(10px) rotate(-2deg);
        opacity: 0.5;
    }
}

/* --- Pulse Glow --- */
@keyframes pulseGlow {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(43, 108, 176, 0.3);
    }

    50% {
        box-shadow: 0 0 20px 8px rgba(43, 108, 176, 0.15);
    }
}

.animate-pulse-glow {
    animation: pulseGlow 2.5s ease-in-out infinite;
}

/* --- Spin (loading) --- */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.animate-spin {
    animation: spin 1s linear infinite;
}

/* --- Counter Tick --- */
@keyframes counterTick {
    0% {
        transform: scale(0.8);
        opacity: 0;
    }

    50% {
        transform: scale(1.1);
    }

    100% {
        transform: scale(1);
        opacity: 1;
    }
}

/* --- Slide Down (mobile menu) --- */
@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* --- Parallax Text --- */
.parallax-text {
    will-change: transform;
}

/* --- 3D Tilt Container --- */
.tilt-card {
    transform-style: preserve-3d;
    perspective: 1000px;
    will-change: transform;
}

.tilt-card__inner {
    transform-style: preserve-3d;
    transition: transform 0.15s ease-out;
}

.tilt-card__shine {
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: linear-gradient(135deg,
            rgba(255, 255, 255, 0.15) 0%,
            rgba(255, 255, 255, 0) 60%);
    pointer-events: none;
    opacity: 0;
    transition: opacity var(--duration-fast);
}

.tilt-card:hover .tilt-card__shine {
    opacity: 1;
}

/* --- Hover Glow Effect --- */
.hover-glow {
    position: relative;
}

.hover-glow::after {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: inherit;
    background: linear-gradient(135deg, var(--color-primary-light), var(--color-accent));
    opacity: 0;
    z-index: -1;
    transition: opacity var(--duration-normal) var(--ease-out);
    filter: blur(12px);
}

.hover-glow:hover::after {
    opacity: 0.2;
}

/* --- Stagger Children --- */
.stagger-children>* {
    opacity: 0;
    transform: translateY(20px);
}

.stagger-children--visible>*:nth-child(1) {
    animation: fadeUp 0.5s var(--ease-out) 0.0s forwards;
}

.stagger-children--visible>*:nth-child(2) {
    animation: fadeUp 0.5s var(--ease-out) 0.1s forwards;
}

.stagger-children--visible>*:nth-child(3) {
    animation: fadeUp 0.5s var(--ease-out) 0.2s forwards;
}

.stagger-children--visible>*:nth-child(4) {
    animation: fadeUp 0.5s var(--ease-out) 0.3s forwards;
}

.stagger-children--visible>*:nth-child(5) {
    animation: fadeUp 0.5s var(--ease-out) 0.4s forwards;
}

.stagger-children--visible>*:nth-child(6) {
    animation: fadeUp 0.5s var(--ease-out) 0.5s forwards;
}

/* --- Hero badge shimmer --- */
@keyframes shimmer {
    0% {
        background-position: -200% center;
    }

    100% {
        background-position: 200% center;
    }
}

/* --- Reveal Variants --- */
.reveal--left {
    transform: translateX(-50px);
}

.reveal--right {
    transform: translateX(50px);
}

.reveal--scale {
    transform: scale(0.9);
}

.reveal--visible {
    opacity: 1;
    transform: translate(0, 0) scale(1);
}

/* --- Parallax System (3D Depth) --- */
.parallax-section {
    position: relative;
    overflow: hidden;
    perspective: 1000px;
    transform-style: preserve-3d;
}

/* --- Bubbles (Ambient Decoration) ---
   NOTE: Bubbles use the @keyframes float defined at the top of this file.
   Do NOT add a duplicate @keyframes float here. */
.bubbles {
    position: absolute;
    inset: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.bubble {
    position: absolute;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-full);
    pointer-events: none;
    animation: float 15s infinite ease-in-out;
}

.bubble:nth-child(1) {
    width: 120px;
    height: 120px;
    left: 10%;
    top: 20%;
    animation-delay: 0s;
}

.bubble:nth-child(2) {
    width: 80px;
    height: 80px;
    left: 25%;
    top: 60%;
    animation-delay: -2s;
}

.bubble:nth-child(3) {
    width: 150px;
    height: 150px;
    left: 45%;
    top: 30%;
    animation-delay: -4s;
}

.bubble:nth-child(4) {
    width: 100px;
    height: 100px;
    left: 70%;
    top: 10%;
    animation-delay: -1s;
}

.bubble:nth-child(5) {
    width: 90px;
    height: 90px;
    left: 85%;
    top: 70%;
    animation-delay: -3s;
}

@keyframes shimmer-sweep {
    0% {
        left: -150%;
    }

    30%,
    100% {
        left: 150%;
    }
}

.animate-shimmer {
    position: relative;
    overflow: hidden;
}

.animate-shimmer::after {
    content: '';
    position: absolute;
    top: 0;
    left: -150%;
    width: 60%;
    height: 100%;
    background: linear-gradient(to right,
            transparent 0%,
            rgba(255, 255, 255, 0.3) 50%,
            transparent 100%);
    transform: skewX(-25deg);
    animation: shimmer-sweep 4s infinite;
}

.parallax-bg img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

/* --- Hover Shine Sweep --- */
.hover-shine {
    position: relative;
    overflow: hidden;
}

.hover-shine::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 50%;
    height: 100%;
    background: linear-gradient(to right,
            transparent,
            rgba(255, 255, 255, 0.2),
            transparent);
    transform: skewX(-25deg);
    transition: 0.75s var(--ease-out);
    pointer-events: none;
}

.hover-shine:hover::before {
    left: 150%;
}

/* animate-shimmer is defined above (line ~334), DO NOT duplicate */


/* --- 3D Depth Layers for cards --- */
.tilt-depth {
    transform: translateZ(30px);
}

.tilt-depth--far {
    transform: translateZ(60px);
}

/* --- Mouse Follow Glow --- */
.glow-follow {
    position: relative;
}

.mouse-glow {
    position: absolute;
    width: 400px;
    height: 400px;
    background: radial-gradient(circle,
            rgba(66, 153, 225, 0.1) 0%,
            transparent 70%);
    border-radius: var(--radius-full);
    pointer-events: none;
    z-index: 10;
    transform: translate(-50%, -50%);
    opacity: 0;
    transition: opacity 0.3s var(--ease-out);
    filter: blur(20px);
}

.glow-follow:hover .mouse-glow {
    opacity: 1;
}

/* ================================
   STAGGER DELAYS
   ================================ */
.stagger-children>*:nth-child(n) {
    transition-delay: calc(var(--delay, 0.1s) * var(--i, 0));
}

/* --- Reduced Motion --- */
@media (prefers-reduced-motion: reduce) {

    .reveal,
    .reveal--left,
    .reveal--right,
    .reveal--scale {
        opacity: 1;
        transform: none;
        transition: none;
    }

    .bubble,
    .glow-orb {
        animation: none;
    }

    .mouse-glow,
    .hover-shine::before,
    .parallax-bg {
        display: none;
    }
}