/* CSS Custom Properties */
:root {
    --bg-primary: #0a0a14;
    --bg-secondary: #1a1a28;
    --bg-tertiary: #252535;
    --accent-purple: #7c3aed;
    --accent-blue: #3b82f6;
    --accent-teal: #14b8a6;
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-tertiary: #64748b;
    --border-color: rgba(148, 163, 184, 0.1);
    --glass-bg: rgba(26, 26, 40, 0.6);
    --glass-border: rgba(248, 250, 252, 0.1);
}

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

html {
    scroll-behavior: smooth;
}

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

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

/* Animated Background */
.background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    overflow: hidden;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.3;
    animation: float 20s ease-in-out infinite;
}

.orb-1 {
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, var(--accent-purple), transparent);
    top: -200px;
    left: -200px;
    animation-duration: 25s;
}

.orb-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--accent-blue), transparent);
    top: 50%;
    right: -150px;
    animation-duration: 30s;
    animation-delay: -5s;
}

.orb-3 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent-teal), transparent);
    bottom: -100px;
    left: 30%;
    animation-duration: 35s;
    animation-delay: -10s;
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(100px, -50px) scale(1.1);
    }
    66% {
        transform: translate(-50px, 100px) scale(0.9);
    }
}

/* Header */
.header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(10, 10, 20, 0.8);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border-color);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-primary);
    font-size: 1.25rem;
    font-weight: 600;
    transition: opacity 0.2s;
}

.logo:hover {
    opacity: 0.8;
}

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

.nav-link {
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.95rem;
    transition: color 0.2s;
}

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

/* Hero Section */
.hero {
    padding: 2rem 0 5rem;
    position: relative;
}

.hero-content {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 4rem;
    align-items: start;
}

.hero-title {
    font-size: 3.5rem;
    font-weight: 700;
    line-height: 1.1;
    margin-bottom: 1.5rem;
    background: linear-gradient(135deg, var(--text-primary), var(--accent-purple));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 1rem;
    line-height: 1.6;
}

.hero-body {
    font-size: 1rem;
    color: var(--text-tertiary);
    margin-bottom: 2rem;
    line-height: 1.7;
}

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

.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: 0.5rem;
    text-decoration: none;
    font-weight: 500;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: var(--accent-purple);
    color: white;
}

.btn-primary:hover {
    background: #6d28d9;
    transform: translateY(-2px);
    box-shadow: 0 10px 30px rgba(124, 58, 237, 0.4);
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border-color: var(--glass-border);
}

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

/* Hero Demo */
.hero-demo {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.code-window {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 0.75rem;
    overflow: hidden;
    backdrop-filter: blur(20px);
}

.code-header {
    background: rgba(0, 0, 0, 0.3);
    padding: 0.75rem 1rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    border-bottom: 1px solid var(--border-color);
}

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

.code-dots span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
    background: var(--text-tertiary);
}

.code-dots span:nth-child(1) {
    background: #ef4444;
}

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

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

.code-title {
    color: var(--text-secondary);
    font-size: 0.875rem;
}

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

.code-window code {
    font-family: 'Fira Code', 'SF Mono', Monaco, 'Cascadia Code', 'Roboto Mono', Consolas, monospace;
    font-size: 0.875rem;
    line-height: 1.7;
    color: var(--text-primary);
}

/* Syntax Highlighting */
.keyword {
    color: #c792ea;
}

.number {
    color: #f78c6c;
}

.string {
    color: #c3e88d;
}

.operator {
    color: #89ddff;
}

.boolean {
    color: #ff5370;
}

.demo-image {
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
}

.demo-image img {
    width: 100%;
    height: auto;
    display: block;
}

/* Features Section */
.features {
    padding: 6rem 0;
}

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

.section-subtitle {
    text-align: center;
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 3rem;
}

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

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.feature-card:hover {
    transform: translateY(-4px);
    border-color: var(--accent-purple);
    box-shadow: 0 20px 40px rgba(124, 58, 237, 0.2);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1rem;
}

.feature-title {
    font-size: 1.5rem;
    font-weight: 600;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--text-secondary);
    line-height: 1.7;
}

/* Showcase Section */
.showcase {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, var(--bg-secondary), transparent);
}

.showcase-tabs {
    max-width: none;
    margin-bottom: 2rem;
}

.showcase-tabs .tab-buttons {
    justify-content: center;
}

.showcase-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 1.5rem;
}

.showcase-item {
    position: relative;
    display: block;
    border-radius: 0.75rem;
    overflow: hidden;
    border: 1px solid var(--glass-border);
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    cursor: pointer;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.showcase-item:hover {
    transform: scale(1.05);
    border-color: var(--accent-blue);
    box-shadow: 0 20px 40px rgba(59, 130, 246, 0.3);
}

.showcase-item img {
    width: 100%;
    height: auto;
    display: block;
    opacity: 0;
    transition: opacity 0.3s;
}

.showcase-item img.loaded {
    opacity: 1;
}

.showcase-item::after {
    content: attr(data-caption);
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    background: linear-gradient(transparent, rgba(0, 0, 0, 0.8));
    padding: 2rem 1rem 1rem;
    color: white;
    font-size: 0.875rem;
    opacity: 0;
    transition: opacity 0.3s;
}

.showcase-item:hover::after {
    opacity: 1;
}

/* Examples Section */
.examples {
    padding: 6rem 0;
}

.tabs {
    max-width: 900px;
    margin: 0 auto;
}

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

.tab-button {
    padding: 1rem 2rem;
    background: transparent;
    border: none;
    border-bottom: 2px solid transparent;
    color: var(--text-secondary);
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.2s;
}

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

.tab-button.active {
    color: var(--text-primary);
    border-bottom-color: var(--accent-purple);
}

.tab-pane {
    display: none;
}

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

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

.example-description {
    margin-top: 1.5rem;
    color: var(--text-secondary);
    line-height: 1.7;
}

.example-description code {
    background: var(--bg-tertiary);
    padding: 0.2rem 0.5rem;
    border-radius: 0.25rem;
    font-family: 'Fira Code', monospace;
    font-size: 0.9em;
    color: var(--accent-purple);
}

/* Getting Started Section */
.getting-started {
    padding: 6rem 0;
    background: linear-gradient(180deg, transparent, var(--bg-secondary));
}

.getting-started-content {
    max-width: 900px;
    margin: 0 auto;
}

.install-steps {
    display: flex;
    flex-direction: column;
    gap: 2rem;
    margin-bottom: 3rem;
}

.step {
    display: flex;
    gap: 2rem;
    align-items: flex-start;
}

.step-number {
    width: 48px;
    height: 48px;
    border-radius: 50%;
    background: var(--accent-purple);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    font-weight: 700;
    flex-shrink: 0;
}

.step-content {
    flex: 1;
}

.step-content h3 {
    font-size: 1.5rem;
    margin-bottom: 0.75rem;
}

.terminal {
    background: var(--bg-primary);
    border: 1px solid var(--glass-border);
    border-radius: 0.5rem;
    padding: 1rem 1.5rem;
    font-family: 'Fira Code', 'SF Mono', Monaco, monospace;
    color: var(--accent-teal);
}

.install-note {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 1rem;
    padding: 2rem;
    backdrop-filter: blur(20px);
    text-align: center;
}

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

.install-note a {
    color: var(--accent-blue);
}

/* Footer */
.footer {
    padding: 3rem 0;
    border-top: 1px solid var(--border-color);
}

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

.footer-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 600;
}

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

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

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

.footer-legal {
    color: var(--text-tertiary);
    font-size: 0.875rem;
}

/* Responsive Design */
@media (max-width: 1024px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
    }

    .hero-title {
        font-size: 2.5rem;
    }

    .showcase-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

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

    .header-content {
        flex-direction: column;
        gap: 1rem;
    }

    .nav {
        gap: 1rem;
    }

    .hero {
        padding: 1.5rem 0 4rem;
    }

    .hero-title {
        font-size: 2rem;
    }

    .hero-subtitle {
        font-size: 1.125rem;
    }

    .features-grid {
        grid-template-columns: 1fr;
    }

    .showcase-grid {
        grid-template-columns: 1fr;
    }

    .section-title {
        font-size: 2rem;
    }

    .tab-buttons {
        flex-direction: column;
    }

    .tab-button {
        text-align: left;
        border-left: 2px solid transparent;
        border-bottom: none;
    }

    .tab-button.active {
        border-left-color: var(--accent-purple);
        border-bottom-color: transparent;
    }

    .step {
        flex-direction: column;
        gap: 1rem;
    }

    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        flex-direction: column;
        gap: 1rem;
    }
}

@media (max-width: 640px) {
    .hero-title {
        font-size: 1.75rem;
    }

    .hero-cta {
        flex-direction: column;
    }

    .btn {
        text-align: center;
    }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce) {
    * {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
    }

    .orb {
        animation: none;
    }
}

/* Accessibility */
.sr-only {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border-width: 0;
}

/* Focus Styles */
a:focus-visible,
button:focus-visible {
    outline: 2px solid var(--accent-purple);
    outline-offset: 2px;
}
