/* ============================================
   Bigtalk Landing — Design System & Base
   ============================================ */

:root {
    /* Colors */
    --bg-primary: #06080f;
    --bg-secondary: #0d1117;
    --bg-card: rgba(255, 255, 255, 0.03);
    --bg-card-hover: rgba(255, 255, 255, 0.06);
    --bg-glass: rgba(255, 255, 255, 0.04);
    --border-subtle: rgba(255, 255, 255, 0.06);
    --border-accent: rgba(37, 211, 102, 0.3);

    --green-primary: #25D366;
    --green-light: #4ade80;
    --green-glow: rgba(37, 211, 102, 0.15);
    --green-gradient: linear-gradient(135deg, #25D366 0%, #128C7E 100%);

    --text-primary: #f0f2f5;
    --text-secondary: rgba(240, 242, 245, 0.6);
    --text-muted: rgba(240, 242, 245, 0.35);

    --amber-accent: #f59e0b;
    --blue-accent: #3b82f6;
    --purple-accent: #8b5cf6;
    --red-accent: #ef4444;

    /* Typography */
    --font-heading: 'Instrument Sans', system-ui, sans-serif;
    --font-body: 'DM Sans', system-ui, sans-serif;

    /* Spacing */
    --section-pad-y: clamp(80px, 10vw, 140px);
    --section-pad-x: clamp(20px, 5vw, 80px);
    --container-max: 1200px;

    /* Radii */
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);

    /* Theme-dependent hardcoded values */
    --navbar-scrolled-bg: rgba(6, 8, 15, 0.85);
    --mobile-nav-bg: rgba(6, 8, 15, 0.97);
    --chat-shadow: 0 25px 80px rgba(0, 0, 0, 0.5);
    --ai-card-bg: rgba(13, 17, 23, 0.92);
    --ai-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.4);
    --bubble-incoming-bg: rgba(255, 255, 255, 0.06);
    --hover-border: rgba(255, 255, 255, 0.1);
    --hover-border-strong: rgba(255, 255, 255, 0.15);
}

/* ---- Reset & Base ---- */

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

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

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

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

img {
    max-width: 100%;
    display: block;
}

/* ---- Container ---- */

.container {
    max-width: var(--container-max);
    margin: 0 auto;
    padding: 0 var(--section-pad-x);
}

/* ---- Section base ---- */

.section {
    padding: var(--section-pad-y) 0;
    position: relative;
}

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

.section-label {
    display: inline-block;
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: var(--green-primary);
    margin-bottom: 16px;
    padding: 6px 14px;
    background: var(--green-glow);
    border: 1px solid var(--border-accent);
    border-radius: 100px;
}

.section-title {
    font-family: var(--font-heading);
    font-size: clamp(32px, 4vw, 48px);
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: -0.02em;
    margin-bottom: 20px;
}

.section-subtitle {
    font-size: clamp(16px, 1.8vw, 19px);
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ---- Typography ---- */

h1, h2, h3, h4 {
    font-family: var(--font-heading);
    font-weight: 700;
    letter-spacing: -0.02em;
}

/* ============================================
   Navigation
   ============================================ */

.navbar {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    padding: 16px 0;
    transition: all 0.4s var(--ease-out-expo);
}

.navbar.scrolled {
    background: var(--navbar-scrolled-bg);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--border-subtle);
    padding: 12px 0;
}

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

.nav-logo {
    font-family: var(--font-heading);
    font-size: 22px;
    font-weight: 700;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.nav-logo .logo-icon {
    width: 32px;
    height: 32px;
    background: var(--green-gradient);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
    color: white;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 8px;
    list-style: none;
}

.nav-links a {
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    transition: all 0.25s ease;
}

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

.nav-links a.is-active {
    color: var(--text-primary);
    background: var(--bg-card-hover);
    font-weight: 600;
}

.nav-cta {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 14px;
    font-weight: 600;
    color: #fff !important;
    background: var(--green-gradient);
    padding: 10px 22px;
    border-radius: var(--radius-sm);
    transition: all 0.3s var(--ease-out-expo);
    box-shadow: 0 0 20px rgba(37, 211, 102, 0.2);
    border: none;
    cursor: pointer;
}

.nav-cta:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 30px rgba(37, 211, 102, 0.35);
}

.mobile-toggle {
    display: none;
    background: none;
    border: none;
    cursor: pointer;
    padding: 8px;
}

.mobile-toggle span {
    display: block;
    width: 22px;
    height: 2px;
    background: var(--text-primary);
    margin: 5px 0;
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* ============================================
   Hero
   ============================================ */

.hero {
    min-height: 100vh;
    display: flex;
    align-items: center;
    padding-top: 100px;
    position: relative;
    overflow: hidden;
}

/* Mesh gradient background */
.hero::before {
    content: '';
    position: absolute;
    top: -30%;
    right: -20%;
    width: 900px;
    height: 900px;
    background: radial-gradient(circle, rgba(37, 211, 102, 0.08) 0%, transparent 65%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -20%;
    left: -15%;
    width: 700px;
    height: 700px;
    background: radial-gradient(circle, rgba(59, 130, 246, 0.05) 0%, transparent 65%);
    pointer-events: none;
}

.hero .container {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    align-items: center;
    position: relative;
    z-index: 1;
}

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

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 500;
    color: var(--green-primary);
    background: var(--green-glow);
    border: 1px solid var(--border-accent);
    padding: 6px 16px;
    border-radius: 100px;
    margin-bottom: 28px;
}

.hero-badge .dot {
    width: 6px;
    height: 6px;
    background: var(--green-primary);
    border-radius: 50%;
    animation: pulse-dot 2s ease infinite;
}

@keyframes pulse-dot {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.3; }
}

.hero h1 {
    font-size: clamp(40px, 5vw, 64px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 24px;
}

.hero h1 .gradient-text {
    background: linear-gradient(135deg, var(--green-primary) 0%, var(--green-light) 50%, #6ee7b7 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.hero-description {
    font-size: clamp(16px, 1.6vw, 18px);
    color: var(--text-secondary);
    line-height: 1.7;
    margin-bottom: 40px;
}

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

.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 600;
    color: #fff;
    background: var(--green-gradient);
    padding: 16px 32px;
    border-radius: var(--radius-md);
    transition: all 0.35s var(--ease-out-expo);
    box-shadow: 0 0 40px rgba(37, 211, 102, 0.2), 0 4px 15px rgba(0,0,0,0.3);
    border: none;
    cursor: pointer;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 0 60px rgba(37, 211, 102, 0.35), 0 8px 30px rgba(0,0,0,0.3);
}

.btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-heading);
    font-size: 16px;
    font-weight: 500;
    color: var(--text-secondary);
    padding: 16px 28px;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-subtle);
    background: var(--bg-glass);
    transition: all 0.3s ease;
    cursor: pointer;
}

.btn-secondary:hover {
    color: var(--text-primary);
    border-color: var(--hover-border-strong);
    background: var(--bg-card-hover);
}

.hero-note {
    font-size: 14px;
    color: var(--text-muted);
}

/* Hero visual — chat mockup */
.hero-visual {
    position: relative;
    display: flex;
    justify-content: center;
}

.chat-mockup {
    width: 100%;
    max-width: 440px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-xl);
    padding: 24px;
    position: relative;
    box-shadow: var(--chat-shadow);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-bottom: 20px;
    border-bottom: 1px solid var(--border-subtle);
    margin-bottom: 20px;
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, #3b82f6, #6366f1);
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 14px;
    color: #fff;
}

.chat-contact {
    flex: 1;
}

.chat-contact-name {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 15px;
}

.chat-contact-status {
    font-size: 12px;
    color: var(--green-primary);
}

.chat-messages {
    display: flex;
    flex-direction: column;
    gap: 12px;
    margin-bottom: 20px;
}

.chat-bubble {
    max-width: 85%;
    padding: 12px 16px;
    border-radius: 16px;
    font-size: 14px;
    line-height: 1.5;
}

.chat-bubble.incoming {
    background: var(--bubble-incoming-bg);
    border-bottom-left-radius: 4px;
    align-self: flex-start;
}

.chat-bubble.outgoing {
    background: rgba(37, 211, 102, 0.12);
    border: 1px solid rgba(37, 211, 102, 0.15);
    border-bottom-right-radius: 4px;
    align-self: flex-end;
}

/* Floating AI cards */
.ai-card {
    position: absolute;
    background: var(--ai-card-bg);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 14px 18px;
    font-size: 13px;
    box-shadow: var(--ai-card-shadow);
    animation: float 6s ease-in-out infinite;
}

.ai-card-summary {
    top: 60px;
    right: -40px;
    border-color: var(--border-accent);
}

.ai-card-incident {
    bottom: 120px;
    left: -50px;
    animation-delay: -2s;
}

.ai-card-order {
    bottom: 30px;
    right: -30px;
    animation-delay: -4s;
}

.ai-card .card-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 28px;
    height: 28px;
    border-radius: 8px;
    margin-bottom: 8px;
    font-size: 14px;
}

.ai-card-summary .card-icon {
    background: rgba(37, 211, 102, 0.15);
}

.ai-card-incident .card-icon {
    background: rgba(245, 158, 11, 0.15);
}

.ai-card-order .card-icon {
    background: rgba(139, 92, 246, 0.15);
}

.ai-card .card-title {
    font-family: var(--font-heading);
    font-weight: 600;
    font-size: 12px;
    margin-bottom: 4px;
    color: var(--text-primary);
}

.ai-card .card-text {
    color: var(--text-secondary);
    font-size: 12px;
    line-height: 1.4;
}

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

/* ============================================
   Feature Cards (AI section)
   ============================================ */

.features-section {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border-subtle);
    border-bottom: 1px solid var(--border-subtle);
}

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

.feature-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 36px;
    transition: all 0.4s var(--ease-out-expo);
    position: relative;
    overflow: hidden;
}

.feature-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--green-gradient);
    opacity: 0;
    transition: opacity 0.4s ease;
}

.feature-card:hover {
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
    transform: translateY(-4px);
}

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

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

.feature-icon.green { background: rgba(37, 211, 102, 0.1); border: 1px solid rgba(37, 211, 102, 0.15); }
.feature-icon.amber { background: rgba(245, 158, 11, 0.1); border: 1px solid rgba(245, 158, 11, 0.15); }
.feature-icon.purple { background: rgba(139, 92, 246, 0.1); border: 1px solid rgba(139, 92, 246, 0.15); }
.feature-icon.blue { background: rgba(59, 130, 246, 0.1); border: 1px solid rgba(59, 130, 246, 0.15); }

.feature-card h3 {
    font-size: 20px;
    margin-bottom: 12px;
    line-height: 1.3;
}

.feature-card p {
    font-size: 15px;
    color: var(--text-secondary);
    line-height: 1.65;
}

/* ============================================
   WhatsApp Management Section
   ============================================ */

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

.management-grid .mgmt-card:first-child {
    grid-column: 1 / -1;
}

.mgmt-card {
    background: var(--bg-card);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    padding: 32px;
    transition: all 0.4s var(--ease-out-expo);
}

.mgmt-card:hover {
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
}

.mgmt-card .mgmt-icon {
    font-size: 28px;
    margin-bottom: 16px;
}

.mgmt-card h4 {
    font-size: 17px;
    margin-bottom: 10px;
}

.mgmt-card p {
    font-size: 14px;
    color: var(--text-secondary);
    line-height: 1.6;
}

/* Full-width lead card */
.mgmt-card.lead-card {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
    padding: 48px;
}

.mgmt-card.lead-card .lead-text h4 {
    font-size: 24px;
    margin-bottom: 14px;
}

.mgmt-card.lead-card .lead-text p {
    font-size: 16px;
}

.inbox-preview {
    background: var(--bg-primary);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 16px;
}

.inbox-row {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px;
    border-radius: var(--radius-sm);
    transition: background 0.2s ease;
}

.inbox-row:hover {
    background: var(--bg-card-hover);
}

.inbox-row + .inbox-row {
    border-top: 1px solid var(--border-subtle);
}

.inbox-avatar {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 13px;
    font-weight: 600;
    color: #fff;
    flex-shrink: 0;
}

.inbox-info {
    flex: 1;
    min-width: 0;
}

.inbox-name {
    font-family: var(--font-heading);
    font-size: 13px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-preview-text {
    font-size: 12px;
    color: var(--text-muted);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.inbox-meta {
    text-align: right;
    flex-shrink: 0;
}

.inbox-time {
    font-size: 11px;
    color: var(--text-muted);
}

.inbox-badge {
    display: inline-block;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: var(--green-primary);
    color: #000;
    font-size: 10px;
    font-weight: 700;
    line-height: 18px;
    text-align: center;
    margin-top: 4px;
}

/* ============================================
   Theme Toggle Button
   ============================================ */

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    background: var(--bg-glass);
    cursor: pointer;
    transition: all 0.25s ease;
    color: var(--text-secondary);
    padding: 0;
}

.theme-toggle:hover {
    color: var(--text-primary);
    border-color: var(--hover-border);
    background: var(--bg-card-hover);
}

.theme-toggle svg {
    width: 18px;
    height: 18px;
    transition: transform 0.3s var(--ease-out-expo);
}

.theme-toggle:hover svg {
    transform: rotate(15deg);
}

.theme-toggle .icon-sun,
.theme-toggle .icon-moon,
.theme-toggle .icon-system {
    display: none;
}

/* Show the correct icon based on data-theme-mode attribute */
[data-theme-mode="light"] .theme-toggle .icon-sun { display: block; }
[data-theme-mode="dark"] .theme-toggle .icon-moon { display: block; }
[data-theme-mode="system"] .theme-toggle .icon-system { display: block; }

/* ============================================
   Light Theme
   ============================================ */

[data-theme="light"] {
    --bg-primary: #ffffff;
    --bg-secondary: #f5f7fa;
    --bg-card: rgba(0, 0, 0, 0.03);
    --bg-card-hover: rgba(0, 0, 0, 0.06);
    --bg-glass: rgba(0, 0, 0, 0.03);
    --border-subtle: rgba(0, 0, 0, 0.08);
    --border-accent: rgba(37, 211, 102, 0.35);

    --green-glow: rgba(37, 211, 102, 0.1);

    --text-primary: #1a1d23;
    --text-secondary: rgba(26, 29, 35, 0.6);
    --text-muted: rgba(26, 29, 35, 0.4);

    --navbar-scrolled-bg: rgba(255, 255, 255, 0.85);
    --mobile-nav-bg: rgba(255, 255, 255, 0.97);
    --chat-shadow: 0 25px 80px rgba(0, 0, 0, 0.1);
    --ai-card-bg: rgba(255, 255, 255, 0.92);
    --ai-card-shadow: 0 8px 32px rgba(0, 0, 0, 0.08);
    --bubble-incoming-bg: rgba(0, 0, 0, 0.05);
    --hover-border: rgba(0, 0, 0, 0.12);
    --hover-border-strong: rgba(0, 0, 0, 0.18);
}

/* Light-mode component overrides for hardcoded values */
[data-theme="light"] .btn-primary {
    color: #fff;
}

[data-theme="light"] .nav-cta {
    color: #fff !important;
}

[data-theme="light"] .chat-mockup {
    background: var(--bg-secondary);
    border-color: var(--border-subtle);
}

[data-theme="light"] .chat-bubble.outgoing {
    background: rgba(37, 211, 102, 0.1);
    border-color: rgba(37, 211, 102, 0.2);
}

[data-theme="light"] .inbox-badge {
    color: #fff;
}

[data-theme="light"] .pricing-badge {
    color: #fff;
}

/* Smooth theme transition */
html.theme-transition,
html.theme-transition *,
html.theme-transition *::before,
html.theme-transition *::after {
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease !important;
}
