:root {
    --bg: #04040a;
    --panel: #0b0b12;
    --muted: #9aa0c7;
    --text: #e9eefc;
    --accent: #7c5cff;
    --accent-2: #00e1ff;
    --glass: rgba(255, 255, 255, 0.04);
    --glass-border: rgba(124, 92, 255, 0.14);
    --max-width: 1100px;
    --nav-height: 80px;
}

* {
    box-sizing: border-box;
}

html,
body {
    height: 100%;
}

body {
    margin: 0;
    font-family: "Inter", system-ui, -apple-system, sans-serif;
    color: var(--text);
    background: radial-gradient(1200px 600px at 10% 10%, rgba(124, 92, 255, 0.06), transparent 6%),
        radial-gradient(1000px 500px at 90% 90%, rgba(0, 225, 255, 0.03), transparent 6%),
        var(--bg);
    line-height: 1.5;
    overflow-x: hidden;
}

.container {
    max-width: var(--max-width);
    margin: 0 auto;
    padding: 0 20px;
}

/* Header & Nav */
header.site-header {
    position: sticky;
    top: 0;
    z-index: 100;
    background: rgba(3, 3, 6, 0.75);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    height: var(--nav-height);
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

/* Nav Dropdown */
header.site-header .main-nav .dropdown {
    position: relative;
    display: inline-block;
}

header.site-header .main-nav .dropdown-menu {
    position: absolute;
    top: 100%;
    left: 0;
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: 8px;
    width: 240px;
    padding: 10px 0;
    display: none;
    flex-direction: column;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.5);
    backdrop-filter: blur(20px);
    z-index: 1000;
}

header.site-header .main-nav .dropdown:hover .dropdown-menu {
    display: flex;
    animation: fadeIn 0.2s ease;
}

header.site-header .main-nav .dropdown-menu a {
    display: flex !important;
    align-items: center;
    gap: 10px;
    padding: 10px 20px;
    color: var(--muted);
    font-size: 0.95rem;
    transition: all 0.3s ease;
    white-space: nowrap;
}

header.site-header .main-nav .dropdown-menu a:hover,
header.site-header .main-nav .dropdown-menu a.active {
    background: rgba(255, 255, 255, 0.03);
    color: var(--accent-2);
    padding-left: 25px;
    /* slight nudge */
}

/* Mobile Dropdown */
.mobile-dropdown {
    width: 100%;
    text-align: center;
    margin-bottom: 20px;
}

.mobile-dropdown-title {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    display: block;
    margin-bottom: 15px;
}

.mobile-dropdown-content {
    display: flex;
    flex-direction: column;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
}

.mobile-dropdown-content a {
    font-size: 1.1rem !important;
    margin: 0 !important;
    color: var(--muted) !important;
}

.mobile-dropdown-content a.active {
    color: var(--accent-2) !important;
}

/* Sticky Header specific adjustments for dropdown */
header.site-header.scrolled .dropdown-menu {
    background: rgba(11, 11, 18, 0.95);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.nav-inner {
    display: flex;
    align-items: center;
    justify-content: space-between;
    width: 100%;
}

.brand {
    display: flex;
    align-items: center;
    gap: 12px;
    text-decoration: none;
    color: var(--text);
}

.brand .logo {
    width: 44px;
    height: 44px;
    border-radius: 10px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    color: #041022;
    box-shadow: 0 8px 30px rgba(124, 92, 255, 0.2);
    font-size: 1.1rem;
}

.brand .title {
    font-weight: 700;
    font-size: 1.1rem;
    letter-spacing: -0.02em;
}

nav.main-nav {
    display: flex;
    gap: 24px;
    align-items: center;
}

nav.main-nav a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 600;
    font-size: 0.95rem;
    transition: color 0.2s;
    position: relative;
}

nav.main-nav a:hover,
nav.main-nav a.active {
    color: var(--text);
}

nav.main-nav a::after {
    content: '';
    position: absolute;
    bottom: -4px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--accent);
    transition: width 0.3s ease;
    border-radius: 2px;
}

nav.main-nav a:hover::after {
    width: 100%;
}

.cta-btn {
    background: linear-gradient(90deg, var(--accent), var(--accent-2));
    color: #041022;
    padding: 12px 24px;
    border-radius: 999px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.6);
    text-decoration: none;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: all 0.3s ease;
    font-size: 0.95rem;
}

.cta-btn:hover {
    transform: translateY(-3px);
    box-shadow: 0 18px 45px rgba(124, 92, 255, 0.25);
}

.cta-btn.secondary {
    background: transparent;
    border: 1px solid var(--glass-border);
    color: var(--text);
    box-shadow: none;
}

.cta-btn.secondary:hover {
    background: var(--glass);
    box-shadow: 0 5px 20px rgba(0, 0, 0, 0.2);
}

/* Mobile Menu Toggle */
.mobile-toggle {
    display: none;
    flex-direction: column;
    gap: 6px;
    cursor: pointer;
    padding: 4px;
    z-index: 101;
}

.mobile-toggle span {
    width: 24px;
    height: 2px;
    background: var(--text);
    border-radius: 2px;
    transition: all 0.3s ease;
}

/* Mobile Nav Overlay */
/* Mobile Nav Overlay & Logic */
.mobile-nav-overlay {
    position: fixed;
    top: 0;
    right: 0;
    width: 100%;
    height: 100vh;
    background: rgba(4, 4, 10, 0.98);
    backdrop-filter: blur(25px);
    z-index: 90;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    align-items: center;
    gap: 20px;
    padding-top: 100px;
    padding-bottom: 40px;
    transform: translateX(100%);
    transition: transform 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    overflow-y: auto;
}

.mobile-nav-overlay.active {
    transform: translateX(0);
}

.mobile-nav-overlay a {
    font-size: 1.5rem;
    font-weight: 700;
    color: var(--text);
    text-decoration: none;
    padding: 10px;
}

.mobile-nav-overlay a:hover {
    color: var(--accent);
}

.mobile-dropdown-title {
    color: var(--text);
    font-size: 1.5rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    cursor: pointer;
    padding: 10px;
}

.mobile-dropdown-content {
    display: none;
    flex-direction: column;
    align-items: center;
    gap: 15px;
    background: rgba(255, 255, 255, 0.03);
    padding: 20px;
    border-radius: 12px;
    width: 90%;
    margin-top: 10px;
}

.mobile-dropdown-content.active {
    display: flex;
    animation: fadeIn 0.3s ease;
}

.mobile-dropdown-content a {
    font-size: 1.15rem !important;
    margin: 0 !important;
    color: var(--muted) !important;
    width: 100%;
    text-align: center;
}

.mobile-dropdown-content a.active {
    color: var(--accent-2) !important;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 8px;
}

/* =========================================
   CORE SECTIONS (RESTORED & ENHANCED)
   ========================================= */

/* Hero Section */
.hero {
    min-height: 85vh;
    display: grid;
    align-items: center;
    padding: 80px 0;
    position: relative;
}

.hero-grid {
    display: grid;
    grid-template-columns: 1fr 440px;
    gap: 60px;
    align-items: center;
}

.hero-eyebrow {
    color: var(--accent);
    font-weight: 700;
    margin-bottom: 16px;
    display: inline-block;
    padding: 8px 16px;
    background: rgba(124, 92, 255, 0.1);
    border-radius: 30px;
    font-size: 0.9rem;
    border: 1px solid rgba(124, 92, 255, 0.2);
    box-shadow: 0 0 15px rgba(124, 92, 255, 0.1);
}

h1.hero-title {
    font-size: clamp(2.5rem, 5vw, 4.2rem);
    line-height: 1.1;
    margin: 0 0 24px 0;
    background: linear-gradient(90deg, #fff 0%, rgba(124, 92, 255, 0.9) 100%);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.03em;
    filter: drop-shadow(0 0 30px rgba(124, 92, 255, 0.2));
}

p.hero-sub {
    color: var(--muted);
    font-size: 1.15rem;
    max-width: 600px;
    line-height: 1.6;
    margin-bottom: 30px;
}

ul.hero-bullets {
    display: flex;
    gap: 12px;
    margin-bottom: 32px;
    flex-wrap: wrap;
    padding: 0;
    list-style: none;
}

ul.hero-bullets li {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid var(--glass-border);
    padding: 10px 18px;
    border-radius: 12px;
    color: var(--text);
    font-weight: 500;
    font-size: 0.95rem;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.3s;
}

ul.hero-bullets li:hover {
    background: rgba(255, 255, 255, 0.06);
    transform: translateY(-2px);
}

ul.hero-bullets li i {
    color: var(--accent-2);
}

/* Featured Panel */
.panel {
    background: linear-gradient(180deg, rgba(20, 20, 30, 0.8), rgba(11, 11, 18, 0.95));
    border-radius: 24px;
    padding: 35px;
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.5), inset 0 0 0 1px rgba(255, 255, 255, 0.03);
    position: relative;
    overflow: hidden;
    backdrop-filter: blur(10px);
}

.panel::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, transparent, var(--accent), transparent);
}

.panel h3 {
    margin: 0 0 16px 0;
    font-size: 1.5rem;
    color: var(--text);
    font-weight: 700;
}

.kpi {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    margin-top: 24px;
}

.kpi-item {
    background: rgba(255, 255, 255, 0.03);
    padding: 16px;
    border-radius: 16px;
    border: 1px solid rgba(255, 255, 255, 0.03);
    text-align: center;
}

.k {
    font-weight: 800;
    font-size: 2rem;
    color: var(--accent-2);
    line-height: 1;
    margin-bottom: 6px;
    text-shadow: 0 0 15px rgba(0, 225, 255, 0.3);
}

.small {
    font-size: 0.85rem;
    color: var(--muted);
    line-height: 1.4;
}

/* Sections & Cards */
.section {
    padding: 120px 0;
}

.section h2 {
    font-size: clamp(2rem, 4vw, 3rem);
    text-align: center;
    margin-bottom: 60px;
    color: var(--text);
    letter-spacing: -0.02em;
}

.grid-3 {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 30px;
}

.card {
    background: rgba(11, 11, 18, 0.6);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 20px;
    padding: 35px;
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    position: relative;
    z-index: 1;
    overflow: hidden;
}

.card:hover {
    transform: translateY(-10px) scale(1.02);
    box-shadow: 0 20px 50px rgba(124, 92, 255, 0.15);
    border-color: rgba(124, 92, 255, 0.3);
    background: rgba(20, 20, 30, 0.8);
}

.card h4 {
    margin: 0 0 14px 0;
    color: var(--text);
    /* Clean text color */
    font-size: 1.35rem;
    font-weight: 700;
}

.card h4 i {
    background: rgba(124, 92, 255, 0.15);
    width: 40px;
    height: 40px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    border-radius: 10px;
    margin-right: 12px;
    color: var(--accent);
    box-shadow: 0 5px 15px rgba(124, 92, 255, 0.1);
}

.muted {
    color: var(--muted);
    font-size: 1rem;
    line-height: 1.6;
}

.two-col {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 50px;
    align-items: start;
}

.feature {
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.03), transparent);
    padding: 28px;
    border-radius: 18px;
    border: 1px solid rgba(255, 255, 255, 0.04);
    margin-bottom: 24px;
    transition: background 0.3s;
}

.feature:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: rgba(124, 92, 255, 0.2);
}

.outcomes {
    display: flex;
    gap: 16px;
    flex-wrap: wrap;
    justify-content: center;
    margin-top: 30px;
}

.outcome {
    background: rgba(124, 92, 255, 0.08);
    border-radius: 100px;
    padding: 14px 24px;
    color: var(--text);
    font-weight: 600;
    font-size: 1rem;
    border: 1px solid rgba(124, 92, 255, 0.15);
    transition: all 0.3s;
}

.outcome:hover {
    background: rgba(124, 92, 255, 0.15);
    border-color: var(--accent);
    transform: translateY(-2px);
}

/* Testimonials */
.testimonials {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 30px;
}

.quote {
    padding: 35px;
    border-radius: 20px;
    background: radial-gradient(circle at top right, rgba(255, 255, 255, 0.05), transparent 40%),
        rgba(11, 11, 18, 0.6);
    border: 1px solid rgba(255, 255, 255, 0.05);
    position: relative;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
}

.quote strong {
    display: block;
    margin-bottom: 12px;
    color: var(--accent);
    font-size: 1.1rem;
}

/* About */
.about-grid {
    display: grid;
    grid-template-columns: 200px 1fr;
    gap: 50px;
    align-items: center;
}

.avatar {
    width: 180px;
    height: 180px;
    border-radius: 30px;
    background: linear-gradient(135deg, var(--accent), var(--accent-2));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 800;
    font-size: 48px;
    color: #041022;
    box-shadow: 0 20px 60px rgba(124, 92, 255, 0.3);
    transform: rotate(-3deg);
    transition: transform 0.4s;
}

.avatar:hover {
    transform: rotate(0deg) scale(1.05);
}

/* Contact Section & Footer */
footer.site-footer {
    padding: 80px 0 30px;
    background: #020205;
    /* Blacker footer */
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    margin-top: 80px;
}

.footer-grid {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr 1.5fr;
    gap: 40px;
    margin-bottom: 60px;
}

.footer-col h5 {
    color: var(--text);
    font-size: 1.1rem;
    margin: 0 0 24px 0;
    font-weight: 700;
}

.footer-col ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-col ul li {
    margin-bottom: 14px;
}

.footer-col ul li a {
    color: var(--muted);
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-col ul li a:hover {
    color: var(--accent-2);
    padding-left: 5px;
    /* Tiny animation */
}

.contact-info {
    color: var(--muted);
    font-size: 0.95rem;
    line-height: 1.7;
}

.bottom-bar {
    text-align: center;
    padding-top: 30px;
    border-top: 1px solid rgba(255, 255, 255, 0.03);
    color: rgba(255, 255, 255, 0.3);
    font-size: 0.9rem;
}


/* Responsive Typography & Layout Overrides */
@media (max-width: 980px) {
    .container {
        padding: 0 25px;
    }

    .hero-grid {
        grid-template-columns: 1fr;
        text-align: center;
        gap: 50px;
    }

    .hero-grid aside.panel {
        /* On medium screens, show panel but perhaps simpler or below */
        display: block;
        margin-top: 0;
    }

    h1.hero-title {
        font-size: clamp(2.5rem, 6vw, 4rem);
        /* Responsive scaling */
    }

    .grid-3 {
        grid-template-columns: repeat(2, 1fr);
    }

    .testimonials {
        grid-template-columns: 1fr;
    }

    .about-grid {
        grid-template-columns: 1fr;
        text-align: center;
        justify-items: center;
    }

    nav.main-nav,
    .site-header .cta-btn {
        display: none;
    }

    .mobile-toggle {
        display: flex;
        margin-left: auto;
        /* Push to right */
    }

    .nav-inner {
        justify-content: flex-start;
        /* Brand left, Toggle right via margin-auto */
    }
}

@media (max-width: 768px) {
    .hero {
        padding: 40px 0;
        min-height: auto;
    }

    .section {
        padding: 60px 0;
    }

    .case-study-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .image-frame {
        transform: none !important;
        margin-top: 20px;
    }

    /* Flip order manually if helpful, but usually stacking is fine */
}

@media (max-width: 640px) {
    .container {
        padding: 0 20px;
    }

    .grid-3 {
        grid-template-columns: 1fr;
    }

    .two-col {
        grid-template-columns: 1fr;
    }

    .footer-grid {
        grid-template-columns: 1fr;
        gap: 40px;
        text-align: center;
    }

    .footer-col h5::after {
        content: '';
        display: block;
        width: 30px;
        height: 2px;
        background: var(--accent);
        margin: 10px auto;
        /* Centers underline */
    }

    .footer-col .brand {
        justify-content: center;
    }

    .footer-col div[style*="display:flex"] {
        justify-content: center;
        /* Center social icons */
    }

    h1.hero-title {
        font-size: 2.4rem;
        /* Specific fix for small mobiles */
    }

    p.hero-sub {
        font-size: 1.05rem;
    }

    .kpi {
        grid-template-columns: 1fr 1fr;
        /* Keep 2 cols on mobile for density */
        gap: 15px;
    }

    .k {
        font-size: 1.6rem;
    }

    .cta-btn {
        width: 100%;
        /* Full width buttons for easier tapping */
        margin-bottom: 10px;
    }

    /* Ensure hero buttons stack */
    .hero div[style*="display:flex"] {
        flex-direction: column;
        width: 100%;
    }

    /* Sticky CTA text hide? No, keep it short */
    .sticky-cta span:last-child {
        display: none;
        /* Hides text, shows icon only on small screens? */
    }

    .sticky-cta:hover span:last-child {
        display: inline;
        /* Show on hover maybe? */
    }

    /* Actually better to keep text if it fits, or simple icon */
    .sticky-cta {
        padding: 12px;
        border-radius: 50%;
        bottom: 20px;
        right: 20px;
        width: 50px;
        height: 50px;
        justify-content: center;
    }

    .sticky-cta span:last-child {
        display: none;
    }

    .sticky-cta span:first-child {
        font-size: 1.2rem;
        margin: 0;
    }
}

/* Utils */
.reveal {
    opacity: 0;
    transform: translateY(20px);
    transition: opacity 0.8s ease, transform 0.8s ease;
}

.reveal.visible {
    opacity: 1;
    transform: none;
}

/* Table Wrapper for Case Studies */
.vs-table-wrapper {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
    margin-bottom: 30px;
}

.vs-table {
    width: 100%;
    border-collapse: collapse;
    min-width: 600px;
    /* Ensure readability on overflowing mobile */
}

.vs-table th {
    text-align: left;
    padding: 20px;
    border-bottom: 2px solid rgba(255, 255, 255, 0.05);
    font-size: 1.1rem;
    color: var(--text);
}

.vs-table th.brand-col {
    color: var(--accent-2);
}

.vs-table td {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.03);
    color: var(--muted);
    font-size: 1rem;
    vertical-align: top;
}

.vs-table tr:last-child td {
    border-bottom: none;
}

.vs-table .check-icon {
    color: #25d366;
    margin-right: 8px;
}

.vs-table .cross-icon {
    color: #ff4757;
    margin-right: 8px;
}

.vs-table .highlight-cell {
    background: rgba(124, 92, 255, 0.05);
    color: #fff;
    font-weight: 500;
}

/* Case Study Styles */
.case-study-card {
    background: var(--panel);
    border: 1px solid var(--glass-border);
    border-radius: 24px;
    padding: 40px;
    margin-bottom: 60px;
    position: relative;
    overflow: hidden;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.case-study-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.5);
    border-color: rgba(124, 92, 255, 0.3);
}

.case-study-grid {
    display: grid;
    grid-template-columns: 1.1fr 0.9fr;
    gap: 60px;
    align-items: center;
}

.case-study-tag {
    background: rgba(124, 92, 255, 0.1);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.85rem;
    font-weight: 700;
    display: inline-block;
    border: 1px solid rgba(124, 92, 255, 0.2);
}

.case-study-meta {
    display: flex;
    align-items: center;
    gap: 15px;
    margin-bottom: 24px;
}

.case-study-kpi-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 20px;
    background: rgba(255, 255, 255, 0.02);
    padding: 24px;
    border-radius: 16px;
    margin: 30px 0;
    border: 1px solid rgba(255, 255, 255, 0.03);
}

.image-frame {
    background: var(--bg);
    padding: 12px;
    border-radius: 16px;
    border: 1px solid var(--glass-border);
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    position: relative;
    transform: perspective(1000px) rotateY(-5deg);
    transition: transform 0.5s ease;
}

.case-study-card:hover .image-frame {
    transform: perspective(1000px) rotateY(0deg);
}

.image-frame img {
    width: 100%;
    border-radius: 8px;
    display: block;
}

@media (max-width: 900px) {
    .case-study-grid {
        grid-template-columns: 1fr;
        gap: 40px;
    }

    .image-frame {
        transform: none;
        margin-top: 30px;
    }
}