/* ==========================================================================
   AI Chat Buddy - Landing Page Style Sheet
   ========================================================================== */

/* --- Root Design System Tokens --- */
:root {
    --bg-dark: #0a0c16;
    --bg-card: rgba(18, 22, 41, 0.7);
    --bg-card-hover: rgba(28, 34, 61, 0.85);
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-glow: rgba(99, 102, 241, 0.4);
    
    --primary-gradient: linear-gradient(135deg, #6366f1 0%, #8b5cf6 50%, #d946ef 100%);
    --primary-color: #6366f1;
    --primary-hover: #4f46e5;
    --accent-cyan: #06b6d4;
    --accent-purple: #a855f7;
    --accent-blue: #3b82f6;

    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;

    --font-heading: 'Outfit', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;

    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;
    --radius-full: 9999px;

    --transition-fast: 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-normal: 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.6s cubic-bezier(0.4, 0, 0.2, 1);

    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.25);
    --shadow-card: 0 20px 40px -15px rgba(0, 0, 0, 0.5);
}

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

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-body);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

a {
    color: inherit;
    text-decoration: none;
}

/* --- Background Decorators --- */
.bg-glow {
    position: absolute;
    border-radius: 50%;
    filter: blur(120px);
    pointer-events: none;
    z-index: 0;
}

.bg-glow-1 {
    top: -100px;
    left: 20%;
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-glow-2 {
    top: 600px;
    right: 5%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(217, 70, 239, 0.15) 0%, rgba(0, 0, 0, 0) 70%);
}

.bg-grid {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: 
        linear-gradient(to right, rgba(255, 255, 255, 0.03) 1px, transparent 1px),
        linear-gradient(to bottom, rgba(255, 255, 255, 0.03) 1px, transparent 1px);
    background-size: 50px 50px;
    pointer-events: none;
    z-index: 0;
}

/* --- Container & Utilities --- */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    position: relative;
    z-index: 1;
}

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

/* --- Buttons --- */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    padding: 14px 28px;
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 1rem;
    border-radius: var(--radius-full);
    cursor: pointer;
    transition: var(--transition-normal);
    border: none;
    outline: none;
    text-decoration: none;
}

.btn-primary {
    background: var(--primary-gradient);
    color: #ffffff;
    box-shadow: 0 10px 25px -5px rgba(99, 102, 241, 0.4);
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: var(--transition-fast);
}

.btn-primary:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 15px 35px -5px rgba(99, 102, 241, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

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

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-2px);
}

.btn-outline {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(8px);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--primary-color);
    color: #ffffff;
    transform: translateY(-2px);
}

.btn-sm {
    padding: 10px 20px;
    font-size: 0.9rem;
}

.btn-lg {
    padding: 18px 36px;
    font-size: 1.1rem;
}

/* --- Header / Navigation --- */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 100;
    padding: 20px 0;
    transition: var(--transition-normal);
}

.navbar.scrolled {
    padding: 12px 0;
    background: rgba(10, 12, 22, 0.85);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--glass-border);
}

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

.brand-logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-family: var(--font-heading);
    font-weight: 800;
    font-size: 1.4rem;
    color: var(--text-primary);
}

.logo-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: var(--primary-gradient);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #ffffff;
    font-size: 1.2rem;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.logo-text span {
    color: var(--primary-color);
}

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

.nav-link {
    font-weight: 500;
    color: var(--text-secondary);
    transition: var(--transition-fast);
    position: relative;
    padding: 4px 0;
}

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

.nav-link.active::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary-gradient);
    border-radius: 2px;
}

/* --- Hero Section --- */
.hero-section {
    padding: 170px 0 100px;
    position: relative;
}

.hero-container {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.badge {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    padding: 6px 16px;
    border-radius: var(--radius-full);
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    margin-bottom: 24px;
}

.badge-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background-color: var(--accent-cyan);
    box-shadow: 0 0 10px var(--accent-cyan);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; transform: scale(1); }
    50% { opacity: 0.5; transform: scale(1.2); }
}

.badge-text {
    font-size: 0.85rem;
    font-weight: 600;
    color: #a5b4fc;
    letter-spacing: 0.5px;
}

.hero-title {
    font-family: var(--font-heading);
    font-size: 3.5rem;
    font-weight: 800;
    line-height: 1.15;
    margin-bottom: 24px;
    letter-spacing: -0.02em;
}

.hero-description {
    font-size: 1.15rem;
    color: var(--text-secondary);
    margin-bottom: 36px;
    max-width: 540px;
}

.hero-actions {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 48px;
    flex-wrap: wrap;
}

.hero-stats {
    display: flex;
    align-items: center;
    gap: 30px;
    padding-top: 24px;
    border-top: 1px solid var(--glass-border);
    width: 100%;
}

.stat-item {
    display: flex;
    flex-direction: column;
}

.stat-number {
    font-family: var(--font-heading);
    font-size: 1.6rem;
    font-weight: 800;
    color: var(--text-primary);
}

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

.stat-divider {
    width: 1px;
    height: 35px;
    background: var(--glass-border);
}

/* --- Hero Illustration Mascot --- */
.hero-illustration {
    position: relative;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mascot-wrapper {
    position: relative;
    width: 100%;
    max-width: 440px;
    display: flex;
    justify-content: center;
    align-items: center;
}

.mascot-glow {
    position: absolute;
    width: 320px;
    height: 320px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.4) 0%, rgba(217, 70, 239, 0.2) 50%, transparent 70%);
    border-radius: 50%;
    filter: blur(40px);
    z-index: 0;
    animation: floatGlow 6s ease-in-out infinite alternate;
}

@keyframes floatGlow {
    0% { transform: scale(0.9) translateY(-10px); }
    100% { transform: scale(1.1) translateY(10px); }
}

.mascot-image {
    width: 100%;
    height: auto;
    max-height: 440px;
    object-fit: contain;
    position: relative;
    z-index: 1;
    filter: drop-shadow(0 20px 30px rgba(0, 0, 0, 0.6));
    animation: floatMascot 4s ease-in-out infinite;
    transition: transform 0.2s ease-out;
}

@keyframes floatMascot {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-18px); }
}

/* Floating Chips */
.floating-chip {
    position: absolute;
    z-index: 2;
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 10px 18px;
    background: rgba(18, 22, 41, 0.85);
    border: 1px solid rgba(255, 255, 255, 0.15);
    backdrop-filter: blur(12px);
    border-radius: var(--radius-full);
    color: var(--text-primary);
    font-size: 0.88rem;
    font-weight: 600;
    box-shadow: 0 10px 25px rgba(0,0,0,0.4);
}

.chip-1 {
    top: 15%;
    left: -20px;
    animation: floatChip1 5s ease-in-out infinite;
}

.chip-1 i {
    color: var(--accent-cyan);
}

.chip-2 {
    bottom: 20%;
    right: -10px;
    animation: floatChip2 6s ease-in-out infinite;
}

.chip-2 i {
    color: #f59e0b;
}

@keyframes floatChip1 {
    0%, 100% { transform: translateY(0) rotate(-2deg); }
    50% { transform: translateY(-12px) rotate(2deg); }
}

@keyframes floatChip2 {
    0%, 100% { transform: translateY(0) rotate(2deg); }
    50% { transform: translateY(12px) rotate(-2deg); }
}

/* --- Features Section --- */
.features-section {
    padding: 100px 0;
    position: relative;
}

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

.section-subtitle {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--accent-cyan);
    letter-spacing: 2px;
    margin-bottom: 12px;
    display: block;
}

.section-title {
    font-family: var(--font-heading);
    font-size: 2.5rem;
    font-weight: 800;
    margin-bottom: 16px;
    line-height: 1.2;
}

.section-desc {
    color: var(--text-secondary);
    font-size: 1.05rem;
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.feature-card {
    position: relative;
    background: var(--bg-card);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    display: flex;
    flex-direction: column;
    transition: var(--transition-normal);
    overflow: hidden;
}

.card-glass-bg {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: radial-gradient(800px circle at var(--mouse-x, 50%) var(--mouse-y, 50%), rgba(255,255,255,0.06), transparent 40%);
    opacity: 0;
    transition: opacity 0.3s;
    pointer-events: none;
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--glass-border-glow);
    box-shadow: var(--shadow-card), var(--shadow-glow);
    background: var(--bg-card-hover);
}

.feature-card:hover .card-glass-bg {
    opacity: 1;
}

.feature-icon-box {
    width: 60px;
    height: 60px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    margin-bottom: 24px;
    transition: var(--transition-normal);
}

.icon-blue {
    background: rgba(59, 130, 246, 0.15);
    color: #60a5fa;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.icon-purple {
    background: rgba(168, 85, 247, 0.15);
    color: #c084fc;
    border: 1px solid rgba(168, 85, 247, 0.3);
}

.icon-cyan {
    background: rgba(6, 182, 212, 0.15);
    color: #22d3ee;
    border: 1px solid rgba(6, 182, 212, 0.3);
}

.feature-card:hover .feature-icon-box {
    transform: scale(1.1) rotate(4deg);
}

.feature-title {
    font-family: var(--font-heading);
    font-size: 1.4rem;
    font-weight: 700;
    margin-bottom: 12px;
    color: var(--text-primary);
}

.feature-text {
    color: var(--text-secondary);
    font-size: 0.95rem;
    line-height: 1.6;
    margin-bottom: 28px;
    flex-grow: 1;
}

.feature-footer {
    padding-top: 16px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.feature-tag {
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-muted);
}

/* --- CTA Section --- */
.cta-section {
    padding: 60px 0 100px;
}

.cta-card {
    background: linear-gradient(135deg, rgba(30, 36, 68, 0.9), rgba(15, 18, 36, 0.95));
    border: 1px solid rgba(99, 102, 241, 0.3);
    border-radius: var(--radius-lg);
    padding: 60px 40px;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.6);
}

.cta-card::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 60%);
    pointer-events: none;
}

.cta-content {
    position: relative;
    z-index: 1;
    max-width: 600px;
    margin: 0 auto;
}

.cta-title {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    font-weight: 800;
    margin-bottom: 16px;
}

.cta-text {
    color: var(--text-secondary);
    font-size: 1.05rem;
    margin-bottom: 32px;
}

/* --- Footer --- */
.footer {
    border-top: 1px solid var(--glass-border);
    padding: 60px 0 30px;
    background: rgba(8, 10, 18, 0.8);
    position: relative;
    z-index: 1;
}

.footer-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 32px;
    text-align: center;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 12px;
}

.footer-desc {
    color: var(--text-muted);
    font-size: 0.9rem;
    max-width: 400px;
}

.footer-links {
    display: flex;
    gap: 28px;
}

.footer-link {
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    transition: var(--transition-fast);
}

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

.footer-copyright {
    color: var(--text-muted);
    font-size: 0.85rem;
    padding-top: 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    width: 100%;
}

/* --- Responsive Media Queries --- */
@media (max-width: 1024px) {
    .hero-title {
        font-size: 2.8rem;
    }
    
    .features-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .chip-1 { left: 0; }
    .chip-2 { right: 0; }
}

@media (max-width: 768px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .hero-content {
        align-items: center;
    }

    .hero-description {
        margin-left: auto;
        margin-right: auto;
    }

    .hero-actions {
        justify-content: center;
    }

    .hero-stats {
        justify-content: center;
    }

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

    .nav-links {
        display: none; /* Can be toggled if mobile menu added */
    }

    .cta-card {
        padding: 40px 20px;
    }

    .cta-title {
        font-size: 1.75rem;
    }
}
