/* ==========================================================================
   Dark theme: Midnight Navy + Electric Teal + Vibrant Blue
   Loaded last on every page. ONLY affects dark mode (html.dark-mode /
   body.dark-mode). Light mode, layout, content, fonts, sizes and images are
   untouched: every rule below is scoped to .dark-mode and only changes
   colour, borders, shadows and backgrounds.

   Palette
     Primary accent   Electric Teal  #00D5C8
     Secondary accent Vibrant Blue   #3B82F6
     Highlight        Soft Aqua      #5EEAD4
     Page bg          Midnight Navy  #080F1C
     Section bg                      #101B2D
     Card bg                         #142238
     Heading text                    #F1F5F9
     Body text                       #D3DCE7
     Secondary text                  #AAB8CA
     Borders                         #263B53

   Contrast (WCAG 2.x)
     #F1F5F9 on #080F1C = 17.5:1   #D3DCE7 on #142238 = 11.5:1
     #AAB8CA on #080F1C =  9.5:1   #AAB8CA on #142238 =  7.9:1
     #00D5C8 on #080F1C = 10.3:1   #5EEAD4 on #142238 = 10.8:1
     button text #04121F on #00D5C8 = 10.1:1 (on #3B82F6 end = 5.0:1)
   ========================================================================== */

html.dark-mode,
body.dark-mode {
    color-scheme: dark;

    /* palette tokens (dark only) */
    --dk-teal: #00D5C8;
    --dk-blue: #3B82F6;
    --dk-aqua: #5EEAD4;
    --dk-bg: #080F1C;
    --dk-bg-2: #101B2D;
    --dk-card: #142238;
    --dk-card-2: #1A2B44;
    --dk-text: #F1F5F9;
    --dk-text-2: #AAB8CA;
    --dk-border: #263B53;
    --dk-ink: #04121F;               /* text on teal */
    --dk-teal-rgb: 0, 213, 200;
    --dk-blue-rgb: 59, 130, 246;
    --dk-grad: linear-gradient(135deg, #00D5C8 0%, #3B82F6 100%);
    --dk-grad-soft: linear-gradient(135deg, rgba(0, 213, 200, 0.14) 0%, rgba(59, 130, 246, 0.10) 100%);
    --dk-grad-text: linear-gradient(110deg, #F1DFA6 0%, #C5A039 60%, #B8932F 100%);

    /* text accent: brand gold, as in light mode */
    --dk-gold: #C5A039;
    --dk-gold-hi: #E3C46F;

    /* text */
    --color-primary: #F1F5F9;
    --color-text: #D3DCE7;
    --color-text-light: #AAB8CA;
    --color-text-heading: #F1F5F9;
    --color-text-dark: #C7D2DF;
    --color-white: #F1F5F9;
    --color-dark: #050A14;

    /* accents */
    --color-secondary: #00D5C8;
    --color-accent: #5EEAD4;

    /* surfaces */
    --color-bg-body: #080F1C;
    --color-bg-light: #101B2D;
    --color-bg-card: #142238;

    --glass-bg: rgba(20, 34, 56, 0.82);
    --glass-border: #263B53;
    --glass-shadow: 0 12px 32px -8px rgba(2, 6, 14, 0.6);

    --toggle-glow: rgba(0, 213, 200, 0.28);
    --toggle-icon-bg: #F1F5F9;
    --toggle-icon-color: #00D5C8;

    --shadow-sm: 0 1px 2px 0 rgb(2 6 14 / 0.4);
    --shadow-md: 0 6px 16px -4px rgb(2 6 14 / 0.5);
    --shadow-lg: 0 16px 34px -8px rgb(2 6 14 / 0.55);
    --shadow-glow: 0 8px 24px -8px rgba(0, 213, 200, 0.35);

    /* glows: present but restrained */
    --glow-secondary: 0 0 14px rgba(0, 213, 200, 0.22);
    --glow-accent: 0 0 14px rgba(59, 130, 246, 0.22);
    --glow-white: 0 0 8px rgba(241, 245, 249, 0.10);
    --glow-strong: 0 0 20px rgba(0, 213, 200, 0.30);

    --hero-overlay-start: rgba(8, 15, 28, 0.92);
    --hero-overlay-mid: rgba(8, 15, 28, 0.72);
    --hero-overlay-end: rgba(8, 15, 28, 0.12);

    --gradient-primary: linear-gradient(135deg, #101B2D 0%, #142238 100%);
    --gradient-luxury: linear-gradient(135deg, #FFFFFF 20%, #C5A039 80%);
    --gradient-glow: linear-gradient(to right, #C5A039, transparent);
    --gradient-surface: linear-gradient(135deg, #101B2D, #142238);
}

html.dark-mode body,
body.dark-mode {
    background-color: var(--color-bg-body);
    color: var(--color-text);
}

body.dark-mode ::selection {
    background: rgba(0, 213, 200, 0.32);
    color: #FFFFFF;
}

/* Keyboard focus: a clear teal ring (accessibility) */
body.dark-mode a:focus-visible,
body.dark-mode button:focus-visible,
body.dark-mode input:focus-visible,
body.dark-mode select:focus-visible,
body.dark-mode textarea:focus-visible {
    outline: 2px solid var(--dk-teal);
    outline-offset: 2px;
}

/* ---------- Header & navigation ---------- */
html.dark-mode .header,
body.dark-mode .header {
    background-color: rgba(16, 27, 45, 0.92);
    border-bottom: 1px solid var(--dk-border);
    box-shadow: 0 8px 24px -14px rgba(2, 6, 14, 0.8), inset 0 -1px 0 rgba(0, 213, 200, 0.06);
}

body.dark-mode .nav-menu.active {
    background-color: var(--dk-bg-2);
    border-color: var(--dk-border);
}

body.dark-mode .nav-link::after,
body.dark-mode .nav-link.services-circle::before {
    background: var(--dk-card);
    border-color: var(--dk-border);
}

/* Hover / active colour (the generic dark link rule otherwise greys it out) */
html.dark-mode body.dark-mode .nav-link:not(.btn-primary):hover,
html.dark-mode body.dark-mode .nav-link.active:not(.btn-primary) {
    color: var(--dk-gold) !important;
}

body.dark-mode .nav-link:hover svg,
body.dark-mode .nav-link.active svg {
    stroke: var(--dk-gold);
}

/* Active indicator: teal ring around the icon bubble */
body.dark-mode .nav-link.active:not(.btn-primary)::after {
    background: radial-gradient(circle at 50% 35%, #1B3350 0%, var(--dk-card) 75%);
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.55), 0 4px 14px -4px rgba(0, 213, 200, 0.45);
}

body.dark-mode .nav-link:not(.btn-primary):hover::after {
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.35);
}

/* ---------- Footer & contact ---------- */
html.dark-mode .footer,
body.dark-mode .footer {
    background-color: #060C17;
    background-image: radial-gradient(900px 240px at 15% 0%, rgba(0, 213, 200, 0.06), transparent 70%),
        radial-gradient(800px 240px at 90% 100%, rgba(59, 130, 246, 0.06), transparent 70%);
    color: var(--color-text);
    border-top: 1px solid var(--dk-border);
}

body.dark-mode .footer h4 {
    color: var(--dk-text);
}

body.dark-mode .footer a {
    color: #B9C6D6;
}

html.dark-mode body.dark-mode .footer a:hover {
    color: var(--dk-gold) !important;
}

body.dark-mode .footer-tagline {
    color: var(--dk-text-2);
}

body.dark-mode .footer-copyright {
    color: rgba(170, 184, 202, 0.75);
}

body.dark-mode .footer-social-branding a {
    background: rgba(20, 34, 56, 0.6);
    border-color: var(--dk-border);
    transition: background-color 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease;
}

body.dark-mode .footer-social-branding a:hover {
    border-color: rgba(0, 213, 200, 0.55);
    box-shadow: 0 0 14px -2px rgba(0, 213, 200, 0.35);
}

body.dark-mode .ct-card a.ct-link {
    color: var(--color-text);
}

html.dark-mode body.dark-mode .ct-card a.ct-link:hover,
html.dark-mode body.dark-mode .ct-card a.ct-link:focus-visible {
    color: var(--dk-gold) !important;
}

/* ---------- Hero ---------- */
html body.dark-mode .hero-title {
    color: var(--dk-text) !important;
}

html body.dark-mode .hero-subtitle,
html body.dark-mode .hero-text {
    color: #DCE4EE !important;
}

/* Highlighted words: teal -> aqua -> blue gradient (same shimmer animation) */
html.dark-mode #hero .hero-title span,
body.dark-mode #hero .hero-title span {
    background-image: linear-gradient(100deg, #A9852A 0%, #E3C46F 30%, #C5A039 60%, #A9852A 90%);
    background-size: 200% auto;
}

html.dark-mode #hero .hero-title span::after,
body.dark-mode #hero .hero-title span::after {
    background: linear-gradient(90deg, #C5A039, #E3C46F);
    box-shadow: 0 0 12px rgba(197, 160, 57, 0.45);
}

html.dark-mode #hero .hero-title small,
body.dark-mode #hero .hero-title small {
    border-color: rgba(0, 213, 200, 0.5);
    background: rgba(8, 15, 28, 0.6);
    box-shadow: 0 6px 18px -8px rgba(0, 213, 200, 0.5);
}

/* Section headings that already use the gradient-text style */
body.dark-mode .luxury-title {
    background: var(--gradient-luxury);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

body.dark-mode .luxury-title::after {
    background: var(--gradient-glow);
    box-shadow: 0 0 10px rgba(197, 160, 57, 0.25);
}

body.dark-mode .glow-text {
    text-shadow: 0 0 14px rgba(0, 213, 200, 0.25);
}

/* ---------- Buttons ---------- */
/* Primary: teal -> blue gradient with dark ink text */
html body.dark-mode .btn-primary,
html body.dark-mode .nav-link.active.btn-primary,
html body.dark-mode a.btn-primary:visited,
html body.dark-mode .insights-btn-theme,
html body.dark-mode .btn-request {
    background-color: var(--dk-teal) !important;
    background-image: linear-gradient(135deg, #00D5C8 0%, #1FB5D6 55%, #3B82F6 130%) !important;
    border-color: transparent !important;
    color: var(--dk-ink) !important;
    box-shadow: 0 8px 20px -10px rgba(0, 213, 200, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.18);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease, transform 0.3s ease;
}

html body.dark-mode .btn-primary:hover,
html body.dark-mode .nav-link.active.btn-primary:hover,
html body.dark-mode .insights-btn-theme:hover,
html body.dark-mode .btn-request:hover {
    background-color: rgba(0, 213, 200, 0.10) !important;
    background-image: linear-gradient(135deg, rgba(0, 213, 200, 0.14), rgba(59, 130, 246, 0.14)) !important;
    border-color: var(--dk-teal) !important;
    color: #FFFFFF !important;
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.25), 0 10px 26px -10px rgba(0, 213, 200, 0.55) !important;
    filter: none;
}

/* Text inside primary buttons (generic dark text rules would recolour spans) */
html.dark-mode body.dark-mode .btn-primary span,
html.dark-mode body.dark-mode .btn-primary strong {
    color: inherit !important;
}

/* Secondary (filled teal in dark mode, dark ink text) */
html body.dark-mode .btn-secondary {
    background-color: var(--dk-teal);
    background-image: linear-gradient(135deg, #00D5C8 0%, #1FB5D6 55%, #3B82F6 130%);
    border-color: transparent;
    color: var(--dk-ink) !important;
    box-shadow: 0 8px 20px -12px rgba(0, 213, 200, 0.55);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html body.dark-mode .btn-secondary:hover {
    background-color: rgba(0, 213, 200, 0.10) !important;
    background-image: linear-gradient(135deg, rgba(0, 213, 200, 0.14), rgba(59, 130, 246, 0.14));
    border-color: var(--dk-teal);
    color: #FFFFFF !important;
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.2), 0 8px 22px -10px rgba(0, 213, 200, 0.5);
}

/* Outline */
body.dark-mode .btn-outline {
    background-color: rgba(16, 27, 45, 0.85);
    border-color: rgba(94, 234, 212, 0.45);
    color: var(--dk-text);
    box-shadow: 0 4px 14px -6px rgba(2, 6, 14, 0.6);
    transition: background-color 0.3s ease, color 0.3s ease, border-color 0.3s ease, box-shadow 0.3s ease;
}

html body.dark-mode .btn-outline:hover {
    background-color: rgba(0, 213, 200, 0.12);
    border-color: var(--dk-teal);
    color: #FFFFFF !important;
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.2), 0 8px 22px -10px rgba(0, 213, 200, 0.5);
}

html.dark-mode #back-to-top,
body.dark-mode #back-to-top {
    box-shadow: 0 6px 18px -6px rgba(0, 213, 200, 0.5);
}

html.dark-mode #back-to-top:hover,
body.dark-mode #back-to-top:hover {
    box-shadow: 0 0 0 1px rgba(0, 213, 200, 0.3), 0 8px 22px -6px rgba(0, 213, 200, 0.55);
}

body.dark-mode .text-link,
html body.dark-mode .service-card .text-link {
    color: var(--dk-gold) !important;
    transition: color 0.25s ease;
}

html body.dark-mode .service-card .text-link:hover {
    color: var(--dk-gold-hi) !important;
}

/* ---------- Industry slider: navy/gold grade becomes navy/teal ---------- */
html.dark-mode #industry-expertise,
body.dark-mode #industry-expertise {
    --ind-gold: #C5A039;
}

body.dark-mode #industry-expertise .lundev-list .lundev-item::before,
body.dark-mode #industry-expertise .lundev-thumb-item::before {
    background: linear-gradient(125deg, #080F1C 0%, #12284A 40%, #0E4F6E 75%, #00A8A0 100%);
}

body.dark-mode #industry-expertise .lundev-author::before {
    background: linear-gradient(90deg, #00D5C8, rgba(59, 130, 246, 0.25));
}

body.dark-mode #industry-expertise .lundev-topic {
    background: linear-gradient(100deg, #E9D39A 0%, #C5A039 45%, #A9852A 100%);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dark-mode #industry-expertise .lundev-des {
    border-left-color: rgba(0, 213, 200, 0.7);
}

body.dark-mode #industry-expertise .lundev-des li::before {
    box-shadow: 0 0 8px rgba(0, 213, 200, 0.6);
}

body.dark-mode #industry-expertise .lundev-thumb-item {
    border-color: rgba(0, 213, 200, 0.32);
}

body.dark-mode #industry-expertise .lundev-thumb-item::after {
    background:
        linear-gradient(90deg, transparent, rgba(94, 234, 212, 0.8), transparent) top / 100% 2px no-repeat,
        linear-gradient(0deg, rgba(5, 10, 20, 0.92) 0%, rgba(5, 10, 20, 0.35) 45%, rgba(5, 10, 20, 0) 70%);
}

body.dark-mode #industry-expertise .lundev-thumb-description {
    color: var(--dk-gold-hi);
}

body.dark-mode #industry-expertise .lundev-thumb-item:hover {
    border-color: rgba(94, 234, 212, 0.8);
    box-shadow: 0 24px 50px -12px rgba(0, 0, 0, 0.8), 0 0 0 1px rgba(0, 213, 200, 0.35), 0 0 26px rgba(0, 213, 200, 0.22);
}

body.dark-mode #industry-expertise .lundev-arrows button {
    border-color: rgba(0, 213, 200, 0.55);
}

/* ---------- Cards (services, tools, values, news, team) ---------- */
html.dark-mode .card,
body.dark-mode .card {
    background-color: var(--dk-card);
    border-color: var(--dk-border);
}

body.dark-mode .card:hover {
    border-color: rgba(0, 213, 200, 0.45);
    box-shadow: 0 20px 40px -16px rgba(2, 6, 14, 0.7), 0 0 0 1px rgba(0, 213, 200, 0.12), 0 10px 30px -14px rgba(0, 213, 200, 0.35);
}

body.dark-mode .card-icon,
body.dark-mode .service-icon {
    color: var(--dk-teal);
}

/* Glass cards: tools, values */
html body.dark-mode .tool-card,
html body.dark-mode .value-card {
    background: linear-gradient(160deg, rgba(26, 43, 68, 0.72) 0%, rgba(20, 34, 56, 0.6) 100%);
    border-color: var(--dk-border);
    box-shadow: 0 14px 32px -14px rgba(2, 6, 14, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

html body.dark-mode .tool-card:hover,
html body.dark-mode .value-card:hover {
    border-color: rgba(0, 213, 200, 0.5);
    box-shadow: 0 24px 48px -18px rgba(2, 6, 14, 0.75), 0 12px 32px -14px rgba(0, 213, 200, 0.35);
}

html body.dark-mode .tool-icon-wrapper,
html body.dark-mode .value-icon-wrapper,
html body.dark-mode .why-feature-icon,
html body.dark-mode .icon-blue {
    background: var(--dk-grad-soft);
    box-shadow: inset 0 0 0 1px rgba(0, 213, 200, 0.18);
}

body.dark-mode .faq-3d-svg {
    filter: drop-shadow(0 0 14px rgba(0, 213, 200, 0.18));
}

html body.dark-mode .life-slide {
    background: var(--dk-card);
}

html body.dark-mode .news-card {
    background: var(--dk-card) !important;
    border-color: var(--dk-border);
}

html body.dark-mode .news-card:hover {
    border-color: rgba(0, 213, 200, 0.4);
    box-shadow: 0 18px 38px -16px rgba(2, 6, 14, 0.75), 0 8px 26px -14px rgba(0, 213, 200, 0.3);
}

body.dark-mode .news-card p {
    color: var(--dk-text-2);
}

body.dark-mode .insights-tabs {
    border-bottom-color: var(--dk-border);
}

body.dark-mode .insights-tab-btn {
    color: var(--dk-text-2);
}

body.dark-mode .insights-tab-btn:hover {
    color: var(--dk-gold);
}

body.dark-mode .team-card {
    background: var(--dk-card);
    border-color: var(--dk-border);
}

body.dark-mode .why-choose-section {
    background: linear-gradient(135deg, #101B2D 0%, #13213A 100%);
}

body.dark-mode .tech-feature-card {
    background: rgba(26, 43, 68, 0.55);
    border-color: var(--dk-border);
}

body.dark-mode .tech-feature-card:hover {
    background: rgba(26, 43, 68, 0.85);
    border-color: rgba(0, 213, 200, 0.35);
}

body.dark-mode .semicircle-base {
    background: var(--dk-bg);
}

body.dark-mode .free-badge {
    background: var(--dk-aqua);
    border-color: var(--dk-aqua);
    color: var(--dk-ink) !important;
}

body.dark-mode .img-box {
    background-color: var(--dk-card-2);
    color: var(--dk-text-2);
}

/* ---------- Modals & popups: refined glass ---------- */
body.dark-mode .modal-content {
    background-color: var(--dk-card);
    border: 1px solid var(--dk-border);
    box-shadow: 0 30px 70px -20px rgba(2, 6, 14, 0.85), 0 0 0 1px rgba(0, 213, 200, 0.06);
}

body.dark-mode .modal-header {
    background: linear-gradient(135deg, #101B2D 0%, #13233B 100%);
    border-bottom: 1px solid var(--dk-border);
}

body.dark-mode .modal-header h3 {
    color: var(--dk-text) !important;
}

body.dark-mode .glass-modal .modal-content {
    background: rgba(16, 27, 45, 0.9);
    -webkit-backdrop-filter: blur(14px) saturate(130%);
    backdrop-filter: blur(14px) saturate(130%);
}

body.dark-mode .modal-column h4 {
    border-bottom-color: rgba(0, 213, 200, 0.22);
}

body.dark-mode .close-modal {
    background: rgba(241, 245, 249, 0.08);
}

body.dark-mode .close-modal:hover {
    background: rgba(0, 213, 200, 0.16);
}

body.dark-mode #software-capabilities {
    border-top-color: var(--dk-border);
}

body.dark-mode #software-info-modal.lateral-modal {
    border-color: rgba(0, 213, 200, 0.35);
}

body.dark-mode .lateral-modal.highlight-panel {
    border-color: rgba(0, 213, 200, 0.55);
    box-shadow: 0 12px 30px -10px rgba(0, 213, 200, 0.3);
}

body.dark-mode #modal-software-generic .modal-content::before,
body.dark-mode #software-info-modal .modal-content::before {
    background-image: conic-gradient(transparent, transparent, transparent, #00D5C8, #3B82F6);
}

/* ---------- Interactive hub / process nodes ---------- */
body.dark-mode .scroll-label {
    color: var(--dk-gold) !important;
    text-shadow: none !important;
}

body.dark-mode .robot-arrow {
    background: rgba(20, 34, 56, 0.85);
    border-color: rgba(0, 213, 200, 0.3);
    color: var(--dk-teal);
    box-shadow: none;
}

body.dark-mode .robot-arrow:hover {
    border-color: rgba(0, 213, 200, 0.6);
    box-shadow: 0 0 14px -2px rgba(0, 213, 200, 0.4);
}

body.dark-mode .premium-toggle {
    border-color: rgba(0, 213, 200, 0.35);
}

body.dark-mode .node-item {
    border-color: rgba(0, 213, 200, 0.22);
}

body.dark-mode .node-icon {
    color: var(--dk-teal);
    filter: drop-shadow(0 0 6px rgba(0, 213, 200, 0.35));
}

body.dark-mode .node-content h4 {
    color: var(--dk-text);
    text-shadow: none;
}

body.dark-mode .node-content p {
    color: var(--dk-text-2);
}

body.dark-mode .node-wrapper {
    background: var(--dk-card);
}

body.dark-mode .node-wrapper:hover {
    border-color: rgba(0, 213, 200, 0.45);
}

body.dark-mode .node-wrapper.node-active .node-item {
    box-shadow: 0 8px 24px -8px rgba(0, 213, 200, 0.45);
    border-color: rgba(0, 213, 200, 0.55);
}

body.dark-mode .center-hub {
    background: radial-gradient(circle at 50% 30%, #1A2E4A 0%, #142238 70%);
    box-shadow: 0 14px 32px -10px rgba(2, 6, 14, 0.75), inset 0 0 0 1px rgba(0, 213, 200, 0.10), inset 0 0 28px rgba(0, 213, 200, 0.10);
}

body.dark-mode .center-hub.hub-expanded {
    box-shadow: 0 18px 38px -10px rgba(2, 6, 14, 0.8), inset 0 0 0 1px rgba(0, 213, 200, 0.16), inset 0 0 34px rgba(59, 130, 246, 0.14);
}

body.dark-mode .core-node {
    background: rgba(20, 34, 56, 0.92);
    border-color: rgba(0, 213, 200, 0.28);
    box-shadow: inset 0 0 18px rgba(0, 213, 200, 0.08), 0 10px 26px rgba(2, 6, 14, 0.4);
}

body.dark-mode .core-node::before {
    background: rgba(20, 34, 56, 0.96);
    border-color: rgba(0, 213, 200, 0.28);
}

body.dark-mode .core-node:hover,
body.dark-mode .core-node:hover::before {
    border-color: rgba(0, 213, 200, 0.5);
}

body.dark-mode .core-node:hover {
    box-shadow: inset 0 0 18px rgba(0, 213, 200, 0.12), 0 14px 32px -6px rgba(0, 213, 200, 0.22);
}

body.dark-mode .team-nav-dot {
    box-shadow: 0 3px 8px rgba(0, 213, 200, 0.3);
}

body.dark-mode .team-nav-dot:hover {
    box-shadow: 0 4px 12px rgba(0, 213, 200, 0.42);
}

body.dark-mode .stars-backdrop {
    background: linear-gradient(135deg, rgba(8, 15, 28, 0.4) 0%, rgba(0, 213, 200, 0.04) 60%, rgba(59, 130, 246, 0.05) 100%);
}

/* Onboarding journey section */
html.dark-mode #onboarding-journey,
body.dark-mode #onboarding-journey {
    --obj-accent: #00D5C8;
    --obj-accent-2: #5EEAD4;
    --obj-bg-1: #080F1C;
    --obj-bg-2: #0F2038;
}

html.dark-mode .obj-node,
body.dark-mode .obj-node {
    background: radial-gradient(circle at 30% 28%, #15304D, #080F1C 72%);
}

html.dark-mode .obj-card::before,
body.dark-mode .obj-card::before {
    background: #101B2D;
}

/* Advantage CTA panel */
html.dark-mode .adv-cta,
body.dark-mode .adv-cta {
    background:
        radial-gradient(600px 260px at 15% 0%, rgba(0, 213, 200, 0.18), transparent 70%),
        radial-gradient(600px 260px at 85% 100%, rgba(59, 130, 246, 0.18), transparent 70%),
        linear-gradient(140deg, #0A1424, #12233D);
    border: 1px solid rgba(0, 213, 200, 0.28);
}

/* ---------- About page: gold accents become teal in dark mode ---------- */
html.dark-mode {
    --ab-gold: #C5A039;
    --ab-navy: #080F1C;
}

body.dark-mode .ab-hero {
    background:
        radial-gradient(700px 420px at 85% 20%, rgba(0, 213, 200, 0.16), transparent 65%),
        radial-gradient(600px 400px at 5% 90%, rgba(59, 130, 246, 0.2), transparent 65%),
        linear-gradient(160deg, #080F1C 0%, #101B2D 55%, #080F1C 100%);
}

/* Contact hero shares .ab-hero but has a photo: keep the photo in dark mode */
body.dark-mode .ab-hero.ct-hero {
    background:
        linear-gradient(100deg, rgba(8, 15, 28, 0.95) 0%, rgba(8, 15, 28, 0.85) 40%, rgba(8, 15, 28, 0.38) 72%, rgba(8, 15, 28, 0.18) 100%),
        url("../images/hero-panoramic-uk.webp") 80% 30% / cover no-repeat,
        #080F1C;
}

@media (max-width: 640px) {
    body.dark-mode .ab-hero.ct-hero {
        background:
            linear-gradient(180deg, rgba(8, 15, 28, 0.9) 0%, rgba(8, 15, 28, 0.82) 60%, rgba(8, 15, 28, 0.7) 100%),
            url("../images/hero-panoramic-uk.webp") 70% 30% / cover no-repeat,
            #080F1C;
    }
}

body.dark-mode .ab-hero-title span {
    background: var(--dk-grad-text);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dark-mode .ab-hero .ab-btn-ghost:hover,
body.dark-mode .ab-cta .ab-btn-ghost:hover {
    background: rgba(0, 213, 200, 0.10);
}

body.dark-mode .ab-hero-frame {
    border-color: rgba(0, 213, 200, 0.3);
}

body.dark-mode .ab-stats {
    background:
        radial-gradient(600px 300px at 15% 0%, rgba(0, 213, 200, 0.14), transparent 70%),
        linear-gradient(150deg, #080F1C, #101B2D);
}

body.dark-mode .ab-stat > b {
    background: linear-gradient(110deg, #F1DFA6, #C5A039);
    -webkit-background-clip: text;
    background-clip: text;
}

body.dark-mode .ab-cta-box {
    background:
        radial-gradient(500px 260px at 90% 10%, rgba(0, 213, 200, 0.18), transparent 70%),
        radial-gradient(500px 260px at 0% 100%, rgba(59, 130, 246, 0.22), transparent 70%),
        linear-gradient(150deg, #0A1424, #13233B);
    border: 1px solid var(--dk-border);
}

/* ---------- Smart Tools Hub & calculators ---------- */
body.dark-mode .full-width-card {
    border-color: var(--dk-border);
}

html body.dark-mode #vat-results,
html body.dark-mode #cis-results,
html body.dark-mode #pension-results {
    background: rgba(16, 27, 45, 0.85) !important;
    border: 1px solid var(--dk-border);
    box-shadow: inset 0 1px 0 rgba(0, 213, 200, 0.08);
}

body.dark-mode #invoice-app [style*="background: white"] {
    background: var(--dk-card) !important;
    border-color: var(--dk-border) !important;
}

body.dark-mode #invoice-paper {
    background: var(--dk-bg-2) !important;
}

body.dark-mode .request-banner {
    background-color: #060C17;
}

/* Forex tools */
body.dark-mode .forex-card {
    background: var(--dk-card);
    border-color: var(--dk-border);
}

body.dark-mode .forex-input,
body.dark-mode .forex-result-box,
body.dark-mode .history-swap-btn,
body.dark-mode .history-radio-label input[type="radio"] {
    background: rgba(8, 15, 28, 0.6);
    border-color: var(--dk-border);
}

body.dark-mode .forex-result-box {
    border-color: rgba(0, 213, 200, 0.4);
}

body.dark-mode .forex-input:focus {
    border-color: var(--dk-teal);
    box-shadow: 0 0 0 3px rgba(0, 213, 200, 0.18);
}

body.dark-mode .forex-table tr:hover td {
    background: rgba(0, 213, 200, 0.05);
}

body.dark-mode .forex-table tr.fx-selected td {
    background: rgba(0, 213, 200, 0.10);
}

body.dark-mode .history-swap-btn:hover {
    background: var(--dk-teal);
    border-color: var(--dk-teal);
}

body.dark-mode .history-swap-btn:hover svg {
    color: var(--dk-ink);
}

body.dark-mode .history-download-btn {
    background: var(--dk-grad);
    color: var(--dk-ink);
}

body.dark-mode .history-download-btn:hover {
    background: var(--dk-aqua);
}

/* ---------- Forms, inputs, dropdowns ---------- */
body.dark-mode .form-input,
body.dark-mode .form-textarea,
body.dark-mode select,
body.dark-mode .contact-form input,
body.dark-mode .contact-form textarea {
    background-color: #0C1626;
    border-color: var(--dk-border);
    color: var(--color-text);
    transition: border-color 0.25s ease, box-shadow 0.25s ease, background-color 0.25s ease;
}

body.dark-mode .form-input:hover,
body.dark-mode .form-textarea:hover,
body.dark-mode select:hover {
    border-color: #335070;
}

body.dark-mode .form-input:focus,
body.dark-mode .form-textarea:focus,
body.dark-mode select:focus,
body.dark-mode .contact-form input:focus,
body.dark-mode .contact-form textarea:focus {
    outline: none;
    border-color: var(--dk-teal);
    background-color: #0E1A2C;
    box-shadow: 0 0 0 3px rgba(0, 213, 200, 0.16);
}

body.dark-mode .form-label {
    color: var(--color-text);
}

body.dark-mode input::placeholder,
body.dark-mode textarea::placeholder {
    color: #7C8BA1;
    opacity: 1;
}

body.dark-mode select option {
    background-color: var(--dk-card);
    color: var(--color-text);
}

body.dark-mode input[type="checkbox"],
body.dark-mode input[type="radio"],
body.dark-mode input[type="range"] {
    accent-color: var(--dk-teal);
}

/* ---------- Chat widget ---------- */
.dark-mode {
    --chat-accent: #00D5C8;
}

.dark-mode #chat-input-field {
    background: rgba(12, 22, 38, 0.9);
    border-color: var(--dk-border);
}

/* ==========================================================================
   Dark typography refinement
   Colour, contrast and rendering only: font family, size, weight, spacing
   and line height are unchanged, so no text reflows.

   style.css forces almost every text element in dark mode to one grey
   (html.dark-mode p, li, span, a, strong ... !important), which flattens the
   hierarchy and leaves text grey even on teal or coloured backgrounds.
   These rules restore a clear three-step hierarchy:
     headings & emphasis  #F1F5F9
     body copy            #CDD6E2
     meta / captions      #AAB8CA
   ========================================================================== */

html.dark-mode body.dark-mode {
    --color-text-dark: #CDD6E2;   /* body copy: a touch brighter for easier reading */
    -webkit-font-smoothing: antialiased;   /* light-on-dark text renders thinner and crisper */
    -moz-osx-font-smoothing: grayscale;
    text-rendering: optimizeLegibility;
    font-kerning: normal;
}

/* Headings: bright, slightly softer for the smaller levels */
html.dark-mode body.dark-mode :is(h1, h2, h3) {
    color: #F1F5F9 !important;
}

html.dark-mode body.dark-mode :is(h4, h5, h6) {
    color: #E6ECF3 !important;
}

/* Emphasis inside running text stands out from body copy
   (scoped to text containers so b/strong used as tags or badges keep their own colours) */
html.dark-mode body.dark-mode :is(p, li, td, dd, label, blockquote) :is(strong, b) {
    color: #F1F5F9 !important;
}

/* About hero floating stat cards: dark glass instead of white in dark mode */
html body.dark-mode .ab-hero-badge {
    background: rgba(16, 27, 45, 0.9);
    border: 1px solid var(--dk-border);
    -webkit-backdrop-filter: blur(10px);
    backdrop-filter: blur(10px);
    box-shadow: 0 20px 40px -18px rgba(0, 0, 0, 0.7), 0 0 0 1px rgba(0, 213, 200, 0.08);
}

html.dark-mode body.dark-mode .ab-hero-badge b {
    color: var(--dk-gold) !important;
}

/* (the :not() chain mirrors style.css's blanket span rule so this one outranks it) */
html.dark-mode body.dark-mode .ab-hero-badge span:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: #AAB8CA !important;
}

/* Onboarding "Start here" tag: dark text on its aqua pill */
html.dark-mode body.dark-mode .obj-tag-start {
    color: #04121F !important;
}

/* Text inside headings, emphasis, buttons and coloured labels follows its parent
   instead of the blanket grey (gradient-filled text is unaffected) */
html.dark-mode body.dark-mode :is(h1, h2, h3, h4, h5, h6, strong, b, th, .btn, .ribbon, .feedback-tab, .free-offer-tab, .hub-btn-pdf, .hub-cat-cta, .free-badge) :is(span, small, strong, em):not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: inherit !important;
}

/* Meta text: dates, captions, counts */
html.dark-mode body.dark-mode :is(time, figcaption, .news-date, .news-meta, .footer-copyright, .footer-legal),
html.dark-mode body.dark-mode :is(.hub-sub-count, .hub-stat span):not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline),
html.dark-mode body.dark-mode :is(p, li, label, div, td) > small {
    color: #AAB8CA !important;
}

/* Inline links inside running text */
html.dark-mode body.dark-mode :is(main, section, article, .modal-body) p > a:not(.btn) {
    color: var(--dk-gold) !important;
    text-decoration-color: rgba(197, 160, 57, 0.45);
    text-underline-offset: 2px;
}

html.dark-mode body.dark-mode :is(main, section, article, .modal-body) p > a:not(.btn):hover {
    color: var(--dk-gold-hi) !important;
    text-decoration-color: var(--dk-gold-hi);
}

/* Form labels a little brighter than body copy */
html.dark-mode body.dark-mode label {
    color: #D9E1EA !important;
}

/* Dark text-shadows blur light text on dark surfaces (footer) */
body.dark-mode .footer,
body.dark-mode .footer * {
    text-shadow: none !important;
}

/* News card headlines: same soft white as other headings */
html.dark-mode body.dark-mode .news-card h3 {
    color: #F1F5F9 !important;
}

/* ---------- Text on coloured backgrounds (was grey, hard to read) ---------- */
/* "Why NASR" ribbons: light green / teal ribbons need dark text */
html.dark-mode body.dark-mode .ribbon,
html.dark-mode body.dark-mode .ribbon .ribbon-title {
    color: #04121F !important;
    text-shadow: none !important;
}

/* Feedback / free-offer side tabs keep white text on red */
html.dark-mode body.dark-mode :is(.feedback-tab, .free-offer-tab) {
    color: #FFFFFF !important;
}

/* Whitepapers & Guides hub */
html.dark-mode body.dark-mode .hub-btn-pdf,
html.dark-mode body.dark-mode .hub-btn-pdf small {
    color: var(--dk-ink) !important;
}

html.dark-mode body.dark-mode .hub-btn-more {
    color: #E6ECF3 !important;
}

html.dark-mode body.dark-mode .hub-btn-more:hover {
    color: var(--dk-gold) !important;
}

html.dark-mode body.dark-mode .hub-item-type:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: var(--dk-gold) !important;
}

html.dark-mode body.dark-mode .hub-sub-name:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: #E6ECF3 !important;
}

html.dark-mode body.dark-mode :is(.hub-sub-toggle:hover, .hub-sub.is-open) .hub-sub-name:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: var(--dk-gold) !important;
}

html.dark-mode body.dark-mode .hub-cat-cta:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: var(--dk-gold) !important;
}

html.dark-mode body.dark-mode .hub-cat-item.is-open .hub-cat-cta:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: var(--dk-ink) !important;
}

html.dark-mode body.dark-mode .hub-cat-chips .hub-chip-pdf {
    color: var(--dk-gold) !important;
}

/* Smart Tools badges: grey text on red/green was unreadable */
/* (class repeated to outrank style.css's blanket dark span rule) */
html.dark-mode body.dark-mode span.tool-badge.tool-badge.tool-badge.tool-badge {
    color: #04121F !important;          /* on green: 7.6:1 */
}

html.dark-mode body.dark-mode span.tool-badge.tool-badge.tool-badge.tool-badge[style*="#ef4444"] {
    color: #FFFFFF !important;          /* on red: matches light mode */
}

/* Calculator footnotes use an inline slate grey meant for white backgrounds */
html.dark-mode body.dark-mode [style*="color: #64748b"]:not(#salary-paper):not(#salary-paper *),
html.dark-mode body.dark-mode [style*="color: #64748B"]:not(#salary-paper):not(#salary-paper *) {
    color: #AAB8CA !important;
}

/* Salary slip popup (Smart Tools): the form panel had inline white backgrounds,
   leaving light text on white. The payslip preview itself stays a white page. */
html body.dark-mode #modal-salary .modal-body {
    background: var(--dk-bg-2) !important;
}

html body.dark-mode #modal-salary [style*="width: 350px"] {
    background: var(--dk-card) !important;
    border-right-color: var(--dk-border) !important;
}

html body.dark-mode #modal-salary h4[style*="#fee2e2"] {
    border-bottom-color: rgba(239, 68, 68, 0.35) !important;
}

/* Payslip table header: white text on its navy bar (was forced dark) */
html body.dark-mode #salary-paper tr[style*="#0f172a"],
html body.dark-mode #salary-paper tr[style*="#0f172a"] *,
html body.dark-mode #salary-paper tr[style*="background: #ef4444"],
html body.dark-mode #salary-paper tr[style*="background: #ef4444"] * {
    color: #FFFFFF !important;
}

/* Value map node labels */
html.dark-mode body.dark-mode .map-node .node-label:not(.logo-accent):not(.free-badge):not(.luxury-title):not(.logo-tagline) {
    color: #E6ECF3 !important;
}

/* ==========================================================================
   White + gold text, matching light mode
   Accent text (logo, highlighted words, prices, labels, links) uses the brand
   gold; headings stay white. Backgrounds, buttons and borders keep the
   navy / teal dark palette.
   Contrast: #C5A039 on #080F1C = 7.7:1, on card #142238 = 6.4:1.
   ========================================================================== */
html.dark-mode body.dark-mode :is(.logo-accent, .slide-price, .team-card-role, .news-card-link, .adv-vs, .adv-label-nasr, .adv-more-label, .ab-eyebrow, .obj-eyebrow, .fx-period-btn.active, .lundev-author) {
    color: var(--dk-gold) !important;
}

/* Logo mark pairs with the gold "Consultancy" */
html body.dark-mode .logo-accent-svg {
    stroke: var(--dk-gold) !important;
}

/* Gradient-filled words and numbers: light gold to brand gold */
html body.dark-mode :is(.obj-highlight, .obj-num, .hub-stat-num),
html body.dark-mode #onboarding-journey .obj-tagline {
    background-image: linear-gradient(110deg, #F1DFA6 0%, #C5A039 55%, #A9852A 100%);
}

html body.dark-mode .life-header-main {
    background-image: var(--gradient-luxury);
}

/* ---------- Separators & scrollbars ---------- */
body.dark-mode hr {
    border-color: var(--dk-border);
}

html.dark-mode {
    scrollbar-color: #2A4362 #080F1C;
}

/* ---------- Respect reduced motion ---------- */
@media (prefers-reduced-motion: reduce) {
    html body.dark-mode .btn-primary,
    html body.dark-mode .nav-link.active.btn-primary,
    body.dark-mode .btn-outline,
    body.dark-mode .form-input,
    body.dark-mode .footer-social-branding a {
        transition: none;
    }
}

/* ==========================================================================
   Services page hero: keep the photo in dark mode
   The generic "body.dark-mode .ab-hero" gradient above replaced the whole
   background shorthand, so the Services hero photo (services-page.css)
   disappeared. Same image, overlay, position and size as light mode.
   ========================================================================== */
body.dark-mode .ab-hero.sv-hero {
    background:
        linear-gradient(100deg, rgba(8, 15, 29, 0.94) 0%, rgba(8, 15, 29, 0.82) 42%, rgba(8, 15, 29, 0.35) 75%, rgba(8, 15, 29, 0.2) 100%),
        url("../images/hero-bg.webp") center 60% / cover no-repeat,
        #0B1424;
}

@media (max-width: 640px) {
    body.dark-mode .ab-hero.sv-hero {
        background:
            linear-gradient(180deg, rgba(8, 15, 29, 0.9) 0%, rgba(8, 15, 29, 0.8) 60%, rgba(8, 15, 29, 0.65) 100%),
            url("../images/hero-bg.webp") 65% center / cover no-repeat,
            #0B1424;
    }
}

/* ==========================================================================
   Icons look the same in both themes
   Dark mode swaps --color-secondary / --obj-accent to teal, which recoloured
   these icons. Pin them to their light-mode gold + white so the same icons,
   in the same colours, appear in light and dark mode.
   ========================================================================== */

/* Services page: card badges (document, chart, %, user, bin, tick, bulb) */
html.dark-mode body.dark-mode .sv-icon {
    background: linear-gradient(145deg, color-mix(in srgb, #C5A039 75%, #FFFFFF), #C5A039);
    color: #FFFFFF;
    box-shadow: 0 0 0 5px var(--color-bg-card), 0 12px 24px -10px color-mix(in srgb, #C5A039 80%, transparent);
}

html.dark-mode body.dark-mode .sv-icon svg {
    stroke: #FFFFFF;
}

/* Engagement page: onboarding journey timeline nodes + connecting line */
html.dark-mode #onboarding-journey .obj-node,
html.dark-mode #onboarding-journey .obj-track {
    --obj-accent: #C5A039;
    --obj-accent-2: #F0D78C;
}

html.dark-mode #onboarding-journey .obj-step:not(.is-lit) .obj-node {
    background: radial-gradient(circle at 30% 28%, #1E2D4C, #0B1426 72%);
}
