/* Landing Page Styles */

/* Import base styles with CSS variables */
@import url('base.css');

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

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

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

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    padding: 0 20px;
}

/* Header */
header {
    position: fixed;
    top: 0;
    z-index: 1000;
    width: 100%;
    padding: 16px 0;
    background: var(--landing-header-bg);
    border-bottom: 1px solid var(--border-primary);
    transition: all 0.3s ease;
    backdrop-filter: blur(20px);
}

header.scrolled {
    background: var(--landing-header-bg-scrolled);
    backdrop-filter: blur(30px);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 24px;
    font-weight: 700;
    text-decoration: none;
    color: var(--text-primary);
    transition: opacity 0.2s ease;
}

.logo:hover {
    opacity: 0.8;
}

.logo:visited {
    color: var(--text-primary);
}

.logo-icon img {
    display: flex;
    width: 60px;
    height: 60px;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    animation: pulse 10s infinite;
}

@keyframes pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.05); }
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 32px;
}

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

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

.nav-link::after {
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0;
    height: 2px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    transition: width 0.3s ease;
    content: '';
}

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

/* Buttons */
.btn {
    position: relative;
    display: inline-flex;
    overflow: hidden;
    padding: 12px 24px;
    align-items: center;
    gap: 8px;
    font-size: 18px;
    font-weight: 600;
    text-decoration: none;
    border: none;
    border-radius: 12px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-primary {
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    box-shadow: 0 4px 15px rgba(139, 92, 246, 0.3);
}

.btn-primary:hover {
    box-shadow: 0 8px 25px rgba(139, 92, 246, 0.4);
    transform: translateY(-2px);
}

.btn-secondary {
    color: var(--text-primary);
    background: var(--landing-btn-secondary-bg);
    border: 1px solid var(--border-secondary);
    backdrop-filter: blur(10px);
}

.btn-secondary:hover {
    background: var(--landing-btn-secondary-hover-bg);
    border-color: var(--accent-primary);
}

/* Hero Section */
.hero {
    position: relative;
    overflow: hidden;
    padding: 160px 0 0;
    text-align: center;
    background: var(--landing-hero-bg-gradient);
}

.hero::after {
    position: absolute;
    right: 0;
    bottom: 0;
    left: 0;
    height: 60px;
    background: var(--landing-hero-after-gradient);
    content: '';
    pointer-events: none;
}

.hero-title {
    margin-bottom: 24px;
    font-size: clamp(3rem, 8vw, 5.5rem);
    font-weight: 800;
    line-height: 1.2;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 50%, #f093fb 100%);
    animation: slideInUp 1s ease-out;
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-subtitle {
    max-width: 600px;
    margin-right: auto;
    margin-bottom: 60px;
    margin-left: auto;
    font-size: clamp(1.125rem, 3vw, 1.5rem);
    color: var(--text-secondary);
    animation: slideInUp 1s ease-out 0.2s both;
}

.hero-cta {
    display: flex;
    margin-bottom: 80px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    animation: slideInUp 1s ease-out 0.4s both;
}

/* Model Cards Section */
.model-selector {
    position: relative;
    padding: 0 0 20px;
    background: var(--landing-code-demo-bg);
}

.model-cards-container {
    position: relative;
    overflow: visible;
    width: 100vw;
    margin: 0 auto;
}

.model-cards {
    display: flex;
    overflow-x: auto;
    padding: 25px 0;
    padding-right: 20px;
    padding-left: 20px;
    justify-content: space-evenly;
    gap: 16px;
    cursor: grab;
    user-select: none;
    -ms-overflow-style: none;
    scroll-behavior: smooth;
    scrollbar-width: none;
}

.model-cards::-webkit-scrollbar {
    display: none;
}

.model-cards.dragging {
    cursor: grabbing;
    scroll-behavior: auto;
}

.model-cards.dragging .model-card {
    pointer-events: none;
}

.model-card {
    position: relative;
    overflow: hidden;
    min-width: 240px;
    padding: 18px 20px;
    flex: 0 0 auto;
    text-align: left;
    background: var(--landing-model-card-bg);
    border: 2px solid var(--border-primary);
    border-radius: 16px;
    transition: all 0.3s ease;
    cursor: pointer;
    user-select: none;
    user-select: none;
    user-select: none;
    user-select: none;
    backdrop-filter: blur(10px);
}

.model-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 3px;
    background: radial-gradient(circle, #6874ee, #8b5cf6);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    content: '';
}

.model-card:hover::before,
.model-card.active::before {
    transform: scaleX(1);
}

.model-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.2);
    transform: translateY(-4px);
}

.model-card.active {
    background: var(--landing-model-card-active-bg);
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.3);
}

.model-header {
    display: flex;
    margin-bottom: 14px;
    align-items: center;
    gap: 12px;
}

.model-logo {
    display: flex;
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    font-weight: bold;
    border-radius: 8px;
    transition: transform 0.3s ease;
}

.model-card:hover .model-logo {
    transform: scale(1.1);
}

.model-info {
    min-width: 0;
    flex: 1;
}

/* Provider colors */
.openai { background: linear-gradient(135deg, #00a67e, #00c896); }
.google { background: linear-gradient(135deg, #4285f4, #34a853); }
.anthropic { background: linear-gradient(135deg, #d97706, #f59e0b); }
.cohere { background: linear-gradient(135deg, #8b5cf6, #a855f7); }
.mistral { background: linear-gradient(135deg, #ff6b6b, #ee5a24); }
.meta { background: linear-gradient(135deg, #1877f2, #42a5f5); }
.perplexity { background: linear-gradient(135deg, #20b2aa, #48d1cc); }
.together { background: linear-gradient(135deg, #ff6b35, #f7931e); }
.replicate { background: linear-gradient(135deg, #000, #434343); }
.huggingface { background: linear-gradient(135deg, #ff9500, #ffb700); }
.azure { background: linear-gradient(135deg, #0078d4, #106ebe); }

.model-name {
    margin-bottom: 2px;
    font-size: 16px;
    font-weight: 700;
    line-height: 1.2;
    color: var(--text-primary);
}

.model-provider {
    font-size: 12px;
    font-weight: 500;
    color: var(--text-secondary);
    opacity: 0.8;
}

.model-pricing {
    padding: 12px;
    font-size: 12px;
    background: var(--bg-tertiary);
    border-radius: 10px;
}

.pricing-row {
    display: flex;
    margin-bottom: 6px;
    align-items: center;
    justify-content: space-between;
}

.pricing-row:last-child {
    margin-bottom: 0;
}

.pricing-label {
    font-weight: 500;
    color: var(--text-secondary);
}

.pricing-value {
    font-size: 13px;
    font-weight: 700;
    color: var(--success);
}

.pricing-unit {
    margin-left: 2px;
    font-size: 10px;
    font-weight: 500;
    color: var(--text-tertiary);
}

/* Code Demo */
.code-demo {
    padding: 30px 0 60px;
    background: var(--landing-code-demo-bg);
    animation: slideInUp 1s ease-out 0.6s both;
}

.code-container {
    overflow: hidden;
    max-width: 800px;
    margin: 0 auto 20px;
    background: var(--bg-primary);
    border: 1px solid var(--border-primary);
    border-radius: 16px;
    box-shadow: 0 20px 40px var(--shadow-heavy);
    backdrop-filter: blur(20px);
}

.code-header {
    display: flex;
    padding: 16px 24px;
    align-items: center;
    justify-content: space-between;
    background: var(--bg-tertiary);
    border-bottom: 1px solid var(--border-primary);
}

.code-tabs {
    display: flex;
    gap: 16px;
}

.code-tab {
    padding: 8px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    background: var(--bg-quaternary);
    border: none;
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.code-tab.active {
    color: white;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
}

.copy-btn {
    padding: 8px 12px;
    font-size: 12px;
    color: var(--text-primary);
    background: var(--bg-quaternary);
    border: 1px solid var(--border-secondary);
    border-radius: 8px;
    transition: all 0.3s ease;
    cursor: pointer;
}

.copy-btn:hover {
    background: rgba(139, 92, 246, 0.2);
    border-color: var(--accent-primary);
}

.code-content {
    overflow-x: auto;
    padding: 24px;
    font-family: 'JetBrains Mono', 'Fira Code', 'Cascadia Code', monospace;
    font-size: 14px;
    line-height: 1.6;
}

.code-example {
    display: none;
}

.code-example.active {
    display: block;
}

.code-cta {
    display: flex;
    padding: 20px;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 16px;
    animation: slideInUp 1s ease-out 0.4s both;
}

/* Features Section */
.features {
    padding: 0;
    background: var(--landing-features-bg-gradient);
}

.features::before {
    position: relative;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 80px;
    background: var(--landing-features-before-gradient);
    content: '';
    pointer-events: none;
}

.features::after {
    position: relative;
    right: 0;
    bottom: 0;
    left: 0;
    display: block;
    height: 80px;
    background: var(--landing-features-after-gradient);
    content: '';
    pointer-events: none;
}

.features-content {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    margin-bottom: 4rem;
    text-align: center;
}

.section-title h2 {
    margin-bottom: 1rem;
    font-size: 3rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.section-title p {
    max-width: 600px;
    margin: 0 auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

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

.feature-card {
    position: relative;
    overflow: hidden;
    padding: 3rem 2rem;
    background: var(--bg-secondary);
    border: 1px solid var(--border-primary);
    border-radius: 24px;
    transition: all 0.5s ease;
    backdrop-filter: blur(10px);
}

.feature-card::before {
    position: absolute;
    top: 0;
    right: 0;
    left: 0;
    height: 2px;
    background: linear-gradient(135deg, #8b5cf6, #06b6d4);
    transform: scaleX(0);
    transition: transform 0.3s ease;
    content: '';
}

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

.feature-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.2);
    transform: translateY(-8px);
}

.feature-icon {
    position: relative;
    display: flex;
    overflow: hidden;
    width: 80px;
    height: 80px;
    margin-bottom: 2rem;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    background: var(--bg-secondary);
    border-radius: 20px;
}

.feature-icon img {
    position: relative;
    z-index: 2;
    width: 70px;
    height: 70px;
    object-fit: contain;
}

.feature-icon::after {
    position: absolute;
    top: -50%;
    left: -50%;
    z-index: 1;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255,255,255,0.1), transparent);
    transform: rotate(45deg);
    animation: shine 3s infinite;
    content: '';
}

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

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

.feature-list {
    list-style: none;
}

.feature-list li {
    display: flex;
    margin-bottom: 0.5rem;
    align-items: center;
    gap: 0.5rem;
    color: var(--text-secondary);
}

.feature-list li::before {
    font-size: 1.2rem;
    font-weight: bold;
    color: #4facfe;
    content: '✓';
}

/* CTA Section */
.cta-section {
    position: relative;
    overflow: hidden;
    margin: 4rem 0;
    padding: 6rem 0;
    text-align: center;
    background: var(--landing-cta-bg);
    border-radius: 50px;
}

.cta-section::before {
    position: absolute;
    top: 0;
    left: 0;
    z-index: -1;
    width: 100%;
    height: 100%;
    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="25" cy="25" r="1" fill="%23667eea" opacity="0.1"/><circle cx="75" cy="75" r="1" fill="%23764ba2" opacity="0.1"/><circle cx="50" cy="10" r="1" fill="%23f093fb" opacity="0.1"/></pattern></defs><rect width="100" height="100" fill="url(%23grain)"/></svg>');
    opacity: 0.3;
    content: '';
}

.cta-content h2 {
    margin-bottom: 1rem;
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, #667eea 0%, #764ba2 100%);
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.cta-content p {
    max-width: 600px;
    margin-right: auto;
    margin-bottom: 2rem;
    margin-left: auto;
    font-size: 1.2rem;
    color: var(--text-secondary);
}

/* Footer */
footer {
    padding: 60px 0 20px;
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-primary);
}

.footer-content {
    display: grid;
    margin-bottom: 40px;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
}

.footer-section h4 {
    margin-bottom: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-links {
    list-style: none;
}

.footer-links li {
    margin-bottom: 8px;
}

.footer-links a {
    text-decoration: none;
    color: var(--text-secondary);
    transition: color 0.3s ease;
}

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

.footer-bottom {
    padding-top: 20px;
    text-align: center;
    color: var(--text-secondary);
    border-top: 1px solid var(--border-primary);
}

/* Animations */
@keyframes highlight {
    0% { background: rgba(139, 92, 246, 0.4); }
    100% { background: rgba(139, 92, 246, 0.2); }
}

@keyframes slideInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

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

@keyframes shine {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

/* Utility classes */
.fade-in {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.6s ease;
}

.fade-in.visible {
    opacity: 1;
    transform: translateY(0);
}

.model-highlight {
    animation: highlight 0.6s ease;
}

/* Footer Styles for Landing Page */
body {
    display: flex;
    min-height: 100vh;
    flex-direction: column;
}

.site-footer {
    margin-top: auto;
}

/* Override footer container max-width for landing */
.site-footer .container {
    max-width: 1200px;
}

/* ====================================
   Light Theme Specific Styles for Landing
   ==================================== */

[data-theme="light"] .hero-title {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 25%, #db2777 50%, #0ea5e9 75%, #06b6d4 100%);
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 0 30px rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .section-title h2 {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .cta-content h2 {
    background: linear-gradient(135deg, #4f46e5 0%, #7c3aed 50%, #db2777 100%);
    background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme="light"] .model-card {
    border: 2px solid var(--border-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .model-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 12px 24px rgba(139, 92, 246, 0.15);
    transform: translateY(-4px);
}

[data-theme="light"] .model-card.active {
    border-color: var(--accent-primary);
    box-shadow: 0 8px 20px rgba(139, 92, 246, 0.2);
}

[data-theme="light"] .feature-card {
    border: 1px solid var(--border-secondary);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-card:hover {
    border-color: var(--accent-primary);
    box-shadow: 0 20px 40px rgba(139, 92, 246, 0.15);
}

[data-theme="light"] .code-container {
    border: 1px solid var(--border-secondary);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .cta-section {
    border: 1px solid var(--border-primary);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
}

[data-theme="light"] .feature-list li::before {
    color: #0ea5e9;
}

/* Light theme enhanced gradients and effects */
[data-theme="light"] .model-card::before {
    background: radial-gradient(circle, #4f46e5, #7c3aed);
}

[data-theme="light"] .feature-card::before {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
}

[data-theme="light"] .nav-link::after {
    background: linear-gradient(135deg, #4f46e5, #0ea5e9);
}

/* Adjust button shadows for light theme */
[data-theme="light"] .btn-primary {
    box-shadow: 0 4px 15px rgba(79, 70, 229, 0.3);
}

[data-theme="light"] .btn-primary:hover {
    box-shadow: 0 8px 25px rgba(79, 70, 229, 0.4);
}

/* Light theme provider logo adjustments */
[data-theme="light"] .replicate {
    background: linear-gradient(135deg, #374151, #6b7280);
}

/* ====================================
   Theme Toggle Button Styles
   ==================================== */

.theme-toggle {
    position: relative;
    display: flex;
    overflow: hidden;
    width: 40px;
    min-width: auto !important;
    height: 40px;
    padding: 8px !important;
    align-items: center;
    justify-content: center;
    border-radius: 50% !important;
}

.theme-icon {
    position: absolute;
    transition: all 0.3s ease;
}

.theme-icon.sun-icon {
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

.theme-icon.moon-icon {
    display: none;
    opacity: 0;
    transform: rotate(90deg) scale(0);
}

[data-theme="light"] .theme-icon.sun-icon {
    display: none;
    opacity: 0;
    transform: rotate(-90deg) scale(0);
}

[data-theme="light"] .theme-icon.moon-icon {
    display: block;
    opacity: 1;
    transform: rotate(0deg) scale(1);
}

/* Enhanced header actions layout */
.header-actions {
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Responsive adjustments for header actions */
@media (max-width: 768px) {
    .header-actions {
        gap: 8px;
    }
    
    .theme-toggle {
        width: 36px;
        height: 36px;
    }
    
    .nav-links {
        display: none;
    }
}

/* ====================================
   Enhanced Animations and Effects
   ==================================== */

/* Smooth transitions for theme switching */
* {
    transition: background-color 0.3s ease, 
                color 0.3s ease, 
                border-color 0.3s ease,
                box-shadow 0.3s ease;
}

/* Preserve specific animation durations */
.model-card,
.feature-card,
.btn {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Enhanced shine effect for both themes */
@keyframes shine-light {
    0% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
    50% { transform: translateX(100%) translateY(100%) rotate(45deg); }
    100% { transform: translateX(-100%) translateY(-100%) rotate(45deg); }
}

[data-theme="light"] .feature-icon::after {
    background: linear-gradient(45deg, transparent, rgba(79, 70, 229, 0.1), transparent);
    animation: shine-light 3s infinite;
}

/* Accessibility improvements */
@media (prefers-reduced-motion: reduce) {
    * {
        transition-duration: 0.01ms !important;
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
    }
    
    .feature-icon::after {
        animation: none;
    }
    
    .model-card::before,
    .feature-card::before {
        animation: none;
    }
}

/* High contrast support */
@media (prefers-contrast: high) {
    [data-theme="light"] .model-card,
    [data-theme="light"] .feature-card {
        border-width: 3px;
    }
    
    [data-theme="light"] .btn {
        border-width: 2px;
    }
}