/* ===== CSS Variables - Pastel Color Scheme ===== */
:root {
    /* Primary Colors - Soft Lavender/Purple */
    --primary: #8b7ec8;
    --primary-light: #b8aee0;
    --primary-dark: #6b5fa8;
    --primary-bg: #f5f3ff;

    /* Secondary Colors - Soft Blue */
    --secondary: #7ca3c8;
    --secondary-light: #a8c4db;
    --secondary-dark: #5c83a8;

    /* Accent - Soft Rose/Coral */
    --accent: #c89b9b;
    --accent-light: #e0c4c4;

    /* Neutrals */
    --text-primary: #3d3d5c;
    --text-secondary: #6b6b8a;
    --text-muted: #9494a8;
    --background: #fafbff;
    --surface: #ffffff;
    --surface-elevated: #ffffff;
    --border: #e8e8f0;
    --border-light: #f0f0f8;

    /* Status */
    --success: #7bc88b;
    --warning: #c8b07b;
    --error: #c87b7b;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(139, 126, 200, 0.05);
    --shadow-md: 0 4px 12px rgba(139, 126, 200, 0.1);
    --shadow-lg: 0 8px 32px rgba(139, 126, 200, 0.12);
    --shadow-xl: 0 16px 48px rgba(139, 126, 200, 0.15);

    /* Gradients */
    --gradient-primary: linear-gradient(135deg, #8b7ec8 0%, #7ca3c8 100%);
    --gradient-bg: linear-gradient(180deg, #fafbff 0%, #f5f3ff 100%);
    --gradient-hero: linear-gradient(135deg, #f5f3ff 0%, #f0f5ff 50%, #fff5f5 100%);

    /* Typography */
    --font-sans: 'IBM Plex Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'IBM Plex Mono', 'SF Mono', 'Fira Code', monospace;

    /* Spacing */
    --nav-height: 72px;
    --section-padding: 100px;
    --container-width: 1200px;

    /* Transitions */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-slow: 400ms ease;

    /* Border Radius */
    --radius-sm: 6px;
    --radius-md: 12px;
    --radius-lg: 20px;
    --radius-xl: 32px;
}

/* ===== Reset & Base ===== */
*,
*::before,
*::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

body {
    font-family: var(--font-sans);
    font-size: 16px;
    line-height: 1.6;
    color: var(--text-primary);
    background: var(--background);
}

a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

img, video {
    max-width: 100%;
    height: auto;
    display: block;
}

button {
    font-family: inherit;
    cursor: pointer;
    border: none;
    background: none;
}

/* ===== Typography ===== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 600;
    line-height: 1.2;
    color: var(--text-primary);
}

h1 {
    font-size: clamp(2.5rem, 6vw, 4rem);
    font-weight: 700;
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.75rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.25rem;
}

p {
    color: var(--text-secondary);
}

/* ===== Navigation ===== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: var(--nav-height);
    z-index: 1000;
    background: rgba(250, 251, 255, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid transparent;
    transition: all var(--transition-normal);
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.95);
    border-bottom-color: var(--border);
    box-shadow: var(--shadow-sm);
}

.nav-container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.nav-icon {
    width: 36px;
    height: 36px;
    border-radius: var(--radius-sm);
}

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

.nav-links a {
    font-size: 0.9375rem;
    font-weight: 500;
    color: var(--text-secondary);
    transition: color var(--transition-fast);
}

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

.nav-discord {
    padding: 8px 16px;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    color: var(--primary) !important;
}

.nav-discord:hover {
    background: var(--primary-light);
    color: white !important;
}

.nav-mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 5px;
    padding: 8px;
}

.nav-mobile-toggle span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all var(--transition-fast);
}

/* ===== Hero Section ===== */
.hero {
    min-height: 100vh;
    padding: calc(var(--nav-height) + 60px) 24px 80px;
    background: var(--gradient-hero);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 60px;
}

.hero-content {
    max-width: 700px;
    text-align: center;
}

.hero h1 {
    margin-bottom: 24px;
}

.gradient-text {
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-subtitle {
    font-size: 1.125rem;
    line-height: 1.7;
    color: var(--text-secondary);
    margin-bottom: 32px;
}

.hero-agents {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 12px;
    margin-bottom: 40px;
}

.agent-badge {
    padding: 8px 16px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-xl);
    font-size: 0.875rem;
    font-weight: 500;
    color: var(--text-secondary);
    box-shadow: var(--shadow-sm);
}

.hero-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Buttons ===== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 14px 28px;
    font-size: 1rem;
    font-weight: 600;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

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

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

.btn-secondary {
    background: var(--surface);
    color: var(--text-primary);
    border: 1px solid var(--border);
    box-shadow: var(--shadow-sm);
}

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

.btn-discord {
    background: #5865F2;
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-discord:hover {
    background: #4752c4;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

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

.btn-github:hover {
    background: #2d2d4a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

/* ===== Demo Window ===== */
.hero-demo {
    width: 100%;
    max-width: 900px;
}

.demo-window {
    background: var(--surface);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    overflow: hidden;
    border: 1px solid var(--border);
}

.demo-window.large {
    max-width: 100%;
}

.demo-header {
    display: flex;
    gap: 8px;
    padding: 14px 16px;
    background: var(--border-light);
    border-bottom: 1px solid var(--border);
}

.demo-dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.demo-dot.red { background: #ff6b6b; }
.demo-dot.yellow { background: #ffd93d; }
.demo-dot.green { background: #6bcb77; }

.demo-video {
    width: 100%;
    display: block;
}

/* ===== Features Section ===== */
.features {
    padding: var(--section-padding) 24px;
    background: var(--surface);
}

.section-header {
    text-align: center;
    max-width: 600px;
    margin: 0 auto 60px;
}

.section-header h2 {
    margin-bottom: 16px;
}

.section-header p {
    font-size: 1.125rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 24px;
    max-width: var(--container-width);
    margin: 0 auto;
}

.feature-card {
    padding: 32px;
    background: var(--background);
    border-radius: var(--radius-lg);
    border: 1px solid var(--border-light);
    transition: all var(--transition-normal);
}

.feature-card:hover {
    border-color: var(--primary-light);
    box-shadow: var(--shadow-md);
    transform: translateY(-4px);
}

.feature-icon {
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--primary-bg);
    border-radius: var(--radius-md);
    color: var(--primary);
    margin-bottom: 20px;
}

.feature-card h3 {
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-card p {
    font-size: 0.9375rem;
    line-height: 1.6;
}

/* ===== Comparison Section ===== */
.comparison-section {
    padding: var(--section-padding) 24px;
    background: var(--gradient-bg);
}

.comparison-table-wrapper {
    max-width: var(--container-width);
    margin: 0 auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    background: var(--surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: var(--shadow-md);
    min-width: 600px;
}

.comparison-table th,
.comparison-table td {
    padding: 16px 20px;
    text-align: center;
    border-bottom: 1px solid var(--border-light);
}

.comparison-table th {
    background: var(--background);
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
}

.comparison-table th:first-child,
.comparison-table td:first-child {
    text-align: left;
    font-weight: 500;
}

.comparison-table th.highlight {
    background: var(--primary-bg);
    color: var(--primary);
}

.comparison-table td.highlight {
    background: rgba(139, 126, 200, 0.05);
}

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

.comparison-table tbody tr:hover {
    background: var(--background);
}

.comparison-table tbody tr:hover td.highlight {
    background: var(--primary-bg);
}

.comparison-table .check {
    color: var(--success);
    font-weight: 500;
}

.comparison-table .cross {
    color: #e07a7a;
    font-weight: 500;
}

.comparison-table .partial {
    color: var(--warning);
    font-weight: 500;
}

.comparison-note {
    margin-top: 16px;
    font-size: 0.875rem;
    color: var(--text-muted);
    text-align: center;
}

/* ===== Desktop Section ===== */
.desktop-section {
    padding: var(--section-padding) 24px;
    background: var(--gradient-bg);
}

.desktop-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1.2fr;
    gap: 60px;
    align-items: center;
}

.section-tag {
    display: inline-block;
    padding: 6px 14px;
    background: var(--primary-bg);
    color: var(--primary);
    font-size: 0.875rem;
    font-weight: 600;
    border-radius: var(--radius-xl);
    margin-bottom: 16px;
}

.desktop-text h2 {
    margin-bottom: 20px;
}

.desktop-text > p {
    font-size: 1.0625rem;
    margin-bottom: 32px;
}

.feature-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.feature-list li {
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--text-secondary);
    font-size: 0.9375rem;
}

.feature-list svg {
    color: var(--success);
    flex-shrink: 0;
}

.desktop-demo {
    position: relative;
}

/* ===== Mobile Section ===== */
.mobile-section {
    padding: var(--section-padding) 24px;
    background: var(--surface);
    overflow: hidden;
}

.mobile-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.phone-frame {
    max-width: 700px;
    margin: 0 auto;
    border-radius: 64px;
    overflow: hidden;
    box-shadow: var(--shadow-xl);
    background: #000;
    padding: 18px;
}

.phone-video {
    width: 100%;
    border-radius: 48px;
    display: block;
}

.mobile-text h2 {
    margin-bottom: 20px;
}

.mobile-text > p {
    font-size: 1.0625rem;
    margin-bottom: 32px;
}

.app-store-buttons {
    display: flex;
    gap: 16px;
    margin-top: 32px;
    flex-wrap: wrap;
}

.app-store-btn {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 20px;
    background: var(--text-primary);
    color: white;
    border-radius: var(--radius-md);
    transition: all var(--transition-fast);
}

.app-store-btn:hover {
    background: #2d2d4a;
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.app-store-btn.disabled {
    background: var(--text-muted);
    cursor: not-allowed;
    opacity: 0.7;
}

.app-store-btn.disabled:hover {
    transform: none;
    box-shadow: none;
}

.app-store-btn div {
    display: flex;
    flex-direction: column;
    line-height: 1.2;
}

.app-store-btn span {
    font-size: 0.75rem;
    opacity: 0.8;
}

.app-store-btn strong {
    font-size: 1rem;
}

/* ===== Download Section ===== */
.download-section {
    padding: var(--section-padding) 24px;
    background: var(--gradient-bg);
}

.download-content {
    max-width: var(--container-width);
    margin: 0 auto;
    text-align: center;
}

.download-content h2 {
    margin-bottom: 16px;
}

.download-content > p {
    font-size: 1.125rem;
    color: var(--text-secondary);
    margin-bottom: 48px;
}

.download-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 60px;
}

.download-card {
    padding: 32px 24px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    transition: all var(--transition-normal);
    text-align: center;
}

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

.download-icon {
    color: var(--primary);
    margin-bottom: 16px;
}

.download-card h3 {
    margin-bottom: 8px;
    color: var(--text-primary);
}

.download-file {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cli-section {
    padding-top: 40px;
    border-top: 1px solid var(--border);
}

.cli-section h3 {
    margin-bottom: 20px;
    color: var(--text-primary);
}

.cli-install {
    display: inline-flex;
    align-items: center;
    gap: 12px;
    padding: 16px 20px;
    background: var(--text-primary);
    border-radius: var(--radius-md);
    margin-bottom: 16px;
}

.cli-install code {
    font-family: var(--font-mono);
    font-size: 0.9375rem;
    color: white;
}

.copy-btn {
    color: white;
    opacity: 0.7;
    transition: opacity var(--transition-fast);
    padding: 4px;
}

.copy-btn:hover {
    opacity: 1;
}

.cli-note {
    font-size: 0.875rem;
    color: var(--text-muted);
}

.cli-note a {
    color: var(--primary);
    text-decoration: underline;
}

/* ===== CTA Section ===== */
.cta-section {
    padding: var(--section-padding) 24px;
    background: var(--surface);
}

.cta-content {
    max-width: 600px;
    margin: 0 auto;
    text-align: center;
}

.cta-content h2 {
    margin-bottom: 16px;
}

.cta-content p {
    font-size: 1.125rem;
    margin-bottom: 32px;
}

.cta-buttons {
    display: flex;
    justify-content: center;
    gap: 16px;
    flex-wrap: wrap;
}

/* ===== Footer ===== */
.footer {
    padding: 60px 24px 24px;
    background: var(--background);
    border-top: 1px solid var(--border);
}

.footer-content {
    max-width: var(--container-width);
    margin: 0 auto;
    display: grid;
    grid-template-columns: 1fr 2fr;
    gap: 60px;
    padding-bottom: 40px;
    border-bottom: 1px solid var(--border);
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.footer-logo {
    width: 48px;
    height: 48px;
    border-radius: var(--radius-sm);
}

.footer-brand span {
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text-primary);
}

.footer-brand p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

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

.footer-links {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
}

.footer-column h4 {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

.footer-column a {
    display: block;
    font-size: 0.9375rem;
    color: var(--text-secondary);
    padding: 6px 0;
    transition: color var(--transition-fast);
}

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

.footer-bottom {
    max-width: var(--container-width);
    margin: 0 auto;
    padding-top: 24px;
    text-align: center;
}

.footer-bottom p {
    font-size: 0.875rem;
    color: var(--text-muted);
}

/* ===== Mobile Responsive ===== */
@media (max-width: 1024px) {
    .desktop-content,
    .mobile-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .desktop-text,
    .mobile-text {
        order: 1;
    }

    .desktop-demo,
    .mobile-demo {
        order: 2;
    }
}

@media (max-width: 768px) {
    :root {
        --section-padding: 60px;
    }

    .nav-links {
        position: fixed;
        top: var(--nav-height);
        left: 0;
        right: 0;
        background: var(--surface);
        flex-direction: column;
        padding: 24px;
        gap: 16px;
        border-bottom: 1px solid var(--border);
        transform: translateY(-100%);
        opacity: 0;
        pointer-events: none;
        transition: all var(--transition-normal);
    }

    .nav-links.active {
        transform: translateY(0);
        opacity: 1;
        pointer-events: auto;
    }

    .nav-mobile-toggle {
        display: flex;
    }

    .nav-mobile-toggle.active span:nth-child(1) {
        transform: rotate(45deg) translate(5px, 5px);
    }

    .nav-mobile-toggle.active span:nth-child(2) {
        opacity: 0;
    }

    .nav-mobile-toggle.active span:nth-child(3) {
        transform: rotate(-45deg) translate(5px, -5px);
    }

    .hero {
        padding-top: calc(var(--nav-height) + 40px);
        gap: 40px;
    }

    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }

    .hero-buttons .btn {
        width: 100%;
    }

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

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

    .footer-content {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .footer-links {
        grid-template-columns: 1fr;
        gap: 32px;
    }

    .app-store-buttons {
        flex-direction: column;
    }

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

    .cta-buttons .btn {
        width: 100%;
    }
}

@media (max-width: 480px) {
    .hero h1 {
        font-size: 2rem;
    }

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

    .section-header h2 {
        font-size: 1.75rem;
    }

    .feature-card {
        padding: 24px;
    }

    .phone-frame {
        max-width: 400px;
    }
}

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

.hero-content {
    animation: fadeInUp 0.6s ease-out;
}

.hero-demo {
    animation: fadeInUp 0.6s ease-out 0.2s both;
}

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