/* =========================================
   HOMEPAGE REDESIGN - AI SaaS Modern Design
   ========================================= */

/* CSS Variables */
:root {
    --gradient-violet: #8B5CF6;
    --gradient-blue: #3B82F6;
    --gradient-primary: linear-gradient(135deg, #8B5CF6 0%, #3B82F6 100%);
    --gradient-primary-reverse: linear-gradient(135deg, #3B82F6 0%, #8B5CF6 100%);
    --gradient-glow: radial-gradient(circle, rgba(139, 92, 246, 0.3) 0%, transparent 70%);
    --gradient-glow-blue: radial-gradient(circle, rgba(59, 130, 246, 0.2) 0%, transparent 70%);
    --bg-dark: #0a0a0f;
    --bg-darker: #06060a;
    --bg-card: rgba(15, 15, 25, 0.8);
    --border-color: rgba(139, 92, 246, 0.2);
    --text-primary: #ffffff;
    --text-secondary: rgba(255, 255, 255, 0.7);
    --text-muted: rgba(255, 255, 255, 0.5);
}

/* =========================================
   BASE STYLES
   ========================================= */
.home-redesign {
    background: var(--bg-dark);
}

/* Hide scrollbar completely - removed smooth scroll for better performance */
html,
body.home-template,
body.home-template .site-wrapper,
body.home-template .home-redesign {
    overflow-x: hidden;
    overflow-y: auto;
}

/* Hide scrollbar for Chrome, Safari and Opera */
body.home-template::-webkit-scrollbar,
body.home-template .site-wrapper::-webkit-scrollbar,
body.home-template .home-redesign::-webkit-scrollbar {
    display: none;
}

/* Hide scrollbar for IE, Edge and Firefox */
body.home-template,
body.home-template .site-wrapper,
body.home-template .home-redesign {
    -ms-overflow-style: none;  /* IE and Edge */
    scrollbar-width: none;  /* Firefox */
}

/* =========================================
   TEXT SIZING - INCREASED FOR READABILITY
   ========================================= */
.home-redesign p,
.home-redesign .lead {
    font-size: 2rem;
    line-height: 1.9;
    color: rgba(255, 255, 255, 0.8);
}

.home-redesign section p {
    font-size: 2rem;
    line-height: 1.85;
}

.home-redesign h2 {
    font-size: 5.2rem;
    font-weight: 700;
}

.home-redesign h3,
.home-redesign h3.h5 {
    font-size: 2.25rem !important;
}

.home-redesign h4 {
    font-size: 1.35rem;
}

.home-redesign h5 {
    font-size: 1.15rem;
}

.home-redesign .text-muted,
.home-redesign .text-white-50 {
    font-size: 1.1rem;
    color: rgba(255, 255, 255, 0.85) !important;
}

/* Feature card text */
.home-redesign .feature-card p,
.home-redesign .glass-card p,
.home-redesign .card-3d p {
    font-size: 1.1rem;
    line-height: 1.7;
}

/* List items */
.home-redesign li,
.home-redesign .list-unstyled li {
    font-size: 1.1rem;
    line-height: 1.8;
}

.home-redesign .section-padding {
    padding: 100px 0;
    position: relative;
    contain: layout style paint;
}

.home-redesign .bg-darker-section {
    background: var(--bg-darker);
}

/* =========================================
   GRADIENT TEXT
   ========================================= */
.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.gradient-text-animated {
    background: linear-gradient(90deg, #8B5CF6, #3B82F6, #8B5CF6);
    background-size: 200% auto;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradientShift 3s ease-in-out infinite;
}

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

/* Gradient keywords in H2 */
.home-redesign h2 .highlight {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* =========================================
   TYPEWRITER EFFECT
   ========================================= */
.typewriter-container {
    display: inline-block;
    position: relative;
}

.typewriter-text {
    display: inline-block;
    overflow: hidden;
    border-right: 2px solid var(--gradient-violet);
    white-space: nowrap;
    animation: typing 3s steps(40, end), blink-caret 0.75s step-end infinite;
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

@keyframes blink-caret {
    from, to { border-color: transparent; }
    50% { border-color: var(--gradient-violet); }
}

/* =========================================
   BACKGROUND EFFECTS
   ========================================= */

/* Circle Glow Animation */
.bg-circle-glow {
    position: absolute;
    width: 600px;
    height: 600px;
    border-radius: 50%;
    background: var(--gradient-glow);
    filter: blur(80px);
    pointer-events: none;
    z-index: 0;
    animation: floatCircle 8s ease-in-out infinite;
}

.bg-circle-glow.top-right {
    top: -200px;
    right: -200px;
}

.bg-circle-glow.top-left {
    top: -200px;
    left: -200px;
}

.bg-circle-glow.center {
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
}

.bg-circle-glow.bottom-left {
    bottom: -200px;
    left: -200px;
}

.bg-circle-glow-small {
    position: absolute;
    width: 300px;
    height: 300px;
    border-radius: 50%;
    background: var(--gradient-glow-blue);
    filter: blur(60px);
    pointer-events: none;
    z-index: 0;
    animation: floatCircle 6s ease-in-out infinite reverse;
}

@keyframes floatCircle {
    0%, 100% { transform: translate3d(0, 0, 0) scale(1); }
    25% { transform: translate3d(20px, -20px, 0) scale(1.05); }
    50% { transform: translate3d(-10px, 20px, 0) scale(0.95); }
    75% { transform: translate3d(-20px, -10px, 0) scale(1.02); }
}

/* Disable heavy animations for users who prefer reduced motion */
@media (prefers-reduced-motion: reduce) {
    *,
    *::before,
    *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    .floating-cube,
    .particle,
    .bg-circle-glow,
    .bg-circle-glow-small {
        animation: none !important;
    }
}

/* Background Pattern - Cells/Grid */
.bg-pattern-cells {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.03) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* Dot Pattern */
.bg-pattern-dots {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-image: radial-gradient(circle, rgba(139, 92, 246, 0.1) 1px, transparent 1px);
    background-size: 30px 30px;
    pointer-events: none;
    z-index: 0;
}

/* Particle Container */
.particle-container {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    overflow: hidden;
    pointer-events: none;
    z-index: 1;
}

.particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: var(--gradient-violet);
    border-radius: 50%;
    opacity: 0.6;
    animation: particleFloat 15s linear infinite;
}

.particle:nth-child(odd) {
    background: var(--gradient-blue);
    animation-duration: 20s;
}

@keyframes particleFloat {
    0% {
        transform: translateY(100vh) rotate(0deg);
        opacity: 0;
    }
    10% {
        opacity: 0.6;
    }
    90% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(-100px) rotate(720deg);
        opacity: 0;
    }
}

/* Floating Circles Animation */
.floating-circle {
    position: absolute;
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 50%;
    animation: floatBubble 20s linear infinite;
}

@keyframes floatBubble {
    0% {
        transform: translateY(0) rotate(0deg);
        opacity: 0.3;
    }
    50% {
        opacity: 0.5;
    }
    100% {
        transform: translateY(-1000px) rotate(360deg);
        opacity: 0;
    }
}

/* =========================================
   3D CARDS
   ========================================= */
.card-3d {
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    transform-style: preserve-3d;
    perspective: 1000px;
    position: relative;
    overflow: hidden;
}

.card-3d::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.1) 0%, transparent 50%);
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card-3d:hover {
    transform: translateY(-10px) rotateX(5deg) rotateY(-5deg);
    box-shadow: 
        0 20px 40px rgba(139, 92, 246, 0.2),
        0 0 60px rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
}

.card-3d:hover::before {
    opacity: 1;
}

/* Feature Cards */
.feature-card {
    background: rgba(15, 15, 25, 0.6);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 28px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    overflow: hidden;
    height: 100%;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: conic-gradient(from 0deg, transparent, rgba(139, 92, 246, 0.1), transparent 30%);
    animation: rotateGlow 10s linear infinite;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.feature-card:hover::before {
    opacity: 1;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: rgba(139, 92, 246, 0.4);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

@keyframes rotateGlow {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

/* Icon Box */
.icon-box {
    width: 56px;
    height: 56px;
    background: var(--gradient-primary);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.icon-box-outline {
    width: 56px;
    height: 56px;
    background: transparent;
    border: 2px solid var(--gradient-violet);
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    font-size: 24px;
    color: var(--gradient-violet);
}

/* =========================================
   GLASS MORPHISM
   ========================================= */
.glass-card {
    background: rgba(255, 255, 255, 0.03);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 32px;
}

/* =========================================
   BROWSER MOCKUPS
   ========================================= */
.browser-mockup {
    background: var(--bg-card);
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(139, 92, 246, 0.2);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
    position: relative;
}

.browser-header {
    background: rgba(20, 20, 30, 0.9);
    padding: 12px 16px;
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.browser-header .dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.browser-header .dot.red { background: #FF5F57; }
.browser-header .dot.yellow { background: #FFBD2E; }
.browser-header .dot.green { background: #28CA41; }

.browser-content {
    padding: 0;
    position: relative;
}

.browser-content img {
    width: 100%;
    display: block;
}

/* Browser with Hover Tilt */
.browser-mockup.hover-tilt {
    transition: transform 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.browser-mockup.hover-tilt:hover {
    transform: perspective(1000px) rotateY(-5deg) rotateX(5deg) scale(1.02);
}

/* Animated Border */
.animated-border {
    position: relative;
}

.animated-border::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: linear-gradient(45deg, #8B5CF6, #3B82F6, #8B5CF6, #3B82F6);
    background-size: 400% 400%;
    border-radius: 18px;
    z-index: -1;
    animation: borderGradient 4s ease infinite;
    opacity: 0.7;
}

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

/* Mask Fade Effect */
.with-mask::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 120px;
    background: linear-gradient(to bottom, transparent, var(--bg-darker));
    pointer-events: none;
    z-index: 2;
}

/* =========================================
   BUTTONS
   ========================================= */
.btn-primary-gradient {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: var(--gradient-primary);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    border: none;
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
    box-shadow: 0 4px 20px rgba(139, 92, 246, 0.3);
    position: relative;
    overflow: hidden;
}

.btn-primary-gradient::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.2), transparent);
    transition: left 0.5s ease;
}

.btn-primary-gradient:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(139, 92, 246, 0.5);
    color: white;
}

.btn-primary-gradient:hover::before {
    left: 100%;
}

.btn-secondary-outline {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 16px 32px;
    background: rgba(0, 0, 0, 0.3);
    color: #ffffff !important;
    font-weight: 600;
    font-size: 1.1rem;
    border-radius: 12px;
    border: 2px solid rgba(139, 92, 246, 0.5);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s ease;
}

.btn-secondary-outline:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: var(--gradient-violet);
    color: white;
}

.btn-lg {
    padding: 20px 40px;
    font-size: 1.2rem;
}

/* Ensure button text is always white */
.home-redesign .btn-primary-gradient,
.home-redesign .btn-secondary-outline,
.home-redesign a.btn-primary-gradient,
.home-redesign a.btn-secondary-outline {
    color: #ffffff !important;
}

.home-redesign .btn-primary-gradient:hover,
.home-redesign .btn-secondary-outline:hover {
    color: #ffffff !important;
}

/* =========================================
   HERO SECTION
   ========================================= */
.hero-section {
    min-height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 100px;
    padding-bottom: 60px;
}

.hero-section h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    font-weight: 800;
    line-height: 1.1;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.hero-section h2 {
    font-size: 2cap;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

.hero-section h3 {
    font-size: 1.1rem;
    color: var(--text-muted);
    margin-bottom: 24px;
}

.hero-section .lead {
    color: var(--text-secondary);
    font-size: 1.1rem;
    line-height: 1.7;
}

/* Hero Card Stack */
.card-stack {
    position: relative;
    height: 450px;
    perspective: 1000px;
}

.stack-card {
    position: absolute;
    width: 100%;
    background: var(--bg-card);
    border: 1px solid var(--border-color);
    border-radius: 20px;
    overflow: hidden;
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.5);
}

.stack-card.active {
    transform: translateY(0) scale(1);
    z-index: 3;
    opacity: 1;
}

.stack-card.next {
    transform: translateY(30px) scale(0.95);
    z-index: 2;
    opacity: 0.7;
}

.stack-card.prev {
    transform: translateY(60px) scale(0.9);
    z-index: 1;
    opacity: 0.4;
}

.stack-card .card-header {
    background: rgba(20, 20, 30, 0.9);
    padding: 16px 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.stack-card .card-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    color: white;
}

.stack-card .metric {
    background: var(--gradient-primary);
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
}

.stack-card .card-body {
    padding: 0;
}

.stack-card .card-body img {
    width: 100%;
    display: block;
}

/* Stack Progress Indicator */
.stack-progress {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin-top: 24px;
}

.stack-progress .indicator {
    width: 40px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    cursor: pointer;
}

.stack-progress .indicator.active .fill {
    width: 100%;
    height: 100%;
    background: var(--gradient-primary);
    animation: progressFill 5s linear;
}

@keyframes progressFill {
    from { width: 0; }
    to { width: 100%; }
}

/* =========================================
   SOCIAL PROOF STRIP
   ========================================= */
.social-proof-strip {
    border-top: 1px solid rgba(139, 92, 246, 0.1);
    border-bottom: 1px solid rgba(139, 92, 246, 0.1);
}

.border-gradient-bottom {
    position: relative;
}

.border-gradient-bottom::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--gradient-primary);
    opacity: 0.5;
}

/* Logo Row */
.logo-row {
    display: flex;
    justify-content: center;
    align-items: center;
    flex-wrap: wrap;
    gap: 48px;
    opacity: 0.5;
}

.logo-row img {
    height: 30px;
    filter: grayscale(100%) brightness(2);
    transition: all 0.3s ease;
}

.logo-row img:hover {
    opacity: 1;
    filter: grayscale(0%) brightness(1);
}

/* Stats Row */
.stats-row {
    display: flex;
    justify-content: center;
    gap: 60px;
    flex-wrap: wrap;
}

.stat-item {
    text-align: center;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 800;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.stat-label {
    font-size: 0.9rem;
    color: var(--text-muted);
    margin-top: 4px;
}

/* Testimonial Carousel */
.testimonial-carousel {
    position: relative;
    overflow: hidden;
}

.testimonial-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    padding: 32px;
    text-align: center;
}

.testimonial-card p {
    font-size: 1.1rem;
    font-style: italic;
    color: var(--text-secondary);
    margin-bottom: 20px;
}

/* =========================================
   VALUE TILES
   ========================================= */
.value-tile {
    background: rgba(139, 92, 246, 0.1);
    border: 1px solid rgba(139, 92, 246, 0.2);
    border-radius: 12px;
    padding: 16px;
    text-align: center;
    transition: all 0.3s ease;
}

.value-tile:hover {
    background: rgba(139, 92, 246, 0.15);
    transform: translateY(-4px);
}

.value-tile h4 {
    font-size: 0.9rem;
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.value-tile p {
    font-size: 0.8rem;
    color: var(--text-muted);
    margin: 0;
}

/* =========================================
   OPPORTUNITY SCORE LIST
   ========================================= */
.opportunity-list .list-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.opportunity-list .list-item:last-child {
    border-bottom: none;
}

.opportunity-list .badge {
    min-width: 40px;
    text-align: center;
}

/* Counter Animation */
.counter-up {
    font-variant-numeric: tabular-nums;
}

/* =========================================
   WORKFLOW STEPS
   ========================================= */
.workflow-step {
    display: flex;
    gap: 20px;
    margin-bottom: 24px;
}

.step-number-circle {
    width: 48px;
    height: 48px;
    min-width: 48px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 1.1rem;
    color: white;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.3);
}

.workflow-step h5 {
    font-weight: 600;
    margin-bottom: 4px;
    color: white;
}

.workflow-step p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin: 0;
}

/* =========================================
   TIMELINE / HOW IT WORKS
   ========================================= */
.timeline-step {
    position: relative;
}

.step-number {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    color: white;
    margin: 0 auto 16px;
    box-shadow: 0 10px 30px rgba(139, 92, 246, 0.4);
    position: relative;
    z-index: 2;
}

.loop-connector {
    position: absolute;
    top: 30px;
    left: 15%;
    right: 15%;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent, 
        rgba(139, 92, 246, 0.5) 20%, 
        rgba(139, 92, 246, 0.5) 80%, 
        transparent
    );
    z-index: 1;
}

/* =========================================
   TABS
   ========================================= */
.custom-tabs .nav-tabs {
    border: none;
    background: rgba(255, 255, 255, 0.03);
    border-radius: 12px;
    padding: 4px;
}

.custom-tabs .nav-link {
    border: none;
    color: var(--text-muted);
    border-radius: 8px;
    padding: 10px 20px;
    transition: all 0.3s ease;
}

.custom-tabs .nav-link:hover {
    color: var(--text-secondary);
}

.custom-tabs .nav-link.active {
    background: var(--gradient-primary);
    color: white;
}

/* =========================================
   ROLE CARDS
   ========================================= */
.role-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 32px 24px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    cursor: pointer;
}

.role-card:hover {
    background: rgba(139, 92, 246, 0.1);
    border-color: rgba(139, 92, 246, 0.4);
    transform: translateY(-8px);
}

.role-icon {
    width: 72px;
    height: 72px;
    background: var(--gradient-primary);
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 28px;
    color: white;
    margin: 0 auto 20px;
    box-shadow: 0 15px 40px rgba(139, 92, 246, 0.3);
}

.role-card h4 {
    font-weight: 700;
    margin-bottom: 8px;
}

/* =========================================
   AGENT CARDS
   ========================================= */
.agent-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(139, 92, 246, 0.15);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.4s ease;
    height: 100%;
}

.agent-card:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-5px);
}

.agent-card .icon-box {
    margin: 0 auto 16px;
}

.agent-card h5 {
    font-weight: 600;
    margin-bottom: 8px;
}

/* =========================================
   COMPARISON TABLE
   ========================================= */
.comparison-table {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 16px;
    overflow: hidden;
}

.comparison-table table {
    margin: 0;
}

.comparison-table th,
.comparison-table td {
    padding: 20px 24px;
    vertical-align: middle;
}

.comparison-table thead th {
    background: rgba(0, 0, 0, 0.3);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.comparison-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    transition: background 0.3s ease;
}

.comparison-table tbody tr:hover {
    background: rgba(139, 92, 246, 0.05);
}

/* =========================================
   ACCORDION
   ========================================= */
.accordion-item {
    background: transparent !important;
    border: none !important;
}

.accordion-button {
    background: transparent !important;
    color: white !important;
    padding: 20px 0;
    font-weight: 600;
}

.accordion-button:not(.collapsed) {
    box-shadow: none;
}

.accordion-button::after {
    filter: brightness(2);
}

.accordion-body {
    padding: 0 0 20px 0;
    color: var(--text-muted);
}

/* =========================================
   INTEGRATION CARDS
   ========================================= */
.integration-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 28px;
    text-align: center;
    transition: all 0.3s ease;
    height: 100%;
}

.integration-card:hover {
    background: rgba(139, 92, 246, 0.08);
    border-color: rgba(139, 92, 246, 0.3);
    transform: translateY(-4px);
}

.integration-card i {
    font-size: 2.5rem;
    margin-bottom: 16px;
    color: white;
}

.integration-card .badge {
    margin-top: 8px;
}

/* =========================================
   PRICING CARDS
   ========================================= */
.pricing-card {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 20px;
    padding: 36px;
    transition: all 0.4s ease;
    height: 100%;
}

.pricing-card.featured {
    border-color: var(--gradient-violet);
    background: rgba(139, 92, 246, 0.08);
    transform: scale(1.05);
    box-shadow: 0 20px 60px rgba(139, 92, 246, 0.2);
}

.pricing-card:hover {
    transform: translateY(-8px);
}

.pricing-card.featured:hover {
    transform: scale(1.05) translateY(-8px);
}

/* =========================================
   FINAL CTA SECTION
   ========================================= */
.final-cta-section {
    background: linear-gradient(180deg, var(--bg-dark) 0%, var(--bg-darker) 100%);
    position: relative;
    overflow: hidden;
}

.final-cta-section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    font-weight: 800;
}

/* =========================================
   REVEAL ON SCROLL
   ========================================= */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

.reveal-on-scroll.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Staggered reveal for children */
.reveal-on-scroll.revealed .feature-card,
.reveal-on-scroll.revealed .role-card,
.reveal-on-scroll.revealed .agent-card {
    animation: fadeInUp 0.6s ease forwards;
    opacity: 0;
}

.reveal-on-scroll.revealed .feature-card:nth-child(1),
.reveal-on-scroll.revealed .role-card:nth-child(1),
.reveal-on-scroll.revealed .agent-card:nth-child(1) { animation-delay: 0.1s; }

.reveal-on-scroll.revealed .feature-card:nth-child(2),
.reveal-on-scroll.revealed .role-card:nth-child(2),
.reveal-on-scroll.revealed .agent-card:nth-child(2) { animation-delay: 0.2s; }

.reveal-on-scroll.revealed .feature-card:nth-child(3),
.reveal-on-scroll.revealed .role-card:nth-child(3),
.reveal-on-scroll.revealed .agent-card:nth-child(3) { animation-delay: 0.3s; }

.reveal-on-scroll.revealed .feature-card:nth-child(4),
.reveal-on-scroll.revealed .role-card:nth-child(4),
.reveal-on-scroll.revealed .agent-card:nth-child(4) { animation-delay: 0.4s; }

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

/* =========================================
   TEXT UTILITIES
   ========================================= */
.text-violet {
    color: var(--gradient-violet) !important;
}

.text-blue {
    color: var(--gradient-blue) !important;
}

.border-color {
    border-color: rgba(255, 255, 255, 0.1) !important;
}

/* =========================================
   RESPONSIVE ADJUSTMENTS
   ========================================= */
@media (max-width: 991.98px) {
    .home-redesign .section-padding {
        padding: 60px 0;
    }
    
    .hero-section {
        padding-top: 80px;
        min-height: auto;
    }
    
    .hero-section h1 {
        font-size: 2.2rem;
    }
    
    .card-stack {
        height: 350px;
        margin-top: 40px;
    }
    
    .bg-circle-glow {
        width: 400px;
        height: 400px;
    }
    
    .loop-connector {
        display: none;
    }
}

@media (max-width: 767.98px) {
    .hero-section h1 {
        font-size: 1.8rem;
    }
    
    .stats-row {
        gap: 30px;
    }
    
    .stat-value {
        font-size: 2rem;
    }
    
    .pricing-card.featured {
        transform: none;
    }
    
    .pricing-card.featured:hover {
        transform: translateY(-8px);
    }
}

/* =========================================
   FLOATING DRAGGABLE CUBES ANIMATION
   ========================================= */
.floating-cubes-container {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    overflow: hidden;
    z-index: 10;
}

.floating-cube {
    position: absolute;
    left: var(--start-x, 50%);
    top: var(--start-y, -100px);
    width: 80px;
    height: 80px;
    perspective: 1000px;
    animation: cubeFloat 8s ease-in-out var(--delay, 0s) infinite;
    pointer-events: all;
    cursor: grab;
    transition: transform 0.3s ease;
}

.floating-cube.dragging {
    cursor: grabbing;
    z-index: 1000;
    animation: none;
}

.floating-cube:hover:not(.dragging) {
    transform: scale(1.1);
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: cubeRotate 10s linear infinite;
}

.floating-cube.dragging .cube {
    animation: cubeSpin 0.5s linear infinite;
}

.cube-face {
    position: absolute;
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, rgba(139, 92, 246, 0.9), rgba(59, 130, 246, 0.9));
    border: 2px solid rgba(255, 255, 255, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 0.85rem;
    color: white;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.5);
    box-shadow: 
        inset 0 0 20px rgba(255, 255, 255, 0.1),
        0 0 20px rgba(139, 92, 246, 0.5);
    backdrop-filter: blur(10px);
}

.cube-front  { transform: rotateY(0deg) translateZ(40px); }
.cube-back   { transform: rotateY(180deg) translateZ(40px); }
.cube-right  { transform: rotateY(90deg) translateZ(40px); }
.cube-left   { transform: rotateY(-90deg) translateZ(40px); }
.cube-top    { transform: rotateX(90deg) translateZ(40px); }
.cube-bottom { transform: rotateX(-90deg) translateZ(40px); }

@keyframes cubeFloat {
    0% {
        transform: translateY(var(--start-y, -100px)) translateX(0);
        opacity: 0;
    }
    10% {
        opacity: 1;
    }
    90% {
        opacity: 1;
    }
    100% {
        transform: translateY(calc(100vh + 100px)) translateX(0);
        opacity: 0;
    }
}

@keyframes cubeRotate {
    from { transform: rotateX(0deg) rotateY(0deg); }
    to { transform: rotateX(360deg) rotateY(360deg); }
}

@keyframes cubeSpin {
    from { transform: rotateY(0deg); }
    to { transform: rotateY(360deg); }
}

/* Mobile adjustments for cubes */
@media (max-width: 767.98px) {
    .floating-cube {
        width: 60px;
        height: 60px;
    }
    
    .cube-face {
        width: 60px;
        height: 60px;
        font-size: 0.7rem;
    }
    
    .cube-front  { transform: rotateY(0deg) translateZ(30px); }
    .cube-back   { transform: rotateY(180deg) translateZ(30px); }
    .cube-right  { transform: rotateY(90deg) translateZ(30px); }
    .cube-left   { transform: rotateY(-90deg) translateZ(30px); }
    .cube-top    { transform: rotateX(90deg) translateZ(30px); }
    .cube-bottom { transform: rotateX(-90deg) translateZ(30px); }
}

/* =========================================
   SHIMMER LOADING EFFECT
   ========================================= */
.shimmer {
    background: linear-gradient(90deg, 
        rgba(255, 255, 255, 0.03) 25%, 
        rgba(255, 255, 255, 0.08) 50%, 
        rgba(255, 255, 255, 0.03) 75%
    );
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
}

@keyframes shimmer {
    from { background-position: 200% 0; }
    to { background-position: -200% 0; }
}

/* =========================================
   PULSE ANIMATION
   ========================================= */
.pulse {
    animation: pulse 2s infinite;
}

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

/* =========================================
   BORDER ANIMATION
   ========================================= */
.border-animate {
    position: relative;
}

.border-animate::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border: 2px solid transparent;
    border-radius: inherit;
    background: linear-gradient(var(--bg-dark), var(--bg-dark)) padding-box,
                var(--gradient-primary) border-box;
    mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    animation: borderRotate 4s linear infinite;
}

@keyframes borderRotate {
    from { filter: hue-rotate(0deg); }
    to { filter: hue-rotate(360deg); }
}
