/* ─────────────────────────────────────────────────────────────
   ThoughtBook LM Web Platform - Theme & Design System
   Obsidian Glassmorphism, Radiant Accents, Precision Typography
   ───────────────────────────────────────────────────────────── */

@import url('https://fonts.googleapis.com/css2?family=Fira+Code:wght@400;500;600&family=Inter:wght@300;400;500;600;700&family=Outfit:wght@400;500;600;700;800&display=swap');

:root {
    --bg-base: #090A0F;
    --bg-surface: #10121A;
    --bg-surface-elevated: rgba(22, 25, 37, 0.7);
    --bg-card: rgba(18, 20, 30, 0.65);
    
    --primary: #6366F1;
    --primary-glow: rgba(99, 102, 241, 0.35);
    --primary-light: #818CF8;
    --violet: #8B5CF6;
    --violet-glow: rgba(139, 92, 246, 0.35);
    --emerald: #10B981;
    --emerald-glow: rgba(16, 185, 129, 0.25);
    --amber: #F59E0B;
    
    --text-main: #F8FAFC;
    --text-muted: #94A3B8;
    --text-subtle: #64748B;
    
    --border-subtle: rgba(255, 255, 255, 0.08);
    --border-highlight: rgba(99, 102, 241, 0.3);
    --glass-blur: blur(20px);
    
    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Fira Code', monospace;
    
    --max-w: 1200px;
    --radius-sm: 10px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-base);
    color: var(--text-main);
}

body {
    font-family: var(--font-body);
    background: radial-gradient(circle at 50% 0%, rgba(99, 102, 241, 0.12) 0%, transparent 60%),
                radial-gradient(circle at 90% 40%, rgba(139, 92, 246, 0.08) 0%, transparent 50%),
                var(--bg-base);
    min-height: 100vh;
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* ── Container ── */
.container {
    width: 100%;
    max-width: var(--max-w);
    margin: 0 auto;
    padding: 0 1.5rem;
}

/* ── Typography ── */
h1, h2, h3, h4, .font-heading {
    font-family: var(--font-heading);
    font-weight: 700;
    color: var(--text-main);
    line-height: 1.15;
    letter-spacing: -0.02em;
}

.text-gradient {
    background: linear-gradient(135deg, #FFFFFF 20%, var(--primary-light) 70%, var(--violet) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.text-gradient-emerald {
    background: linear-gradient(135deg, #FFFFFF 20%, #34D399 70%, var(--emerald) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

/* ── Glassmorphic Cards ── */
.glass-card {
    background: var(--bg-card);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1), border-color 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    border-color: var(--border-highlight);
    box-shadow: 0 16px 36px -10px var(--primary-glow);
    transform: translateY(-3px);
}

/* ── Badges ── */
.pill-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.9rem;
    background: rgba(99, 102, 241, 0.12);
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-full);
    font-family: var(--font-body);
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-light);
    letter-spacing: 0.04em;
    text-transform: uppercase;
}

.pill-badge-emerald {
    background: rgba(16, 185, 129, 0.12);
    border-color: rgba(16, 185, 129, 0.3);
    color: #34D399;
}

/* ── Buttons ── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    padding: 0.85rem 1.75rem;
    border-radius: var(--radius-md);
    font-family: var(--font-body);
    font-size: 0.95rem;
    font-weight: 600;
    text-decoration: none;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid transparent;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--violet) 100%);
    color: #FFFFFF;
    box-shadow: 0 8px 24px -4px var(--primary-glow);
}

.btn-primary:hover {
    box-shadow: 0 12px 32px 0 var(--primary-glow);
    transform: translateY(-2px);
    color: #FFFFFF;
}

.btn-glass {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
}

.btn-glass:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    transform: translateY(-2px);
}

.btn-store {
    background: #000000;
    border: 1px solid rgba(255, 255, 255, 0.2);
    color: #FFFFFF;
    padding: 0.6rem 1.4rem;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    text-align: left;
}

.btn-store:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 24px -4px var(--primary-glow);
    transform: translateY(-2px);
}

.btn-store .store-sub {
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    display: block;
}

.btn-store .store-title {
    font-family: var(--font-heading);
    font-size: 1.05rem;
    font-weight: 700;
    line-height: 1.1;
    color: #FFFFFF;
}

/* ── Navigation ── */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 1rem 0;
    background: rgba(9, 10, 15, 0.75);
    backdrop-filter: var(--glass-blur);
    -webkit-backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    transition: all 0.3s ease;
}

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

.nav-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    color: var(--text-main);
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.25rem;
}

.nav-brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--primary), var(--violet));
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    box-shadow: 0 4px 12px var(--primary-glow);
}

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

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

.nav-link:hover, .nav-link.active {
    color: #FFFFFF;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-main);
    font-size: 1.6rem;
    cursor: pointer;
}

/* ── Hero Section ── */
.hero {
    padding: 9rem 0 5rem;
    text-align: center;
    position: relative;
}

.hero-title {
    font-size: clamp(2.4rem, 5vw, 4.2rem);
    max-width: 900px;
    margin: 1.5rem auto 1.2rem;
    font-weight: 800;
}

.hero-subtitle {
    font-size: clamp(1.05rem, 2vw, 1.25rem);
    color: var(--text-muted);
    max-width: 680px;
    margin: 0 auto 2.5rem;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    flex-wrap: wrap;
    margin-bottom: 4rem;
}

/* ── Interactive Browser Editor Mockup ── */
.editor-mockup-wrapper {
    max-width: 820px;
    margin: 0 auto;
    position: relative;
}

.editor-mockup-glow {
    position: absolute;
    inset: -20px;
    background: radial-gradient(ellipse at center, var(--primary-glow) 0%, transparent 70%);
    filter: blur(40px);
    z-index: -1;
    opacity: 0.7;
}

.editor-mockup {
    background: #0E1017;
    border: 1px solid var(--border-highlight);
    border-radius: var(--radius-lg);
    overflow: hidden;
    box-shadow: 0 25px 60px -15px rgba(0, 0, 0, 0.8), 0 0 40px -10px var(--primary-glow);
    text-align: left;
}

.editor-mockup-header {
    background: rgba(18, 20, 30, 0.9);
    padding: 0.85rem 1.2rem;
    border-bottom: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.mac-dots {
    display: flex;
    gap: 6px;
}

.mac-dot {
    width: 10px;
    height: 10px;
    border-radius: 50%;
}
.mac-dot.red { background: #EF4444; }
.mac-dot.yellow { background: #F59E0B; }
.mac-dot.green { background: #10B981; }

.editor-mockup-title {
    font-family: var(--font-mono);
    font-size: 0.8rem;
    color: var(--text-subtle);
}

.editor-canvas {
    padding: 2rem;
    min-height: 280px;
}

.editor-title-input {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 700;
    color: #FFFFFF;
    margin-bottom: 1rem;
}

.editor-text-body {
    font-family: var(--font-body);
    font-size: 1.05rem;
    color: #CBD5E1;
    line-height: 1.7;
    min-height: 120px;
}

.slash-pill-bar {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.8rem;
    background: rgba(22, 25, 38, 0.9);
    border: 1px solid var(--primary-glow);
    border-radius: 20px;
    margin-top: 1rem;
    box-shadow: 0 4px 16px -2px var(--primary-glow);
}

.slash-chip {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    padding: 0.3rem 0.75rem;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.4);
    border-radius: 14px;
    font-size: 0.82rem;
    font-weight: 600;
    color: var(--primary-light);
    cursor: pointer;
    transition: all 0.2s ease;
}

.slash-chip:hover, .slash-chip.active {
    background: var(--primary);
    color: #FFFFFF;
}

/* ── Bento Grid Section ── */
.bento-section {
    padding: 6rem 0;
}

.section-header {
    text-align: center;
    max-width: 640px;
    margin: 0 auto 3.5rem;
}

.section-title {
    font-size: clamp(2rem, 3.5vw, 2.8rem);
    margin: 0.8rem 0;
}

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

.bento-card {
    padding: 2.2rem;
    position: relative;
    overflow: hidden;
}

.bento-col-4 { grid-column: span 4; }
.bento-col-6 { grid-column: span 6; }
.bento-col-8 { grid-column: span 8; }
.bento-col-12 { grid-column: span 12; }

.bento-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.3);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1.2rem;
    color: var(--primary-light);
}

.bento-title {
    font-size: 1.3rem;
    margin-bottom: 0.6rem;
}

.bento-desc {
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
}

/* ── FAQ Accordion ── */
.faq-section {
    padding: 5rem 0;
}

.faq-list {
    max-width: 760px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.faq-item {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    overflow: hidden;
    transition: all 0.25s ease;
}

.faq-question {
    padding: 1.25rem 1.5rem;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1.05rem;
    display: flex;
    align-items: center;
    justify-content: space-between;
    cursor: pointer;
}

.faq-answer {
    padding: 0 1.5rem 1.25rem;
    color: var(--text-muted);
    font-size: 0.95rem;
    line-height: 1.6;
    display: none;
}

.faq-item.open .faq-answer {
    display: block;
}

.faq-item.open {
    border-color: var(--border-highlight);
}

/* ── Footer ── */
.footer {
    padding: 4rem 0 2rem;
    border-top: 1px solid var(--border-subtle);
    margin-top: 4rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-brand p {
    color: var(--text-muted);
    font-size: 0.9rem;
    margin-top: 0.8rem;
    max-width: 320px;
}

.footer-col h5 {
    font-family: var(--font-heading);
    font-size: 0.95rem;
    color: #FFFFFF;
    margin-bottom: 1.2rem;
}

.footer-links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 0.6rem;
}

.footer-link {
    color: var(--text-muted);
    text-decoration: none;
    font-size: 0.88rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--primary-light);
}

.footer-bottom {
    padding-top: 2rem;
    border-top: 1px solid var(--border-subtle);
    display: flex;
    align-items: center;
    justify-content: space-between;
    color: var(--text-subtle);
    font-size: 0.82rem;
    flex-wrap: wrap;
    gap: 1rem;
}

/* ── Mobile Responsive Overrides ── */
@media (max-width: 992px) {
    .bento-col-4, .bento-col-6, .bento-col-8 {
        grid-column: span 12;
    }
    .footer-grid {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links, .nav-actions .btn-glass {
        display: none;
    }
    .mobile-menu-btn {
        display: block;
    }
    .footer-grid {
        grid-template-columns: 1fr;
    }
    .hero {
        padding: 7rem 0 3rem;
    }
}
