/* ===================================================================
   Brandmek — Supplemental stylesheet  v2 (CONSERVATIVE)
   Save as: css/brandmek-pages.css   — OVERWRITES v1
   Load AFTER css/style.css
   ===================================================================

   WHAT CHANGED FROM v1 — and why your layout broke

   v1 contained global rules that fought with your existing
   stylesheet. All of them are REMOVED here:

     REMOVED  html, body { overflow-x:hidden; max-width:100% }
              Global. Can break fixed/sticky positioning.

     REMOVED  img, svg, video { max-width:100%; height:auto }
              Your style.css has NO global img/svg rule, so this was
              brand new and resized every icon and your logo.

     REMOVED  .display-3 / .display-4 / .display-5 / .lead  !important
              You define .display-3 six times across breakpoints.
              My !important beat all six, changing type site-wide.

     REMOVED  .btn { min-height:44px }  and  .btn-lg { width:100% }
              Global button geometry override.

     REMOVED  .w-100  .h-100  .text-start  .flex-grow-1
              These ALREADY EXIST in your style.css. Redeclaring them
              overrode your working versions.

   Everything below was verified absent from css/style.css before
   being added. The only !important rules left are inside the
   reduced-motion and print blocks, where they are required and where
   they cannot affect normal browsing.
   =================================================================== */


/* -------------------------------------------------------------
   1. MISSING GRID COLUMNS
   .col-lg-9 is used by the answer blocks on /seo /aeo /pricing
   /ai-chatbot /lead-generation. Without it they fall to 100% width.
   ------------------------------------------------------------- */
@media (min-width: 768px) {
    .col-md-9  { flex: 0 0 auto; width: 75%; }
    .col-md-7  { flex: 0 0 auto; width: 58.3333%; }
    .col-md-11 { flex: 0 0 auto; width: 91.6667%; }
}
@media (min-width: 992px) {
    .col-lg-9   { flex: 0 0 auto; width: 75%; }
    .col-lg-11  { flex: 0 0 auto; width: 91.6667%; }
    .col-lg-1   { flex: 0 0 auto; width: 8.3333%; }
    .order-lg-1 { order: 1; }
    .order-lg-2 { order: 2; }
}


/* -------------------------------------------------------------
   2. MISSING UTILITIES  (each verified absent from style.css)
   ------------------------------------------------------------- */
.flex-shrink-0 { flex-shrink: 0; }
.mt-auto       { margin-top: auto; }
.ms-auto       { margin-left: auto; }
.me-auto       { margin-right: auto; }
.text-end      { text-align: right; }
.align-middle  { vertical-align: middle; }
@media (min-width: 768px) {
    .text-md-end { text-align: right; }
}


/* -------------------------------------------------------------
   3. TABLES  (used by /aeo and /aeo-vs-seo comparison tables)
   ------------------------------------------------------------- */
.table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    width: 100%;
}
.table {
    width: 100%;
    margin-bottom: 1rem;
    border-collapse: collapse;
}
.table > :not(caption) > * > * { padding: .75rem; }
.table-dark { color: #fff; background-color: #050505; }
.table-borderless > :not(caption) > * > * { border-bottom-width: 0; }

@media (max-width: 575.98px) {
    .table-responsive > .table { min-width: 480px; }
    .table-responsive::after {
        content: "Scroll \2192";
        display: block;
        text-align: right;
        font-size: .75rem;
        color: #949494;
        padding-top: .5rem;
    }
}


/* -------------------------------------------------------------
   4. ACCORDION WRAPPERS
   style.css already has .accordion-button and .accordion-collapse,
   so those are deliberately NOT redeclared. Only the missing
   item/header/body wrappers are added.
   ------------------------------------------------------------- */
.accordion-item   { background-color: transparent; border: 0; }
.accordion-header { margin: 0; }
.accordion-body   { padding: 0 0 1.5rem 0; }
.accordion-body p            { margin-bottom: .85rem; line-height: 1.7; }
.accordion-body p:last-child { margin-bottom: 0; }


/* -------------------------------------------------------------
   5. SMALL MISSING CLASSES
   ------------------------------------------------------------- */
.hover-white       { transition: color .2s ease; }
.hover-white:hover { color: #fff; }
.z-2               { position: relative; z-index: 2; }


/* -------------------------------------------------------------
   6. ANSWER BLOCKS
   New class, used only on the new pages. Cannot affect old pages.
   ------------------------------------------------------------- */
.answer-block { line-height: 1.75; }
.answer-block p:last-child { margin-bottom: 0; }
.answer-block > p:first-child {
    border-left: 3px solid #8b5cf6;
    padding-left: 1rem;
}


/* -------------------------------------------------------------
   7. GUIDE PAGES
   Everything scoped under .guide-* so it cannot leak elsewhere.
   ------------------------------------------------------------- */
.guide-toc { position: sticky; top: 100px; }
@media (max-width: 991.98px) {
    .guide-toc { position: static; margin-bottom: 2rem; }
}
.guide-toc a {
    display: block;
    padding: .45rem 0 .45rem 1rem;
    border-left: 2px solid #222;
    color: #999;
    text-decoration: none;
    font-size: .9rem;
    line-height: 1.4;
    transition: all .2s ease;
}
.guide-toc a:hover { color: #d8b4fe; border-left-color: #8b5cf6; }

.guide-body { font-size: 1.05rem; line-height: 1.8; color: rgba(255,255,255,.72); }
.guide-body h2 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    margin-top: 3rem;
    margin-bottom: 1.25rem;
    font-size: clamp(1.4rem, 3.5vw, 2rem);
    scroll-margin-top: 100px;
}
.guide-body h3 {
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    color: #fff;
    margin-top: 2rem;
    margin-bottom: .875rem;
    font-size: clamp(1.15rem, 2.5vw, 1.4rem);
    scroll-margin-top: 100px;
}
.guide-body p { margin-bottom: 1.25rem; }
.guide-body ul, .guide-body ol { margin-bottom: 1.5rem; padding-left: 1.25rem; }
.guide-body li { margin-bottom: .6rem; }
.guide-body strong { color: #fff; font-weight: 600; }
.guide-body a { color: #d8b4fe; text-decoration: underline; text-underline-offset: 3px; }
.guide-body a:hover { color: #fff; }

.guide-callout {
    background-color: #050505;
    border: 1px solid #333;
    border-left: 3px solid #8b5cf6;
    border-radius: 0 12px 12px 0;
    padding: 1.5rem;
    margin: 2rem 0;
}
.guide-callout p:last-child { margin-bottom: 0; }

@media (max-width: 575.98px) {
    .guide-body { font-size: .975rem; }
    .guide-callout { padding: 1.15rem; }
}


/* -------------------------------------------------------------
   8. KEYBOARD FOCUS
   style.css has zero :focus-visible rules, so keyboard users get no
   visible focus indicator at all. :focus-visible (not :focus) means
   mouse users never see it — no change to normal browsing.
   ------------------------------------------------------------- */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid #a78bfa;
    outline-offset: 3px;
    border-radius: 4px;
}


/* -------------------------------------------------------------
   9. REDUCED MOTION
   Applies only when the visitor has enabled the OS-level setting.
   No effect otherwise. !important is required to override the
   inline styles AOS writes.
   ------------------------------------------------------------- */
@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: .01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: .01ms !important;
        scroll-behavior: auto !important;
    }
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        visibility: visible !important;
    }
}


/* -------------------------------------------------------------
   10. PRINT  (applies only when printing)
   ------------------------------------------------------------- */
@media print {
    .navbar, .btn, footer, .bm-skip-link { display: none !important; }
    body { background: #fff !important; color: #000 !important; }
    .text-white, .text-white-50, h1, h2, h3 { color: #000 !important; }
    .accordion-collapse { display: block !important; }
}


/* ===================================================================
   11. MEGA MENU
   Scoped entirely under .bm-* classes — none of these names exist in
   style.css, so nothing here can affect your current layout.
   =================================================================== */

/* --- Trigger button: matches .nav-link exactly so it sits inline --- */
.bm-mega-trigger {
    background: none;
    border: 0;
    font: inherit;
    cursor: pointer;
    display: inline-flex;
    align-items: center;
    gap: .4rem;
}
.bm-caret {
    width: 7px; height: 7px;
    border-right: 1.5px solid currentColor;
    border-bottom: 1.5px solid currentColor;
    transform: rotate(45deg) translateY(-2px);
    transition: transform .25s ease;
}
.bm-has-mega.is-open .bm-caret { transform: rotate(-135deg) translateY(-2px); }

/* ===================== DESKTOP ===================== */
@media (min-width: 992px) {

    .bm-has-mega { position: static; }

    .bm-mega {
        position: absolute;
        top: 100%;
        left: 50%;
        transform: translateX(-50%) translateY(8px);
        width: min(1100px, calc(100vw - 3rem));
        opacity: 0;
        visibility: hidden;
        pointer-events: none;
        transition: opacity .22s ease, transform .22s ease, visibility .22s;
        z-index: 1040;
        /* Invisible bridge so the pointer can cross the gap from the
           trigger to the panel without the panel closing underneath it */
        padding-top: 14px;
    }
    .bm-mega--narrow { width: min(420px, calc(100vw - 3rem)); }

    .bm-has-mega.is-open .bm-mega {
        opacity: 1;
        visibility: visible;
        pointer-events: auto;
        transform: translateX(-50%) translateY(0);
    }

    .bm-mega-inner {
        background: rgba(10, 10, 12, .92);
        backdrop-filter: blur(24px) saturate(180%);
        -webkit-backdrop-filter: blur(24px) saturate(180%);
        border: 1px solid rgba(255, 255, 255, .09);
        border-radius: 18px;
        box-shadow: 0 24px 70px rgba(0, 0, 0, .6);
        overflow: hidden;
    }

    .bm-mega-cols {
        display: grid;
        grid-template-columns: repeat(3, 1fr) .95fr;
        gap: 0;
        padding: 1.75rem;
    }
    .bm-mega--narrow .bm-mega-cols {
        grid-template-columns: 1fr;
        padding: 1.25rem;
    }

    .bm-mega-col { padding-right: 1.5rem; }
    .bm-mega-col--full { padding-right: 0; }

    .bm-mega-promo {
        padding-left: 1.5rem;
        border-left: 1px solid rgba(255, 255, 255, .08);
    }
}

/* ===================== SHARED ===================== */
.bm-mega-label {
    font-family: 'Poppins', sans-serif;
    font-size: .7rem;
    font-weight: 700;
    letter-spacing: .1em;
    text-transform: uppercase;
    color: #8b5cf6;
    margin-bottom: .9rem;
}

.bm-mega-col ul { list-style: none; margin: 0; padding: 0; }
.bm-mega-col li { margin-bottom: .2rem; }

.bm-mega-col a {
    display: block;
    padding: .6rem .75rem;
    border-radius: 10px;
    text-decoration: none;
    transition: background .18s ease;
}
.bm-mega-col a:hover,
.bm-mega-col a:focus-visible { background: rgba(139, 92, 246, .12); }
.bm-mega-col a.is-current    { background: rgba(139, 92, 246, .18); }

.bm-mega-title {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-weight: 600;
    font-size: .93rem;
    color: #fff;
    line-height: 1.35;
}
.bm-mega-desc {
    display: block;
    font-size: .78rem;
    color: rgba(255, 255, 255, .45);
    line-height: 1.4;
    margin-top: .12rem;
}
.bm-mega-col a:hover .bm-mega-desc { color: rgba(255, 255, 255, .62); }

.bm-promo-copy {
    font-size: .82rem;
    color: rgba(255, 255, 255, .5);
    line-height: 1.55;
    margin-bottom: 1rem;
}
.bm-promo-link {
    display: block;
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: #d8b4fe;
    text-decoration: none;
    padding: .35rem 0;
    transition: color .18s ease;
}
.bm-promo-link:hover { color: #fff; }

.bm-mega-foot {
    display: flex;
    justify-content: space-between;
    align-items: center;
    gap: 1rem;
    padding: .95rem 1.75rem;
    background: rgba(255, 255, 255, .025);
    border-top: 1px solid rgba(255, 255, 255, .06);
}
.bm-mega-foot a {
    font-family: 'Poppins', sans-serif;
    font-size: .85rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .65);
    text-decoration: none;
    transition: color .18s ease;
}
.bm-mega-foot a:hover { color: #fff; }
.bm-mega-foot a:last-child { color: #d8b4fe; }

/* ===================== MOBILE ===================== */
@media (max-width: 991.98px) {

    .bm-mega-trigger {
        width: 100%;
        justify-content: space-between;
        text-align: left;
    }

    /* Accordion, not a hover panel.
       Fallback path: max-height. 1600px is a ceiling well above the
       tallest real case (~1060px at 320px wide with wrapped descriptions).
       A fixed ceiling is why v1 cut content off — do not lower it.
       Modern path: grid-template-rows 0fr -> 1fr animates to the true
       auto height, so the ceiling stops mattering entirely.
       Supported in Chrome 107+, Safari 16+, Firefox 66+. */
    .bm-mega {
        max-height: 0;
        overflow: hidden;
        transition: max-height .32s ease;
    }
    .bm-has-mega.is-open .bm-mega { max-height: 1600px; }

    @supports (grid-template-rows: 0fr) {
        .bm-mega {
            display: grid;
            grid-template-rows: 0fr;
            max-height: none;
            transition: grid-template-rows .32s ease;
        }
        .bm-has-mega.is-open .bm-mega {
            grid-template-rows: 1fr;
            max-height: none;
        }
        .bm-mega-inner { min-height: 0; }   /* required for the grid trick */
    }

    .bm-mega-inner  { background: none; border: 0; box-shadow: none; }
    .bm-mega-cols   { padding: .25rem 0 .5rem; }
    .bm-mega-col    { margin-bottom: 1.1rem; }

    .bm-mega-promo {
        padding-top: 1rem;
        border-top: 1px solid rgba(255, 255, 255, .08);
    }

    /* Touch targets: WCAG 2.5.5 asks for 44x44px minimum.
       Measured before these rules: mega links 55px (fine), trigger
       43.6px (marginal), promo links 29.2px (clearly too small). */
    .bm-mega-col a { padding: .65rem .75rem; }

    .bm-mega-trigger { min-height: 48px; }

    .bm-promo-link {
        padding: .7rem 0;
        min-height: 44px;
        display: flex;
        align-items: center;
    }

    .bm-mega-foot {
        flex-direction: column;
        align-items: flex-start;
        gap: .5rem;
        padding: .85rem .75rem 0;
        background: none;
    }

    /* The nav panel can exceed viewport height on small phones.
       100dvh is listed second so it wins where supported: on iOS Safari
       100vh includes the address bar, so the panel would extend below
       the visible area and its last items would be unreachable. */
    .glass-header .navbar-collapse {
        max-height: calc(100vh - 90px);
        max-height: calc(100dvh - 90px);
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
        overscroll-behavior: contain;
    }
}

/* Tighten nav spacing on the 992–1200px band, where six items plus two
   buttons would otherwise wrap onto a second line. */
@media (min-width: 992px) and (max-width: 1199.98px) {
    .glass-header .nav-link { padding: .5rem .7rem !important; font-size: .88rem; }
    .btn-glass-dark, .btn-whatsapp-pill { padding: 8px 14px; font-size: .82rem; }
}

@media (prefers-reduced-motion: reduce) {
    .bm-mega, .bm-caret, .bm-mega-col a { transition: none !important; }
}


/* ===================================================================
   12. HOMEPAGE SERVICE GROUPS
   =================================================================== */

/* Row label above each outcome group. Mirrors .bm-mega-label in the
   nav so the page and the menu read as one system. */
.bm-service-group-label {
    font-family: 'Poppins', sans-serif;
    font-size: .72rem;
    font-weight: 700;
    letter-spacing: .12em;
    text-transform: uppercase;
    color: #8b5cf6;
    margin-bottom: 1.1rem;
    padding-bottom: .7rem;
    border-bottom: 1px solid rgba(255, 255, 255, .07);
}

/* "New" badge.
   In the screenshot the AI Chatbots badge rendered but the AEO one was
   hidden behind a decorative purple glow from the section above. The
   card has no overflow:hidden and no stacking context of its own, so a
   positioned sibling elsewhere in the page was painting over it.
   Giving the card z-index:1 lifts the whole card above that decoration;
   z-index:3 on the badge keeps it above the card's own contents. */
.service-card-dark { position: relative; z-index: 1; }

.bm-service-badge {
    position: absolute;
    top: 1rem;
    right: 1rem;
    z-index: 3;
    font-size: .62rem;
    font-weight: 700;
    letter-spacing: .07em;
    text-transform: uppercase;
    padding: 4px 10px;
    border-radius: 50px;
    background: linear-gradient(135deg, #d946ef, #8b5cf6);
    color: #fff;
    box-shadow: 0 2px 12px rgba(139, 92, 246, .45);
    pointer-events: none;
}

@media (max-width: 575.98px) {
    .bm-service-group-label { font-size: .68rem; margin-bottom: .9rem; }
    .bm-service-badge { top: .75rem; right: .75rem; font-size: .58rem; padding: 3px 8px; }
}


/* ===================================================================
   13. SERVICES CTA BAND
   Replaces the tenth "Need Something Custom?" card, which sat alone on
   a 3-column row and left a two-thirds gap on desktop.
   =================================================================== */
.bm-services-cta {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1.75rem;
    padding: 2rem 2.25rem;
    border-radius: 20px;
    background:
        linear-gradient(135deg, rgba(217, 70, 239, .07), rgba(139, 92, 246, .07)),
        #0f0f0f;
    border: 1px solid #2a1a3e;
}

.bm-services-cta-text {
    display: flex;
    align-items: flex-start;
    gap: 1.1rem;
    flex: 1 1 380px;
}

.bm-services-cta-icon {
    flex-shrink: 0;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, #d946ef, #8b5cf6);
    color: #fff;
}

.bm-services-cta-actions {
    display: flex;
    align-items: center;
    gap: .85rem;
    flex-wrap: wrap;
}

.bm-services-cta-link {
    font-family: 'Poppins', sans-serif;
    font-size: .9rem;
    font-weight: 600;
    color: rgba(255, 255, 255, .6);
    text-decoration: none;
    padding: .5rem .25rem;
    transition: color .2s ease;
}
.bm-services-cta-link:hover { color: #fff; }

/* style.css sets this border to rgba(255,255,255,.2), which is close to
   invisible against #000 — the "All services" button read as bare text
   in testing. Lifted only where the button sits inside this band. */
.bm-services-cta .btn-outline-glow {
    border-color: rgba(255, 255, 255, .38);
}
.bm-services-cta .btn-outline-glow:hover {
    border-color: rgba(255, 255, 255, .7);
}

@media (max-width: 767.98px) {
    .bm-services-cta {
        padding: 1.5rem;
        gap: 1.25rem;
        text-align: left;
    }
    .bm-services-cta-actions {
        width: 100%;
        flex-direction: column;
        align-items: stretch;
    }
    .bm-services-cta-actions .btn {
        width: 100%;
        justify-content: center;
    }
    .bm-services-cta-link {
        text-align: center;
        order: 3;   /* push the plain text link below the buttons */
    }
}

/* ===================================================================
   14. SCROLL ANIMATIONS  (replaces the AOS library)
   -------------------------------------------------------------------
   Your pages use only four AOS animations across 195 elements, 174 of
   which are the same one (fade-up). Loading a third-party library from
   unpkg.com for that costs a DNS lookup, a TLS handshake and two
   requests (~15KB) against a domain you don't control — expensive on
   mobile, where connection setup dominates.

   These rules plus ~15 lines of IntersectionObserver in main.js do the
   same job with zero external requests.

   NOTE: one element uses data-aos="scale-up", which is not a real AOS
   animation (AOS calls it "zoom-in"), so it has never animated. It is
   supported below, so it will now work.
   =================================================================== */

[data-aos] {
    opacity: 0;
    transition-property: opacity, transform;
    transition-duration: .8s;
    transition-timing-function: cubic-bezier(.25, .46, .45, .94);
    will-change: opacity, transform;
}
[data-aos="fade-up"]    { transform: translate3d(0, 40px, 0); }
[data-aos="fade-down"]  { transform: translate3d(0, -40px, 0); }
[data-aos="fade-right"] { transform: translate3d(-40px, 0, 0); }
[data-aos="fade-left"]  { transform: translate3d(40px, 0, 0); }
[data-aos="scale-up"],
[data-aos="zoom-in"]    { transform: scale(.9); }

[data-aos].aos-animate {
    opacity: 1;
    transform: translate3d(0, 0, 0) scale(1);
    will-change: auto;   /* release the compositor layer once settled */
}

/* Fallback: if JavaScript fails or is disabled, everything must still be
   visible. Without this, a JS error would hide 195 elements. */
.no-js [data-aos],
[data-aos].aos-fallback {
    opacity: 1 !important;
    transform: none !important;
}

@media (prefers-reduced-motion: reduce) {
    [data-aos] {
        opacity: 1 !important;
        transform: none !important;
        transition: none !important;
    }
}


/* ===================================================================
   15. HEADING SIZE UTILITIES
   -------------------------------------------------------------------
   Lighthouse flags headings that skip levels (h2 straight to h4), which
   breaks screen-reader navigation — users jump between headings to
   scan a page, and a missing level reads as missing content.

   The fix is to correct the TAG while preserving the visual SIZE. These
   classes decouple the two: <h3 class="h4"> is semantically level 3 and
   looks exactly like an h4. style.css had no such utilities.
   =================================================================== */
.h1, .h2, .h3, .h4, .h5, .h6 {
    font-family: 'Poppins', sans-serif;
    font-weight: 700;
    color: #fff;
    margin-bottom: .5rem;
}
.h1 { font-size: 2.5rem; }
.h2 { font-size: 2rem; }
.h3 { font-size: 1.75rem; }
.h4 { font-size: 1.5rem; }
.h5 { font-size: 1.25rem; }
.h6 { font-size: 1rem; }

/* style.css targets `.service-card-dark h4` and `.work-card h4` by tag.
   Demoting those to h3 for correct hierarchy would drop the styling, so
   the same rules are extended to h3 here. Appearance is identical. */
.service-card-dark h3 {
    color: #ffffff;
    font-size: 1.25rem;
    font-weight: 700;
    margin-bottom: 1rem;
}
#work .work-card h3,
section[style*="min-height: 600px"] .work-card h3 {
    max-width: 96%;
    font-size: clamp(1.65rem, 2.2vw, 2rem);
    line-height: 1.02;
    margin-bottom: 0.22rem !important;
    font-weight: 900 !important;
    letter-spacing: -0.01em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    text-shadow: 0 2px 8px rgba(0, 0, 0, 0.55);
}
