/* ==========================================================================
   InstantWifi Master Stylesheet (Light & Dark Theme Support)
   ========================================================================== */

:root, [data-bs-theme="light"] {
    --bg-page: #f8fafc;
    --bg-alt: #f1f5f9;
    --bg-surface: #ffffff;
    --bg-card: #ffffff;
    --bg-card-hover: #f8fafc;
    --border-color: #e2e8f0;
    --border-subtle: #f1f5f9;
    --text-main: #0f172a;
    --text-muted: #64748b;
    --text-subtle: #94a3b8;

    --brand-primary: #2563eb;
    --brand-primary-hover: #1d4ed8;
    --brand-purple: #7c3aed;
    --brand-teal: #0d9488;
    --brand-gradient: linear-gradient(135deg, #2563eb 0%, #7c3aed 100%);
    --brand-hero-bg: linear-gradient(180deg, #eff6ff 0%, #f8fafc 100%);

    --nav-bg: rgba(255, 255, 255, 0.92);
    --nav-border: rgba(226, 232, 240, 0.8);
    --nav-link: #475569;
    --nav-link-hover: #0f172a;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.06);
    --shadow-lg: 0 12px 32px rgba(0, 0, 0, 0.08);

    --badge-bg: #eff6ff;
    --badge-border: #dbeafe;
    --badge-text: #1e40af;

    --footer-bg: #0f172a;
    --footer-text: #94a3b8;
    --footer-title: #f8fafc;
    --footer-link: #cbd5e1;
    --footer-border: #1e293b;
}

[data-bs-theme="dark"] {
    --bg-page: #0b0f19;
    --bg-alt: #111827;
    --bg-surface: #1e293b;
    --bg-card: #151d30;
    --bg-card-hover: #1c273e;
    --border-color: #334155;
    --border-subtle: #1e293b;
    --text-main: #f8fafc;
    --text-muted: #94a3b8;
    --text-subtle: #64748b;

    --brand-primary: #3b82f6;
    --brand-primary-hover: #60a5fa;
    --brand-purple: #8b5cf6;
    --brand-teal: #14b8a6;
    --brand-gradient: linear-gradient(135deg, #3b82f6 0%, #8b5cf6 100%);
    --brand-hero-bg: linear-gradient(180deg, #0b0f19 0%, #111827 100%);

    --nav-bg: rgba(11, 15, 25, 0.92);
    --nav-border: rgba(51, 65, 85, 0.8);
    --nav-link: #cbd5e1;
    --nav-link-hover: #ffffff;

    --shadow-sm: 0 1px 3px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 14px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 16px 40px rgba(0, 0, 0, 0.5);

    --badge-bg: rgba(59, 130, 246, 0.15);
    --badge-border: rgba(59, 130, 246, 0.3);
    --badge-text: #93c5fd;

    --footer-bg: #030712;
    --footer-text: #94a3b8;
    --footer-title: #f8fafc;
    --footer-link: #cbd5e1;
    --footer-border: #111827;
}

/* Base Styles */
body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-page);
    color: var(--text-main);
    transition: background-color 0.25s ease, color 0.25s ease;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    transition: color 0.2s ease, transform 0.2s ease;
}

/* Navbar */
.custom-navbar {
    background-color: var(--nav-bg);
    border-bottom: 1px solid var(--nav-border);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    padding: 0.75rem 0;
    transition: all 0.3s ease;
    z-index: 1030;
}

.custom-navbar .navbar-brand {
    color: var(--text-main);
    font-weight: 700;
    font-size: 1.25rem;
}

.custom-navbar .nav-link {
    color: var(--nav-link);
    font-size: 0.95rem;
    font-weight: 500;
    padding: 0.5rem 0.85rem;
}

.custom-navbar .nav-link:hover,
.custom-navbar .nav-link.active {
    color: var(--nav-link-hover);
}

.theme-toggle-btn {
    border-color: var(--border-color);
    color: var(--text-main);
    background-color: var(--bg-surface);
    border-radius: 8px;
    padding: 0.38rem 0.65rem;
    font-size: 0.9rem;
    transition: all 0.2s ease;
}

.theme-toggle-btn:hover {
    background-color: var(--bg-alt);
    color: var(--brand-primary);
    border-color: var(--brand-primary);
}

/* Hero Section */
.isp-hero {
    position: relative;
    padding: 120px 0 70px;
    background: var(--brand-hero-bg);
}

.eyebrow-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.35rem 0.85rem;
    border: 1px solid var(--badge-border);
    border-radius: 999px;
    background: var(--badge-bg);
    color: var(--badge-text);
    font-size: 0.82rem;
    font-weight: 600;
}

.isp-hero h1 {
    font-size: clamp(2.2rem, 4.5vw, 3.75rem);
    line-height: 1.12;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

.isp-hero .hero-lead {
    color: var(--text-muted);
    font-size: 1.1rem;
    line-height: 1.65;
    max-width: 600px;
}

.btn-brand-primary {
    background: var(--brand-gradient);
    color: #ffffff !important;
    border: none;
    font-weight: 600;
    border-radius: 8px;
    box-shadow: 0 4px 14px rgba(37, 99, 235, 0.3);
    transition: all 0.25s ease;
}

.btn-brand-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(37, 99, 235, 0.4);
    color: #ffffff;
}

.btn-brand-outline {
    border: 1px solid var(--border-color);
    background: var(--bg-surface);
    color: var(--text-main);
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.btn-brand-outline:hover {
    border-color: var(--brand-primary);
    background: var(--bg-alt);
    color: var(--brand-primary);
}

/* Dashboard Preview Component */
.platform-preview {
    border: 1px solid var(--border-color);
    border-radius: 14px;
    background: var(--bg-card);
    box-shadow: var(--shadow-lg);
    overflow: hidden;
}

.preview-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--border-color);
    background: var(--bg-alt);
}

.preview-status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    font-size: 0.78rem;
    font-weight: 600;
    color: var(--brand-teal);
    background: rgba(13, 148, 136, 0.1);
    padding: 0.25rem 0.6rem;
    border-radius: 999px;
}

.pulse-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    background-color: var(--brand-teal);
}

.preview-body {
    padding: 1.1rem;
}

.metric-tile {
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-surface);
    padding: 0.85rem;
}

.metric-label {
    font-size: 0.76rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.metric-value {
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-main);
    margin-top: 0.2rem;
}

.activity-row {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.75rem 0.85rem;
    border: 1px solid var(--border-color);
    border-radius: 10px;
    background: var(--bg-surface);
    margin-top: 0.65rem;
}

.activity-icon {
    width: 38px;
    height: 38px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--badge-bg);
    color: var(--brand-primary);
    font-size: 1rem;
    flex-shrink: 0;
}

/* Content Sections */
.section-band {
    padding: 70px 0;
}

.section-band.alt-bg {
    background-color: var(--bg-alt);
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
}

.section-kicker {
    color: var(--brand-primary);
    font-size: 0.8rem;
    font-weight: 700;
    letter-spacing: 0.08em;
    text-transform: uppercase;
}

.section-title {
    font-size: clamp(1.75rem, 3.2vw, 2.6rem);
    font-weight: 800;
    line-height: 1.2;
    color: var(--text-main);
    margin-top: 0.35rem;
}

.section-copy {
    color: var(--text-muted);
    font-size: 1rem;
    line-height: 1.65;
}

/* Feature Cards */
.feature-card {
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 1.35rem;
    box-shadow: var(--shadow-sm);
    transition: transform 0.25s ease, box-shadow 0.25s ease, border-color 0.25s ease;
}

.feature-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-md);
    border-color: var(--brand-primary);
}

.feature-icon-box {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: var(--badge-bg);
    color: var(--brand-primary);
    display: inline-flex;
    align-items: center;
    justify-content: center;
    font-size: 1.15rem;
    margin-bottom: 1rem;
}

.feature-card h3 {
    font-size: 1.05rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.5rem;
}

.feature-card p {
    color: var(--text-muted);
    font-size: 0.92rem;
    line-height: 1.55;
    margin-bottom: 0;
}

/* Workflow Step Panels */
.step-panel {
    height: 100%;
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 1.25rem;
}

.step-num {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 32px;
    height: 32px;
    border-radius: 8px;
    background: var(--brand-gradient);
    color: #ffffff;
    font-weight: 800;
    font-size: 0.9rem;
    margin-bottom: 0.85rem;
}

.step-panel h3 {
    font-size: 1rem;
    font-weight: 700;
    color: var(--text-main);
    margin-bottom: 0.4rem;
}

.step-panel p {
    color: var(--text-muted);
    font-size: 0.88rem;
    line-height: 1.55;
    margin-bottom: 0;
}

/* Insight Cards */
.insight-card {
    border: 1px solid var(--border-color);
    border-radius: 12px;
    background: var(--bg-card);
    padding: 1.25rem;
    box-shadow: var(--shadow-sm);
}

.insight-item {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 0.75rem 0;
    border-bottom: 1px solid var(--border-subtle);
    font-size: 0.9rem;
}

.insight-item:last-child {
    border-bottom: none;
}

.insight-label {
    color: var(--text-muted);
    font-weight: 500;
}

.insight-val {
    font-weight: 700;
    color: var(--text-main);
}

/* CTA Band */
.cta-band {
    padding: 60px 0;
    background: var(--brand-gradient);
    color: #ffffff;
}

.cta-band h2 {
    color: #ffffff;
    font-weight: 800;
}

.cta-band p {
    color: rgba(255, 255, 255, 0.88);
    font-size: 1.05rem;
}

/* Footer */
.footer {
    background-color: var(--footer-bg);
    color: var(--footer-text);
    padding: 60px 0 25px;
}

.footer-title {
    color: var(--footer-title);
    font-weight: 700;
    margin-bottom: 1.1rem;
}

.footer-desc {
    color: var(--footer-text);
    font-size: 0.92rem;
    line-height: 1.6;
}

.footer-link {
    color: var(--footer-link);
    font-size: 0.9rem;
    transition: color 0.2s ease;
}

.footer-link:hover {
    color: var(--brand-primary);
}

.footer-contact-list li {
    color: var(--footer-text);
    font-size: 0.9rem;
}

.social-icons a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.08);
    color: #ffffff;
    margin-right: 0.5rem;
    transition: all 0.2s ease;
}

.social-icons a:hover {
    background: var(--brand-primary);
    color: #ffffff;
}

.copyright {
    border-color: var(--footer-border) !important;
    color: var(--footer-text);
    font-size: 0.85rem;
}

/* Responsive adjustments */
@media (max-width: 991.98px) {
    .isp-hero {
        padding: 100px 0 50px;
    }
    .platform-preview {
        margin-top: 2.5rem;
    }
}

@media (max-width: 575.98px) {
    .isp-hero h1 {
        font-size: 2rem;
    }
    .hero-buttons {
        flex-direction: column;
        width: 100%;
    }
    .hero-buttons .btn {
        width: 100%;
    }
}