@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700;800&family=Roboto:wght@400;500;700&display=swap');

/* ─── Design Tokens ─────────────────────────────────────── */
:root {
    --bg-primary:          #0a0d12;
    --bg-secondary:        #111520;
    --bg-card:             rgba(255,255,255,0.04);
    --primary:             #28a745;
    --primary-hover:       #22c55e;
    --primary-glow:        rgba(40, 167, 69, 0.35);
    --accent:              #3b82f6;
    --accent-glow:         rgba(59, 130, 246, 0.25);
    --text-primary:        #f0f4f8;
    --text-secondary:      #8b9ab0;
    --text-muted:          #4a5568;
    --border:              rgba(255,255,255,0.07);
    --border-glow:         rgba(40, 167, 69, 0.3);
    --glass-bg:            rgba(17, 21, 32, 0.7);
    --glass-border:        rgba(255,255,255,0.1);

    /* Legacy aliases kept for compat */
    --background-primary:  var(--bg-primary);
    --background-secondary: var(--bg-secondary);
    --primary-color:       var(--primary);
    --primary-color-hover: var(--primary-hover);
    --accent-color:        var(--accent);
    --text-color:          var(--text-primary);
    --border-color:        var(--border);
    --card-background:     var(--bg-card);
}

/* ─── Keyframes ─────────────────────────────────────────── */
@keyframes gradientShift {
    0%   { background-position: 0%   50%; }
    50%  { background-position: 100% 50%; }
    100% { background-position: 0%   50%; }
}

@keyframes pulse-glow {
    0%, 100% { box-shadow: 0 0 20px var(--primary-glow), 0 0 40px rgba(40,167,69,0.15); }
    50%       { box-shadow: 0 0 35px var(--primary-glow), 0 0 70px rgba(40,167,69,0.25); }
}

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

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(30px); }
    to   { opacity: 1; transform: translateY(0);    }
}

@keyframes scanline {
    0%   { transform: translateY(-100%); }
    100% { transform: translateY(100vh); }
}

@keyframes blink {
    0%, 100% { opacity: 1; }
    50%       { opacity: 0; }
}

@keyframes counterUp {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

/* ─── Base ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
    background-color: var(--bg-primary);
    color: var(--text-primary);
    font-family: 'Inter', 'Roboto', sans-serif;
    margin: 0;
    min-height: 100vh;
    overflow-x: hidden;
}

/* Subtle scanline overlay */
body::before {
    content: '';
    position: fixed;
    top: 0; left: 0;
    width: 100%; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    opacity: 0.6;
    animation: scanline 6s linear infinite;
    pointer-events: none;
    z-index: 9999;
}

/* ─── Typography ─────────────────────────────────────────── */
h1, h2, h3, h4, h5, h6 {
    color: var(--text-primary);
    font-family: 'Inter', sans-serif;
    font-weight: 700;
    letter-spacing: -0.02em;
}

h1 { font-weight: 800; }

p { line-height: 1.7; }

a {
    color: var(--primary);
    text-decoration: none;
    transition: color 0.3s ease;
}

a:hover {
    color: var(--primary-hover);
    text-decoration: none;
}

/* ─── Navbar ─────────────────────────────────────────────── */
.navbar {
    background: var(--glass-bg) !important;
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border-bottom: 1px solid var(--glass-border);
    padding: 12px 0;
    position: sticky;
    top: 0;
    z-index: 1000;
    transition: background 0.3s ease;
}

.navbar-brand {
    color: var(--text-primary) !important;
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 700;
    font-size: 1.3rem;
    letter-spacing: -0.03em;
}

.navbar-brand img.brand-logo {
    width: 36px;
    height: 36px;
    border-radius: 8px;
    object-fit: contain;
    filter: drop-shadow(0 0 6px var(--primary-glow));
    transition: filter 0.3s ease, transform 0.3s ease;
}

.navbar-brand:hover img.brand-logo {
    filter: drop-shadow(0 0 12px var(--primary-glow));
    transform: scale(1.05);
}

.brand-name {
    color: var(--text-primary);
}

.brand-name .brand-accent {
    color: var(--primary);
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.9rem;
}

.nav-link:hover {
    color: var(--primary) !important;
}

.dropdown-menu {
    background: var(--glass-bg);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: 12px;
    box-shadow: 0 20px 60px rgba(0,0,0,0.5);
}

.dropdown-item {
    color: var(--text-secondary) !important;
    font-size: 0.9rem;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.2s ease;
}

.dropdown-item:hover {
    background: rgba(40,167,69,0.1);
    color: var(--primary) !important;
}

/* ─── Buttons ────────────────────────────────────────────── */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), #22c55e);
    color: #000;
    border: none;
    padding: 13px 32px;
    border-radius: 8px;
    font-weight: 700;
    font-size: 0.95rem;
    letter-spacing: 0.01em;
    transition: all 0.3s ease;
    animation: pulse-glow 3s ease-in-out infinite;
    position: relative;
    overflow: hidden;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: -50%; left: -60%;
    width: 40%; height: 200%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transform: skew(-15deg);
    transition: left 0.5s ease;
}

.btn-primary:hover::before { left: 130%; }

.btn-primary:hover {
    background: linear-gradient(135deg, var(--primary-hover), #16a34a);
    color: #000;
    transform: translateY(-2px);
    box-shadow: 0 10px 40px var(--primary-glow);
    animation: none;
}

.btn-secondary {
    background: transparent;
    color: var(--text-primary);
    border: 1px solid var(--border);
    padding: 13px 32px;
    border-radius: 8px;
    font-weight: 600;
    transition: all 0.3s ease;
    backdrop-filter: blur(10px);
}

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

/* ─── Cards ──────────────────────────────────────────────── */
.card {
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease, border-color 0.3s ease;
    backdrop-filter: blur(10px);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(135deg, rgba(40,167,69,0.03) 0%, transparent 60%);
    pointer-events: none;
}

.card:hover {
    transform: translateY(-6px);
    border-color: var(--border-glow);
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        0 0 30px var(--primary-glow),
        inset 0 1px 0 rgba(255,255,255,0.05);
}

.card-body {
    position: relative;
    z-index: 1;
}

/* ─── Sections ───────────────────────────────────────────── */
section { padding: 80px 0; }

/* ─── Hero Section ───────────────────────────────────────── */
.hero-section {
    background:
        radial-gradient(ellipse at 20% 50%, rgba(40,167,69,0.08) 0%, transparent 60%),
        radial-gradient(ellipse at 80% 20%, rgba(59,130,246,0.06) 0%, transparent 50%),
        radial-gradient(ellipse at 60% 80%, rgba(40,167,69,0.04) 0%, transparent 40%),
        var(--bg-primary);
    min-height: calc(100vh - 70px);
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}

.hero-section::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(40,167,69,0.04) 1px, transparent 1px),
        linear-gradient(90deg, rgba(40,167,69,0.04) 1px, transparent 1px);
    background-size: 60px 60px;
    mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
    -webkit-mask-image: radial-gradient(ellipse at center, black 30%, transparent 80%);
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    background: rgba(40,167,69,0.12);
    border: 1px solid rgba(40,167,69,0.25);
    color: var(--primary);
    padding: 6px 16px;
    border-radius: 100px;
    font-size: 0.82rem;
    font-weight: 600;
    letter-spacing: 0.05em;
    text-transform: uppercase;
    margin-bottom: 24px;
}

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

.hero-title {
    font-size: clamp(2.2rem, 5vw, 3.5rem);
    line-height: 1.15;
    font-weight: 800;
    margin-bottom: 24px;
}

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

.typing-container {
    min-height: 1.5em;
    color: var(--text-secondary);
    font-size: 1.1rem;
    font-weight: 400;
    margin-bottom: 8px;
}

.typing-cursor {
    display: inline-block;
    width: 2px; height: 1.1em;
    background: var(--primary);
    margin-left: 2px;
    vertical-align: middle;
    animation: blink 1s step-end infinite;
}

/* ─── Hero Orb Visual ────────────────────────────────────── */
.hero-visual {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 380px;
}

.ai-orb {
    width: 280px;
    height: 280px;
    border-radius: 50%;
    background: radial-gradient(ellipse at 35% 35%,
        rgba(40,167,69,0.15) 0%,
        rgba(59,130,246,0.05) 50%,
        transparent 70%);
    border: 1px solid rgba(40,167,69,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    animation: float 5s ease-in-out infinite;
    box-shadow:
        0 0 60px rgba(40,167,69,0.12),
        0 0 120px rgba(40,167,69,0.05),
        inset 0 0 60px rgba(40,167,69,0.04);
}

.ai-orb::before {
    content: '';
    position: absolute;
    inset: -20px;
    border-radius: 50%;
    border: 1px solid rgba(40,167,69,0.08);
    animation: float 7s ease-in-out infinite reverse;
}

.ai-orb::after {
    content: '';
    position: absolute;
    inset: -40px;
    border-radius: 50%;
    border: 1px dashed rgba(40,167,69,0.05);
    animation: float 9s ease-in-out infinite;
}

.orb-icon {
    font-size: 90px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 0 20px var(--primary-glow));
}

.orb-ring {
    position: absolute;
    border-radius: 50%;
    border: 1px solid;
    animation: float 4s ease-in-out infinite;
}

/* ─── Stats Bar ──────────────────────────────────────────── */
.stats-bar {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    padding: 40px 0;
    position: relative;
    overflow: hidden;
}

.stats-bar::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

.stat-item {
    text-align: center;
    opacity: 0;
    transform: translateY(10px);
    transition: opacity 0.5s ease, transform 0.5s ease;
}

.stat-item.animate-in {
    opacity: 1;
    transform: translateY(0);
    animation: counterUp 0.6s ease forwards;
}

.stat-number {
    font-size: 2.5rem;
    font-weight: 800;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    line-height: 1.1;
    display: block;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 0.85rem;
    font-weight: 500;
    margin-top: 4px;
    letter-spacing: 0.03em;
}

.stat-divider {
    width: 1px;
    height: 60px;
    background: var(--border);
    margin: auto;
}

/* ─── Feature Cards ──────────────────────────────────────── */
.feature-icon-wrapper {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    background: rgba(40,167,69,0.1);
    border: 1px solid rgba(40,167,69,0.2);
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 20px;
    transition: all 0.3s ease;
}

.feature-icon-wrapper i {
    font-size: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.card:hover .feature-icon-wrapper {
    background: rgba(40,167,69,0.2);
    box-shadow: 0 0 20px var(--primary-glow);
    transform: scale(1.08);
}

/* ─── Tech Card ──────────────────────────────────────────── */
.tech-card {
    text-align: center;
    padding: 40px 30px;
}

.tech-icon-wrapper {
    width: 80px;
    height: 80px;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    transition: all 0.3s ease;
}

.tech-icon-wrapper.whatsapp {
    background: rgba(37,211,102,0.1);
    border: 1px solid rgba(37,211,102,0.2);
}

.tech-icon-wrapper.telegram {
    background: rgba(0,136,204,0.1);
    border: 1px solid rgba(0,136,204,0.2);
}

.card:hover .tech-icon-wrapper.whatsapp {
    box-shadow: 0 0 30px rgba(37,211,102,0.3);
    transform: scale(1.05);
}

.card:hover .tech-icon-wrapper.telegram {
    box-shadow: 0 0 30px rgba(0,136,204,0.3);
    transform: scale(1.05);
}

/* ─── Section Titles ─────────────────────────────────────── */
.section-label {
    display: inline-block;
    color: var(--primary);
    font-size: 0.78rem;
    font-weight: 700;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    margin-bottom: 12px;
}

.section-title {
    font-size: clamp(1.7rem, 3vw, 2.4rem);
    margin-bottom: 16px;
}

/* ─── Scroll Animations ──────────────────────────────────── */
.fade-in-up {
    opacity: 0;
    transform: translateY(30px);
    transition: opacity 0.6s ease, transform 0.6s ease;
}

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

/* ─── CTA Section ────────────────────────────────────────── */
.cta-section {
    background:
        radial-gradient(ellipse at 50% 0%, rgba(40,167,69,0.1) 0%, transparent 60%),
        var(--bg-secondary);
    border-top: 1px solid var(--border);
    border-bottom: 1px solid var(--border);
    position: relative;
    overflow: hidden;
}

.cta-section::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

/* ─── Contact Form ───────────────────────────────────────── */
.contact-form label {
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    margin-bottom: 6px;
}

.contact-form .form-control {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-radius: 10px;
    padding: 12px 16px;
    font-size: 0.95rem;
    transition: border-color 0.3s ease, box-shadow 0.3s ease, background 0.3s ease;
    backdrop-filter: blur(8px);
}

.contact-form .form-control:focus {
    background: rgba(255,255,255,0.06);
    border-color: var(--primary);
    color: var(--text-primary);
    box-shadow: 0 0 0 3px var(--primary-glow);
    outline: none;
}

.contact-form .form-control::placeholder {
    color: var(--text-muted);
}

.contact-success {
    text-align: center;
    padding: 60px 0;
}

/* ─── Footer ─────────────────────────────────────────────── */
footer {
    background: var(--bg-secondary);
    border-top: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 24px 0;
    position: relative;
}

footer::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
}

/* ─── Legacy Chameleon Logo Support ──────────────────────── */
.chameleon-logo {
    width: 32px; height: 32px;
    color: var(--primary);
    transition: transform 0.3s ease;
}

.chameleon-logo:hover { transform: scale(1.1); }

/* ─── Utilities ──────────────────────────────────────────── */
.text-gradient {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.bg-dark-card { background: var(--bg-card); }

/* ─── Examples / Chat Demo ───────────────────────────────── */
@keyframes typingBounce {
    0%, 80%, 100% { transform: translateY(0);   opacity: 0.5; }
    40%            { transform: translateY(-6px); opacity: 1;   }
}

@keyframes msgSlideIn {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: translateY(0);    }
}

.examples-tabs {
    max-width: 780px;
    margin: 0 auto;
}

.examples-tab-nav {
    display: flex;
    gap: 8px;
    margin-bottom: 0;
    flex-wrap: wrap;
}

.ex-tab-btn {
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border);
    color: var(--text-secondary);
    padding: 10px 20px;
    border-radius: 10px 10px 0 0;
    font-size: 0.88rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s ease;
    font-family: 'Inter', sans-serif;
    letter-spacing: 0.01em;
    border-bottom: none;
}

.ex-tab-btn:hover {
    color: var(--primary);
    background: rgba(40,167,69,0.07);
}

.ex-tab-btn.active {
    background: rgba(40,167,69,0.1);
    border-color: rgba(40,167,69,0.3);
    color: var(--primary);
    border-bottom: 1px solid rgba(40,167,69,0.1);
}

.ex-tab-panel {
    display: none;
}

.ex-tab-panel.active {
    display: block;
    animation: fadeInUp 0.35s ease forwards;
}

/* Chat Window */
.chat-window {
    background: var(--bg-secondary);
    border: 1px solid rgba(40,167,69,0.2);
    border-radius: 0 16px 16px 16px;
    overflow: hidden;
    box-shadow:
        0 20px 60px rgba(0,0,0,0.4),
        0 0 40px rgba(40,167,69,0.06);
}

.chat-header {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    background: rgba(40,167,69,0.06);
    border-bottom: 1px solid var(--border);
}

.chat-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 2px solid var(--primary);
    overflow: hidden;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(40,167,69,0.12);
    flex-shrink: 0;
    box-shadow: 0 0 12px var(--primary-glow);
}

.chat-avatar img {
    width: 28px;
    height: 28px;
    object-fit: contain;
}

.chat-name {
    font-weight: 700;
    font-size: 0.95rem;
    color: var(--text-primary);
}

.chat-status {
    font-size: 0.78rem;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 5px;
}

.online-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    display: inline-block;
    animation: pulse-glow 2s ease-in-out infinite;
}

.chat-badge {
    background: rgba(40,167,69,0.12);
    border: 1px solid rgba(40,167,69,0.25);
    color: var(--primary);
    font-size: 0.72rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    padding: 3px 10px;
    border-radius: 100px;
}

.chat-body {
    padding: 20px;
    min-height: 340px;
    max-height: 340px;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 12px;
    scroll-behavior: smooth;
}

.chat-body::-webkit-scrollbar { width: 4px; }
.chat-body::-webkit-scrollbar-track { background: transparent; }
.chat-body::-webkit-scrollbar-thumb { background: var(--border); border-radius: 4px; }

/* Message bubbles */
.chat-msg {
    display: flex;
    flex-direction: column;
    animation: msgSlideIn 0.3s ease forwards;
}

.chat-msg.user {
    align-items: flex-end;
}

.chat-msg.ai {
    align-items: flex-start;
}

.chat-bubble {
    max-width: 78%;
    padding: 11px 16px;
    border-radius: 16px;
    font-size: 0.88rem;
    line-height: 1.55;
    white-space: pre-wrap;
}

.chat-msg.user .chat-bubble {
    background: linear-gradient(135deg, var(--primary), #22c55e);
    color: #000;
    font-weight: 500;
    border-bottom-right-radius: 4px;
}

.chat-msg.ai .chat-bubble {
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    color: var(--text-primary);
    border-bottom-left-radius: 4px;
}

.chat-msg-time {
    font-size: 0.7rem;
    color: var(--text-muted);
    margin-top: 4px;
    padding: 0 4px;
}

/* Typing indicator */
.typing-indicator {
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 12px 16px;
    background: rgba(255,255,255,0.05);
    border: 1px solid var(--border);
    border-radius: 16px;
    border-bottom-left-radius: 4px;
    width: fit-content;
}

.typing-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background: var(--primary);
    animation: typingBounce 1.2s ease-in-out infinite;
}

.typing-dot:nth-child(2) { animation-delay: 0.15s; }
.typing-dot:nth-child(3) { animation-delay: 0.30s; }

/* Chat input preview */
.chat-input-preview {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 14px 20px;
    border-top: 1px solid var(--border);
    background: rgba(255,255,255,0.02);
}

/* Highlight tokens inside ai messages */
.chat-bubble strong {
    color: var(--primary);
}

.chat-bubble .tag-ok   { color: #22c55e; }
.chat-bubble .tag-warn { color: #f59e0b; }
.chat-bubble .tag-err  { color: #ef4444; }

/* ─── Responsive ─────────────────────────────────────────── */
@media (max-width: 768px) {
    .hero-section { min-height: auto; padding: 60px 0; }
    .ai-orb { width: 200px; height: 200px; }
    .orb-icon { font-size: 64px; }
    .stat-divider { display: none; }
    .stats-bar .row { gap: 24px; }

    .ex-tab-btn { font-size: 0.78rem; padding: 8px 13px; }
    .chat-body { min-height: 280px; max-height: 280px; }
    .chat-bubble { max-width: 90%; font-size: 0.84rem; }
}