/* Reset and Base Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

/* Fix for common-header spacing */
#common-header {
    min-height: 0;
    height: auto;
    margin: 0;
    padding: 0;
    display: block;
}

/* Ensure script tags are never visible */
script {
    display: none !important;
}

html, body {
    width: 100%;
    overflow-x: hidden;
}

:root {
    /* Core Brand Colors */
    --primary-blue: #2F6BFF;
    --primary-blue-dark: #1E4FD8;
    --primary-blue-light: #5B8AFF;
    
    /* Gradient Colors */
    --gradient-start: #E8E5FF;
    --gradient-mid: #F0F2FF;
    --gradient-end: #F8F9FF;
    
    /* Neutral Colors */
    --white: #FFFFFF;
    --off-white: #FAFBFF;
    --light-grey: #F5F5F7;
    --medium-grey: #E5E5E9;
    --dark-grey: #71717A;
    --black: #1C1C1E;
    
    /* Semantic Colors */
    --success: #22C55E;
    --warning: #F59E0B;
    --error: #EF4444;
    
    /* Default Use Case Colors (fallbacks) */
    --accent-color: #10B981;
    --secondary-accent: #F59E0B;
    --tertiary-accent: #8B5CF6;
    
    /* Spacing */
    --space-1: 0.5rem;
    --space-2: 1rem;
    --space-3: 1.5rem;
    --space-4: 2rem;
    --space-5: 2.5rem;
    --space-6: 3rem;
    --space-8: 4rem;
    --space-10: 5rem;
    --space-12: 6rem;
    --space-16: 8rem;
    
    /* Font Families */
    --font-headings: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-body: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    --font-brand: 'Righteous', cursive;
    --font-primary: 'Inter Tight', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif; /* For backward compatibility */
    
    /* Typography Scale */
    --font-size-h1: 3rem;                            /* 48px */
    --font-size-h2: 2rem;                            /* 32px */
    --font-size-h3: 1.5rem;                          /* 24px */
    --font-size-body: 1rem;                          /* 16px */
    --font-size-body-lg: 1.125rem;                   /* 18px */
    --font-size-caption: 0.875rem;                   /* 14px */
    
    /* Font Weights */
    --font-weight-regular: 400;
    --font-weight-medium: 500;
    --font-weight-semibold: 600;
    --font-weight-bold: 700;
}

/* Redline styles for problematic claims */
.redline-claim {
    color: #EF4444 !important;
    text-decoration: line-through !important;
    background-color: rgba(239, 68, 68, 0.1) !important;
    position: relative;
}

.redline-claim::after {
    content: " [NEEDS REVIEW]";
    color: #EF4444;
    font-size: 0.75em;
    font-weight: 600;
    text-decoration: none;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    font-size: var(--font-size-body);
    line-height: 1.6;
    color: var(--black);
    background: var(--white);
}

/* Ensure all text elements use Inter Tight */
p, span, div, li, a, button, input, textarea, select {
    font-family: var(--font-body) !important;
}

/* Bootstrap Navbar Customizations */
/* Old navbar styles moved to Bootstrap compatibility section below */

.btn-primary {
    background: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    font-weight: 600 !important;
    color: white !important;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(47, 107, 255, 0.2) !important;
    border: none !important;
}

.btn-primary:hover {
    background: var(--primary-blue-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3) !important;
    color: white !important;
}

.btn-primary:active,
.btn-primary:focus {
    background: var(--primary-blue-dark) !important;
    box-shadow: 0 0 0 0.2rem rgba(47, 107, 255, 0.25) !important;
    color: white !important;
}

.btn-outline-primary {
    color: var(--primary-blue) !important;
    border-color: var(--primary-blue) !important;
    background: transparent !important;
    font-weight: 600 !important;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    border-width: 2px !important;
}

.btn-outline-primary:hover {
    background: rgba(47, 107, 255, 0.08) !important;
    border-color: var(--primary-blue-dark) !important;
    color: var(--primary-blue-dark) !important;
    transform: translateY(-1px) !important;
    box-shadow: 0 2px 8px rgba(47, 107, 255, 0.15) !important;
}

/* Ensure content doesn't hide behind fixed navbar */
body {
    padding-top: 72px !important;
}

/* Language Selector Styling */
#language-selector .btn-link {
    border: none !important;
    background: none !important;
    box-shadow: none !important;
    text-decoration: none !important;
    color: var(--dark-grey) !important;
    transition: color 0.2s ease;
}

#language-selector .btn-link:hover {
    color: var(--primary-blue) !important;
}

#language-selector .btn-link:focus {
    box-shadow: none !important;
}

/* Custom chevron instead of Bootstrap caret */
#lang-current::after {
    display: none;
}

#language-selector .dropdown-menu {
    border: 1px solid var(--medium-grey);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    padding: 0.5rem 0;
    min-width: 200px;
    display: none;
}

#language-selector .dropdown-menu.show {
    display: block;
}

#language-selector .dropdown-item {
    padding: 0.5rem 1rem;
    font-size: 0.875rem;
    transition: background-color 0.2s ease;
}

#language-selector .dropdown-item:hover {
    background-color: var(--light-grey);
    color: var(--primary-blue);
}

/* Old mobile styles removed */
@media (max-width: 991px) {
    /* Old navbar styles moved to Bootstrap section below */
    
    .navbar-nav .nav-link {
        padding: 1rem 0 !important;
        border-bottom: 1px solid var(--light-grey);
        color: var(--black) !important;
        font-weight: 500;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary-blue) !important;
        background: var(--light-grey);
    }
    
    .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0;
        margin-top: 1rem;
    }
    
    /* Style buttons like menu items in mobile */
    .d-flex.align-items-center.gap-3 .btn {
        background: none !important;
        border: none !important;
        color: var(--black) !important;
        text-align: left !important;
        padding: 1rem 0 !important;
        border-radius: 0 !important;
        font-weight: 500 !important;
        border-bottom: 1px solid var(--light-grey) !important;
        box-shadow: none !important;
        text-decoration: none !important;
        font-size: 1rem !important;
        width: 100% !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        justify-content: flex-start !important;
    }
    
    .d-flex.align-items-center.gap-3 .btn:hover {
        background: var(--light-grey) !important;
        color: var(--primary-blue) !important;
        transform: none !important;
    }
    
    /* Language selector in mobile */
    #language-selector {
        margin-top: 1rem !important;
        margin-left: 0 !important;
        align-self: flex-start;
    }
    
    #language-selector .btn-link {
        color: var(--black) !important;
        text-align: left !important;
        padding: 1rem 0 !important;
        font-weight: 500 !important;
        min-height: 48px !important;
        display: flex !important;
        align-items: center !important;
        width: 100% !important;
    }
}

/* Typography */
h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-headings);
    line-height: 1.2;
    color: var(--black);
    letter-spacing: -0.01em;
}

h1 {
    font-size: var(--font-size-h1);
    font-weight: 700; /* Inter Bold */
    letter-spacing: -0.02em;
}

h2 {
    font-size: var(--font-size-h2);
    font-weight: 600; /* Inter Semibold */
    letter-spacing: -0.01em;
}

h3 {
    font-size: var(--font-size-h3);
    font-weight: 500; /* Inter Medium */
}

p {
    color: var(--dark-grey);
    line-height: 1.7;
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.2s ease;
}

/* Container */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 0 1.5rem;
    }
}

@media (min-width: 1024px) {
    .container {
        padding: 0 2rem;
    }
}

/* Navigation */
/* Bootstrap navbar compatibility overrides */
.navbar.navbar-light {
    background: rgba(255,255,255,0.95) !important;
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--medium-grey);
    z-index: 1000 !important;
}

.navbar.navbar-light .navbar-brand {
    font-family: "Righteous", sans-serif !important;
    font-size: 1.5rem !important;
    font-weight: 400 !important;
    color: var(--primary-blue) !important;
}

.navbar.navbar-light .navbar-nav .nav-link {
    color: var(--dark-grey) !important;
    font-weight: 500 !important;
    padding: 0.5rem 1rem !important;
    transition: color 0.2s ease !important;
}

.navbar.navbar-light .navbar-nav .nav-link:hover {
    color: var(--primary-blue) !important;
}

/* Ensure proper positioning */
body.has-navbar {
    padding-top: 72px;
}

/* Mobile Bootstrap navbar fixes - ACTIVE VERSION */
@media (max-width: 991px) {
    .navbar-collapse {
        background: white !important;
        margin-top: 1rem;
        padding: 1rem;
        border-radius: 8px;
        box-shadow: 0 4px 12px rgba(0,0,0,0.1);
        border-top: 1px solid var(--medium-grey);
    }
    
    .navbar-nav .nav-link {
        padding: 0.75rem 1rem !important;
        border-bottom: 1px solid var(--light-grey);
        color: var(--black) !important;
        font-weight: 500;
        min-height: 48px;
        display: flex;
        align-items: center;
    }
    
    .navbar-nav .nav-link:hover {
        color: var(--primary-blue) !important;
        background: var(--light-grey);
    }
    
    .navbar-nav .nav-link:last-child {
        border-bottom: none;
    }
    
    /* Action buttons in mobile */
    .d-flex.align-items-center.gap-3 {
        flex-direction: column;
        align-items: stretch !important;
        gap: 0.5rem;
        margin-top: 1rem;
    }
    
    .d-flex.align-items-center.gap-3 .btn {
        width: 100% !important;
        text-align: center !important;
        margin-bottom: 0.5rem;
    }
}

/* Old hamburger and mobile menu styles removed - Bootstrap handles responsive navigation */

/* Hero Section */
.hero-section {
    position: relative;
    padding: 140px 20px 100px;
    background: radial-gradient(circle at 40% 30%, #2f6bff 0%, #1c2b7d 100%);
    z-index: 1;
    overflow: visible;
    color: white;
}

.hero-background {
    position: absolute;
    inset: 0;
    z-index: 0;
    pointer-events: none;
    overflow: hidden;
}

.hero-svg {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
}

.dot-pattern {
    position: absolute;
    top: 40px;
    left: 60px;
    width: 200px;
    height: 200px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.3) 1px, transparent 1px);
    background-size: 16px 16px;
    z-index: 10;
    opacity: 0.4;
    pointer-events: none;
}

.dot-pattern-right {
    position: absolute;
    top: 50%;
    right: 80px;
    width: 150px;
    height: 150px;
    background-image: radial-gradient(rgba(255, 255, 255, 0.25) 1px, transparent 1px);
    background-size: 20px 20px;
    z-index: 10;
    opacity: 0.3;
    pointer-events: none;
    transform: translateY(-50%);
}

.hero-container {
    position: relative;
    z-index: 2;
    text-align: center;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
}

.hero-wave-wrapper {
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 120px;
    line-height: 0;
    overflow: hidden;
    z-index: 5;
    pointer-events: none;
}

.hero-wave-svg {
    display: block;
    width: 100%;
    height: 100%;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    padding: var(--space-8) 0;
    position: relative;
    z-index: 3;
}

.hero-title {
    font-family: 'Inter', sans-serif;
    font-size: clamp(36px, 9vw, 80px);
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 24px;
    color: white;
    letter-spacing: -0.02em;
}

.fade-muted,
.text-muted {
    color: #b9a9b0 !important; /* muted purple-gray */
}

.highlight {
    color: #ffffff;
    text-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.hero-subtitle {
    font-size: 20px;
    font-weight: 400;
    color: rgba(255, 255, 255, 0.9);
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.hero-cta-group {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    padding: 12px 24px;
    font-size: 16px;
    font-weight: 600;
    border-radius: 8px;
    display: inline-block;
    transition: all 0.2s ease-in-out;
    cursor: pointer;
    text-decoration: none;
}

/* Hero section button styles */
.hero-cta-group .btn-primary {
    background: white !important;
    color: var(--primary-blue) !important;
    border: none !important;
    margin-right: 12px;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1) !important;
}

.hero-cta-group .btn-primary:hover {
    background: #f0f2ff !important;
    color: var(--primary-blue-dark) !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.15) !important;
}

.hero-cta-group .btn-secondary {
    background: transparent !important;
    color: white !important;
    border: 2px solid white !important;
    padding: 0.875rem 2rem !important;
    border-radius: 8px !important;
    font-weight: 600 !important;
    font-size: 1rem !important;
    transition: all 0.2s ease !important;
}

.hero-cta-group .btn-secondary:hover {
    background: rgba(255, 255, 255, 0.1) !important;
    color: white !important;
    transform: translateY(-2px) !important;
    box-shadow: 0 4px 16px rgba(255, 255, 255, 0.2) !important;
}

/* Default button styles for other sections */
.btn-primary {
    background: var(--primary-blue);
    color: white;
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: 0 2px 4px rgba(47, 107, 255, 0.2);
}

.btn-primary:hover {
    background: var(--primary-blue-dark);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 107, 255, 0.3);
}

.btn-secondary {
    background: transparent;
    color: var(--primary-blue);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 600;
    font-size: 1rem;
    border: 2px solid var(--primary-blue);
    cursor: pointer;
    transition: all 0.2s ease;
}

.btn-secondary:hover {
    background: var(--primary-blue);
    color: white;
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(47, 107, 255, 0.2);
}

/* Tertiary Button */
.btn-tertiary {
    background: transparent;
    color: var(--dark-grey);
    padding: 0.875rem 2rem;
    border-radius: 8px;
    font-weight: 500;
    font-size: 1rem;
    border: none;
    cursor: pointer;
    transition: all 0.2s ease;
    text-decoration: underline;
    text-underline-offset: 4px;
}

.btn-tertiary:hover {
    color: var(--primary-blue);
    text-decoration-color: var(--primary-blue);
    transform: translateY(-1px);
}

.btn-lg {
    padding: 1rem 2.5rem;
    font-size: 1.125rem;
}

/* Process Section */
.process-section {
    padding: var(--space-12) 0;
    background: linear-gradient(to bottom, rgba(47, 107, 255, 0.01) 0%, rgba(47, 107, 255, 0.02) 50%, #ffffff 100%);
    position: relative;
    z-index: 1;
}

.process-section .section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.process-section .section-header h2 {
    margin-bottom: var(--space-2);
    color: var(--black);
}

.process-section .section-header p {
    font-size: 1.25rem;
    color: var(--dark-grey);
}

/* Hero Visual - Now used in process section */
.hero-visual {
    display: none;
}

.hero-visualization {
    display: flex;
    justify-content: center;
    align-items: center;
    width: 100%;
    padding: 0 var(--space-2);
}

.process-section .hero-visualization {
    display: flex;
}

.process-flow {
    display: flex !important;
    align-items: center;
    justify-content: center !important;
    gap: var(--space-4);
    max-width: 1000px;
    width: 100%;
    margin: 0 auto;
}

.process-stage {
    text-align: center;
    padding: var(--space-5);
    background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-radius: 24px;
    border: 1px solid rgba(255, 255, 255, 0.6);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.04);
    width: 320px;
    height: 320px;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    transition: all 0.3s ease;
    flex-shrink: 0;
}

.process-stage:hover {
    transform: translateY(-6px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    border-color: rgba(255, 255, 255, 0.8);
    background: rgba(255, 255, 255, 0.6);
}

.stage-header {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: var(--space-2);
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-2);
    border-bottom: 1px solid rgba(180, 140, 100, 0.25);
}

.stage-header i {
    width: 26px;
    height: 26px;
    color: #A67C52;
}

.stage-header span {
    font-size: 1.1375rem;
    font-weight: 600;
    color: tomato;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.stage-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    height: 220px;
    overflow: hidden;
    position: relative;
}

.rotating-content {
    position: absolute;
    width: 100%;
    height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    opacity: 0;
    transform: translateY(20px);
    transition: all 0.6s ease;
}

.rotating-content.active {
    opacity: 1;
    transform: translateY(0);
}

.content-label {
    font-size: 1rem;
    font-weight: 600;
    color: var(--black);
    margin-bottom: var(--space-2);
}

.content-detail {
    font-size: 0.875rem;
    color: var(--dark-grey);
    line-height: 1.4;
    text-align: center;
}

.stage-label {
    margin: var(--space-2) 0 var(--space-1);
    font-size: 0.875rem;
    color: var(--black);
    font-weight: 600;
    text-align: center;
    line-height: 1.3;
}

.process-description {
    margin: 0;
    font-size: 0.75rem;
    color: #9CA3AF !important;
    font-weight: 400;
    text-align: center;
    line-height: 1.4;
    font-style: italic;
}

.stage-content p {
    margin: var(--space-2) 0 0;
    font-size: 0.875rem;
    color: var(--dark-grey);
    font-weight: 500;
    text-align: center;
    line-height: 1.3;
}

/* Document Stack Animation */
.document-stack {
    position: relative;
    width: 90px;
    height: 70px;
    margin: 0 auto;
}

.doc-page {
    position: absolute;
    width: 70px;
    height: 50px;
    background: white;
    border: 2px solid var(--medium-grey);
    border-radius: 6px;
    transition: all 0.3s ease;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.doc-page:nth-child(1) {
    top: 0;
    left: -12px;
    z-index: 1;
    opacity: 0.8;
    background: #F5F5F5;
    transform: rotate(-4deg);
    border-color: #D1D5DB;
}

.doc-page:nth-child(2) {
    top: 8px;
    left: -6px;
    z-index: 2;
    opacity: 0.9;
    background: #FAFAFA;
    transform: rotate(-2deg);
    border-color: #E5E7EB;
}

.doc-page.active {
    top: 16px;
    left: 0;
    z-index: 3;
    background: white;
    border-color: var(--primary-blue);
    opacity: 1;
    transform: rotate(0deg);
    box-shadow: 0 4px 12px rgba(47, 107, 255, 0.2);
}

/* Rotating document colors based on sequence - matching use case colors */
.rotating-content[data-sequence="1"] .doc-page.active {
    border-color: #22C55E;
    box-shadow: 0 4px 12px rgba(34, 197, 94, 0.2);
}

.rotating-content[data-sequence="2"] .doc-page.active {
    border-color: #06B6D4;
    box-shadow: 0 4px 12px rgba(6, 182, 212, 0.2);
}

.rotating-content[data-sequence="3"] .doc-page.active {
    border-color: #F59E0B;
    box-shadow: 0 4px 12px rgba(245, 158, 11, 0.2);
}

/* Processing Animation */
.processing-animation {
    display: flex;
    justify-content: center;
    gap: 8px;
    margin: var(--space-2) 0;
}

.pulse-dot {
    width: 8px;
    height: 8px;
    background: #ef4444;
    border-radius: 50%;
    animation: pulse 1.5s infinite;
}

.pulse-dot:nth-child(2) {
    animation-delay: 0.3s;
}

.pulse-dot:nth-child(3) {
    animation-delay: 0.6s;
}

@keyframes pulse {
    0%, 80%, 100% {
        opacity: 0.3;
        transform: scale(0.8);
    }
    40% {
        opacity: 1;
        transform: scale(1.2);
    }
}

/* Data Table */
.data-table {
    background: white;
    border-radius: 6px;
    overflow: hidden;
    border: 1px solid var(--medium-grey);
    font-size: 0.8rem;
    width: 220px;
    margin: 0 auto;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
}

.table-row {
    display: flex;
}

.table-row.header {
    background: var(--light-grey);
}

.table-row {
    display: grid;
    grid-template-columns: 85px 1fr;
    width: 100%;
}

.cell {
    padding: 6px 8px;
    border-right: 1px solid var(--medium-grey);
    text-align: left;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    font-size: 0.8rem;
    line-height: 1.3;
}

.cell:first-child {
    font-weight: 500;
    background: rgba(0, 0, 0, 0.02);
}

.cell:last-child {
    border-right: none;
}

.cell:last-child {
    border-right: none;
}

.table-row.header .cell {
    font-weight: 600;
    color: var(--black);
}

.table-row:not(.header) .cell {
    color: var(--dark-grey);
    border-top: 1px solid var(--medium-grey);
}

/* Process Arrows */
.process-arrow {
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    width: 60px;
    position: relative;
}

.arrow-icon {
    position: absolute;
    width: 32px;
    height: 32px;
    color: #6366F1;
    background: white;
    border-radius: 50%;
    padding: 8px;
    border: 2px solid #E0E7FF;
    box-shadow: 0 2px 8px rgba(99, 102, 241, 0.15);
    transition: all 0.8s ease-in-out;
}

/* Arrow icon animations */
.arrow-icon {
    opacity: 1;
    animation: iconFade 3s infinite ease-in-out;
}

.process-arrow:first-of-type .sparkles {
    animation-delay: 0s;
}

.process-arrow:first-of-type .zap {
    animation-delay: 1.5s;
}

.process-arrow:last-of-type .zap {
    animation-delay: 0s;
}

.process-arrow:last-of-type .arrow {
    animation-delay: 1.5s;
}

@keyframes iconFade {
    0%, 40% {
        opacity: 1;
        transform: scale(1) rotate(0deg);
    }
    50%, 90% {
        opacity: 0;
        transform: scale(0.7) rotate(180deg);
    }
    100% {
        opacity: 1;
        transform: scale(1) rotate(360deg);
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .process-flow {
        flex-direction: column;
        gap: var(--space-3);
        align-items: center;
    }
    
    .process-stage {
        width: 280px;
        height: 280px;
    }
    
    .process-arrow {
        transform: rotate(90deg);
    }
}

/* Use Cases Section */
.use-cases {
    padding: var(--space-12) 0;
    background: linear-gradient(to bottom, #ffffff 0%, #f8f9fa 120px, #f8f9fa 80%, rgba(47, 107, 255, 0.01) 100%);
    margin-top: -4px;
    padding-top: var(--space-16);
    position: relative;
    z-index: 0;
}

.use-cases-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.use-cases-title {
    margin-bottom: var(--space-2);
}

.use-cases-subtitle {
    font-size: 1.25rem;
    color: var(--dark-grey);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--space-4);
}

@media (min-width: 768px) {
    .use-cases-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .use-cases-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

/* Feature Card */
.feature-card {
    background: white;
    border-radius: 16px;
    padding: var(--space-4);
    box-shadow: 0 1px 3px rgba(0, 0, 0, 0.05), 0 1px 2px rgba(0, 0, 0, 0.1);
    border: 1px solid rgba(0, 0, 0, 0.05);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 24px rgba(0, 0, 0, 0.1);
    border-color: var(--primary-blue-light);
}

.feature-header {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    margin-bottom: var(--space-2);
}

.feature-icon {
    background: transparent !important;
    width: 36px !important;
    height: 36px !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex !important;
    align-items: center !important;
    justify-content: center !important;
    border-radius: 12px;
    flex-shrink: 0;
}

.feature-icon i {
    width: 36px !important;
    height: 36px !important;
    stroke-width: 2 !important;
}

/* Individual icon colors for use cases - target SVG elements directly */
section.use-cases .use-cases-grid .feature-card:nth-child(1) .feature-header .feature-icon i[data-lucide], 
section.use-cases .use-cases-grid .feature-card:nth-child(1) .feature-header .feature-icon svg { color: #2F6BFF !important; stroke: #2F6BFF !important; } /* Proposal - Primary Blue */

section.use-cases .use-cases-grid .feature-card:nth-child(2) .feature-header .feature-icon i[data-lucide],
section.use-cases .use-cases-grid .feature-card:nth-child(2) .feature-header .feature-icon svg { color: #22C55E !important; stroke: #22C55E !important; } /* Invoice - Green */

section.use-cases .use-cases-grid .feature-card:nth-child(3) .feature-header .feature-icon i[data-lucide],
section.use-cases .use-cases-grid .feature-card:nth-child(3) .feature-header .feature-icon svg { color: #F59E0B !important; stroke: #F59E0B !important; } /* Compliance - Orange */

section.use-cases .use-cases-grid .feature-card:nth-child(4) .feature-header .feature-icon i[data-lucide],
section.use-cases .use-cases-grid .feature-card:nth-child(4) .feature-header .feature-icon svg { color: #8B5CF6 !important; stroke: #8B5CF6 !important; } /* Analysis - Purple */

section.use-cases .use-cases-grid .feature-card:nth-child(5) .feature-header .feature-icon i[data-lucide],
section.use-cases .use-cases-grid .feature-card:nth-child(5) .feature-header .feature-icon svg { color: #EF4444 !important; stroke: #EF4444 !important; } /* Vendors - Red */

section.use-cases .use-cases-grid .feature-card:nth-child(6) .feature-header .feature-icon i[data-lucide],
section.use-cases .use-cases-grid .feature-card:nth-child(6) .feature-header .feature-icon svg { color: #06B6D4 !important; stroke: #06B6D4 !important; } /* Contracts - Cyan */

/* Default fallback color */
.feature-icon i {
    color: var(--primary-blue);
}

.feature-title {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--black);
    margin: 0;
}

.feature-description {
    color: var(--dark-grey);
    line-height: 1.6;
    margin-bottom: var(--space-3);
}

.feature-link {
    color: var(--primary-blue);
    font-weight: 500;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    transition: gap 0.2s ease;
}

.feature-link:hover {
    gap: 0.75rem;
}

.feature-link i {
    width: 16px;
    height: 16px;
}

/* Comparison Section */
.comparison-section {
    padding: var(--space-10) 0;
    background: var(--white);
}

.comparison-header-text {
    text-align: center;
    margin-bottom: var(--space-6);
}

.comparison-header-text h2 {
    margin-bottom: var(--space-2);
}

.comparison-header-text p {
    font-size: 1.25rem;
}

.comparison-table {
    background: white;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
    border: 1px solid rgba(0, 0, 0, 0.05);
    max-width: 800px;
    margin: 0 auto;
}

.comparison-header {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1.5rem;
    background: var(--primary-blue) !important;
    color: white !important;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    font-weight: 600;
}

.comparison-product {
    text-align: center;
}

.comparison-row {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    transition: background 0.2s ease;
}

.comparison-row:hover {
    background: var(--off-white);
}

.comparison-row:last-child {
    border-bottom: none;
}

.comparison-feature {
    font-weight: 500;
    color: var(--black);
}

.comparison-check {
    text-align: center;
    font-size: 1.5rem;
}

.comparison-check i {
    width: 20px;
    height: 20px;
    color: var(--dark-grey);
}

.check-yes {
    color: var(--error);
}

.check-no {
    color: var(--success);
}

/* How It Works Section */
.how-it-works {
    padding: var(--space-12) 0;
    background: var(--light-grey);
}

.section-header {
    text-align: center;
    margin-bottom: var(--space-8);
}

.section-header h2 {
    margin-bottom: var(--space-2);
}

.section-header p {
    font-size: 1.25rem;
    color: var(--dark-grey);
}

.steps-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .steps-container {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .steps-container {
        grid-template-columns: repeat(4, 1fr);
    }
}

.step {
    text-align: center;
    position: relative;
}

.step-number {
    width: 56px;
    height: 56px;
    background: var(--primary-blue);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin: 0 auto var(--space-3);
    position: relative;
    z-index: 1;
}

.step-title {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
}

.step-description {
    font-size: 1rem;
    color: var(--dark-grey);
}

@media (min-width: 1024px) {
    .step:not(:last-child)::after {
        content: '';
        position: absolute;
        top: 28px;
        left: calc(50% + 28px);
        width: calc(100% - 28px);
        height: 2px;
        background: linear-gradient(to right, var(--medium-grey) 0%, transparent 100%);
        z-index: -1;
    }
}

/* About Section */
.about-section {
    padding: var(--space-10) 0;
    background: var(--white);
}

.about-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
}

.about-content h2 {
    margin-bottom: var(--space-4);
}

.about-content p {
    font-size: 1.125rem;
    margin-bottom: var(--space-3);
}

.trust-indicators {
    display: flex;
    justify-content: center;
    gap: var(--space-6);
    margin-top: var(--space-6);
    flex-wrap: nowrap;
}

.trust-item {
    display: flex;
    align-items: center;
    gap: var(--space-2);
    background: var(--light-grey);
    padding: var(--space-3) var(--space-4);
    border-radius: 20px;
}

/* Mobile: 3-row table layout for trust indicators */
@media (max-width: 991px) {
    .trust-indicators {
        flex-direction: column !important;
        gap: var(--space-2) !important;
        max-width: 100% !important;
        margin: var(--space-6) auto 0 !important;
        align-items: stretch !important;
    }
    
    .trust-item {
        width: 100% !important;
        justify-content: flex-start !important;
        padding: var(--space-3) !important;
        border-radius: 12px !important;
        background: white !important;
        border: 1px solid var(--light-grey) !important;
        box-shadow: 0 2px 4px rgba(0, 0, 0, 0.05) !important;
        margin: 0 !important;
    }
    
    .trust-item svg {
        width: 20px !important;
        height: 20px !important;
        color: var(--primary-blue) !important;
        flex-shrink: 0 !important;
    }
    
    .trust-item span {
        font-size: 0.9rem !important;
        font-weight: 500 !important;
    }
}

.trust-item i {
    width: 16px;
    height: 16px;
    color: var(--success);
}

.trust-item span {
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--black);
}

/* Impact Section */
.impact-section {
    padding: var(--space-10) 0;
    background: var(--light-grey);
}

.benefits-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    max-width: 1000px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .benefits-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (min-width: 1024px) {
    .benefits-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.benefit-item {
    text-align: left;
}

.benefit-icon {
    width: 48px;
    height: 48px;
    background: linear-gradient(135deg, var(--gradient-start) 0%, var(--gradient-mid) 100%);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-3);
}

.benefit-icon i {
    width: 24px;
    height: 24px;
    color: var(--primary-blue);
}

.benefit-item h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: var(--space-2);
    color: var(--black);
}

.benefit-item p {
    color: var(--dark-grey);
    line-height: 1.6;
}

.impact-citation {
    text-align: center;
    margin-top: var(--space-6);
}

.impact-citation p {
    font-size: 0.875rem;
    color: var(--dark-grey);
    font-style: italic;
}

.metrics-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-6);
    max-width: 900px;
    margin: 0 auto;
}

@media (min-width: 768px) {
    .metrics-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.metric {
    text-align: center;
}

.metric-icon {
    font-size: 3rem;
    margin-bottom: var(--space-2);
}

.metric-value {
    font-size: 3rem;
    font-weight: 700;
    color: var(--primary-blue);
    margin-bottom: var(--space-1);
}

.metric-label {
    font-size: 1rem;
    color: var(--dark-grey);
}

/* CTA Footer */
.cta-footer {
    padding: var(--space-12) 0;
    background: var(--primary-blue);
    color: white;
    text-align: center;
}

.cta-footer-headline {
    color: white;
    margin-bottom: var(--space-2);
}

.cta-footer-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-5);
    opacity: 0.9;
}

.cta-footer-actions {
    display: flex;
    gap: var(--space-3);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-footer .btn-primary {
    background: white;
    color: var(--primary-blue);
}

.cta-footer .btn-primary:hover {
    background: var(--off-white);
}

.cta-footer .btn-secondary {
    border-color: white;
    color: white;
}

.cta-footer .btn-secondary:hover {
    background: white;
    color: var(--primary-blue);
}

/* Footer */
.footer {
    padding: var(--space-6) 0 var(--space-4);
    background: var(--black);
    color: white;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: var(--space-4);
    flex-wrap: wrap;
    gap: var(--space-4);
}

.footer-brand p {
    color: var(--dark-grey);
    margin-top: var(--space-1);
}

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

.footer-links a {
    color: var(--dark-grey);
    transition: color 0.2s ease;
}

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

.footer-disclaimer {
    text-align: center;
    padding: var(--space-4) 0;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin: var(--space-4) 0;
}

.footer-disclaimer small {
    color: var(--dark-grey);
    line-height: 1.5;
    font-style: italic;
}

.footer-bottom {
    text-align: center;
    padding-top: var(--space-2);
}

.footer-bottom p {
    color: var(--dark-grey);
}

/* Legal Pages Styling */
.legal-page {
    padding-top: 100px;
    padding-bottom: var(--space-8);
    background: var(--white);
    min-height: 100vh;
}

.legal-header {
    text-align: center;
    margin-bottom: var(--space-8);
    padding-bottom: var(--space-4);
    border-bottom: 1px solid var(--medium-grey);
}

.legal-header h1 {
    color: var(--black);
    margin-bottom: var(--space-2);
}

.legal-subtitle {
    font-size: 1.25rem;
    color: var(--dark-grey);
    margin-bottom: var(--space-2);
}

.legal-updated {
    font-size: 0.875rem;
    color: var(--dark-grey);
    font-style: italic;
}

.legal-content {
    max-width: 800px;
    margin: 0 auto;
}

.legal-section {
    margin-bottom: var(--space-6);
}

.legal-section h2 {
    color: var(--black);
    font-size: 1.5rem;
    margin-bottom: var(--space-3);
    padding-bottom: var(--space-1);
    border-bottom: 2px solid var(--primary-blue);
}

.legal-section h3 {
    color: var(--black);
    font-size: 1.25rem;
    margin: var(--space-4) 0 var(--space-2);
}

.legal-section p {
    color: var(--dark-grey);
    margin-bottom: var(--space-3);
    line-height: 1.7;
}

.legal-section ul, .legal-section ol {
    margin: var(--space-2) 0 var(--space-3) var(--space-4);
}

.legal-section li {
    color: var(--dark-grey);
    margin-bottom: var(--space-1);
    line-height: 1.6;
}

.legal-section a {
    color: var(--primary-blue);
    text-decoration: underline;
}

.legal-section a:hover {
    color: var(--primary-blue-dark);
}

.legal-section strong {
    color: var(--black);
    font-weight: 600;
}

/* Mobile responsive for legal pages */
@media (max-width: 768px) {
    .legal-page {
        padding-top: 80px;
    }
    
    .legal-header h1 {
        font-size: 2rem;
    }
    
    .legal-subtitle {
        font-size: 1.125rem;
    }
    
    .legal-section h2 {
        font-size: 1.375rem;
    }
    
    .legal-section h3 {
        font-size: 1.125rem;
    }
}

/* Custom Language Selector with Icons */
.language-selector {
    position: relative;
    display: inline-block;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: transparent;
    border: none;
    border-radius: 8px;
    color: var(--dark-grey);
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 60px;
}

.lang-current:hover {
    color: var(--primary-blue);
    background: var(--gradient-end);
}

.lang-current i, .lang-current .fi {
    width: 16px;
    height: 16px;
}

.lang-current .fi {
    height: 12px;
}

.lang-current .chevron {
    width: 12px;
    height: 12px;
    margin-left: auto;
    transition: transform 0.2s ease;
}

.language-selector.open .chevron {
    transform: rotate(180deg);
}

.lang-options {
    position: absolute;
    top: 100%;
    right: 0;
    background: white;
    border: 1px solid var(--medium-grey);
    border-radius: 8px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
    min-width: 100px;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.language-selector.open .lang-options {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-option {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem;
    cursor: pointer;
    transition: background-color 0.2s ease;
    border-radius: 6px;
    margin: 4px;
}

.lang-option:hover {
    background: var(--gradient-end);
    color: var(--primary-blue);
}

.lang-option i, .lang-option .fi {
    width: 16px;
    height: 16px;
}

.lang-option .fi {
    height: 12px;
    margin-right: 0.5rem;
}

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

.animate-on-scroll {
    opacity: 0;
    animation: fadeInUp 0.6s ease forwards;
}

/* Mobile Responsive */
@media (max-width: 768px) {
    /* Prevent text cropping and horizontal overflow */
    html, body {
        width: 100%;
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    /* Prevent any element from being wider than viewport */
    * {
        max-width: 100%;
    }
    
    /* Reduce navbar height on mobile */
    .navbar {
        padding: 0.5rem var(--space-3);
    }
    
    /* Optimize hero section for mobile viewport */
    .hero-section {
        padding: 80px 20px 60px;
        margin-top: 0 !important;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    /* Ensure no gap from header on mobile */
    #common-header + .hero-section {
        margin-top: 0 !important;
    }
    
    .hero-title {
        font-size: 2.75rem !important;
        padding: 0 var(--space-2);
        margin-top: 60px;
        line-height: 1.15;
    }
    
    .hero-subtitle {
        font-size: 1.125rem;
        padding: 0 var(--space-2);
    }
    
    .hero-cta-group {
        padding: 0 var(--space-4);
        flex-direction: column;
        gap: var(--space-3);
        align-items: center;
    }
    
    .hero-cta-group .btn {
        width: 100%;
        max-width: 280px;
        text-align: center;
        margin: 0;
    }
    
    .comparison-header,
    .comparison-row {
        grid-template-columns: 2fr 1fr 1fr;
        font-size: 0.875rem;
    }
    
    .footer-content {
        flex-direction: column;
        text-align: center;
    }
    
    .footer-links {
        flex-direction: column;
        gap: var(--space-2);
    }
    
    /* Ensure proper spacing on mobile */
    .container {
        padding: 0 var(--space-3);
    }
    
    .nav-menu {
        padding: var(--space-6) var(--space-4);
    }
}

/* Extra small mobile devices */
@media (max-width: 480px) {
    /* Prevent horizontal overflow */
    html, body {
        max-width: 100vw;
        overflow-x: hidden;
    }
    
    .container {
        padding: 0 0.75rem;
        max-width: 100%;
    }
    
    /* Further reduce navbar on very small screens */
    .navbar {
        padding: 0.375rem var(--space-2);
    }
    
    /* Optimize for very small screens */
    .hero-section {
        padding: 60px 15px 40px;
        min-height: 100vh;
        display: flex;
        align-items: center;
    }
    
    .hero-title {
        font-size: 2.25rem !important;
        padding: 0 var(--space-1);
        margin-top: 40px;
        line-height: 1.2;
    }
    
    .hero-subtitle {
        font-size: 1rem;
        padding: 0 var(--space-1);
    }
    
    .hero-cta-group {
        padding: 0 var(--space-2);
    }
    
    .hero-cta-group .btn {
        max-width: 100%;
        padding: 14px 20px;
        font-size: 15px;
    }
    
    /* Fix navigation on very small screens */
    .nav-menu.active {
        padding: var(--space-2);
    }
    
    .nav-actions.active {
        padding: var(--space-2);
    }
}