/* Theme-specific integration; every appearance rule is scoped to dark mode. */
html.wp-dark-mode-active[data-wp-dark-mode-active] {
  color-scheme: dark;
  --kd-surface: #101b2c;
  --kd-raised: #17263b;
  --kd-line: #34465d;
  --kd-text: #eef4fc;
  --kd-muted: #bdcddd;
}
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-hero,
html.wp-dark-mode-active[data-wp-dark-mode-active] .ksh-services :is(.ka-hero,.kws-service-hero)::before,
html.wp-dark-mode-active[data-wp-dark-mode-active] .ksh-services.ksh-legacy .vamtam-main::before,
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.kp-hero,.kx-hero,.kis-masthead,.kct-hero,.kin-hero,.kab-hero,.kau-hero,.kar-hero)::before {
  background-image: linear-gradient(115deg,rgba(10,20,37,.96),rgba(15,39,61,.90)),url('/wp-content/uploads/2026/08/keystone-ai-workflow-background.webp') !important;
  background-color: #102036 !important;
  background-position: center !important;
  background-size: cover !important;
  opacity: 1 !important;
}
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-hero::before { opacity: .12 !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.ka-hero-copy,.ksv-hero-copy,.kp-hero-copy,.kab-hero-copy,.kin-hero-copy,.kx-hero-copy,.kis-masthead,.kct-hero,.kau-hero,.kar-hero) :is(h1,h2) { color: var(--kd-text) !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.ka-hero-copy,.ksv-hero-copy,.kp-hero-copy,.kab-hero-copy,.kin-hero-copy,.kx-hero-copy,.kis-masthead,.kct-hero,.kau-hero,.kar-hero) :is(p,li) { color: var(--kd-muted) !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.ka-hero-copy,.ksv-hero-copy,.kp-hero-copy,.kab-hero-copy,.kin-hero-copy,.kx-hero-copy) h1 span { color: #84c5ed !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .ka-hero :is(.ka-hero-footnote,.ka-partner-note),
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-hero :is(figcaption,.kha-playback,.kha-choose) { color: var(--kd-muted) !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is([data-elementor-type="header"],.kma-brand) img[src*="Keystone-Full-Brand-6"] { filter: brightness(0) invert(1) !important; }
/* Dedicated white artwork; identical proportions keep the light/dark layout stable. */
html.wp-dark-mode-active[data-wp-dark-mode-active] img[src*="openai-select-partner-keystone-web-studios"] {
  content:url('../../uploads/2026/09/openai-select-partner-keystone-web-studios-white.svg');
  background:transparent !important;
  border:0 !important;
  border-radius:0 !important;
  padding:0 !important;
  filter:none !important;
  opacity:1 !important;
}
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-clients .elementor-widget-image img,
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-technologies .elementor-widget-image img { filter: grayscale(1) invert(1) brightness(1.6) !important; opacity:1 !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-clients .elementor-widget-image:is(:hover,:focus-within) img,
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-technologies .elementor-widget-image:is(:hover,:focus-within) img { filter:none !important; background:#fff; border-radius:8px; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kha-choose [role="tab"] { background: #172a41 !important; color:#c7d6e5 !important; border-color:#3c536d !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kha-choose [role="tab"][aria-selected="true"] { background:#294e70 !important; color:#fff !important; border-color:#86c5ed !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.ka-button,.kws-button,.kvr-submit,.kct-submit) { border-color:#5d9fce !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(input,textarea,select):not([type="submit"]):not([type="button"]):not([type="checkbox"]):not([type="radio"]):not(.wp-dark-mode-ignore *) { background-color:#142338 !important; color:#eef4fc !important; border-color:#4c6178 !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(input,textarea)::placeholder { color:#9fafc3 !important; opacity:1; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(input,textarea,select):focus-visible { outline:2px solid #8fd1ff !important; outline-offset:3px; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kma-drawer { background:#101d30 !important; color:#eef4fc !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kma-drawer-head { background:linear-gradient(120deg,#192c43,#122238) !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kma-shell { --kma-ink:#eef4fc; --kma-muted:#bccddd; --kma-line:#344b63; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kma-drawer :is(h2,strong,.kma-section-label) { color:#eef4fc !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kma-drawer :is(small,.kma-intro,.kma-kicker) { color:#bccddd !important; }
/* Avoid covering Keystone's mobile dock; placement applies in either theme. */
.wp-dark-mode-floating-switch { bottom:24px !important; left:20px !important; right:auto !important; z-index:9997 !important; }
.wp-dark-mode-switch:focus-visible { outline:3px solid #63baf0 !important; outline-offset:5px; border-radius:14px; }
.wp-dark-mode-switch .wp-dark-mode-switch-1 ._track { background:#173c5b !important; color:#d7eeff !important; border:1px solid #75acd0 !important; box-shadow:0 4px 18px #08162735; }
@media(max-width:767px) {
  .wp-dark-mode-floating-switch { bottom:calc(90px + env(safe-area-inset-bottom,0px)) !important; left:14px !important; }
  .wp-dark-mode-switch .wp-dark-mode-switch-1 { --wpdm-switch-scale:.75 !important; }
}

/* Preserve the homepage section rhythm and avoid muddy auto-converted cards. */
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-demo::before,
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-insights { background:#18273e !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-service-card .vamtam-has-theme-cp { background:#18273e !important; }

html.wp-dark-mode-active[data-wp-dark-mode-active] .kvr-review-band { background-color:#15283e !important; background-blend-mode:multiply !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kvr-copy :is(p,h3) { color:#d0deed !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.ka-button:not(.ka-button-secondary),.kvr-form button[type="submit"]) { background:#24638e !important; color:#fff !important; border-color:#72b5e2 !important; }

html.wp-dark-mode-active[data-wp-dark-mode-active] header .elementor-icon { color:#99d5ff !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] header .elementor-icon svg:not([fill="none"]) { fill:#99d5ff !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kwa-demo h3 { color:#23334f !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kwl-connections .kwl-ai { background:#fff !important; border-radius:8px; }

html.wp-dark-mode-active[data-wp-dark-mode-active] :is(.kh-demo,.kh-proof-band) { background-color:#14273e !important; background-blend-mode:multiply !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kh-process-step:last-child { background:#182b42 !important; }

html.wp-dark-mode-active[data-wp-dark-mode-active] .kp-project-brand { background:#f4f8fc !important; color:#3a5167 !important; }
html.wp-dark-mode-active[data-wp-dark-mode-active] .kp-project-brand :is(span,small,strong) { color:#3a5167 !important; }
