:root {
  --paper: #07111e;
  --paper-blue: #0b1828;
  --surface: #101d2d;
  --ink: #f4f8fb;
  --ink-soft: #d6e1e9;
  --muted: #b2c0ce;
  --line: rgba(173, 196, 216, 0.15);
  --line-dark: rgba(173, 196, 216, 0.25);
  --blue: #2f8cff;
  --cyan: #27c3d5;
  --cyan-soft: rgba(39, 195, 213, 0.12);
  --green: #38bd91;
  --green-soft: rgba(56, 189, 145, 0.12);
  --violet: #9b86ee;
  --violet-soft: rgba(155, 134, 238, 0.13);
  --orange: #efa54a;
  --orange-soft: rgba(239, 165, 74, 0.12);
  --coral: #ef806f;
  --navy: #081321;
  --shadow: 0 28px 80px rgba(0, 0, 0, 0.42);
}

html {
  background: #06101c;
}

body.theme-dark {
  color: var(--ink);
  background: #06101c;
}

body.theme-dark::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(rgba(144, 174, 198, 0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(144, 174, 198, 0.025) 1px, transparent 1px);
  background-size: 72px 72px;
  mask-image: linear-gradient(to bottom, black 0%, rgba(0, 0, 0, 0.48) 70%, transparent 100%);
}

.ambient-canvas {
  position: fixed;
  inset: 0;
  z-index: 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  opacity: 0.72;
}

main,
.site-footer {
  position: relative;
}

main,
.site-footer {
  z-index: 1;
}

.site-header {
  z-index: 50;
  border-bottom-color: rgba(166, 192, 213, 0.15);
  background: rgba(6, 16, 28, 0.84);
  box-shadow: 0 10px 36px rgba(0, 0, 0, 0.12);
}

.header-logo {
  filter: grayscale(1) brightness(0) invert(1);
}

.desktop-nav,
.header-phone,
.header-login {
  color: #a8b7c7;
}

.desktop-nav a:hover,
.header-phone:hover,
.header-login:hover {
  color: #ffffff;
}

.header-cta {
  border-color: #e8f4fb;
  color: #07111e;
  background: #f3f9fc;
}

.header-cta:hover {
  border-color: var(--cyan);
  color: #ffffff;
  background: rgba(39, 195, 213, 0.16);
}

.nav-mega {
  border-color: rgba(166, 192, 213, 0.2);
  border-top-color: var(--cyan);
  background: rgba(12, 26, 42, 0.98);
  box-shadow: 0 28px 64px rgba(0, 0, 0, 0.42);
}

.nav-mega b {
  border-bottom-color: rgba(166, 192, 213, 0.14);
  color: #f6fbff;
}

.nav-mega a {
  color: #99aabc;
}

.nav-mega a:hover {
  color: var(--cyan);
}

.hero {
  background: rgba(6, 16, 28, 0.64);
}

.hero::before {
  height: 4px;
  background: linear-gradient(90deg, var(--cyan), var(--green), var(--orange));
  box-shadow: 0 0 28px rgba(39, 195, 213, 0.38);
}

.hero::after {
  content: "";
  position: absolute;
  top: 110px;
  right: -16%;
  width: 72%;
  height: 1px;
  background: rgba(72, 179, 215, 0.23);
  box-shadow: 0 0 18px rgba(39, 195, 213, 0.22);
  transform: rotate(-7deg);
  transform-origin: right center;
}

h1,
.loop-intro h2,
.capability-header h2,
.client-trust-header h2,
.foundation-intro h2,
.about-copy h2 {
  color: #f5f9fc;
}

h1 span {
  color: #53a5ff;
}

.product-kicker,
.section-eyebrow {
  color: var(--cyan);
}

.hero-lead,
.hero-note,
.loop-flow p,
.capability-header > p,
.domain-agent-work p,
.client-trust-copy p,
.about-copy > p:last-child {
  color: var(--muted);
}

.button-primary {
  background: #1979e8;
  box-shadow: 0 14px 34px rgba(25, 121, 232, 0.3);
}

.button-primary:hover {
  background: #2f8cff;
  box-shadow: 0 18px 42px rgba(47, 140, 255, 0.38);
}

.button-secondary {
  border-color: rgba(185, 207, 226, 0.3);
  color: #d8e5ee;
  background: rgba(15, 31, 49, 0.78);
}

.button-secondary:hover {
  border-color: var(--cyan);
  color: #ffffff;
  background: rgba(39, 195, 213, 0.1);
}

.status-beacon {
  box-shadow: 0 0 0 5px rgba(56, 189, 145, 0.12), 0 0 18px rgba(56, 189, 145, 0.36);
  animation: darkStatusBreathe 3.2s ease-in-out infinite;
}

.stage-label {
  color: #7e91a4;
}

.stage-label b {
  color: #5ad1a7;
}

.gallery-frame {
  border-color: rgba(164, 193, 215, 0.28);
  background: #0b1726;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), 0 0 0 1px rgba(39, 195, 213, 0.05);
}

.gallery-chrome {
  border-bottom-color: rgba(166, 192, 213, 0.14);
  color: #8294a6;
  background: #0e1b2b;
}

.gallery-chrome > b {
  color: #c4d3df;
}

.gallery-tabs {
  border-top-color: rgba(166, 192, 213, 0.22);
  border-bottom-color: rgba(166, 192, 213, 0.22);
  background: rgba(8, 20, 33, 0.72);
}

.gallery-tabs button {
  border-right-color: rgba(166, 192, 213, 0.16);
  color: #8395a7;
}

.gallery-tabs button span {
  color: #617488;
}

.gallery-tabs button:hover,
.gallery-tabs button.is-active {
  color: #f5f9fc;
  background: rgba(21, 43, 63, 0.88);
}

.gallery-tabs button.is-active {
  box-shadow: inset 0 3px 0 var(--cyan), inset 0 14px 28px rgba(39, 195, 213, 0.05);
}

.proof-bar {
  border-top-color: rgba(166, 192, 213, 0.2);
  background: rgba(8, 22, 36, 0.74);
}

.proof-bar div {
  border-right-color: rgba(166, 192, 213, 0.14);
}

.proof-bar b {
  color: #f4f8fb;
}

.proof-bar span {
  color: #8293a5;
}

.agent-loop {
  position: relative;
}

.loop-flow {
  border-top-color: rgba(176, 202, 221, 0.28);
}

.loop-flow span {
  color: #718397;
}

.loop-flow b {
  color: #ecf4f9;
}

.capabilities {
  background: rgba(10, 22, 37, 0.88);
  border-top: 1px solid rgba(166, 192, 213, 0.1);
  border-bottom: 1px solid rgba(166, 192, 213, 0.1);
  backdrop-filter: blur(8px);
}

.capability-list {
  border-top-color: rgba(177, 200, 220, 0.27);
}

.capability-domain {
  border-bottom-color: rgba(166, 192, 213, 0.15);
}

.domain-heading h3 {
  color: #f2f7fa;
}

.domain-products li {
  border-color: rgba(169, 195, 215, 0.18);
  color: #aebdcb;
  background: rgba(16, 34, 51, 0.72);
}

.capability-domain:hover .domain-products li {
  border-color: color-mix(in srgb, var(--domain-color) 40%, transparent);
  color: #eef7fb;
  background: var(--domain-soft);
}

.capability-continuity {
  color: #90a1b4;
}

.foundation {
  position: relative;
  background: rgba(5, 14, 25, 0.94);
  border-bottom: 1px solid rgba(166, 192, 213, 0.1);
}

.foundation::before {
  content: "";
  position: absolute;
  inset: 0 auto 0 7%;
  width: 1px;
  background: rgba(39, 195, 213, 0.14);
  box-shadow: 360px 0 rgba(56, 189, 145, 0.08), 720px 0 rgba(239, 165, 74, 0.07);
}

.client-trust {
  background: rgba(11, 25, 40, 0.88);
  border-bottom: 1px solid rgba(166, 192, 213, 0.12);
  backdrop-filter: blur(8px);
}

.client-trust-copy a {
  color: #58a9ff;
}

.client-logo-item {
  border-color: rgba(178, 201, 219, 0.22);
  background: #ffffff;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.14);
}

.about {
  position: relative;
}

.about-mark {
  border-color: rgba(173, 199, 220, 0.24);
  color: #ffffff;
  background-color: #145da8;
  background-image:
    linear-gradient(90deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(255, 255, 255, 0.08) 1px, transparent 1px);
  box-shadow: 0 24px 64px rgba(0, 0, 0, 0.26);
}

.contact {
  border: 1px solid rgba(105, 190, 244, 0.34);
  background: #0b62c6;
  box-shadow: 0 28px 70px rgba(0, 41, 92, 0.42);
}

.button-light {
  color: #07111e;
  background: #f4f9fc;
}

.official-footer {
  border-top: 1px solid rgba(166, 192, 213, 0.12);
  background: #050d17;
}

.official-footer-logo img {
  filter: brightness(1.18) saturate(0.92);
}

.mobile-menu > summary {
  border-color: rgba(173, 196, 216, 0.24);
  background: #0e1b2b;
}

.mobile-menu > summary span,
.mobile-menu > summary span::before,
.mobile-menu > summary span::after {
  background: #eaf2f8;
}

.mobile-menu nav {
  border-color: rgba(173, 196, 216, 0.2);
  background: #0b1828;
  box-shadow: 0 22px 54px rgba(0, 0, 0, 0.46);
}

.mobile-menu nav > a,
.mobile-submenu,
.mobile-submenu a,
.mobile-menu nav .mobile-submenu a:last-child {
  border-color: rgba(173, 196, 216, 0.13);
}

.mobile-submenu > summary {
  color: #ecf4f9;
}

.mobile-submenu a,
.mobile-menu nav .mobile-submenu a:last-child {
  color: #9aabbd;
  background: #0e1d2e;
}

@keyframes darkStatusBreathe {
  0%, 100% { opacity: 0.72; transform: scale(0.92); }
  50% { opacity: 1; transform: scale(1.08); }
}

@media (max-width: 760px) {
  body.theme-dark::before {
    background-size: 52px 52px;
  }

  .ambient-canvas {
    opacity: 0.56;
  }

  .hero {
    background: rgba(6, 16, 28, 0.74);
  }

  .hero::after {
    right: -32%;
    width: 110%;
  }
}

/* Vertical capability workstreams */
.theme-dark .capability-list {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  border-top: 1px solid rgba(177, 200, 220, 0.27);
  border-bottom: 1px solid rgba(177, 200, 220, 0.2);
}

.theme-dark .capability-domain {
  position: relative;
  min-width: 0;
  min-height: 520px;
  display: flex;
  align-items: stretch;
  flex-direction: column;
  gap: 0;
  padding: 30px 26px 28px;
  border-right: 1px solid rgba(166, 192, 213, 0.15);
  border-bottom: 0;
  background: rgba(10, 25, 41, 0.34);
  overflow: hidden;
  transition: background 280ms ease, transform 280ms ease;
}

.theme-dark .capability-domain:last-child {
  border-right: 0;
}

.theme-dark .capability-domain::before {
  top: 0;
  bottom: auto;
  left: 0;
  width: 100%;
  height: 3px;
  background: var(--domain-color);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform 620ms cubic-bezier(0.22, 1, 0.36, 1);
}

.theme-dark .capability-domain::after {
  content: "";
  position: absolute;
  top: 64px;
  left: -3px;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--domain-color);
  box-shadow: 0 0 14px var(--domain-color);
  opacity: 0;
}

.theme-dark .capability-domain:hover {
  background: rgba(17, 37, 57, 0.72);
  transform: translateY(-6px);
}

.theme-dark .capability-domain:hover::before,
.theme-dark .capability-domain:focus-within::before,
.theme-dark .capability-domain.is-visible::before {
  transform: scaleX(1);
}

.theme-dark .capability-domain.is-visible::after {
  animation: capabilitySignal 5.4s ease-in-out infinite;
  animation-delay: calc(var(--domain-delay, 0) + 700ms);
}

.theme-dark .capability-index {
  min-height: 32px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 34px;
  color: var(--domain-color);
  font-size: 12px;
}

.theme-dark .capability-index::after {
  content: "ACTIVE";
  color: #718397;
  font-size: 8px;
  font-weight: 850;
}

.theme-dark .domain-heading {
  min-height: 104px;
}

.theme-dark .domain-heading h3 {
  margin-top: 12px;
  font-size: 25px;
}

.theme-dark .domain-agent-work {
  min-height: 172px;
  margin-top: 15px;
  padding-top: 22px;
  border-top: 1px solid rgba(166, 192, 213, 0.14);
}

.theme-dark .domain-agent-work p {
  margin-top: 12px;
  font-size: 13px;
  line-height: 1.8;
}

.theme-dark .domain-products {
  width: 100%;
  display: grid;
  grid-template-columns: 1fr;
  gap: 0;
  margin-top: auto;
  border-top: 1px solid rgba(166, 192, 213, 0.14);
}

.theme-dark .domain-products li {
  width: 100%;
  min-height: 39px;
  padding: 9px 0;
  border: 0;
  border-bottom: 1px solid rgba(166, 192, 213, 0.11);
  border-radius: 0;
  color: #aebdcb;
  background: transparent;
  transform: translateX(0);
  transition: color 180ms ease, transform 180ms ease, background 180ms ease;
}

.theme-dark .domain-products li:last-child {
  border-bottom: 0;
}

.theme-dark .capability-domain:hover .domain-products li {
  border-color: rgba(166, 192, 213, 0.11);
  color: #eef7fb;
  background: transparent;
}

.theme-dark .domain-products li:hover {
  color: #ffffff;
  transform: translateX(5px);
}

.theme-dark .capability-list.capabilities-motion-ready .capability-domain {
  opacity: 0;
  transform: translateY(28px);
}

.theme-dark .capability-list.capabilities-motion-ready .capability-domain.is-visible {
  opacity: 1;
  transform: translateY(0);
  transition:
    opacity 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--domain-delay, 0ms),
    transform 620ms cubic-bezier(0.22, 1, 0.36, 1) var(--domain-delay, 0ms),
    background 280ms ease;
}

.theme-dark .capability-list.capabilities-motion-ready .capability-domain.is-visible:hover {
  transform: translateY(-6px);
}

@keyframes capabilitySignal {
  0%, 14% { top: 64px; opacity: 0; }
  24% { opacity: 0.9; }
  76% { opacity: 0.9; }
  90%, 100% { top: calc(100% - 38px); opacity: 0; }
}

@media (max-width: 1040px) {
  .theme-dark .capability-list {
    grid-template-columns: 1fr;
  }

  .theme-dark .capability-domain {
    min-height: 0;
    padding: 28px 30px;
    border-right: 0;
    border-bottom: 1px solid rgba(166, 192, 213, 0.15);
  }

  .theme-dark .capability-domain:last-child {
    border-bottom: 0;
  }

  .theme-dark .domain-products {
    grid-column: auto;
    margin-top: auto;
  }
}

@media (max-width: 620px) {
  .theme-dark .capability-list {
    grid-template-columns: 1fr;
  }

  .theme-dark .capability-domain {
    min-height: 0;
    padding: 27px 22px 25px;
    border-right: 0;
    border-bottom: 1px solid rgba(166, 192, 213, 0.15);
  }

  .theme-dark .capability-domain:nth-last-child(2) {
    border-bottom: 1px solid rgba(166, 192, 213, 0.15);
  }

  .theme-dark .capability-domain:last-child {
    border-bottom: 0;
  }

  .theme-dark .capability-index {
    min-height: 24px;
    margin-bottom: 23px;
  }

  .theme-dark .domain-heading,
  .theme-dark .domain-agent-work {
    grid-column: auto;
    min-height: 0;
  }

  .theme-dark .domain-agent-work {
    margin-top: 20px;
    padding-top: 18px;
  }

  .theme-dark .domain-products {
    grid-column: auto;
    margin-top: 24px;
  }
}

/* Higher contrast for supporting copy on dark surfaces */
.theme-dark .desktop-nav,
.theme-dark .header-phone,
.theme-dark .header-login {
  color: #bdc9d4;
}

.theme-dark .nav-mega a,
.theme-dark .mobile-submenu a,
.theme-dark .mobile-menu nav .mobile-submenu a:last-child {
  color: #b8c6d2;
}

.theme-dark .stage-label,
.theme-dark .gallery-chrome,
.theme-dark .gallery-tabs button,
.theme-dark .proof-bar span,
.theme-dark .loop-flow span,
.theme-dark .capability-continuity,
.theme-dark .capability-index::after {
  color: #aebdca;
}

.theme-dark .gallery-tabs button span {
  color: #98aabc;
}

.theme-dark .domain-products li {
  color: #c0ccd6;
}

.theme-dark .foundation-intro > p:not(.section-eyebrow) {
  color: rgba(255, 255, 255, 0.76);
}

.theme-dark .foundation-stack article > p {
  color: rgba(255, 255, 255, 0.72);
}

.theme-dark .client-trust-copy p {
  color: rgba(232, 239, 245, 0.82);
}

.theme-dark .contact p:last-child {
  color: rgba(255, 255, 255, 0.86);
}

.theme-dark .official-footer {
  color: #c5d0db;
}

.theme-dark .footer-column > a,
.theme-dark .footer-link-grid a {
  color: #bfccda;
}

.theme-dark .footer-column > a:hover,
.theme-dark .footer-link-grid a:hover,
.theme-dark .footer-legal a:hover,
.theme-dark .footer-column > a:focus-visible,
.theme-dark .footer-link-grid a:focus-visible,
.theme-dark .footer-legal a:focus-visible {
  color: #69b9ff;
}

.theme-dark .footer-service span {
  color: #b2c1cf;
}

.theme-dark .footer-certifications {
  color: #adbdcc;
}

.theme-dark .footer-product-logos a {
  opacity: 0.86;
}

.theme-dark .footer-legal {
  color: #a9baca;
}

.theme-dark .footer-main > p {
  color: rgba(255, 255, 255, 0.68);
}

.theme-dark .footer-meta {
  color: rgba(255, 255, 255, 0.6);
}
