:root {
    --primary-navy: #141E44;
    --primary-blue: #3060B0;
    --secondary-blue: #2050A0;
    --primary-green: #3C7F5C;
    --light-bg: #F5F8FF;
    --white: #FFFFFF;
    --text-dark: #1a1a1a;
    --text-gray: #666666;
    --shadow-card: 0 4px 12px rgba(0,0,0,0.08);
    --font-main: 'Overpass', sans-serif;
}

/* Reset & Global */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-main);
    color: var(--text-dark);
    line-height: 1.6;
    background-color: var(--white);
}

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

h1, h2, h3, h4 {
    font-weight: 700;
    color: var(--primary-navy);
}

section {
    padding: 80px 0;
}

/* Buttons */
.btn {
    display: inline-flex;
    /* Changed from inline-block to inline-flex */
    align-items: center;
    /* Vertically center the text */
    justify-content: center;
    /* Horizontally center if needed, good for single line */
    padding: 12px 24px;
    border-radius: 8px;
    text-decoration: none;
    font-weight: 600;
    transition: all 0.3s ease;
    cursor: pointer;
    border: none;
    font-size: 1rem;
    /* other existing styles */
}

.btn-primary {
    background: linear-gradient(135deg, var(--primary-blue), var(--secondary-blue));
    color: var(--white);
    box-shadow: 0 4px 10px rgba(48, 96, 176, 0.3);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 15px rgba(48, 96, 176, 0.4);
}

.btn-secondary {
    border: 2px solid var(--primary-blue);
    color: var(--primary-blue);
    background: transparent;
}

.btn-secondary:hover {
    background-color: rgba(48, 96, 176, 0.1);
}

.btn-block {
    display: block;
    width: 100%;
}

/* Navigation */
nav {
    position: fixed;
    top: 0;
    width: 100%;
    z-index: 1000;
    padding: 15px 0;
    transition: background-color 0.3s ease, box-shadow 0.3s ease;
}

nav.scrolled {
    background-color: var(--white);
    box-shadow: 0 2px 10px rgba(0,0,0,0.1);
}

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

.logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-weight: 800;
    font-size: 1.5rem;
    color: var(--primary-navy);
}

.nav-links {
    list-style: none;
    display: flex;
    gap: 30px;
}

.nav-links a {
    text-decoration: none;
    color: var(--primary-navy);
    font-weight: 500;
    transition: color 0.2s;
}

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

.mobile-menu-btn {
    display: none;
    background: none;
    border: none;
    font-size: 1.5rem;
    color: var(--primary-navy);
}

/* Hero Section */
.hero-section {
    padding-top: 140px;
    padding-bottom: 80px;
    background: linear-gradient(to bottom, var(--white), var(--light-bg));
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
    align-items: center;
}

.hero-content h1 {
    font-size: 3.5rem;
    line-height: 1.1;
    margin-bottom: 20px;
    color: var(--primary-navy);
}

.hero-sub {
    font-size: 1.25rem;
    color: var(--text-gray);
    margin-bottom: 30px;
}

.hero-buttons {
    display: flex;
    gap: 15px;
}

.mockup-placeholder {
    width: 100%;
    height: 400px;
    background-color: #ddd;
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #888;
    border: 2px dashed #aaa;
}

/* Features */
.features-section {
    background-color: var(--white);
}

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

.feature-card {
    padding: 30px;
    background: var(--light-bg);
    border-radius: 12px;
    text-align: center;
    transition: transform 0.3s;
}

.feature-card:hover {
    transform: translateY(-5px);
}

.icon-circle {
    width: 60px;
    height: 60px;
    background-color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 20px;
    color: var(--primary-blue);
    font-size: 1.5rem;
    box-shadow: 0 4px 8px rgba(0,0,0,0.05);
}

/* How It Works */
.how-section {
    background-color: var(--light-bg);
}

.section-title {
    text-align: center;
    font-size: 2.5rem;
    margin-bottom: 50px;
}

.steps-container {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 40px;
    margin-bottom: 60px;
}

.step {
    text-align: center;
}

.step-number {
    width: 40px;
    height: 40px;
    background-color: var(--primary-navy);
    color: var(--white);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: bold;
    margin: 0 auto 15px;
}

/* Math Formula Box */
.math-box {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border-left: 5px solid var(--primary-blue);
    box-shadow: var(--shadow-card);
    max-width: 800px;
    margin: 0 auto;
}

.formula-block {
    background-color: #f4f4f4;
    padding: 20px;
    border-radius: 8px;
    font-family: 'Courier New', monospace;
    margin: 20px 0;
    text-align: center;
    font-weight: bold;
    color: var(--primary-navy);
}

.formula-sub {
    font-size: 0.9rem;
    color: var(--text-gray);
    margin-top: 10px;
    font-weight: normal;
}

.math-legend {
    list-style: none;
    font-size: 0.9rem;
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 10px;
}

/* Calculator */
.calculator-section {
    background-color: var(--white);
}

.calculator-wrapper {
    background-color: var(--light-bg);
    padding: 40px;
    border-radius: 16px;
    box-shadow: var(--shadow-card);
}

.calculator-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 40px;
}

.form-group {
    margin-bottom: 20px;
}

.full-width {
    grid-column: 1 / -1;
}

label {
    display: block;
    margin-bottom: 8px;
    font-weight: 600;
    color: var(--primary-navy);
}

input, select {
    width: 100%;
    padding: 12px;
    border: 1px solid #ddd;
    border-radius: 6px;
    font-family: inherit;
    font-size: 1rem;
}

.radio-group {
    display: flex;
    gap: 20px;
    flex-wrap: wrap;
}

.radio-group label {
    font-weight: 400;
    display: flex;
    align-items: center;
    gap: 5px;
    cursor: pointer;
}

.results-card {
    background: var(--white);
    padding: 30px;
    border-radius: 12px;
    border: 2px solid var(--primary-blue);
    display: flex;
    flex-direction: column;
    justify-content: center;
    transition: opacity 0.3s;
}

.hidden {
    display: none;
}

.result-row {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-size: 1.1rem;
}

.result-total {
    margin-top: 20px;
    text-align: center;
    background: var(--light-bg);
    padding: 20px;
    border-radius: 8px;
}

.result-total span:first-child {
    display: block;
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-gray);
}

#res-savings {
    display: block;
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary-green);
}

.highlight-blue { color: var(--primary-blue); font-weight: 700; }
.disclaimer { font-size: 0.8rem; color: #999; margin-top: 15px; text-align: center; }

/* Download Section */
.download-section {
    background-color: var(--primary-navy);
    color: var(--white);
}

.download-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: center;
}

.download-badge h2 { color: var(--white); margin-bottom: 20px; }

.app-store-link {
    text-decoration: none;
    pointer-events: none; /* Per prompt instructions until live */
}

.app-store-placeholder {
    background: #000;
    color: #fff;
    padding: 10px 20px;
    border-radius: 8px;
    display: inline-flex;
    align-items: center;
    gap: 10px;
    border: 1px solid #444;
    font-size: 0.9rem;
}

.app-store-placeholder i { font-size: 1.8rem; }

.setup-list {
    margin: 20px 0;
    padding-left: 20px;
}

.setup-list li { margin-bottom: 10px; }

.tip-box {
    background: rgba(255,255,255,0.1);
    padding: 15px;
    border-radius: 8px;
    display: flex;
    gap: 15px;
    align-items: flex-start;
}

.tip-box i { color: #FFD700; margin-top: 4px; }

/* Why/Benefits */
.benefits-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 30px;
}

.benefit-item {
    padding: 20px;
    border-left: 4px solid var(--primary-green);
    background: var(--light-bg);
}

/* FAQ */
.accordion-item {
    border-bottom: 1px solid #ddd;
}

.accordion-header {
    width: 100%;
    padding: 20px 0;
    background: none;
    border: none;
    text-align: left;
    font-size: 1.1rem;
    font-weight: 600;
    color: var(--primary-navy);
    cursor: pointer;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.accordion-header::after {
    content: '+';
    font-size: 1.5rem;
    transition: transform 0.3s;
}

.accordion-header.active::after {
    transform: rotate(45deg);
}

.accordion-content {
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.3s ease-out;
}

.accordion-content p {
    padding-bottom: 20px;
    color: var(--text-gray);
}

/* Contact */
.contact-form {
    max-width: 600px;
    margin: 0 auto 40px;
}

.contact-form textarea { width: 100%; padding: 12px; border: 1px solid #ddd; border-radius: 6px; font-family: inherit; }

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

/* Footer */
footer {
    background-color: var(--primary-navy);
    color: #ccc;
    padding: 60px 0 20px;
}

.footer-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 40px;
    margin-bottom: 40px;
}

.footer-col h4 { color: var(--white); margin-bottom: 20px; }

.footer-col ul { list-style: none; }

.footer-col ul li { margin-bottom: 10px; }

.footer-col a { color: #ccc; text-decoration: none; transition: color 0.2s; }

.footer-col a:hover { color: var(--white); }

.copyright {
    text-align: center;
    border-top: 1px solid rgba(255,255,255,0.1);
    padding-top: 20px;
    font-size: 0.9rem;
}

/* Animation Classes */
.fade-in {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.6s ease-out, transform 0.6s ease-out;
}

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

.delay-100 { transition-delay: 0.1s; }
.delay-200 { transition-delay: 0.2s; }

/* Media Queries */
@media (max-width: 768px) {
    .hero-grid, .calculator-grid, .download-grid {
        grid-template-columns: 1fr;
    }
    
    .hero-content h1 { font-size: 2.5rem; }
    
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        background-color: var(--white);
        flex-direction: column;
        width: 100%;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0,0,0,0.1);
        transition: right 0.3s ease;
    }
    
    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }
    
    .hero-section { padding-top: 100px; }
}

/* --- Fix for Radio Buttons --- */
input[type="radio"] {
    width: auto;
    /* Don't stretch to 100% */
    margin: 0;
    /* Reset margins */
    margin-right: 8px;
    /* Add small space between button and text */
    cursor: pointer;
}

.radio-group label {
    display: inline-flex;
    /* Keep label and button on same line */
    align-items: center;
    margin-right: 15px;
    /* Space between the options */
    white-space: nowrap;
    /* Stop "Plug-in Hybrid" from breaking into 2 lines */
    cursor: pointer;
}

/* --- Footer Branding Layout Match --- */
.footer-branding-container {
    display: flex;
    /* Use flexbox for horizontal logo and vertical tagline */
    flex-direction: column;
    align-items: flex-start;
    /* Align logo and tagline to the left */
}

.footer-branding-container .logo {
    display: flex;
    /* Keep logo and text horizontal */
    align-items: center;
    gap: 10px;
    font-size: 1.5rem;
    /* Ensure logo text size */
    margin-bottom: 5px;
    /* Space between logo and tagline */
}

.footer-tagline {
    color: #ccc;
    /* Match existing footer text color */
    font-size: 0.9rem;
    /* Adjust size if needed */
    margin-top: 0;
    /* Remove default paragraph margin */
}

/* --- Footer Branding Fix --- */
.footer-brand-wrapper {
    display: flex;
    align-items: center;
    /* Vertically center the icon with the text block */
    gap: 15px;
    /* Space between Shield and Text */
}

.footer-logo-img {
    height: 50px;
    /* Slightly larger to match the 2 lines of text */
    width: auto;
}

.footer-text-group {
    display: flex;
    flex-direction: column;
    /* Stack Name and Tagline vertically */
    align-items: flex-start;
    /* Align them to the left */
    justify-content: center;
}

.footer-text-group .brand-name {
    font-size: 1.5rem;
    font-weight: 800;
    color: white;
    line-height: 1.1;
    /* Tighter spacing between name and tagline */
}

.footer-text-group .tagline {
    font-size: 0.9rem;
    color: #ccc;
    /* Keep generic color as requested */
    margin: 0;
    font-weight: 500;
}

/* --- Button Vertical Center Fix --- */
/* Update your existing .btn class with these flex properties */
.btn {
    display: inline-flex !important;
    /* Force flex layout */
    align-items: center;
    justify-content: center;
    height: auto;
    line-height: 1;
    /* Crucial: Reset line-height to prevent font shifting */
    padding: 14px 24px;
    /* Adjusted padding for balance */
}

/* --- Hero Image Overlap & 3D Tilt --- */
.hero-image {
    position: relative;
    /* Container for absolute positioning */
    width: 100%;
    max-width: 500px;
    /* Adjust max-width of the container as needed */
    height: 450px;
    /* Give it enough height to contain both phones */
    display: flex;
    /* Helps in initial centering */
    justify-content: center;
    align-items: center;
    margin: 0 auto;
    /* Center the whole group */
}

.hero-image .phone-mockup {
    position: absolute;
    /* Allows precise overlapping */
    width: 100%;
    max-width: 300px;
    /* Base size for the phones */
    height: auto;
    filter: drop-shadow(0 20px 40px rgba(20, 30, 68, 0.3));
    /* Deeper shadow for 3D effect */
    border-radius: 40px;
    /* Keep consistent with iPhone curves */
    transition: all 0.5s ease;
    /* Smooth transitions for hover/animations */
}

/* Front Phone (Dashboard) */
.hero-image .phone-mockup.front {
    z-index: 2;
    /* Bring to front */
    transform:
        translateY(0px)
        /* Initial position */
        translateX(0px) scale(1.1)
        /* Slightly larger */
        perspective(1000px)
        /* Enable 3D perspective */
        rotateY(-10deg)
        /* Tilt slightly */
        rotateX(5deg);
    /* Tilt slightly */
    animation: floatFront 6s ease-in-out infinite;
    /* Floating animation */
}

/* Back Phone (Reports) */
.hero-image .phone-mockup.back {
    z-index: 1;
    /* Keep behind front phone */
    transform:
        translateY(30px)
        /* Push down */
        translateX(-30px)
        /* Push left */
        scale(0.9)
        /* Slightly smaller */
        perspective(1000px)
        /* Enable 3D perspective */
        rotateY(10deg)
        /* Tilt opposite direction */
        rotateX(-5deg);
    /* Tilt opposite direction */
    animation: floatBack 6s ease-in-out infinite;
    /* Floating animation */
}

/* --- Floating Animations (Adjust as desired) --- */
@keyframes floatFront {
    0% {
        transform: translateY(0px) translateX(0px) scale(1.1) perspective(1000px) rotateY(-10deg) rotateX(5deg);
    }

    50% {
        transform: translateY(-15px) translateX(5px) scale(1.1) perspective(1000px) rotateY(-8deg) rotateX(4deg);
    }

    100% {
        transform: translateY(0px) translateX(0px) scale(1.1) perspective(1000px) rotateY(-10deg) rotateX(5deg);
    }
}

@keyframes floatBack {
    0% {
        transform: translateY(30px) translateX(-30px) scale(0.9) perspective(1000px) rotateY(10deg) rotateX(-5deg);
    }

    50% {
        transform: translateY(15px) translateX(-35px) scale(0.9) perspective(1000px) rotateY(12deg) rotateX(-6deg);
    }

    100% {
        transform: translateY(30px) translateX(-30px) scale(0.9) perspective(1000px) rotateY(10deg) rotateX(-5deg);
    }
}

/* Responsive adjustments for smaller screens */
/* Responsive adjustments for smaller screens */
@media (max-width: 768px) {

    /* 1. Fix the Hero Grid layout */
    .hero-grid {
        grid-template-columns: 1fr;
        /* Stack content vertically */
        gap: 20px;
        /* Add space between text and images */
    }

    /* 2. Resize text so it doesn't dominate */
    .hero-content h1 {
        font-size: 2.5rem;
        text-align: center;
    }

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

    .hero-buttons {
        justify-content: center;
        /* Center the buttons */
        margin-bottom: 20px;
        /* Add breathing room before the phone */
    }

    /* 3. CONTROL THE PHONES ON MOBILE */
    .hero-image {
        height: 380px;
        /* Force specific height container */
        margin-top: 30px;
        /* Push it down away from the buttons */
        max-width: 100%;
    }

    .hero-image .phone-mockup {
        max-width: 200px;
        /* LIMIT WIDTH: This is the key fix! */
        position: absolute;
        /* Keep absolute to maintain overlap */
        left: 50%;
        /* Center horizontally... */
        margin-left: -100px;
        /* ...half of width to perfectly center */
    }

    /* Adjust Front Phone Position */
    .hero-image .phone-mockup.front {
        /* Simple tilt, no floating up */
        transform: translateY(0) translateX(-20px) rotateY(-5deg);
        animation: none;
        /* Disable animation to save battery/space */
        z-index: 2;
    }

    /* Adjust Back Phone Position */
    .hero-image .phone-mockup.back {
        /* Peek out from the right */
        transform: translateY(30px) translateX(20px) scale(0.9) rotateY(5deg);
        animation: none;
        z-index: 1;
    }

    /* Navbar Fix */
    .nav-links {
        position: fixed;
        top: 70px;
        right: -100%;
        background-color: var(--white);
        flex-direction: column;
        width: 100%;
        padding: 20px;
        box-shadow: 0 4px 10px rgba(0, 0, 0, 0.1);
        transition: right 0.3s ease;
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-menu-btn {
        display: block;
    }

    .hero-section {
        padding-top: 100px;
    }

        /* ... existing mobile styles ... */
    
        /* Add the pointer cursor so users know it's clickable */
        .hero-image {
            cursor: pointer;
        }
    
        /* --- THE FLIP LOGIC --- */
    
        /* When flipped, the FRONT image moves to the BACK position */
        .hero-image.flipped .phone-mockup.front {
            transform: translateY(30px) translateX(20px) scale(0.9) rotateY(5deg);
            z-index: 1;
            /* Move behind */
        }
    
        /* When flipped, the BACK image moves to the FRONT position */
        .hero-image.flipped .phone-mockup.back {
            transform: translateY(0) translateX(-20px) rotateY(-5deg);
            z-index: 2;
            /* Move forward */
        }
        /* End of media query */
}