@import url('https://fonts.googleapis.com/css2?family=Outfit:wght@300;400;500;700;900&family=Space+Grotesk:wght@300;400;500;600;700&display=swap');

/* ==========================================================================
   CSS VARIABLES & DESIGN SYSTEM
   ========================================================================== */
:root {
    /* Color Palette */
    --bg-main: #050507;
    --bg-secondary: #0d0d12;
    --bg-tertiary: #16161d;
    --text-primary: #ffffff;
    --text-secondary: #a1a1aa;
    --accent-primary: #4361ee;
    --accent-secondary: #7209b7;
    --accent-tertiary: #f72585;
    --gradient-glow: linear-gradient(90deg, var(--accent-primary), var(--accent-secondary), var(--accent-tertiary));

    /* Typography */
    --font-heading: 'Space Grotesk', sans-serif;
    --font-body: 'Outfit', sans-serif;

    /* Spacing */
    --section-padding: 120px;
    --container-width: 1400px;

    /* Transitions */
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --transition-slow: 0.8s var(--ease-out-expo);
    --transition-fast: 0.4s var(--ease-out-expo);

    /* Z-index layers */
    --z-back: -1;
    --z-normal: 1;
    --z-header: 100;
    --z-cursor: 9999;
    --z-chat: 999;
}

/* ==========================================================================
   RESET & BASE STYLES
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    cursor: none;
    /* Custom cursor */
}

html {
    scroll-behavior: smooth;
    font-size: 16px;
    background-color: var(--bg-main);
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background-color: var(--bg-main);
    overflow-x: hidden;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

a {
    color: inherit;
    text-decoration: none;
}

ul {
    list-style: none;
}

img {
    max-width: 100%;
    display: block;
}

/* Typography Base */
h1,
h2,
h3,
h4,
h5,
h6 {
    font-family: var(--font-heading);
    line-height: 1.1;
    font-weight: 700;
}

h1 {
    font-size: clamp(3rem, 6vw, 6rem);
    letter-spacing: -2px;
}

h2 {
    font-size: clamp(2.5rem, 5vw, 4.5rem);
    letter-spacing: -1px;
}

h3 {
    font-size: clamp(1.5rem, 3vw, 2.5rem);
}

.text-gradient {
    background: var(--gradient-glow);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.container {
    max-width: var(--container-width);
    margin: 0 auto;
    padding: 0 40px;
}

/* ==========================================================================
   CUSTOM CURSOR
   ========================================================================== */
.cursor-dot {
    position: fixed;
    top: 0;
    left: 0;
    width: 8px;
    height: 8px;
    background: var(--accent-primary);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
}

.cursor-outline {
    position: fixed;
    top: 0;
    left: 0;
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    border-radius: 50%;
    pointer-events: none;
    z-index: var(--z-cursor);
    transform: translate(-50%, -50%);
    transition: width 0.3s, height 0.3s, background 0.3s;
}

.cursor-outline.hover {
    width: 80px;
    height: 80px;
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--accent-primary);
}

/* ==========================================================================
   BUTTONS & LINKS
   ========================================================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 16px 36px;
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 600;
    border-radius: 50px;
    position: relative;
    overflow: hidden;
    border: none;
    background: transparent;
    color: var(--text-primary);
    transition: var(--transition-fast);
}

.btn-primary {
    background: var(--text-primary);
    color: var(--bg-main);
}

.btn-primary:hover {
    background: var(--accent-primary);
    color: var(--text-primary);
    box-shadow: 0 0 30px rgba(67, 97, 238, 0.4);
}

.btn-outline {
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.btn-outline:hover {
    border-color: var(--text-primary);
}

/* ==========================================================================
   HEADER / NAVIGATION
   ========================================================================== */
.site-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    padding: 30px 0;
    z-index: var(--z-header);
    transition: var(--transition-fast);
}

.site-header.scrolled {
    padding: 15px 0;
    background: rgba(5, 5, 7, 0.85);
    backdrop-filter: blur(15px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
}

.header-inner {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.logo-wrapper img {
    height: 50px;
    filter: invert(1);
    object-fit: contain;
}

.main-nav {
    display: flex;
    gap: 40px;
}

.main-nav a {
    font-family: var(--font-heading);
    font-size: 1.1rem;
    font-weight: 500;
    position: relative;
    padding-bottom: 5px;
}

.main-nav a::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 0;
    height: 2px;
    background: var(--gradient-glow);
    transition: width var(--transition-fast);
}

.main-nav a:hover::after {
    width: 100%;
}

/* ==========================================================================
   HERO SECTION & 3D ANIMATIONS
   ========================================================================== */
.hero {
    height: 100vh;
    display: flex;
    align-items: center;
    position: relative;
    padding-top: 80px;
    overflow: hidden;
}

.hero-bg {
    position: absolute;
    top: 50%;
    left: 50%;
    transform: translate(-50%, -50%);
    width: 100vw;
    height: 100vh;
    background: radial-gradient(circle at center, rgba(67, 97, 238, 0.1) 0%, rgba(5, 5, 7, 1) 60%);
    z-index: var(--z-back);
}

.hero-content {
    max-width: 800px;
    position: relative;
    z-index: var(--z-normal);
}

.hero-subtitle {
    display: inline-block;
    padding: 8px 20px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 30px;
    margin-bottom: 30px;
    text-transform: uppercase;
    letter-spacing: 2px;
    font-size: 0.9rem;
    background: rgba(255, 255, 255, 0.03);
}

.hero-desc {
    font-size: 1.2rem;
    color: var(--text-secondary);
    margin: 30px 0 50px;
    max-width: 600px;
}

/* 3D Floating Element in Hero */
.hero-3d-element {
    position: absolute;
    right: 5%;
    top: 50%;
    transform: translateY(-50%);
    width: 400px;
    height: 400px;
    perspective: 1000px;
}

.cube {
    width: 100%;
    height: 100%;
    position: relative;
    transform-style: preserve-3d;
    animation: rotateCube 20s infinite linear;
}

.cube-face {
    position: absolute;
    width: 200px;
    height: 200px;
    background: rgba(67, 97, 238, 0.1);
    border: 2px solid var(--accent-primary);
    box-shadow: 0 0 40px rgba(67, 97, 238, 0.2) inset;
    top: 100px;
    left: 100px;
}

.face-front {
    transform: translateZ(100px);
}

.face-back {
    transform: rotateY(180deg) translateZ(100px);
}

.face-right {
    transform: rotateY(90deg) translateZ(100px);
}

.face-left {
    transform: rotateY(-90deg) translateZ(100px);
}

.face-top {
    transform: rotateX(90deg) translateZ(100px);
}

.face-bottom {
    transform: rotateX(-90deg) translateZ(100px);
}

@keyframes rotateCube {
    0% {
        transform: rotateX(0deg) rotateY(0deg);
    }

    100% {
        transform: rotateX(360deg) rotateY(360deg);
    }
}

/* ==========================================================================
   ABOUT / METRICS SECTION
   ========================================================================== */
.about-section {
    padding: var(--section-padding) 0;
    background: var(--bg-secondary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.metrics-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 40px;
    margin-top: 60px;
}

.metric-card {
    padding: 40px;
    background: var(--bg-tertiary);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.02);
    transition: var(--transition-slow);
}

.metric-card:hover {
    transform: translateY(-10px);
    border-color: rgba(67, 97, 238, 0.3);
}

.metric-number {
    font-size: 4rem;
    font-family: var(--font-heading);
    font-weight: 900;
    color: var(--accent-primary);
    margin-bottom: 10px;
}

/* ==========================================================================
   SERVICES GRID (3D TILT EFFECT)
   ========================================================================== */
.services-section {
    padding: var(--section-padding) 0;
}

.section-header {
    text-align: center;
    margin-bottom: 80px;
}

.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 30px;
    perspective: 1000px;
}

.service-card {
    background: var(--bg-secondary);
    padding: 50px 40px;
    border-radius: 24px;
    position: relative;
    transform-style: preserve-3d;
    transition: transform 0.1s ease;
    border: 1px solid rgba(255, 255, 255, 0.05);
    overflow: hidden;
}

.service-icon {
    width: 60px;
    height: 60px;
    background: rgba(67, 97, 238, 0.1);
    border-radius: 15px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 30px;
    color: var(--accent-primary);
}

.service-icon svg {
    width: 30px;
    height: 30px;
    fill: currentColor;
}

.service-card h3 {
    margin-bottom: 15px;
    transform: translateZ(30px);
}

.service-card p {
    color: var(--text-secondary);
    transform: translateZ(20px);
}

/* ==========================================================================
   INDUSTRIES SECTION
   ========================================================================== */
.industries-section {
    padding: var(--section-padding) 0;
    background: var(--bg-tertiary);
}

.industries-list {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.industry-item {
    padding: 30px 40px;
    background: var(--bg-main);
    border-radius: 16px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    border: 1px solid rgba(255, 255, 255, 0.05);
    transition: var(--transition-fast);
}

.industry-item:hover {
    background: var(--accent-primary);
    border-color: var(--accent-primary);
}

.industry-item h3 {
    font-size: 2rem;
    margin: 0;
}

/* ==========================================================================
   ROI CALCULATOR
   ========================================================================== */
.calculator-section {
    padding: var(--section-padding) 0;
}

.calc-container {
    background: var(--bg-secondary);
    border-radius: 30px;
    padding: 60px;
    border: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 60px;
}

.calc-input-group {
    margin-bottom: 40px;
}

.calc-input-group label {
    display: block;
    margin-bottom: 15px;
    font-family: var(--font-heading);
    font-size: 1.2rem;
}

input[type=range] {
    width: 100%;
    -webkit-appearance: none;
    background: rgba(255, 255, 255, 0.1);
    height: 8px;
    border-radius: 4px;
    outline: none;
}

input[type=range]::-webkit-slider-thumb {
    -webkit-appearance: none;
    width: 24px;
    height: 24px;
    background: var(--accent-primary);
    border-radius: 50%;
    cursor: pointer;
    box-shadow: 0 0 20px rgba(67, 97, 238, 0.6);
}

.calc-result {
    background: var(--bg-tertiary);
    padding: 40px;
    border-radius: 20px;
    text-align: center;
    display: flex;
    flex-direction: column;
    justify-content: center;
}

.calc-result-value {
    font-size: 4.5rem;
    font-family: var(--font-heading);
    color: var(--accent-tertiary);
    font-weight: 900;
    margin: 20px 0;
}

/* ==========================================================================
   CAMPAIGN REPORTS / CHART ANIMATIONS
   ========================================================================== */
.reports-section {
    padding: var(--section-padding) 0;
    background: var(--bg-tertiary);
}

.chart-container {
    height: 400px;
    display: flex;
    align-items: flex-end;
    gap: 20px;
    padding: 40px;
    background: var(--bg-main);
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.chart-bar {
    flex: 1;
    background: var(--gradient-glow);
    border-radius: 10px 10px 0 0;
    position: relative;
    height: 0;
    /* Animated via JS */
    transition: height 1.5s var(--ease-out-expo);
}

.chart-bar::after {
    content: attr(data-value);
    position: absolute;
    top: -30px;
    left: 50%;
    transform: translateX(-50%);
    font-family: var(--font-heading);
    font-weight: bold;
    opacity: 0;
    transition: opacity 0.5s 1s;
}

.chart-bar.animated::after {
    opacity: 1;
}

/* ==========================================================================
   TESTIMONIALS
   ========================================================================== */
.testimonials-section {
    padding: var(--section-padding) 0;
    overflow: hidden;
}

.testimonial-track {
    display: flex;
    gap: 40px;
    width: max-content;
    animation: scrollTrack 30s linear infinite;
}

.testimonial-card {
    width: 450px;
    background: var(--bg-secondary);
    padding: 40px;
    border-radius: 20px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.testi-text {
    font-size: 1.2rem;
    font-style: italic;
    margin-bottom: 30px;
    color: var(--text-secondary);
}

.testi-author {
    display: flex;
    align-items: center;
    gap: 20px;
}

.author-avatar {
    width: 60px;
    height: 60px;
    background: var(--accent-secondary);
    border-radius: 50%;
}

@keyframes scrollTrack {
    0% {
        transform: translateX(0);
    }

    100% {
        transform: translateX(-50%);
    }
}

/* ==========================================================================
   CONTACT FORM SECTION
   ========================================================================== */
.contact-section {
    padding: var(--section-padding) 0;
    background: var(--bg-tertiary);
    position: relative;
}

.contact-wrapper {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 80px;
    background: var(--bg-main);
    padding: 80px;
    border-radius: 30px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.form-group {
    position: relative;
    margin-bottom: 30px;
}

.form-input {
    width: 100%;
    background: transparent;
    border: none;
    border-bottom: 2px solid rgba(255, 255, 255, 0.1);
    padding: 15px 0;
    color: var(--text-primary);
    font-size: 1.1rem;
    font-family: var(--font-body);
    outline: none;
    transition: var(--transition-fast);
}

.form-input:focus {
    border-color: var(--accent-primary);
}

.form-label {
    position: absolute;
    left: 0;
    top: 15px;
    color: var(--text-secondary);
    pointer-events: none;
    transition: var(--transition-fast);
}

.form-input:focus~.form-label,
.form-input:valid~.form-label {
    top: -10px;
    font-size: 0.8rem;
    color: var(--accent-primary);
}

/* ==========================================================================
   FOOTER
   ========================================================================== */
.site-footer {
    background: #020203;
    /* Darker than main for contrast */
    padding: 100px 0 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1fr;
    gap: 60px;
    margin-bottom: 80px;
}

.footer-logo img {
    height: 50px;
    margin-bottom: 30px;
    filter: brightness(0) invert(1);
}

.footer-desc {
    color: var(--text-secondary);
    max-width: 300px;
}

.footer-title {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    margin-bottom: 30px;
}

.footer-links li {
    margin-bottom: 15px;
}

.footer-links a {
    color: var(--text-secondary);
    transition: var(--transition-fast);
}

.footer-links a:hover {
    color: var(--accent-primary);
    padding-left: 10px;
}

.footer-bottom {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 40px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    color: var(--text-secondary);
}

/* ==========================================================================
   LIVE CHAT WIDGET
   ========================================================================== */
.chat-widget {
    position: fixed;
    bottom: 40px;
    right: 40px;
    z-index: var(--z-chat);
}

.chat-btn {
    width: 70px;
    height: 70px;
    background: var(--gradient-glow);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 10px 30px rgba(114, 9, 183, 0.4);
    transition: transform 0.3s;
}

.chat-btn:hover {
    transform: scale(1.1);
}

.chat-btn svg {
    width: 30px;
    height: 30px;
    fill: white;
}

.chat-box {
    position: absolute;
    bottom: 90px;
    right: 0;
    width: 350px;
    background: var(--bg-secondary);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    overflow: hidden;
    transform: translateY(20px);
    opacity: 0;
    pointer-events: none;
    transition: var(--transition-fast);
}

.chat-box.active {
    transform: translateY(0);
    opacity: 1;
    pointer-events: auto;
}

.chat-header {
    background: var(--bg-tertiary);
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    font-family: var(--font-heading);
    display: flex;
    justify-content: space-between;
}

.chat-body {
    padding: 20px;
    height: 300px;
    overflow-y: auto;
}

.chat-message {
    background: rgba(67, 97, 238, 0.1);
    padding: 15px;
    border-radius: 10px 10px 10px 0;
    margin-bottom: 15px;
    font-size: 0.9rem;
}

.chat-input {
    display: flex;
    padding: 15px;
    background: var(--bg-tertiary);
    border-top: 1px solid rgba(255, 255, 255, 0.05);
}

.chat-input input {
    flex: 1;
    background: transparent;
    border: none;
    color: white;
    outline: none;
}

/* ==========================================================================
   PAGE HEADERS (LEGAL / INNER PAGES)
   ========================================================================== */
.page-hero {
    height: 60vh;
    display: flex;
    align-items: center;
    justify-content: center;
    text-align: center;
    background: radial-gradient(circle at top, rgba(114, 9, 183, 0.1) 0%, rgba(5, 5, 7, 1) 70%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 80px;
}

.legal-content {
    padding: 80px 0 120px;
    max-width: 900px;
    margin: 0 auto;
}

.legal-content h2 {
    margin: 60px 0 20px;
    font-size: 2rem;
    color: var(--accent-primary);
}

.legal-content p,
.legal-content ul {
    margin-bottom: 20px;
    color: var(--text-secondary);
    font-size: 1.1rem;
}

.legal-content ul {
    padding-left: 20px;
    list-style: disc;
}

/* ==========================================================================
   UTILITY & ANIMATION CLASSES
   ========================================================================== */
.reveal {
    opacity: 0;
    transform: translateY(50px);
    transition: all 1s var(--ease-out-expo);
}

.reveal.active {
    opacity: 1;
    transform: translateY(0);
}

/* Responsive */
@media (max-width: 1024px) {

    .metrics-grid,
    .footer-grid,
    .calc-container,
    .contact-wrapper {
        grid-template-columns: 1fr;
    }

    .hero-3d-element {
        display: none;
    }

    .main-nav {
        display: none;
        /* Mobile menu logic to be handled if needed */
    }
}