/* Base Typography */
h1 { font-size: clamp(3rem, 6vw, 5.5rem); letter-spacing: -0.02em; }
h2 { font-size: clamp(2.5rem, 4vw, 3.5rem); letter-spacing: -0.01em; }
h3 { font-size: clamp(1.5rem, 2vw, 2rem); }
p { color: var(--text-muted); font-size: clamp(1rem, 1.2vw, 1.125rem); }

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
}
::-webkit-scrollbar-track {
    background: var(--bg-main);
}
::-webkit-scrollbar-thumb {
    background: var(--accent);
    border-radius: 5px;
}
::-webkit-scrollbar-thumb:hover {
    background: var(--secondary-accent);
}

/* Custom Cursor */
.cursor {
    position: fixed;
    top: 0; left: 0;
    width: 8px; height: 8px;
    background: var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9999;
    mix-blend-mode: difference;
}
.cursor-follower {
    position: fixed;
    top: 0; left: 0;
    width: 40px; height: 40px;
    border: 1px solid var(--accent);
    border-radius: 50%;
    pointer-events: none;
    z-index: 9998;
    transition: width 0.3s, height 0.3s, background 0.3s;
    transform: translate(-50%, -50%); /* Centered by JS */
}
.cursor-follower.hovering {
    width: 60px; height: 60px;
    background: rgba(0, 240, 255, 0.1);
}

/* Page Transition Overlay */
.page-transition {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: 10000;
    display: flex;
    flex-direction: column;
    pointer-events: none;
    justify-content: center;
    align-items: center;
}
.transition-layer {
    position: absolute;
    width: 100%;
    height: 33.4vh;
    background: var(--bg-main);
    border-top: 1px solid var(--accent);
    transform: scaleX(0);
    transform-origin: left;
}
.layer-1 { top: 0; }
.layer-2 { top: 33.33vh; }
.layer-3 { top: 66.66vh; }
.transition-text {
    position: relative;
    z-index: 10001;
    font-family: var(--font-heading);
    font-size: 4rem;
    font-weight: 800;
    color: white;
    opacity: 0;
    transform: translateY(20px);
}

/* Odoo-style Typography & Hover Effects */
.animated-text {
    display: inline-block;
    transition: var(--transition-smooth);
}
.animated-text:hover {
    color: var(--accent);
    transform: translateX(5px);
    letter-spacing: 1px;
}

/* 3D Canvas Background */
#bg-canvas {
    position: fixed;
    top: 0; left: 0;
    width: 100vw; height: 100vh;
    z-index: -1;
    pointer-events: none;
}

/* Buttons */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0.875rem 2rem;
    font-family: var(--font-heading);
    font-weight: 600;
    border-radius: 50px;
    cursor: pointer;
    position: relative;
    overflow: hidden;
    z-index: 1;
}
.btn-text {
    position: relative;
    z-index: 2;
    transition: color 0.4s ease;
    color: var(--accent);
}
.btn-primary {
    background: transparent;
    border: 1px solid var(--accent);
}
.btn-primary::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%; height: 100%;
    background: var(--accent);
    z-index: -1;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-primary:hover::before {
    width: 100%;
}
.btn-primary:hover {
    box-shadow: 0 0 20px rgba(0,240,255,0.4);
}
.btn-primary:hover .btn-text {
    color: #000;
}
.btn-outline {
    background: transparent;
    border: 1px solid var(--border-subtle);
}
.btn-outline .btn-text {
    color: var(--text-main);
}
.btn-outline::before {
    content: '';
    position: absolute;
    top: 0; left: 0;
    width: 0%; height: 100%;
    background: var(--bg-secondary);
    z-index: -1;
    transition: width 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.btn-outline:hover::before {
    width: 100%;
}
.btn-outline:hover .btn-text {
    color: var(--text-main);
}

/* Department Tabs */
.tabs-nav {
    display: flex;
    justify-content: center;
    gap: 1rem;
    margin-bottom: 3rem;
    flex-wrap: wrap;
}
.tab-btn {
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    padding: 0.75rem 2rem;
    border-radius: 50px;
    font-family: var(--font-heading);
    cursor: pointer;
    transition: all 0.3s ease;
}
.tab-btn:hover {
    border-color: var(--accent);
    color: var(--text-main);
}
.tab-btn.active {
    background: var(--accent);
    color: var(--bg-main);
    border-color: var(--accent);
    box-shadow: 0 0 15px rgba(0,240,255,0.3);
}
.tab-content {
    display: none;
    animation: fadeIn 0.5s ease-out forwards;
}
.tab-content.active {
    display: grid;
}
@keyframes fadeIn {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Header */
.main-header {
    position: fixed;
    top: 0; left: 0;
    width: 100%;
    z-index: 1000;
    padding: 1.5rem 0;
    transition: background 0.3s, backdrop-filter 0.3s;
}
.main-header.scrolled {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border-bottom: 1px solid var(--border-subtle);
    padding: 1rem 0;
}
.header-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
}
.logo-text {
    font-family: var(--font-heading);
    font-size: 1.5rem;
    font-weight: 800;
    letter-spacing: -0.02em;
}
.logo {
    display: flex;
    align-items: center;
    flex-shrink: 0;
}
.logo-img {
    height: 52px;
    width: auto;
    object-fit: contain;
    display: block;
    max-width: 180px;
}
.main-nav ul {
    display: flex;
    gap: 2.5rem;
    list-style: none;
}
.main-nav a {
    font-family: var(--font-heading);
    font-weight: 500;
    font-size: 1rem;
    color: var(--text-main);
}
.main-nav a:hover {
    color: var(--accent);
}
/* Mega Menu (Simple) */
.has-dropdown { position: relative; }
.mega-menu {
    position: absolute;
    top: 100%; left: 50%;
    transform: translateX(-50%) translateY(20px);
    background: var(--bg-secondary);
    border: 1px solid var(--border-subtle);
    border-radius: 16px;
    padding: 2rem;
    width: 500px;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition-smooth);
    box-shadow: 0 10px 40px rgba(0,0,0,0.5);
}
.has-dropdown:hover .mega-menu {
    opacity: 1;
    visibility: visible;
    transform: translateX(-50%) translateY(10px);
}
.mega-menu-grid {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2rem;
}
.mega-menu h4 {
    font-size: 1rem;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-subtle);
    padding-bottom: 0.5rem;
    margin-bottom: 1rem;
}
.mega-menu a {
    display: block;
    padding: 0.5rem 0;
    font-weight: 400;
    color: var(--text-main);
}
/* Close button — desktop પર hide, mobile drawer ની અંદર જ દેખાય */
.mobile-nav-close { display: none; }
.mobile-contact-btn { display: none; }

.mobile-menu-toggle {
    display: none;
    background: transparent;
    border: 1px solid var(--border-subtle);
    color: var(--text-main);
    width: 40px;
    height: 40px;
    border-radius: 8px;
    font-size: 1rem;
    cursor: pointer;
    align-items: center;
    justify-content: center;
    transition: var(--transition-smooth);
    flex-shrink: 0;
}
.mobile-menu-toggle:hover {
    border-color: var(--accent);
    color: var(--accent);
}

/* Mobile Nav Overlay */
.mobile-nav-overlay {
    display: none;
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.6);
    z-index: 998;
    opacity: 0;
    transition: opacity 0.3s ease;
}
.mobile-nav-overlay.active {
    opacity: 1;
}

@media (max-width: 768px) {
    /* Hide desktop nav & contact btn */
    .main-nav { display: none; }
    .header-actions .btn { display: none; }
    .mobile-menu-toggle { display: flex; }

    /* Mobile drawer */
    .main-nav.mobile-open {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        right: 0;
        width: 280px;
        height: 100vh;
        background: var(--bg-secondary);
        border-left: 1px solid var(--border-subtle);
        z-index: 999;
        padding: 5rem 2rem 2rem;
        gap: 0;
        animation: slideInRight 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    }

    .main-nav.mobile-open ul {
        flex-direction: column;
        gap: 0;
    }

    .main-nav.mobile-open ul li a {
        display: block;
        padding: 1rem 0;
        font-size: 1.1rem;
        border-bottom: 1px solid var(--border-subtle);
        color: var(--text-main);
    }

    .main-nav.mobile-open ul li a:hover {
        color: var(--accent);
        padding-left: 8px;
    }

    /* Contact button inside mobile nav — show only when drawer open */
    .main-nav.mobile-open .mobile-contact-btn {
        display: inline-flex;
        margin-top: 1.5rem;
        padding: 0.875rem 2rem;
        font-family: var(--font-heading);
        font-weight: 600;
        border-radius: 50px;
        border: 1px solid var(--accent);
        color: var(--accent);
        font-size: 1rem;
        text-align: center;
        justify-content: center;
        transition: var(--transition-smooth);
    }
    .main-nav.mobile-open .mobile-contact-btn:hover {
        background: var(--accent);
        color: #000;
    }

    /* Close button — show only when drawer open */
    .main-nav.mobile-open .mobile-nav-close {
        display: flex;
        position: absolute;
        top: 1.25rem;
        right: 1.25rem;
        background: transparent;
        border: 1px solid var(--border-subtle);
        color: var(--text-main);
        width: 36px;
        height: 36px;
        border-radius: 8px;
        font-size: 0.9rem;
        cursor: pointer;
        align-items: center;
        justify-content: center;
    }

    @keyframes slideInRight {
        from { transform: translateX(100%); }
        to   { transform: translateX(0); }
    }
}

/* Utilities */
.glass-panel {
    background: var(--bg-glass);
    backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border-subtle);
    border-radius: 24px;
    padding: 2.5rem;
}
.text-gradient {
    background: linear-gradient(90deg, var(--text-main), var(--text-muted));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}
.text-gradient-accent {
    background: linear-gradient(90deg, var(--accent), var(--secondary-accent));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* ── Footer Responsive ── */
@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr !important;
        gap: 2.5rem !important;
    }
    .footer-bottom {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 1rem !important;
    }
    .footer-bottom > div {
        flex-wrap: wrap;
        gap: 1rem !important;
    }
}

/* ── Mobile App Section Responsive ── */
@media (max-width: 900px) {
    .mob-app-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
    .mobile-visual {
        min-height: 420px !important;
    }
    .phone-mockup {
        width: 220px !important;
        height: 460px !important;
        transform: none !important;
    }
}
@media (max-width: 480px) {
    .mobile-visual {
        min-height: 360px !important;
    }
    .phone-mockup {
        width: 180px !important;
        height: 380px !important;
    }
}

/* ── Reporting Section Responsive ── */
@media (max-width: 900px) {
    .reporting-grid {
        grid-template-columns: 1fr !important;
        gap: 3rem !important;
    }
    .reporting-visual {
        min-height: 380px !important;
    }
    .reporting-visual .glass-panel[style*="width: 80%"] {
        width: 100% !important;
        position: relative !important;
        top: auto !important;
        left: auto !important;
        height: 280px !important;
    }
    .reporting-visual [data-parallax] {
        position: relative !important;
        top: auto !important;
        right: auto !important;
        bottom: auto !important;
        width: 100% !important;
        margin-top: 1rem;
    }
}

/* ── Hide custom cursor on touch devices ── */
@media (hover: none) and (pointer: coarse) {
    .cursor,
    .cursor-follower {
        display: none !important;
    }
}

/* ── Scroll Story Grid Responsive ── */
@media (max-width: 768px) {
    .scroll-story-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ══════════════════════════════════════
   REMAINING RESPONSIVE FIXES
══════════════════════════════════════ */

/* ── Hero Section ── */
@media (max-width: 600px) {
    .hero-actions {
        flex-direction: column;
        align-items: center;
        gap: 0.75rem !important;
    }
    .hero-actions .btn {
        width: 100%;
        max-width: 280px;
        justify-content: center;
    }
    .hero-content {
        padding: 0 1rem;
    }
}

/* ── Ticker font size ── */
@media (max-width: 600px) {
    .ticker-item {
        font-size: 1rem !important;
        padding: 0 1.5rem !important;
        gap: 1.5rem !important;
    }
}

/* ── Industries grid min card size ── */
@media (max-width: 480px) {
    .industries-grid {
        grid-template-columns: 1fr !important;
    }
}

/* ── Section padding reduce on mobile ── */
@media (max-width: 768px) {
    .section-padding {
        padding: 60px 0 !important;
    }
    h1 { font-size: clamp(2rem, 8vw, 3.5rem); }
    h2 { font-size: clamp(1.6rem, 6vw, 2.5rem); }
}

/* ── About-reveal ERP diagram mobile — handled in about-reveal.php ── */

/* ── Services page pill nav mobile ── */
@media (max-width: 600px) {
    .svc-pill-nav {
        gap: 0.4rem !important;
        padding: 0.4rem !important;
    }
    .svc-pill span { display: none; }
    .svc-pill { padding: 0.6rem 0.75rem !important; }
    .svc-panel-inner {
        gap: 2rem !important;
    }
    .svc-stats {
        flex-direction: row !important;
        flex-wrap: wrap;
    }
    .svc-stat {
        flex: 1 1 30%;
    }
}

/* ── About page mobile ── */
@media (max-width: 560px) {
    .ab-hero-btns {
        flex-direction: column;
        align-items: center;
    }
    .ab-hero-btns .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }
    .ab-cta-btns {
        flex-direction: column;
        align-items: center;
    }
    .ab-cta-btns .btn {
        width: 100%;
        max-width: 260px;
        justify-content: center;
    }
}

/* ── Footer mobile bottom links ── */
@media (max-width: 480px) {
    .footer-bottom > div {
        flex-direction: column !important;
        gap: 0.5rem !important;
    }
    .main-footer [style*="font-size: 15vw"] {
        font-size: 20vw !important;
    }
}

/* ── Contact page glass-panel padding ── */
@media (max-width: 600px) {
    .contact-grid .glass-panel[style*="padding: 3rem"] {
        padding: 1.5rem !important;
    }
}

/* ── Header logo size on small mobile ── */
@media (max-width: 380px) {
    .logo-img { height: 38px !important; }
    .main-header { padding: 1rem 0 !important; }
}

/* ── Barba page container fix ── */
@media (max-width: 768px) {
    .scroll-content { overflow-x: hidden; }
}
