/* =============================================
   CYBERVIS dark theme + the nav's light/dark button.
   Load after the page's own stylesheets. Dark is
   html[data-theme="dark"], set by js/theme.js.
   ============================================= */

/* ---------- the button (sits in the dark nav pill in both themes) ---------- */
.theme-toggle {
  position: relative;
  flex: none;
  width: 40px;
  height: 40px;
  margin-left: 8px;
  display: inline-grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(255, 255, 255, 0.85);
  cursor: pointer;
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.theme-toggle:hover { background: rgba(255, 255, 255, 0.1); border-color: rgba(255, 255, 255, 0.28); color: #fff; }
.theme-toggle:active { transform: scale(.94); }
.theme-toggle:focus-visible { outline: 2px solid #FF6B2B; outline-offset: 3px; }
.theme-toggle__icon {
  grid-area: 1 / 1;
  transition: transform .45s cubic-bezier(.22,.8,.3,1), opacity .25s ease;
}
/* moon on the light face (press for dark), sun on the dark face (press for light) */
.theme-toggle__icon--sun { opacity: 0; transform: rotate(-90deg) scale(.5); }
html[data-theme="dark"] .theme-toggle__icon--moon { opacity: 0; transform: rotate(90deg) scale(.5); }
html[data-theme="dark"] .theme-toggle__icon--sun { opacity: 1; transform: none; color: #FFB48A; }
@media (max-width: 1100px) { .theme-toggle { margin-left: auto; margin-right: 8px; } }

/* the drop that falls onto the button */
.theme-drop {
  position: fixed;
  z-index: 100000;
  width: 14px;
  height: 18px;
  border-radius: 50% 50% 50% 50% / 62% 62% 38% 38%;
  pointer-events: none;
  box-shadow: 0 0 0 1px rgba(255, 107, 43, .55);
}
.theme-drop--dark { background: #12121F; }
.theme-drop--light { background: #F5F5F5; }

/* the flood: the new theme grows from the button over the old one */
::view-transition-old(root),
::view-transition-new(root) { animation: none; mix-blend-mode: normal; }
::view-transition-new(root) { z-index: 2; }

@media (prefers-reduced-motion: reduce) {
  .theme-toggle, .theme-toggle__icon { transition: none; }
}

/* ---------- dark tokens ---------- */
html[data-theme="dark"] {
  color-scheme: dark;
  /* home.css (index, products) */
  --bg: #12121F;
  --bg-warm: #1B1622;
  --surface: #1C1C2E;
  --ink: #ECECF3;
  --ink-2: #C9C9D6;
  --muted: #A3A3B5;
  --muted-2: #7D7D90;
  --line: rgba(255, 255, 255, 0.08);
  --line-strong: rgba(255, 255, 255, 0.14);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.4);
  --shadow: 0 20px 60px -20px rgba(0, 0, 0, 0.6);
  --shadow-lg: 0 40px 100px -30px rgba(0, 0, 0, 0.75);
  /* consulting.css (service pages, about) */
  --peach: #1B1622;
}
html[data-theme="dark"] body { background: var(--bg); color: var(--ink); }

/* ---------- dark fixes ----------
   --ink is both the text colour and the fill of the solid buttons, so in dark it
   turns light: solid buttons become light pills and their labels go dark. */
html[data-theme="dark"] .btn-dark,
html[data-theme="dark"] .service-card.featured .svc-icon,
html[data-theme="dark"] .service-card:hover .svc-icon,
html[data-theme="dark"] .service-card:focus-visible .svc-icon,
html[data-theme="dark"] .client-logo,
html[data-theme="dark"] .vx-app-logo,
html[data-theme="dark"] .back-to-top,
html[data-theme="dark"] .button,
html[data-theme="dark"] .cvc-btn-accept,
html[data-theme="dark"] .booking-fallback .btn-cal,
html[data-theme="dark"] .ba-msg--user .ba-bubble,
html[data-theme="dark"] .ba-send,
html[data-theme="dark"] .ba-q-next { color: #12121F; }
html[data-theme="dark"] .button:hover { background: #D6D6E0; }

/* white buttons inside sections that are dark in both themes keep a dark label */
html[data-theme="dark"] .nav-cta.primary,
html[data-theme="dark"] .mobile-menu-cta.primary { color: #1A1A2E !important; }
html[data-theme="dark"] .cp-btn-mini.primary,
html[data-theme="dark"] .btn-submit,
html[data-theme="dark"] .hero--night .btn-dark { color: #1A1A2E; }

/* light panels that stay light (the Vultus sign-in mock) keep the light tokens */
html[data-theme="dark"] .vx-login {
  --ink: #1A1A2E; --ink-2: #2D2D44; --muted: #6B6B6B; --muted-2: #9A9A9A;
  --line: rgba(26, 26, 46, 0.08); --line-strong: rgba(26, 26, 46, 0.14); --surface: #fff;
  color: #1A1A2E;
}

/* white cards and fields on the home page */
html[data-theme="dark"] .priority-paths a,
html[data-theme="dark"] .contact-form select { background: var(--surface); }
html[data-theme="dark"] .btn-ghost { background: rgba(255, 255, 255, 0.04); }
html[data-theme="dark"] .btn-ghost:hover { background: rgba(255, 255, 255, 0.09); }

/* service pages + about (consulting.css) */
html[data-theme="dark"] .skip { background: var(--surface); }
html[data-theme="dark"] .hero:not(.hero--night) {
  background: radial-gradient(circle at 85% 15%, rgba(255, 107, 43, .16), transparent 35%), linear-gradient(140deg, #1E1724, #12121F 70%);
}
html[data-theme="dark"] .eyebrow { color: #FF9A6B; }
html[data-theme="dark"] .lede,
html[data-theme="dark"] .faq details p,
html[data-theme="dark"] .ss-callout p { color: var(--muted); }
html[data-theme="dark"] .service-nav,
html[data-theme="dark"] .detail,
html[data-theme="dark"] .related-links a,
html[data-theme="dark"] .faq details,
html[data-theme="dark"] .usecase { background: var(--surface); }
html[data-theme="dark"] .usecase:hover { border-color: rgba(255, 255, 255, .28); }
html[data-theme="dark"] .approach { background: #1C1C2E; }

/* booking window (booking.css) */
html[data-theme="dark"] .booking-dialog {
  --bk-ink: #ECECF3; --bk-muted: #A3A3B5; --bk-line: rgba(255, 255, 255, 0.1); --bk-warm: #1B1622;
  background: #1C1C2E;
}
html[data-theme="dark"] .ba { background: linear-gradient(180deg, var(--bk-warm) 0%, #1C1C2E 220px); }
html[data-theme="dark"] .ba-voice,
html[data-theme="dark"] .ba-bubble,
html[data-theme="dark"] .ba-choice,
html[data-theme="dark"] .ba-booked,
html[data-theme="dark"] .ba-input,
html[data-theme="dark"] .ba-q-opt,
html[data-theme="dark"] .ba-q-input { background: #24243A; }
html[data-theme="dark"] .ba-input,
html[data-theme="dark"] .ba-q-input { border-color: rgba(255, 255, 255, 0.16); }
html[data-theme="dark"] .booking-close { background: rgba(255, 255, 255, 0.08); }
html[data-theme="dark"] .booking-close:hover { background: rgba(255, 255, 255, 0.14); }

/* software-development.css: its own token names; its demos are already dark */
html[data-theme="dark"] {
  --page-bg: #12121F; --inset-bg: #1C1C2E;
  --border-strong: rgba(255, 255, 255, .14); --border-subtle: rgba(255, 255, 255, .08);
  --text-muted: #A3A3B5; --text-subtle: #8F8FA2;
  --text-secondary: #C9C9D6; --text-primary: #ECECF3;
}
html[data-theme="dark"] .development-page { color-scheme: dark; }
html[data-theme="dark"] .development-page main { background: linear-gradient(180deg, #1B1622 0, #12121F 950px); }
html[data-theme="dark"] .development-page .button { background: #ECECF3; border-color: #ECECF3; color: #12121F; }
html[data-theme="dark"] .development-page .button:hover { background: #D6D6E0; border-color: #D6D6E0; }
html[data-theme="dark"] .hero-tags i,
html[data-theme="dark"] .feature-icon { color: var(--text-primary); }
html[data-theme="dark"] .feature-icon,
html[data-theme="dark"] .start-card { background: #1B1622; }
html[data-theme="dark"] .capability-card,
html[data-theme="dark"] .work-card { background: var(--surface); }
html[data-theme="dark"] .development-page :is(.cvc-btn-accept, .cvc-btn-reject, .cvc-btn-save) { color: #fff; }
