/*
 * EcoMetricx brand colors
 * Primary navy / blue:   #1a365d, #2c5282
 * Accent electric blue:  #3182ce
 * Accent cyan:           #00b5d8
 * Charcoal / text:       #1f1e18, #2d3748
 * Cool grays:            #718096, #a0aec0
 * Light grays / bg:      #f7fafc, #edf2f7
 */

/* Root Variables */
:root {
    --primary-color: #2c5282;
    --primary-dark: #1a365d;
    --secondary-color: #3182ce;
    --accent-color: #00b5d8;
    --dark-bg: #1f1e18;
    --light-bg: #f7fafc;
    --card-bg: #ffffff;
    --text-dark: #1f1e18;
    --text-light: #718096;
    --border-color: #edf2f7;
    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.12);
    --shadow-md: 0 4px 6px rgba(0, 0, 0, 0.1);
    --shadow-lg: 0 10px 15px rgba(0, 0, 0, 0.1);
    --shadow-xl: 0 20px 25px rgba(0, 0, 0, 0.1);
    --gradient-primary: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    --gradient-secondary: linear-gradient(135deg, #3182ce 0%, #00b5d8 100%);
    --gradient-accent: linear-gradient(135deg, #2c5282 0%, #00b5d8 100%);
}

/* Global Styles */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

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

/* Mermaid Diagrams */
.mermaid {
    color: var(--text-dark);
}

.workflow-diagram .mermaid svg {
    max-width: 100%;
    height: auto;
}

.container {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Navigation */
.navbar {
    position: fixed;
    top: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    z-index: 1000;
    transition: all 0.3s ease;
}

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

.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;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: pulse 2s infinite;
}

.nav-menu {
    display: flex;
    list-style: none;
    gap: 2rem;
    align-items: center;
}

.nav-menu a {
    color: var(--text-dark);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    position: relative;
}

.nav-menu a::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-primary);
    transition: width 0.3s ease;
}

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

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

.github-link {
    font-size: 1.3rem;
}

/* Hero Section */
.hero {
    padding: 120px 0 80px;
    position: relative;
    background: linear-gradient(135deg, #1a365d 0%, #2c5282 100%);
    overflow: hidden;
}

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

.hero-gradient {
    position: absolute;
    width: 150%;
    height: 150%;
    background: radial-gradient(circle at 20% 80%, rgba(44, 82, 130, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 80% 20%, rgba(49, 130, 206, 0.4) 0%, transparent 50%),
                radial-gradient(circle at 40% 40%, rgba(0, 181, 216, 0.2) 0%, transparent 50%);
    animation: float 20s ease-in-out infinite;
}

.hero-pattern {
    position: absolute;
    width: 100%;
    height: 100%;
    background-image: 
        linear-gradient(30deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1)),
        linear-gradient(30deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1)),
        linear-gradient(150deg, rgba(255, 255, 255, 0.1) 12%, transparent 12.5%, transparent 87%, rgba(255, 255, 255, 0.1) 87.5%, rgba(255, 255, 255, 0.1));
    background-size: 80px 140px;
    background-position: 0 0, 0 0, 40px 70px, 40px 70px;
    opacity: 0.3;
}

.hero-content {
    position: relative;
    z-index: 1;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-text {
    color: white;
}

.hero-title {
    font-size: 4rem;
    font-weight: 800;
    margin-bottom: 1rem;
    line-height: 1.1;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #f0f0f0 100%);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: shimmer 3s ease-in-out infinite;
}

.hero-subtitle {
    font-size: 1.5rem;
    font-weight: 300;
    margin-bottom: 1.5rem;
    opacity: 0.95;
}

.hero-description {
    font-size: 1.1rem;
    line-height: 1.8;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.hero-badges {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 2rem;
}

.badge {
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.9rem;
    font-weight: 500;
    border: 1px solid rgba(255, 255, 255, 0.3);
}

.badge-success {
    background: rgba(34, 197, 94, 0.3);
    border-color: rgba(34, 197, 94, 0.5);
}

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

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

.btn-primary {
    background: white;
    color: var(--primary-color);
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-xl);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: white;
    border: 2px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.2);
    border-color: rgba(255, 255, 255, 0.5);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.1rem;
}

/* Code Window */
.code-window {
    background: #1e293b;
    border-radius: 12px;
    overflow: hidden;
    box-shadow: 0 25px 50px rgba(0, 0, 0, 0.3);
    animation: slideUp 0.8s ease-out;
}

.code-header {
    background: #0f172a;
    padding: 0.8rem 1rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.code-dots {
    display: flex;
    gap: 0.5rem;
}

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: #ef4444;
}

.code-dots span:nth-child(2) {
    background: #f59e0b;
}

.code-dots span:nth-child(3) {
    background: #10b981;
}

.code-title {
    color: #94a3b8;
    font-size: 0.9rem;
}

.code-window pre {
    margin: 0;
    padding: 1.5rem;
    overflow-x: auto;
}

.code-window code {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
}

/* Features Section */
.features {
    padding: 80px 0;
    background: var(--light-bg);
}

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

.section-subtitle {
    text-align: center;
    color: var(--text-light);
    font-size: 1.2rem;
    margin-top: -2rem;
    margin-bottom: 3rem;
}

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

.feature-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 4px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.feature-card:hover::before {
    transform: scaleX(1);
}

.feature-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.feature-icon {
    width: 60px;
    height: 60px;
    background: var(--gradient-primary);
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: white;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-size: 1.3rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
}

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

/* Outputs & Artifacts specific lists */
.artifacts .feature-card {
    align-self: flex-start;
}

.artifact-list {
    list-style: none;
    padding-left: 0;
    margin-top: 1rem;
}

.artifact-list li {
    margin-bottom: 0.75rem;
    color: var(--text-dark);
    font-size: 0.95rem;
}

.artifact-list code {
    display: inline-block;
    background: var(--light-bg);
    padding: 0.15rem 0.4rem;
    border-radius: 4px;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
}

/* Models Section */
.models {
    padding: 80px 0;
    background: white;
}

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

.model-card {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
    transition: all 0.3s ease;
    border: 2px solid transparent;
}

.model-card:hover {
    border-color: var(--primary-color);
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
}

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

.model-header h3 {
    font-size: 1.3rem;
    color: var(--text-dark);
}

.model-tag {
    background: var(--gradient-primary);
    color: white;
    padding: 0.3rem 0.6rem;
    border-radius: 6px;
    font-size: 0.8rem;
    font-weight: 600;
}

.model-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
    line-height: 1.6;
}

.model-features {
    list-style: none;
}

.model-features li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.model-features i {
    color: var(--primary-color);
}

/* Installation Section */
.installation {
    padding: 80px 0;
    background: var(--light-bg);
}

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

.install-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-md);
}

.install-card h3 {
    font-size: 1.3rem;
    margin-bottom: 0.5rem;
    color: var(--text-dark);
}

.install-card p {
    color: var(--text-light);
    margin-bottom: 1.5rem;
}

.code-block {
    background: #1e293b;
    border-radius: 8px;
    padding: 1rem;
    overflow-x: auto;
}

.code-block pre {
    margin: 0;
}

.code-block code {
    color: #e2e8f0;
    font-family: 'Fira Code', monospace;
}

/* Usage Section */
.usage {
    padding: 80px 0;
    background: white;
}

.usage-tabs {
    background: var(--light-bg);
    border-radius: 16px;
    padding: 2rem;
}

.tab-buttons {
    display: flex;
    gap: 1rem;
    margin-bottom: 2rem;
    border-bottom: 2px solid var(--border-color);
    padding-bottom: 1rem;
}

.tab-button {
    background: none;
    border: none;
    padding: 0.5rem 1rem;
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-light);
    cursor: pointer;
    transition: all 0.3s ease;
    position: relative;
}

.tab-button.active {
    color: var(--primary-color);
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: -1rem;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform 0.3s ease;
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-pane {
    display: none;
}

.tab-pane.active {
    display: block;
    animation: fadeIn 0.5s ease;
}

.tab-pane pre {
    background: #1e293b;
    border-radius: 8px;
    padding: 1.5rem;
    overflow-x: auto;
}

/* Visualizations Section */
.visualizations {
    padding: 80px 0;
    background: linear-gradient(135deg, rgba(44, 82, 130, 0.05) 0%, rgba(49, 130, 206, 0.05) 100%);
}

.visualization-content {
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
    margin-top: 3rem;
}

.visualization-text h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.visualization-text p {
    color: var(--text-light);
    line-height: 1.8;
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.viz-features {
    list-style: none;
    margin-bottom: 2rem;
}

.viz-features li {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1rem;
    color: var(--text-dark);
    font-size: 1.05rem;
    padding: 0.5rem 0;
    border-left: 3px solid transparent;
    padding-left: 1rem;
    transition: all 0.3s ease;
}

.viz-features li:hover {
    border-left-color: var(--primary-color);
    background: rgba(102, 126, 234, 0.05);
    padding-left: 1.5rem;
}

.viz-features i {
    color: var(--primary-color);
    font-size: 1.2rem;
    width: 30px;
}

.viz-caption {
    background: white;
    padding: 1.5rem;
    border-radius: 12px;
    box-shadow: var(--shadow-md);
    border-left: 4px solid var(--primary-color);
}

.viz-caption p {
    margin: 0;
    font-size: 0.95rem;
    line-height: 1.6;
}

.visualization-image {
    position: relative;
    border-radius: 16px;
    overflow: hidden;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.15);
    transition: all 0.3s ease;
}

.visualization-image:hover {
    transform: scale(1.02);
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.2);
}

.visualization-image img {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 16px;
}

/* Documentation Section */
.documentation {
    padding: 80px 0;
    background: var(--light-bg);
}

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

.doc-card {
    background: white;
    padding: 2rem;
    border-radius: 16px;
    text-align: center;
    text-decoration: none;
    color: var(--text-dark);
    transition: all 0.3s ease;
    box-shadow: var(--shadow-md);
}

.doc-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-xl);
}

.doc-card i {
    font-size: 3rem;
    background: var(--gradient-primary);
    background-clip: text;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 1rem;
}

.doc-card h3 {
    font-size: 1.2rem;
    margin-bottom: 0.5rem;
}

.doc-card p {
    color: var(--text-light);
}

/* CTA Section */
.cta {
    padding: 80px 0;
    background: var(--gradient-primary);
    text-align: center;
    color: white;
}

.cta h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.cta p {
    font-size: 1.2rem;
    margin-bottom: 2rem;
    opacity: 0.9;
}

.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
}

/* Footer */
.footer {
    background: var(--dark-bg);
    color: white;
    padding: 40px 0;
    text-align: center;
}

.footer-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
}

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

.footer-text {
    color: #94a3b8;
}

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

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.3s ease;
}

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

/* Animations */
@keyframes float {
    0%, 100% {
        transform: translate(-10%, -10%) rotate(0deg);
    }
    50% {
        transform: translate(10%, 10%) rotate(180deg);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.7;
    }
}

@keyframes shimmer {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.8;
    }
}

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

@keyframes fadeIn {
    from {
        opacity: 0;
    }
    to {
        opacity: 1;
    }
}

/* Responsive Design */
@media (max-width: 768px) {
    .hero-content {
        grid-template-columns: 1fr;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .nav-menu {
        display: none;
    }
    
    .features-grid {
        grid-template-columns: 1fr;
    }
    
    .models-grid {
        grid-template-columns: 1fr;
    }
    
    .install-options {
        grid-template-columns: 1fr;
    }
    
    .tab-buttons {
        flex-direction: column;
    }
    
    .visualization-content {
        grid-template-columns: 1fr;
        gap: 30px;
    }
    
    .visualization-text {
        order: 2;
    }
    
    .visualization-image {
        order: 1;
    }
    
    .cta-buttons {
        flex-direction: column;
        align-items: center;
    }
}
