/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    --primary-color: #0F172A;
    /* Deep Navy */
    --secondary-color: #1E293B;
    /* Lighter Navy */
    --accent-color: #38BDF8;
    /* Electric Blue */
    --accent-glow: rgba(56, 189, 248, 0.4);
    --highlight-color: #818CF8;
    /* Soft Purple */
    --text-light: #F8FAFC;
    --text-dim: #94A3B8;
    --white: #ffffff;
    --glass-bg: rgba(30, 41, 59, 0.7);
    --glass-border: rgba(255, 255, 255, 0.1);
    --transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    --font-main: 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --spacing-section: 100px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--primary-color);
    color: var(--text-light);
    line-height: 1.6;
    overflow-x: hidden;
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITY CLASSES
   ========================================= */
.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
}

.section-title {
    text-align: center;
    margin-bottom: 60px;
}

.section-title h2 {
    font-size: 3rem;
    background: linear-gradient(to right, var(--accent-color), var(--highlight-color));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin-bottom: 15px;
    letter-spacing: -1px;
}

.section-title p {
    color: var(--text-dim);
    font-size: 1.1rem;
    max-width: 600px;
    margin: 0 auto;
}

.btn {
    display: inline-block;
    padding: 15px 35px;
    background: linear-gradient(45deg, var(--accent-color), var(--highlight-color));
    color: var(--primary-color);
    font-weight: 700;
    border-radius: 50px;
    box-shadow: 0 10px 20px -5px var(--accent-glow);
    position: relative;
    overflow: hidden;
    z-index: 1;
    border: none;
    cursor: pointer;
    font-size: 1rem;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 0%;
    height: 100%;
    background: var(--white);
    transition: var(--transition);
    z-index: -1;
    opacity: 0.2;
}

.btn:hover::before {
    width: 100%;
}

.btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 15px 30px -5px var(--accent-glow);
}

/* Scroll Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 0.8s ease-out;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.main-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    background: rgba(15, 23, 42, 0.85);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--glass-border);
    padding: 20px 0;
    transition: var(--transition);
}

.main-header.scrolled {
    padding: 10px 0;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    filter: brightness(0) invert(1);
    /* Ensures white logo if image is dark */
}

.nav-links {
    display: flex;
    gap: 30px;
}

.nav-links li a {
    font-weight: 500;
    font-size: 1rem;
    position: relative;
}

.nav-links li a::after {
    content: '';
    position: absolute;
    width: 0;
    height: 2px;
    bottom: -5px;
    left: 0;
    background-color: var(--accent-color);
    transition: var(--transition);
}

.nav-links li a:hover::after {
    width: 100%;
}

.nav-links li a:hover {
    color: var(--accent-color);
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
    padding-top: 80px;
}

.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 20% 50%, rgba(56, 189, 248, 0.15), transparent 40%),
        radial-gradient(circle at 80% 80%, rgba(129, 140, 248, 0.15), transparent 40%);
}

.hero-content {
    max-width: 800px;
    z-index: 2;
}

.hero h1 {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 25px;
    font-weight: 800;
}

.hero h1 span {
    color: var(--accent-color);
}

.hero p {
    font-size: 1.3rem;
    color: var(--text-dim);
    margin-bottom: 40px;
    max-width: 600px;
}

.hero-stats {
    display: flex;
    gap: 50px;
    margin-top: 60px;
    padding-top: 30px;
    border-top: 1px solid var(--glass-border);
}

.stat-item h3 {
    font-size: 2.5rem;
    color: var(--white);
}

.stat-item p {
    font-size: 0.9rem;
    margin-bottom: 0;
}

/* Animated Floating shapes */
.shape {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    animation: float 10s infinite ease-in-out;
}

.shape-1 {
    top: 20%;
    right: 10%;
    width: 300px;
    height: 300px;
    background: var(--accent-color);
    opacity: 0.2;
}

.shape-2 {
    bottom: 10%;
    left: 5%;
    width: 200px;
    height: 200px;
    background: var(--highlight-color);
    opacity: 0.2;
    animation-delay: 2s;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-30px);
    }
}

/* =========================================
   5. SERVICES SECTION
   ========================================= */
.services {
    padding: var(--spacing-section) 0;
    background-color: var(--secondary-color);
    position: relative;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.service-card {
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    padding: 40px;
    border-radius: 16px;
    transition: var(--transition);
    position: relative;
    overflow: hidden;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--accent-color);
    box-shadow: 0 20px 40px -10px rgba(0, 0, 0, 0.5);
}

.service-icon {
    font-size: 2.5rem;
    margin-bottom: 25px;
    color: var(--accent-color);
}

.service-card h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
    color: var(--white);
}

.service-card p {
    color: var(--text-dim);
    margin-bottom: 25px;
}

.service-link {
    color: var(--accent-color);
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 5px;
}

.service-link span {
    transition: 0.3s;
}

.service-link:hover span {
    margin-left: 5px;
}

/* =========================================
   6. INTERACTIVE CALCULATOR
   ========================================= */
.calculator-section {
    padding: var(--spacing-section) 0;
    background: linear-gradient(180deg, var(--primary-color), var(--secondary-color));
}

.calc-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    background: var(--glass-bg);
    border: 1px solid var(--glass-border);
    border-radius: 20px;
    padding: 50px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.calc-inputs label {
    display: block;
    margin-bottom: 10px;
    color: var(--text-light);
    font-weight: 600;
}

.input-group {
    margin-bottom: 25px;
    position: relative;
}

.input-group input {
    width: 100%;
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    transition: var(--transition);
}

.input-group input:focus {
    outline: none;
    border-color: var(--accent-color);
    box-shadow: 0 0 0 3px rgba(56, 189, 248, 0.1);
}

.calc-results {
    background: var(--primary-color);
    border-radius: 16px;
    padding: 30px;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    border: 1px solid var(--glass-border);
}

.result-box {
    margin-bottom: 20px;
}

.result-box h4 {
    color: var(--text-dim);
    margin-bottom: 10px;
}

.result-val {
    font-size: 3rem;
    font-weight: 800;
    color: var(--accent-color);
}

/* =========================================
   7. SAMPLE REPORT SECTION
   ========================================= */
.report-section {
    padding: var(--spacing-section) 0;
}

.report-mockup {
    background: var(--secondary-color);
    border-radius: 20px;
    padding: 40px;
    border: 1px solid var(--glass-border);
    position: relative;
}

.chart-grid {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 20px;
    height: 400px;
}

.chart-main {
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    position: relative;
    overflow: hidden;
    display: flex;
    align-items: flex-end;
    padding: 20px;
    gap: 15px;
}

/* CSS Only Bar Chart Animation */
.bar {
    flex: 1;
    background: linear-gradient(to top, var(--accent-color), var(--highlight-color));
    border-radius: 4px 4px 0 0;
    height: 0;
    opacity: 0.8;
    transition: height 1.5s ease-out;
}

.chart-sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.metric-card {
    flex: 1;
    background: rgba(15, 23, 42, 0.5);
    border-radius: 12px;
    padding: 20px;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.metric-card span {
    font-size: 0.9rem;
    color: var(--text-dim);
}

.metric-card strong {
    font-size: 2rem;
    color: var(--white);
}

/* =========================================
   8. TESTIMONIALS & CONTACT
   ========================================= */
.testimonials {
    padding: var(--spacing-section) 0;
    background: var(--secondary-color);
}

.testimonial-track {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
    gap: 30px;
}

.testimonial-card {
    background: var(--primary-color);
    padding: 30px;
    border-radius: 12px;
    border-left: 4px solid var(--accent-color);
}

.testimonial-card p {
    font-style: italic;
    margin-bottom: 20px;
    color: var(--text-dim);
}

.author h5 {
    color: var(--white);
    margin-bottom: 2px;
}

.author span {
    font-size: 0.85rem;
    color: var(--accent-color);
}

/* Contact Page Specifics */
.contact-hero {
    padding: 150px 0 80px;
    text-align: center;
}

.contact-form-container {
    max-width: 700px;
    margin: 0 auto 100px;
    background: var(--secondary-color);
    padding: 50px;
    border-radius: 20px;
    border: 1px solid var(--glass-border);
}

textarea {
    width: 100%;
    padding: 15px;
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    color: var(--white);
    font-size: 1rem;
    resize: vertical;
    min-height: 150px;
}

/* =========================================
   9. FOOTER
   ========================================= */
footer {
    background: #020617;
    padding: 80px 0 30px;
    border-top: 1px solid var(--glass-border);
}

.footer-content {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h4 {
    color: var(--white);
    margin-bottom: 25px;
    font-size: 1.2rem;
}

.footer-col p {
    color: var(--text-dim);
    margin-bottom: 20px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-dim);
    transition: var(--transition);
}

.footer-links a:hover {
    color: var(--accent-color);
    padding-left: 5px;
}

.social-links {
    display: flex;
    gap: 15px;
}

.social-icon {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--glass-bg);
    display: flex;
    align-items: center;
    justify-content: center;
    border: 1px solid var(--glass-border);
}

.social-icon:hover {
    background: var(--accent-color);
    color: var(--primary-color);
}

.copyright {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-dim);
    font-size: 0.9rem;
}

/* =========================================
   10. LEGAL PAGES TYPOGRAPHY
   ========================================= */
.legal-content {
    max-width: 900px;
    margin: 150px auto 100px;
    background: var(--secondary-color);
    padding: 60px;
    border-radius: 10px;
}

.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
    color: var(--white);
}

.legal-content h2 {
    font-size: 1.5rem;
    margin-top: 30px;
    margin-bottom: 15px;
    color: var(--accent-color);
}

.legal-content p {
    margin-bottom: 15px;
    color: var(--text-dim);
}

.legal-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--text-dim);
}

/* =========================================
   11. RESPONSIVENESS
   ========================================= */
@media (max-width: 992px) {
    .hero h1 {
        font-size: 3.5rem;
    }

    .calc-wrapper {
        grid-template-columns: 1fr;
    }

    .footer-content {
        grid-template-columns: 1fr 1fr;
    }

    .chart-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 768px) {
    .main-header {
        padding: 15px 0;
    }

    .mobile-toggle {
        display: block;
        color: var(--white);
    }

    .nav-links {
        position: fixed;
        top: 70px;
        left: -100%;
        width: 100%;
        height: calc(100vh - 70px);
        background: var(--primary-color);
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
    }

    .nav-links.active {
        left: 0;
    }

    .hero {
        flex-direction: column;
        padding-top: 150px;
        text-align: center;
        height: auto;
        padding-bottom: 50px;
    }

    .hero-content {
        margin-bottom: 50px;
    }

    .hero-stats {
        justify-content: center;
    }

    .section-title h2 {
        font-size: 2rem;
    }

    .footer-content {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .social-links {
        justify-content: center;
    }

    .legal-content {
        padding: 30px;
        margin-top: 100px;
    }
}