/* ========================================
   Memento Landing Page Styles
   Terminal-inspired aesthetic
   ======================================== */

/* CSS Variables */
:root {
    /* Colors */
    --primary: #00d4ff;
    --background: #0a0e17;
    --surface: #151b2b;
    --text: #e6edf3;
    --text-muted: #8b949e;
    --accent-green: #22c55e;
    --accent-amber: #f59e0b;
    --border: #30363d;

    /* Typography */
    --font-sans: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'Fira Code', Consolas, monospace;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 6rem;

    /* Dimensions */
    --max-width: 1200px;
    --border-radius: 8px;
}

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

html {
    scroll-behavior: smooth;
}

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

/* Container */
.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 var(--spacing-md);
}

/* Typography */
h1, h2, h3 {
    line-height: 1.2;
    font-weight: 700;
}

a {
    color: var(--primary);
    text-decoration: none;
    transition: opacity 0.2s ease;
}

a:hover {
    opacity: 0.8;
}

code {
    font-family: var(--font-mono);
    font-size: 0.9em;
    color: var(--primary);
}

/* Section Title */
.section-title {
    font-size: 2.5rem;
    text-align: center;
    margin-bottom: var(--spacing-lg);
    background: linear-gradient(135deg, var(--primary), var(--accent-green));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

@media (max-width: 768px) {
    .section-title {
        font-size: 2rem;
    }
}

/* ========================================
   Hero Section
   ======================================== */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    padding: var(--spacing-xl) 0;
    background: radial-gradient(ellipse at top, rgba(0, 212, 255, 0.1), transparent 70%);
}

.logo-mark {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--primary);
    margin-bottom: var(--spacing-md);
    letter-spacing: 0.1em;
}

.hero-title {
    font-size: 4rem;
    margin-bottom: var(--spacing-md);
    line-height: 1.1;
}

.hero-subtitle {
    font-size: 1.25rem;
    color: var(--text-muted);
    margin-bottom: var(--spacing-lg);
    line-height: 1.8;
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.5rem;
    }
    .hero-subtitle {
        font-size: 1.1rem;
    }
}

.hero-cta {
    display: flex;
    gap: var(--spacing-sm);
    justify-content: center;
    margin-bottom: var(--spacing-lg);
    flex-wrap: wrap;
}

/* Buttons */
.btn {
    display: inline-block;
    padding: 0.875rem 2rem;
    border-radius: var(--border-radius);
    font-weight: 600;
    transition: all 0.2s ease;
    border: 2px solid transparent;
}

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

.btn-primary:hover {
    background: transparent;
    border-color: var(--primary);
    color: var(--primary);
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary);
}

.btn-secondary:hover {
    background: var(--primary);
    color: var(--background);
    opacity: 1;
}

/* Terminal Window */
.terminal-window {
    max-width: 600px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--border-radius);
    overflow: hidden;
    border: 1px solid var(--border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

.terminal-header {
    background: #1a1f2e;
    padding: 0.75rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    border-bottom: 1px solid var(--border);
}

.terminal-buttons {
    display: flex;
    gap: 0.5rem;
}

.terminal-buttons span {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.btn-close { background: #ff5f57; }
.btn-minimize { background: #ffbd2e; }
.btn-maximize { background: #28ca42; }

.terminal-title {
    flex: 1;
    text-align: center;
    font-size: 0.875rem;
    color: var(--text-muted);
    font-family: var(--font-mono);
}

.terminal-body {
    padding: var(--spacing-md);
    font-family: var(--font-mono);
    font-size: 0.95rem;
}

.terminal-line {
    margin-bottom: 0.5rem;
    display: flex;
    gap: 0.75rem;
}

.prompt {
    color: var(--accent-green);
}

.command {
    color: var(--primary);
}

/* ========================================
   Tree Section (Side-by-Side Comparison)
   ======================================== */
.tree-section {
    padding: var(--spacing-xl) 0;
    background: var(--background);
}

.comparison-container {
    display: grid;
    grid-template-columns: 1fr auto 1fr;
    gap: var(--spacing-lg);
    align-items: center;
    max-width: 1200px;
    margin: 0 auto;
}

/* Chat Side (Left) */
.chat-side {
    display: flex;
    justify-content: flex-end;
}

.chat-window {
    width: 100%;
    max-width: 450px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.chat-header {
    background: rgba(255, 255, 255, 0.03);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.chat-dots, .tree-dots {
    display: flex;
    gap: 0.4rem;
}

.dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
    background: var(--border);
}

.chat-title, .tree-title {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 600;
}

.tree-title {
    font-family: var(--font-mono);
    color: var(--accent-green);
}

.chat-content {
    padding: var(--spacing-md);
    display: flex;
    flex-direction: column;
    gap: var(--spacing-md);
    min-height: 300px;
}

.chat-message {
    display: flex;
    flex-direction: column;
}

.chat-message.user {
    align-items: flex-end;
}

.chat-message.assistant {
    align-items: flex-start;
}

.message-bubble {
    max-width: 85%;
    padding: var(--spacing-sm) var(--spacing-md);
    border-radius: 12px;
    font-size: 0.95rem;
    line-height: 1.5;
}

.chat-message.user .message-bubble {
    background: var(--primary);
    color: var(--background);
}

.chat-message.assistant .message-bubble {
    background: rgba(255, 255, 255, 0.05);
    color: var(--text);
    border: 1px solid var(--border);
}

.chat-status {
    margin-top: auto;
    padding: var(--spacing-sm);
    background: rgba(245, 158, 11, 0.1);
    border-left: 3px solid #f59e0b;
    border-radius: 4px;
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.status-icon {
    font-size: 1rem;
}

.status-text {
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Arrow Separator */
.arrow-separator {
    display: flex;
    justify-content: center;
    align-items: center;
}

.arrow-content {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: var(--spacing-xs);
}

.arrow-icon {
    font-size: 3rem;
    color: var(--primary);
    font-weight: 300;
}

.arrow-label {
    font-size: 0.9rem;
    font-weight: 700;
    color: var(--primary);
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* Tree Side (Right) */
.tree-side {
    display: flex;
    justify-content: flex-start;
}

.tree-window {
    width: 100%;
    max-width: 500px;
    background: var(--surface);
    border: 2px solid var(--border);
    border-radius: var(--border-radius);
    overflow: hidden;
}

.tree-header {
    background: rgba(0, 212, 255, 0.05);
    padding: var(--spacing-sm) var(--spacing-md);
    display: flex;
    align-items: center;
    gap: var(--spacing-sm);
    border-bottom: 1px solid var(--border);
}

.tree-content {
    padding: var(--spacing-md);
    background: var(--background);
    font-family: var(--font-mono);
    min-height: 300px;
    display: flex;
    flex-direction: column;
}

.tree-structure {
    flex: 1;
}

.tree-line {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.15rem 0;
    font-size: 0.9rem;
    line-height: 1.5;
}

.tree-line.root {
    margin-bottom: var(--spacing-xs);
}

.tree-branch {
    color: var(--border);
    font-weight: 400;
    white-space: pre;
    font-size: 0.85rem;
    flex-shrink: 0;
}

.tree-label {
    color: var(--primary);
    font-weight: 700;
    font-size: 1rem;
}

.tree-task-id {
    color: var(--primary);
    font-weight: 700;
    margin-right: 0.25rem;
}

.tree-task-name {
    color: var(--text);
    font-weight: 600;
}

.tree-line.subtask {
    transition: all 0.2s ease;
}

.tree-line.subtask:hover {
    background: rgba(34, 197, 94, 0.05);
}

.tree-subtask-id {
    color: var(--accent-green);
    font-weight: 600;
    min-width: 1.8rem;
}

.tree-subtask-name {
    color: var(--text-muted);
    font-size: 0.85rem;
}

.tree-footer {
    margin-top: var(--spacing-md);
    padding-top: var(--spacing-sm);
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    gap: var(--spacing-xs);
}

.footer-icon {
    font-size: 1rem;
}

.footer-text {
    font-size: 0.85rem;
    color: var(--accent-green);
    font-weight: 600;
}

/* ========================================
   Problem Section
   ======================================== */
.problem {
    padding: var(--spacing-xl) 0;
    background: var(--surface);
}

.problem-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.problem-card {
    text-align: center;
    padding: var(--spacing-md);
}

.problem-icon {
    font-size: 3rem;
    margin-bottom: var(--spacing-sm);
}

.problem-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.problem-card p {
    color: var(--text-muted);
}

/* Section Subtitle */
.section-subtitle {
    text-align: center;
    color: var(--text-muted);
    font-size: 1.1rem;
    margin-top: var(--spacing-sm);
    margin-bottom: var(--spacing-lg);
}

/* ========================================
   Features Section
   ======================================== */
.features {
    padding: var(--spacing-xl) 0;
    background: var(--surface);
}

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

.feature-card {
    padding: var(--spacing-md);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    transition: transform 0.2s ease, border-color 0.2s ease;
}

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

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: var(--spacing-sm);
}

.feature-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-xs);
}

.feature-card p {
    color: var(--text-muted);
}

/* ========================================
   How It Works Section
   ======================================== */
.how-it-works {
    padding: var(--spacing-xl) 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: var(--spacing-md);
}

.step-card {
    padding: var(--spacing-md);
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
}

.step-number {
    width: 48px;
    height: 48px;
    background: var(--primary);
    color: var(--background);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: var(--spacing-sm);
}

.step-card h3 {
    font-size: 1.25rem;
    margin-bottom: var(--spacing-sm);
}

.step-code {
    background: var(--background);
    padding: var(--spacing-sm);
    border-radius: 4px;
    margin: var(--spacing-sm) 0;
    font-family: var(--font-mono);
    font-size: 0.9rem;
}

.step-card p {
    color: var(--text-muted);
}

/* ========================================
   Use Cases Section
   ======================================== */
.use-cases {
    padding: var(--spacing-xl) 0;
    background: var(--surface);
}

.use-cases-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: var(--spacing-md);
}

.use-case-card {
    padding: var(--spacing-md);
    background: var(--background);
    border: 1px solid var(--border);
    border-radius: var(--border-radius);
    text-align: center;
}

.use-case-card h3 {
    font-size: 1.5rem;
    margin-bottom: var(--spacing-xs);
}

.use-case-card p {
    color: var(--text-muted);
}

/* ========================================
   Technical Section
   ======================================== */
.technical {
    padding: var(--spacing-xl) 0;
}

.tech-content {
    max-width: 800px;
    margin: 0 auto;
    background: var(--surface);
    border-radius: var(--border-radius);
    padding: var(--spacing-lg);
    border: 1px solid var(--border);
}

.tech-features {
    display: grid;
    gap: var(--spacing-md);
    margin-bottom: var(--spacing-lg);
}

.tech-item strong {
    display: block;
    color: var(--primary);
    margin-bottom: 0.25rem;
}

.tech-item p {
    color: var(--text-muted);
}

.tech-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
    padding-top: var(--spacing-md);
    border-top: 1px solid var(--border);
}

.tech-links a {
    font-weight: 600;
}

/* ========================================
   CTA Section
   ======================================== */
.cta {
    padding: var(--spacing-xl) 0;
    background: var(--surface);
    text-align: center;
}

.cta-title {
    font-size: 3rem;
    margin-bottom: var(--spacing-lg);
}

.install-command {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: var(--spacing-sm);
    max-width: 600px;
    margin: 0 auto var(--spacing-lg);
    background: var(--background);
    padding: var(--spacing-md);
    border-radius: var(--border-radius);
    border: 2px solid var(--primary);
}

.install-command code {
    flex: 1;
    font-size: 1.1rem;
    color: var(--primary);
}

.copy-btn {
    padding: 0.5rem 1.5rem;
    background: var(--primary);
    color: var(--background);
    border: none;
    border-radius: 4px;
    font-weight: 600;
    cursor: pointer;
    transition: opacity 0.2s ease;
}

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

.cta-links {
    display: flex;
    gap: var(--spacing-md);
    justify-content: center;
    flex-wrap: wrap;
}

.cta-links a {
    font-size: 1.1rem;
    font-weight: 600;
}

@media (max-width: 768px) {
    .cta-title {
        font-size: 2rem;
    }
    .install-command {
        flex-direction: column;
    }
}

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

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: var(--spacing-md);
}

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

.footer-brand p {
    color: var(--text-muted);
    margin-top: 0.25rem;
}

.footer-links {
    display: flex;
    gap: var(--spacing-md);
    flex-wrap: wrap;
}

.footer-links a {
    color: var(--text-muted);
    font-size: 0.95rem;
}

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

@media (max-width: 768px) {
    .footer-content {
        flex-direction: column;
        text-align: center;
    }

    /* Comparison Section Responsive */
    .comparison-container {
        grid-template-columns: 1fr;
        gap: var(--spacing-md);
    }

    .chat-side, .tree-side {
        justify-content: center;
    }

    .chat-window, .tree-window {
        max-width: 100%;
    }

    .arrow-separator {
        transform: rotate(90deg);
        margin: var(--spacing-sm) 0;
    }

    .arrow-icon {
        font-size: 2.5rem;
    }

    .arrow-label {
        font-size: 0.8rem;
    }

    .chat-content, .tree-content {
        min-height: 250px;
        padding: var(--spacing-sm);
    }

    .tree-line {
        font-size: 0.8rem;
    }

    .tree-branch {
        font-size: 0.75rem;
    }

    .message-bubble {
        font-size: 0.9rem;
    }
}

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

.fade-in-up {
    animation: fadeInUp 0.6s ease-out;
}

/* Utility Classes */
.text-center { text-align: center; }
.mt-1 { margin-top: var(--spacing-sm); }
.mt-2 { margin-top: var(--spacing-md); }
.mb-1 { margin-bottom: var(--spacing-sm); }
.mb-2 { margin-bottom: var(--spacing-md); }
