:root,
[data-theme="dark"] {
    --bg-dark: #000000;
    --bg-panel: rgba(255, 255, 255, 0.02);
    --bg-panel-hover: rgba(255, 255, 255, 0.05);
    --border-color: rgba(255, 255, 255, 0.08);
    --text-primary: #ffffff;
    --text-secondary: #888888;
    --accent-glow: rgba(45, 108, 244, 0.3);
    --gradient-start: #2d6cf4;
    --gradient-end: #4cd2ff;
    --transition-smooth: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
    --font-main: 'Inter', 'Outfit', sans-serif;
    --hero-text-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    --bento-wide-bg: linear-gradient(135deg, rgba(94, 114, 235, 0.15), rgba(255, 145, 144, 0.15));
}

[data-theme="light"] {
    --bg-dark: #fbfbfd;
    --bg-panel: rgba(0, 0, 0, 0.02);
    --bg-panel-hover: rgba(0, 0, 0, 0.05);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #1d1d1f;
    --text-secondary: #86868b;
    --accent-glow: rgba(0, 113, 227, 0.15);
    --gradient-start: #0071e3;
    --gradient-end: #4cd2ff;
    --hero-text-shadow: 0 5px 15px rgba(0, 0, 0, 0.1);
}



.cyntch-tag {
    color: var(--gradient-end);
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.15em;
    text-transform: uppercase;
    margin-bottom: 1rem;
    display: inline-block;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

@media (min-width: 769px) {

    *,
    *::before,
    *::after {
        cursor: none !important;
    }
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    font-family: var(--font-main);
    line-height: 1.6;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}

/* Custom Cursor */
.cursor-dot,
.cursor-follower {
    position: fixed;
    top: 0;
    left: 0;
    pointer-events: none;
    z-index: 999999;
    border-radius: 50%;
    /* transform: translate(-50%, -50%); Removed to let GSAP handle xPercent/yPercent natively without conflict */
}

.cursor-dot {
    width: 6px;
    height: 6px;
    background: var(--text-primary);
    margin-left: -3px;
    margin-top: -3px;
}

.cursor-follower {
    width: 40px;
    height: 40px;
    border: 1px solid rgba(255, 255, 255, 0.5);
    margin-left: -20px;
    margin-top: -20px;
    transition: width 0.3s, height 0.3s, background 0.3s, border 0.3s;
}

.cursor-follower.hover-active {
    width: 60px;
    height: 60px;
    background: rgba(255, 255, 255, 0.1);
    border: 1px solid transparent;
}



/* Antigravity Canvas Background */
#antigravity-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    z-index: -2;
    background: transparent;
    pointer-events: none;
    /* Let clicks pass through to interactive elements */
}

/* Typography */
h1,
h2,
h3,
h4 {
    font-weight: 600;
    letter-spacing: -0.02em;
    line-height: 1.1;
    margin-bottom: 1rem;
}

h1 {
    font-size: 4rem;
    text-shadow: var(--hero-text-shadow);
}

h2 {
    font-size: 3rem;
}

h3 {
    font-size: 1.5rem;
}

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
    font-size: 1.05rem;
}

.gradient-text {
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    color: transparent;
}

/* Glassmorphism Panels -> Cyntch Hard Panels */
.glass-panel {
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    /* Sharper corners like Cyntch */
    padding: 2.5rem;
    position: relative;
    overflow: hidden;
    transition: border-color 0.4s, background 0.4s, box-shadow 0.4s;
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.05), 0 10px 30px rgba(0, 0, 0, 0.1);
}

/* === Partner Logo Filters (theme-aware) === */
.partner-logo {
    filter: grayscale(100%) brightness(200%);
    opacity: 0.7;
    transition: opacity 0.3s, filter 0.3s;
}

.partner-logo:hover {
    opacity: 1;
}



/* === Trusted-By Section Layout === */
.trusted-by {
    padding: 4rem 2rem 6rem;
    border-top: 1px solid var(--border-color);
    border-bottom: 1px solid var(--border-color);
    text-align: center;
}

.trusted-label {
    font-size: 0.78rem;
    font-weight: 600;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-secondary);
    margin-bottom: 2.5rem;
}

.trusted-logos {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 4rem;
    flex-wrap: wrap;
}


/* Remove the old glass glare */
.glass-panel::before {
    display: none;
}

.glass-panel.interactive:hover,
.bento-item:hover {
    background: var(--bg-panel-hover);
    border-color: rgba(255, 255, 255, 0.2);
    box-shadow: inset 0 1px 1px rgba(255, 255, 255, 0.1), 0 20px 40px rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .glass-panel.interactive:hover,

/* Premium Glare Effect for 3D Tilt */
.card-glare {
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle at center, rgba(255, 255, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    pointer-events: none;
    mix-blend-mode: overlay;
    transform: translate(-50%, -50%);
    z-index: 10;
}


/* Navbar - Default Top State */
.navbar {
    position: fixed;
    top: 20px;
    right: 50%;
    transform: translate(50%, 0);
    width: calc(100% - 40px);
    max-width: 1200px;
    z-index: 1000;
    background: rgba(10, 10, 12, 0.3);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.05);
    border-radius: 50px;
    padding: 0.5rem 2rem;
    /* Remove 'all' transition to break the flying layout interpolation */
    transition: width 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        height 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        padding 0.6s cubic-bezier(0.16, 1, 0.3, 1),
        background-color 0.4s ease,
        border-color 0.4s ease,
        box-shadow 0.4s ease,
        border-radius 0.6s cubic-bezier(0.16, 1, 0.3, 1);
    animation: navSlideDown 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.1);
}

/* Mobile Nav Overlay */
.mobile-nav {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 12, 0.98);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    z-index: 2000;
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    visibility: hidden;
    transition: all 0.6s cubic-bezier(0.16, 1, 0.3, 1);
}

.mobile-nav.open {
    opacity: 1;
    visibility: visible;
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2.5rem;
    text-align: center;
}

.mobile-nav a {
    font-size: 2.5rem;
    font-weight: 600;
    color: var(--text-primary);
    text-decoration: none;
    transition: var(--transition-smooth);
    letter-spacing: -0.04em;
}

.mobile-nav a:hover {
    color: var(--gradient-end);
    transform: scale(1.1);
}

.close-btn {
    position: absolute;
    top: 40px;
    right: 40px;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

.menu-btn {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: pointer;
}

@media (max-width: 1024px) {
    .nav-links {
        display: none;
    }
    .menu-btn {
        display: block;
    }
}


/* Navbar - Scrolled State (Vertical Pill) */
.navbar.scrolled {
    top: 50%;
    right: 20px;
    left: auto;
    transform: translateY(-50%);
    width: 65px;
    height: auto;
    /* Compact closed state */
    background: var(--bg-panel);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--border-color);
    border-radius: 40px;
    padding: 1.5rem 0;
    box-shadow: 0 15px 35px rgba(0, 0, 0, 0.3);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled:hover {
    width: 240px;
    padding: 2.5rem;
    border-radius: 30px;
}

.nav-container {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled .nav-container {
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 0;
    gap: 0;
}



.logo {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
    text-decoration: none;
    letter-spacing: -0.05em;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), margin 0.5s ease;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    z-index: 1001;
}

.navbar.scrolled .logo {
    transform: rotate(90deg);
}

.navbar.scrolled:hover .logo {
    transform: rotate(0deg);
    margin-bottom: 0.5rem;
}

.logo-text {
    overflow: hidden;
    white-space: nowrap;
    transition: all 0.4s ease;
}

.navbar.scrolled .logo-text {
    max-width: 0;
    opacity: 0;
}

.navbar.scrolled:hover .logo-text {
    max-width: 200px;
    opacity: 1;
}

.nav-links {
    display: flex;
    align-items: center;
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}

.navbar.scrolled .nav-links {
    flex-direction: column !important;
    gap: 1.2rem !important;
    max-height: 0;
    opacity: 0;
    overflow: hidden;
    pointer-events: none;
    margin: 0;
}

.navbar.scrolled:hover .nav-links {
    max-height: 400px;
    opacity: 1;
    pointer-events: auto;
    margin: 1.5rem 0; /* Creates the gap beautifully only when open */
}

.nav-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2.5rem;
    font-weight: 500;
    font-size: 1rem;
    transition: var(--transition-smooth);
    position: relative;
    padding-bottom: 5px;
}

.navbar.scrolled .nav-links a {
    margin-left: 0;
    font-size: 1.15rem;
}

.nav-links a:hover,
.nav-links a.active {
    color: var(--text-primary);
}

.nav-links a::after {
    content: '';
    position: absolute;
    bottom: -6px;
    left: 0;
    width: 0%;
    height: 2px;
    background: var(--gradient-start);
    transition: width 0.3s;
}

.nav-links a.active::after,
.nav-links a:hover::after {
    width: 100%;
}

.nav-actions {
    display: flex;
    align-items: center;
    gap: 1.5rem;
}

.navbar.scrolled .nav-actions {
    flex-direction: column;
}

.menu-btn,
.close-btn {
    background: none;
    border: none;
    color: var(--text-primary);
    cursor: none;
    display: none;
}

.mobile-nav {
    position: fixed;
    top: 0;
    right: -100%;
    width: 100%;
    height: 100vh;
    background: rgba(10, 10, 12, 0.95);
    backdrop-filter: blur(20px);
    z-index: 1001;
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
}

.mobile-nav.open {
    right: 0;
}

.mobile-nav-inner {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2rem;
    position: relative;
    width: 100%;
}

.close-btn {
    position: absolute;
    top: -50px;
    right: 20px;
}

.mobile-nav a {
    color: var(--text-primary);
    font-size: 1.5rem;
    text-decoration: none;
    font-weight: 600;
    position: relative;
}

.mobile-nav a:hover {
    color: var(--gradient-end);
}

/* --- Profile Dropdown Navbar --- */
.auth-nav-block {
    display: flex;
    align-items: center;
    gap: 1rem;
}

.profile-trigger {
    position: relative;
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid transparent;
    transition: border-color 0.3s transform 0.2s;
}

.profile-trigger:hover {
    border-color: var(--gradient-end);
    transform: scale(1.05);
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 15px);
    right: 0;
    width: 220px;
    background: var(--bg-panel);
    border: 1px solid var(--border-color);
    border-radius: 16px;
    padding: 1rem 0;
    box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: opacity 0.3s, transform 0.3s, visibility 0.3s;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.profile-header {
    padding: 0 1.5rem 1rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.5rem;
}


.profile-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.profile-role {
    font-size: 0.75rem;
    color: var(--gradient-end);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    font-weight: 600;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.6rem 1.5rem;
    color: var(--text-secondary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: color 0.2s, background 0.2s;
}

.profile-link:hover {
    color: var(--text-primary);
    background: rgba(255, 255, 255, 0.03);
}


.profile-link i {
    width: 16px;
    height: 16px;
}

/* Main Content area */
main {
    max-width: 1600px;
    margin: 0 auto;
    padding: 160px 2rem 6rem;
}

.section-padding {
    padding: 10rem 0;
}

.section-title {
    text-align: center;
    margin-bottom: 4rem;
    font-size: 3.5rem;
}

/* Buttons */
.btn-primary {
    display: inline-block;
    background: var(--text-primary);
    color: var(--bg-dark);
    padding: 1rem 2.5rem;
    border-radius: 40px;
    text-decoration: none;
    font-weight: 600;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
    margin-top: 1.5rem;
    cursor: none;
}

.btn-primary:hover {
    transform: scale(1.05);
    box-shadow: 0 0 30px rgba(255, 255, 255, 0.3);
}

/* Hero & Bento Grid */
.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    grid-auto-rows: 280px;
    gap: 1.5rem;
    margin-top: 3rem;
    perspective: 1000px;
}

.bento-item {
    display: flex;
    flex-direction: column;
    justify-content: center;
    position: relative;
    /* transform-style: preserve-3d; for 3d hover */
}

.bento-large {
    grid-column: span 2;
    grid-row: span 2;
    justify-content: center;
    align-items: flex-start;
}

.bento-wide {
    grid-column: span 2;
    background: var(--bento-wide-bg);
}

.bento-medium {
    grid-column: span 1;
    grid-row: span 2;
}

.bento-small {
    grid-column: span 1;
    grid-row: span 1;
    align-items: center;
    text-align: center;
}

.bento-icon {
    width: 36px;
    height: 36px;
    margin-bottom: 1.5rem;
    color: var(--gradient-start);
}

.glow-sphere {
    position: absolute;
    bottom: -50px;
    right: -50px;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, var(--accent-glow) 0%, transparent 70%);
    border-radius: 50%;
    z-index: -1;
    filter: blur(20px);
}

.stat-number {
    font-size: 4rem;
    margin-bottom: 0.5rem;
    background: linear-gradient(135deg, var(--gradient-start), var(--gradient-end));
    -webkit-background-clip: text;
    background-clip: text;
    color: transparent;
    -webkit-text-fill-color: transparent;
    display: inline-block; /* Fixes disappearing background clip bugs */
    transform: translateZ(0); /* Hardware acceleration to prevent flickering */
    will-change: transform, opacity;
}

/* Services */
.services-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(320px, 1fr));
    gap: 2.5rem;
}

.service-card {
    text-align: left;
    padding: 3rem;
}

.service-card i {
    width: 48px;
    height: 48px;
    margin-bottom: 2rem;
    color: var(--text-primary);
}

/* Video Showcase Section */
.video-showcase {
    position: relative;
    width: 100%;
}

.video-container {
    height: 600px;
    width: 100%;
    border-radius: 30px;
    overflow: hidden;
    position: relative;
    padding: 0;
    border: 1px solid rgba(255, 255, 255, 0.2);
}

.inner-video {
    width: 100%;
    height: 100%;
    object-fit: cover;
    opacity: 0.8;
}

.video-text-overlay {
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    padding: 4rem 3rem;
    background: linear-gradient(to top, rgba(0, 0, 0, 0.9), transparent);
}

/* FAQ Container Scrollbar */
.faq-container::-webkit-scrollbar {
    width: 6px;
}

.faq-container::-webkit-scrollbar-track {
    background: rgba(255, 255, 255, 0.02);
    border-radius: 10px;
}

.faq-container::-webkit-scrollbar-thumb {
    background: rgba(255, 255, 255, 0.15);
    border-radius: 10px;
}

.faq-container::-webkit-scrollbar-thumb:hover {
    background: var(--gradient-end);
}

/* Footer */
footer {
    padding: 4rem 2rem;
    border-top: 1px solid var(--border-color);
}

.footer-content {
    max-width: 1600px;
    margin: 0 auto;
    display: flex;
    justify-content: space-between;
}

.footer-links a {
    color: var(--text-secondary);
    text-decoration: none;
    margin-left: 2rem;
    font-size: 1.1rem;
    transition: var(--transition-smooth);
}

.footer-links a:hover {
    color: var(--text-primary);
}

.social-links {
    display: flex;
    gap: 1.5rem;
    margin-top: 1.5rem;
}

.social-links a {
    color: var(--text-secondary);
    transition: var(--transition-smooth);
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.social-links a:hover {
    color: var(--text-primary);
    background: var(--gradient-start);
    border-color: transparent;
    transform: translateY(-3px);
    box-shadow: 0 5px 15px rgba(94, 114, 235, 0.3);
}

.copyright {
    max-width: 1600px;
    margin: 3rem auto 0;
    text-align: center;
    color: var(--text-secondary);
    font-size: 0.95rem;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    padding-top: 2rem;
}

/* Responsive */
@media (max-width: 1024px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .bento-large {
        grid-column: span 2;
    }

    h1 {
        font-size: 3rem;
    }
}

@media (max-width: 768px) {
    html {
        cursor: auto;
    }

    .cursor-dot,
    .cursor-follower {
        display: none;
    }

    .nav-links {
        display: none;
    }

    .menu-btn,
    .close-btn {
        display: block;
    }

    .bento-grid {
        grid-template-columns: 1fr;
        grid-auto-rows: auto;
    }

    .bento-large,
    .bento-wide,
    .bento-medium,
    .bento-small {
        grid-column: span 1;
    }

    .bento-item {
        padding: 2.5rem;
        min-height: 250px;
    }

    .video-container {
        height: 400px;
    }
}

/* --- Theme Toggle Button --- */
.theme-toggle {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    width: 40px;
    height: 40px;
    border-radius: 50%;
    color: var(--text-primary);
    cursor: none;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    position: relative;
    overflow: hidden;
}

.theme-toggle:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: var(--gradient-end);
    transform: scale(1.1);
}

.theme-toggle i {
    position: absolute;
    width: 18px;
    height: 18px;
    transition: transform 0.5s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s;
}

/* Icons visibility logic */
.nav-icon-sun, .nav-icon-light { display: none; }
.nav-icon-moon, .nav-icon-dark { display: block; }

[data-theme="light"] .nav-icon-sun, [data-theme="light"] .nav-icon-light { display: block; }
[data-theme="light"] .nav-icon-moon, [data-theme="light"] .nav-icon-dark { display: none; }

[data-theme="light"] .theme-toggle {
    background: rgba(0, 0, 0, 0.05);
}

/* Mobile Theme Toggle Container */
.mobile-theme-toggle {
    margin-bottom: 2rem;
    display: flex;
    justify-content: center;
    width: 100%;
}

/* =========================================================
   PROFILE DROPDOWN (Injected by script.js)
   ========================================================= */
.profile-trigger {
    width: 38px;
    height: 38px;
    border-radius: 50%;
    overflow: hidden;
    cursor: pointer;
    border: 2px solid rgba(255, 255, 255, 0.15);
    transition: all 0.3s;
}

.profile-trigger:hover {
    border-color: var(--gradient-end);
    transform: scale(1.05);
}

.profile-trigger img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

.profile-dropdown {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    width: 240px;
    background: rgba(20, 20, 24, 0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 16px;
    padding: 0.5rem 0;
    z-index: 5000;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-8px) scale(0.96);
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.4);
    pointer-events: none;
}

.profile-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
    pointer-events: auto;
}

.profile-header {
    padding: 1rem 1.2rem 0.75rem;
    border-bottom: 1px solid rgba(255, 255, 255, 0.06);
    margin-bottom: 0.25rem;
}

.profile-name {
    font-weight: 600;
    font-size: 0.95rem;
    color: var(--text-primary);
    margin: 0 0 0.2rem 0;
}

.profile-role {
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: var(--gradient-end);
    margin: 0;
}

.profile-link {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.7rem 1.2rem;
    color: var(--text-primary);
    text-decoration: none;
    font-size: 0.9rem;
    transition: background 0.2s;
}

.profile-link:hover {
    background: rgba(255, 255, 255, 0.06);
}

.profile-link i {
    width: 16px;
    height: 16px;
    opacity: 0.7;
}

/* Light mode overrides */
[data-theme="light"] .profile-dropdown {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-trigger {
    border-color: rgba(0, 0, 0, 0.1);
}

[data-theme="light"] .profile-link:hover {
    background: rgba(0, 0, 0, 0.04);
}

/* =========================================================
   APPLE-GRADE LIGHT MODE OVERRIDES
   ========================================================= */

[data-theme="light"] {
    --bg-dark: #fbfbfd; /* Apple-like off-white */
    --bg-panel: rgba(255, 255, 255, 0.7);
    --bg-panel-hover: rgba(255, 255, 255, 0.9);
    --border-color: rgba(0, 0, 0, 0.08);
    --text-primary: #1d1d1f; /* Apple-like dark gray */
    --text-secondary: #86868b;
    --accent-glow: rgba(45, 108, 244, 0.1);
    --hero-text-shadow: none;
}

[data-theme="light"] body {
    background-color: var(--bg-dark);
}

[data-theme="light"] .navbar {
    background: rgba(255, 255, 255, 0.7);
    border-color: rgba(0, 0, 0, 0.05);
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05);
}

[data-theme="light"] .glass-panel {
    background: #ffffff;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.03);
}

[data-theme="light"] .btn-primary {
    background: #1d1d1f;
    color: #ffffff;
}

[data-theme="light"] .partner-logo {
    filter: grayscale(100%) brightness(0.2);
}

[data-theme="light"] .cursor-dot {
    background: #1d1d1f;
}

[data-theme="light"] .cursor-follower {
    border-color: rgba(0, 0, 0, 0.3);
}

[data-theme="light"] .nav-links a.active,
[data-theme="light"] .nav-links a:hover {
    color: #000;
}

[data-theme="light"] .footer-links a:hover {
    color: #000;
}

[data-theme="light"] .social-links a {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.05);
}

/* --- Mobile Nav Light Mode --- */
[data-theme="light"] .mobile-nav {
    background: rgba(255, 255, 255, 0.98);
}

[data-theme="light"] .mobile-nav a {
    color: #1d1d1f;
}

/* --- Premium Shadow Refinements --- */
[data-theme="light"] .gsap-card:hover {
    box-shadow: 0 30px 60px rgba(0, 0, 0, 0.08);
    border-color: rgba(0, 0, 0, 0.1);
}

/* Fix native dropdown option colors */
select option {
    background-color: var(--bg-primary, #06090f);
    color: var(--text-primary, #ffffff);
}
[data-theme="light"] select option {
    background-color: #ffffff;
    color: #1d1d1f;
}
/* ========================================================= */
/* MOBILE RESPONSIVENESS OVERHAUL */
/* ========================================================= */

@media (max-width: 768px) {
    /* Modals */
    .modal-box {
        width: 90%;
        padding: 1.5rem;
        margin: auto;
    }
    
    /* Project Items / List Items */
    .project-item {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
    }
    
    .project-item > div:last-child {
        width: 100%;
        justify-content: flex-start;
        flex-wrap: wrap;
    }
    
    /* Admin Tables */
    .users-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        margin: 0 -1rem;
        border-radius: 0;
        border-left: none;
        border-right: none;
    }
    .users-table {
        min-width: 600px;
    }
    .users-table th, .users-table td {
        white-space: nowrap;
        padding: 0.8rem 1rem;
    }
    
    /* Dash Header & Sections */
    .dash-header {
        flex-direction: column;
        align-items: flex-start;
    }
    .section-header {
        flex-direction: column;
        align-items: flex-start;
    }
    
    /* Tabs */
    .tabs-nav {
        flex-wrap: nowrap;
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
        padding-bottom: 1rem;
    }
    
    .tabs-nav::-webkit-scrollbar {
        height: 4px;
    }
    .tabs-nav::-webkit-scrollbar-thumb {
        background: var(--border-color);
        border-radius: 4px;
    }
}

/* ========================================================= */
/* FIX LANDING PAGE GRIDS OVERFLOW */
/* ========================================================= */

.services-grid-layout {
    display: grid;
    grid-template-columns: 2fr 1fr 1fr;
    grid-template-rows: auto auto;
    gap: 1.5rem;
}

.process-grid {
    grid-template-columns: repeat(3, 1fr);
}

@media (max-width: 1024px) {
    .services-grid-layout {
        grid-template-columns: 1fr 1fr;
    }
    .process-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .services-grid-layout {
        grid-template-columns: 1fr !important;
        grid-template-rows: auto !important;
    }
    .services-grid-layout > div {
        grid-row: auto !important;
        grid-column: span 1 !important;
        min-height: auto !important;
    }
    .process-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ========================================================= */
/* FIX ACCORDION GRIDS FOR SERVICES.HTML */
/* ========================================================= */

@media (max-width: 768px) {
    .acc-inner {
        grid-template-columns: 1fr !important;
        gap: 2rem !important;
        padding: 0 1.5rem !important;
    }
    .acc-item.open .acc-inner {
        padding: 2rem 1.5rem !important;
    }
    .acc-stat-row {
        grid-template-columns: 1fr !important;
    }
    .acc-header {
        padding: 1.5rem !important;
        height: auto !important;
        min-height: 160px;
    }
    .acc-header-left {
        gap: 1rem !important;
    }
    .acc-icon-ring {
        width: 44px !important;
        height: 44px !important;
    }
    .acc-title {
        font-size: 1.3rem !important;
    }
}

/* ========================================================= */
/* GLOBAL MOBILE RESPONSIVENESS OVERHAUL */
/* ========================================================= */

html, body {
    overflow-x: hidden;
    width: 100%;
}

:root {
    --bento-padding-large: 3.5rem;
    --bento-padding-normal: 2.5rem;
}

.hero-layout-flex {
    min-height: 80vh; 
    display: flex; 
    align-items: center; 
    justify-content: space-between; 
    padding-top: 4rem;
}

.hero-title {
    font-size: 3.8rem;
}

.stats-layout-flex {
    display: flex; 
    gap: 3rem; 
    margin-top: 4rem;
}

.globe-wrapper-responsive {
    width: 600px; 
    height: 600px;
}

@media (max-width: 1024px) {
    .hero-layout-flex {
        flex-direction: column;
        justify-content: center;
        text-align: center;
        gap: 4rem;
        padding-top: 8rem;
    }
    .hero-text-side {
        margin: 0 auto;
    }
    .stats-layout-flex {
        justify-content: center;
    }
}

@media (max-width: 768px) {
    :root {
        --bento-padding-large: 2rem;
        --bento-padding-normal: 1.5rem;
    }
    .hero-title {
        font-size: 2.4rem !important;
        margin-bottom: 1.5rem !important;
    }
    .stats-layout-flex {
        flex-direction: column;
        gap: 1.5rem;
        margin-top: 2rem;
    }
    .globe-wrapper-responsive {
        width: 320px !important;
        height: 320px !important;
        margin: 0 auto;
    }
    .bg-orb {
        display: none; /* Hide large background orbs on mobile to prevent overflow/lag */
    }
    /* Bento Service Cards Font adjustments */
    .service-card h3 {
        font-size: 1.25rem !important;
    }
    .service-card p {
        font-size: 0.85rem !important;
    }
    .service-card i {
        margin-bottom: 1rem !important;
        width: 32px !important;
        height: 32px !important;
    }
    /* Trusted Logos scaling */
    .trusted-logos-track {
        gap: 2rem !important;
    }
    .partner-logo {
        height: 18px !important;
    }
    .section-title {
        font-size: 2rem !important;
    }
}

.services-header-layout {
    display: flex;
    justify-content: space-between;
    align-items: flex-end;
    margin-bottom: 4rem;
}

@media (max-width: 768px) {
    .services-header-layout {
        flex-direction: column;
        align-items: flex-start;
        gap: 1.5rem;
        margin-bottom: 2rem;
    }
}

/* ========================================================= */
/* MOBILE NAVBAR SCOLL & FOOTER OVERRIDES */
/* ========================================================= */

@media (max-width: 768px) {
    /* Kill Scrolled Navbar effect on mobile */
    .navbar.scrolled {
        top: 0 !important;
        right: auto !important;
        left: 0 !important;
        transform: none !important;
        width: 100% !important;
        height: auto !important;
        border-radius: 0 !important;
        padding: 1rem 1.5rem !important;
        flex-direction: row !important;
        justify-content: space-between !important;
        background: rgba(10, 10, 12, 0.95) !important;
        border: none !important;
        border-bottom: 1px solid rgba(255,255,255,0.05) !important;
    }
    
    .navbar.scrolled .nav-container {
        flex-direction: row !important;
        width: 100% !important;
        justify-content: space-between !important;
    }
    
    .navbar.scrolled .logo {
        transform: none !important;
        margin-bottom: 0 !important;
    }
    
    .navbar.scrolled .logo-text {
        max-width: 200px !important;
        opacity: 1 !important;
    }
    
    .navbar.scrolled .nav-actions {
        flex-direction: row !important;
        margin-top: 0 !important;
    }

    /* Fix Footer on Mobile */
    .footer-content {
        flex-direction: column !important;
        align-items: center !important;
        text-align: center !important;
        gap: 2.5rem !important;
    }
    
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 1.5rem !important;
        align-items: center !important;
    }
    
    .footer-links a {
        margin-left: 0 !important;
    }
    
    .social-links {
        justify-content: center !important;
    }
}

/* ========================================================= */
/* FIX HERO STATS ONE LINE & REMOVE GLOBE GAP ON MOBILE */
/* ========================================================= */

@media (max-width: 768px) {
    /* Hide the globe wrapper completely to remove the awkward gap */
    #globe-wrapper {
        display: none !important;
    }
    
    /* Put stats in one row */
    .stats-layout-flex {
        flex-direction: row !important;
        justify-content: space-between !important;
        gap: 0.5rem !important;
        margin-top: 3rem !important;
        align-items: flex-start !important;
    }
    
    .stat-item {
        flex: 1;
        text-align: center;
        padding: 0 0.2rem;
    }
    
    .stat-item h3 {
        font-size: 1.5rem !important;
        justify-content: center !important;
        margin-bottom: 0.25rem !important;
    }
    
    .stat-item h3 i {
        width: 14px !important;
        height: 14px !important;
    }
    
    .stat-item p {
        font-size: 0.7rem !important;
        line-height: 1.2 !important;
    }

    /* Reduce hero gap since globe is gone */
    .hero-layout-flex {
        gap: 2rem !important;
        min-height: auto !important;
        padding-bottom: 2rem !important;
    }
}

/* ========================================================= */
/* FIX MOBILE FOOTER EXACT LAYOUT */
/* ========================================================= */

@media (max-width: 768px) {
    .footer-content {
        flex-direction: row !important;
        align-items: flex-start !important;
        text-align: left !important;
        gap: 1rem !important;
        justify-content: space-between !important;
    }
    .footer-brand {
        text-align: left !important;
        flex: 1;
    }
    .footer-brand h3 {
        font-size: 1.5rem !important;
    }
    .footer-brand p {
        font-size: 0.85rem !important;
        line-height: 1.3 !important;
    }
    .social-links {
        justify-content: flex-start !important;
        gap: 1rem !important;
        margin-top: 1.5rem !important;
    }
    .footer-links {
        display: flex !important;
        flex-direction: column !important;
        gap: 1rem !important;
        align-items: flex-end !important; 
        text-align: right !important;
        flex: 1;
    }
    .footer-links a {
        margin-left: 0 !important;
        font-size: 0.95rem !important;
    }
    .copyright {
        text-align: center !important;
    }
}

/* ========================================================= */
/* COMPREHENSIVE MOBILE OVERRIDES FOR ALL PAGES */
/* ========================================================= */

/* Fix word break issues on project titles (global) */
.project-card h3, .bento-item h3 {
    word-break: break-word !important;
    overflow-wrap: break-word !important;
}

.project-tags {
    display: flex;
    flex-wrap: wrap !important;
    gap: 0.5rem;
}

@media (max-width: 768px) {
    /* Force smaller padding on all panels to prevent text squishing */
    .glass-panel, 
    .bento-item, 
    .mission-panel,
    .project-card {
        padding: 1.5rem !important;
    }

    /* Fix About Us Stats Grid squishing */
    .stats-grid {
        grid-template-columns: 1fr !important;
        gap: 1rem !important;
    }
    
    .stats-grid .stat-number {
        font-size: 2.5rem !important;
    }

    /* Fix About Us Core Philosophy text squishing */
    .mission-panel p {
        font-size: 1rem !important;
        line-height: 1.6 !important;
    }

    .mission-panel h2 {
        font-size: 2rem !important;
    }

    /* Reduce About Us Hero padding and font sizes */
    .about-hero {
        padding: 3rem 1rem 2rem !important;
    }
    
    .about-hero h1 {
        font-size: 3rem !important;
    }
    
    .hero-subtext {
        font-size: 1rem !important;
    }

    /* Fix Leadership Team grid */
    #team-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }

    /* Force all flex containers that might overflow to wrap or stack */
    .flex-row-mobile-fix {
        flex-direction: column !important;
        align-items: flex-start !important;
    }
}

/* ========================================================= */
/* STRICT MOBILE BOUNDARY ENFORCEMENT */
/* ========================================================= */

/* Force body and html to absolutely never exceed viewport */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
    position: relative;
}

/* Ensure no section padding pushes it over 100% */
section, .section-padding {
    box-sizing: border-box !important;
    max-width: 100% !important;
}

@media (max-width: 768px) {
    /* 1. Projects Grid Overflow Fix */
    .projects-grid {
        grid-template-columns: 1fr !important;
        gap: 1.5rem !important;
    }
    
    /* 2. Services Accordion Overflow Fix */
    .acc-inner {
        grid-template-columns: 1fr !important;
        padding: 0 1rem !important;
        gap: 2rem !important;
    }
    
    .acc-header {
        padding: 1.5rem 1rem !important;
        height: auto !important;
        min-height: 180px !important;
    }
    
    .services-hero h1 {
        font-size: 2.5rem !important;
    }

    .services-hero p {
        font-size: 1rem !important;
        padding: 0 1rem !important;
    }
    
    .acc-title {
        font-size: 1.25rem !important;
    }
    
    .acc-stat-row {
        grid-template-columns: 1fr !important; /* Stack stats on mobile */
    }

    /* 3. Global Navbar Width Fix */
    .navbar {
        max-width: 100% !important;
        padding-left: 1rem !important;
        padding-right: 1rem !important;
    }
    
    /* 4. Fix any lingering fixed widths */
    .bento-large, .bento-wide, .bento-medium, .bento-small, .bento-item, .glass-panel {
        max-width: 100% !important;
        box-sizing: border-box !important;
    }
}

/* ========================================================= */
/* HERO SECTION CLEANUP */
/* ========================================================= */

.hero-title {
    line-height: 1.05;
    margin-bottom: 2rem;
    font-weight: 500;
    letter-spacing: -0.03em;
    font-size: 3.8rem;
}

.hero-text-side {
    max-width: 600px;
}

.stat-heading {
    font-size: 2.2rem;
    margin-bottom: 0.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
}

.stat-label {
    font-size: 0.95rem;
    color: var(--text-secondary);
}

@media (max-width: 768px) {
    .hero-title {
        font-size: 2.2rem !important;
        margin-bottom: 1.5rem !important;
        line-height: 1.1 !important;
        word-wrap: break-word !important;
    }
    
    .hero-text-side {
        max-width: 100% !important;
        width: 100% !important;
        padding: 0 1rem !important;
        box-sizing: border-box !important;
    }

    .stat-heading {
        font-size: 1.5rem !important;
        justify-content: center !important;
    }
    
    .stat-label {
        font-size: 0.75rem !important;
        line-height: 1.2 !important;
        white-space: normal !important;
        word-wrap: break-word !important;
    }
    
    .stats-layout-flex {
        flex-direction: row !important;
        gap: 0.5rem !important;
        justify-content: space-between !important;
        align-items: flex-start !important;
    }

    /* CRITICAL OVERFLOW FIX FOR FLEX ITEMS */
    .stat-item {
        min-width: 0 !important;
        flex: 1 1 0% !important;
        text-align: center !important;
    }
}

/* ========================================================= */
/* FIX STATS OVERLAPPING ON MOBILE */
/* ========================================================= */

@media (max-width: 768px) {
    /* Make the numbers much smaller to fit all 3 on one line */
    .stat-heading {
        font-size: 1.1rem !important;
        gap: 0.2rem !important;
    }
    
    /* Shrink the arrow icons */
    .stat-heading i, 
    .stat-heading svg {
        width: 14px !important;
        height: 14px !important;
    }
    
    /* Make the text underneath extremely compact */
    .stat-label {
        font-size: 0.65rem !important;
        line-height: 1.1 !important;
        margin-top: 0.2rem !important;
    }
    
    /* Reduce gaps between the 3 columns */
    .stats-layout-flex {
        gap: 0.25rem !important;
    }
    
    .stat-item {
        padding: 0 !important;
    }
}

/* ========================================================= */
/* FIX STAT NUMBER 4REM OVERRIDE ON MOBILE */
/* ========================================================= */

@media (max-width: 768px) {
    /* The span had a hardcoded 4rem font size in style.css! */
    .stat-heading .stat-number,
    .hero-stats .stat-number {
        font-size: 1.6rem !important;
    }
}

/* ========================================================= */
/* SERVICES ACCORDION SPACIOUSNESS FIX */
/* ========================================================= */

@media (max-width: 768px) {
    /* Make the opened accordion content much more spacious */
    .acc-item.open .acc-inner {
        padding: 2.5rem 1.5rem !important;
    }
    
    /* Make the clickable header more spacious */
    .acc-header {
        padding: 2.5rem 1.5rem !important;
        min-height: 200px !important;
    }
    
    /* Give the accordion container some breathing room from the screen edges */
    .accordion-wrap {
        padding: 0 1.25rem 5rem !important;
    }
    
    /* Improve spacing between elements inside the accordion */
    .acc-intro {
        margin-bottom: 2rem !important;
    }
    
    .acc-visual {
        margin-top: 1rem !important;
    }
}

/* ========================================================= */
/* MAXIMIZE HORIZONTAL SPACE IN SERVICES ACCORDION */
/* ========================================================= */

@media (max-width: 768px) {
    /* Stretch the accordion box to the very edges of the screen */
    .accordion-wrap {
        padding: 0 0.5rem 5rem !important; /* Only 8px gap from screen edges! */
    }
    
    /* Maximize space inside the opened box */
    .acc-item.open .acc-inner {
        padding: 2.5rem 1rem !important; /* Only 16px inner padding on sides */
    }
    
    /* Make the clickable header wider */
    .acc-header {
        padding: 2.5rem 1rem !important;
    }
}

/* ========================================================= */
/* FIX MASSIVE GAP ABOVE FOOTER */
/* ========================================================= */

@media (max-width: 768px) {
    /* The original 10rem (160px) padding creates a massive dead space */
    .section-padding {
        padding: 4rem 0 2rem 0 !important;
    }
    
    /* Main was also adding 4rem to the bottom */
    main {
        padding-bottom: 0 !important;
    }
    
    /* Footer was adding another 4rem to the top */
    footer {
        padding-top: 2rem !important;
        padding-bottom: 3rem !important;
    }
}

/* ========================================================= */
/* GLOBAL LOADING SCREEN */
/* ========================================================= */
.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100vh;
    background: var(--bg-dark);
    z-index: 99999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.6s ease, visibility 0.6s ease;
}

[data-theme="light"] .global-loader {
    background: #ffffff;
}

.loader-logo {
    width: 80px;
    height: auto;
    animation: loader-spin 2s cubic-bezier(0.68, -0.55, 0.265, 1.55) infinite;
    filter: drop-shadow(0 0 20px rgba(76, 210, 255, 0.4));
}

@keyframes loader-spin {
    0% { transform: scale(0.8) rotate(0deg); opacity: 0.5; }
    50% { transform: scale(1.2) rotate(180deg); opacity: 1; filter: drop-shadow(0 0 30px rgba(76, 210, 255, 0.8)); }
    100% { transform: scale(0.8) rotate(360deg); opacity: 0.5; }
}

.global-loader.hidden {
    opacity: 0;
    visibility: hidden;
}
