/* Global Styles & Variables */
:root {
    /* Premium Palette "Bleu Nuit" */
    --bg-deep: #020617;
    /* Very dark blue/black */
    --bg-gradient-start: #0f172a;
    --bg-gradient-end: #1e293b;

    --primary-accent: #3b82f6;
    /* Bright Blue */
    --secondary-accent: #6366f1;
    /* Indigo */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;

    --glass-bg: rgba(15, 23, 42, 0.6);
    --glass-border: rgba(255, 255, 255, 0.05);
    --glass-highlight: rgba(255, 255, 255, 0.1);

    --success-green: #10b981;

    --font-main: 'Inter', system-ui, -apple-system, sans-serif;

    /* Chat App Specific Variables (Default Dark) */
    --chat-bg: radial-gradient(circle at top left, #1a1f45, #0b0c1a);
    --chat-header-bg: linear-gradient(135deg, #0b102a, #1a1f4a);
    --chat-frame: #0b0c1a;
    --chat-bubble-me: rgba(60, 130, 255, 0.90);
    --chat-bubble-other: rgba(120, 120, 120, 0.70);
    --chat-text-me: white;
    --chat-text-other: rgba(255, 255, 255, 0.95);

    /* Dark Mode Defaults */
    --text-gradient-hero: linear-gradient(135deg, #fff 0%, #94a3b8 100%);
    --chat-text-status: #a0a4d6;
}

/* Light Mode Override */
[data-theme="light"] {
    --bg-deep: #f8fafc;
    /* Light Slate */
    --bg-gradient-start: #f1f5f9;
    --bg-gradient-end: #e2e8f0;

    --text-primary: #0f172a;
    /* Slate 900 */
    --text-secondary: #475569;
    /* Slate 600 */

    --glass-bg: rgba(255, 255, 255, 0.7);
    --glass-border: rgba(15, 23, 42, 0.1);
    --glass-highlight: rgba(15, 23, 42, 0.05);

    /* Header adjustment for light mode */
    --header-bg: rgba(255, 255, 255, 0.9);

    /* Chat App Light Mode */
    --chat-bg: #e2e8f0;
    --chat-header-bg: white;
    --chat-frame: #cbd5e1;
    --chat-bubble-me: #3b82f6;
    --chat-bubble-other: #ffffff;
    --chat-text-me: white;
    --chat-text-other: #1e293b;

    /* Light Mode Specifics */
    --text-gradient-hero: linear-gradient(135deg, #0f172a 0%, #475569 100%);
    --chat-text-status: #64748b;
    /* Slate 500 for readability on white */
}

/* Theme Toggle Button */
.theme-btn {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text-primary);
    width: 36px;
    height: 36px;
    border-radius: 50%;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s ease;
    font-size: 1.1rem;
}

.theme-btn:hover {
    background: var(--glass-highlight);
    color: var(--primary-accent);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background-color: var(--bg-deep);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    /* Subtle mesh gradient background */
    background-image:
        radial-gradient(circle at 15% 50%, rgba(59, 130, 246, 0.08), transparent 25%),
        radial-gradient(circle at 85% 30%, rgba(99, 102, 241, 0.08), transparent 25%);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

/* Animations */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes float {
    0% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }

    100% {
        transform: translateY(0px);
    }
}

@keyframes popIn {
    0% {
        opacity: 0;
        transform: scale(0.8) translateY(10px);
    }

    100% {
        opacity: 1;
        transform: scale(1) translateY(0);
    }
}

@keyframes pulse-glow {
    0% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0.4);
    }

    70% {
        box-shadow: 0 0 0 10px rgba(59, 130, 246, 0);
    }

    100% {
        box-shadow: 0 0 0 0 rgba(59, 130, 246, 0);
    }
}

.animate-on-scroll {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.8s ease-out, transform 0.8s ease-out;
}

.animate-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* Header */
/* Header & Nav */
header {
    background: rgba(13, 17, 40, 0.9);
    backdrop-filter: blur(10px);
    position: fixed;
    width: 100%;
    z-index: 1000;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05); /* Subtle border */
    top: 0;
}

[data-theme="light"] header {
    background: rgba(255, 255, 255, 0.9);
    border-bottom: 1px solid rgba(0, 0, 0, 0.05);
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 2rem;
}

.nav-wrapper {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1rem 1.5rem;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 2rem;
}

.nav-links {
    display: flex;
    gap: 2rem;
}

.nav-links a {
    text-decoration: none;
    color: var(--text-secondary);
    font-weight: 500;
    transition: color 0.3s;
    font-size: 0.95rem;
}

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

.header-actions {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding-left: 2rem; /* Separator space */
    border-left: 1px solid rgba(255,255,255,0.1);
}

[data-theme="light"] .header-actions {
    border-left-color: rgba(0,0,0,0.1);
}

.logo img {
    height: 38px;
    width: auto;
}

.btn-sm {
    padding: 0.5rem 1.2rem;
    font-size: 0.9rem;
    border-radius: 8px;
}

/* Hero Section */
.hero {
    min-height: 100vh;
    padding-top: 140px;
    padding-bottom: 80px;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

/* Dynamic background blob behind hero */
.hero::before {
    content: '';
    position: absolute;
    top: 20%;
    right: 10%;
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.15) 0%, rgba(2, 6, 23, 0) 70%);
    border-radius: 50%;
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.hero-content {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 4rem;
    align-items: center;
}

.hero-text h1 {
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 1.5rem;
    font-weight: 800;
    margin-bottom: 1.5rem;
    background: var(--text-gradient-hero);
    /* UPDATED */
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text .highlight {
    background: linear-gradient(135deg, var(--primary-accent) 0%, var(--secondary-accent) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-text p {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 540px;
}

.btn-cta {
    display: inline-block;
    padding: 1rem 2rem;
    background: linear-gradient(135deg, var(--primary-accent), var(--secondary-accent));
    color: white;
    font-weight: 600;
    border-radius: 99px;
    box-shadow: 0 4px 20px rgba(59, 130, 246, 0.3);
    transition: transform 0.2s, box-shadow 0.2s;
    animation: pulse-glow 3s infinite;
}

.btn-cta:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(59, 130, 246, 0.4);
}

/* Chat Interface Mockup - STRICT DESKTOP REPLICA */
.mockup-container {
    position: relative;
    perspective: 1000px;
}

.phone-mockup {
    width: 380px;
    height: 700px;
    background: var(--chat-frame);
    /* UPDATED */
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
    overflow: hidden;
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s ease;
}

.phone-mockup:hover {
    transform: rotateY(0deg) rotateX(0deg);
}

.phone-screen {
    background: var(--chat-bg);
    /* UPDATED */
    height: 100%;
    width: 100%;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.app-header {
    background: var(--chat-header-bg);
    /* UPDATED */
    padding: 18px 24px;
    display: flex;
    align-items: center;
    justify-content: flex-start;
    gap: 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}

.header-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #8b5cf6);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    color: white;
    font-size: 16px;
}

.header-info {
    display: flex;
    flex-direction: column;
}

.header-name {
    color: var(--text-primary);
    /* UPDATED from #fff */
    font-weight: 600;
    font-size: 15px;
}

.header-status {
    color: var(--chat-text-status);
    /* UPDATED */
    font-size: 12px;
}

.chat-simulation-container {
    flex: 1;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    overflow-y: auto;
    scrollbar-width: none;
}

/* Replicating Desktop App Chat CSS */
.msg-row {
    display: flex;
    width: 100%;
    align-items: flex-end;
}

.msg-row.pop-in {
    animation: popIn 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275) forwards;
}

.msg-row.outgoing {
    justify-content: flex-end;
}

.msg-row.incoming {
    justify-content: flex-start;
}

.msg-avatar {
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: grid;
    place-items: center;
    font-weight: 700;
    font-size: 12px;
    background: rgba(255, 255, 255, 0.10);
    border: 1px solid rgba(255, 255, 255, 0.12);
    color: rgba(255, 255, 255, 0.9);
    flex: 0 0 28px;
    margin-bottom: 6px;
    margin-right: 8px;
}

.msg-stack {
    max-width: 80%;
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.msg-row.outgoing .msg-stack {
    align-items: flex-end;
}

.msg-bubble {
    border-radius: 16px;
    padding: 10px 12px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    backdrop-filter: blur(8px);
    font-size: 14px;
    line-height: 1.35;
    word-break: break-word;
}

.msg-bubble.me {
    background: var(--chat-bubble-me);
    /* UPDATED */
    color: var(--chat-text-me);
    /* UPDATED */
}

.msg-bubble.other {
    background: var(--chat-bubble-other);
    /* UPDATED */
    color: var(--chat-text-other);
    /* UPDATED */
}

.msg-meta {
    margin-top: 4px;
    font-size: 11px;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 2px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.25);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
    color: var(--text-secondary);
}

.msg-ephemeral {
    margin-top: 6px;
    font-size: 12px;
    padding: 4px 8px;
    border-radius: 999px;
    background: rgba(0, 0, 0, 0.35);
    color: #ffd39a;
    /* --ephemeral-text */
    font-weight: 600;
}

/* Features Grid */
.features {
    padding: 120px 0;
    position: relative;
}

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

.section-header h2 {
    font-size: 2.5rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
}

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

.feature-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(12px);
    padding: 3rem 2rem;
    border-radius: 24px;
    transition: transform 0.3s ease, border-color 0.3s, box-shadow 0.3s;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

[data-theme="light"] .feature-card {
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(226, 232, 240, 0.8);
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.05);
}

.feature-card:hover {
    transform: translateY(-8px);
    border-color: var(--primary-accent);
    box-shadow: 0 20px 25px -5px rgba(0, 0, 0, 0.1), 0 10px 10px -5px rgba(0, 0, 0, 0.04);
}

.feature-icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
    /* Make icons strictly primary color */
    filter: drop-shadow(0 0 10px rgba(59, 130, 246, 0.3));
}

.feature-card h3 {
    font-size: 1.35rem;
    margin-bottom: 1rem;
    color: var(--text-primary);
    /* Use variable instead of #fff */
}

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

/* Content / Long Descriptions */
.content-section {
    padding: 100px 0;
    background: linear-gradient(to bottom, var(--bg-deep), var(--section-gradient-mid) 30%, var(--bg-deep) 100%);
}

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

.text-block {
    margin-bottom: 4rem;
}

.text-block h3 {
    font-size: 1.8rem;
    margin-bottom: 1.5rem;
    color: var(--primary-accent);
}

.text-block p {
    font-size: 1.15rem;
    color: var(--text-secondary);
    /* Use variable instead of fixed color */
    margin-bottom: 1.5rem;
}

.highlight-box {
    background: var(--highlight-box-bg);
    border: 1px solid var(--highlight-box-border);
    border-radius: 16px;
    padding: 2.5rem;
    margin: 2rem 0;
}

.highlight-list {
    list-style: none;
    /* FIX: Remove default bullets */
}

.highlight-list li {
    margin-bottom: 1rem;
    padding-left: 2rem;
    position: relative;
    color: var(--text-primary);
    /* Use variable */
}

.highlight-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    color: var(--success-green);
    font-weight: bold;
}

/* Footer */
footer {
    border-top: 1px solid var(--glass-border);
    padding: 4rem 0;
    background: var(--bg-deep);
    margin-top: 5rem;
}

.footer-content {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
}

.footer-column h4 {
    margin-bottom: 1.5rem;
    font-size: 1.1rem;
    color: var(--text-primary);
    /* Use variable instead of #fff */
}

.footer-column ul li {
    margin-bottom: 0.8rem;
}

.footer-column a {
    color: var(--text-secondary);
    opacity: 0.7;
}

.footer-column a:hover {
    color: white;
    opacity: 1;
}

/* Responsive */
@media (max-width: 900px) {
    .hero-content {
        grid-template-columns: 1fr;
        gap: 3rem;
        text-align: center;
    }

    .hero-text h1 {
        font-size: 3rem;
    }

    .hero-text p {
        margin: 0 auto 2rem;
    }

    .phone-mockup {
        width: 100%;
        max-width: 380px;
    }

    .nav-links {
        display: none;
        /* Keep simple for now */
    }
}