/* ============================================================
   LANDING PAGE STYLES — Chama Lenders (Mobile-First Modern UI)
   Covers: index.php, install.php, login pages
   ============================================================ */

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

html {
    scroll-behavior: smooth;
    -webkit-tap-highlight-color: transparent;
}

html, body {
    min-height: 100%;
    overflow-x: hidden;
}

/* ── Design Tokens ────────────────────────────────────────── */
:root {
    /* Fonts */
    --font-heading: 'Outfit', 'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;
    --font-body:    'Plus Jakarta Sans', system-ui, -apple-system, sans-serif;

    /* Palette (Vibrant Indigo & Emerald & Amber) */
    --clr-primary:     #4f46e5;
    --clr-primary-light:#6366f1;
    --clr-primary-dark: #4338ca;
    --clr-secondary:   #0d9488;
    --clr-accent:      #f59e0b;
    --clr-accent-light:#fbbf24;
    --clr-success:     #10b981;
    --clr-danger:      #ef4444;
    --clr-warning:     #f59e0b;

    /* Light Theme Surfaces & Borders */
    --bg:              #f8fafc;
    --surface:         #ffffff;
    --surface-alt:     #f1f5f9;
    --surface-glass:   rgba(255, 255, 255, 0.85);
    --border:          rgba(226, 232, 240, 0.9);
    --border-strong:   rgba(203, 213, 225, 0.8);
    --shadow-sm:       0 2px 8px rgba(15, 23, 42, 0.04);
    --shadow:          0 10px 30px -5px rgba(15, 23, 42, 0.08);
    --shadow-lg:       0 20px 40px -10px rgba(15, 23, 42, 0.12);
    --shadow-glow:     0 0 25px rgba(79, 70, 229, 0.25);

    /* Light Theme Text */
    --text:            #0f172a;
    --text-muted:      #64748b;
    --text-subtle:     #94a3b8;
    --text-on-dark:    #ffffff;

    /* Font Size Scale (JS controlled html[data-font]) */
    --fs-xs:     0.75rem;   /* 12px */
    --fs-sm:     0.875rem;  /* 14px */
    --fs-base:   1rem;      /* 16px */
    --fs-md:     1.125rem;  /* 18px */
    --fs-lg:     1.25rem;   /* 20px */
    --fs-xl:     1.5rem;    /* 24px */
    --fs-2xl:    1.875rem;  /* 30px */
    --fs-3xl:    2.25rem;   /* 36px */
    --fs-4xl:    3rem;      /* 48px */

    /* Spacing & Radii */
    --radius-sm:  8px;
    --radius:     14px;
    --radius-lg:  24px;
    --radius-xl:  32px;
    --nav-h:      72px;
}

/* Font-size presets applied to <html> */
html[data-font="small"]  { font-size: 14px; }
html[data-font="medium"] { font-size: 16px; }
html[data-font="large"]  { font-size: 18px; }

/* ── Dark Theme Overrides ────────────────────────────────── */
body.dark-theme {
    --bg:              #090d16;
    --surface:         #111827;
    --surface-alt:     #1f2937;
    --surface-glass:   rgba(17, 24, 39, 0.88);
    --border:          rgba(255, 255, 255, 0.08);
    --border-strong:   rgba(255, 255, 255, 0.16);
    --shadow-sm:       0 2px 8px rgba(0, 0, 0, 0.3);
    --shadow:          0 10px 30px -5px rgba(0, 0, 0, 0.4);
    --shadow-lg:       0 25px 50px -12px rgba(0, 0, 0, 0.6);
    --shadow-glow:     0 0 30px rgba(99, 102, 241, 0.35);

    --text:            #f8fafc;
    --text-muted:      #94a3b8;
    --text-subtle:     #64748b;

    --clr-primary:     #6366f1;
    --clr-primary-light:#818cf8;
    --clr-secondary:   #14b8a6;
}

/* ── Typography & Global Elements ────────────────────────── */
body {
    font-family: var(--font-body);
    font-size: var(--fs-base);
    background: var(--bg);
    color: var(--text);
    line-height: 1.6;
    transition: background 0.3s ease, color 0.3s ease;
    padding-bottom: 70px; /* Space for mobile sticky bottom bar */
}

@media (min-width: 769px) {
    body { padding-bottom: 0; }
}

h1, h2, h3, h4, h5, h6 {
    font-family: var(--font-heading);
    line-height: 1.2;
    font-weight: 700;
    color: var(--text);
}

h1 { font-size: var(--fs-4xl); font-weight: 800; letter-spacing: -0.02em; }
h2 { font-size: var(--fs-3xl); font-weight: 700; letter-spacing: -0.01em; }
h3 { font-size: var(--fs-xl); font-weight: 700; }

p { font-size: var(--fs-base); color: var(--text-muted); }
small, .text-sm { font-size: var(--fs-sm); }

a { color: var(--clr-primary); text-decoration: none; transition: all 0.2s ease; }
a:hover { text-decoration: none; opacity: 0.9; }

.gradient-text {
    background: linear-gradient(135deg, #6366f1 0%, #a855f7 50%, #ec4899 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Layout Container ────────────────────────────────────── */
.container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
}

/* ── Navbar (Sticky Glassmorphic Header) ──────────────────── */
.navbar {
    position: fixed;
    top: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: var(--surface-glass);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    z-index: 950;
    transition: all 0.3s ease;
}

.navbar.scrolled {
    box-shadow: var(--shadow);
}

.nav-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.nav-brand {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--text);
}

.brand-icon {
    width: 40px;
    height: 40px;
    border-radius: 12px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 18px;
    box-shadow: 0 4px 12px rgba(79, 70, 229, 0.3);
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 6px;
}

.nav-links a {
    padding: 8px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    transition: all 0.2s ease;
}

.nav-links a:hover {
    background: var(--surface-alt);
    color: var(--clr-primary);
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 10px;
}

/* Mobile Drawer Hamburger Button */
.mobile-menu-toggle {
    display: none;
    width: 40px;
    height: 40px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    font-size: 18px;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: all 0.2s ease;
}

.mobile-menu-toggle:hover {
    background: var(--surface-alt);
}

/* ── Mobile Slide-out Drawer ─────────────────────────────── */
.drawer-backdrop {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(15, 23, 42, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1000;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.drawer-backdrop.active {
    display: block;
    opacity: 1;
}

.mobile-drawer {
    position: fixed;
    top: 0;
    right: -300px;
    width: 280px;
    height: 100%;
    background: var(--surface);
    z-index: 1010;
    box-shadow: var(--shadow-lg);
    display: flex;
    flex-direction: column;
    padding: 24px 20px;
    transition: right 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-drawer.active {
    right: 0;
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border);
    margin-bottom: 20px;
}

.drawer-close {
    width: 36px;
    height: 36px;
    border-radius: 50%;
    border: none;
    background: var(--surface-alt);
    color: var(--text);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 16px;
}

.drawer-nav {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.drawer-nav a {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: var(--radius-sm);
    font-weight: 600;
    color: var(--text);
    font-size: var(--fs-base);
}

.drawer-nav a:hover,
.drawer-nav a.active {
    background: var(--surface-alt);
    color: var(--clr-primary);
}

.drawer-nav a i {
    width: 20px;
    color: var(--clr-primary);
}

/* ── Buttons ────────────────────────────────────────────── */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 10px 22px;
    border-radius: 50px;
    border: none;
    cursor: pointer;
    font-family: var(--font-body);
    font-size: var(--fs-sm);
    font-weight: 600;
    text-decoration: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    white-space: nowrap;
    min-height: 44px; /* Touch friendly */
}

.btn:hover {
    transform: translateY(-2px);
    text-decoration: none;
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-primary-dark));
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(79, 70, 229, 0.35);
}

.btn-primary:hover {
    box-shadow: 0 8px 24px rgba(79, 70, 229, 0.5);
    color: #ffffff;
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.15);
    color: #ffffff;
    border: 1px solid rgba(255, 255, 255, 0.3);
    backdrop-filter: blur(8px);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.25);
    color: #ffffff;
}

.btn-outline {
    background: transparent;
    border: 1.5px solid var(--border-strong);
    color: var(--text);
}

.btn-outline:hover {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
}

.btn-accent {
    background: linear-gradient(135deg, var(--clr-accent), #d97706);
    color: #ffffff;
    box-shadow: 0 4px 16px rgba(245, 158, 11, 0.35);
}

.btn-accent:hover {
    box-shadow: 0 8px 24px rgba(245, 158, 11, 0.5);
}

.btn-lg {
    padding: 14px 28px;
    font-size: var(--fs-base);
    min-height: 52px;
}

.btn-block { width: 100%; justify-content: center; }

/* ── Hero Section ────────────────────────────────────────── */
.hero {
    padding: calc(var(--nav-h) + 40px) 0 70px;
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    color: #ffffff;
    position: relative;
    overflow: hidden;
}

.hero::before {
    content: '';
    position: absolute;
    top: -100px;
    right: -100px;
    width: 450px;
    height: 450px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.25) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.hero::after {
    content: '';
    position: absolute;
    bottom: -150px;
    left: -100px;
    width: 500px;
    height: 500px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(20, 184, 166, 0.2) 0%, rgba(0, 0, 0, 0) 70%);
    pointer-events: none;
}

.hero-container {
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 40px;
    align-items: center;
    position: relative;
    z-index: 2;
}

.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px;
    border-radius: 50px;
    background: rgba(99, 102, 241, 0.15);
    border: 1px solid rgba(99, 102, 241, 0.35);
    color: #a5b4fc;
    font-size: var(--fs-xs);
    font-weight: 700;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    margin-bottom: 20px;
}

.hero-badge i {
    color: var(--clr-accent-light);
}

.hero-content h1 {
    font-size: clamp(2rem, 4.5vw, 3.25rem);
    color: #ffffff;
    margin-bottom: 18px;
    line-height: 1.15;
}

.hero-subtitle {
    font-size: var(--fs-md);
    color: #cbd5e1;
    margin-bottom: 30px;
    line-height: 1.65;
    max-width: 540px;
}

.hero-cta-group {
    display: flex;
    align-items: center;
    gap: 14px;
    flex-wrap: wrap;
    margin-bottom: 36px;
}

.hero-stats-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
    padding-top: 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.12);
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.stat-value {
    font-family: var(--font-heading);
    font-size: var(--fs-xl);
    font-weight: 800;
    color: #ffffff;
}

.stat-value span { color: var(--clr-accent-light); }

.stat-label {
    font-size: var(--fs-xs);
    color: #94a3b8;
    font-weight: 500;
}

/* ── Interactive Loan Calculator Widget (Hero Card) ──────── */
.calc-card {
    background: rgba(30, 41, 59, 0.75);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: var(--radius-lg);
    padding: 30px 24px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5), var(--shadow-glow);
    color: #ffffff;
}

.calc-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
}

.calc-header h3 {
    font-size: var(--fs-md);
    color: #ffffff;
    display: flex;
    align-items: center;
    gap: 8px;
}

.calc-badge {
    padding: 4px 10px;
    border-radius: 50px;
    background: rgba(16, 185, 129, 0.2);
    border: 1px solid rgba(16, 185, 129, 0.4);
    color: #6ee7b7;
    font-size: 11px;
    font-weight: 700;
}

.calc-group {
    margin-bottom: 22px;
}

.calc-label-row {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 10px;
}

.calc-label {
    font-size: var(--fs-sm);
    color: #94a3b8;
    font-weight: 600;
}

.calc-value {
    font-family: var(--font-heading);
    font-size: var(--fs-lg);
    font-weight: 800;
    color: var(--clr-accent-light);
}

/* Custom Styled Range Slider */
.calc-slider {
    width: 100%;
    height: 8px;
    border-radius: 4px;
    background: rgba(255, 255, 255, 0.15);
    outline: none;
    -webkit-appearance: none;
    appearance: none;
    cursor: pointer;
}

.calc-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--clr-primary-light);
    border: 3px solid #ffffff;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.4);
    cursor: pointer;
    transition: transform 0.15s ease;
}

.calc-slider::-webkit-slider-thumb:hover {
    transform: scale(1.15);
}

.calc-results {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: var(--radius);
    padding: 16px;
    margin-bottom: 20px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 12px;
}

.res-item {
    display: flex;
    flex-direction: column;
}

.res-label {
    font-size: 11px;
    color: #94a3b8;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.res-value {
    font-family: var(--font-heading);
    font-size: var(--fs-md);
    font-weight: 800;
    color: #ffffff;
}

.res-value.highlight {
    color: #34d399;
    font-size: var(--fs-lg);
}

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

.section-header {
    text-align: center;
    margin-bottom: 50px;
}

.section-tag {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 50px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--clr-primary);
    font-size: var(--fs-xs);
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    margin-bottom: 12px;
}

body.dark-theme .section-tag {
    background: rgba(99, 102, 241, 0.18);
    color: var(--clr-primary-light);
}

.section-header h2 {
    font-size: clamp(1.75rem, 3.5vw, 2.5rem);
    margin-bottom: 14px;
}

.section-header p {
    font-size: var(--fs-md);
    max-width: 600px;
    margin: 0 auto;
}

/* ── Stepper ("How It Works") ────────────────────────────── */
.stepper-section {
    background: var(--surface);
    border-bottom: 1px solid var(--border);
}

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

.step-card {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 32px 24px;
    position: relative;
    transition: all 0.3s ease;
}

.step-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--clr-primary-light);
}

.step-number {
    position: absolute;
    top: 20px;
    right: 20px;
    font-family: var(--font-heading);
    font-size: var(--fs-2xl);
    font-weight: 800;
    color: var(--text-subtle);
    opacity: 0.4;
}

.step-icon {
    width: 56px;
    height: 56px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--clr-primary), var(--clr-secondary));
    color: #ffffff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    margin-bottom: 20px;
    box-shadow: 0 8px 20px rgba(79, 70, 229, 0.25);
}

.step-card h3 {
    font-size: var(--fs-lg);
    margin-bottom: 10px;
}

.step-card p {
    font-size: var(--fs-sm);
    line-height: 1.6;
}

/* ── Features & Benefits Section ────────────────────────── */
.features-section {
    background: var(--bg);
}

.features-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
}

.feature-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 28px;
    transition: all 0.3s ease;
    display: flex;
    flex-direction: column;
}

.feature-card:hover {
    transform: translateY(-6px);
    box-shadow: var(--shadow);
    border-color: var(--clr-primary-light);
}

.feature-icon-wrap {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: rgba(79, 70, 229, 0.1);
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 20px;
    margin-bottom: 18px;
}

body.dark-theme .feature-icon-wrap {
    background: rgba(99, 102, 241, 0.18);
    color: var(--clr-primary-light);
}

.feature-card h3 {
    font-size: var(--fs-md);
    margin-bottom: 8px;
}

.feature-card p {
    font-size: var(--fs-sm);
    line-height: 1.65;
}

/* ── Chameleon Chama Banner ─────────────────────────────── */
.chama-banner {
    background: linear-gradient(135deg, var(--clr-primary-dark) 0%, #1e1b4b 100%);
    border-radius: var(--radius-xl);
    padding: 44px 36px;
    color: #ffffff;
    margin-top: 50px;
    display: grid;
    grid-template-columns: 1.2fr 0.8fr;
    gap: 30px;
    align-items: center;
}

.chama-banner h3 {
    font-size: var(--fs-2xl);
    color: #ffffff;
    margin-bottom: 12px;
}

.chama-banner p {
    color: #cbd5e1;
    margin-bottom: 24px;
}

.chama-features-list {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.chama-features-list li {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: var(--fs-sm);
    color: #e2e8f5;
}

.chama-features-list i {
    color: #34d399;
}

/* ── FAQ Section (Mobile Accordion) ──────────────────────── */
.faq-section {
    background: var(--surface);
    border-top: 1px solid var(--border);
}

.faq-accordion {
    max-width: 800px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 14px;
}

.faq-item {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    overflow: hidden;
    transition: border-color 0.2s ease;
}

.faq-item.active {
    border-color: var(--clr-primary-light);
}

.faq-question {
    width: 100%;
    padding: 18px 20px;
    background: none;
    border: none;
    color: var(--text);
    font-family: var(--font-heading);
    font-size: var(--fs-base);
    font-weight: 700;
    text-align: left;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    cursor: pointer;
}

.faq-icon {
    width: 28px;
    height: 28px;
    border-radius: 50%;
    background: var(--surface);
    color: var(--clr-primary);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 12px;
    flex-shrink: 0;
    transition: transform 0.3s ease;
}

.faq-item.active .faq-icon {
    transform: rotate(180deg);
    background: var(--clr-primary);
    color: #ffffff;
}

.faq-answer {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.35s cubic-bezier(0, 1, 0, 1), padding 0.3s ease;
    padding: 0 20px;
}

.faq-item.active .faq-answer {
    max-height: 500px;
    padding: 0 20px 20px 20px;
}

.faq-answer p {
    font-size: var(--fs-sm);
    color: var(--text-muted);
    line-height: 1.65;
}

/* ── CTA Banner ─────────────────────────────────────────── */
.cta-section {
    padding: 80px 0;
    background: linear-gradient(135deg, #0f172a 0%, #1e1b4b 100%);
    color: #ffffff;
    text-align: center;
}

.cta-box {
    max-width: 640px;
    margin: 0 auto;
}

.cta-box h2 {
    color: #ffffff;
    font-size: var(--fs-3xl);
    margin-bottom: 14px;
}

.cta-box p {
    color: #cbd5e1;
    font-size: var(--fs-md);
    margin-bottom: 28px;
}

/* ── Footer ─────────────────────────────────────────────── */
.footer {
    background: var(--surface);
    border-top: 1px solid var(--border);
    padding: 60px 0 30px;
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr repeat(3, 1fr);
    gap: 40px;
    margin-bottom: 40px;
}

.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 12px;
}

.footer-brand .nav-brand {
    font-size: var(--fs-lg);
}

.footer-brand p {
    font-size: var(--fs-sm);
    max-width: 280px;
}

.footer-column h4 {
    font-size: var(--fs-sm);
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text);
    margin-bottom: 16px;
}

.footer-links {
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.footer-links a {
    color: var(--text-muted);
    font-size: var(--fs-sm);
}

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

.footer-contact-item {
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-muted);
    font-size: var(--fs-sm);
    margin-bottom: 8px;
}

.footer-contact-item i {
    color: var(--clr-primary);
}

.footer-bottom {
    border-top: 1px solid var(--border);
    padding-top: 24px;
    text-align: center;
    color: var(--text-muted);
    font-size: var(--fs-xs);
}

/* ── Mobile Sticky Bottom CTA Bar ────────────────────────── */
.mobile-bottom-bar {
    display: none;
}

@media (max-width: 768px) {
    .mobile-bottom-bar {
        display: flex;
        align-items: center;
        gap: 10px;
        position: fixed;
        bottom: 0;
        left: 0;
        right: 0;
        height: 66px;
        padding: 10px 16px;
        background: var(--surface-glass);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid var(--border);
        z-index: 990;
        box-shadow: 0 -4px 20px rgba(0, 0, 0, 0.1);
    }

    .mobile-bottom-bar .btn {
        flex: 1;
        min-height: 44px;
    }

    .mobile-call-btn {
        width: 44px;
        height: 44px;
        border-radius: 50%;
        background: var(--surface-alt);
        border: 1px solid var(--border);
        color: var(--clr-primary);
        display: flex;
        align-items: center;
        justify-content: center;
        font-size: 16px;
        flex-shrink: 0;
    }
}

/* ── Dots Settings Menu (Landing & Auth pages) ───────────── */
.dots-menu { position: relative; }

.dots-btn {
    width: 40px; height: 40px;
    border-radius: 50%;
    border: 1px solid var(--border);
    background: var(--surface);
    color: var(--text);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    font-size: 16px;
    transition: all 0.2s ease;
}

.dots-btn:hover { background: var(--surface-alt); }

.dots-dropdown {
    display: none;
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    min-width: 200px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    box-shadow: var(--shadow-lg);
    z-index: 1000;
    overflow: hidden;
    padding: 8px 0;
}

.dots-dropdown.open { display: block; }

.dots-section-label {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--text-subtle);
    padding: 8px 16px 4px;
}

.dots-item {
    display: flex;
    align-items: center;
    gap: 10px;
    width: 100%;
    padding: 10px 16px;
    background: none;
    border: none;
    color: var(--text);
    font-size: var(--fs-sm);
    cursor: pointer;
    text-align: left;
    transition: background 0.15s;
}

.dots-item:hover { background: var(--surface-alt); }
.dots-item.active { color: var(--clr-primary); font-weight: 700; }
.dots-item i { width: 18px; text-align: center; color: var(--text-muted); }
.dots-item.active i { color: var(--clr-primary); }

.dots-divider { border: none; border-top: 1px solid var(--border); margin: 6px 0; }

/* Font Size Pill Button Group (Matches logged-in dropdown style) */
.font-size-group {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 6px 14px 10px;
}

.font-size-btn {
    flex: 1;
    height: 38px;
    border-radius: 8px;
    border: 1px solid var(--border-strong);
    background: var(--surface-alt);
    color: var(--text);
    font-family: var(--font-heading);
    font-weight: 800;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.font-size-btn[data-size="small"]  { font-size: 13px; }
.font-size-btn[data-size="medium"] { font-size: 16px; }
.font-size-btn[data-size="large"]  { font-size: 19px; }

.font-size-btn:hover,
.font-size-btn.active {
    border-color: var(--clr-primary);
    color: var(--clr-primary);
    background: rgba(79, 70, 229, 0.15);
    box-shadow: 0 0 0 2px rgba(79, 70, 229, 0.2);
}

/* ── Auth / Login / Install Page Rules ───────────────────── */
body.auth-page {
    padding-bottom: 0 !important;
    min-height: 100vh;
    background: linear-gradient(145deg, #0f172a 0%, #1e1b4b 50%, #0f172a 100%);
    display: flex;
    flex-direction: column;
}

body.auth-page .container {
    width: 100%;
    max-width: 1240px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    flex-direction: column;
    flex: 1;
}

body.auth-page .login-container {
    flex: 1;
    padding: calc(var(--nav-h) + 40px) 20px 40px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    min-height: auto;
}

body.auth-page .footer-bottom {
    position: static !important;
    bottom: auto !important;
    width: 100%;
    padding: 24px 0;
    margin-top: auto;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    background: transparent;
    text-align: center;
    color: var(--text-muted);
}

.login-box {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    width: 100%;
    max-width: 440px;
    box-shadow: var(--shadow-lg);
    position: relative;
}

.login-box h2 {
    text-align: center;
    font-size: var(--fs-2xl);
    color: var(--text);
    margin-bottom: 6px;
}

.login-box h3 {
    text-align: center;
    font-size: var(--fs-sm);
    color: var(--text-muted);
    font-weight: 500;
    margin-bottom: 28px;
}

.login-box .theme-toggle {
    position: absolute;
    top: 16px;
    right: 16px;
}

.install-page {
    min-height: 100vh;
    padding: calc(var(--nav-h) + 40px) 0 60px;
    background: var(--bg);
}

.install-box {
    max-width: 680px;
    margin: 0 auto;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: var(--radius-lg);
    padding: 40px 32px;
    box-shadow: var(--shadow-lg);
    text-align: center;
}

.install-box h1 { font-size: var(--fs-2xl); color: var(--text); margin-bottom: 10px; }
.install-subtitle { color: var(--text-muted); margin-bottom: 28px; }

.install-details {
    background: var(--surface-alt);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    margin: 20px 0;
    text-align: left;
}

.install-details h3 { color: var(--text); margin-bottom: 10px; }
.install-details ul { list-style: none; }
.install-details li { color: var(--text); margin-bottom: 6px; font-size: var(--fs-sm); }

.install-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
    justify-content: center;
    margin-top: 24px;
}

/* Forms (shared auth) */
.form-group { margin-bottom: 20px; }

.form-group label {
    display: block;
    font-weight: 600;
    font-size: var(--fs-sm);
    color: var(--text);
    margin-bottom: 6px;
}

.form-group input,
.form-group select,
.form-group textarea {
    width: 100%;
    padding: 12px 16px;
    border: 1.5px solid var(--border);
    border-radius: var(--radius-sm);
    background: var(--surface-alt);
    color: var(--text);
    font-family: var(--font-body);
    font-size: var(--fs-base);
    transition: all 0.2s ease;
    outline: none;
}

.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
    border-color: var(--clr-primary);
    box-shadow: 0 0 0 3px rgba(79, 70, 229, 0.18);
}

.pw-wrap {
    position: relative;
    display: flex;
    align-items: center;
}

.pw-wrap input {
    padding-right: 48px !important;
}

.pw-toggle {
    position: absolute;
    right: 10px;
    top: 50%;
    transform: translateY(-50%);
    width: 34px;
    height: 34px;
    border-radius: 8px;
    border: 1px solid var(--border);
    background: var(--surface-alt);
    color: var(--text-muted);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 14px;
    transition: all 0.2s ease;
}

.pw-toggle:hover {
    background: var(--clr-primary);
    color: #ffffff;
    border-color: var(--clr-primary);
}

/* Alerts */
.alert {
    padding: 14px 18px;
    border-radius: var(--radius-sm);
    font-size: var(--fs-sm);
    margin-bottom: 20px;
    border: 1px solid transparent;
}

.alert-success { background: #e8f8f0; border-color: #a3e6c0; color: #1a5c38; }
.alert-error   { background: #fdecea; border-color: #f5c2c7; color: #842029; }
.alert-info    { background: #e8f0fe; border-color: #a8c4f8; color: #1a3a7c; }

body.dark-theme .alert-success { background: rgba(16,185,129,0.12); border-color: rgba(16,185,129,0.3); color: #a8f0c8; }
body.dark-theme .alert-error   { background: rgba(239,68,68,0.12);   border-color: rgba(239,68,68,0.3);   color: #ffb4b4; }
body.dark-theme .alert-info    { background: rgba(99,102,241,0.12); border-color: rgba(99,102,241,0.3);  color: #b4c8ff; }

/* ── Responsive Media Queries ────────────────────────────── */
@media (max-width: 992px) {
    .hero-container {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

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

    .hero-cta-group,
    .hero-stats-grid {
        justify-content: center;
    }

    .chama-banner {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .chama-features-list li {
        justify-content: center;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }
}

@media (max-width: 768px) {
    .nav-links { display: none; }
    .mobile-menu-toggle { display: flex; }

    .nav-container {
        padding: 0 12px;
        gap: 6px;
    }

    .nav-brand {
        font-size: 0.95rem;
        gap: 6px;
    }

    .brand-icon {
        width: 32px;
        height: 32px;
        font-size: 14px;
        border-radius: 8px;
    }

    .nav-actions {
        gap: 6px;
    }

    .nav-actions .btn {
        padding: 6px 12px;
        font-size: 13px;
        min-height: 36px;
    }

    .dots-btn,
    .mobile-menu-toggle {
        width: 36px;
        height: 36px;
        font-size: 15px;
    }

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

    .hero {
        padding: calc(var(--nav-h) + 24px) 0 50px;
    }

    .calc-card {
        padding: 22px 18px;
    }

    .footer-content {
        grid-template-columns: 1fr;
        gap: 30px;
        text-align: center;
    }

    .footer-brand { align-items: center; }
    .footer-brand p { text-align: center; }
    .footer-contact-item { justify-content: center; }
}

@media (max-width: 480px) {
    .hero-stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }

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

    .hero-cta-group .btn {
        width: 100%;
    }

    .calc-results {
        grid-template-columns: 1fr;
    }
}
