/* =====================================================================
   NAMOGURU — MAIN STYLESHEET
   Theme system: [data-theme="light"] and [data-theme="dark"] on <html>
   ===================================================================== */

@import url('https://fonts.googleapis.com/css2?family=Playfair+Display:wght@600;700&family=Poppins:wght@400;500;600;700&display=swap');

:root {
    --font-heading: 'Playfair Display', serif;
    --font-body: 'Poppins', sans-serif;
    --radius: 14px;
    --shadow: 0 8px 24px rgba(0,0,0,0.08);
}

[data-theme="light"] {
    --bg: #FBF7F2;
    --bg-alt: #FFFFFF;
    --text: #251A33;
    --text-muted: #6B5F7A;
    --primary: #6B21A8;
    --primary-dark: #4C1580;
    --accent: #D4AF37;
    --card-bg: #FFFFFF;
    --border: #E9E1F0;
    --success: #1E8E5A;
}

[data-theme="dark"] {
    --bg: #150F1E;
    --bg-alt: #201731;
    --text: #F3EEFA;
    --text-muted: #B3A6C4;
    --primary: #A05CE0;
    --primary-dark: #8A3FD1;
    --accent: #E8C158;
    --card-bg: #241A38;
    --border: #34273F;
    --success: #3FBF83;
}

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

body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
}

h1, h2, h3, h4 { font-family: var(--font-heading); color: var(--text); line-height: 1.25; }

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

.container { max-width: 1140px; margin: 0 auto; padding: 0 20px; }

/* ---------- HEADER ---------- */
.site-header {
    background: var(--bg-alt);
    border-bottom: 1px solid var(--border);
    position: sticky; top: 0; z-index: 100;
}
.header-inner { display: flex; align-items: center; justify-content: space-between; padding: 16px 0; }
.logo { font-family: var(--font-heading); font-size: 24px; font-weight: 700; color: var(--primary); }
.logo span { color: var(--accent); }
.nav-links { display: flex; gap: 24px; align-items: center; list-style: none; }
.nav-links a { color: var(--text); font-weight: 500; font-size: 15px; }
.nav-links a:hover { color: var(--primary); }
.header-actions { display: flex; align-items: center; gap: 12px; }

.icon-btn {
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    width: 38px; height: 38px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    cursor: pointer; font-size: 16px;
}
.icon-btn:hover { background: var(--border); }

.btn {
    display: inline-block;
    background: var(--primary);
    color: #fff !important;
    padding: 12px 26px;
    border-radius: 999px;
    font-weight: 600;
    border: none;
    cursor: pointer;
    transition: background 0.2s ease, transform 0.15s ease;
}
.btn:hover { background: var(--primary-dark); transform: translateY(-1px); }
.btn-outline {
    background: transparent;
    border: 2px solid var(--primary);
    color: var(--primary) !important;
}
.btn-gold { background: var(--accent); color: var(--primary-dark) !important; }

/* ---------- HERO ---------- */
.hero {
    padding: 90px 0 70px;
    text-align: center;
    background: radial-gradient(circle at 50% 0%, rgba(107,33,168,0.08), transparent 60%);
}
.hero h1 { font-size: 42px; max-width: 760px; margin: 0 auto 18px; }
.hero p { color: var(--text-muted); font-size: 18px; max-width: 560px; margin: 0 auto 30px; }
.hero-ctas { display: flex; gap: 16px; justify-content: center; flex-wrap: wrap; }

/* ---------- SECTIONS ---------- */
.section { padding: 70px 0; }
.section-title { text-align: center; margin-bottom: 44px; }
.section-title h2 { font-size: 32px; }
.section-title p { color: var(--text-muted); margin-top: 10px; }

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

.card {
    background: var(--card-bg);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 28px;
    box-shadow: var(--shadow);
}
.card h3 { font-size: 19px; margin-bottom: 10px; }
.card p { color: var(--text-muted); font-size: 15px; }
.card-icon {
    width: 52px; height: 52px; border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    display: flex; align-items: center; justify-content: center;
    font-size: 24px; margin-bottom: 16px; color: #fff;
}

.testimonial-card { text-align: left; }
.stars { color: var(--accent); margin-bottom: 10px; }

/* ---------- FOOTER ---------- */
.site-footer { background: var(--bg-alt); border-top: 1px solid var(--border); padding: 40px 0; margin-top: 40px; }
.footer-inner { display: flex; justify-content: space-between; flex-wrap: wrap; gap: 20px; }
.footer-inner a { color: var(--text-muted); margin-right: 16px; font-size: 14px; }

/* ---------- FORMS ---------- */
.form-page { display: flex; align-items: center; justify-content: center; min-height: 70vh; padding: 40px 20px; }
.form-card { background: var(--card-bg); border: 1px solid var(--border); border-radius: var(--radius); padding: 40px; max-width: 420px; width: 100%; box-shadow: var(--shadow); }
.form-card h2 { text-align: center; margin-bottom: 24px; }
.form-group { margin-bottom: 16px; }
.form-group label { display: block; margin-bottom: 6px; font-size: 14px; color: var(--text-muted); }
.form-group input, .form-group textarea, .form-group select {
    width: 100%; padding: 12px 14px; border: 1px solid var(--border);
    border-radius: 10px; background: var(--bg); color: var(--text); font-family: var(--font-body); font-size: 15px;
}
.form-group input:focus, .form-group textarea:focus { outline: none; border-color: var(--primary); }
.form-footer { text-align: center; margin-top: 16px; font-size: 14px; color: var(--text-muted); }
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: 14px; }
.alert-error { background: #FDE8E8; color: #B42318; }
.alert-success { background: #E3F7EC; color: #067647; }

/* ---------- LEAD FORM (landing pages) ---------- */
.lead-form { background: var(--card-bg); border-radius: var(--radius); padding: 28px; box-shadow: var(--shadow); }

/* ---------- CHAT WIDGET ---------- */
#chat-toggle {
    position: fixed; bottom: 24px; right: 24px; z-index: 999;
    background: var(--primary); color: #fff; width: 60px; height: 60px;
    border-radius: 50%; display: flex; align-items: center; justify-content: center;
    font-size: 26px; cursor: pointer; box-shadow: 0 8px 20px rgba(0,0,0,0.25); border: none;
}
#chat-box {
    position: fixed; bottom: 96px; right: 24px; width: 340px; max-width: 90vw; height: 460px;
    background: var(--card-bg); border-radius: 16px; box-shadow: 0 10px 40px rgba(0,0,0,0.25);
    display: none; flex-direction: column; overflow: hidden; z-index: 999; border: 1px solid var(--border);
}
#chat-box.open { display: flex; }
.chat-header { background: var(--primary); color: #fff; padding: 14px 16px; font-weight: 600; display: flex; justify-content: space-between; align-items: center; }
.chat-messages { flex: 1; padding: 14px; overflow-y: auto; font-size: 14px; }
.chat-msg { margin-bottom: 10px; padding: 8px 12px; border-radius: 12px; max-width: 80%; }
.chat-msg.user { background: var(--primary); color: #fff; margin-left: auto; border-bottom-right-radius: 2px; }
.chat-msg.bot, .chat-msg.agent { background: var(--bg); color: var(--text); border-bottom-left-radius: 2px; }
.chat-input-area { display: flex; border-top: 1px solid var(--border); }
.chat-input-area input { flex: 1; border: none; padding: 12px; background: transparent; color: var(--text); font-family: var(--font-body); }
.chat-input-area input:focus { outline: none; }
.chat-input-area button { background: var(--primary); color: #fff; border: none; padding: 0 18px; cursor: pointer; }

/* ---------- POPUP ---------- */
#site-popup-overlay {
    position: fixed; inset: 0; background: rgba(0,0,0,0.55); z-index: 1000;
    display: none; align-items: center; justify-content: center;
}
#site-popup-overlay.open { display: flex; }
.site-popup { background: var(--card-bg); border-radius: 16px; max-width: 420px; width: 90%; padding: 32px; text-align: center; position: relative; }
.site-popup img { max-width: 100%; border-radius: 10px; margin-bottom: 16px; }
.popup-close { position: absolute; top: 14px; right: 16px; background: none; border: none; font-size: 20px; cursor: pointer; color: var(--text-muted); }

@media (max-width: 768px) {
    .grid-3, .grid-2 { grid-template-columns: 1fr; }
    .hero h1 { font-size: 30px; }
    .nav-links { display: none; }
}
