/* =========================================
   1. VARIABLES & RESET
   ========================================= */
:root {
    /* Brand Colors - Vibrant Gradient Theme */
    --primary: #6366f1;
    /* Indigo */
    --primary-light: #818cf8;
    --primary-dark: #4338ca;

    --secondary: #ec4899;
    /* Pink */
    --accent: #f59e0b;
    /* Amber/Orange */

    --gradient-main: linear-gradient(135deg, #6366f1 0%, #ec4899 100%);
    --gradient-hover: linear-gradient(135deg, #4338ca 0%, #be185d 100%);
    --gradient-text: linear-gradient(to right, #6366f1, #ec4899);

    /* Backgrounds */
    --bg-body: #f8fafc;
    --bg-white: #ffffff;
    --bg-dark: #0f172a;
    --bg-card: #ffffff;

    /* Typography */
    --text-main: #334155;
    --text-light: #64748b;
    --text-white: #ffffff;

    /* Spacing & Layout */
    --max-width: 1280px;
    --header-height: 80px;
    --radius-sm: 8px;
    --radius-md: 16px;
    --radius-lg: 24px;

    /* Effects */
    --shadow-sm: 0 4px 6px -1px rgba(0, 0, 0, 0.05);
    --shadow-md: 0 10px 15px -3px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 20px 25px -5px rgba(0, 0, 0, 0.1);
    --shadow-color: 0 20px 40px -10px rgba(99, 102, 241, 0.3);

    --glass: rgba(255, 255, 255, 0.7);
    --glass-border: 1px solid rgba(255, 255, 255, 0.5);
    --blur: blur(12px);
}

/* Dark Mode Support for specific sections */
[data-theme="dark"] {
    --bg-body: #0f172a;
    --bg-white: #1e293b;
    --text-main: #f1f5f9;
    --text-light: #94a3b8;
    --bg-card: #1e293b;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
}

body {
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-body);
    color: var(--text-main);
    line-height: 1.7;
    overflow-x: hidden;
}

/* Typography Overrides */
h1,
h2,
h3,
h4,
h5,
h6 {
    line-height: 1.2;
    font-weight: 800;
    letter-spacing: -0.02em;
    color: var(--text-main);
}

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s ease;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* =========================================
   2. UTILITY CLASSES
   ========================================= */
.container {
    width: 100%;
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 24px;
}

.section {
    padding: 120px 0;
    position: relative;
    overflow: hidden;
}

.text-gradient {
    background: var(--gradient-text);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    display: inline-block;
}

.bg-light {
    background-color: var(--bg-body);
}

.bg-white {
    background-color: var(--bg-white);
}

.bg-dark {
    background-color: var(--bg-dark);
    color: var(--text-white);
}

.flex-center {
    display: flex;
    justify-content: center;
    align-items: center;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    border-radius: 50px;
    font-weight: 600;
    font-size: 1rem;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    border: none;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.btn-primary {
    background: var(--gradient-main);
    color: white;
    box-shadow: var(--shadow-color);
}

.btn-primary:hover {
    transform: translateY(-3px);
    box-shadow: 0 25px 50px -12px rgba(99, 102, 241, 0.5);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(to bottom, rgba(255, 255, 255, 0.2), transparent);
    opacity: 0;
    transition: opacity 0.3s;
}

.btn-primary:hover::after {
    opacity: 1;
}

.btn-secondary {
    background: white;
    color: var(--primary);
    border: 2px solid rgba(99, 102, 241, 0.1);
}

.btn-secondary:hover {
    border-color: var(--primary);
    background: var(--bg-body);
}

.btn-icon {
    margin-left: 10px;
    transition: transform 0.3s;
}

.btn:hover .btn-icon {
    transform: translateX(5px);
}

/* Section Headings */
.heading-wrapper {
    text-align: center;
    margin-bottom: 80px;
    position: relative;
    z-index: 2;
}

.subtitle {
    font-size: 0.9rem;
    text-transform: uppercase;
    letter-spacing: 2px;
    color: var(--primary);
    font-weight: 700;
    display: block;
    margin-bottom: 16px;
}

.heading-wrapper h2 {
    font-size: 3rem;
    margin-bottom: 20px;
}

.heading-wrapper p {
    font-size: 1.2rem;
    color: var(--text-light);
    max-width: 600px;
    margin: 0 auto;
}

/* =========================================
   3. HEADER & NAVIGATION
   ========================================= */
.header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--header-height);
    z-index: 1000;
    transition: all 0.4s ease;
    background: transparent;
}

.header.scrolled {
    background: rgba(255, 255, 255, 0.9);
    backdrop-filter: blur(10px);
    box-shadow: var(--shadow-sm);
    height: 70px;
}

.header .container {
    height: 100%;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo img {
    height: 45px;
    width: auto;
    /* Since logo is white, we invert it for light mode header, or keep it if dark header */
    /* Assuming light mode default header */
    filter: brightness(0);
    transition: filter 0.3s;
}

/* Handle logo visibility on dark backgrounds if needed via JS or CSS overrides */

.nav-menu {
    display: flex;
    gap: 40px;
    align-items: center;
}

.nav-link {
    font-weight: 500;
    color: var(--text-main);
    font-size: 0.95rem;
    position: relative;
}

.nav-link::before {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-main);
    transition: width 0.3s ease;
    border-radius: 2px;
}

.nav-link:hover::before {
    width: 100%;
}

.mobile-toggle {
    display: none;
    font-size: 1.5rem;
    color: var(--text-main);
    cursor: pointer;
}

/* =========================================
   4. HERO SECTION
   ========================================= */
.hero {
    min-height: 100vh;
    padding-top: var(--header-height);
    display: flex;
    align-items: center;
    background: radial-gradient(circle at top right, rgba(236, 72, 153, 0.1), transparent 40%),
        radial-gradient(circle at bottom left, rgba(99, 102, 241, 0.1), transparent 40%);
    position: relative;
}

/* Decorative Blobs */
.blob {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
}

.blob-1 {
    top: -10%;
    right: -5%;
    width: 500px;
    height: 500px;
    background: rgba(99, 102, 241, 0.4);
    animation: float 10s infinite ease-in-out;
}

.blob-2 {
    bottom: 10%;
    left: -5%;
    width: 400px;
    height: 400px;
    background: rgba(236, 72, 153, 0.4);
    animation: float 12s infinite ease-in-out reverse;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
    align-items: center;
}

.hero-content {
    animation: slideRight 1s ease-out;
}

.hero-title {
    font-size: 4.5rem;
    line-height: 1.1;
    margin-bottom: 30px;
    letter-spacing: -2px;
}

.hero-desc {
    font-size: 1.25rem;
    color: var(--text-light);
    margin-bottom: 40px;
    max-width: 90%;
}

.hero-visual {
    position: relative;
    height: 500px;
    animation: zoomIn 1.2s cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* CSS Composition: Analytics Dashboard Abstract */
.css-dashboard {
    position: absolute;
    width: 100%;
    height: 100%;
    perspective: 1000px;
}

.card-main {
    position: absolute;
    top: 50px;
    left: 50px;
    right: 50px;
    bottom: 50px;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(20px);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.15);
    transform: rotateY(-10deg) rotateX(5deg);
    transition: transform 0.5s;
    padding: 30px;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.card-main:hover {
    transform: rotateY(0) rotateX(0);
}

.bar-chart {
    display: flex;
    align-items: flex-end;
    gap: 15px;
    height: 200px;
    padding-top: 20px;
}

.bar {
    width: 100%;
    background: var(--gradient-main);
    border-radius: 8px 8px 0 0;
    opacity: 0.8;
    position: relative;
    animation: growUp 1.5s ease-out forwards;
}

/* Floating Elements */
.float-card {
    position: absolute;
    background: white;
    padding: 15px 25px;
    border-radius: 12px;
    box-shadow: var(--shadow-lg);
    display: flex;
    align-items: center;
    gap: 15px;
    z-index: 2;
    animation: float 6s infinite ease-in-out;
}

.float-1 {
    top: 20%;
    right: -20px;
}

.float-2 {
    bottom: 10%;
    left: -20px;
    animation-delay: 2s;
}

.icon-box {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
}

/* =========================================
   5. SERVICES (Grid & Glassmorphism)
   ========================================= */
.services-section {
    background: var(--bg-white);
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    gap: 40px;
}

.service-item {
    padding: 50px 40px;
    background: var(--bg-body);
    border-radius: var(--radius-lg);
    transition: all 0.4s ease;
    border: 1px solid transparent;
    position: relative;
    overflow: hidden;
    z-index: 1;
}

.service-item::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: var(--gradient-main);
    opacity: 0;
    z-index: -1;
    transition: opacity 0.4s ease;
}

.service-item:hover {
    transform: translateY(-10px);
    border-color: rgba(99, 102, 241, 0.2);
    box-shadow: var(--shadow-lg);
}

/* On hover, text turns white because of gradient bg opacity (simulated via specificity) 
   Actually, let's keep it simple: gradient border bottom */

.service-item:hover::before {
    opacity: 0.03;
    /* Subtle tint */
}

.s-icon {
    width: 70px;
    height: 70px;
    border-radius: 20px;
    background: white;
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.8rem;
    color: var(--primary);
    margin-bottom: 30px;
    transition: all 0.3s;
}

.service-item:hover .s-icon {
    background: var(--primary);
    color: white;
    transform: rotate(10deg);
}

.service-item h3 {
    font-size: 1.5rem;
    margin-bottom: 15px;
}

.service-item p {
    color: var(--text-light);
    margin-bottom: 25px;
}

.learn-more {
    font-weight: 700;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
}

/* =========================================
   6. INTERACTIVE REPORTS (Tabs)
   ========================================= */
.reports-section {
    background-color: #f1f5f9;
}

.report-container {
    background: white;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
    padding: 50px;
    display: grid;
    grid-template-columns: 1fr 1.5fr;
    gap: 50px;
    align-items: center;
}

.report-tabs {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.tab-btn {
    padding: 20px;
    border-radius: var(--radius-md);
    cursor: pointer;
    background: transparent;
    border: 1px solid transparent;
    transition: all 0.3s;
    text-align: left;
}

.tab-btn.active {
    background: #eff6ff;
    border-color: #bfdbfe;
    box-shadow: var(--shadow-sm);
}

.tab-btn h4 {
    margin-bottom: 5px;
    color: var(--text-main);
}

.tab-btn p {
    font-size: 0.9rem;
    color: var(--text-light);
}

.report-visual {
    background: var(--bg-dark);
    border-radius: var(--radius-md);
    padding: 30px;
    height: 400px;
    position: relative;
    overflow: hidden;
    color: white;
}

/* Simulated Graphs with CSS */
.graph-display {
    display: none;
    height: 100%;
    flex-direction: column;
    justify-content: flex-end;
    animation: fadeIn 0.5s ease;
}

.graph-display.active {
    display: flex;
}

.graph-bars-h {
    display: flex;
    flex-direction: column;
    gap: 15px;
    width: 100%;
}

.bar-h {
    height: 20px;
    background: var(--gradient-main);
    border-radius: 10px;
    width: 0;
    transition: width 1s ease;
}

/* =========================================
   7. ROI CALCULATOR (Modern UI)
   ========================================= */
.calculator-section {
    background: var(--bg-dark);
    color: white;
    padding-bottom: 150px;
    /* Slanted bottom */
    clip-path: polygon(0 0, 100% 0, 100% 90%, 0 100%);
}

.calc-wrapper {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(10px);
    border-radius: 24px;
    padding: 50px;
}

.calc-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.slider-group {
    margin-bottom: 30px;
}

.slider-label {
    display: flex;
    justify-content: space-between;
    margin-bottom: 15px;
    font-weight: 500;
}

.range-slider {
    -webkit-appearance: none;
    width: 100%;
    height: 8px;
    border-radius: 5px;
    background: rgba(255, 255, 255, 0.2);
    outline: none;
    transition: opacity .2s;
}

.range-slider::-webkit-slider-thumb {
    -webkit-appearance: none;
    appearance: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    background: var(--primary);
    cursor: pointer;
    box-shadow: 0 0 10px rgba(99, 102, 241, 0.5);
    transition: transform 0.2s;
}

.range-slider::-webkit-slider-thumb:hover {
    transform: scale(1.2);
}

.calc-output {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.1), transparent);
    border-radius: 20px;
    padding: 40px;
    position: relative;
}

.calc-output::before {
    content: '';
    position: absolute;
    top: -2px;
    left: -2px;
    right: -2px;
    bottom: -2px;
    background: var(--gradient-main);
    z-index: -1;
    border-radius: 22px;
}

.output-number {
    font-size: 3.5rem;
    font-weight: 800;
    margin: 10px 0;
    background: linear-gradient(to right, #fff, #bfdbfe);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* =========================================
   8. CONTACT PAGE SPECIFIC
   ========================================= */
.contact-hero {
    background: var(--bg-dark);
    padding: 160px 0 80px;
    text-align: center;
    color: white;
}

.contact-container {
    display: flex;
    box-shadow: var(--shadow-lg);
    border-radius: 24px;
    overflow: hidden;
    background: white;
    margin: -60px auto 100px;
    position: relative;
    max-width: 1100px;
    z-index: 10;
}

.contact-info-panel {
    width: 40%;
    background: var(--gradient-main);
    color: white;
    padding: 60px 40px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
}

.info-item {
    display: flex;
    gap: 20px;
    margin-bottom: 30px;
}

.info-item i {
    font-size: 1.5rem;
    opacity: 0.8;
}

.contact-form-panel {
    width: 60%;
    padding: 60px 50px;
}

.input-box {
    margin-bottom: 25px;
    position: relative;
}

.input-box input,
.input-box textarea,
.input-box select {
    width: 100%;
    padding: 15px 0;
    font-size: 1rem;
    color: var(--text-main);
    border: none;
    border-bottom: 2px solid #e2e8f0;
    background: transparent;
    outline: none;
    transition: all 0.3s;
}

.input-box label {
    position: absolute;
    top: 15px;
    left: 0;
    color: var(--text-light);
    pointer-events: none;
    transition: 0.3s;
}

.input-box input:focus~label,
.input-box input:valid~label,
.input-box textarea:focus~label,
.input-box textarea:valid~label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--primary);
}

.input-box input:focus,
.input-box textarea:focus {
    border-bottom-color: var(--primary);
}

/* =========================================
   9. LEGAL PAGES
   ========================================= */
.legal-wrapper {
    padding: 160px 0 100px;
    max-width: 800px;
    margin: 0 auto;
}

.legal-wrapper h1 {
    font-size: 3rem;
    margin-bottom: 10px;
    color: var(--primary);
}

.legal-content {
    background: white;
    padding: 60px;
    border-radius: 16px;
    box-shadow: var(--shadow-sm);
    border: 1px solid #e2e8f0;
}

.legal-content h2 {
    font-size: 1.5rem;
    margin: 40px 0 20px;
    padding-bottom: 10px;
    border-bottom: 2px solid #f1f5f9;
}

.legal-content p {
    margin-bottom: 15px;
    color: var(--text-main);
}

.legal-content ul {
    list-style: disc;
    padding-left: 20px;
    margin-bottom: 20px;
    color: var(--text-main);
}

/* =========================================
   10. FOOTER
   ========================================= */
.footer {
    background: var(--bg-dark);
    color: rgba(255, 255, 255, 0.7);
    padding: 80px 0 30px;
    font-size: 0.95rem;
}

.footer-top {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 50px;
    margin-bottom: 60px;
    padding-bottom: 60px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

.f-logo {
    filter: brightness(0) invert(1);
    height: 40px;
    margin-bottom: 25px;
}

.footer-heading {
    color: white;
    font-size: 1.1rem;
    margin-bottom: 25px;
    font-weight: 600;
}

.footer-links li {
    margin-bottom: 12px;
}

.footer-links a:hover {
    color: white;
    text-decoration: underline;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

/* =========================================
   11. ANIMATIONS
   ========================================= */
@keyframes float {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-20px);
    }
}

@keyframes slideRight {
    from {
        opacity: 0;
        transform: translateX(-50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes growUp {
    from {
        height: 0;
        opacity: 0;
    }

    to {
        opacity: 0.8;
    }

    /* height handled by JS or inline style if dynamic */
}

@keyframes zoomIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

@keyframes fadeIn {
    from {
        opacity: 0;
    }

    to {
        opacity: 1;
    }
}

/* Scroll Animation Class */
.reveal-on-scroll {
    opacity: 0;
    transform: translateY(40px);
    transition: all 0.8s ease-out;
}

.reveal-on-scroll.visible {
    opacity: 1;
    transform: translateY(0);
}

/* =========================================
   12. MEDIA QUERIES
   ========================================= */
@media (max-width: 992px) {
    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
    }

    .hero-visual {
        height: 400px;
        margin-top: 40px;
    }

    .card-main {
        transform: none;
    }

    .card-main:hover {
        transform: none;
    }

    .calc-grid {
        grid-template-columns: 1fr;
    }

    .report-container {
        grid-template-columns: 1fr;
    }

    .contact-container {
        flex-direction: column;
    }

    .contact-info-panel,
    .contact-form-panel {
        width: 100%;
    }
}

@media (max-width: 768px) {
    .nav-menu {
        position: fixed;
        top: 0;
        right: -100%;
        width: 80%;
        height: 100vh;
        background: white;
        flex-direction: column;
        justify-content: center;
        box-shadow: -10px 0 30px rgba(0, 0, 0, 0.1);
        transition: 0.4s ease;
        padding: 40px;
    }

    .nav-menu.active {
        right: 0;
    }

    .mobile-toggle {
        display: block;
        z-index: 1001;
    }

    .footer-top {
        grid-template-columns: 1fr;
        gap: 30px;
    }

    .hero-title {
        font-size: 3rem;
    }

    .blob {
        display: none;
    }

    /* Improve mobile performance */
}