/* ===== Fade In Animations ===== */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

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

.fade-in:nth-child(2) {
    transition-delay: 0.1s;
}

.fade-in:nth-child(3) {
    transition-delay: 0.2s;
}

.fade-in:nth-child(4) {
    transition-delay: 0.3s;
}

.fade-in:nth-child(5) {
    transition-delay: 0.4s;
}

.fade-in:nth-child(6) {
    transition-delay: 0.5s;
}

/* ===== Hover Glow Effect ===== */
.service-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius);
    background: radial-gradient(circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(46, 94, 63, 0.05), transparent 60%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.service-card:hover::after {
    opacity: 1;
}

/* ===== Pulse Animation ===== */
@keyframes pulse {
    0% { transform: scale(1); box-shadow: 0 0 0 0 var(--accent-glow); }
    70% { transform: scale(1.02); box-shadow: 0 0 0 15px rgba(139, 94, 52, 0); }
    100% { transform: scale(1); box-shadow: 0 0 0 0 rgba(139, 94, 52, 0); }
}

.btn-primary:active {
    animation: pulse 0.4s ease;
}

/* ===== Gradient Text Shimmer ===== */
@keyframes shimmer {
    0% { background-position: -200% center; }
    100% { background-position: 200% center; }
}

.hero-title .accent {
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary), var(--accent));
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: shimmer 6s linear infinite;
}

/* ===== Card Entrance ===== */
@keyframes cardEntrance {
    from {
        opacity: 0;
        transform: translateY(40px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

/* ===== Spin Animation ===== */
@keyframes spin {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* ===== Bounce ===== */
@keyframes bounce {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

/* ===== Line Draw ===== */
@keyframes lineDraw {
    from { stroke-dashoffset: 1000; }
    to { stroke-dashoffset: 0; }
}

/* ===== Stagger Children ===== */
.services-grid .service-card:nth-child(1) .fade-in { transition-delay: 0s; }
.services-grid .service-card:nth-child(2) .fade-in { transition-delay: 0.1s; }
.services-grid .service-card:nth-child(3) .fade-in { transition-delay: 0.2s; }
.services-grid .service-card:nth-child(4) .fade-in { transition-delay: 0.3s; }
.services-grid .service-card:nth-child(5) .fade-in { transition-delay: 0.4s; }
.services-grid .service-card:nth-child(6) .fade-in { transition-delay: 0.5s; }

/* ===== Nav Toggle Animation ===== */
.nav-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.nav-toggle.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-20px);
}

.nav-toggle.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ===== Smooth Reveal ===== */
@keyframes revealUp {
    from {
        clip-path: inset(100% 0 0 0);
        opacity: 0;
    }
    to {
        clip-path: inset(0 0 0 0);
        opacity: 1;
    }
}

/* ===== Background Noise Texture ===== */
.hero::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='noise'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.65' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23noise)' opacity='0.03'/%3E%3C/svg%3E");
    pointer-events: none;
    z-index: 0;
}

/* ===== Image Reveal ===== */
.about-img-main,
.about-img-secondary,
.dclub-img-wrapper {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s ease, transform 0.8s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

.about-img-secondary {
    transition-delay: 0.2s;
}

.fade-in.visible .about-img-main,
.fade-in.visible .about-img-secondary,
.fade-in.visible .dclub-img-wrapper {
    opacity: 1;
    transform: translateY(0);
}

.about-quote-float {
    opacity: 0;
    transform: translateX(20px);
    transition: opacity 0.6s ease 0.5s, transform 0.6s ease 0.5s;
}

.fade-in.visible .about-quote-float {
    opacity: 1;
    transform: translateX(0);
}

/* ===== Gallery Hover ===== */
.gallery-item::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to top, rgba(46, 94, 63, 0.4), transparent 60%);
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 1;
}

.gallery-item:hover::after {
    opacity: 1;
}

.gallery-overlay {
    z-index: 2;
}

/* ===== Hero Image ===== */
.hero-bg-img {
    transform: scale(1.1);
    transition: transform 0.1s linear;
}

/* ===== Parallax Depth ===== */
.gradient-orb {
    will-change: transform;
}

.about-img-main,
.about-img-secondary {
    will-change: transform;
}

/* ===== Focus Styles ===== */
.btn:focus-visible,
.nav-link:focus-visible,
.slider-btn:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 3px;
}

/* ===== Reduced Motion ===== */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .fade-in {
        opacity: 1;
        transform: none;
    }

    .gradient-orb {
        animation: none;
    }

    html {
        scroll-behavior: auto;
    }
}
