/* ==========================================================================
   AIDA Landing Page — Premium Design System v2
   @ux-design-expert | Glassmorphism + Deep Space + Micro-animations
   ========================================================================== */

/* ── Tokens ─────────────────────────────────────────────────────────────── */
:root {
    --bg: #060B14;
    --bg-2: #0D1525;
    --surface: rgba(255, 255, 255, 0.04);
    --surface-hover: rgba(255, 255, 255, 0.07);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(168, 85, 247, 0.4);

    --primary: #6366f1;
    --primary-light: #818cf8;
    --accent: #a855f7;
    --accent-light: #c084fc;
    --green: #10b981;

    --text: #f1f5f9;
    --text-muted: #64748b;
    --text-dim: #94a3b8;

    --font-h: 'Outfit', sans-serif;
    --font-b: 'Inter', sans-serif;

    --blur: blur(16px);
    --shadow: 0 8px 40px rgba(0, 0, 0, 0.5);
    --shadow-purple: 0 0 40px rgba(168, 85, 247, 0.15);
    --radius: 20px;
    --radius-sm: 12px;
    --t: all 0.3s cubic-bezier(0.25, 0.8, 0.25, 1);
}

/* ── Reset & Base ────────────────────────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 16px; }

body {
    background: var(--bg);
    color: var(--text);
    font-family: var(--font-b);
    line-height: 1.6;
    overflow-x: hidden;
}

/* Stars Canvas */
#stars-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 100%;
    z-index: 0;
    pointer-events: none;
}

/* ── Typography ──────────────────────────────────────────────────────────── */
h1, h2, h3 { font-family: var(--font-h); font-weight: 800; line-height: 1.1; }

.text-gradient {
    background: linear-gradient(135deg, #818cf8 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ── Utility ─────────────────────────────────────────────────────────────── */
.glass {
    background: var(--surface);
    backdrop-filter: var(--blur);
    -webkit-backdrop-filter: var(--blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
}

section, .hero { position: relative; z-index: 1; }

/* ── Buttons ─────────────────────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 1.75rem;
    font-family: var(--font-b);
    font-weight: 600;
    font-size: 1rem;
    border-radius: 9999px;
    text-decoration: none;
    cursor: pointer;
    border: none;
    transition: var(--t);
    position: relative;
    overflow: hidden;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--accent) 100%);
    color: white;
    box-shadow: 0 4px 20px rgba(99, 102, 241, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, transparent 0%, rgba(255,255,255,0.1) 100%);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover { transform: translateY(-3px); box-shadow: 0 8px 30px rgba(99, 102, 241, 0.55); }
.btn-primary:hover::before { opacity: 1; }

.btn-large { padding: 1.1rem 2.2rem; font-size: 1.1rem; }

.btn-nav {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.3);
    padding: 0.6rem 1.25rem;
    font-size: 0.9rem;
}
.btn-nav:hover { background: rgba(99, 102, 241, 0.2); border-color: var(--primary); color: white; }

/* ── Animations ──────────────────────────────────────────────────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(40px);
    transition: opacity 0.7s ease, transform 0.7s ease;
}
.fade-in-up.visible { opacity: 1; transform: translateY(0); }

.delay-1 { transition-delay: 0.1s; }
.delay-2 { transition-delay: 0.2s; }
.delay-3 { transition-delay: 0.3s; }
.delay-4 { transition-delay: 0.4s; }

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(168, 85, 247, 0.4); }
    50% { box-shadow: 0 0 0 12px rgba(168, 85, 247, 0); }
}

@keyframes float-card {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-8px); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50% { opacity: 0; }
}

@keyframes typing {
    from { width: 0; }
    to { width: 100%; }
}

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

/* ── Navbar ──────────────────────────────────────────────────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    z-index: 1000;
    padding: 1rem 0;
    transition: background 0.3s, box-shadow 0.3s;
}
.navbar.scrolled {
    background: rgba(6, 11, 20, 0.9);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    box-shadow: 0 1px 0 var(--border);
}

.nav-container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; }
.logo-icon {
    width: 36px; height: 36px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 10px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.1rem;
    color: white;
}
.logo-text {
    font-family: var(--font-h);
    font-weight: 800;
    font-size: 1.3rem;
    color: var(--text);
    letter-spacing: 1px;
}

.nav-links { display: flex; align-items: center; gap: 2rem; }
.nav-link {
    color: var(--text-dim);
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s;
}
.nav-link:hover { color: var(--text); }

.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 4px;
}
.mobile-menu-btn span {
    display: block;
    width: 24px;
    height: 2px;
    background: var(--text-dim);
    border-radius: 2px;
    transition: var(--t);
}

/* ── Hero ────────────────────────────────────────────────────────────────── */
.hero {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    padding: 9rem 2rem 4rem;
    text-align: center;
}

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

/* Badge */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.4rem 1.1rem;
    background: rgba(16, 185, 129, 0.08);
    color: var(--green);
    border: 1px solid rgba(16, 185, 129, 0.2);
    border-radius: 999px;
    font-size: 0.85rem;
    font-weight: 600;
    margin-bottom: 2rem;
}
.badge-dot {
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
    animation: pulse-glow 2s infinite;
}

/* Title */
.hero-title {
    font-size: clamp(3rem, 7vw, 5.5rem);
    letter-spacing: -0.03em;
    margin-bottom: 1.5rem;
    color: var(--text);
}

.hero-subtitle {
    font-size: clamp(1rem, 2.5vw, 1.2rem);
    color: var(--text-dim);
    margin-bottom: 2.5rem;
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}
.hero-subtitle strong { color: var(--text); }

.hero-cta { margin-bottom: 1rem; }
.cta-note {
    margin-top: 0.75rem;
    font-size: 0.85rem;
    color: var(--text-muted);
}

/* Chat Demo */
.chat-demo {
    max-width: 480px;
    margin: 3rem auto 0;
    background: rgba(13, 21, 37, 0.8);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    animation: float-card 6s ease-in-out infinite;
    box-shadow: var(--shadow), var(--shadow-purple);
}

.chat-bubble-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: rgba(255,255,255,0.03);
    border-bottom: 1px solid var(--border);
}
.chat-avatar {
    width: 40px; height: 40px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-weight: 800;
    font-family: var(--font-h);
    color: white;
    font-size: 1.1rem;
}
.chat-name {
    font-weight: 700;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 0.4rem;
}
.online-dot {
    display: inline-block;
    width: 8px; height: 8px;
    background: var(--green);
    border-radius: 50%;
}
.chat-status { font-size: 0.8rem; color: var(--text-muted); }

.chat-messages {
    padding: 1.25rem;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    min-height: 150px;
}

.msg { max-width: 80%; padding: 0.75rem 1rem; border-radius: 12px; font-size: 0.9rem; line-height: 1.5; animation: fadeInMsg 0.4s ease; }
.msg-aida { background: rgba(99, 102, 241, 0.12); border: 1px solid rgba(99, 102, 241, 0.15); align-self: flex-start; color: var(--text); }
.msg-aida em { font-style: normal; color: var(--primary-light); font-weight: 600; }
.msg-user { background: rgba(168, 85, 247, 0.1); border: 1px solid rgba(168, 85, 247, 0.15); align-self: flex-end; color: var(--text-dim); }

.typing-animation { animation-delay: 0.8s; opacity: 0; animation-fill-mode: forwards; }

.chat-input-mock {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.25rem;
    background: rgba(255,255,255,0.02);
    border-top: 1px solid var(--border);
    color: var(--text-muted);
    font-size: 0.875rem;
}

/* Stats */
.hero-stats {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 2rem;
    margin-top: 4rem;
    padding: 1.5rem 2rem;
    background: rgba(255,255,255,0.03);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    max-width: 500px;
    margin-left: auto;
    margin-right: auto;
}
.stat-item { text-align: center; }
.stat-number {
    font-family: var(--font-h);
    font-size: 2rem;
    font-weight: 900;
    background: linear-gradient(135deg, var(--primary-light), var(--accent-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}
.stat-label { font-size: 0.8rem; color: var(--text-muted); margin-top: 0.25rem; }
.stat-divider { width: 1px; height: 40px; background: var(--border); }

/* ── Sections ─────────────────────────────────────────────────────────────── */
.section {
    max-width: 1200px;
    margin: 0 auto;
    padding: 7rem 2rem;
}

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

.section-tag {
    display: inline-block;
    padding: 0.35rem 1rem;
    background: rgba(99, 102, 241, 0.08);
    color: var(--primary-light);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 999px;
    font-size: 0.8rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 1px;
    margin-bottom: 1.25rem;
}

.section-title {
    font-size: clamp(2rem, 4vw, 3rem);
    margin-bottom: 1rem;
}

.section-desc {
    color: var(--text-dim);
    font-size: 1.05rem;
    max-width: 650px;
    margin: 0 auto;
}

/* Steps */
.steps-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
}

.step-card {
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: var(--t);
}
.step-card:hover {
    transform: translateY(-6px);
    border-color: var(--border-hover);
    box-shadow: var(--shadow-purple);
}

.step-number {
    font-family: var(--font-h);
    font-size: 4rem;
    font-weight: 900;
    color: rgba(255,255,255,0.04);
    position: absolute;
    top: 1rem; right: 1.5rem;
    line-height: 1;
}
.step-icon { font-size: 2rem; margin-bottom: 1.25rem; }
.step-card h3 { font-size: 1.25rem; margin-bottom: 0.75rem; }
.step-card p { color: var(--text-dim); font-size: 0.95rem; margin-bottom: 1.25rem; }
.step-card p strong { color: var(--text); }
.step-tag {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background: rgba(99, 102, 241, 0.08);
    border: 1px solid rgba(99, 102, 241, 0.15);
    color: var(--primary-light);
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 600;
}

/* Personas */
.personas-section { max-width: 1200px; }

.personas-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 1.5rem;
}

.persona-card {
    padding: 1.75rem;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}
.persona-card:hover {
    transform: translateY(-5px) scale(1.01);
    border-color: rgba(var(--glow-color), 0.4);
    box-shadow: 0 0 30px rgba(var(--glow-color), 0.15);
}

.persona-glow {
    position: absolute;
    top: -40px; right: -40px;
    width: 100px; height: 100px;
    background: rgba(var(--glow-color), 0.08);
    border-radius: 50%;
    filter: blur(20px);
    pointer-events: none;
}

.persona-top {
    display: flex;
    align-items: center;
    gap: 1rem;
    margin-bottom: 1.25rem;
}
.persona-avatar {
    width: 48px; height: 48px;
    border-radius: 14px;
    display: flex; align-items: center; justify-content: center;
    font-family: var(--font-h);
    font-weight: 900;
    font-size: 1.3rem;
    color: white;
    flex-shrink: 0;
}
.persona-name { font-family: var(--font-h); font-size: 1.2rem; margin-bottom: 0.2rem; }
.persona-tag { font-size: 0.8rem; font-weight: 600; }
.persona-desc { color: var(--text-dim); font-size: 0.9rem; margin-bottom: 1.25rem; line-height: 1.6; }
.persona-quote {
    background: rgba(0,0,0,0.25);
    padding: 0.875rem 1rem;
    border-radius: 10px;
    font-style: italic;
    font-size: 0.875rem;
    color: var(--text-dim);
    border-left: 3px solid rgba(255,255,255,0.1);
}

/* FAQ */
.faq-section { max-width: 800px; }

.faq-grid { display: flex; flex-direction: column; gap: 1rem; }

.faq-item { padding: 0; overflow: hidden; transition: border-color 0.2s; }
.faq-item:hover { border-color: rgba(168, 85, 247, 0.3); }

.faq-q {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.25rem 1.5rem;
    font-weight: 600;
    cursor: pointer;
    user-select: none;
    font-size: 1rem;
    gap: 1rem;
}
.faq-q:hover { color: var(--text); }

.faq-arrow {
    color: var(--accent);
    font-size: 1.2rem;
    transition: transform 0.3s;
    flex-shrink: 0;
}
.faq-item.open .faq-arrow { transform: rotate(180deg); }

.faq-a {
    display: none;
    padding: 0 1.5rem 1.25rem;
    color: var(--text-dim);
    font-size: 0.95rem;
    line-height: 1.7;
    border-top: 1px solid var(--border);
    padding-top: 1rem;
    margin-top: 0;
}
.faq-item.open .faq-a { display: block; animation: fadeInMsg 0.3s ease; }

/* Footer CTA */
.footer-cta-section {
    padding: 4rem 2rem 6rem;
    max-width: 900px;
    margin: 0 auto;
}

.footer-cta {
    text-align: center;
    padding: 4rem 2rem;
    position: relative;
    overflow: hidden;
    background: linear-gradient(135deg, rgba(99,102,241,0.06) 0%, rgba(168,85,247,0.06) 100%);
    border-color: rgba(168, 85, 247, 0.2);
}
.footer-cta-glow {
    position: absolute;
    top: 50%; left: 50%;
    transform: translate(-50%, -50%);
    width: 300px; height: 300px;
    background: radial-gradient(circle, rgba(168,85,247,0.1) 0%, transparent 70%);
    pointer-events: none;
}
.footer-cta h2 { font-size: clamp(2rem, 4vw, 3rem); margin-bottom: 1rem; }
.footer-cta p { color: var(--text-dim); font-size: 1.05rem; margin-bottom: 2rem; max-width: 550px; margin-left: auto; margin-right: auto; }

/* Footer */
.footer {
    border-top: 1px solid var(--border);
    padding: 2.5rem 2rem;
    position: relative; z-index: 1;
}
.footer-inner {
    max-width: 1200px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1.5rem;
    text-align: center;
}
.footer-brand { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; }
.footer-brand p { color: var(--text-muted); font-size: 0.875rem; }
.footer-links { display: flex; gap: 2rem; flex-wrap: wrap; justify-content: center; }
.footer-links a { color: var(--text-muted); text-decoration: none; font-size: 0.875rem; transition: color 0.2s; }
.footer-links a:hover { color: var(--text); }
.footer-copy { color: var(--text-muted); font-size: 0.8rem; }

/* ── Responsive ──────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
    .nav-links {
        display: none;
        position: fixed;
        top: 70px; left: 0; right: 0;
        background: rgba(6, 11, 20, 0.98);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
    }
    .nav-links.open { display: flex; }
    .mobile-menu-btn { display: flex; }

    .hero-stats { gap: 1rem; padding: 1rem; }
    .stat-number { font-size: 1.5rem; }

    .steps-grid { grid-template-columns: 1fr; }
    .personas-grid { grid-template-columns: 1fr; }

    .footer-links { gap: 1rem; }
}
