/* Dark theme for the public site, switched on by js/site-theme.js (data-bs-theme on <html>).
   The site's stylesheets write most colours directly, so this file overrides them one place at a
   time. Selectors carry the [data-bs-theme] attribute so they beat the page-level <style> blocks
   that sit later in the document. Loaded last, after the skin and accessibility styles. */
[data-bs-theme="dark"] {
    color-scheme: dark;
    --bs-body-bg: #0f1524;
    --bs-body-color: #dbe3f0;
    --site-surface: #151e33;
    --site-surface-2: #1b2640;
    --site-line: #2a3754;
    --site-text: #e6edf7;
    --site-text-soft: #aab7cd;
}
[data-bs-theme="dark"] body { background: var(--bs-body-bg); color: var(--bs-body-color); }

/* Header */
[data-bs-theme="dark"] .navbar .nav-link { color: rgba(255,255,255,.75); }
[data-bs-theme="dark"] .navbar .nav-link:hover,
[data-bs-theme="dark"] .navbar .nav-link.active { color: #fff; }

/* Section surfaces used across the site */
[data-bs-theme="dark"] .white-bg { background: var(--bs-body-bg); }
[data-bs-theme="dark"] .grey-bg  { background: var(--site-surface); }

/* Home page */
[data-bs-theme="dark"] .rs-trust-num   { color: var(--site-text); }
[data-bs-theme="dark"] .rs-trust-label { color: var(--site-text-soft); }
[data-bs-theme="dark"] .rs-home-support { background: var(--site-surface); }
[data-bs-theme="dark"] .rs-home-support-card { background: var(--site-surface-2); border-color: var(--site-line); }
[data-bs-theme="dark"] .rs-home-support-copy p { color: var(--site-text-soft); }
[data-bs-theme="dark"] .rs-home-support-eyebrow,
[data-bs-theme="dark"] .rs-home-support-link { color: #7cc4ff; }

/* Text */
[data-bs-theme="dark"] h1, [data-bs-theme="dark"] h2, [data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4, [data-bs-theme="dark"] h5, [data-bs-theme="dark"] h6,
[data-bs-theme="dark"] b, [data-bs-theme="dark"] strong,
[data-bs-theme="dark"] .iq-font-black { color: var(--site-text); }
[data-bs-theme="dark"] .iq-font-grey { color: var(--site-text-soft); }

/* Cards and boxes */
[data-bs-theme="dark"] .iq-works-box,
[data-bs-theme="dark"] .iq-fancy-box,
[data-bs-theme="dark"] .iq-get-in { background: var(--site-surface); border-color: var(--site-line); }
[data-bs-theme="dark"] .iq-works-box .step { background: var(--site-surface-2); border-color: var(--site-line); }
[data-bs-theme="dark"] .iq-fancy-box .iq-icon { background: var(--site-surface-2); }

/* FAQ accordion */
[data-bs-theme="dark"] .iq-accordion .ad-title   { background-color: var(--site-surface-2); }
[data-bs-theme="dark"] .iq-accordion .ad-details { background: var(--site-surface); border-color: var(--site-line); color: var(--site-text-soft); }

/* Home "AI" section: the plain and untinted modes lay a white scrim over the artwork and use dark
   text; in the dark theme the scrim is dark and the text light. */
[data-bs-theme="dark"] #ai.rs-ai-plain::before { background: rgba(15,21,36,.9); }
[data-bs-theme="dark"] #ai.rs-ai-dark-text .iq-font-white { color: var(--site-text-soft); }
[data-bs-theme="dark"] #ai.rs-ai-dark-text .iq-font-white b,
[data-bs-theme="dark"] #ai.rs-ai-dark-text .heading-title.white .title { color: var(--site-text); }

/* Home device-view tabs */
[data-bs-theme="dark"] .iq-amazing-tab .nav-tabs .nav-link span { color: var(--site-text-soft); }
[data-bs-theme="dark"] .iq-amazing-tab .nav-tabs .nav-link.active span,
[data-bs-theme="dark"] .iq-amazing-tab .nav-tabs .nav-link.active1 span { color: var(--site-text); }

/* Services, Products and Support pages (their light surfaces are written in each page's own style block) */
[data-bs-theme="dark"] .rs-svc-card,
[data-bs-theme="dark"] .rs-cap-card,
[data-bs-theme="dark"] .rs-proof-card,
[data-bs-theme="dark"] .rs-pcard { background: var(--site-surface); border-color: var(--site-line); }
[data-bs-theme="dark"] .rs-tech-chip,
[data-bs-theme="dark"] .rs-filter { background: var(--site-surface-2); border-color: var(--site-line); color: var(--site-text); }
[data-bs-theme="dark"] .rs-svc-card .rs-tag,
[data-bs-theme="dark"] .rs-svc-card p,
[data-bs-theme="dark"] .rs-cap-card p,
[data-bs-theme="dark"] .rs-pcard p,
[data-bs-theme="dark"] .rs-proof-who { color: var(--site-text-soft); }
[data-bs-theme="dark"] .rs-proof-who b,
[data-bs-theme="dark"] .rs-phase-b h6,
[data-bs-theme="dark"] .rs-raised b,
[data-bs-theme="dark"] .rs-terms .rs-terms-body h6 { color: var(--site-text); }
[data-bs-theme="dark"] .rs-support-notice,
[data-bs-theme="dark"] .rs-amt-option input:checked + span { background: var(--site-surface-2); }
[data-bs-theme="dark"] .rs-amt-option input:checked + span { color: #f3b5db; }

/* Text colours from site-contrast.css are for light surfaces; these are their dark-theme counterparts */
[data-bs-theme="dark"] a { color: #7cc4ff; }
[data-bs-theme="dark"] .text-green,
[data-bs-theme="dark"] footer a:not(.button), [data-bs-theme="dark"] .iq-footer a:not(.button),
[data-bs-theme="dark"] footer a.text-green, [data-bs-theme="dark"] .iq-footer a.text-green,
[data-bs-theme="dark"] body .rs-svc-card .rs-more { color: #f3b5db; }
[data-bs-theme="dark"] body .rs-home-support-eyebrow,
[data-bs-theme="dark"] body .rs-home-support-link { color: #7cc4ff; }
[data-bs-theme="dark"] label, [data-bs-theme="dark"] .form-label { color: var(--site-text-soft); }
[data-bs-theme="dark"] .contact-form .section-field input,
[data-bs-theme="dark"] .contact-form .section-field.textarea textarea,
[data-bs-theme="dark"] .contact-form .section-field select,
[data-bs-theme="dark"] body input:not([type=checkbox]):not([type=radio]):not([type=submit]) {
    background: var(--site-surface-2); color: var(--site-text); border-color: var(--site-line);
}
[data-bs-theme="dark"] ::placeholder { color: #94a3bb; }
[data-bs-theme="dark"] footer a.text-green { color: #f3b5db !important; }
