/* ============================================
   SCANDORA DESIGN SYSTEM - CSS Variables
   Following flutter_app/DESIGN_SYSTEM.md
   ============================================ */

:root {
    /* Primary Colors */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --primary-lightest: #60A5FA;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;

    /* Neutral Colors */
    --background: #F8FAFC;
    --surface: #FFFFFF;
    --surface-variant: #F1F5F9;
    --text-primary: #1E293B;
    --text-secondary: #64748B;
    --text-tertiary: #94A3B8;
    --border: #E2E8F0;

    /* Spacing (4px base) */
    --space-xs: 4px;
    --space-sm: 8px;
    --space-md: 16px;
    --space-lg: 24px;
    --space-xl: 32px;
    --space-2xl: 48px;
    --space-3xl: 64px;

    /* Border Radius */
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-card: 0 4px 10px rgba(0,0,0,0.05);
    --shadow-elevated: 0 8px 20px rgba(0,0,0,0.1);
    --shadow-primary: 0 8px 20px rgba(37,99,235,0.3);

    /* Typography */
    --font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
}

/* ============================================
   RESET & BASE STYLES
   ============================================ */

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
    scroll-behavior: smooth;
    /* Prevent font size adjustment on orientation change */
    -webkit-text-size-adjust: 100%;
    text-size-adjust: 100%;
}

body {
    font-family: var(--font-family);
    background: var(--background);
    color: var(--text-primary);
    line-height: 1.6;
    font-size: 16px;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
}

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

/* Improve focus visibility for accessibility */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--primary);
    outline-offset: 2px;
}

img {
    max-width: 100%;
    height: auto;
    /* Prevent layout shift */
    aspect-ratio: attr(width) / attr(height);
}

/* Skip Link for Accessibility (Screen Readers) */
.skip-link {
    position: absolute;
    top: -100%;
    left: 50%;
    transform: translateX(-50%);
    background: var(--primary);
    color: white;
    padding: var(--space-sm) var(--space-md);
    border-radius: var(--radius-md);
    z-index: 10000;
    font-weight: 600;
    transition: top 0.3s;
}

.skip-link:focus {
    top: var(--space-md);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

/* ============================================
   BUTTONS
   ============================================ */

.btn {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    font-family: var(--font-family);
    font-weight: 600;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
    text-decoration: none;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    box-shadow: var(--shadow-primary);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 24px rgba(37,99,235,0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--primary);
    border: 2px solid var(--primary);
}
.btn-secondary:hover {
    background: var(--primary);
    color: white;
}

.btn-sm { padding: 10px 20px; font-size: 14px; }
.btn-lg { padding: 16px 32px; font-size: 16px; }
.btn-full { width: 100%; justify-content: center; }

/* ============================================
   NAVIGATION
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    background: rgba(255,255,255,0.9);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    padding: var(--space-md) 0;
}

.nav-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.logo {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}
.logo-icon {
    color: var(--primary);
    font-size: 28px;
}

.nav-links {
    display: flex;
    gap: var(--space-xl);
}
.nav-links a {
    font-weight: 500;
    color: var(--text-secondary);
    transition: color 0.2s;
}
.nav-links a:hover { color: var(--primary); }

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

.lang-toggle {
    background: var(--surface-variant);
    border: 1px solid var(--border);
    border-radius: var(--radius-sm);
    padding: 8px 12px;
    font-weight: 600;
    font-size: 14px;
    cursor: pointer;
    transition: all 0.2s;
}
.lang-toggle:hover { border-color: var(--primary); color: var(--primary); }

.mobile-menu-toggle { display: none; }

/* ============================================
   HERO SECTION
   ============================================ */

.hero {
    position: relative;
    padding: 140px 0 80px;
    overflow: hidden;
    min-height: 100vh;
    display: flex;
    align-items: center;
}

.hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37,99,235,0.03) 0%, rgba(96,165,250,0.05) 100%);
    z-index: -1;
}
.hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 800px;
    height: 800px;
    background: radial-gradient(circle, rgba(37,99,235,0.08) 0%, transparent 70%);
    border-radius: 50%;
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-3xl);
    align-items: center;
}

.hero-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-lightest), var(--primary-light));
    color: white;
    padding: 8px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-lg);
}

.hero-title {
    font-size: 56px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: var(--space-lg);
}
.hero-title span { display: block; }
.gradient-text {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 18px;
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    max-width: 540px;
}

.hero-actions {
    display: flex;
    gap: var(--space-md);
    margin-bottom: var(--space-2xl);
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: var(--space-lg);
}
.stat { text-align: center; }
.stat-value {
    display: block;
    font-size: 28px;
    font-weight: 700;
    color: var(--primary);
}
.stat-label {
    font-size: 14px;
    color: var(--text-tertiary);
}
.stat-divider {
    width: 1px;
    height: 40px;
    background: var(--border);
}

/* App Preview Animation */
.hero-visual { position: relative; }

.app-preview {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-elevated);
    overflow: hidden;
    border: 1px solid var(--border);
}
.app-preview-header {
    background: var(--surface-variant);
    padding: 12px 16px;
    display: flex;
    gap: 8px;
}
.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--border);
}
.dot:first-child { background: #FF5F57; }
.dot:nth-child(2) { background: #FFBD2E; }
.dot:nth-child(3) { background: #28CA41; }

.app-preview-content {
    padding: var(--space-lg);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: var(--space-md);
}

.scan-animation {
    background: var(--surface-variant);
    border-radius: var(--radius-md);
    padding: var(--space-lg);
    position: relative;
    overflow: hidden;
}
.document { display: flex; flex-direction: column; gap: 8px; }
.doc-line {
    height: 12px;
    background: var(--border);
    border-radius: 4px;
}
.doc-line.short { width: 60%; }
.doc-line.medium { width: 80%; }
.scan-beam {
    position: absolute;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    animation: scan 2s ease-in-out infinite;
}
@keyframes scan {
    0%, 100% { top: 0; opacity: 0; }
    10% { opacity: 1; }
    90% { opacity: 1; }
    100% { top: 100%; opacity: 0; }
}

.ai-result {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-md);
    padding: var(--space-md);
}
.ai-badge {
    background: linear-gradient(135deg, #D4EDDA, #C3E6CB);
    color: #155724;
    padding: 4px 12px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
    display: inline-block;
    margin-bottom: var(--space-sm);
}
.extracted-data { display: flex; flex-direction: column; gap: 8px; }
.data-row {
    display: flex;
    justify-content: space-between;
    font-size: 14px;
}
.data-row span:first-child { color: var(--text-tertiary); }
.data-row span:last-child { font-weight: 600; }

/* ============================================
   SECTION HEADERS
   ============================================ */

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto var(--space-3xl);
}
.section-badge {
    display: inline-block;
    background: var(--surface-variant);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-md);
}
.section-title {
    font-size: 40px;
    font-weight: 700;
    margin-bottom: var(--space-md);
    letter-spacing: -0.5px;
}
.section-description {
    font-size: 18px;
    color: var(--text-secondary);
}

/* ============================================
   FEATURES SECTION
   ============================================ */

.features {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}
.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
}
.feature-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    transition: all 0.3s ease;
}
.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary-light);
}
.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--primary-lightest), var(--primary-light));
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: var(--space-md);
}
.feature-icon svg { stroke: white; }
.feature-card h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-sm);
}
.feature-card p {
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   HOW IT WORKS SECTION
   ============================================ */

.how-it-works {
    padding: var(--space-3xl) 0;
    background: var(--background);
}
.steps {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--space-md);
    /* Reset list styles for semantic ol element */
    list-style: none;
    padding: 0;
    margin: 0;
}
.step {
    display: flex;
    align-items: center;
    gap: var(--space-xl);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    max-width: 700px;
    width: 100%;
    transition: all 0.3s ease;
}
.step:hover {
    box-shadow: var(--shadow-elevated);
    border-color: var(--primary-light);
}
.step-number {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 24px;
    font-weight: 700;
    flex-shrink: 0;
}
.step-content h3 {
    font-size: 20px;
    font-weight: 600;
    margin-bottom: var(--space-xs);
}
.step-content p {
    color: var(--text-secondary);
    font-size: 15px;
}
.step-connector {
    width: 2px;
    height: 32px;
    background: linear-gradient(to bottom, var(--primary-light), var(--primary));
    border-radius: 1px;
}

/* ============================================
   PRICING SECTION
   ============================================ */

.pricing {
    padding: var(--space-3xl) 0;
    background: var(--surface);
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-lg);
    max-width: 1000px;
    margin: 0 auto;
}
.pricing-card {
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    position: relative;
    transition: all 0.3s ease;
}
.pricing-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-elevated);
}
.pricing-card.popular {
    border: 2px solid var(--primary);
    transform: scale(1.05);
}
.pricing-card.popular:hover {
    transform: scale(1.05) translateY(-4px);
}
.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    color: white;
    padding: 4px 16px;
    border-radius: var(--radius-full);
    font-size: 12px;
    font-weight: 600;
}
.pricing-header { margin-bottom: var(--space-md); }
.pricing-header h3 { font-size: 24px; font-weight: 700; }
.pricing-tagline { color: var(--text-tertiary); font-size: 14px; }
.pricing-price {
    margin-bottom: var(--space-lg);
    display: flex;
    align-items: baseline;
    gap: 2px;
}
.pricing-price .currency { font-size: 20px; font-weight: 600; }
.pricing-price .amount { font-size: 48px; font-weight: 700; }
.pricing-price .period { color: var(--text-tertiary); }
.pricing-features {
    list-style: none;
    margin-bottom: var(--space-xl);
}
.pricing-features li {
    padding: 8px 0;
    border-bottom: 1px solid var(--border);
    font-size: 14px;
    color: var(--text-secondary);
}
.pricing-features li::before {
    content: '✓';
    color: var(--success);
    margin-right: 8px;
    font-weight: 700;
}
.pricing-note {
    text-align: center;
    margin-top: var(--space-xl);
    color: var(--text-secondary);
    font-size: 15px;
}

/* ============================================
   DOWNLOAD SECTION
   ============================================ */

.download {
    padding: var(--space-3xl) 0;
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}
.download-content {
    text-align: center;
    max-width: 600px;
    margin: 0 auto;
}
.download-title {
    font-size: 36px;
    font-weight: 700;
    margin-bottom: var(--space-md);
}
.download-description {
    font-size: 18px;
    opacity: 0.9;
    margin-bottom: var(--space-xl);
}
.download-buttons {
    display: flex;
    justify-content: center;
    gap: var(--space-md);
    flex-wrap: wrap;
}
.store-badge {
    transition: transform 0.2s;
}
.store-badge:hover {
    transform: translateY(-2px);
}
.store-badge img, .store-badge svg {
    height: 50px;
    width: auto;
}

/* ============================================
   FOOTER
   ============================================ */

.footer {
    background: var(--text-primary);
    color: white;
    padding: var(--space-3xl) 0 var(--space-lg);
}
.footer-content {
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: var(--space-3xl);
    margin-bottom: var(--space-xl);
}
.footer-brand .logo { margin-bottom: var(--space-md); }
.footer-brand .logo-icon { color: var(--primary-light); }
.footer-brand p { color: var(--text-tertiary); font-size: 14px; }
.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: var(--space-xl);
}
.footer-col h4 {
    font-size: 14px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    color: white;
}
.footer-col a {
    display: block;
    color: var(--text-tertiary);
    font-size: 14px;
    padding: 4px 0;
    transition: color 0.2s;
}
.footer-col a:hover { color: var(--primary-light); }
.footer-bottom {
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: var(--space-lg);
    text-align: center;
    color: var(--text-tertiary);
    font-size: 14px;
}

/* ============================================
   RESPONSIVE DESIGN
   ============================================ */

@media (max-width: 1024px) {
    .hero-container { grid-template-columns: 1fr; gap: var(--space-2xl); }
    .hero-title { font-size: 44px; }
    .hero-visual { order: -1; }
    .features-grid { grid-template-columns: repeat(2, 1fr); }
    .pricing-grid { grid-template-columns: 1fr; max-width: 400px; }
    .pricing-card.popular { transform: none; }
    .pricing-card.popular:hover { transform: translateY(-4px); }
    .footer-content { grid-template-columns: 1fr; gap: var(--space-xl); }
}

@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(255,255,255,0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: var(--space-md);
        gap: var(--space-md);
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0,0,0,0.1);
    }
    .nav-links.active {
        display: flex;
    }
    .nav-links a {
        padding: var(--space-sm) 0;
        font-size: 16px;
    }
    .mobile-menu-toggle {
        display: flex;
        flex-direction: column;
        gap: 4px;
        background: none;
        border: none;
        cursor: pointer;
        padding: 8px;
    }
    .mobile-menu-toggle span {
        width: 24px;
        height: 2px;
        background: var(--text-primary);
        border-radius: 1px;
        transition: transform 0.3s, opacity 0.3s;
    }
    .mobile-menu-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(4px, 4px);
    }
    .mobile-menu-toggle.active span:nth-child(2) {
        opacity: 0;
    }
    .mobile-menu-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(4px, -4px);
    }
    .hero { padding: 120px 0 60px; }
    .hero-title { font-size: 36px; }
    .hero-description { font-size: 16px; }
    .hero-stats { flex-direction: column; gap: var(--space-md); }
    .stat-divider { width: 40px; height: 1px; }
    .section-title { font-size: 28px; }
    .features-grid { grid-template-columns: 1fr; }
    .step { flex-direction: column; text-align: center; }
    .footer-links { grid-template-columns: 1fr; text-align: center; }
    .download-title { font-size: 28px; }
}

/* ============================================
   LEGAL PAGES (Privacy, Terms, Imprint)
   ============================================ */

.legal-page {
    padding: 140px 0 80px;
    min-height: 100vh;
    background: var(--background);
}

.legal-page .legal-container {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.legal-header {
    text-align: center;
    margin-bottom: var(--space-3xl);
    padding-bottom: var(--space-xl);
    border-bottom: 1px solid var(--border);
}

.legal-badge {
    display: inline-block;
    background: linear-gradient(135deg, var(--primary-lightest), var(--primary-light));
    color: white;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    font-size: 13px;
    font-weight: 600;
    margin-bottom: var(--space-md);
    letter-spacing: 0.5px;
    text-transform: uppercase;
}

.legal-title {
    font-size: 48px;
    font-weight: 700;
    line-height: 1.1;
    letter-spacing: -0.5px;
    margin-bottom: var(--space-md);
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.legal-meta {
    color: var(--text-tertiary);
    font-size: 14px;
}

.legal-meta time {
    font-weight: 500;
    color: var(--text-secondary);
}

/* Legal Content Styles */
.legal-content {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-card);
}

.legal-content h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-2xl) 0 var(--space-md);
    padding-bottom: var(--space-sm);
    border-bottom: 2px solid var(--primary-lightest);
}

.legal-content h2:first-child {
    margin-top: 0;
}

.legal-content h3 {
    font-size: 18px;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-sm);
}

.legal-content p {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: var(--space-md);
}

.legal-content ul,
.legal-content ol {
    color: var(--text-secondary);
    font-size: 16px;
    line-height: 1.8;
    margin-bottom: var(--space-md);
    padding-left: var(--space-lg);
}

.legal-content li {
    margin-bottom: var(--space-sm);
}

.legal-content a {
    color: var(--primary);
    font-weight: 500;
    transition: color 0.2s;
}

.legal-content a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

.legal-content strong {
    color: var(--text-primary);
    font-weight: 600;
}

.legal-content .highlight-box {
    background: linear-gradient(135deg, rgba(37,99,235,0.05), rgba(96,165,250,0.08));
    border-left: 4px solid var(--primary);
    padding: var(--space-lg);
    border-radius: 0 var(--radius-md) var(--radius-md) 0;
    margin: var(--space-lg) 0;
}

.legal-content .highlight-box p {
    margin-bottom: 0;
    color: var(--text-primary);
}

/* Cookie Table */
.cookie-table {
    width: 100%;
    border-collapse: collapse;
    margin: var(--space-md) 0 var(--space-lg);
    font-size: 14px;
    border-radius: var(--radius-md);
    overflow: hidden;
    border: 1px solid var(--border);
}

.cookie-table thead {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
}

.cookie-table th {
    padding: var(--space-sm) var(--space-md);
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.cookie-table td {
    padding: var(--space-sm) var(--space-md);
    border-bottom: 1px solid var(--border);
    color: var(--text-secondary);
}

.cookie-table tbody tr:last-child td {
    border-bottom: none;
}

.cookie-table tbody tr:nth-child(even) {
    background-color: var(--surface-variant);
}

.cookie-table code {
    background: var(--surface-variant);
    padding: 2px 6px;
    border-radius: 4px;
    font-size: 13px;
    color: var(--primary-dark);
    font-family: 'Menlo', 'Monaco', 'Consolas', monospace;
}

.legal-content h4 {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    margin: var(--space-lg) 0 var(--space-sm);
}

/* Contact Card for Imprint/Legal */
.contact-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: white;
    border-radius: var(--radius-lg);
    padding: var(--space-xl);
    margin: var(--space-xl) 0;
    box-shadow: var(--shadow-primary);
}

.contact-card h3 {
    color: white;
    margin-top: 0;
    margin-bottom: var(--space-md);
}

.contact-card p {
    color: rgba(255,255,255,0.9);
    margin-bottom: var(--space-xs);
}

.contact-card a {
    color: white;
    text-decoration: underline;
}

.contact-card a:hover {
    color: rgba(255,255,255,0.8);
}

/* Table of Contents */
.toc {
    background: var(--surface-variant);
    border-radius: var(--radius-lg);
    padding: var(--space-lg);
    margin-bottom: var(--space-xl);
}

.toc h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-tertiary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.toc ol {
    list-style: none;
    padding: 0;
    margin: 0;
    counter-reset: toc-counter;
}

.toc li {
    counter-increment: toc-counter;
    margin-bottom: var(--space-sm);
}

.toc li::before {
    content: counter(toc-counter) ".";
    color: var(--primary);
    font-weight: 600;
    margin-right: var(--space-sm);
}

.toc a {
    color: var(--text-secondary);
    transition: color 0.2s;
}

.toc a:hover {
    color: var(--primary);
}

/* Back to Home Button */
.back-home {
    display: inline-flex;
    align-items: center;
    gap: var(--space-sm);
    color: var(--text-secondary);
    font-weight: 500;
    margin-bottom: var(--space-xl);
    transition: color 0.2s;
}

.back-home:hover {
    color: var(--primary);
}

.back-home svg {
    transition: transform 0.2s;
}

.back-home:hover svg {
    transform: translateX(-4px);
}

/* Legal Page Responsive */
@media (max-width: 768px) {
    .legal-page {
        padding: 120px 0 60px;
    }

    .legal-title {
        font-size: 32px;
    }

    .legal-content {
        padding: var(--space-lg);
        border-radius: var(--radius-lg);
    }

    .legal-content h2 {
        font-size: 20px;
    }

    .legal-content h3 {
        font-size: 16px;
    }
}

/* ==========================================================================
   CONTACT PAGE STYLES
   ========================================================================== */

/* Contact Hero Section */
.contact-hero {
    position: relative;
    padding: 160px 0 80px;
    text-align: center;
    overflow: hidden;
}

.contact-hero-bg {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: linear-gradient(135deg, rgba(37,99,235,0.08) 0%, rgba(96,165,250,0.04) 100%);
    z-index: -1;
}

.contact-hero-bg::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -20%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(37,99,235,0.1) 0%, transparent 70%);
    border-radius: 50%;
}

.contact-hero-content {
    max-width: 700px;
    margin: 0 auto;
}

.contact-title {
    font-size: 48px;
    font-weight: 700;
    color: var(--text-primary);
    margin: var(--space-md) 0;
    line-height: 1.2;
}

.contact-subtitle {
    font-size: 18px;
    color: var(--text-secondary);
    line-height: 1.7;
    max-width: 600px;
    margin: 0 auto;
}

/* Contact Section */
.contact-section {
    padding: var(--space-3xl) 0;
    background: var(--background);
}

.contact-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: var(--space-xl);
    align-items: start;
}

/* Contact Form Card */
.contact-form-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    box-shadow: var(--shadow-card);
    border: 1px solid var(--border);
}

.contact-form-card h2 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-description {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
}

/* Form Styles */
.contact-form {
    display: flex;
    flex-direction: column;
    gap: var(--space-lg);
}

.form-group {
    position: relative;
}

.form-group label {
    display: block;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-primary);
    margin-bottom: var(--space-xs);
}

.form-group input,
.form-group textarea,
.form-group select {
    width: 100%;
    padding: var(--space-md);
    font-size: 16px;
    font-family: inherit;
    color: var(--text-primary);
    background: var(--surface-variant);
    border: 2px solid transparent;
    border-radius: var(--radius-md);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input::placeholder,
.form-group textarea::placeholder {
    color: var(--text-tertiary);
}

.form-group input:hover,
.form-group textarea:hover,
.form-group select:hover {
    background: #EEF2F6;
}

.form-group input:focus,
.form-group textarea:focus,
.form-group select:focus {
    background: white;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(37,99,235,0.1);
}

.form-group textarea {
    resize: vertical;
    min-height: 140px;
}

/* Select Dropdown */
.form-group select {
    appearance: none;
    cursor: pointer;
    padding-right: 48px;
}

.select-arrow {
    position: absolute;
    right: 16px;
    bottom: 18px;
    pointer-events: none;
    color: var(--text-tertiary);
}

/* Submit Button */
.btn-submit {
    width: 100%;
    padding: var(--space-md) var(--space-xl);
    font-size: 16px;
    font-weight: 600;
    position: relative;
    overflow: hidden;
}

.btn-submit .btn-loading {
    display: none;
    position: absolute;
    inset: 0;
    align-items: center;
    justify-content: center;
    background: inherit;
}

.btn-submit.loading .btn-text {
    visibility: hidden;
}

.btn-submit.loading .btn-loading {
    display: flex;
}

.spinner {
    width: 24px;
    height: 24px;
    animation: spin 1s linear infinite;
}

.spinner circle {
    stroke-dasharray: 50;
    stroke-dashoffset: 20;
}

@keyframes spin {
    100% { transform: rotate(360deg); }
}

/* Contact Info Card */
.contact-info-card {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    color: white;
    box-shadow: var(--shadow-primary);
}

.info-section {
    display: flex;
    gap: var(--space-md);
    padding: var(--space-lg) 0;
    border-bottom: 1px solid rgba(255,255,255,0.15);
}

.info-section:first-child {
    padding-top: 0;
}

.info-section:last-of-type {
    border-bottom: none;
}

.info-icon {
    width: 48px;
    height: 48px;
    background: rgba(255,255,255,0.15);
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.info-icon svg {
    color: white;
}

.info-content h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 4px;
}

.info-content a {
    color: white;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
}

.info-content a:hover {
    text-decoration: underline;
}

.info-content p {
    color: white;
    font-size: 18px;
    font-weight: 600;
    margin: 0;
}

.info-note {
    font-size: 14px !important;
    font-weight: 400 !important;
    color: rgba(255,255,255,0.7) !important;
    margin-top: 4px !important;
}

/* Quick Links */
.quick-links {
    margin-top: var(--space-xl);
    padding-top: var(--space-xl);
    border-top: 1px solid rgba(255,255,255,0.15);
}

.quick-links h3 {
    font-size: 14px;
    font-weight: 600;
    color: rgba(255,255,255,0.7);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: var(--space-md);
}

.quick-link {
    display: flex;
    align-items: center;
    gap: var(--space-sm);
    padding: var(--space-sm) 0;
    color: white;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s ease;
}

.quick-link:hover {
    padding-left: var(--space-sm);
    opacity: 0.9;
}

.quick-link svg {
    opacity: 0.7;
}

/* Success Overlay */
.success-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 10000;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

.success-overlay.show {
    opacity: 1;
    visibility: visible;
}

.success-card {
    background: white;
    border-radius: var(--radius-xl);
    padding: var(--space-2xl);
    text-align: center;
    max-width: 400px;
    margin: var(--space-md);
    transform: scale(0.9);
    transition: transform 0.3s ease;
}

.success-overlay.show .success-card {
    transform: scale(1);
}

.success-icon {
    width: 80px;
    height: 80px;
    background: linear-gradient(135deg, #10B981, #059669);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto var(--space-lg);
}

.success-icon svg {
    width: 40px;
    height: 40px;
    color: white;
    animation: checkmark 0.5s ease-out 0.2s both;
}

@keyframes checkmark {
    0% {
        stroke-dasharray: 100;
        stroke-dashoffset: 100;
        opacity: 0;
    }
    100% {
        stroke-dasharray: 100;
        stroke-dashoffset: 0;
        opacity: 1;
    }
}

.success-card h3 {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: var(--space-sm);
}

.success-card p {
    color: var(--text-secondary);
    margin-bottom: var(--space-xl);
    line-height: 1.6;
}

.success-card .btn.btn-primary {
    min-width: 160px;
    background: #2563EB !important;
    background-image: none !important;
    color: #ffffff !important;
    border: 0 !important;
    border-style: none !important;
    outline: none !important;
    padding: 14px 32px !important;
    border-radius: 12px !important;
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif !important;
    font-weight: 600 !important;
    font-size: 16px !important;
    line-height: 1.2 !important;
    letter-spacing: 0 !important;
    text-align: center !important;
    text-decoration: none !important;
    text-transform: none !important;
    cursor: pointer;
    transition: background 0.2s ease;
    box-shadow: none !important;
    transform: none !important;
    filter: none !important;
    -webkit-filter: none !important;
    -webkit-appearance: none !important;
    -moz-appearance: none !important;
    appearance: none !important;
    text-shadow: none !important;
    -webkit-font-smoothing: antialiased !important;
    -moz-osx-font-smoothing: grayscale !important;
    -webkit-text-stroke: 0 !important;
    -webkit-background-clip: unset !important;
    background-clip: unset !important;
    -webkit-text-fill-color: #ffffff !important;
}

.success-card .btn.btn-primary:hover,
.success-card .btn.btn-primary:focus,
.success-card .btn.btn-primary:active {
    background: #1D4ED8 !important;
    background-image: none !important;
    transform: none !important;
    box-shadow: none !important;
    outline: none !important;
    border: 0 !important;
    color: #ffffff !important;
    -webkit-text-fill-color: #ffffff !important;
}

/* Contact Page Responsive */
@media (max-width: 1024px) {
    .contact-grid {
        grid-template-columns: 1fr;
        gap: var(--space-xl);
    }

    .contact-info-card {
        order: -1;
    }
}

@media (max-width: 768px) {
    .contact-hero {
        padding: 120px 0 60px;
    }

    .contact-title {
        font-size: 32px;
    }

    .contact-subtitle {
        font-size: 16px;
    }

    .contact-form-card,
    .contact-info-card {
        padding: var(--space-xl);
    }

    .contact-section {
        padding: var(--space-xl) 0;
    }
}

@media (max-width: 480px) {
    .contact-form-card,
    .contact-info-card {
        padding: var(--space-lg);
    }

    .info-section {
        flex-direction: column;
        gap: var(--space-sm);
    }
}
