:root {
  color-scheme: dark;
  --surface-section: rgba(26, 29, 34, .4);
  --surface-translucent: rgba(26, 29, 34, .72);
  --shadow-card: none;
  --shadow-raised: 0 18px 48px rgba(0, 0, 0, .24);
}

html[data-theme="light"] {
  color-scheme: light;
  --bg-base: #f4f6f8;
  --surface-card: #ffffff;
  --surface-raised: #e9edf2;
  --surface-accent: #ff8a00;
  --surface-section: #e9edf2;
  --surface-translucent: rgba(255, 255, 255, .86);

  --text-primary: #111318;
  --text-secondary: #3d4652;
  --text-muted: #687381;
  --text-on-accent: #111318;
  --text-accent: #a94f00;

  --signal-orange: #b85a00;
  --warm-amber: #df7700;
  --steel-blue: #4f7185;
  --signal-green: #0c7b43;
  --signal-green-bright: #0d8f4c;
  --signal-red: #c93a34;
  --signal-blue: #236fae;

  --border-subtle: rgba(17, 19, 24, .12);
  --border-strong: rgba(17, 19, 24, .22);
  --border-accent: rgba(184, 90, 0, .38);

  --status-success: #0c7b43;
  --status-success-bg: rgba(12, 123, 67, .09);
  --status-success-border: rgba(12, 123, 67, .28);
  --status-error: #c93a34;
  --status-error-bg: rgba(201, 58, 52, .08);
  --status-error-border: rgba(201, 58, 52, .28);
  --status-warning: #9c6000;
  --status-warning-bg: rgba(156, 96, 0, .09);
  --status-warning-border: rgba(156, 96, 0, .26);
  --status-info: #236fae;
  --status-info-bg: rgba(35, 111, 174, .08);
  --status-info-border: rgba(35, 111, 174, .26);
  --status-accent: #b85a00;
  --status-accent-bg: rgba(184, 90, 0, .08);
  --status-accent-border: rgba(184, 90, 0, .28);
  --status-neutral: #4f7185;
  --status-neutral-bg: rgba(79, 113, 133, .08);
  --status-neutral-border: rgba(79, 113, 133, .24);

  --gradient-accent: linear-gradient(90deg, #ff8a00 0%, #ffb347 100%);
  --gradient-tech: linear-gradient(90deg, #ff8a00 0%, #ffb347 52%, #7193a6 100%);
  --gradient-data: linear-gradient(90deg, #0c7b43 0%, #18a45d 100%);
  --glow-accent: 0 8px 24px rgba(184, 90, 0, .18);
  --glow-accent-soft: 0 18px 48px rgba(50, 57, 66, .12);
  --glow-green: 0 8px 24px rgba(12, 123, 67, .16);
  --focus-ring: 0 0 0 3px rgba(184, 90, 0, .28);
  --shadow-card: 0 10px 28px rgba(39, 48, 58, .07);
  --shadow-raised: 0 22px 56px rgba(39, 48, 58, .12);
}

body {
  background: var(--bg-base);
}

html.theme-is-changing body,
html.theme-is-changing .home-shell,
html.theme-is-changing .site-header,
html.theme-is-changing .site-footer,
html.theme-is-changing .mobile-menu,
html.theme-is-changing section,
html.theme-is-changing article {
  transition: background-color .2s ease, border-color .2s ease, color .2s ease, box-shadow .2s ease;
}

.theme-toggle {
  display: inline-flex;
  flex: 0 0 40px;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  padding: 0;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: var(--text-secondary);
  cursor: pointer;
  transition: color .18s var(--ease-out), background .18s var(--ease-out);
}

.theme-toggle:hover {
  background: transparent;
  color: var(--signal-orange);
  transform: none;
}

.theme-toggle:focus-visible {
  outline: 0;
  box-shadow: var(--focus-ring);
}

.theme-toggle__icon {
  display: flex;
  align-items: center;
  justify-content: center;
}

.theme-toggle__icon--moon,
html[data-theme="light"] .theme-toggle__icon--sun {
  display: none;
}

html[data-theme="light"] .theme-toggle__icon--moon {
  display: flex;
}

.site-header__mobile-actions {
  display: none;
  align-items: center;
  gap: 8px;
}

.theme-toggle--header-mobile {
  display: none;
}

.site-header .site-logo,
.mobile-menu .site-logo,
.site-header .site-logo__image,
.mobile-menu .site-logo__image {
  width: 100%;
  max-width: 165px;
}

/* The brand navigation and footer remain dark visual anchors in both themes. */
html[data-theme="light"] .site-header,
html[data-theme="light"] .mobile-menu,
html[data-theme="light"] .site-footer {
  --surface-card: #1a1d22;
  --surface-raised: #2a2e35;
  --text-primary: #ffffff;
  --text-secondary: #d6dbe2;
  --text-muted: rgba(214, 219, 226, .68);
  --border-subtle: rgba(214, 219, 226, .14);
  --border-strong: rgba(214, 219, 226, .26);
  --border-accent: rgba(255, 138, 0, .55);
  --signal-orange: #ff8a00;
  --focus-ring: 0 0 0 3px rgba(255, 138, 0, .34);
}

html[data-theme="light"] .site-header {
  background: rgba(9, 11, 17, .96);
  border-color: rgba(214, 219, 226, .12);
  box-shadow: 0 10px 30px rgba(15, 19, 25, .14);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}

html[data-theme="light"] .site-header.is-scrolled {
  background: rgba(9, 11, 17, .98);
}

html[data-theme="light"] .mobile-menu {
  background: #1a1d22;
}

html[data-theme="light"] .site-footer {
  background: #090b11;
}

/* Primary page canvases. */
html[data-theme="light"] .home-shell,
html[data-theme="light"] .solutions-page,
html[data-theme="light"] .solution-detail-page,
html[data-theme="light"] .content-page,
html[data-theme="light"] .article-page,
html[data-theme="light"] .case-page,
html[data-theme="light"] .case-full-page,
html[data-theme="light"] .zambia-page,
html[data-theme="light"] body.error-page {
  background: var(--bg-base);
  color: var(--text-primary);
}

/* Quiet alternating sections. */
html[data-theme="light"] .infrastructure-strip,
html[data-theme="light"] .departments-section,
html[data-theme="light"] .solutions-process,
html[data-theme="light"] .solution-block:nth-child(even),
html[data-theme="light"] .solution-detail__section--muted,
html[data-theme="light"] .solution-detail__section--integration,
html[data-theme="light"] .content-section--muted,
html[data-theme="light"] .team-process,
html[data-theme="light"] .case-section--muted,
html[data-theme="light"] .case-full-section--muted {
  background: var(--surface-section);
}

html[data-theme="light"] .how-section,
html[data-theme="light"] .case-full-results {
  background: linear-gradient(180deg, var(--bg-base), var(--surface-section), var(--bg-base));
}

html[data-theme="light"] .how-background,
html[data-theme="light"] .team-people__background,
html[data-theme="light"] .solutions-cta__glow,
html[data-theme="light"] .blog-cta__image,
html[data-theme="light"] .case-full-cta::after {
  opacity: .08;
}

html[data-theme="light"] .hero-pattern,
html[data-theme="light"] .solutions-hero__pattern,
html[data-theme="light"] .team-hero__pattern,
html[data-theme="light"] .solution-detail__hero-pattern {
  opacity: .055;
  mix-blend-mode: multiply;
}

/* Cards gain restrained depth on a light canvas. */
html[data-theme="light"] .problem-card,
html[data-theme="light"] .solution-card,
html[data-theme="light"] .department-panel,
html[data-theme="light"] .process-flow-card,
html[data-theme="light"] .process-step-card,
html[data-theme="light"] .faq-item,
html[data-theme="light"] .process-card,
html[data-theme="light"] .security-card,
html[data-theme="light"] .solution-scenario-panel,
html[data-theme="light"] .solution-detail__other-card,
html[data-theme="light"] .blog-card,
html[data-theme="light"] .article-metric,
html[data-theme="light"] .article-related__card,
html[data-theme="light"] .team-discipline-card,
html[data-theme="light"] .team-principle-card,
html[data-theme="light"] .team-process-card,
html[data-theme="light"] .team-job,
html[data-theme="light"] .case-overview__item,
html[data-theme="light"] .case-step,
html[data-theme="light"] .case-result,
html[data-theme="light"] .case-stack,
html[data-theme="light"] .case-full-problem-card,
html[data-theme="light"] .case-full-process-grid > article,
html[data-theme="light"] .case-full-stack-grid > article,
html[data-theme="light"] .case-full-security,
html[data-theme="light"] .zambia-card,
html[data-theme="light"] .error-card {
  box-shadow: var(--shadow-card);
}

/* Dark media islands preserve the artwork and the white brand logo. */
html[data-theme="light"] .platform-card,
html[data-theme="light"] .solution-card-media,
html[data-theme="light"] .solution-visual,
html[data-theme="light"] .blog-feature__media,
html[data-theme="light"] .blog-card__media,
html[data-theme="light"] .article-cover,
html[data-theme="light"] .article-related__media,
html[data-theme="light"] .team-people,
html[data-theme="light"] .team-cta__box,
html[data-theme="light"] .case-full-hero,
html[data-theme="light"] .case-full-architecture,
html[data-theme="light"] .case-full-cta,
html[data-theme="light"] .solutions-cta,
html[data-theme="light"] .error-card {
  --surface-card: #1a1d22;
  --surface-raised: #2a2e35;
  --text-primary: #ffffff;
  --text-secondary: #d6dbe2;
  --text-muted: rgba(214, 219, 226, .64);
  --border-subtle: rgba(214, 219, 226, .13);
  --border-strong: rgba(214, 219, 226, .25);
  --border-accent: rgba(255, 138, 0, .55);
  --signal-orange: #ff8a00;
  --signal-green: #34d17a;
}

html[data-theme="light"] .platform-card,
html[data-theme="light"] .solution-visual,
html[data-theme="light"] .blog-feature__media,
html[data-theme="light"] .blog-card__media,
html[data-theme="light"] .article-cover,
html[data-theme="light"] .article-related__media,
html[data-theme="light"] .team-people,
html[data-theme="light"] .team-cta__box,
html[data-theme="light"] .case-full-hero,
html[data-theme="light"] .case-full-architecture,
html[data-theme="light"] .case-full-cta,
html[data-theme="light"] .solutions-cta,
html[data-theme="light"] .error-card {
  background-color: #090b11;
  color: var(--text-primary);
}

html[data-theme="light"] .platform-card {
  background: linear-gradient(180deg, rgba(26, 29, 34, .98), rgba(15, 17, 22, .98));
  box-shadow: 0 24px 64px rgba(39, 48, 58, .18);
}

/* Home: keep editorial sections airy and reserve dark surfaces for media. */
html[data-theme="light"] .about-section {
  background: var(--surface-section);
}

html[data-theme="light"] .about-glow {
  display: none;
}

html[data-theme="light"] .reason-item {
  border-color: rgba(17, 19, 24, .11);
}

html[data-theme="light"] .reason-text {
  color: #596574;
}

/* The integration map remains a deliberate dark technical island. */
html[data-theme="light"] .integrations-section {
  --surface-card: #171b21;
  --surface-raised: #222730;
  --text-primary: #f5f7fa;
  --text-secondary: #c5ccd6;
  --text-muted: #8793a3;
  --border-subtle: rgba(214, 219, 226, .15);
  --border-strong: rgba(214, 219, 226, .25);
  --border-accent: rgba(255, 138, 0, .5);
  --signal-orange: #ff8a00;
  color: var(--text-primary);
  border-color: rgba(214, 219, 226, .12);
  background:
    radial-gradient(720px 440px at 50% 54%, rgba(255, 138, 0, .1), transparent 68%),
    radial-gradient(560px 360px at 80% 22%, rgba(79, 113, 133, .12), transparent 70%),
    linear-gradient(180deg, #090b11 0%, #05070b 100%);
}

html[data-theme="light"] .integrations-image-frame {
  border: 1px solid rgba(214, 219, 226, .14);
  background: #090b11;
  box-shadow: 0 30px 80px rgba(0, 0, 0, .34), 0 0 70px rgba(255, 138, 0, .06);
}

html[data-theme="light"] .integrations-chip {
  border-color: rgba(214, 219, 226, .16);
  background: rgba(26, 29, 34, .82);
  color: #d6dbe2;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .035);
}

/* Light case cards separate context, measurable result and action. */
html[data-theme="light"] .case-footer {
  border-color: rgba(17, 19, 24, .1);
  background: linear-gradient(180deg, #f8fafb 0%, #f1f5f3 100%);
}

html[data-theme="light"] .case-metrics {
  gap: 0;
}

html[data-theme="light"] .case-metric {
  min-width: 0;
  padding: 0 14px;
}

html[data-theme="light"] .case-metric:first-child {
  padding-left: 0;
}

html[data-theme="light"] .case-metric + .case-metric {
  border-left: 1px solid rgba(17, 19, 24, .1);
}

html[data-theme="light"] .case-metric-value {
  color: #08743e;
}

html[data-theme="light"] .case-metric-label {
  color: #687381;
}

html[data-theme="light"] .case-link {
  color: #a94f00;
}

/* Keep the contact form calm and legible on the light photographic section. */
html[data-theme="light"] .contact-form {
  border-color: rgba(17, 19, 24, .12);
  background: rgba(255, 255, 255, .9);
  box-shadow: 0 24px 64px rgba(39, 48, 58, .14);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

html[data-theme="light"] .contact-form .form-label {
  color: #3d4652;
  font-weight: 600;
}

html[data-theme="light"] .contact-form .form-control {
  border-color: #d5dbe3;
  background: #f7f9fb;
  color: #111318;
  transition: background-color .15s var(--ease-out), border-color .15s var(--ease-out), box-shadow .15s var(--ease-out);
}

html[data-theme="light"] .contact-form .form-control::placeholder {
  color: #7a8491;
  opacity: 1;
}

html[data-theme="light"] .contact-form .form-control:hover {
  border-color: #b9c1cb;
}

html[data-theme="light"] .contact-form .form-control:focus {
  border-color: #b85a00;
  background: #fff;
  box-shadow: 0 0 0 3px rgba(184, 90, 0, .14);
}

html[data-theme="light"] .contact-form .form-textarea {
  min-height: 120px;
}

html[data-theme="light"] .contact-form .form-legal {
  color: #687381;
}

.contact-form .form-legal a {
  color: var(--text-secondary);
  font-weight: 500;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 3px;
}

.contact-form .form-legal a:hover {
  color: var(--signal-orange);
}

html .contact-form .form-submit {
  justify-content: center;
  width: 100%;
}

html[data-theme="light"] .team-hero,
html[data-theme="light"] .team-disciplines,
html[data-theme="light"] .team-principles,
html[data-theme="light"] .team-career {
  background: var(--bg-base);
}

html[data-theme="light"] .team-cta {
  background: radial-gradient(700px 460px at 72% 40%, rgba(184, 90, 0, .1), transparent 62%);
}

html[data-theme="light"] .team-cta__box {
  background: linear-gradient(180deg, rgba(26, 29, 34, .98), rgba(15, 17, 22, .98));
}

html[data-theme="light"] .solutions-subnav {
  background: rgba(244, 246, 248, .9);
  box-shadow: 0 8px 24px rgba(39, 48, 58, .08);
}

html[data-theme="light"] .article-author__avatar {
  background: linear-gradient(135deg, #fff, #e9edf2);
}

html[data-theme="light"] .article-toc a.is-active {
  color: var(--signal-orange);
}

html[data-theme="light"] .case-full-before-after__head,
html[data-theme="light"] .case-full-confirm-metrics,
html[data-theme="light"] .case-full-stack-grid span {
  background: rgba(255, 255, 255, .62);
}

html[data-theme="light"] .case-full-confirm .wrap-narrow > div {
  background: linear-gradient(180deg, #fff, #f8f9fb);
  box-shadow: var(--shadow-raised);
}

html[data-theme="light"] .case-full-confirm-grid p {
  background: var(--surface-card);
}

html[data-theme="light"] .error-page::before {
  opacity: .035;
  mix-blend-mode: multiply;
}

html[data-theme="light"] .error-page::after {
  opacity: .45;
}

html[data-theme="light"] input,
html[data-theme="light"] textarea,
html[data-theme="light"] select {
  color-scheme: light;
}

html[data-theme="light"] ::selection {
  background: rgba(255, 138, 0, .24);
  color: #111318;
}

@media (max-width: 1100px) {
  html .site-header__nav--desktop,
  html .site-header__actions--desktop {
    display: none;
  }

  .site-header__mobile-actions {
    display: flex;
  }

  .theme-toggle--header-mobile {
    display: inline-flex;
  }

  html .site-header__menu-button {
    display: flex;
  }

  .mobile-menu .mobile-menu__close {
    display: flex;
    flex: 0 0 40px;
    align-items: center;
    justify-content: center;
    width: 40px;
    min-width: 40px;
    height: 40px;
    min-height: 40px;
    padding: 0;
    appearance: none;
    -webkit-appearance: none;
    font-size: 0;
    line-height: 0;
    touch-action: manipulation;
  }

  .mobile-menu .mobile-menu__close .home-icon {
    display: block;
    flex: none;
    width: 22px;
    height: 22px;
    pointer-events: none;
  }

  .mobile-menu .mobile-menu__footer a {
    color: var(--text-muted);
    font-weight: 500;
    text-decoration: none;
  }

  .mobile-menu .mobile-menu__footer a:hover,
  .mobile-menu .mobile-menu__footer a.is-active {
    color: var(--text-primary);
  }

  .mobile-menu .mobile-menu__footer a.is-active {
    font-weight: 700;
  }

  .mobile-menu__copyright {
    margin-left: auto;
    color: var(--text-muted);
    white-space: nowrap;
  }
}

@media (prefers-reduced-motion: reduce) {
  html.theme-is-changing body,
  html.theme-is-changing .home-shell,
  html.theme-is-changing .site-header,
  html.theme-is-changing .site-footer,
  html.theme-is-changing .mobile-menu,
  html.theme-is-changing section,
  html.theme-is-changing article {
    transition: none;
  }
}

@media print {
  html {
    color-scheme: light;
  }

  body {
    background: #fff !important;
    color: #111 !important;
  }

  .theme-toggle {
    display: none !important;
  }
}
