/* Lexo.nu - Modern Landing Page Styles (V3) */

/* CSS Variables - Premium Design System (V4) */
:root {
    /* Deep Blue Shift Palette - Softened from 5% to 10% lightness */
    --background: hsl(230, 25%, 10%);
    --bg-surface: hsl(230, 20%, 12%);
    --bg-canvas: hsl(230, 15%, 14%);
    --foreground: hsl(0, 0%, 98%);
    --card: hsla(230, 20%, 15%, 0.7);
    --card-foreground: hsl(0, 0%, 98%);
    --glass: hsla(255, 255%, 255%, 0.03);

    /* Primary - Azure Blue (High-Tech AI) */
    --primary: hsl(217, 91%, 60%);
    --primary-foreground: hsl(0, 0%, 100%);
    --primary-dim: hsl(217, 85%, 52%);
    --primary-glow: hsla(217, 91%, 60%, 0.3);

    --secondary: hsl(230, 12%, 18%);
    --secondary-foreground: hsl(230, 8%, 70%);

    --muted: hsl(230, 12%, 20%);
    --muted-foreground: hsl(230, 8%, 55%);

    --accent: hsl(217, 91%, 75%);
    /* Azure Blue instead of Purple */
    /* High-visibility vibrant purple */
    --success: hsl(152, 69%, 45%);

    --border: hsla(255, 255%, 255%, 0.08);
    --shadow-luxe: 0 20px 50px rgba(0, 0, 0, 0.5);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-display: 'Outfit', 'Inter', sans-serif;

    /* Theme colors for light mode fallback */
    --text-dim: #94a3b8;
    --text-muted: #64748b;
}

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

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    background: linear-gradient(135deg,
            hsl(230, 25%, 12%) 0%,
            hsl(235, 25%, 14%) 50%,
            hsl(230, 25%, 12%) 100%);
    color: var(--foreground);
    min-height: 100vh;
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    position: relative;
}

/* Light theme overrides */
[data-theme='light'],
:root[data-theme='light'] {
    --background: hsl(210, 40%, 98%);
    /* Soft Ice Blue tint */
    --bg-surface: hsl(210, 40%, 96%);
    --bg-canvas: hsl(210, 30%, 97%);
    --foreground: hsl(222, 47%, 8%);
    --card: rgba(255, 255, 255, 0.6);
    /* Cleaner glass */
    --card-foreground: hsl(222, 47%, 10%);
    --glass: rgba(255, 255, 255, 0.4);

    --primary: hsl(217, 91%, 50%);
    --primary-dim: hsl(217, 85%, 45%);
    --primary-glow: hsla(217, 91%, 55%, 0.1);

    --secondary: hsl(210, 40%, 94%);
    --secondary-foreground: hsl(215, 25%, 25%);

    --muted: hsl(210, 40%, 93%);
    --muted-foreground: hsl(215, 16%, 40%);

    --border: hsla(222, 47%, 10%, 0.05);
    --shadow-luxe: 0 10px 40px hsla(222, 47%, 10%, 0.05);

    --text-dim: hsl(215, 16%, 30%);
    --text-muted: hsl(215, 13%, 50%);
    --accent: hsl(217, 91%, 60%);
}

[data-theme='light'] body {
    background: linear-gradient(135deg,
            hsl(210, 40%, 98%) 0%,
            hsl(210, 40%, 96%) 100%);
}

/* Animated gradient overlay that follows mouse */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: radial-gradient(circle 600px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            hsla(239, 84%, 67%, 0.06) 0%,
            transparent 50%);
    pointer-events: none;
    z-index: 1;
    transition: opacity 0.3s ease;
}

[data-theme='light'] body::before {
    display: block;
    background: radial-gradient(circle 800px at var(--mouse-x, 50%) var(--mouse-y, 50%),
            hsla(217, 91%, 60%, 0.04) 0%,
            /* Reduced from 0.14 to 0.04 */
            transparent 70%);
}

/* Navbar */
.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    background: rgba(20, 24, 40, 0.8);
    backdrop-filter: blur(30px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    /* Subtle sub-pixel boundary */
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
    transition: all 0.3s;
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
    transition: transform 0.3s ease;
}

.logo:hover {
    transform: scale(1.02);
}

.logo-icon,
.logo-image {
    width: 32px;
    height: 32px;
    flex-shrink: 0;
    display: flex;
    align-items: center;
    justify-content: center;
}

.logo img {
    max-width: 100%;
    max-height: 100%;
    object-fit: contain;
}

.logo-image {
    filter: drop-shadow(0 0 8px var(--primary-glow));
}

[data-theme='light'] .logo-image {
    filter: none;
}

.logo-text {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--foreground);
    white-space: nowrap;
}

.logo-lex {
    color: #ffffff;
}

[data-theme='light'] .logo-lex {
    color: hsl(222, 47%, 8%);
}

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

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

.footer-logo .logo-text {
    font-size: 1.25rem;
    font-weight: 700;
}

/* Language Selector - Premium Refinement */
.language-selector {
    display: flex;
    gap: 0.25rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 3px;
    border-radius: 12px;
    box-shadow: 0 0 0 1px var(--border);
}

[data-theme='light'] .language-selector {
    background: rgba(0, 0, 0, 0.03);
}

.lang-pill {
    padding: 0.35rem 0.7rem;
    border-radius: 8px;
    font-size: 0.7rem;
    font-weight: 700;
    color: var(--muted-foreground);
    background: transparent;
    border: none;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    letter-spacing: 0.02em;
}

.lang-pill:hover {
    color: var(--foreground);
    background: rgba(255, 255, 255, 0.05);
}

.lang-pill.active {
    background: var(--card);
    color: var(--primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.15);
}

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

/* Minimal Mobile Menu Toggle */
.menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--foreground);
    cursor: pointer;
    padding: 0.5rem;
    position: relative;
    z-index: 1001;
}

.hamburger-line {
    display: block;
    width: 18px;
    height: 1.5px;
    background-color: currentColor;
    margin: 4px 0;
    transition: all 0.3s;
}

.hamburger-line.line-2 {
    width: 14px;
    /* Stylish short middle line */
    margin-left: auto;
}

@media (max-width: 768px) {
    .menu-toggle {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        left: 0;
        right: 0;
        background: rgba(15, 23, 42, 0.98);
        -webkit-backdrop-filter: blur(20px);
        backdrop-filter: blur(20px);
        flex-direction: column;
        padding: 2rem;
        gap: 1.5rem;
        border-bottom: 1px solid var(--border);
        box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
    }

    .nav-links.active {
        display: flex;
    }

    [data-theme='light'] .nav-links {
        background: rgba(255, 255, 255, 0.98);
    }

    /* Simple Cross Animation */
    .menu-toggle.active .line-1 {
        transform: translateY(6px) rotate(45deg);
    }

    .menu-toggle.active .line-2 {
        opacity: 0;
    }

    .menu-toggle.active .line-3 {
        transform: translateY(-6px) rotate(-45deg);
    }
}

.nav-link {
    color: var(--muted-foreground);
    text-decoration: none;
    font-weight: 500;
    transition: all 0.3s;
    font-size: 0.9rem;
    letter-spacing: 0.02em;
    text-transform: uppercase;
    opacity: 0.85;
}

.nav-link:hover {
    color: var(--foreground);
    opacity: 1;
    transform: translateY(-1px);
}

/* Hero Section */
.hero {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8rem 2rem 10rem;
    overflow: hidden;
}

/* Hero Background */
.hero-bg {
    position: absolute;
    inset: 0;
    overflow: hidden;
}

.ambient-glow {
    position: absolute;
    top: 15%;
    left: 38.2%;
    transform: translateX(-50%);
    width: 600px;
    height: 600px;
    background: radial-gradient(circle, hsla(217, 91%, 65%, 0.12) 0%, transparent 65%);
    pointer-events: none;
}

[data-theme='light'] .ambient-glow {
    width: 600px;
    /* Reduced from 800px */
    height: 600px;
    /* Reduced from 800px */
    background: radial-gradient(circle, hsla(230, 80%, 60%, 0.05) 0%, transparent 65%);
    /* Reduced opacity from 0.25 to 0.05 */
}

.grid-pattern {
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(hsla(217, 91%, 65%, 0.02) 1px, transparent 1px),
        linear-gradient(90deg, hsla(217, 91%, 65%, 0.02) 1px, transparent 1px);
    background-size: 60px 60px;
}

[data-theme='light'] .grid-pattern {
    display: none;
}

/* Hero Content */
.hero-content {
    position: relative;
    z-index: 10;
    max-width: 1100px;
    text-align: center;
    animation: fadeInUp 0.8s ease-out;
}

/* USP Badge */
.usp-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    background: var(--card);
    backdrop-filter: blur(24px);
    animation: scaleIn 0.6s ease-out;
    min-height: 48px;
    box-shadow: 0 0 0 1px var(--border), 0 4px 20px rgba(0, 0, 0, 0.2);
}

.badge-icon {
    color: var(--primary);
    stroke-width: 2px;
}

.pre-release-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.25rem;
    margin-bottom: 2rem;
    border-radius: 16px;
    background: var(--card);
    backdrop-filter: blur(24px);
    color: var(--foreground);
    font-size: 0.85rem;
    animation: scaleIn 0.8s ease-out;
    margin-left: 10px;
    min-height: 40px;
    box-shadow: 0 0 0 1px var(--border);
}

.badge-status {
    font-size: 0.7rem;
    font-weight: 800;
    background: var(--primary);
    color: white;
    padding: 2px 6px;
    border-radius: 4px;
    letter-spacing: 0.05em;
}

.badge-link-btn {
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid rgba(255, 255, 255, 0.1);
    color: white;
    padding: 2px 8px;
    border-radius: 12px;
    font-size: 0.75rem;
    cursor: pointer;
    transition: all 0.2s;
}

.badge-link-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
}

.scale-icon {
    font-size: 1.25rem;
    animation: wiggle 2s ease-in-out infinite;
}

.badge-text {
    font-size: 0.95rem;
    font-weight: 600;
    color: var(--foreground);
}

.pulse-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: var(--success);
    animation: pulse 1.5s ease-in-out infinite;
}

/* Hero Title */
.hero-title {
    font-family: var(--font-display);
    font-size: clamp(2.5rem, 8vw, 6rem);
    font-weight: 800;
    line-height: 1.05;
    margin-bottom: 1.5rem;
    letter-spacing: -0.02em;
}

.title-line {
    display: block;
}

.text-gradient {
    display: inline-block;
    background: linear-gradient(135deg,
            var(--primary) 0%,
            var(--accent) 50%,
            var(--primary) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    width: fit-content;
    margin: 0 auto;
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
}

[data-theme='light'] .text-gradient {
    background: linear-gradient(135deg,
            hsl(217, 91%, 45%) 0%,
            hsl(217, 91%, 65%) 50%,
            hsl(217, 91%, 45%) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    padding-bottom: 0.15em;
    margin-bottom: -0.15em;
}

/* Hero Subtitle */
.hero-subtitle {
    font-size: clamp(1.25rem, 3vw, 1.75rem);
    color: var(--muted-foreground);
    max-width: 700px;
    margin: 0 auto 2rem;
    line-height: 1.6;
}

/* Hero Stats */
.hero-stats {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    font-size: 1.1rem;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--foreground);
    font-weight: 500;
}

.stat-icon {
    display: none;
}

.stat-svg {
    color: var(--primary);
    stroke-width: 2px;
}

.stat-divider {
    color: var(--muted-foreground);
}

/* CTA Buttons */
.cta-buttons {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
}

.btn-primary,
.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 2.5rem;
    border-radius: 12px;
    font-size: 1.1rem;
    font-weight: 600;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    border: none;
    font-family: inherit;
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    color: white;
    box-shadow: 0 4px 16px hsla(217, 91%, 60%, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 28px hsla(217, 91%, 60%, 0.45);
}

.btn-primary svg {
    transition: transform 0.3s;
}

.btn-primary:hover svg {
    transform: translateX(4px);
}

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

.btn-secondary:hover {
    background: var(--secondary);
    border-color: hsla(217, 91%, 60%, 0.4);
}

/* Scroll Indicator */
.scroll-indicator {
    margin-top: 6rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;

    color: var(--text-muted);
    font-size: 0.9rem;
    font-weight: 500;
    opacity: 0.8;
    animation: bounce 2s ease-in-out infinite;
    z-index: 10;
    cursor: pointer;
}

.scroll-indicator svg {
    width: 24px;
    height: 24px;
    stroke: var(--accent);
}

.scroll-indicator:hover {
    opacity: 1;
    color: var(--accent);
}

/* Decorative Scale */
.decorative-scale {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    font-size: 25rem;
    opacity: 0.015;
    pointer-events: none;
    z-index: 0;
}

/* Stats Section */
.stats-section {
    padding: 10rem 2rem;
    background: var(--background);
}

[data-theme='light'] .stats-section {
    background: var(--bg-surface);
}

.stats-container {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 2rem;
}

.stat-card {
    background: var(--card);
    backdrop-filter: blur(24px);
    border-radius: 16px;
    padding: 2rem;
    text-align: center;
    transition: all 0.3s;
    box-shadow: 0 0 0 1px var(--border);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px hsla(0, 0%, 0%, 0.3);
}

.stat-icon-wrap {
    margin-bottom: 1rem;
}

.stat-emoji {
    display: none;
}

.stat-svg-large {
    color: var(--primary);
    stroke-width: 1.5px;
    filter: drop-shadow(0 0 8px hsla(217, 91%, 60%, 0.3));
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    color: var(--foreground);
    margin-bottom: 0.5rem;
}

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

/* Features Section */
.features-section {
    padding: 10rem 2rem;
}

[data-theme='light'] .stat-card {
    box-shadow: 0 10px 40px hsla(222, 47%, 10%, 0.03), 0 1px 0 hsla(222, 47%, 10%, 0.02);
}

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

.section-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3.5rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.section-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
}

.features-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 1.5rem;
}

.feature-card {
    border: none;
    box-shadow: 0 0 0 1px var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.feature-card:hover {
    transform: translateY(-8px);
    box-shadow: var(--shadow-luxe);
    background: hsla(230, 20%, 15%, 0.8);
}

[data-theme='light'] .feature-card:hover {
    background: #fff;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.06);
}

.feature-icon {
    width: 56px;
    height: 56px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 1.25rem;
    color: var(--primary);
    border: 1px solid hsla(217, 91%, 60%, 0.2);
}

.feature-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.75rem;
}

.feature-description {
    color: var(--muted-foreground);
    line-height: 1.6;
}

/* How it Works */
.how-it-works {
    padding: 10rem 2rem;
    position: relative;
}

[data-theme='light'] .how-it-works {
    background: var(--bg-surface);
}

.how-it-works::before {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(ellipse at center, hsla(217, 91%, 60%, 0.08) 0%, transparent 60%);
    opacity: 0.3;
    pointer-events: none;
}

.steps-grid {
    max-width: 1200px;
    margin: 0 auto;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 1.5rem;
    position: relative;
}

.step-card {
    background: var(--card);
    backdrop-filter: blur(24px);
    border: none;
    box-shadow: 0 0 0 1px var(--border);
    border-radius: 24px;
    padding: 3rem 2rem;
    text-align: center;
    position: relative;
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.step-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-luxe);
}

.step-number {
    font-size: 4rem;
    font-weight: 700;
    color: hsla(217, 91%, 60%, 0.2);
    margin-bottom: 1rem;
}

.step-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 0.5rem;
}

.step-description {
    color: var(--muted-foreground);
}

.step-connector {
    display: none;
}

/* Signup Section */
.signup-section {
    padding: 10rem 2rem;
}

.signup-card {
    max-width: 900px;
    margin: 0 auto;
    background: var(--card);
    backdrop-filter: blur(24px);
    border-radius: 24px;
    padding: 4rem 3rem;
    text-align: center;
    position: relative;
    overflow: hidden;
    box-shadow: 0 0 0 1px var(--border);
}

.signup-glow {
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, hsla(217, 91%, 60%, 0.35) 0%, transparent 65%);
    pointer-events: none;
}

.signup-content {
    position: relative;
    z-index: 10;
}

.signup-icon {
    width: 80px;
    height: 80px;
    margin: 0 auto 2rem;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dim) 100%);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2.5rem;
    box-shadow: 0 8px 32px hsla(239, 84%, 67%, 0.35);
    animation: float 4s ease-in-out infinite;
}

.signup-title {
    font-family: var(--font-display);
    font-size: clamp(2rem, 5vw, 3rem);
    font-weight: 700;
    margin-bottom: 1rem;
}

.signup-subtitle {
    font-size: 1.25rem;
    color: var(--muted-foreground);
    max-width: 600px;
    margin: 0 auto 2.5rem;
}

.signup-form {
    max-width: 500px;
    margin: 0 auto 2rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
}

.email-input {
    width: 100%;
    padding: 1rem 1.5rem;
    border-radius: 10px;
    border: 1px solid var(--border);
    background: var(--background);
    color: var(--foreground);
    font-size: 1rem;
    font-family: inherit;
    transition: all 0.3s;
}

.email-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px hsla(239, 84%, 67%, 0.15);
}

.email-input::placeholder {
    color: var(--muted-foreground);
}

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

.signup-benefits {
    display: flex;
    flex-wrap: wrap;
    gap: 1.5rem;
    justify-content: center;
    font-size: 0.95rem;
}

.benefit {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: var(--muted-foreground);
}

.benefit svg {
    color: var(--success);
    flex-shrink: 0;
}

/* Footer */
.footer {
    padding: 4rem 2rem;
    box-shadow: none;
}

.footer-content {
    max-width: 1200px;
    margin: 0 auto;
}

.footer-main {
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
    margin-bottom: 3rem;
}

.footer-logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    text-decoration: none;
}

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

.footer-links a {
    color: var(--muted-foreground);
    text-decoration: none;
    transition: color 0.3s;
}

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

.footer-bottom {
    padding-top: 2rem;
    border-top: none;
    text-align: center;
}

.copyright {
    color: hsla(230, 10%, 55%, 0.6);
    font-size: 0.9rem;
}

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

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

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes wiggle {

    0%,
    100% {
        transform: rotate(0deg);
    }

    25% {
        transform: rotate(10deg);
    }

    75% {
        transform: rotate(-10deg);
    }
}

@keyframes pulse {

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

    50% {
        opacity: 0.6;
        transform: scale(1.2);
    }
}

@keyframes float {

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

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

@keyframes bounce {

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

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

/* Responsive */
@media (max-width: 768px) {
    .nav-container {
        padding: 0.6rem 1rem;
    }

    .logo-text {
        font-size: 1.25rem;
    }

    .hero {
        padding: 6rem 1.5rem 4rem;
    }

    .decorative-scale {
        font-size: 15rem;
    }

    .cta-buttons {
        flex-direction: column;
        width: 100%;
    }

    .btn-primary,
    .btn-secondary {
        width: 100%;
        justify-content: center;
    }

    .stats-container {
        grid-template-columns: repeat(2, 1fr);
    }

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

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

    .signup-card {
        padding: 2.5rem 1.5rem;
    }

    .footer-main {
        flex-direction: column;
        text-align: center;
    }

    .footer-links {
        justify-content: center;
    }
}

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

    .stats-container {
        grid-template-columns: 1fr;
    }
}

/* Theme Toggle */
.theme-toggle {
    background: var(--secondary);
    border: 1px solid var(--border);
    border-radius: 10px;
    padding: 0.5rem;
    cursor: pointer;
    transition: all 0.3s;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
}

.theme-toggle:hover {
    background: hsla(239, 84%, 67%, 0.1);
    border-color: var(--primary);
}

.theme-toggle svg {
    width: 20px;
    height: 20px;
    color: var(--foreground);
}







/* Cookie Consent Banner */
.cookie-banner {
    position: fixed;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 700px;
    background: var(--bg-surface);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    z-index: 2000;
    display: none;
    /* Hidden by default */
    animation: slideUp 0.5s ease-out;
}

[data-theme='light'] .cookie-banner {
    background: #ffffff;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.08);
}

.cookie-content {
    display: flex;
    align-items: center;
    gap: 1.5rem;
    justify-content: space-between;
}

.cookie-text h4 {
    margin: 0 0 0.5rem 0;
    font-size: 1.1rem;
    color: var(--foreground);
}

.cookie-text p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin: 0;
    line-height: 1.4;
}

.cookie-actions {
    display: flex;
    gap: 1rem;
    flex-shrink: 0;
}

.btn-cookie-accept {
    background: var(--accent);
    color: white;
    border: none;
    padding: 0.75rem 1.5rem;
    border-radius: 10px;
    cursor: pointer;
    font-weight: 600;
    transition: transform 0.2s;
    font-size: 0.9rem;
}

.btn-cookie-accept:hover {
    transform: translateY(-2px);
}

.btn-cookie-minimize {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--border);
    padding: 0.75rem 1rem;
    border-radius: 10px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: all 0.2s;
}

.btn-cookie-minimize:hover {
    border-color: var(--foreground);
    color: var(--foreground);
}

@keyframes slideUp {
    from {
        transform: translate(-50%, 50px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

@media (max-width: 600px) {
    .cookie-content {
        flex-direction: column;
        text-align: left;
    }

    .cookie-actions {
        width: 100%;
        justify-content: flex-end;
    }
}

/* FAQ Section */
.faq-section {
    padding: 6rem 2rem;
    position: relative;
    background: radial-gradient(circle at bottom left, rgba(255, 255, 255, 0.03), transparent 40%);
}

[data-theme='light'] .faq-section {
    background: var(--bg-surface);
}

.faq-container {
    max-width: 1000px;
    margin: 0 auto;
}

.faq-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 1.5rem;
    margin-top: 3rem;
}

.faq-card {
    background: hsla(230, 25%, 15%, 0.4);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border-radius: 20px;
    padding: 2rem;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    border: 1px solid rgba(255, 255, 255, 0.08);
    position: relative;
    overflow: hidden;
}

.faq-card:hover {
    border-color: rgba(255, 255, 255, 0.3);
    transform: translateY(-4px) scale(1.01);
    box-shadow: 0 30px 60px -12px rgba(0, 0, 0, 0.5), inset 0 0 20px rgba(255, 255, 255, 0.02);
}

[data-theme='light'] .faq-card {
    border: 1px solid rgba(0, 0, 0, 0.03);
}

[data-theme='light'] .faq-card:hover {
    border-color: rgba(0, 0, 0, 0.1);
    background: #ffffff;
}

.faq-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, hsla(0, 0%, 100%, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.faq-card:hover::before {
    opacity: 1;
}

.faq-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 0.5rem;
}

.faq-header h3 {
    font-family: var(--font-display);
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--foreground);
    margin: 0;
    letter-spacing: -0.01em;
}

.faq-icon {
    font-size: 1.1rem;
    color: var(--foreground);
    opacity: 0.5;
    font-weight: 500;
}

.faq-card:hover .faq-icon {
    opacity: 1;
    color: #ffffff;
}

.faq-body p {
    color: var(--muted-foreground);
    line-height: 1.6;
    font-size: 0.95rem;
    margin: 0;
}

/* Comparison Table */
.comparison-table-wrapper {
    overflow-x: auto;
    border-radius: 8px;
    border: 1px solid var(--border);
    margin-top: 1rem;
}

.comparison-table {
    width: 100%;
    border-collapse: collapse;
    font-size: 0.9rem;
    text-align: left;
}

.comparison-table th,
.comparison-table td {
    padding: 0.75rem 1rem;
    border-bottom: 1px solid var(--border);
}

.comparison-table th {
    background: hsla(239, 84%, 67%, 0.1);
    color: var(--text-primary);
    font-weight: 600;
}

.comparison-table td {
    color: var(--muted-foreground);
}

.comparison-table tr:last-child td {
    border-bottom: none;
}

.comparison-table strong {
    color: var(--accent);
}

/* --- FAQ Slide-Out Panel Styles --- */

.faq-trigger-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.faq-trigger-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.75rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.faq-trigger-btn:hover {
    background: hsla(239, 84%, 67%, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.2);
}

#faq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(2px);
}

#faq-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#faq-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 600px;
    height: 100vh;
    background: rgba(15, 23, 42, 0.98);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-left: 1px solid rgba(255, 255, 255, 0.1);
    transform: translateX(100%);
    transition: transform 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;

    display: flex;
    flex-direction: column;
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.5);
}

[data-theme='light'] #faq-panel {
    background: rgba(255, 255, 255, 0.95);
    border-left: 1px solid hsla(222, 47%, 10%, 0.05);
    box-shadow: -10px 0 30px rgba(0, 0, 0, 0.05);
}

#faq-panel.open {
    transform: translateX(0);
}

.faq-panel-header {
    margin-top: 20px;
    padding: 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(15, 23, 42, 0.98);
}

.faq-panel-header h2 {
    margin: 0;
    font-size: 1.25rem;
    color: #fff;
    font-weight: 600;
}

[data-theme='light'] .faq-panel-header {
    background: rgba(255, 255, 255, 0.98);
    border-bottom: 1px solid hsla(222, 47%, 10%, 0.05);
}

[data-theme='light'] .faq-panel-header h2 {
    color: var(--foreground);
}

.faq-close-btn {
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    font-size: 2rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: color 0.2s;
}

.faq-close-btn:hover {
    color: #fff;
    transform: scale(1.1);
}

.faq-search-container {
    padding: 1rem 1.5rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

[data-theme='light'] .faq-search-container {
    border-bottom-color: hsla(222, 47%, 10%, 0.05);
}

.faq-search-input {
    width: 100%;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: #fff;
    font-size: 0.95rem;
    transition: border-color 0.2s;
}

.faq-search-input:focus {
    outline: none;
    border-color: var(--accent);
}

.faq-tabs {
    display: flex;
    padding: 0 1.5rem;
    gap: 1.5rem;
    overflow-x: auto;
    border-bottom: none;
    scrollbar-width: none;

}

[data-theme='light'] .navbar {
    background: rgba(255, 255, 255, 0.85);
    backdrop-filter: blur(40px) saturate(180%);
    box-shadow: none;
}

[data-theme='light'] .stat-card,
[data-theme='light'] .feature-card,
[data-theme='light'] .signup-card,
[data-theme='light'] .faq-card {
    background: var(--card);
    backdrop-filter: blur(40px) saturate(180%);
    box-shadow: 0 4px 20px hsla(222, 47%, 10%, 0.02), 0 1px 0 hsla(222, 47%, 10%, 0.03);
    border: none;
}

[data-theme='light'] .stat-card:hover,
[data-theme='light'] .feature-card:hover,
[data-theme='light'] .signup-card:hover,
[data-theme='light'] .faq-card:hover {
    box-shadow: 0 30px 60px hsla(222, 47%, 10%, 0.06);
    background: #ffffff;
    transform: translateY(-5px) scale(1.02);
}

[data-theme='light'] .logo-o {
    color: var(--primary);
    text-shadow: 0 0 10px var(--primary-glow);
}

.faq-tabs::-webkit-scrollbar {
    display: none;
}

.faq-tab-btn {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    padding: 1rem 0;

    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s;
    font-size: 0.95rem;
}

[data-theme='light'] .faq-tab-btn {
    color: var(--muted-foreground);
}

.faq-tab-btn.active {
    color: var(--accent);
}

[data-theme='light'] .faq-tab-btn.active {
    color: var(--primary);
}

.faq-tab-btn.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--accent);
}

[data-theme='light'] .faq-tab-btn.active::after {
    background: var(--primary);
}

.faq-panel-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
}

.faq-category-section {
    display: none;
    animation: fadeIn 0.3s ease;
}

.faq-category-section.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(5px);
    }

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

.faq-detail-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 8px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: background 0.2s;
}

[data-theme='light'] .faq-detail-item {
    background: rgba(0, 0, 0, 0.02);
    border-color: hsla(222, 47%, 10%, 0.05);
}

[data-theme='light'] .faq-detail-item:hover {
    background: rgba(0, 0, 0, 0.04);
}

.faq-detail-item:hover {
    background: rgba(255, 255, 255, 0.05);
}

.faq-detail-header {
    padding: 1rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #e2e8f0;
    font-size: 0.95rem;
}

[data-theme='light'] .faq-detail-header {
    color: var(--foreground);
}

.faq-header-icon {
    font-size: 1.2rem;
    color: var(--accent);
    transition: transform 0.3s;
}

.faq-detail-body {
    padding: 0 1rem 1rem 1rem;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    line-height: 1.6;
    display: none;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 1rem;
}

[data-theme='light'] .faq-detail-body {
    border-top-color: hsla(222, 47%, 10%, 0.05);
    color: var(--text-muted);
}

.faq-detail-item.open .faq-detail-body {
    display: block;
}

.faq-detail-item.open .faq-header-icon {
    transform: rotate(45deg);
}

@media (max-width: 768px) {
    #faq-panel {
        max-width: 100%;
    }
}

/* ===================================
   Premium Language Selector Dropdown
   =================================== */
.language-dropdown {
    position: relative;
    z-index: 1100;
}

.lang-current {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.5rem 0.75rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    color: var(--foreground);
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(12px);
}

.lang-current:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.2);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.dropdown-arrow {
    transition: transform 0.3s ease;
    opacity: 0.6;
}

.lang-menu {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    min-width: 160px;
    background: rgba(15, 23, 42, 0.9);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 16px;
    padding: 0.5rem;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(10px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.lang-menu.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.lang-item {
    width: 100%;
    display: flex;
    align-items: center;
    padding: 0.75rem 1rem;
    border: none;
    background: transparent;
    color: var(--muted-foreground);
    font-size: 0.9rem;
    font-weight: 500;
    border-radius: 10px;
    cursor: pointer;
    text-align: left;
    transition: all 0.2s ease;
}

.lang-item:hover {
    background: rgba(255, 255, 255, 0.05);
    color: var(--foreground);
}

.lang-item.active {
    color: var(--primary);
    background: rgba(99, 102, 241, 0.1);
}

/* Light theme adjustments */
[data-theme='light'] .faq-card {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.03);
}

[data-theme='light'] .faq-card:hover {
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.9);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .lang-current {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .lang-current:hover {
    background: rgba(0, 0, 0, 0.05);
}

[data-theme='light'] .lang-menu {
    background: rgba(255, 255, 255, 0.9);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme='light'] .lang-item:hover {
    background: rgba(0, 0, 0, 0.03);
}

[data-theme='light'] .lang-item.active {
    background: rgba(99, 102, 241, 0.05);
}

/* ===================================
   RTL Support (Arabic)
   Uses body.rtl class set by i18n.js
   =================================== */
body.rtl {
    direction: rtl;
    text-align: right;
}

/* Navbar */
body.rtl .nav-container {
    flex-direction: row-reverse;
}

body.rtl .nav-links {
    flex-direction: row-reverse;
}

body.rtl .logo {
    flex-direction: row-reverse;
}

/* Hero */
body.rtl .hero-content {
    text-align: right;
}

body.rtl .hero-title,
body.rtl .hero-subtitle {
    text-align: right;
}

body.rtl .usp-badge {
    flex-direction: row-reverse;
}

body.rtl .cta-buttons {
    flex-direction: row-reverse;
}

body.rtl .hero-stats {
    flex-direction: row-reverse;
}

body.rtl .stat-item {
    flex-direction: row-reverse;
}

/* Dropzone */
body.rtl .dropzone-text,
body.rtl .dropzone-subtext {
    text-align: right;
}

/* Feature cards */
body.rtl .feature-card {
    text-align: right;
}

/* Steps */
body.rtl .step-card {
    text-align: right;
}

/* Footer */
body.rtl .footer-main {
    flex-direction: row-reverse;
}

body.rtl .footer-links {
    flex-direction: row-reverse;
}

body.rtl .footer-logo {
    flex-direction: row-reverse;
}

/* Signup */
body.rtl .signup-content {
    text-align: right;
}

body.rtl .signup-benefits {
    flex-direction: row-reverse;
}

body.rtl .benefit {
    flex-direction: row-reverse;
}

/* --- Canvas Integration (Solid Premium) --- */
.canvas-demo-section {
    padding: 10rem 2rem;
    background: linear-gradient(to bottom, var(--background), var(--bg-surface));
    position: relative;
    overflow: hidden;
}

.canvas-demo-container {
    max-width: 1200px;
    margin: 0 auto;
}

.canvas-window {
    background: var(--bg-surface);
    border-radius: 28px;
    /* Slightly rounder */
    height: 600px;
    display: flex;
    overflow: hidden;
    position: relative;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.4),
        0 0 0 1px rgba(255, 255, 255, 0.03);
    /* Extremely subtle border */
    animation: fadeInUp 1s ease-out;
    backdrop-filter: blur(20px);
}

.chat-pane {
    width: 380px;
    background: rgba(0, 0, 0, 0.2);
    padding: 2rem;
    display: flex;
    flex-direction: column;
    border-right: 1px solid rgba(255, 255, 255, 0.05);
    /* Softer edge */
}

.canvas-stage {
    flex: 1;
    background: var(--bg-canvas);
    padding: 2.5rem;
    display: flex;
    flex-direction: column;
    position: relative;
}

.demo-canvas-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 2rem;
    padding-bottom: 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.demo-canvas-title {
    font-family: var(--font-display);
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--foreground);
}

.demo-window-controls {
    display: flex;
    gap: 8px;
}

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

.control-dot.red {
    background: #ff5f56;
}

.control-dot.yellow {
    background: #ffbd2e;
}

.control-dot.green {
    background: #27c93f;
}

.message-preview {
    background: rgba(255, 255, 255, 0.02);
    padding: 1.25rem;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    margin-bottom: 1.5rem;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.1);
}

.message-label {
    font-size: 0.65rem;
    font-weight: 800;
    text-transform: uppercase;
    color: var(--primary);
    margin-bottom: 0.75rem;
    display: block;
    letter-spacing: 0.1em;
}

.citation-box {
    background: var(--muted);
    border-left: 3px solid var(--primary);
    padding: 1rem;
    border-radius: 8px;
    margin-top: 1rem;
    font-size: 0.85rem;
    color: var(--secondary-foreground);
}

.demo-analysis-content {
    background: hsla(239, 84%, 67%, 0.02);
    border-radius: 20px;
    flex: 1;
    padding: 2rem;
    border: 1px dashed rgba(255, 255, 255, 0.08);
    /* Softer dash */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    position: relative;
    overflow: hidden;
}

.demo-analysis-content::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, hsla(239, 84%, 67%, 0.05) 0%, transparent 70%);
    transform: translate(-50%, -50%);
    pointer-events: none;
}

.demo-empty-icon {
    width: 48px;
    height: 48px;
    margin-bottom: 1.5rem;
    opacity: 0.5;
    color: var(--primary);
    filter: drop-shadow(0 0 10px var(--primary-glow));
    animation: floatIcon 3s ease-in-out infinite;
}

@keyframes floatIcon {

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

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

.demo-empty-title {
    font-weight: 600;
    margin-bottom: 0.5rem;
    color: var(--foreground);
    font-family: 'Inter', sans-serif;
}

.demo-empty-subtitle {
    font-size: 0.9rem;
    opacity: 0.7;
    font-family: 'Inter', sans-serif;
}

[data-theme='light'] .canvas-window {
    background: #ffffff;
    box-shadow: 0 40px 100px rgba(0, 0, 0, 0.08);
}

[data-theme='light'] .chat-pane {
    background: #f8fafc;
}

[data-theme='light'] .citation-box {
    background: #f1f5f9;
}

[data-theme='light'] .demo-analysis-content {
    background: #fdfdfd;
}

/* Responsive Stacking */
@media (max-width: 992px) {
    .chat-pane {
        width: 300px;
    }
}

@media (max-width: 768px) {
    .canvas-demo-section {
        padding: 6rem 1.5rem;
    }

    .canvas-window {
        flex-direction: column;
        height: auto;
        min-height: 700px;
    }

    .chat-pane {
        width: 100%;
        border-right: none;
        border-bottom: 1px solid var(--border);
        padding: 1.5rem;
    }

    .canvas-stage {
        padding: 1.5rem;
    }

    .demo-canvas-header {
        margin-bottom: 1.5rem;
    }
}

/* --- FAQ Slide-Out Panel Styles --- */

.faq-trigger-wrapper {
    display: flex;
    justify-content: center;
    margin-top: 2rem;
    padding-bottom: 2rem;
}

.faq-trigger-btn {
    background: transparent;
    border: 1px solid var(--accent);
    color: var(--accent);
    padding: 0.75rem 2rem;
    border-radius: 99px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 1rem;
}

.faq-trigger-btn:hover {
    background: hsla(217, 91%, 60%, 0.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px var(--primary-glow);
}

#faq-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
    z-index: 9998;
    backdrop-filter: blur(4px);
}

#faq-overlay.open {
    opacity: 1;
    pointer-events: auto;
}

#faq-panel {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    max-width: 500px;
    height: 100vh;
    background: hsla(230, 25%, 10%, 0.95);
    backdrop-filter: blur(32px);
    -webkit-backdrop-filter: blur(32px);
    border-left: 1px solid var(--border);
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 9999;
    display: flex;
    flex-direction: column;
    box-shadow: -20px 0 50px rgba(0, 0, 0, 0.5);
}

#faq-panel.open {
    transform: translateX(0);
}

.faq-panel-header {
    padding: 1.5rem;
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.faq-panel-header h2 {
    margin: 0;
    font-size: 1.5rem;
    color: #fff;
    font-weight: 600;
    background: linear-gradient(135deg, #fff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.close-faq {
    background: transparent;
    border: 0;
    color: var(--muted-foreground);
    font-size: 2.5rem;
    cursor: pointer;
    line-height: 1;
    padding: 0.5rem;
    transition: all 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.close-faq:hover {
    color: #fff;
    transform: scale(1.1) rotate(90deg);
}

.faq-search {
    padding: 1.25rem 1.5rem;
}

.faq-search input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border);
    border-radius: 12px;
    color: #fff;
    font-size: 1rem;
    transition: all 0.2s;
}

.faq-search input:focus {
    outline: none;
    border-color: var(--primary);
    background: rgba(255, 255, 255, 0.08);
    box-shadow: 0 0 0 4px var(--primary-glow);
}

.faq-tabs {
    display: flex;
    padding: 0 1.5rem;
    gap: 1rem;
    overflow-x: auto;
    border-bottom: 1px solid var(--border);
    scrollbar-width: none;
}

.faq-tabs::-webkit-scrollbar {
    display: none;
}

.faq-tab {
    background: transparent;
    border: none;
    color: var(--muted-foreground);
    padding: 1rem 0.5rem;
    font-weight: 500;
    cursor: pointer;
    white-space: nowrap;
    position: relative;
    transition: color 0.3s;
    font-size: 0.95rem;
}

.faq-tab:hover {
    color: #fff;
}

.faq-tab.active {
    color: var(--primary);
}

.faq-tab.active::after {
    content: '';
    position: absolute;
    bottom: -1px;
    left: 0;
    width: 100%;
    height: 2px;
    background: var(--primary);
    box-shadow: 0 0 8px var(--primary-glow);
}

.faq-panel-body {
    padding: 1.5rem;
    flex: 1;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: var(--border) transparent;
}

.faq-category-section {
    display: none;
    animation: faqFadeIn 0.4s cubic-bezier(0.16, 1, 0.3, 1);
}

.faq-category-section.active {
    display: block;
}

@keyframes faqFadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

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

.faq-detail-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--border);
    border-radius: 12px;
    margin-bottom: 1rem;
    overflow: hidden;
    transition: all 0.3s ease;
}

.faq-detail-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.15);
}

.faq-detail-header {
    padding: 1.25rem 1.5rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    cursor: pointer;
    font-weight: 500;
    color: #f1f5f9;
    font-size: 1rem;
}

.faq-header-icon {
    font-size: 1.25rem;
    color: var(--primary);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    font-weight: 300;
}

.faq-detail-body {
    padding: 0 1.5rem 1.5rem 1.5rem;
    color: var(--secondary-foreground);
    font-size: 0.95rem;
    line-height: 1.6;
    display: none;
    border-top: 1px solid var(--border);
    padding-top: 1.25rem;
}

.faq-detail-item.open .faq-detail-body {
    display: block;
}

.faq-detail-item.open .faq-header-icon {
    transform: rotate(45deg);
}

/* Responsive adjustments */
@media (max-width: 768px) {
    #faq-panel {
        max-width: 100%;
    }
}

/* Light theme overrides */
[data-theme='light'] #faq-panel {
    background: rgba(255, 255, 255, 0.98);
    backdrop-filter: blur(20px);
    border-left: 1px solid #e2e8f0;
}

[data-theme='light'] .faq-panel-header h2 {
    background: linear-gradient(135deg, #0f172a 0%, #475569 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

[data-theme='light'] .faq-search input {
    background: #f8fafc;
    border-color: #e2e8f0;
    color: #0f172a;
}

[data-theme='light'] .faq-detail-item {
    background: #fff;
    border-color: #e2e8f0;
}

[data-theme='light'] .faq-detail-header {
    color: #1e293b;
}

[data-theme='light'] .faq-detail-body {
    color: #475569;
}

/* ===================================
   Premium V2 - Editorial + Unified Atmosphere
   =================================== */
:root {
    --space-section-v2: clamp(5rem, 10vw, 8rem);
    --space-header-v2: clamp(2.5rem, 5vw, 4rem);
    --radius-surface-v2: 20px;
    --surface-dark-v2: rgba(255, 255, 255, 0.03);
    --surface-light-v2: rgba(255, 255, 255, 0.74);
    --surface-border-dark-v2: rgba(255, 255, 255, 0.09);
    --surface-border-light-v2: rgba(15, 23, 42, 0.08);
}

.navbar {
    background: linear-gradient(180deg, rgba(12, 17, 31, 0.78) 0%, rgba(12, 17, 31, 0.46) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06) !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
}

[data-theme='light'] .navbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.86) 0%, rgba(255, 255, 255, 0.64) 100%) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}

.nav-container {
    max-width: 1320px;
}

.nav-link {
    position: relative;
}

.nav-link::after {
    content: '';
    position: absolute;
    left: 0;
    right: 0;
    bottom: -0.35rem;
    height: 1px;
    background: var(--primary);
    transform: scaleX(0);
    transform-origin: left;
    opacity: 0.65;
    transition: transform 0.28s ease;
}

.nav-link:hover::after {
    transform: scaleX(1);
}

/* One continuous page atmosphere */
.hero,
.how-it-works,
.stats-section,
.features-section,
.canvas-demo-section,
.signup-section,
.faq-section,
.about-section {
    background: transparent !important;
    padding-top: var(--space-section-v2) !important;
    padding-bottom: var(--space-section-v2) !important;
}

.how-it-works,
.stats-section,
.features-section,
.canvas-demo-section,
.signup-section,
.faq-section,
.about-section {
    border-top: 1px solid rgba(255, 255, 255, 0.04);
}

[data-theme='light'] .how-it-works,
[data-theme='light'] .stats-section,
[data-theme='light'] .features-section,
[data-theme='light'] .canvas-demo-section,
[data-theme='light'] .signup-section,
[data-theme='light'] .faq-section,
[data-theme='light'] .about-section {
    border-top: 1px solid rgba(15, 23, 42, 0.06);
}

.section-header {
    margin: 0 auto var(--space-header-v2) !important;
}

.hero-content {
    max-width: 960px;
}

.hero-title {
    letter-spacing: -0.03em;
    line-height: 1.02;
}

.hero-subtitle {
    max-width: 760px;
    font-size: clamp(1.1rem, 2.1vw, 1.45rem);
    color: color-mix(in srgb, var(--muted-foreground) 92%, white 8%);
}

/* Premium CTA hierarchy */
.btn-primary,
.btn-secondary {
    min-height: 52px;
    border-radius: 14px;
    font-weight: 620;
}

.btn-primary {
    background: linear-gradient(135deg, #2f7df6 0%, #1f63e9 45%, #4e8fff 100%);
    box-shadow: 0 8px 24px rgba(46, 125, 246, 0.35);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(46, 125, 246, 0.46);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid var(--surface-border-dark-v2);
}

[data-theme='light'] .btn-secondary {
    background: rgba(255, 255, 255, 0.65);
    border: 1px solid var(--surface-border-light-v2);
}

/* Unified card surfaces + calm premium motion */
.stat-card,
.feature-card,
.step-card,
.signup-card,
.faq-card,
.glass-card,
.comp-card,
.canvas-window {
    background: var(--surface-dark-v2) !important;
    border: 1px solid var(--surface-border-dark-v2) !important;
    border-radius: var(--radius-surface-v2) !important;
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.2) !important;
    transition: transform 0.28s ease, box-shadow 0.32s ease, border-color 0.3s ease;
    backdrop-filter: blur(9px);
    -webkit-backdrop-filter: blur(9px);
}

[data-theme='light'] .stat-card,
[data-theme='light'] .feature-card,
[data-theme='light'] .step-card,
[data-theme='light'] .signup-card,
[data-theme='light'] .faq-card,
[data-theme='light'] .glass-card,
[data-theme='light'] .comp-card,
[data-theme='light'] .canvas-window {
    background: var(--surface-light-v2) !important;
    border: 1px solid var(--surface-border-light-v2) !important;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.09) !important;
}

.stat-card:hover,
.feature-card:hover,
.step-card:hover,
.signup-card:hover,
.faq-card:hover,
.glass-card:hover,
.comp-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.28) !important;
    border-color: rgba(255, 255, 255, 0.14) !important;
}

[data-theme='light'] .stat-card:hover,
[data-theme='light'] .feature-card:hover,
[data-theme='light'] .step-card:hover,
[data-theme='light'] .signup-card:hover,
[data-theme='light'] .faq-card:hover,
[data-theme='light'] .glass-card:hover,
[data-theme='light'] .comp-card:hover {
    box-shadow: 0 16px 32px rgba(15, 23, 42, 0.14) !important;
    border-color: rgba(15, 23, 42, 0.14) !important;
}

@media (max-width: 768px) {
    .hero,
    .how-it-works,
    .stats-section,
    .features-section,
    .canvas-demo-section,
    .signup-section,
    .faq-section,
    .about-section {
        padding-top: clamp(3.2rem, 8vw, 4.5rem) !important;
        padding-bottom: clamp(3.2rem, 8vw, 4.5rem) !important;
    }
}

/* Keep navbar readable (avoid accidental full transparency override) */
.navbar {
    background: linear-gradient(180deg, rgba(12, 17, 31, 0.82) 0%, rgba(12, 17, 31, 0.58) 100%) !important;
    border-bottom: 1px solid rgba(255, 255, 255, 0.07) !important;
    box-shadow: none !important;
    backdrop-filter: blur(12px) saturate(125%) !important;
    -webkit-backdrop-filter: blur(12px) saturate(125%) !important;
}

[data-theme='light'] .navbar {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.9) 0%, rgba(255, 255, 255, 0.72) 100%) !important;
    border-bottom: 1px solid rgba(15, 23, 42, 0.08) !important;
}
