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

:root {
    /* Spoteka Brand Colors - Teal Palette */
    --teal-900: #004D40;
    --teal-800: #00695C;
    --teal-700: #00796B;
    --teal-600: #00897B;
    --teal-500: #009688;
    --teal-400: #26A69A;
    --teal-300: #4DB6AC;
    --teal-200: #80CBC4;
    --teal-100: #B2DFDB;
    --teal-50: #E0F2F1;
    
    /* Material Design 3 Surface Colors */
    --surface-background: #FFFFFF;
    --surface-container: #FAFAFA;
    --surface-overlay: rgba(0, 0, 0, 0.05);
    
    /* Outline Colors */
    --outline-default: #E0E0E0;
    --outline-focus: #80CBC4;
    
    /* Text Colors */
    --text-on-primary: #FFFFFF;
    --text-on-surface: #212121;
    --text-on-surface-secondary: #4D4D4D;
    --text-on-disabled: #9E9E9E;
    
    /* State Colors */
    --state-hover: #00796B;
    --state-pressed: #00695C;
    --state-disabled: #B2DFDB;
    
    /* Feedback Colors */
    --error-red: #E53935;
    --success-green: #43A047;
    --warning-amber: #FFB300;
    --info-blue: #2196F3;
    
    /* Dark Mode Colors */
    --dark-background: #121212;
    --dark-surface: #1E1E1E;
    --dark-on-surface: #E0F2F1;
    --dark-teal-300: #4DB6AC;
    
    /* Legacy variables for compatibility */
    --primary-color: var(--teal-600);
    --primary-dark: var(--teal-700);
    --secondary-color: var(--teal-500);
    --accent-color: var(--teal-400);
    --success-color: var(--success-green);
    --warning-color: var(--warning-amber);
    --error-color: var(--error-red);
    --text-primary: var(--text-on-surface);
    --text-secondary: var(--text-on-surface-secondary);
    --text-light: var(--text-on-disabled);
    --bg-primary: var(--surface-background);
    --bg-secondary: var(--surface-container);
    --bg-dark: var(--dark-background);
    --border-color: var(--outline-default);
    
    /* Material Design 3 Elevation Shadows */
    --elevation-1: 0px 1px 2px 0px rgba(0, 0, 0, 0.30), 0px 1px 3px 1px rgba(0, 0, 0, 0.15);
    --elevation-2: 0px 1px 2px 0px rgba(0, 0, 0, 0.30), 0px 2px 6px 2px rgba(0, 0, 0, 0.15);
    --elevation-3: 0px 1px 3px 0px rgba(0, 0, 0, 0.30), 0px 4px 8px 3px rgba(0, 0, 0, 0.15);
    --elevation-4: 0px 2px 3px 0px rgba(0, 0, 0, 0.30), 0px 6px 10px 4px rgba(0, 0, 0, 0.15);
    --elevation-5: 0px 4px 4px 0px rgba(0, 0, 0, 0.30), 0px 8px 12px 6px rgba(0, 0, 0, 0.15);
    
    /* Legacy shadows for compatibility */
    --shadow-sm: var(--elevation-1);
    --shadow-md: var(--elevation-2);
    --shadow-lg: var(--elevation-3);
    --shadow-xl: var(--elevation-4);
}

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

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    z-index: 1000;
    transition: all 0.3s ease;
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    height: 70px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary-color);
}

.nav-brand i {
    font-size: 1.8rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-link {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s ease;
}

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

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    margin-top: 70px; /* Space for fixed navbar */
    background: linear-gradient(135deg, var(--teal-600) 0%, var(--teal-800) 100%);
    color: var(--text-on-primary);
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.hero::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: url('data:image/svg+xml,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><defs><pattern id="grain" width="100" height="100" patternUnits="userSpaceOnUse"><circle cx="50" cy="50" r="1" fill="white" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
}

.hero-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1rem;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: center;
    position: relative;
    z-index: 1;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.2);
    padding: 0.5rem 1rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    backdrop-filter: blur(10px);
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
}

.gradient-text {
    background: linear-gradient(45deg, var(--teal-300), var(--teal-100));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 2rem;
    line-height: 1.7;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-bottom: 2.5rem;
}

.stat {
    text-align: center;
}

.stat-number {
    font-size: 2rem;
    font-weight: 700;
    color: var(--teal-300);
}

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

.hero-actions {
    display: flex;
    gap: 1rem;
}

.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.5rem;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    border: none;
    cursor: pointer;
}

.btn-primary {
    background: var(--teal-600);
    color: var(--text-on-primary);
    border: none;
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.btn-primary:hover {
    background: var(--state-hover);
    transform: translateY(-1px);
    box-shadow: var(--elevation-2);
}

.btn-primary:active {
    background: var(--state-pressed);
    transform: translateY(0);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-on-primary);
    border: 1px solid rgba(255, 255, 255, 0.2);
    border-radius: 20px;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-1px);
    box-shadow: var(--elevation-2);
}

/* Hero Visual */
.hero-visual {
    display: flex;
    justify-content: center;
    align-items: center;
}

.api-cards {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 1rem;
    max-width: 300px;
}

.api-card {
    background: rgba(255, 255, 255, 0.1);
    padding: 1.5rem;
    border-radius: 12px;
    text-align: center;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: transform 0.3s ease;
}

.api-card:hover {
    transform: translateY(-5px);
}

.api-card i {
    font-size: 2rem;
    color: var(--teal-300);
    margin-bottom: 0.5rem;
}

.api-card span {
    display: block;
    font-weight: 600;
    color: white;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--bg-secondary);
    scroll-margin-top: 70px; /* Compensate for fixed navbar height */
    position: relative;
    z-index: 2; /* Ensure it's above hero section */
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    font-weight: 700;
    margin-bottom: 3rem;
    color: var(--text-primary);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.feature-card {
    background: var(--surface-background);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--elevation-1);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    border: 1px solid var(--outline-default);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.feature-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-3);
    border-color: var(--outline-focus);
}

.feature-icon {
    width: 64px;
    height: 64px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.5rem;
    box-shadow: var(--elevation-1);
}

.feature-icon i {
    font-size: 1.5rem;
    color: white;
}

.feature-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

/* Status Section */
.status {
    padding: 80px 0;
    background: white;
    scroll-margin-top: 70px; /* Compensate for fixed navbar height */
}

.status-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 2rem;
}

.status-card {
    background: var(--surface-background);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--elevation-1);
    border: 1px solid var(--outline-default);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
}

.status-card:hover {
    box-shadow: var(--elevation-2);
    border-color: var(--outline-focus);
}

.status-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 1.5rem;
}

.status-header h3 {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.status-badge {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.25rem 0.75rem;
    border-radius: 50px;
    font-size: 0.875rem;
    font-weight: 500;
}

.status-healthy {
    background: var(--teal-100);
    color: var(--teal-800);
    border: 1px solid var(--teal-200);
}

.status-details {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.status-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.status-item span:first-child {
    color: var(--text-secondary);
    font-weight: 500;
}

.status-value {
    color: var(--text-primary);
    font-weight: 600;
}

/* Documentation Section */
.docs {
    padding: 80px 0;
    background: var(--bg-secondary);
    scroll-margin-top: 70px; /* Compensate for fixed navbar height */
}

.docs-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.doc-card {
    background: var(--surface-background);
    padding: 2rem;
    border-radius: 16px;
    text-decoration: none;
    color: inherit;
    box-shadow: var(--elevation-1);
    border: 1px solid var(--outline-default);
    transition: all 0.2s cubic-bezier(0.2, 0, 0, 1);
    position: relative;
    overflow: hidden;
}

.doc-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--elevation-3);
    border-color: var(--outline-focus);
}

.doc-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 4px;
    background: linear-gradient(90deg, var(--teal-600), var(--teal-400));
}

.doc-icon {
    width: 56px;
    height: 56px;
    background: linear-gradient(135deg, var(--teal-600), var(--teal-500));
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1rem;
    box-shadow: var(--elevation-1);
}

.doc-icon i {
    font-size: 1.25rem;
    color: white;
}

.doc-card h3 {
    font-size: 1.25rem;
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--text-primary);
}

.doc-card p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

.doc-arrow {
    position: absolute;
    top: 1rem;
    right: 1rem;
    color: var(--text-light);
    transition: all 0.3s ease;
}

.doc-card:hover .doc-arrow {
    color: var(--teal-600);
    transform: translateX(5px);
}

/* Footer */
.footer {
    background: var(--bg-dark);
    color: white;
    padding: 3rem 0 1rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
}

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1.5rem;
    font-weight: 700;
}

.footer-brand i {
    color: var(--teal-400);
}

.footer-links {
    display: flex;
    gap: 2rem;
}

.footer-links a {
    color: rgba(255, 255, 255, 0.8);
    text-decoration: none;
    transition: color 0.3s ease;
}

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

.footer-bottom {
    text-align: center;
    padding-top: 2rem;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    color: rgba(255, 255, 255, 0.6);
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .hero-stats {
        justify-content: center;
    }
    
    .hero-actions {
        justify-content: center;
        flex-wrap: wrap;
    }
    
    .nav-links {
        display: none;
    }
    
    .features-grid,
    .status-grid,
    .docs-grid {
        grid-template-columns: 1fr;
    }
    
    .footer-content {
        flex-direction: column;
        gap: 1rem;
        text-align: center;
    }
}

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

.hero-content,
.feature-card,
.status-card,
.doc-card {
    animation: fadeInUp 0.6s ease-out;
}

/* Loading Animation */
.loading {
    display: inline-block;
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: white;
    animation: spin 1s ease-in-out infinite;
}

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