/* ==========================================================================
   CSS Variables & Theme
   ========================================================================== */
:root {
    /* Brand Colors Extracted from Logo */
    --brand-navy: #020F3A;
    --brand-royal: #3066C0;

    /* Dynamic Theme Variables - LIGHT MODE */
    --primary: var(--brand-navy);
    /* Headers, core text */
    --secondary: var(--brand-royal);
    /* Primary buttons, highlights */
    --accent: #4B86DD;
    /* Hover states */
    --light-blue: #E2ECFE;
    /* Soft backgrounds */

    /* Neutrals */
    --bg-light: #F8FAFC;
    /* Page background */
    --bg-white: #FFFFFF;
    /* Card backgrounds */
    --text-main: #1E293B;
    --text-muted: #64748B;
    --border-color: #E2E8F0;

    /* Theme-specific Overrides */
    --glass-bg: rgba(255, 255, 255, 0.85);
    --footer-bg: var(--brand-navy);
    --footer-text: #94A3B8;

    /* Typography & Spacing */
    --font-family: 'Inter', system-ui, -apple-system, sans-serif;
    --space-sm: 0.5rem;
    --space-md: 1rem;
    --space-lg: 2rem;
    --space-xl: 4rem;

    /* Shadows & Transitions */
    --transition: all 0.3s ease;
    --shadow-sm: 0 1px 3px rgba(2, 15, 58, 0.1);
    --shadow-md: 0 4px 6px -1px rgba(2, 15, 58, 0.1), 0 2px 4px -1px rgba(2, 15, 58, 0.06);
    --shadow-lg: 0 10px 15px -3px rgba(2, 15, 58, 0.1), 0 4px 6px -2px rgba(2, 15, 58, 0.05);
}

[data-theme="dark"] {
    /* Dynamic Theme Variables - DARK MODE */
    --primary: #F8FAFC;
    /* Headers become light */
    --secondary: #4B86DD;
    /* Buttons slightly lighter for contrast */
    --accent: #60A5FA;
    --light-blue: rgba(48, 102, 192, 0.15);
    /* Transparent soft blue */

    /* Neutrals */
    --bg-light: var(--brand-navy);
    /* Brand navy becomes page background */
    --bg-white: #0c1a47;
    /* Slightly lighter navy for cards */
    --text-main: #E2E8F0;
    --text-muted: #94A3B8;
    --border-color: rgba(255, 255, 255, 0.25);

    /* Theme-specific Overrides */
    --glass-bg: rgba(11, 25, 76, 0.7);
    --footer-bg: #010822;
    /* Deepest navy for footer */
    --footer-text: #94A3B8;

    /* Shadows adjusted for dark mode to create a soft backlight glow */
    --shadow-sm: 0 4px 12px rgba(255, 255, 255, 0.05);
    --shadow-md: 0 6px 16px rgba(255, 255, 255, 0.08);
    --shadow-lg: 0 10px 25px rgba(255, 255, 255, 0.12);
}

/* ==========================================================================
   Base Styles & Reset
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: var(--font-family);
    background-color: var(--bg-light);
    color: var(--text-main);
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
    transition: background-color 0.4s ease, color 0.4s ease;

    /* Beautiful Radial Glow Background */
    background-image: radial-gradient(circle at 15% 50%, var(--light-blue) 0%, transparent 60%),
        radial-gradient(circle at 85% 30%, var(--light-blue) 0%, transparent 60%);
    background-size: 100vw 100vh;
    background-attachment: fixed;
    position: relative;
    z-index: 0;
}

/* Base structural dots pattern to give it a tech/network feel */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background-image: radial-gradient(var(--border-color) 1px, transparent 1px);
    background-size: 40px 40px;
    z-index: -1;
    pointer-events: none;
    opacity: 0.7;
    transition: opacity 0.4s ease;
}

[data-theme="dark"] body::before {
    opacity: 0.3;
}

img {
    max-width: 100%;
    height: auto;
}

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

a:hover {
    color: var(--accent);
}

ul {
    list-style: none;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 var(--space-md);
}

.text-center {
    text-align: center;
}

.bg-light {
    background-color: var(--light-blue);
}

/* ==========================================================================
   Typography
   ========================================================================== */
h1,
h2,
h3,
h4 {
    color: var(--primary);
    line-height: 1.2;
    font-weight: 700;
    margin-bottom: var(--space-md);
}

h1 {
    font-size: clamp(2.5rem, 5vw, 4rem);
    letter-spacing: -0.02em;
}

h2 {
    font-size: clamp(2rem, 4vw, 2.5rem);
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.5rem;
}

p {
    margin-bottom: var(--space-md);
    color: var(--text-muted);
}

/* ==========================================================================
   Buttons
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.75rem 1.5rem;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition);
    border: none;
    font-size: 1rem;
}

.btn-primary {
    background-color: var(--secondary);
    color: var(--bg-white);
    box-shadow: var(--shadow-sm);
}

.btn-primary:hover {
    background-color: var(--accent);
    color: var(--bg-white);
    transform: translateY(-2px);
    box-shadow: var(--shadow-md);
}

.btn-secondary {
    background-color: var(--bg-white);
    color: var(--primary);
    border: 1px solid var(--border-color);
}

.btn-secondary:hover {
    background-color: var(--bg-light);
    border-color: var(--primary);
    transform: translateY(-2px);
}

.btn-large {
    padding: 1rem 2rem;
    font-size: 1.125rem;
}

/* ==========================================================================
   Navigation
   ========================================================================== */
.navbar {
    background-color: var(--glass-bg);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--border-color);
    position: sticky;
    top: 0;
    z-index: 1000;
    padding: 1rem 0;
}

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

.logo-wrapper {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    color: var(--primary);
}

.logo-image {
    height: 32px;
    width: auto;
    display: block;
}

.footer-logo {
    height: 24px;
}

.logo-text {
    font-size: 1.25rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}

.nav-links {
    display: none;
}

.mobile-menu-btn {
    display: none;
    background: transparent;
    border: none;
    font-size: 1.5rem;
    color: var(--primary);
    cursor: pointer;
    padding: 0.5rem;
}

@media (max-width: 768px) {
    .mobile-menu-btn {
        display: block;
    }

    .nav-links {
        display: none;
        position: absolute;
        top: 100%;
        right: 1rem;
        left: auto;
        width: 250px;
        background: var(--bg-white);
        flex-direction: column;
        padding: 1.5rem;
        box-shadow: 0 20px 40px rgba(2, 15, 58, 0.25);
        border: 2px solid var(--primary);
        border-radius: 12px;
        gap: 1.25rem;
        z-index: 1001;
    }
    
    .nav-links.active {
        display: flex;
    }
    
    /* Keep primary CTA visible but optimize size for mobile header */
    .nav-container .btn-primary {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
        white-space: nowrap;
    }
    
    .nav-container > div:last-child {
        gap: 0.5rem !important;
    }
}

@media (max-width: 480px) {
    .logo-text {
        display: none; /* Hide text on small screens so the CTA always fits */
    }
}

@media (min-width: 768px) {
    .nav-links {
        display: flex;
        gap: 2rem;
    }

    .nav-links a {
        color: var(--text-main);
        font-weight: 500;
    }

    .nav-links a:hover {
        color: var(--secondary);
    }
}

/* ==========================================================================
   Hero Section
   ========================================================================== */
.hero {
    padding: var(--space-xl) 0;
    overflow: hidden;
    position: relative;
    background: linear-gradient(135deg, var(--bg-light) 0%, var(--bg-white) 100%);
}

.hero-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: var(--space-xl);
    align-items: center;
}

@media (min-width: 1300px) {
    .hero-container {
        grid-template-columns: 1fr 1.1fr;
    }
}

.badge {
    display: inline-block;
    padding: 0.25rem 0.75rem;
    background-color: var(--light-blue);
    color: var(--secondary);
    border-radius: 999px;
    font-size: 0.875rem;
    font-weight: 600;
    margin-bottom: var(--space-md);
}

.highlight {
    color: var(--secondary);
    position: relative;
    display: inline-block;
}

.highlight::after {
    content: '';
    position: absolute;
    bottom: 5px;
    left: 0;
    width: 100%;
    height: 30%;
    background-color: var(--light-blue);
    z-index: -1;
    border-radius: 2px;
}

.hero-subtitle {
    font-size: 1.25rem;
    margin-bottom: var(--space-lg);
    max-width: 500px;
}

.hero-actions {
    display: flex;
    gap: 1rem;
    flex-wrap: wrap;
}

@media (max-width: 480px) {
    .hero-actions {
        flex-direction: column;
        width: 100%;
    }
    
    .hero-actions .btn {
        width: 100%;
    }
}

/* Hero Glass Card */
.hero-visual {
    position: relative;
}

/* Hero SVG Integration */
.dashboard-mockup {
    position: relative;
    width: 100%;
    margin-left: 0;
    max-width: 1200px;
    height: auto;
    z-index: 2;
    display: flex;
    justify-content: center;
    align-items: center;
}

@media (min-width: 1300px) {
    .dashboard-mockup {
        width: 110%;
        margin-left: -5%;
    }
}

.dashboard-mockup::before {
    content: '';
    position: absolute;
    width: 120%;
    height: 120%;
    background: radial-gradient(circle, var(--accent) 0%, transparent 60%);
    opacity: 0.15;
    filter: blur(60px);
    z-index: -1;
    border-radius: 50%;
}

@media (max-width: 768px) {
    .dashboard-mockup {
        margin-top: 3rem;
    }
}

.hero-screenshot {
    width: 100%;
    height: auto;
    display: block;
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 
        0 40px 80px -20px rgba(2, 15, 58, 0.25),
        0 20px 40px -10px rgba(2, 15, 58, 0.15);
}

.main-card {
    background: var(--glass-bg);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.4);
    border-radius: 16px;
    padding: 1.5rem;
    box-shadow: var(--shadow-lg);
    position: relative;
    z-index: 2;
}

.glass-header {
    display: flex;
    gap: 6px;
    margin-bottom: 1.5rem;
}

.dot {
    width: 12px;
    height: 12px;
    border-radius: 50%;
}

.dot.red {
    background-color: #EF4444;
}

.dot.yellow {
    background-color: #F59E0B;
}

.dot.green {
    background-color: #10B981;
}

.check-list li {
    position: relative;
    padding-left: 2rem;
    margin-bottom: 1rem;
    font-weight: 500;
    color: var(--primary);
}

.check-list li::before {
    content: '✓';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 24px;
    height: 24px;
    background-color: var(--light-blue);
    color: var(--secondary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.875rem;
}

/* Animated Blobs */
.decorator-blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(40px);
    opacity: 0.6;
    z-index: 1;
}

.blob-1 {
    width: 300px;
    height: 300px;
    background: var(--accent);
    top: -50px;
    right: -50px;
    animation: float 6s ease-in-out infinite;
}

.blob-2 {
    width: 250px;
    height: 250px;
    background: var(--secondary);
    bottom: -50px;
    left: -50px;
    animation: float 8s ease-in-out infinite reverse;
}

@keyframes float {
    0% {
        transform: translateY(0) scale(1);
    }

    50% {
        transform: translateY(-20px) scale(1.05);
    }

    100% {
        transform: translateY(0) scale(1);
    }
}

/* ==========================================================================
   Services Multi-Tab Section
   ========================================================================== */
.services-section {
    padding: var(--space-xl) 0;
    background-color: var(--bg-white);
}

.section-header {
    margin-bottom: var(--space-xl);
    max-width: 600px;
    margin-left: auto;
    margin-right: auto;
}

.tab-buttons {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: var(--space-xl);
    background-color: var(--bg-white);
    padding: 0.5rem;
    border-radius: 99px;
    box-shadow: var(--shadow-sm);
    max-width: fit-content;
    margin-left: auto;
    margin-right: auto;
    border: 1px solid var(--border-color);
}

.tab-btn {
    padding: 0.75rem 2rem;
    border: none;
    background: transparent;
    border-radius: 99px;
    font-weight: 600;
    font-size: 1rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: var(--transition);
}

.tab-btn.active {
    background-color: var(--primary);
    color: var(--bg-light);
    box-shadow: var(--shadow-md);
}

.tab-btn:hover:not(.active) {
    color: var(--primary);
    background-color: var(--light-blue);
}

.tab-pane {
    display: none;
    animation: fadeIn 0.4s ease-out;
}

.tab-pane.active {
    display: block;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.services-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .services-grid {
        grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    }
}

.service-card {
    background: var(--bg-white);
    border-radius: 16px;
    padding: 2rem;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
    transition: var(--transition);
    position: relative;
    display: flex;
    flex-direction: column;
}

.service-card:hover {
    transform: translateY(-5px);
    box-shadow: var(--shadow-lg);
    border-color: var(--accent);
}

.service-card.popular {
    border: 2px solid var(--secondary);
    transform: scale(1.02);
}

.service-card.popular:hover {
    transform: scale(1.02) translateY(-5px);
}

.popular-badge {
    position: absolute;
    top: -12px;
    left: 50%;
    transform: translateX(-50%);
    background: var(--secondary);
    color: white;
    padding: 0.25rem 1rem;
    border-radius: 99px;
    font-size: 0.875rem;
    font-weight: bold;
    box-shadow: var(--shadow-sm);
}

.service-icon {
    font-size: 3rem;
    margin-bottom: 1rem;
}

.price {
    font-size: 2rem;
    font-weight: 800;
    color: var(--primary);
    margin: 1rem 0;
}

.price span {
    font-size: 1rem;
    color: var(--text-muted);
    font-weight: 500;
}

.feature-list {
    margin-top: 1.5rem;
    margin-bottom: 2rem;
    flex-grow: 1;
}

.feature-list li {
    position: relative;
    padding-left: 1.5rem;
    margin-bottom: 0.75rem;
    color: var(--text-main);
    font-size: 0.95rem;
}

.feature-list li::before {
    content: '→';
    position: absolute;
    left: 0;
    color: var(--secondary);
    font-weight: bold;
}

/* ==========================================================================
   How It Works Section
   ========================================================================== */
.how-it-works-section {
    padding: var(--space-xl) 0;
}

.steps-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .steps-grid {
        grid-template-columns: repeat(3, 1fr);
    }
}

.step-card {
    background: var(--bg-white);
    padding: 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    text-align: center;
    position: relative;
    border: 1px solid var(--border-color);
}

.step-number {
    width: 48px;
    height: 48px;
    background-color: var(--secondary);
    color: white;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    font-weight: bold;
    margin: 0 auto 1.5rem auto;
    box-shadow: var(--shadow-md);
}

/* ==========================================================================
   FAQ Section
   ========================================================================== */
.faq-section {
    padding: var(--space-xl) 0;
}

.faq-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
    max-width: 800px;
    margin: 0 auto;
}

.faq-item {
    background: var(--bg-white);
    padding: 1.5rem 2rem;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid var(--border-color);
}

.faq-item h3 {
    color: var(--secondary);
    font-size: 1.25rem;
    margin-bottom: 0.75rem;
}

.faq-item p {
    margin-bottom: 0;
}

/* ==========================================================================
   Testimonials Section
   ========================================================================== */
.testimonials-section {
    padding: var(--space-xl) 0;
}

.masonry-grid {
    display: grid;
    grid-template-columns: 1fr;
    gap: 2rem;
}

@media (min-width: 768px) {
    .masonry-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

.testimonial-card {
    background: var(--bg-light);
    padding: 2rem;
    border-radius: 16px;
    position: relative;
    border: 1px solid var(--border-color);
}

.quote-icon {
    font-size: 4rem;
    line-height: 1;
    color: var(--light-blue);
    position: absolute;
    top: 1rem;
    left: 1.5rem;
    font-family: serif;
}

.testimonial-card p {
    position: relative;
    z-index: 1;
    font-style: italic;
    color: var(--text-main);
    margin-top: 1rem;
    font-size: 1.05rem;
}

.author {
    font-weight: 700;
    color: var(--primary);
    margin-top: 1rem;
    border-top: 2px solid var(--light-blue);
    padding-top: 1rem;
}

/* ==========================================================================
   Footer
   ========================================================================== */
.footer {
    background-color: var(--footer-bg);
    color: white;
    padding: var(--space-xl) 0 2rem 0;
    transition: background-color 0.4s ease;
}

.footer-container {
    display: grid;
    grid-template-columns: 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

@media (min-width: 768px) {
    .footer-container {
        grid-template-columns: 2fr 1fr;
    }
}

.footer-brand .logo-wrapper {
    color: white;
    margin-bottom: 1rem;
}

.footer-brand p {
    color: var(--footer-text);
    max-width: 300px;
}

.footer-links h4 {
    color: white;
    margin-bottom: 1.5rem;
}

.footer-links a {
    color: var(--footer-text);
    display: block;
    margin-bottom: 0.75rem;
}

.footer-links a:hover {
    color: white;
}

.footer-bottom {
    text-align: center;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    padding-top: 2rem;
    color: var(--footer-text);
    font-size: 0.875rem;
}

/* ==========================================================================
   Theme Toggle Button
   ========================================================================== */
.theme-toggle {
    background: var(--bg-white);
    border: 1px solid var(--border-color);
    border-radius: 50%;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    color: var(--secondary);
    box-shadow: 0 4px 12px rgba(2, 15, 58, 0.08);
    transition: all 0.3s ease;
    font-size: 1.25rem;
}

.theme-toggle:hover {
    background: var(--light-blue);
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px) rotate(15deg);
    box-shadow: 0 6px 16px rgba(2, 15, 58, 0.12);
}

[data-theme="dark"] .icon-moon {
    display: none;
}

[data-theme="light"] .icon-sun,
:root:not([data-theme="dark"]) .icon-sun {
    display: none;
}

/* ==========================================================================
   Contact Modal
   ========================================================================== */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(2, 15, 58, 0.8);
    backdrop-filter: blur(5px);
    -webkit-backdrop-filter: blur(5px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.modal-overlay.active {
    opacity: 1;
    visibility: visible;
}

.modal-content {
    background: var(--bg-white);
    width: 90%;
    max-width: 550px;
    padding: 2.5rem;
    border-radius: 16px;
    position: relative;
    transform: translateY(20px);
    transition: transform 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    box-shadow: var(--shadow-lg);
    border: 1px solid var(--border-color);
}

.modal-overlay.active .modal-content {
    transform: translateY(0);
}

.modal-close {
    position: absolute;
    top: 1rem;
    right: 1.5rem;
    background: none;
    border: none;
    font-size: 2rem;
    color: var(--text-muted);
    cursor: pointer;
    line-height: 1;
    padding: 0;
}

.modal-close:hover {
    color: var(--primary);
}

.contact-form .form-group {
    margin-bottom: 1.25rem;
}

.contact-form .form-group.row {
    display: flex;
    gap: 1rem;
}

@media (max-width: 480px) {
    .contact-form .form-group.row {
        flex-direction: column;
    }
}

.contact-form label {
    display: block;
    margin-bottom: 0.5rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--primary);
}

.contact-form .form-control {
    width: 100%;
    padding: 0.8rem;
    border-radius: 8px;
    border: 1px solid var(--border-color);
    background: var(--bg-light);
    color: var(--text-main);
    font-family: var(--font-family);
    transition: var(--transition);
    font-size: 1rem;
}

.contact-form .form-control:focus {
    outline: none;
    border-color: var(--secondary);
    box-shadow: 0 0 0 3px var(--light-blue);
}