/* 
 * OpenCLM Website - Main Styles
 * Modern, award-worthy design system implementation
 */

/* ===== CSS RESET & BASE ===== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--bg-primary);
    overflow-x: hidden;
}

/* ===== DESIGN TOKENS ===== */
:root {
    /* Color System */
    --primary-50: #eff6ff;
    --primary-100: #dbeafe;
    --primary-500: #3b82f6;
    --primary-600: #2563eb;
    --primary-700: #1d4ed8;
    --primary-800: #1e3a8a;
    --primary-900: #0B1426;
    
    --secondary-400: #10b981;
    --secondary-500: #059669;
    --accent-400: #f59e0b;
    --accent-500: #d97706;
    
    /* Semantic Colors */
    --bg-primary: #ffffff;
    --bg-secondary: #f8fafc;
    --bg-tertiary: #f1f5f9;
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-muted: #64748b;
    --border-light: #e2e8f0;
    --border-medium: #cbd5e1;
    
    /* Typography Scale */
    --text-xs: 0.75rem;
    --text-sm: 0.875rem;
    --text-base: 1rem;
    --text-lg: 1.125rem;
    --text-xl: 1.25rem;
    --text-2xl: 1.5rem;
    --text-3xl: 1.875rem;
    --text-4xl: 2.25rem;
    --text-5xl: 3rem;
    --text-6xl: 3.75rem;
    
    /* Spacing Scale */
    --space-1: 0.25rem;
    --space-2: 0.5rem;
    --space-3: 0.75rem;
    --space-4: 1rem;
    --space-5: 1.25rem;
    --space-6: 1.5rem;
    --space-8: 2rem;
    --space-10: 2.5rem;
    --space-12: 3rem;
    --space-16: 4rem;
    --space-20: 5rem;
    --space-24: 6rem;
    
    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    
    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgb(0 0 0 / 0.05);
    --shadow-md: 0 4px 6px -1px rgb(0 0 0 / 0.1), 0 2px 4px -2px rgb(0 0 0 / 0.1);
    --shadow-lg: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1);
    --shadow-xl: 0 20px 25px -5px rgb(0 0 0 / 0.1), 0 8px 10px -6px rgb(0 0 0 / 0.1);
    
    /* Transitions */
    --transition-fast: 150ms ease-in-out;
    --transition-normal: 250ms ease-in-out;
    --transition-slow: 350ms ease-in-out;
    
    /* Advanced Animation Easing */
    --ease-out-cubic: cubic-bezier(0.33, 1, 0.68, 1);
    --ease-in-out-cubic: cubic-bezier(0.65, 0, 0.35, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
    --ease-in-out-back: cubic-bezier(0.68, -0.55, 0.265, 1.55);
    --ease-spring: cubic-bezier(0.175, 0.885, 0.32, 1.275);
    
    /* Animation Durations */
    --duration-micro: 100ms;
    --duration-fast: 200ms;
    --duration-normal: 300ms;
    --duration-slow: 500ms;
    --duration-slower: 800ms;
    
    /* Z-Index Scale */
    --z-dropdown: 1000;
    --z-sticky: 1020;
    --z-fixed: 1030;
    --z-modal-backdrop: 1040;
    --z-modal: 1050;
    --z-popover: 1060;
    --z-tooltip: 1070;
}

/* ===== UTILITY CLASSES ===== */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

@media (max-width: 768px) {
    .container {
        padding: 0 var(--space-4);
    }
}

.desktop-nav {
    display: flex;
}

@media (max-width: 768px) {
    .desktop-nav {
        display: none;
    }
}

/* ===== TYPOGRAPHY ===== */
h1, h2, h3, h4, h5, h6 {
    font-family: 'Poppins', 'Inter', sans-serif;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.gradient-text {
    background: linear-gradient(135deg, var(--primary-600), var(--secondary-400));
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    font-weight: 800;
}

/* ===== NAVIGATION ===== */
.nav-container {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: var(--z-fixed);
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-light);
    transition: var(--transition-normal);
}

.nav-content {
    display: flex;
    align-items: center;
    justify-content: space-between;
    height: 72px;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-6);
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: var(--space-3);
    font-weight: 700;
    font-size: var(--text-xl);
    color: var(--text-primary);
    text-decoration: none;
}

.logo {
    height: 32px;
    width: auto;
}

.brand-text {
    font-family: 'Poppins', sans-serif;
    font-weight: 800;
    font-size: var(--text-xl);
}

.beta-badge {
    background: var(--accent-400);
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: var(--space-8);
}

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-weight: 500;
    transition: var(--transition-fast);
    position: relative;
}

.nav-link:hover {
    color: var(--primary-600);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--primary-600);
    transition: var(--transition-fast);
}

.nav-link:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

/* Mobile Menu */
.mobile-menu-toggle {
    display: none;
    flex-direction: column;
    gap: 4px;
    background: none;
    border: none;
    padding: var(--space-2);
    cursor: pointer;
}

.hamburger-line {
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    transition: var(--transition-fast);
}

.mobile-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    right: 0;
    background: white;
    border-bottom: 1px solid var(--border-light);
    box-shadow: var(--shadow-lg);
}

.mobile-menu-content {
    padding: var(--space-6);
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.mobile-nav-link {
    color: var(--text-primary);
    text-decoration: none;
    font-weight: 500;
    padding: var(--space-3) 0;
    border-bottom: 1px solid var(--border-light);
}

.mobile-actions {
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    margin-top: var(--space-4);
}

@media (max-width: 768px) {
    .mobile-menu-toggle {
        display: flex;
    }
    
    .nav-content {
        padding: 0 var(--space-4);
    }
}

/* ===== BUTTONS ===== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-2);
    padding: var(--space-3) var(--space-6);
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: var(--text-sm);
    text-decoration: none;
    transition: all var(--transition-fast) var(--ease-out-cubic);
    cursor: pointer;
    border: none;
    position: relative;
    overflow: hidden;
    will-change: transform;
    z-index: 1;
}

/* Magnetic Effect */
.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    background: rgba(255, 255, 255, 0.1);
    border-radius: 50%;
    transition: all 0.6s var(--ease-out-cubic);
    transform: translate(-50%, -50%);
    z-index: -1;
}

.btn:hover::before {
    width: 300%;
    height: 300%;
}

/* Ripple Effect */
.btn-ripple {
    position: absolute;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: scale(0);
    animation: ripple 0.6s linear;
    pointer-events: none;
}

@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

.btn-primary {
    background: var(--primary-600);
    color: white;
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-fast) var(--ease-out-cubic);
}

.btn-primary:hover {
    background: var(--primary-700);
    box-shadow: var(--shadow-lg);
    transform: translateY(-2px) scale(1.02);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
    transition: all var(--duration-micro);
}

.btn-outline {
    background: transparent;
    color: var(--primary-600);
    border: 1px solid var(--primary-600);
    transition: all var(--transition-normal) var(--ease-out-cubic);
}

.btn-outline:hover {
    background: var(--primary-600);
    color: white;
    border-color: var(--primary-600);
    transform: translateY(-1px);
}

/* Animated underline for secondary buttons */
.btn-outline::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    width: 0;
    height: 2px;
    background: var(--primary-600);
    transition: all var(--transition-normal) var(--ease-out-cubic);
    transform: translateX(-50%);
}

.btn-outline:hover::after {
    width: 100%;
}

.btn-large {
    padding: var(--space-4) var(--space-8);
    font-size: var(--text-base);
}

.btn-small {
    padding: var(--space-2) var(--space-4);
    font-size: var(--text-xs);
}

.btn-full {
    width: 100%;
    justify-content: center;
}

.btn-icon {
    width: 16px;
    height: 16px;
}

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

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: -1;
}

.hero-canvas {
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, 
        var(--primary-900) 0%, 
        var(--primary-800) 25%, 
        var(--primary-700) 50%, 
        var(--primary-600) 100%);
    will-change: transform;
}

/* Contract Lifecycle Visualization */
.hero-contract-flow {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 80%;
    height: 60%;
    transform: translate(-50%, -50%);
    pointer-events: none;
    opacity: 0.1;
}

.contract-stage {
    position: absolute;
    width: 120px;
    height: 120px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    border: 2px solid rgba(255, 255, 255, 0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    animation: float 6s ease-in-out infinite;
    backdrop-filter: blur(10px);
}

.contract-stage::before {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    background: radial-gradient(circle at center, 
        rgba(59, 130, 246, 0.3) 0%, 
        rgba(59, 130, 246, 0.1) 50%, 
        transparent 100%);
    animation: pulse 4s ease-in-out infinite;
}

.contract-stage.stage-1 { top: 10%; left: 20%; animation-delay: 0s; }
.contract-stage.stage-2 { top: 30%; left: 60%; animation-delay: 1s; }
.contract-stage.stage-3 { top: 60%; left: 80%; animation-delay: 2s; }
.contract-stage.stage-4 { top: 80%; left: 40%; animation-delay: 3s; }
.contract-stage.stage-5 { top: 50%; left: 10%; animation-delay: 4s; }

.contract-connection {
    position: absolute;
    height: 2px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        rgba(16, 185, 129, 0.6) 50%, 
        transparent 100%);
    animation: flow 8s ease-in-out infinite;
}

.contract-connection::after {
    content: '';
    position: absolute;
    right: -6px;
    top: -3px;
    width: 8px;
    height: 8px;
    background: var(--secondary-400);
    border-radius: 50%;
    box-shadow: 0 0 10px var(--secondary-400);
    animation: glow 2s ease-in-out infinite alternate;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
    padding: var(--space-20) var(--space-6);
    position: relative;
    z-index: 1;
}

.hero-content {
    color: white;
    animation: heroContentEnter var(--duration-slower) var(--ease-out-cubic) forwards;
    opacity: 0;
    transform: translateY(40px);
}

.hero-title {
    font-size: var(--text-6xl);
    font-weight: 900;
    margin-bottom: var(--space-6);
    line-height: 1.1;
    animation: heroTitleEnter var(--duration-slower) var(--ease-out-cubic) 0.2s forwards;
    opacity: 0;
    transform: translateY(60px) scale(0.98);
}

.hero-description {
    font-size: var(--text-xl);
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: var(--space-8);
    line-height: 1.6;
    animation: heroDescEnter var(--duration-normal) var(--ease-out-cubic) 0.4s forwards;
    opacity: 0;
    transform: translateY(40px);
}

.hero-actions {
    display: flex;
    gap: var(--space-4);
    margin-bottom: var(--space-12);
    animation: heroActionsEnter var(--duration-fast) var(--ease-out-cubic) 0.6s forwards;
    opacity: 0;
    transform: translateY(20px);
}

.hero-stats {
    display: flex;
    gap: var(--space-8);
    animation: heroStatsEnter var(--duration-fast) var(--ease-spring) 0.8s forwards;
    opacity: 0;
    transform: translateY(20px);
}

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

.stat-number {
    font-size: var(--text-3xl);
    font-weight: 800;
    color: var(--secondary-400);
    display: block;
}

.stat-label {
    font-size: var(--text-sm);
    color: rgba(255, 255, 255, 0.8);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.hero-visual {
    perspective: 1000px;
}

.hero-dashboard {
    transform: rotateY(-15deg) rotateX(10deg);
    transition: var(--transition-slow);
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
}

.hero-dashboard:hover {
    transform: rotateY(-10deg) rotateX(5deg);
}

.dashboard-image {
    width: 100%;
    height: auto;
    display: block;
}

/* Mobile Hero Adjustments */
@media (max-width: 1024px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: var(--space-12);
        text-align: center;
    }
    
    .hero-title {
        font-size: var(--text-5xl);
    }
    
    .hero-actions {
        flex-direction: column;
        align-items: center;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-dashboard {
        transform: none;
        max-width: 500px;
        margin: 0 auto;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: var(--text-4xl);
    }
    
    .hero-description {
        font-size: var(--text-lg);
    }
    
    .hero-actions {
        gap: var(--space-3);
    }
    
    .hero-stats {
        gap: var(--space-6);
    }
    
    /* Hide contract flow on mobile for performance */
    .hero-contract-flow {
        display: none;
    }
    
    /* Adjust scroll indicators for mobile */
    .scroll-progress-circle {
        width: 50px;
        height: 50px;
        bottom: var(--space-4);
        right: var(--space-4);
    }
    
    .section-breadcrumbs {
        display: none;
    }
}

/* ===== SECTIONS ===== */
.section {
    padding: var(--space-20) 0;
}

.section-header {
    text-align: center;
    max-width: 800px;
    margin: 0 auto var(--space-16);
}

.section-title {
    font-size: var(--text-4xl);
    font-weight: 800;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.section-description {
    font-size: var(--text-lg);
    color: var(--text-secondary);
    line-height: 1.7;
}

/* ===== FEATURES SECTION ===== */
.features-section {
    padding: var(--space-20) 0;
    background: var(--bg-secondary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-16);
}

.feature-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow-sm);
    transition: all var(--transition-normal) var(--ease-out-cubic);
    border: 1px solid var(--border-light);
    position: relative;
    overflow: hidden;
    opacity: 0;
    transform: translateY(40px);
}

/* Scroll reveal animation */
.feature-card.animate-in {
    animation: slideInUp var(--duration-normal) var(--ease-out-cubic) forwards;
}

.feature-card.animate-in:nth-child(1) { animation-delay: 0ms; }
.feature-card.animate-in:nth-child(2) { animation-delay: 100ms; }
.feature-card.animate-in:nth-child(3) { animation-delay: 200ms; }
.feature-card.animate-in:nth-child(4) { animation-delay: 300ms; }
.feature-card.animate-in:nth-child(5) { animation-delay: 400ms; }
.feature-card.animate-in:nth-child(6) { animation-delay: 500ms; }

/* Enhanced hover effects */
.feature-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.12);
}

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

.feature-card:hover::before {
    left: 100%;
}

/* Content reveal on hover */
.feature-card-content {
    position: relative;
    z-index: 2;
    transition: transform var(--transition-normal) var(--ease-out-cubic);
}

.feature-card:hover .feature-card-content {
    transform: translateY(-2px);
}

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

.feature-icon {
    width: 48px;
    height: 48px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-6);
    color: var(--primary-600);
}

.feature-icon svg {
    width: 24px;
    height: 24px;
}

.feature-title {
    font-size: var(--text-xl);
    font-weight: 700;
    margin-bottom: var(--space-3);
    color: var(--text-primary);
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.6;
}

@media (max-width: 768px) {
    .features-grid {
        grid-template-columns: 1fr;
        gap: var(--space-6);
    }
    
    .feature-card {
        padding: var(--space-6);
    }
}

/* ===== BENEFITS SECTION ===== */
.benefits-section {
    padding: var(--space-20) 0;
}

.benefits-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-16);
    align-items: center;
}

.benefit-list {
    display: flex;
    flex-direction: column;
    gap: var(--space-6);
    margin-top: var(--space-8);
}

.benefit-item {
    display: flex;
    gap: var(--space-4);
    align-items: flex-start;
}

.benefit-icon {
    width: 24px;
    height: 24px;
    background: var(--secondary-400);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: var(--text-sm);
    font-weight: 700;
    flex-shrink: 0;
    margin-top: var(--space-1);
}

.benefit-content h3 {
    font-size: var(--text-lg);
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--text-primary);
}

.benefit-content p {
    color: var(--text-secondary);
    line-height: 1.6;
}

.benefits-visual {
    background: var(--bg-tertiary);
    padding: var(--space-8);
    border-radius: var(--radius-2xl);
}

.cost-comparison h3 {
    text-align: center;
    margin-bottom: var(--space-6);
    color: var(--text-primary);
}

.comparison-chart {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.comparison-item {
    display: flex;
    align-items: center;
    gap: var(--space-4);
}

.vendor-name {
    min-width: 120px;
    font-weight: 600;
    color: var(--text-primary);
}

.cost-bar {
    flex: 1;
    height: 40px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    padding: 0 var(--space-4);
    position: relative;
    overflow: hidden;
}

.cost-bar.enterprise {
    background: linear-gradient(90deg, #ef4444, #dc2626);
    color: white;
}

.cost-bar.free {
    background: linear-gradient(90deg, var(--secondary-400), var(--secondary-500));
    color: white;
}

.cost-amount {
    font-weight: 700;
    z-index: 1;
}

@media (max-width: 1024px) {
    .benefits-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
}

/* ===== DEMO SECTION ===== */
.demo-section {
    padding: var(--space-20) 0;
    background: var(--bg-secondary);
}

.demo-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-8);
}

.demo-frame {
    width: 100%;
    max-width: 1000px;
    aspect-ratio: 16/10;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    border: 1px solid var(--border-light);
}

.demo-iframe {
    width: 100%;
    height: 100%;
    border: none;
}

.demo-actions {
    display: flex;
    gap: var(--space-4);
    flex-wrap: wrap;
    justify-content: center;
}

/* ===== DOWNLOAD SECTION ===== */
.download-section {
    padding: var(--space-20) 0;
}

.download-options {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-8);
    margin-top: var(--space-16);
}

.download-card {
    background: white;
    padding: var(--space-8);
    border-radius: var(--radius-xl);
    border: 1px solid var(--border-light);
    text-align: center;
    transition: var(--transition-normal);
}

.download-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.download-icon {
    width: 64px;
    height: 64px;
    background: var(--primary-50);
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-6);
    color: var(--primary-600);
}

.download-icon svg {
    width: 32px;
    height: 32px;
}

.download-card h3 {
    font-size: var(--text-xl);
    margin-bottom: var(--space-3);
}

.download-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-4);
}

.install-command {
    background: var(--bg-tertiary);
    padding: var(--space-3) var(--space-4);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    font-size: var(--text-sm);
    color: var(--text-primary);
    display: block;
    margin: var(--space-4) 0;
    border: 1px solid var(--border-medium);
}

/* ===== FOOTER ===== */
.footer {
    background: var(--primary-900);
    color: white;
    padding: var(--space-20) 0 var(--space-8);
}

.footer-content {
    display: grid;
    grid-template-columns: 1fr 3fr;
    gap: var(--space-16);
    margin-bottom: var(--space-12);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: var(--space-4);
}

.footer-logo {
    height: 32px;
    width: auto;
}

.footer-brand-text {
    font-family: 'Poppins', sans-serif;
    font-size: var(--text-xl);
    font-weight: 800;
    color: white;
}

.footer-tagline {
    color: rgba(255, 255, 255, 0.7);
    font-size: var(--text-sm);
}

.footer-links {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: var(--space-8);
}

.footer-section h3 {
    font-size: var(--text-base);
    font-weight: 600;
    margin-bottom: var(--space-4);
    color: white;
}

.footer-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: var(--space-2);
}

.footer-list a {
    color: rgba(255, 255, 255, 0.7);
    text-decoration: none;
    font-size: var(--text-sm);
    transition: var(--transition-fast);
}

.footer-list a:hover {
    color: white;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: var(--space-8);
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.footer-copyright p {
    color: rgba(255, 255, 255, 0.6);
    font-size: var(--text-sm);
}

.footer-social {
    display: flex;
    gap: var(--space-4);
}

.social-link {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.1);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    color: rgba(255, 255, 255, 0.7);
    transition: var(--transition-fast);
}

.social-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white;
}

.social-link svg {
    width: 20px;
    height: 20px;
}

/* Mobile Footer */
@media (max-width: 1024px) {
    .footer-content {
        grid-template-columns: 1fr;
        gap: var(--space-12);
    }
    
    .footer-links {
        grid-template-columns: repeat(2, 1fr);
        gap: var(--space-6);
    }
}

@media (max-width: 640px) {
    .footer-links {
        grid-template-columns: 1fr;
    }
    
    .footer-bottom {
        flex-direction: column;
        gap: var(--space-4);
        text-align: center;
    }
}

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

@keyframes fadeInLeft {
    from {
        opacity: 0;
        transform: translateX(-30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

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

/* Advanced Hero Animations */
@keyframes heroContentEnter {
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes heroTitleEnter {
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

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

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

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

@keyframes float {
    0%, 100% { 
        transform: translateY(0px) rotate(0deg); 
    }
    33% { 
        transform: translateY(-10px) rotate(120deg); 
    }
    66% { 
        transform: translateY(5px) rotate(240deg); 
    }
}

@keyframes pulse {
    0%, 100% { 
        transform: scale(1); 
        opacity: 0.3; 
    }
    50% { 
        transform: scale(1.1); 
        opacity: 0.6; 
    }
}

@keyframes flow {
    0% { 
        width: 0%; 
        left: 0; 
    }
    50% { 
        width: 100%; 
        left: 0; 
    }
    100% { 
        width: 0%; 
        left: 100%; 
    }
}

@keyframes glow {
    from { 
        box-shadow: 0 0 5px var(--secondary-400); 
    }
    to { 
        box-shadow: 0 0 20px var(--secondary-400), 0 0 30px var(--secondary-500); 
    }
}

.animate-fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

.animate-fade-in-left {
    animation: fadeInLeft 0.6s ease-out;
}

.animate-fade-in-right {
    animation: fadeInRight 0.6s ease-out;
}

/* ===== RESPONSIVE DESIGN ===== */
@media (max-width: 768px) {
    :root {
        --space-20: 3rem;
        --space-16: 2.5rem;
        --space-12: 2rem;
    }
    
    .section-title {
        font-size: var(--text-3xl);
    }
    
    .section-description {
        font-size: var(--text-base);
    }
}

/* ===== ACCESSIBILITY ===== */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }
    
    html {
        scroll-behavior: auto;
    }
    
    .hero-contract-flow,
    .contract-stage,
    .contract-connection {
        display: none;
    }
}

/* ===== SCROLL INDICATORS ===== */
.scroll-progress {
    position: fixed;
    top: 72px;
    left: 0;
    width: 100%;
    height: 4px;
    background: rgba(255, 255, 255, 0.1);
    z-index: var(--z-fixed);
}

.scroll-progress-bar {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-600), var(--secondary-400));
    width: 0%;
    transition: width 0.1s ease;
}

.scroll-progress-circle {
    position: fixed;
    bottom: var(--space-6);
    right: var(--space-6);
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-fast) var(--ease-out-cubic);
    z-index: var(--z-fixed);
    backdrop-filter: blur(10px);
}

.scroll-progress-circle:hover {
    transform: scale(1.1);
    box-shadow: var(--shadow-xl);
}

.scroll-progress-circle svg {
    width: 24px;
    height: 24px;
    transform: rotate(-90deg);
}

.scroll-progress-circle .progress-ring {
    fill: none;
    stroke: var(--border-light);
    stroke-width: 3;
}

.scroll-progress-circle .progress-ring-fill {
    fill: none;
    stroke: var(--primary-600);
    stroke-width: 3;
    stroke-linecap: round;
    stroke-dasharray: 126;
    stroke-dashoffset: 126;
    transition: stroke-dashoffset 0.1s ease;
}

.section-breadcrumbs {
    position: fixed;
    top: 50%;
    right: var(--space-6);
    transform: translateY(-50%);
    display: flex;
    flex-direction: column;
    gap: var(--space-3);
    z-index: var(--z-fixed);
}

.breadcrumb-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    cursor: pointer;
    transition: all var(--transition-fast);
    position: relative;
}

.breadcrumb-dot::before {
    content: attr(data-section);
    position: absolute;
    right: calc(100% + var(--space-3));
    top: 50%;
    transform: translateY(-50%);
    background: rgba(0, 0, 0, 0.8);
    color: white;
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    font-size: var(--text-xs);
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.breadcrumb-dot:hover::before {
    opacity: 1;
}

.breadcrumb-dot.active {
    background: var(--primary-600);
    transform: scale(1.3);
}

.breadcrumb-dot:hover {
    background: var(--primary-500);
    transform: scale(1.2);
}

/* Focus styles */
*:focus-visible {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

/* High contrast support */
@media (prefers-contrast: high) {
    :root {
        --border-light: #000000;
        --text-secondary: #000000;
    }
}

/* ===== LOADING SCREEN ===== */
.loading-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--primary-900), var(--primary-700));
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 1;
    transition: opacity 0.8s ease-out;
}

.loading-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

.loading-logo {
    width: 80px;
    height: 80px;
    margin-bottom: var(--space-6);
    animation: logoFloat 2s ease-in-out infinite alternate;
}

.loading-text {
    color: white;
    font-size: var(--text-xl);
    font-weight: 600;
    margin-bottom: var(--space-4);
    opacity: 0.9;
}

.loading-progress {
    width: 200px;
    height: 4px;
    background: rgba(255, 255, 255, 0.2);
    border-radius: 2px;
    overflow: hidden;
    margin-bottom: var(--space-4);
}

.loading-progress-bar {
    width: 0%;
    height: 100%;
    background: linear-gradient(90deg, var(--secondary-400), white);
    border-radius: 2px;
    transition: width 0.3s ease-out;
}

.loading-dots {
    display: flex;
    gap: var(--space-2);
}

.loading-dot {
    width: 8px;
    height: 8px;
    background: white;
    border-radius: 50%;
    opacity: 0.4;
    animation: dotPulse 1.5s infinite ease-in-out;
}

.loading-dot:nth-child(1) { animation-delay: 0s; }
.loading-dot:nth-child(2) { animation-delay: 0.3s; }
.loading-dot:nth-child(3) { animation-delay: 0.6s; }

@keyframes logoFloat {
    0% { transform: translateY(-10px) scale(1); }
    100% { transform: translateY(10px) scale(1.05); }
}

@keyframes dotPulse {
    0%, 80%, 100% { opacity: 0.4; transform: scale(1); }
    40% { opacity: 1; transform: scale(1.2); }
}

/* Body states */
body.loading {
    overflow: hidden;
}

body.loaded .loading-screen {
    opacity: 0;
    pointer-events: none;
}

/* ===== ACCESSIBILITY ENHANCEMENTS ===== */
.skip-link {
    position: absolute;
    top: -40px;
    left: 6px;
    background: var(--primary-600);
    color: white;
    padding: 8px;
    text-decoration: none;
    border-radius: var(--radius-sm);
    z-index: 1000;
    transition: top 0.3s;
}

.skip-link:focus {
    top: 6px;
}

/* Focus indicators */
button:focus,
a:focus,
input:focus {
    outline: 2px solid var(--primary-600);
    outline-offset: 2px;
}

/* High contrast mode support */
@media (prefers-contrast: high) {
    :root {
        --text-primary: #000000;
        --text-secondary: #000000;
        --bg-primary: #ffffff;
        --border-light: #000000;
    }
    
    .btn-outline {
        border-width: 2px;
    }
}

/* ===== PERFORMANCE OPTIMIZATIONS ===== */
.hero-canvas {
    will-change: transform;
}

.feature-card,
.download-card {
    will-change: transform;
}

/* ===== INTERACTIVE WORKFLOW SIMULATOR ===== */
.workflow-simulator-section {
    padding: var(--space-20) 0;
    background: linear-gradient(135deg, var(--bg-secondary) 0%, var(--bg-tertiary) 100%);
}

.workflow-simulator {
    background: white;
    border-radius: var(--radius-2xl);
    padding: var(--space-8);
    box-shadow: var(--shadow-xl);
    margin: var(--space-8) 0;
}

.workflow-stages {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: var(--space-6);
    margin-bottom: var(--space-8);
}

.workflow-stage {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    box-shadow: var(--shadow-sm);
    border: 2px solid transparent;
    transition: all var(--transition-normal) var(--ease-out-cubic);
    opacity: 0;
    animation: slideInUp var(--duration-normal) var(--ease-out-cubic) forwards;
}

.workflow-stage.active {
    border-color: var(--stage-color, var(--primary-600));
    box-shadow: 0 0 20px rgba(59, 130, 246, 0.3);
    transform: scale(1.05);
}

.stage-icon {
    font-size: 2rem;
    text-align: center;
    margin-bottom: var(--space-3);
}

.stage-name {
    font-weight: 600;
    text-align: center;
    margin-bottom: var(--space-4);
    color: var(--text-primary);
}

.stage-drop-zone {
    min-height: 120px;
    border: 2px dashed var(--border-medium);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    position: relative;
    transition: all var(--transition-fast);
}

.stage-drop-zone.drag-over {
    border-color: var(--primary-600);
    background: rgba(59, 130, 246, 0.05);
    border-style: solid;
}

.drop-indicator {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    color: var(--text-muted);
    font-size: var(--text-sm);
    pointer-events: none;
    transition: opacity var(--transition-fast);
}

.stage-drop-zone:has(.contract-card) .drop-indicator {
    opacity: 0;
}

.contract-cards {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: var(--space-4);
    margin-bottom: var(--space-8);
}

.contract-card {
    background: white;
    border: 1px solid var(--border-light);
    border-radius: var(--radius-lg);
    padding: var(--space-4);
    cursor: move;
    transition: all var(--transition-normal) var(--ease-out-cubic);
    display: flex;
    align-items: center;
    gap: var(--space-3);
    opacity: 0;
    animation: slideInUp var(--duration-normal) var(--ease-out-cubic) forwards;
}

.contract-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.contract-card.dragging {
    opacity: 0.7;
    transform: rotate(5deg) scale(1.05);
    z-index: 1000;
}

.contract-icon {
    font-size: 1.5rem;
    flex-shrink: 0;
}

.contract-details {
    flex: 1;
}

.contract-name {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.contract-type {
    font-size: var(--text-sm);
    color: var(--text-secondary);
    text-transform: capitalize;
    margin-bottom: var(--space-1);
}

.contract-status {
    font-size: var(--text-xs);
    padding: var(--space-1) var(--space-2);
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    font-weight: 600;
    letter-spacing: 0.05em;
    background: var(--bg-tertiary);
    color: var(--text-muted);
    display: inline-block;
}

.contract-status.status-review { background: #fef3c7; color: #d97706; }
.contract-status.status-approval { background: #d1fae5; color: #059669; }
.contract-status.status-signature { background: #e0e7ff; color: #7c3aed; }
.contract-status.status-storage { background: #cffafe; color: #0891b2; }

.workflow-timeline {
    background: var(--bg-secondary);
    border-radius: var(--radius-xl);
    padding: var(--space-6);
    margin-top: var(--space-6);
}

.timeline-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-6);
}

.timeline-header h3 {
    margin: 0;
    color: var(--text-primary);
}

.timeline-controls {
    display: flex;
    gap: var(--space-3);
}

.timeline-track {
    position: relative;
    height: 8px;
    background: var(--border-light);
    border-radius: var(--radius-sm);
    margin-bottom: var(--space-4);
    overflow: hidden;
}

.timeline-progress {
    height: 100%;
    background: linear-gradient(90deg, var(--primary-600), var(--secondary-400));
    border-radius: var(--radius-sm);
    width: 0%;
    transition: width 0.8s var(--ease-out-cubic);
}

.timeline-info {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.current-step {
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: var(--space-1);
}

.step-details {
    color: var(--text-secondary);
    font-size: var(--text-sm);
}

/* Contract connection animation */
@keyframes contractFlow {
    0% { 
        width: 0%;
        opacity: 1;
    }
    50% { 
        opacity: 1;
    }
    100% { 
        width: 100%;
        opacity: 0;
    }
}

.contract-connection-line {
    background: linear-gradient(90deg, 
        var(--primary-600) 0%, 
        var(--secondary-400) 50%, 
        var(--primary-600) 100%);
    box-shadow: 0 0 10px rgba(59, 130, 246, 0.5);
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .workflow-stages {
        grid-template-columns: 1fr;
        gap: var(--space-4);
    }
    
    .contract-cards {
        grid-template-columns: 1fr;
    }
    
    .timeline-header {
        flex-direction: column;
        gap: var(--space-3);
        align-items: flex-start;
    }
    
    .timeline-controls {
        width: 100%;
        justify-content: center;
    }
    
    .timeline-info {
        flex-direction: column;
        gap: var(--space-2);
    }
}

@media (max-width: 640px) {
    .workflow-simulator {
        margin: var(--space-4) -var(--space-4);
        border-radius: 0;
    }
    
    .contract-card {
        flex-direction: column;
        text-align: center;
        padding: var(--space-6);
    }
    
    .contract-details {
        margin: var(--space-3) 0;
    }
}

/* ===== ENHANCED CAROUSEL ===== */
.demo-carousel {
    position: relative;
    background: white;
    border-radius: var(--radius-2xl);
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    margin: var(--space-8) 0;
}

.carousel-wrapper {
    position: relative;
    width: 100%;
    height: 400px;
    overflow: hidden;
}

.carousel-track {
    position: relative;
    width: 100%;
    height: 100%;
}

.carousel-slide {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    opacity: 0;
    transform: translateX(100%);
    transition: none;
}

.carousel-slide.active {
    opacity: 1;
    transform: translateX(0);
}

.slide-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    height: 100%;
    align-items: center;
    padding: var(--space-8);
    gap: var(--space-8);
}

.slide-visual {
    text-align: center;
    position: relative;
}

.slide-icon {
    font-size: 4rem;
    margin-bottom: var(--space-6);
    animation: float 6s ease-in-out infinite;
}

.slide-features {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: var(--space-3);
}

.feature-badge {
    background: var(--primary-50);
    color: var(--primary-700);
    padding: var(--space-2) var(--space-3);
    border-radius: var(--radius-md);
    font-size: var(--text-sm);
    font-weight: 500;
    border: 1px solid var(--primary-200);
    animation: fadeInUp 0.6s ease-out backwards;
}

.feature-badge:nth-child(1) { animation-delay: 0.1s; }
.feature-badge:nth-child(2) { animation-delay: 0.2s; }
.feature-badge:nth-child(3) { animation-delay: 0.3s; }

.slide-text {
    padding: var(--space-4);
}

.slide-title {
    font-size: var(--text-3xl);
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-4);
    animation: slideInUp 0.8s ease-out backwards;
}

.slide-description {
    color: var(--text-secondary);
    font-size: var(--text-lg);
    line-height: 1.6;
    margin-bottom: var(--space-6);
    animation: slideInUp 0.8s ease-out 0.1s backwards;
}

.slide-cta {
    animation: slideInUp 0.8s ease-out 0.2s backwards;
}

/* Carousel Navigation */
.carousel-arrow {
    position: absolute;
    top: 50%;
    transform: translateY(-50%);
    width: 50px;
    height: 50px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-normal) var(--ease-out-cubic);
    z-index: 10;
    box-shadow: var(--shadow-md);
}

.carousel-arrow:hover {
    background: white;
    transform: translateY(-50%) scale(1.1);
    box-shadow: var(--shadow-lg);
}

.carousel-arrow svg {
    width: 20px;
    height: 20px;
    color: var(--text-primary);
}

.carousel-prev {
    left: var(--space-6);
}

.carousel-next {
    right: var(--space-6);
}

.carousel-dots {
    position: absolute;
    bottom: var(--space-6);
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    gap: var(--space-3);
    z-index: 10;
}

.carousel-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    border: 2px solid rgba(255, 255, 255, 0.8);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.carousel-dot.active {
    background: var(--primary-600);
    border-color: var(--primary-600);
    transform: scale(1.3);
}

.carousel-dot:hover {
    background: rgba(255, 255, 255, 0.8);
    transform: scale(1.1);
}

.carousel-controls {
    position: absolute;
    top: var(--space-6);
    right: var(--space-6);
    z-index: 10;
}

.carousel-play-btn {
    width: 40px;
    height: 40px;
    background: rgba(255, 255, 255, 0.9);
    border: 1px solid var(--border-light);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all var(--transition-fast);
    font-size: 14px;
}

.carousel-play-btn:hover {
    background: white;
    transform: scale(1.1);
}

/* Mobile Carousel Styles */
@media (max-width: 768px) {
    .carousel-wrapper {
        height: auto;
        min-height: 300px;
    }
    
    .slide-content {
        grid-template-columns: 1fr;
        padding: var(--space-6);
        gap: var(--space-6);
        text-align: center;
    }
    
    .slide-icon {
        font-size: 3rem;
        margin-bottom: var(--space-4);
    }
    
    .slide-title {
        font-size: var(--text-2xl);
    }
    
    .slide-description {
        font-size: var(--text-base);
    }
    
    .carousel-arrow {
        width: 40px;
        height: 40px;
    }
    
    .carousel-prev {
        left: var(--space-4);
    }
    
    .carousel-next {
        right: var(--space-4);
    }
}

/* Optimize font loading */
@font-face {
    font-family: 'Inter';
    font-display: swap;
}

@font-face {
    font-family: 'Poppins';
    font-display: swap;
}

/* ===== DARK MODE SUPPORT ===== */
@media (prefers-color-scheme: dark) {
    :root {
        --bg-primary: #0f172a;
        --bg-secondary: #1e293b;
        --bg-tertiary: #334155;
        --text-primary: #f1f5f9;
        --text-secondary: #cbd5e1;
        --text-muted: #94a3b8;
        --border-light: #334155;
        --border-medium: #475569;
    }
    
    .nav-container {
        background: rgba(15, 23, 42, 0.95);
        border-bottom-color: var(--border-light);
    }
    
    .feature-card,
    .download-card {
        background: var(--bg-secondary);
        border-color: var(--border-light);
    }
    
    .mobile-menu {
        background: var(--bg-primary);
    }
}