/* =========================================
   1. CSS VARIABLES & THEME CONFIGURATION
   ========================================= */
:root {
    /* Brand Colors - Emerald Tech Theme */
    --color-primary: #10b981;
    /* Emerald */
    --color-primary-dark: #059669;
    --color-secondary: #22d3ee;
    /* Cyan */
    --color-accent: #f59e0b;
    /* Amber */

    --color-dark-bg: #020617;
    /* Deep navy */
    --color-card-bg: #020b1a;
    --color-text-main: #f1f5f9;
    --color-text-muted: #94a3b8;
    --color-border: #1e293b;
    --color-white: #ffffff;
    --color-success: #22c55e;

    /* Gradients */
    --gradient-main: linear-gradient(135deg,
            #10b981 0%,
            #22d3ee 100%);

    --gradient-glow: radial-gradient(circle at center,
            rgba(16, 185, 129, 0.18) 0%,
            rgba(2, 6, 23, 0) 70%);

    --gradient-card: linear-gradient(145deg,
            #020b1a 0%,
            #020617 100%);

    /* Typography */
    --font-main: 'Inter', system-ui, -apple-system, sans-serif;
    --font-heading: 'Poppins', sans-serif;

    /* Spacing */
    --spacing-xs: 0.5rem;
    --spacing-sm: 1rem;
    --spacing-md: 2rem;
    --spacing-lg: 4rem;
    --spacing-xl: 8rem;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.15);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 15px 30px rgba(0, 0, 0, 0.35);
    --shadow-neon: 0 0 25px rgba(16, 185, 129, 0.5);

    /* Transitions */
    --transition-fast: 0.2s ease;
    --transition-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}


/* =========================================
   2. RESET & BASE STYLES
   ========================================= */
*,
*::before,
*::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: var(--font-main);
    background-color: var(--color-dark-bg);
    color: var(--color-text-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    color: var(--color-white);
    line-height: 1.2;
    margin-bottom: var(--spacing-sm);
    font-weight: 700;
}

h1 {
    font-size: 3.5rem;
    letter-spacing: -0.02em;
}

h2 {
    font-size: 2.5rem;
    letter-spacing: -0.01em;
}

h3 {
    font-size: 1.75rem;
}

p {
    margin-bottom: 1.5rem;
    color: var(--color-text-muted);
}

a {
    text-decoration: none;
    color: inherit;
    transition: var(--transition-fast);
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* =========================================
   3. UTILITY CLASSES & GRID SYSTEM
   ========================================= */
.container {
    width: 100%;
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 20px;
}

.grid {
    display: grid;
    gap: var(--spacing-md);
}

.grid-2 {
    grid-template-columns: repeat(2, 1fr);
}

.grid-3 {
    grid-template-columns: repeat(3, 1fr);
}

.grid-4 {
    grid-template-columns: repeat(4, 1fr);
}

.flex {
    display: flex;
}

.flex-col {
    flex-direction: column;
}

.justify-between {
    justify-content: space-between;
}

.align-center {
    align-items: center;
}

.gap-sm {
    gap: 1rem;
}

.gap-md {
    gap: 2rem;
}

.text-center {
    text-align: center;
}

.text-gradient {
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.section-padding {
    padding: var(--spacing-xl) 0;
}

.bg-dark {
    background-color: var(--color-dark-bg);
}

.bg-card {
    background-color: var(--color-card-bg);
}

/* =========================================
   4. COMPONENTS: BUTTONS
   ========================================= */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 1rem 2.5rem;
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    z-index: 1;
    font-size: 1rem;
    letter-spacing: 0.5px;
    border: none;
}

.btn-primary {
    background: var(--gradient-main);
    color: var(--color-white);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--color-accent) 0%, var(--color-primary) 100%);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.3s ease;
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

.btn-primary:hover::before {
    opacity: 1;
}

.btn-secondary {
    background: transparent;
    border: 2px solid var(--color-primary);
    color: var(--color-white);
}

.btn-secondary:hover {
    background: rgba(99, 102, 241, 0.1);
    border-color: var(--color-accent);
    color: var(--color-white);
}

/* =========================================
   5. HEADER & NAVIGATION
   ========================================= */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    z-index: 1000;
    padding: 20px 0;
    transition: var(--transition-normal);
    background: transparent;
    /* Initially transparent */
}

.site-header.scrolled {
    background: rgba(15, 23, 42, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-md);
    padding: 15px 0;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.nav-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-container {
    display: flex;
    align-items: center;
    gap: 10px;
}

.logo-img {
    height: 40px;
    filter: brightness(0) invert(1);
    /* Ensure logo is white if png is black */
}

.nav-links {
    display: flex;
    gap: 40px;
}

.nav-link {
    font-weight: 500;
    color: var(--color-text-muted);
    position: relative;
    padding: 5px 0;
}

.nav-link:hover,
.nav-link.active {
    color: var(--color-white);
}

.nav-link::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--color-secondary);
    transition: width 0.3s ease;
}

.nav-link:hover::after {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--color-white);
    cursor: pointer;
}

/* =========================================
   6. HERO SECTION
   ========================================= */
.hero-section {
    position: relative;
    min-height: 100vh;
    display: flex;
    align-items: center;
    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 50% 50%, #1e1b4b 0%, #0f172a 100%);
}

.glowing-orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.6;
    animation: float 10s infinite ease-in-out;
}

.orb-1 {
    width: 300px;
    height: 300px;
    background: var(--color-primary);
    top: -10%;
    left: -5%;
}

.orb-2 {
    width: 400px;
    height: 400px;
    background: var(--color-accent);
    bottom: -10%;
    right: -5%;
    animation-delay: -5s;
}

.hero-content {
    max-width: 800px;
    margin: 0 auto;
    text-align: center;
    position: relative;
    z-index: 2;
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 16px;
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.2);
    border-radius: 30px;
    color: var(--color-secondary);
    font-weight: 600;
    font-size: 0.9rem;
    margin-bottom: 20px;
    text-transform: uppercase;
    letter-spacing: 1px;
}

.hero-title {
    font-size: 4.5rem;
    margin-bottom: 25px;
    line-height: 1.1;
}

.hero-description {
    font-size: 1.25rem;
    max-width: 600px;
    margin: 0 auto 40px;
    color: var(--color-text-muted);
}

.hero-stats-row {
    display: flex;
    justify-content: center;
    gap: 50px;
    margin-top: 60px;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-item h4 {
    font-size: 2.5rem;
    color: var(--color-white);
    margin-bottom: 5px;
}

.stat-item p {
    font-size: 0.9rem;
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 1px;
}

/* =========================================
   7. SERVICES SECTION
   ========================================= */
.services-section {
    background-color: var(--color-dark-bg);
}

.section-header {
    text-align: center;
    max-width: 700px;
    margin: 0 auto 60px;
}

.service-card {
    background: var(--color-card-bg);
    border: 1px solid var(--color-border);
    padding: 40px 30px;
    border-radius: 20px;
    transition: var(--transition-normal);
    position: relative;
    overflow: hidden;
    group: hover;
}

.service-card:hover {
    transform: translateY(-10px);
    border-color: var(--color-primary);
    box-shadow: var(--shadow-neon);
}

.service-icon-box {
    width: 70px;
    height: 70px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 16px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 25px;
    font-size: 2rem;
    color: var(--color-secondary);
    transition: var(--transition-normal);
}

.service-card:hover .service-icon-box {
    background: var(--color-primary);
    color: var(--color-white);
}

.service-title {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-link {
    display: inline-flex;
    align-items: center;
    margin-top: 20px;
    font-weight: 600;
    color: var(--color-secondary);
}

.service-link span {
    margin-left: 5px;
    transition: 0.2s;
}

.service-link:hover span {
    margin-left: 10px;
}

/* =========================================
   8. INTERACTIVE CALCULATOR
   ========================================= */
.calculator-section {
    background: linear-gradient(to bottom, #0f172a, #1e1b4b);
}

.calc-container {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.3);
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.form-group {
    margin-bottom: 25px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    font-weight: 500;
}

.range-slider {
    width: 100%;
    -webkit-appearance: none;
    height: 6px;
    background: #334155;
    border-radius: 5px;
    outline: none;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--color-secondary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 10px rgba(14, 165, 233, 0.5);
}

.calc-result-box {
    background: var(--color-dark-bg);
    border-radius: 20px;
    padding: 40px;
    text-align: center;
    border: 1px solid var(--color-primary);
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.result-value {
    font-size: 4rem;
    font-weight: 800;
    background: var(--gradient-main);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    margin: 20px 0;
}

/* =========================================
   9. TESTIMONIALS
   ========================================= */
.testimonial-card {
    background: var(--color-card-bg);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid var(--color-border);
}

.quote-icon {
    font-size: 3rem;
    color: var(--color-primary);
    opacity: 0.3;
    line-height: 1;
}

.client-info {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-top: 20px;
}

.client-avatar {
    width: 50px;
    height: 50px;
    border-radius: 50%;
    background: var(--color-border);
}

/* =========================================
   10. FOOTER
   ========================================= */
.site-footer {
    background-color: #020617;
    border-top: 1px solid var(--color-border);
    padding-top: 80px;
    padding-bottom: 30px;
    font-size: 0.95rem;
}

.footer-top {
    margin-bottom: 60px;
}

.footer-brand p {
    margin-top: 20px;
    max-width: 300px;
}

.footer-heading {
    color: var(--color-white);
    margin-bottom: 25px;
    font-weight: 600;
    font-size: 1.1rem;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a {
    color: var(--color-text-muted);
    transition: 0.2s;
}

.footer-links a:hover {
    color: var(--color-secondary);
    padding-left: 5px;
}

.footer-bottom {
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 30px;
    text-align: center;
    color: rgba(255, 255, 255, 0.4);
    font-size: 0.9rem;
}

/* =========================================
   11. ANIMATIONS (Keyframes)
   ========================================= */
@keyframes float {
    0% {
        transform: translate(0, 0);
    }

    50% {
        transform: translate(20px, -20px);
    }

    100% {
        transform: translate(0, 0);
    }
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* JS Triggered Animation Classes */
.reveal {
    opacity: 0;
    transform: translateY(30px);
    transition: all 0.8s ease;
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   12. LEGAL PAGES SPECIFIC
   ========================================= */
.legal-content h1 {
    font-size: 2.5rem;
    margin-bottom: 40px;
}

.legal-content h2 {
    color: var(--color-secondary);
    font-size: 1.5rem;
    margin-top: 30px;
}

.legal-content ul {
    list-style: disc;
    margin-left: 20px;
    margin-bottom: 20px;
    color: var(--color-text-muted);
}

.legal-content li {
    margin-bottom: 10px;
}

/* =========================================
   13. CONTACT PAGE SPECIFIC
   ========================================= */
.contact-grid {
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 40px;
    margin-top: 40px;
}

.contact-info-box {
    background: var(--color-card-bg);
    padding: 40px;
    border-radius: 20px;
    height: 100%;
}

.info-item {
    display: flex;
    align-items: flex-start;
    gap: 15px;
    margin-bottom: 30px;
}

.info-icon {
    width: 40px;
    height: 40px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--color-primary);
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.contact-form-box {
    background: var(--color-card-bg);
    padding: 40px;
    border-radius: 20px;
}

.form-input,
.form-textarea {
    width: 100%;
    padding: 15px;
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid var(--color-border);
    border-radius: 8px;
    color: var(--color-white);
    font-family: var(--font-main);
    transition: 0.3s;
}

.form-input:focus,
.form-textarea:focus {
    outline: none;
    border-color: var(--color-secondary);
    box-shadow: 0 0 0 3px rgba(14, 165, 233, 0.2);
}

/* =========================================
   14. RESPONSIVE MEDIA QUERIES
   ========================================= */
@media (max-width: 1024px) {
    h1 {
        font-size: 3.5rem;
    }

    .hero-stats-row {
        gap: 30px;
    }

    .grid-4,
    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .calc-grid {
        grid-template-columns: 1fr;
        gap: 30px;
    }
}

@media (max-width: 768px) {
    .site-header {
        padding: 15px 0;
    }

    .nav-links {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: #0f172a;
        flex-direction: column;
        justify-content: center;
        align-items: center;
        transition: 0.4s ease;
        box-shadow: -5px 0 15px rgba(0, 0, 0, 0.5);
    }

    .nav-links.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .hero-title {
        font-size: 2.8rem;
    }

    .hero-stats-row {
        flex-direction: column;
        gap: 30px;
    }

    .grid-2 {
        grid-template-columns: 1fr;
    }

    .contact-grid {
        grid-template-columns: 1fr;
    }

    .section-padding {
        padding: 60px 0;
    }
}