/* ===================================
   DataForge Advanced Animations & Effects
   Blacksmith Forge - Enhanced Edition
   =================================== */

/* ===================================
   Scroll-Triggered Animations
   =================================== */

/* Base Animation Classes */
.animate-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.8s cubic-bezier(0.16, 1, 0.3, 1),
        transform 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered Animation Delays */
.stagger-1 {
    transition-delay: 0.1s;
}

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

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

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

.stagger-5 {
    transition-delay: 0.5s;
}

/* ===================================
   Hero Section Enhanced Animations
   =================================== */

/* Floating Particles Effect */
@keyframes ember-float {

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

    10% {
        opacity: 1;
    }

    90% {
        opacity: 0.8;
    }

    100% {
        transform: translateY(-600px) rotate(360deg);
        opacity: 0;
    }
}

.hero::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 100%;
    background-image:
        radial-gradient(2px 2px at 10% 90%, var(--accent-ember) 50%, transparent 50%),
        radial-gradient(3px 3px at 30% 85%, var(--accent-amber) 50%, transparent 50%),
        radial-gradient(2px 2px at 50% 95%, var(--accent-flame) 50%, transparent 50%),
        radial-gradient(2px 2px at 70% 88%, var(--accent-ember) 50%, transparent 50%),
        radial-gradient(3px 3px at 90% 92%, var(--accent-amber) 50%, transparent 50%);
    animation: ember-float 8s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

/* Hero Title Shine Effect */
@keyframes text-shimmer {
    0% {
        background-position: -200% center;
    }

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

.hero-title {
    background: linear-gradient(90deg,
            var(--text-primary) 0%,
            var(--accent-amber) 25%,
            var(--accent-ember) 50%,
            var(--accent-amber) 75%,
            var(--text-primary) 100%);
    background-size: 200% auto;
    animation: text-shimmer 8s linear infinite;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Hero Content Entrance */
.hero-content {
    animation: hero-entrance 1.2s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}

@keyframes hero-entrance {
    0% {
        opacity: 0;
        transform: translateX(-60px);
        filter: blur(10px);
    }

    100% {
        opacity: 1;
        transform: translateX(0);
        filter: blur(0);
    }
}

.hero-visual {
    animation: hero-visual-entrance 1.4s cubic-bezier(0.16, 1, 0.3, 1) 0.3s forwards;
    opacity: 0;
}

@keyframes hero-visual-entrance {
    0% {
        opacity: 0;
        transform: scale(0.8) rotate(-10deg);
    }

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

/* Enhanced Flywheel Pulse */
@keyframes deep-pulse {

    0%,
    100% {
        box-shadow:
            0 0 30px var(--accent-glow),
            0 0 60px rgba(249, 115, 22, 0.2),
            inset 0 0 30px rgba(249, 115, 22, 0.1);
    }

    50% {
        box-shadow:
            0 0 50px var(--accent-glow),
            0 0 100px rgba(249, 115, 22, 0.3),
            inset 0 0 50px rgba(249, 115, 22, 0.2);
    }
}

.flywheel-core {
    animation: deep-pulse 3s ease-in-out infinite;
}

/* ===================================
   Core Values Section Animations
   =================================== */

.value-card {
    position: relative;
    overflow: hidden;
}

/* Forge Glow Effect on Cards */
.value-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-ember),
            var(--accent-amber),
            var(--accent-ember),
            transparent);
    transform: scaleX(0);
    transform-origin: center;
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.value-card:hover::before {
    transform: scaleX(1);
}

/* Card Background Glow */
.value-card::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse 80% 50% at 50% 100%,
            rgba(249, 115, 22, 0.15),
            transparent);
    opacity: 0;
    transition: opacity 0.5s ease;
    pointer-events: none;
}

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

/* Icon Bounce */
@keyframes icon-bounce {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.value-card:hover .value-icon {
    animation: icon-bounce 0.6s ease-in-out;
}

/* ===================================
   How It Works - Enhanced Timeline
   =================================== */

/* Step Connection Animation */
@keyframes pulse-line {

    0%,
    100% {
        opacity: 0.3;
        box-shadow: 0 0 5px transparent;
    }

    50% {
        opacity: 0.8;
        box-shadow: 0 0 15px var(--accent-ember);
    }
}

.step-connector {
    animation: pulse-line 3s ease-in-out infinite;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-ember),
            var(--accent-amber),
            var(--accent-ember),
            transparent);
}

/* Step Card 3D Hover */
.step-card {
    transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.step-card:hover {
    transform: translateY(-10px);
}

/* Icon Ring Animation */
.step-icon {
    position: relative;
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1),
        box-shadow 0.3s ease,
        border-color 0.3s ease;
}

.step-icon::before {
    content: '';
    position: absolute;
    inset: -8px;
    border-radius: 50%;
    border: 2px dashed var(--accent-ember);
    opacity: 0;
    transition: opacity 0.3s ease;
    animation: rotate-core 10s linear infinite;
}

.step-card:hover .step-icon::before {
    opacity: 0.5;
}

.step-card:hover .step-icon {
    transform: scale(1.15) rotate(5deg);
    border-color: var(--accent-ember);
    box-shadow: 0 0 30px rgba(249, 115, 22, 0.5);
}

/* ===================================
   Solutions/Platform Cards Enhanced
   =================================== */

.content-card {
    position: relative;
    overflow: hidden;
}

/* Corner Accent */
.content-card::before {
    content: '';
    position: absolute;
    top: -50px;
    right: -50px;
    width: 100px;
    height: 100px;
    background: radial-gradient(circle, var(--accent-ember) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.5s ease, transform 0.5s ease;
    transform: scale(0.5);
}

.content-card:hover::before {
    opacity: 0.3;
    transform: scale(1);
}

/* Bottom Border Glow */
.content-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--accent-ember), var(--accent-amber));
    transition: width 0.5s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 100px;
}

.content-card:hover::after {
    width: 60%;
}

/* Card Title Effect */
.content-card h3 {
    position: relative;
    display: inline-block;
    transition: text-shadow 0.3s ease;
}

.content-card:hover h3 {
    text-shadow: 0 0 20px rgba(251, 191, 36, 0.5);
}

/* ===================================
   About Section - Enhanced
   =================================== */

.about-content {
    position: relative;
}

.about-content::before {
    content: '"';
    position: absolute;
    top: -40px;
    left: 50%;
    transform: translateX(-50%);
    font-size: 120px;
    color: var(--accent-ember);
    opacity: 0.15;
    font-family: Georgia, serif;
    line-height: 1;
}

#de-nobis .section-title {
    position: relative;
}

#de-nobis .section-title::after {
    content: '';
    display: block;
    width: 80px;
    height: 4px;
    background: linear-gradient(90deg, var(--accent-ember), var(--accent-amber));
    margin: 20px auto 0;
    border-radius: 100px;
    animation: glow-pulse 2s ease-in-out infinite;
}

@keyframes glow-pulse {

    0%,
    100% {
        box-shadow: 0 0 10px var(--accent-glow);
    }

    50% {
        box-shadow: 0 0 25px var(--accent-glow);
    }
}

/* ===================================
   Comparison Table Enhanced
   =================================== */

.comparison-section .section-title {
    position: relative;
}

/* Animated Table Border */
.comparison-table-container {
    position: relative;
    overflow: hidden;
}

.comparison-table-container::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: var(--radius-lg);
    padding: 2px;
    background: linear-gradient(135deg,
            var(--accent-ember),
            var(--accent-amber),
            var(--accent-flame),
            var(--accent-amber),
            var(--accent-ember));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.5s ease;
    animation: gradient-rotate 4s linear infinite;
    background-size: 300% 300%;
}

.comparison-table-container:hover::before {
    opacity: 1;
}

@keyframes gradient-rotate {
    0% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }

    100% {
        background-position: 0% 50%;
    }
}

/* Enhanced Row Hover */
.comparison-table tbody tr {
    transition: background-color 0.2s ease;
}

.comparison-table tbody tr:hover td {
    background: rgba(255, 255, 255, 0.03);
}

.comparison-table tbody tr:hover td.positive {
    background: rgba(249, 115, 22, 0.15);
}

.status-icon {
    display: inline-block;
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.comparison-table tbody tr:hover .status-icon {
    transform: scale(1.3);
}

/* DataForge Column Shimmer */
@keyframes column-shimmer {
    0% {
        background-position: 0% 0%;
    }

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

.highlight-col {
    background: linear-gradient(180deg,
            rgba(249, 115, 22, 0.15) 0%,
            rgba(249, 115, 22, 0.05) 50%,
            rgba(249, 115, 22, 0.15) 100%);
    background-size: 100% 200%;
    animation: column-shimmer 3s ease-in-out infinite;
}

/* ===================================
   Social Section Enhanced
   =================================== */

/* Beta Card Forge Glow */
.beta-card {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
}

.beta-card::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    background: radial-gradient(ellipse 100% 60% at 50% 100%,
            rgba(249, 115, 22, 0.2),
            transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

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

.beta-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 60px rgba(249, 115, 22, 0.25),
        0 0 80px rgba(249, 115, 22, 0.1);
}

/* Testimonials Glass Shatter Effect */
.testimonial-card {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    position: relative;
    overflow: hidden;
}

.testimonial-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 100%;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 255, 255, 0.05) 50%,
            transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.6s ease;
}

.testimonial-card:hover::before {
    transform: translateX(100%);
}

.testimonial-card:hover {
    transform: translateY(-10px) scale(1.02);
    border-color: var(--accent-ember);
    box-shadow:
        0 25px 50px rgba(0, 0, 0, 0.4),
        0 0 40px rgba(249, 115, 22, 0.15);
}

/* Quote Marks */
.testimonial-card .quote::before {
    content: '"';
    font-size: 4rem;
    position: absolute;
    top: 10px;
    left: 15px;
    color: var(--accent-ember);
    opacity: 0.2;
    font-family: Georgia, serif;
    line-height: 1;
}

/* Partners Marquee Enhanced */
.partners-marquee {
    animation: marquee 25s linear infinite;
}

@keyframes marquee {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

.partner-logo {
    transition: all 0.3s ease;
    opacity: 0.6;
    position: relative;
}

.partner-logo::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--accent-ember), var(--accent-amber));
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.partner-logo:hover {
    opacity: 1;
    color: var(--text-primary);
    text-shadow: 0 0 20px rgba(255, 255, 255, 0.4);
    transform: scale(1.1);
}

.partner-logo:hover::after {
    transform: scaleX(1);
}

/* ===================================
   Contact Section Enhanced
   =================================== */

.contact-info {
    transition: transform 0.3s ease, box-shadow 0.3s ease;
    position: relative;
    overflow: hidden;
}

.contact-info::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg,
            transparent,
            var(--accent-ember),
            var(--accent-amber),
            var(--accent-ember),
            transparent);
}

.contact-info:hover {
    transform: translateY(-5px);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 40px rgba(249, 115, 22, 0.1);
}

/* ===================================
   Footer Enhanced
   =================================== */

.footer {
    position: relative;
    overflow: hidden;
}

.footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent 0%,
            var(--accent-ember) 20%,
            var(--accent-amber) 50%,
            var(--accent-ember) 80%,
            transparent 100%);
    animation: footer-glow 4s ease-in-out infinite;
}

@keyframes footer-glow {

    0%,
    100% {
        opacity: 0.4;
    }

    50% {
        opacity: 1;
    }
}

/* ===================================
   Button Enhancements
   =================================== */

.btn-primary {
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: radial-gradient(circle,
            rgba(255, 255, 255, 0.3) 0%,
            transparent 70%);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: -1;
}

.btn-primary:hover::before {
    width: 300px;
    height: 300px;
}

/* Ripple Effect */
@keyframes btn-ripple {
    0% {
        transform: translate(-50%, -50%) scale(0);
        opacity: 1;
    }

    100% {
        transform: translate(-50%, -50%) scale(4);
        opacity: 0;
    }
}

.btn-secondary {
    position: relative;
    overflow: hidden;
}

.btn-secondary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg,
            transparent 0%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 100%);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}

.btn-secondary:hover::after {
    transform: translateX(100%);
}

/* ===================================
   Section Title Animations
   =================================== */

.section-title {
    position: relative;
}

.section::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
            transparent,
            var(--border-glass),
            var(--border-ember),
            var(--border-glass),
            transparent);
    opacity: 0.5;
}

/* Section Reveal Animation */
.section {
    position: relative;
}

/* ===================================
   Scrollbar Styling
   =================================== */

::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--bg-primary);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--accent-ember), var(--steel-dark));
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--accent-amber), var(--accent-ember));
}

/* ===================================
   Loading State Animation
   =================================== */

@keyframes skeleton-loading {
    0% {
        background-position: -200% 0;
    }

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

.loading {
    background: linear-gradient(90deg,
            var(--bg-card) 0%,
            var(--bg-card-hover) 50%,
            var(--bg-card) 100%);
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
}

/* ===================================
   Focus States
   =================================== */

*:focus-visible {
    outline: 2px solid var(--accent-ember);
    outline-offset: 3px;
}

/* ===================================
   Reduced Motion Support
   =================================== */

@media (prefers-reduced-motion: reduce) {

    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
}