/*
Theme Name: Noblexus
Theme URI: https://noblexus.com
Author: Noblexus Team
Author URI: https://noblexus.com
Description: A high-performance, Awwwards-tier custom WordPress theme featuring GSAP animations and Lenis smooth scrolling.
Version: 1.0.1
Text Domain: noblexus
*/

/* ==========================================================================
   1. WORDPRESS OVERRIDES & SPACING FIXES
   ========================================================================== */
body, 
.wp-site-blocks, 
main { margin: 0 !important; padding: 0 !important; }
.is-layout-flow > :first-child { margin-block-start: 0 !important; }
body.admin-bar #mainNav, body.admin-bar nav { top: 32px !important; }

@media screen and (max-width: 782px) {
  body.admin-bar #mainNav, body.admin-bar nav { top: 46px !important; }
}

/* ==========================================================================
   2. LENIS SMOOTH SCROLLING UTILITIES
   ========================================================================== */
html.lenis, html.lenis body { height: auto; width: 100vw; }
.lenis.lenis-smooth { scroll-behavior: auto !important; }
.lenis.lenis-smooth [data-lenis-prevent] { overscroll-behavior: contain; }
.lenis.lenis-stopped { overflow: hidden; }
.lenis.lenis-scrolling iframe { pointer-events: none; }

/* ==========================================================================
   3. BRAND VARIABLES & BASE STYLES
   ========================================================================== */
:root {
  --color-navy: #16234A;
  
  /* WCAG AA Compliant (For Text, Links, and Buttons) */
  --color-coral: #DB381A;
  --color-turquoise: #0E7F76;
  
  /* Vibrant Accents (Strictly for Borders, Icons, and Decorative Backgrounds) */
  --color-coral-vibrant: #FF5D3A;
  --color-turquoise-vibrant: #16C7B9;
  
  --color-text-secondary: #5B6478;
  --color-border: #E2E5EB;
  --color-surface: #F7F8FA;
  --color-bg: #FFFFFF;
  
  --font-heading: 'IBM Plex Sans', sans-serif;
  --font-body: 'Inter', sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; background: var(--color-bg); color: var(--color-navy); font-family: var(--font-body); }
a { color: var(--color-coral); text-decoration: none; }
a:hover { color: var(--color-navy); }

/* ==========================================================================
   4. CUSTOM HOVER STATES & UTILITIES
   ========================================================================== */
.btn-primary { transition: background .3s, box-shadow .3s, color .3s; display: inline-block; }
.btn-primary:hover { box-shadow: 0 14px 30px rgba(255,93,58,0.5); }
.btn-primary-large { transition: background .3s, box-shadow .3s, color .3s; display: inline-block; }
.btn-primary-large:hover { box-shadow: 0 18px 40px rgba(255,93,58,0.6); }
.btn-outline { transition: background .3s, border-color .3s; display: inline-block; }
.btn-outline:hover { background: rgba(255,255,255,0.2); }
.service-card { transition: all .3s cubic-bezier(.4,0,.2,1); }
.service-card:hover { transform: translateY(-8px); border-color: var(--color-turquoise); box-shadow: 0 20px 40px rgba(22,35,74,0.14); }

/* ==========================================================================
   5. GSAP INITIAL STATES
   ========================================================================== */
@keyframes pulseGlow {
  0%, 100% { box-shadow: 0 20px 60px rgba(22,199,185,0.25); }
  50% { box-shadow: 0 20px 80px rgba(22,199,185,0.45); }
}
.gsap-reveal, .hero-anim { visibility: hidden; }
.parallax-wrap { overflow: hidden; position: relative; }

/* ==========================================================================
   6. HEADER SCROLL & MOBILE MENU STYLES
   ========================================================================== */
nav {
  background: transparent !important;
  backdrop-filter: none !important;
  border-bottom: 1px solid transparent !important;
  transition: background 0.4s ease, backdrop-filter 0.4s ease, border-color 0.4s ease, box-shadow 0.4s ease;
}
nav.nav-scrolled {
  background: rgba(255, 255, 255, 0.45) !important; 
  backdrop-filter: blur(24px) !important; 
  -webkit-backdrop-filter: blur(24px) !important; 
  border-bottom: 1px solid rgba(255, 255, 255, 0.4) !important; 
  box-shadow: 0 4px 30px rgba(0, 0, 0, 0.05) !important; 
}
.nav-links { display: flex; align-items: center; gap: 36px; }
.nav-link { color: #fff !important; transition: color 0.3s ease; }
nav.nav-scrolled .nav-link { color: var(--color-navy) !important; }

.menu-overlay {
  position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
  background: rgba(22, 35, 74, 0.6); backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px); z-index: 99; display: none; opacity: 0;
}

.hamburger {
  display: none; background: transparent; border: none; outline: none;
  appearance: none; width: 44px; height: 44px; position: relative;
  padding: 0; z-index: 102; cursor: pointer;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
}
.hamburger .line {
  display: block; width: 24px; height: 2px; margin: 0;
  transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.4s ease, background-color 0.3s ease;
  transform-origin: center;
}
.hamburger.is-active .line-1 { transform: translateY(7px) rotate(45deg); }
.hamburger.is-active .line-2 { opacity: 0; }
.hamburger.is-active .line-3 { transform: translateY(-7px) rotate(-45deg); }

/* --- HAMBURGER COLOUR: SINGLE SOURCE OF TRUTH ---
   Do not add !important to any rule below, and do not add hamburger colour
   rules anywhere else in this file. Order matters: the last two rules must
   stay after the dark-page list. */
.hamburger { --ham: var(--color-navy); }              /* light interior pages */

body.has-dark-hero .hamburger { --ham: #ffffff; }   /* dark heroes — list lives in functions.php */

nav.nav-scrolled .hamburger,
.hamburger.is-active { --ham: var(--color-navy); }    /* scrolled nav + open menu */

.hamburger .line { background-color: var(--ham); }

/* ==========================================================================
   7. MOBILE MENU BREAKPOINT 
   ========================================================================== */
@media (max-width: 991px) {
  .hamburger { display: flex; }
  .nav-logo { padding-left: 0; }
  nav { padding: 16px 24px !important; }
  
  .nav-links {
    position: fixed; top: 0; right: 0; width: 100%; max-width: 340px; height: 100vh;
    background: var(--color-bg); flex-direction: column; align-items: flex-start;
    padding: 110px 32px 48px; box-shadow: -10px 0 40px rgba(0,0,0,0.15); z-index: 100;
  }
  .nav-links .nav-link { 
    color: var(--color-navy) !important; font-size: 20px !important; width: 100%;
    padding: 16px 0; border-bottom: 1px solid var(--color-border);
  }
  .nav-links .btn-primary { margin-top: 32px; width: 100%; text-align: center; padding: 16px 26px; font-size: 16px; }
}

/* ==========================================================================
   8. CUSTOM CURSOR
   ========================================================================== */
@media (pointer: fine) {
  html.has-custom-cursor body,
  html.has-custom-cursor a,
  html.has-custom-cursor button,
  html.has-custom-cursor .magnetic-btn,
  html.has-custom-cursor .service-card,
  html.has-custom-cursor .hamburger { cursor: none !important; }
}
@media (prefers-reduced-motion: reduce) { .custom-cursor { display: none !important; } }
.custom-cursor {
  position: fixed; top: 0; left: 0; width: 12px; height: 12px; background-color: var(--color-coral);
  border-radius: 50%; pointer-events: none; z-index: 9999; transform-origin: center; box-sizing: border-box;
  opacity: 0; display: none; transition: background-color 0.2s, border 0.2s;
}
@media (pointer: coarse) { .custom-cursor { display: none !important; } }

/* ==========================================================================
   9. RESPONSIVE LAYOUT & TYPOGRAPHY UTILITIES
   ========================================================================== */
/* Desktop Base Styles */
.section-padding { padding: 120px 48px; }
.section-padding-bottom { padding: 0 48px 140px; }

.hero-title { font-family: var(--font-heading); font-size: 56px; font-weight: 700; color: #fff; line-height: 1.1; margin: 0 0 20px; }
.hero-subtitle { font-size: 19px; line-height: 1.6; color: rgba(255,255,255,0.85); margin: 0 0 36px; }

.pulse-section-wrap { position: relative; margin-top: -80px; padding: 140px 48px; overflow: hidden; background: var(--color-bg); border-radius: 48px 48px 0 0; z-index: 10; box-shadow: 0 -15px 40px rgba(0,0,0,0.15); }
.pulse-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 64px; align-items: center; position: relative; max-width: 1200px; margin: 0 auto; }
.section-title { font-family: var(--font-heading); font-size: 40px; font-weight: 700; line-height: 1.15; margin: 0 0 24px; }

.table-wrapper { max-width: 1100px; margin: 0 auto; background: var(--color-bg); border-radius: 24px; box-shadow: 0 20px 60px rgba(22,35,74,0.1); overflow-x: auto; border: 1px solid var(--color-border); }
.compare-row { display: grid; grid-template-columns: 1.4fr 1fr 1fr; }

/* Mobile Overrides */
@media (max-width: 768px) {
  .section-padding { padding: 80px 24px; }
  .section-padding-bottom { padding: 0 24px 80px; }
  
  .hero-title { font-size: 38px; }
  .hero-subtitle { font-size: 17px; }
  
  .pulse-section-wrap { padding: 80px 24px; margin-top: -40px; border-radius: 32px 32px 0 0; }
  .pulse-grid { grid-template-columns: 1fr; gap: 48px; }
  .section-title { font-size: 32px; }
  
  /* Forces the comparison table to allow horizontal swiping on mobile */
  .compare-row { min-width: 700px; } 
}

/* ==========================================================================
   10. PAGE TRANSITIONS (CINEMATIC FADE)
   ========================================================================== */
.page-transition-fade {
  position: fixed;
  top: 0;
  left: 0;
  width: 100vw;
  height: 100vh;
  background-color: var(--color-navy, #0a1128); 
  z-index: 99999;
  pointer-events: none;
  opacity: 1; 
  visibility: visible;
  will-change: opacity;
}

/* WordPress Dynamic Menu Reset */
.nav-list-dynamic {
    display: flex;
    align-items: center;
    gap: 36px;
    list-style: none;
    margin: 0;
    padding: 0;
}

.nav-list-dynamic li a {
    color: inherit;
    text-decoration: none;
    font-size: 15px;
    font-weight: 500;
    transition: color 0.3s ease;
}
/* ==========================================================================
   11. ADAPTIVE HEADER (LIGHT VS DARK PAGES)
   ========================================================================== */
/* 1. Dark Background Pages - White text before scroll */
body.has-dark-hero nav:not(.nav-scrolled) .nav-list-dynamic li a {
    color: #ffffff;
}

/* 2. Scrolled State (Navy text on white blurred nav background for ALL pages) */
nav.nav-scrolled .nav-list-dynamic li a {
    color: var(--color-navy);
}

/* 3. Standard Interior Pages (Always Navy text since the page is white) */
body:not(.has-dark-hero) .nav-list-dynamic li a {
    color: var(--color-navy);
}

/* NOTE: Hamburger icon colour used to live here (rule 4). It now lives in
   Section 6 only - see "HAMBURGER COLOUR: SINGLE SOURCE OF TRUTH". */

/* ==========================================================================
   12. GUTENBERG BLOCK STYLES (INTERIOR PAGES)
   ========================================================================== */
.default-page-wrapper {
    font-size: 17px;
    line-height: 1.8;
    color: var(--color-navy);
}

.default-page-wrapper p {
    margin-bottom: 24px;
    color: var(--color-text-secondary);
}

.default-page-wrapper h1, 
.default-page-wrapper h2, 
.default-page-wrapper h3, 
.default-page-wrapper h4 {
    font-family: var(--font-heading);
    color: var(--color-navy);
    margin-top: 48px;
    margin-bottom: 20px;
    font-weight: 700;
    line-height: 1.2;
    letter-spacing: -0.02em;
}

.default-page-wrapper ul, 
.default-page-wrapper ol {
    margin-bottom: 32px;
    padding-left: 24px;
    color: var(--color-text-secondary);
}

.default-page-wrapper li {
    margin-bottom: 12px;
}

.default-page-wrapper .wp-block-button__link {
    background-color: var(--color-coral);
    color: #ffffff !important;
    padding: 14px 28px;
    border-radius: 999px;
    font-family: var(--font-body);
    font-size: 15px;
    font-weight: 600;
    box-shadow: 0 8px 20px rgba(255,93,58,0.35);
    transition: box-shadow 0.3s ease, background-color 0.3s ease, transform 0.3s ease;
    text-decoration: none;
    display: inline-block;
    border: none;
}

.default-page-wrapper .wp-block-button__link:hover {
    box-shadow: 0 14px 30px rgba(255,93,58,0.5);
    background-color: #c42f15;
    transform: translateY(-2px);
}

/* ==========================================================================
   13. WPFORMS CUSTOM STYLING (Global)
   ========================================================================== */
div.wpforms-container-full .wpforms-form .wpforms-field-label {
    font-size: 14px;
    font-weight: 500;
    color: var(--color-navy);
    margin-bottom: 8px;
    font-family: var(--font-body);
}

div.wpforms-container-full .wpforms-form input[type=text],
div.wpforms-container-full .wpforms-form input[type=email],
div.wpforms-container-full .wpforms-form textarea {
    width: 100%;
    padding: 16px !important;
    border: 1px solid var(--color-border) !important;
    border-radius: 8px !important;
    font-family: var(--font-body);
    font-size: 16px !important;
    background: var(--color-surface) !important;
    color: var(--color-navy) !important;
    box-sizing: border-box;
    transition: all 0.3s ease;
}

div.wpforms-container-full .wpforms-form input:focus,
div.wpforms-container-full .wpforms-form textarea:focus {
    outline: none !important;
    border-color: var(--color-turquoise) !important;
    box-shadow: 0 0 0 3px rgba(14,127,118,0.15) !important;
}

div.wpforms-container-full .wpforms-form button[type=submit] {
    background: var(--color-navy) !important;
    color: #fff !important;
    padding: 16px 40px !important;
    border: none !important;
    border-radius: 999px !important;
    font-size: 16px !important;
    font-family: var(--font-body);
    font-weight: 600 !important;
    cursor: pointer !important;
    width: 100% !important;
    transition: all 0.3s ease !important;
}

div.wpforms-container-full .wpforms-form button[type=submit]:hover {
    background: var(--color-coral) !important;
    transform: translateY(-2px);
    box-shadow: 0 10px 26px rgba(219,56,26,0.3);
}

/* ==========================================================================
   14. GLOBAL HORIZONTAL OVERFLOW KILLER (Stops mobile side-scrolling)
   ========================================================================== */
html, body {
    max-width: 100% !important;
    overflow-x: hidden !important;
}

/* ==========================================================================
   15. HEADER DROPDOWN MENU (Desktop Only - >= 992px)
   ========================================================================== */
@media (min-width: 992px) {
    li.menu-item-has-children {
        position: relative;
        cursor: pointer;
    }

    ul.sub-menu {
        position: absolute;
        top: 100%;
        left: 0;
        background: #ffffff;
        min-width: 280px;
        box-shadow: 0 20px 40px rgba(22,35,74,0.15);
        border-radius: 12px;
        padding: 12px 0;
        margin: 0 !important;
        opacity: 0;
        visibility: hidden;
        transform: translateY(15px);
        transition: all 0.3s ease;
        z-index: 1000;
        list-style: none !important;
    }

    li.menu-item-has-children:hover > ul.sub-menu,
    li.menu-item-has-children:focus-within > ul.sub-menu {
        opacity: 1;
        visibility: visible;
        transform: translateY(20px); 
    }

    ul.sub-menu li {
        display: block;
        margin: 0 !important;
        padding: 0 !important;
        list-style: none !important;
    }
    
    ul.sub-menu li::before {
        display: none !important; 
    }

    ul.sub-menu li a {
        display: block;
        padding: 12px 24px;
        color: var(--color-navy) !important;
        font-size: 15px;
        font-weight: 500;
        text-decoration: none;
        transition: all 0.2s ease;
    }

    ul.sub-menu li a:hover {
        color: var(--color-coral) !important;
        background: rgba(219,56,26,0.05); 
        padding-left: 30px; 
    }
}

/* ==========================================================================
   16. MOBILE & TABLET LAYOUT FIXES (< 992px)
   ========================================================================== */
@media (max-width: 991px) {
    /* FIX STICKY PHOTO ON ABOUT PAGE */
    .sticky-mobile-fix {
        position: relative !important;
        top: 0 !important;
        margin-bottom: 32px !important;
    }

    /* FIX PARTNER LOGOS GRID ON SMALL SCREENS */
    .partner-logo-grid {
        grid-template-columns: repeat(3, 1fr) !important;
        gap: 20px !important;
    }

    /* FULL SCREEN MOBILE MENU */
    #navLinks {
        width: 100vw !important; 
        max-width: 100vw !important;
        height: 100vh !important; 
        height: 100dvh !important;
        left: 0 !important;
        right: 0 !important;
        top: 0 !important;
        padding: 80px 32px 40px 32px !important;
        box-sizing: border-box !important;
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        overflow-y: auto !important;
        background: #ffffff !important;
    }

    /* FORCE MENU LIST TO STACK VERTICALLY */
    ul#primary-menu {
        display: flex !important;
        flex-direction: column !important;
        align-items: flex-start !important;
        width: 100% !important;
        padding-left: 0 !important;
        margin-left: 0 !important;
        list-style: none !important;
        margin-top: 0 !important; 
        margin-bottom: 0 !important;
    }

    /* MENU ITEMS & DIVIDERS */
    ul#primary-menu > li.menu-item {
        width: 100% !important;
        display: block !important;
        list-style: none !important;
        margin-bottom: 0 !important;
        padding: 24px 0 !important;
        border-bottom: 1px solid rgba(22,35,74,0.08) !important;
        text-align: left !important;
    }
    ul#primary-menu > li.menu-item:last-of-type {
        border-bottom: none !important;
    }
    ul#primary-menu > li.menu-item::before {
        display: none !important;
    }

    /* MAIN LINKS & PREMIUM PLUS/MINUS TOGGLE */
    ul#primary-menu > li.menu-item > a {
        color: var(--color-navy) !important;
        font-size: 20px !important;
        font-weight: 600 !important;
        text-decoration: none !important;
        display: flex !important;
        justify-content: space-between !important;
        align-items: center !important;
        width: 100% !important;
    }
    
    /* Replaces the orange triangle with a sleek Navy Plus (+) */
    ul#primary-menu li.menu-item-has-children > a::after {
        content: "+";
        font-size: 28px;
        font-weight: 300;
        color: var(--color-navy);
        transition: transform 0.3s ease;
        line-height: 1;
    }
    
    /* Flips to a Minus (-) when the menu is open */
    ul#primary-menu li.menu-item-has-children.submenu-active > a::after {
        content: "−";
        transform: none;
    }

    /* SUB-MENU: SEPARATED, NO GREY BOX */
    ul#primary-menu ul.sub-menu {
        display: none !important; 
        flex-direction: column !important;
        position: relative !important;
        width: 100% !important;
        background: transparent !important; 
        border-radius: 0 !important;
        margin-top: 16px !important;
        padding: 0 0 0 16px !important; 
        box-sizing: border-box !important;
        box-shadow: none !important;
        list-style: none !important;
        border-left: 2px solid rgba(22,35,74,0.1) !important; 
    }

    ul#primary-menu li.menu-item-has-children.submenu-active ul.sub-menu {
        display: flex !important;
    }

    ul#primary-menu ul.sub-menu li.menu-item {
        margin-bottom: 20px !important;
        list-style: none !important;
        padding: 0 !important;
        border: none !important;
    }
    ul#primary-menu ul.sub-menu li.menu-item::before {
        display: none !important;
    }
    ul#primary-menu ul.sub-menu li.menu-item:last-child {
        margin-bottom: 8px !important;
    }
    ul#primary-menu ul.sub-menu li.menu-item a {
        font-size: 16px !important;
        font-weight: 500 !important;
        padding: 0 !important;
        color: var(--color-navy) !important;
        opacity: 0.75 !important; 
    }

    /* STRATEGY CALL BUTTON */
    #navLinks .btn-primary {
        margin-left: 0 !important;
        margin-top: 40px !important; 
        margin-bottom: 40px !important;
        width: 100% !important;
        display: flex !important;
        justify-content: center !important;
        align-items: center !important;
        box-sizing: border-box !important;
    }
}

/* ==========================================================================
   17. (REMOVED) HAMBURGER ICON VISIBILITY - superseded by Section 6
   ========================================================================== */

/* ==========================================================================
   18. HOMEPAGE GRID RESPONSIVENESS FIX
   ========================================================================== */
@media (max-width: 991px) {
    .responsive-grid-3 {
        grid-template-columns: 1fr !important;
        gap: 40px !important;
    }
}

/* ==========================================================================
   19. FOOTER MENU STYLING
   ========================================================================== */
.footer-nav-list {
    display: flex;
    gap: 24px;
    list-style: none;
    margin: 0;
    padding: 0;
}
.footer-nav-list li a {
    color: var(--color-text-secondary);
    font-size: 14px;
    text-decoration: none;
    transition: color 0.3s ease;
}
.footer-nav-list li a:hover {
    color: var(--color-coral);
}

/* ==========================================================================
   20. JS TIMEOUT FALLBACK (Prevents Invisible Content)
   ========================================================================== */
.js-timeout .gsap-reveal, 
.js-timeout .hero-anim, 
.js-timeout #mainNav { 
    visibility: visible !important; 
    opacity: 1 !important; 
}
/* ==========================================================================
   21. SKIP LINK (keyboard accessibility)
   ========================================================================== */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100000;
  background: var(--color-navy); color: #fff; padding: 12px 20px;
  border-radius: 0 0 8px 0; font-size: 14px; font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { left: 0; color: #fff; }