:root {
    --bg-color: #1a1a24;
    /* Lighter, more purple-tinted dark */
    --text-primary: #ffffff;
    --text-secondary: #b4b4c0;
    /* Lighter secondary text */
    --accent-primary: #8b5cf6;
    /* Brighter Violet */
    --accent-secondary: #3b82f6;
    /* Brighter Blue */
    --accent-glow: #e879f9;
    /* Brighter Fuchsia */
    --glass-bg: rgba(255, 255, 255, 0.08);
    /* More visible glass */
    --glass-border: rgba(255, 255, 255, 0.15);
    --font-heading: 'Outfit', sans-serif;
    --font-body: 'Inter', sans-serif;
}

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

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

/* Responsive Design */
@media (max-width: 1024px) {
    .hero {
        flex-direction: column;
        text-align: center;
        gap: 4rem;
        padding-top: 6rem;
    }

    .hero-content {
        order: 1;
        /* English first */
    }

    .hero-visual {
        order: 2;
        /* Phone second */
    }

    .hero-content.right {
        order: 3;
        /* Spanish last */
    }

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

    .navbar {
        padding: 1rem;
    }

    .bilingual-split {
        flex-direction: column;
        gap: 4rem;
    }

    .bilingual-split::after {
        display: none;
        /* Hide divider on mobile */
    }

    .bilingual-split.tight {
        gap: 2rem;
    }
}

/* Ambient Glow Background */
.ambient-glow {
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at 50% 50%, rgba(139, 92, 246, 0.2), transparent 60%),
        radial-gradient(circle at 80% 20%, rgba(59, 130, 246, 0.15), transparent 50%);
    z-index: -1;
    pointer-events: none;
}

/* Navbar */
.navbar {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 1.5rem 2rem;
    position: fixed;
    width: 100%;
    top: 0;
    backdrop-filter: blur(10px);
    z-index: 100;
    background: rgba(10, 10, 15, 0.7);
    border-bottom: 1px solid var(--glass-border);
}

.logo {
    font-family: var(--font-heading);
    font-weight: 700;
    font-size: 1.5rem;
    letter-spacing: -0.02em;
    background: linear-gradient(to right, #fff, #a0a0b0);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

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

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

/* Hero Section */
.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 8rem 2rem 4rem;
    max-width: 1400px;
    /* Increased width to accommodate 3 columns */
    margin: 0 auto;
    gap: 2rem;
    /* Reduced gap */
}

.hero-content {
    flex: 1;
}

.badge {
    background: rgba(124, 58, 237, 0.2);
    color: #d8b4fe;
    padding: 0.4rem 0.8rem;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 600;
    border: 1px solid rgba(124, 58, 237, 0.3);
    margin-bottom: 1.5rem;
    display: inline-block;
}

h1 {
    font-family: var(--font-heading);
    font-size: 3rem;
    /* Reduced from 4rem to fit side-by-side */
    line-height: 1.1;
    margin-bottom: 1.5rem;
    font-weight: 700;
}

.gradient-text {
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
    max-width: 500px;
}

/* Buttons */
.btn-primary {
    background: white;
    color: black;
    padding: 0.8rem 1.5rem;
    border-radius: 30px;
    text-decoration: none;
    font-weight: 600;
    transition: transform 0.2s, box-shadow 0.2s;
    display: inline-block;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -5px rgba(255, 255, 255, 0.2);
}

.btn-primary.small {
    padding: 0.5rem 1rem;
    font-size: 0.9rem;
}

.btn-secondary {
    color: white;
    padding: 0.8rem 1.5rem;
    text-decoration: none;
    font-weight: 500;
    margin-left: 1rem;
    border-bottom: 1px solid transparent;
    transition: border-color 0.3s;
}

.btn-secondary:hover {
    border-color: var(--text-secondary);
}

/* Hero Visual / Mockup */
.hero-visual {
    flex: 1;
    display: flex;
    justify-content: center;
}

.phone-mockup {
    width: 310px;
    height: 620px;
    background: #000;
    border-radius: 50px;
    border: 10px solid #2a2a2a;
    position: relative;
    box-shadow: 0 30px 60px -15px rgba(0, 0, 0, 0.6), 0 0 120px -30px rgba(139, 92, 246, 0.4);
    overflow: hidden;
}

.screen {
    background: linear-gradient(180deg, #131318 0%, #1a1a22 100%);
    height: 100%;
    width: 100%;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: 0;
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}

/* Mockup Header */
.app-header {
    padding: 2.5rem 1.5rem 1rem;
    /* Extra top padding for notch area */
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(26, 26, 32, 0.8);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    z-index: 10;
}

.back-arrow {
    color: var(--accent-secondary);
    font-size: 1.2rem;
}

.header-title {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.1rem;
}

.header-title span:first-child {
    font-size: 1rem;
    font-weight: 600;
    letter-spacing: 0.3px;
}

.status-dot {
    width: 6px;
    height: 6px;
    background: #10b981;
    border-radius: 50%;
    box-shadow: 0 0 5px #10b981;
}

.header-actions .icon {
    font-size: 1.1rem;
    cursor: pointer;
    color: var(--accent-secondary);
    opacity: 0.9;
    transition: opacity 0.2s;
}

/* Chat Area */
.chat-area {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

.date-divider {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    font-weight: 500;
    margin-bottom: 1.5rem;
    letter-spacing: 0.5px;
    opacity: 0.6;
}

.chat-bubble {
    padding: 0.9rem 1.1rem;
    border-radius: 18px;
    margin-bottom: 1rem;
    font-size: 0.95rem;
    max-width: 82%;
    line-height: 1.45;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.1);
    display: flex;
    flex-direction: column;
    gap: 0.3rem;
    position: relative;
}

.chat-bubble.received {
    background: rgba(255, 255, 255, 0.08);
    color: #e2e2e2;
    align-self: flex-start;
    border-bottom-left-radius: 4px;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.chat-bubble.sent {
    background: linear-gradient(135deg, var(--accent-primary), #6d28d9);
    color: #fff;
    align-self: flex-end;
    border-bottom-right-radius: 4px;
    box-shadow: 0 4px 15px rgba(124, 58, 237, 0.3);
}

.translation-hint {
    font-size: 0.8rem;
    opacity: 0.85;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
    padding-top: 0.4rem;
    margin-top: 0.2rem;
    font-style: italic;
}

.system-message {
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.7rem;
    margin: 1rem 0 0.5rem;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.03);
    padding: 0.4rem 1rem;
    border-radius: 20px;
    align-self: center;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

/* Controls */
/* Chat Area - Updated for Speaker Icons */
.chat-area {
    padding: 1.2rem;
    flex: 1;
    display: flex;
    flex-direction: column;
    justify-content: flex-end;
}

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

.speaker-icon {
    font-size: 0.9rem;
    opacity: 0.7;
    cursor: pointer;
}

/* Controls - Voice Mode Primary */
.input-area {
    padding: 1.5rem;
    display: flex;
    gap: 1rem;
    justify-content: center;
    position: relative;
    z-index: 10;
}

.mic-btn {
    flex: 1;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 28px;
    padding: 1rem 0.5rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    text-align: center;
    font-weight: 600;
    font-size: 0.85rem;
    cursor: pointer;
    transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
    gap: 0.3rem;
    height: 90px;
}

.mic-icon {
    font-size: 1.8rem;
    margin-bottom: 0.1rem;
    filter: drop-shadow(0 0 5px rgba(255, 255, 255, 0.2));
}

.mic-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(0, 0, 0, 0.3);
}

.mic-btn:active {
    transform: scale(0.98);
}

.mic-btn.en {
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.1), rgba(59, 130, 246, 0.05));
    border-color: rgba(59, 130, 246, 0.3);
    color: #93c5fd;
}

.mic-btn.es {
    background: linear-gradient(145deg, rgba(139, 92, 246, 0.1), rgba(139, 92, 246, 0.05));
    border-color: rgba(139, 92, 246, 0.3);
    color: #d8b4fe;
}

/* Mockup Nav */
.app-nav {
    display: flex;
    justify-content: space-between;
    padding: 1rem 2rem 1.5rem;
    /* Extra bottom padding for home indicator */
    background: rgba(26, 26, 32, 0.9);
    backdrop-filter: blur(15px);
    -webkit-backdrop-filter: blur(15px);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-item {
    font-size: 0.65rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 5px;
    color: var(--text-secondary);
    transition: color 0.2s;
}

.nav-item.active {
    color: var(--accent-primary);
}

.nav-item i {
    font-size: 1.2rem;
    margin-bottom: 2px;
}

/* Features */
.features {
    padding: 6rem 2rem;
    max-width: 1400px;
    margin: 0 auto;
}

.bilingual-split {
    display: flex;
    gap: 4rem;
    justify-content: space-between;
    position: relative;
    /* For divider positioning */
}

/* Vertical Divider for Features Section */
.features .bilingual-split::after {
    content: '';
    position: absolute;
    left: 50%;
    top: 2rem;
    bottom: 0;
    width: 1px;
    background: linear-gradient(to bottom, transparent, rgba(255, 255, 255, 0.1) 20%, rgba(255, 255, 255, 0.1) 80%, transparent);
    transform: translateX(-50%);
}

.bilingual-split.tight {
    gap: 2rem;
    margin-bottom: 2rem;
}

.feature-column {
    flex: 1;
}

.feature-column h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    text-align: center;
    margin-bottom: 3rem;
    min-height: 2.5em;
    /* Alignment hack */
}

/* Feature grid adjustments for split view */
.feature-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    /* Slightly smaller min card width */
    gap: 1.5rem;
}

.feature-card {
    padding: 2.5rem;
    border-radius: 24px;
    transition: transform 0.3s, background 0.3s;
}

.glass {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    backdrop-filter: blur(10px);
}

.feature-card:hover {
    transform: translateY(-5px);
    background: rgba(255, 255, 255, 0.08);
}

.icon {
    font-size: 2.5rem;
    margin-bottom: 1.5rem;
}

.feature-card h3 {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

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

/* Download Section */
.download-section {
    padding: 6rem 2rem;
    text-align: center;
}

.glass-panel {
    max-width: 800px;
    margin: 0 auto;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.05), rgba(255, 255, 255, 0.02));
    padding: 4rem 2rem;
    border-radius: 30px;
    border: 1px solid var(--glass-border);
}

.download-section h2 {
    font-family: var(--font-heading);
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
}

.waitlist-content {
    flex: 1;
    text-align: center;
    padding: 0 1rem;
}

.waitlist-content.left {
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

@media (max-width: 768px) {
    .waitlist-content.left {
        border-right: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.1);
        padding-bottom: 1rem;
        margin-bottom: 1rem;
    }
}

.download-section p {
    color: var(--text-secondary);
    margin-bottom: 2rem;
    font-size: 1.1rem;
}

.waitlist-form {
    display: flex;
    gap: 1rem;
    justify-content: center;
    flex-wrap: wrap;
    max-width: 500px;
    margin: 0 auto;
}

.glass-input {
    flex: 1;
    min-width: 250px;
    padding: 1rem 1.5rem;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--glass-border);
    border-radius: 30px;
    color: white;
    font-family: var(--font-body);
    font-size: 1rem;
    outline: none;
    transition: border-color 0.3s, background 0.3s;
}

.glass-input:focus {
    border-color: var(--accent-primary);
    background: rgba(255, 255, 255, 0.1);
}

.btn-primary.large {
    font-size: 1.1rem;
    padding: 1rem 2rem;
    border: none;
    cursor: pointer;
}

.form-success {
    margin-top: 1.5rem;
    padding: 2rem;
    background: linear-gradient(145deg, rgba(124, 58, 237, 0.1), rgba(59, 130, 246, 0.05));
    border: 1px solid rgba(139, 92, 246, 0.3);
    border-radius: 20px;
    color: white;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 1rem;
    animation: fadeIn 0.5s ease;
    text-align: center;
    box-shadow: 0 10px 30px -10px rgba(124, 58, 237, 0.3);
}

.success-icon {
    font-size: 3rem;
    background: linear-gradient(135deg, #fff 0%, #a78bfa 50%, #3b82f6 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    filter: drop-shadow(0 0 10px rgba(139, 92, 246, 0.3));
}

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

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

/* Footer */
footer {
    text-align: center;
    padding: 3rem;
    color: #555;
    font-size: 0.9rem;
    border-top: 1px solid #1a1a20;
}

/* Animations */
.fade-in-section {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
    will-change: opacity, transform;
}

.fade-in-section.visible {
    opacity: 1;
    transform: translateY(0);
}