/* ==========================================================================
   BITSECURA — SHARED STYLES
   Shared across all pages. Page-specific styles remain inline per page.
   ========================================================================== */

/* ========================================
   CSS VARIABLES & RESET
   ======================================== */
:root {
    --indigo: #495bc2;
    --navy: #0f3253;
    --purple: #a9539a;
    --teal: #42ac94;
    --white: #ffffff;
    --off-white: #f8f9fc;
    --light-gray: #f0f1f6;
    --mid-gray: #8890a4;
    --dark-gray: #3a3f50;
    --text-primary: #0f1624;
    --text-secondary: #4a5068;
    --font-display: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'DM Sans', -apple-system, BlinkMacSystemFont, sans-serif;
    --nav-height: 72px;
    --ease-out-expo: cubic-bezier(0.16, 1, 0.3, 1);
    --ease-out-quart: cubic-bezier(0.25, 1, 0.5, 1);
}

*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    overflow-x: hidden;
}

body {
    font-family: var(--font-body);
    color: var(--text-primary);
    background: var(--white);
    line-height: 1.6;
    overflow-x: hidden;
    min-width: 0;
}

a {
    text-decoration: none;
    color: inherit;
}

img {
    max-width: 100%;
    display: block;
}

.container {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
}

.container--wide {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 24px;
}



/* ========================================
   NAVIGATION
   ======================================== */
.nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1000;
    height: var(--nav-height);
    transition: background 0.4s ease, box-shadow 0.4s ease, backdrop-filter 0.4s ease;
}

.nav.scrolled {
    background: rgba(255, 255, 255, 0.82);
    backdrop-filter: saturate(180%) blur(20px);
    -webkit-backdrop-filter: saturate(180%) blur(20px);
    box-shadow: 0 1px 0 rgba(0, 0, 0, 0.06);
}

.nav__inner {
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 24px;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 20px;
    color: var(--navy);
    letter-spacing: -0.3px;
    z-index: 1001;
}

.nav__logo img {
    width: 32px;
    height: 32px;
}

.nav__links {
    display: flex;
    align-items: center;
    gap: 2px;
    list-style: none;
}

.nav__item {
    position: relative;
}

.nav__link {
    display: flex;
    align-items: center;
    gap: 4px;
    padding: 8px 16px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 8px;
    transition: color 0.2s ease, background 0.2s ease;
    cursor: pointer;
    white-space: nowrap;
}

.nav__link:hover {
    color: var(--text-primary);
    background: rgba(0, 0, 0, 0.04);
}

.nav__link--active {
    color: var(--indigo);
    font-weight: 600;
}

.nav__link svg {
    width: 12px;
    height: 12px;
    transition: transform 0.3s var(--ease-out-expo);
}

.nav__item:hover .nav__link svg {
    transform: rotate(180deg);
}

.nav__dropdown {
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    background: var(--white);
    border-radius: 16px;
    padding: 8px;
    padding-top: 16px;
    min-width: 240px;
    box-shadow: 0 8px 40px rgba(0, 0, 0, 0.1), 0 1px 3px rgba(0, 0, 0, 0.06);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s var(--ease-out-expo), visibility 0.25s ease;
}

.nav__item:hover .nav__dropdown {
    opacity: 1;
    visibility: visible;
    pointer-events: all;
    transform: translateX(-50%) translateY(0);
}

.nav__dropdown a {
    display: block;
    padding: 10px 16px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: 10px;
    transition: background 0.15s ease, color 0.15s ease;
}

.nav__dropdown a:hover {
    background: var(--off-white);
    color: var(--indigo);
}

.nav__dropdown a.nav__dropdown--active {
    background: rgba(73, 91, 194, 0.08);
    color: var(--indigo);
    font-weight: 600;
}

        .nav__cta {
    display: inline-flex;
    align-items: center;
    padding: 9px 22px;
    font-family: var(--font-body);
    font-size: 14px;
    font-weight: 600;
    color: var(--white);
    background: var(--navy);
    border-radius: 10px;
    transition: background 0.3s ease, transform 0.2s ease;
}

.nav__cta:hover {
    background: var(--indigo);
    transform: scale(1.03);
}

.nav__cta--active {
    background: transparent;
    color: var(--teal);
    border: 2px solid var(--teal);
}

.nav__cta--active:hover {
    background: var(--teal);
    color: var(--white);
}

.nav__burger {
    display: none;
    position: relative;
    width: 24px;
    height: 24px;
    cursor: pointer;
    z-index: 1001;
    background: none;
    border: none;
    flex-shrink: 0;
}

.nav__burger span {
    position: absolute;
    left: 0;
    right: 0;
    height: 2px;
    background: var(--navy);
    border-radius: 2px;
    transform-origin: center center;
    transition: transform 0.3s var(--ease-out-expo), opacity 0.2s ease, top 0.3s var(--ease-out-expo);
}

/* Inactive: 3 bars evenly spaced, centered in the 24px button */
.nav__burger span:nth-child(1) { top: 4px;  }   /* center at y=5  */
.nav__burger span:nth-child(2) { top: 11px; }   /* center at y=12 */
.nav__burger span:nth-child(3) { top: 18px; }   /* center at y=19 */

/* Active: bars 1 and 3 collapse to button center, then rotate into X */
.nav__burger.active span:nth-child(1) { top: 11px; transform: rotate(45deg);  }
.nav__burger.active span:nth-child(2) { opacity: 0; transform: scaleX(0);    }
.nav__burger.active span:nth-child(3) { top: 11px; transform: rotate(-45deg); }

.nav__mobile-menu {
    display: none;
}

/* ========================================
   NAV — DARK HERO OVERRIDE
   Add class="nav nav--dark-hero" on pages
   where the hero background is dark (navy,
   navy→purple, etc.). Automatically reverts
   to default dark text once the user scrolls
   (the .scrolled class takes over).
   ======================================== */
.nav--dark-hero:not(.scrolled) .nav__logo     { color: #fff; }
.nav--dark-hero:not(.scrolled) .nav__link     { color: rgba(255, 255, 255, 0.80); }
.nav--dark-hero:not(.scrolled) .nav__link:hover { color: #fff; background: rgba(255, 255, 255, 0.08); }
.nav--dark-hero:not(.scrolled) .nav__link--active { color: #fff; font-weight: 600; }
.nav--dark-hero:not(.scrolled) .nav__link svg { stroke: rgba(255, 255, 255, 0.80); }
.nav--dark-hero:not(.scrolled) .nav__cta      { background: var(--indigo); color: #fff; }
.nav--dark-hero:not(.scrolled) .nav__cta:hover { background: var(--teal); }
.nav--dark-hero:not(.scrolled) .nav__burger span { background: #fff; }
/* When mobile menu is open the burger X is always navy (white page bg) */
.nav__burger.active span                      { background: var(--navy) !important; }

/* ========================================
   NAV — CTA DESKTOP-ONLY
   Hide the "Talk to Us" pill on mobile;
   the mobile menu has its own CTA row.
   ======================================== */
@media (min-width: 769px) {
    .nav__cta-desktop { display: inline-flex; }
}

/* ========================================
   NAV — RICH MEGA-MENU DROPDOWN
   Styles for .nav__dropdown--rich panels
   with left intro + right mega-items grid.
   ======================================== */
.nav__dropdown--rich {
    display: grid;
    grid-template-columns: 168px 1fr;
    padding: 0;
    overflow: hidden;
    min-width: 460px;
    border-radius: 18px;
}

/* Left intro panel */
.dropdown-intro {
    background: var(--white);
    border-right: 1px solid rgba(0, 0, 0, 0.07);
    border-left: 3px solid var(--indigo);
    padding: 28px 22px;
    display: flex;
    flex-direction: column;
    border-radius: 18px 0 0 18px;
}

.dropdown-intro__top {
    display: flex;
    flex-direction: column;
}

.dropdown-intro__eyebrow {
    font-size: 10.5px;
    font-weight: 700;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    color: var(--indigo);
    margin-bottom: 10px;
}

.dropdown-intro__title {
    font-family: var(--font-display);
    font-size: 17px;
    font-weight: 700;
    color: var(--navy);
    line-height: 1.25;
    letter-spacing: -0.02em;
}

.dropdown-intro__desc {
    font-size: 12px;
    line-height: 1.6;
    color: var(--mid-gray);
    margin-top: 10px;
}

/* Right: items column */
.dropdown-body {
    padding: 10px 8px 8px;
}

/* Override default nav__dropdown a styles for mega-item links.
   .dropdown-body .mega-item (0,2,0) beats .nav__dropdown a (0,1,1) */
.dropdown-body .mega-item {
    padding: 7px 10px;
    border-radius: 10px;
    display: block;
    text-decoration: none;
    transition: background 0.15s ease;
    color: inherit;
}

.dropdown-body .mega-item:hover {
    background: var(--off-white);
}

.mega-item__title {
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
    line-height: 1.3;
    transition: color 0.15s ease;
}

.dropdown-body .mega-item:hover .mega-item__title {
    color: var(--indigo);
}

.mega-item__desc {
    font-size: 11.5px;
    color: var(--mid-gray);
    line-height: 1.5;
    margin-top: 2px;
}

/* "View all" footer link inside dropdown */
.dropdown-footer {
    margin: 6px 2px 0;
    padding-top: 8px;
    border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.dropdown-footer a {
    font-size: 12.5px;
    font-weight: 600;
    color: var(--indigo);
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 7px 10px;
    border-radius: 8px;
    transition: gap 0.2s ease, background 0.15s ease;
}

.dropdown-footer a:hover {
    gap: 9px;
    background: rgba(73, 91, 194, 0.06);
}

.dropdown-footer svg {
    width: 12px;
    height: 12px;
    flex-shrink: 0;
}

/* ========================================
   NAV — CLICK-ONLY DROPDOWN (JS-driven)
   Disables the CSS :hover trigger; dropdowns
   open/close only via .nav__item--open toggled
   by JavaScript (openNav / closeNav).
   ======================================== */

/* Suppress CSS hover — must use JS to open (0,3,0 specificity) */
.nav__item:hover .nav__dropdown {
    opacity: 0 !important;
    visibility: hidden !important;
    pointer-events: none !important;
    transform: translateX(-50%) translateY(8px) !important;
}

/* JS open state — .nav__item.nav__item--open (0,3,0) wins by source order */
.nav__item.nav__item--open .nav__dropdown {
    opacity: 1 !important;
    visibility: visible !important;
    pointer-events: all !important;
    transform: translateX(-50%) translateY(0) !important;
}

.nav__item.nav__item--open .nav__link svg {
    transform: rotate(180deg);
}

/* ========================================
   NAV — MOBILE RESPONSIVE  (≤ 768px)
   ======================================== */
@media (max-width: 768px) {
    :root { --nav-height: 64px; }

    .nav__links,
    .nav__cta-desktop {
        display: none;
    }

    .nav__burger {
        display: flex;
    }

    /* Full-screen mobile overlay */
    .nav__mobile-menu {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--white);
        z-index: 999;
        padding: calc(var(--nav-height) + 24px) 24px 24px;
        overflow-y: auto;
        opacity: 0;
        visibility: hidden;
        transform: translateY(-10px);
        transition: opacity 0.3s ease, visibility 0.3s ease, transform 0.3s var(--ease-out-expo);
    }

    .nav__mobile-menu.open {
        opacity: 1;
        visibility: visible;
        transform: translateY(0);
    }

    /* Plain top-level links (no sub-menu) */
    .nav__mobile-menu a.mobile-plain {
        display: block;
        padding: 14px 0;
        font-size: 18px;
        font-weight: 600;
        color: var(--navy);
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    /* Accordion wrapper */
    .mobile-item {
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
    }

    .mobile-item__header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        gap: 8px;
    }

    .mobile-item__link {
        flex: 1;
        display: block;
        padding: 14px 0;
        font-size: 18px;
        font-weight: 600;
        color: var(--navy);
    }

    .mobile-item__toggle {
        display: flex;
        align-items: center;
        justify-content: center;
        width: 34px;
        height: 34px;
        flex-shrink: 0;
        background: none;
        border: 1.5px solid rgba(0, 0, 0, 0.10);
        border-radius: 8px;
        cursor: pointer;
        color: var(--navy);
        transition: background 0.15s ease, border-color 0.15s ease, color 0.15s ease;
    }

    .mobile-item__toggle:hover {
        background: rgba(73, 91, 194, 0.06);
        border-color: var(--indigo);
        color: var(--indigo);
    }

    .mobile-item.open .mobile-item__toggle {
        background: rgba(73, 91, 194, 0.08);
        border-color: var(--indigo);
        color: var(--indigo);
    }

    .mobile-item__toggle svg {
        width: 16px;
        height: 16px;
        transition: transform 0.3s var(--ease-out-expo);
    }

    .mobile-item.open .mobile-item__toggle svg {
        transform: rotate(45deg);
    }

    /* Collapsible sub-list */
    .mobile-item__sub {
        max-height: 0;
        overflow: hidden;
        transition: max-height 0.35s var(--ease-out-expo);
    }

    .mobile-item.open .mobile-item__sub {
        max-height: 600px;
    }

    .mobile-item__sub a {
        display: block !important;
        padding: 9px 0 9px 16px !important;
        font-size: 15px !important;
        font-weight: 500 !important;
        color: var(--text-secondary) !important;
        border-bottom: none !important;
        transition: color 0.15s ease;
    }

    .mobile-item__sub a:hover {
        color: var(--indigo) !important;
    }

    .mobile-item__sub a:last-child {
        padding-bottom: 16px !important;
    }

    /* CTA button at bottom of mobile menu */
    .nav__mobile-cta {
        display: flex !important;
        align-items: center;
        justify-content: center;
        margin-top: 24px;
        padding: 14px 24px;
        background: var(--navy);
        color: var(--white) !important;
        border-radius: 10px;
        font-weight: 600;
        border-bottom: none !important;
    }

    .nav__mobile-cta:hover {
        background: var(--indigo);
    }
}



/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    font-family: var(--font-body);
    font-size: 16px;
    font-weight: 600;
    padding: 14px 32px;
    border-radius: 100px;
    transition: all 0.3s var(--ease-out-expo);
    cursor: pointer;
    border: none;
}

.btn--primary {
    background: var(--navy);
    color: var(--white);
}

.btn--primary:hover {
    background: var(--indigo);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(73, 91, 194, 0.25);
}

.btn--secondary {
    background: transparent;
    color: var(--indigo);
    border: 1.5px solid rgba(73, 91, 194, 0.25);
}

.btn--secondary:hover {
    border-color: var(--indigo);
    background: rgba(73, 91, 194, 0.04);
    transform: translateY(-2px);
}

.btn--white {
    background: var(--white);
    color: var(--navy);
}

.btn--white:hover {
    background: var(--off-white);
    transform: translateY(-2px);
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.12);
}

.btn svg {
    width: 16px;
    height: 16px;
    transition: transform 0.3s var(--ease-out-expo);
}

.btn:hover svg {
    transform: translateX(3px);
}



/* ========================================
   FOOTER
   ======================================== */
.footer {
    padding: 64px 24px 32px;
    background: var(--white);
    border-top: 1px solid rgba(0,0,0,0.06);
}

.footer__grid {
    display: grid;
    grid-template-columns: 1.6fr 1fr 1fr 1fr 1fr;
    gap: 40px;
    max-width: 1200px;
    margin: 0 auto 48px;
}

.footer__brand {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.footer__logo {
    display: flex;
    align-items: center;
    gap: 10px;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 18px;
    color: var(--navy);
}

.footer__logo img {
    width: 28px;
    height: 28px;
}

.footer__tagline {
    font-size: 14px;
    line-height: 1.6;
    color: var(--mid-gray);
    max-width: 280px;
}

.footer__heading {
    font-family: var(--font-display);
    font-size: 13px;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--navy);
    margin-bottom: 20px;
}

.footer__links {
    list-style: none;
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.footer__links a {
    font-size: 14px;
    color: var(--mid-gray);
    transition: color 0.2s ease;
}

.footer__links a:hover { color: var(--indigo); }

.footer__bottom {
    max-width: 1200px;
    margin: 0 auto;
    padding-top: 24px;
    border-top: 1px solid rgba(0,0,0,0.06);
    display: flex;
    align-items: center;
    justify-content: space-between;
    flex-wrap: wrap;
    gap: 16px;
}

.footer__legal-links {
    display: flex;
    align-items: center;
    gap: 12px;
}
.footer__legal-links a {
    font-size: 13px;
    color: var(--mid-gray);
    transition: color 0.2s ease;
}
.footer__legal-links a:hover { color: var(--indigo); }
.footer__sep { font-size: 13px; color: var(--mid-gray); }
.footer__certs {
    display: flex;
    align-items: center;
    gap: 16px;
}
.footer__cert {
    height: 36px;
    width: auto;
    display: block;
    opacity: 0.75;
    transition: opacity 0.2s ease;
}
.footer__cert:hover { opacity: 1; }
.footer__social a:hover {
    background: var(--indigo);
    color: var(--white);
}

.footer__social svg { width: 16px; height: 16px; }

@media (max-width: 1100px) {
    .footer__grid { grid-template-columns: 1fr 1fr 1fr; }
}

@media (max-width: 768px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 32px; }
}

@media (max-width: 480px) {
    .footer__grid { grid-template-columns: 1fr 1fr; gap: 28px 16px; }
}



/* ========================================
   SCROLL REVEAL
   ======================================== */
.reveal {
    opacity: 0;
    transform: translateY(32px);
    transition: opacity 0.7s var(--ease-out-expo), transform 0.7s var(--ease-out-expo);
}

.reveal.visible {
    opacity: 1;
    transform: translateY(0);
}
