/**
 * CompScience VMS page group - shared styles.
 * Layered on /tokens.css; follows the same ui_core-derived patterns as
 * external/index.html (midnight header/hero, radius-xl cards, pill buttons).
 *
 * Accent system (mirrors compscience.com theme: --primary green, --secondary
 * orange #fd7738): orange carries secondary CTAs (filled, invert on hover),
 * headline highlight words/periods, stat numbers, and the first solution
 * card's top bar. Eyebrows and structural accents stay green.
 */

/* compscience.com --secondary; tokens.css --color-orange (#f98d00) is a
   different hue - the homepage orange wins for brand consistency. */
:root {
  --vms-orange: #fd7738;
  /* Shared motion curve for all entrance/travel animation (restrained
     ease-out, no overshoot). */
  --vms-ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

* { margin: 0; padding: 0; box-sizing: border-box; }

html { background: var(--color-midnight); }

body {
  font-family: var(--font-spline);
  font-size: 0.875rem;
  font-weight: 400;
  color: var(--color-gray-900);
  background: var(--color-gray-100);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

/* Header - dark, CompScience wordmark links back to compscience.com */
header {
  background: var(--color-midnight);
  color: white;
  padding: var(--cs16) var(--cs40);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cs24);
}
header .site-logo { height: 24px; width: auto; display: block; }
header nav { display: flex; align-items: center; gap: var(--cs24); flex-wrap: wrap; }
header nav a {
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 0.875rem;
  font-weight: 500;
  transition: color 0.2s;
}
header nav a:hover { color: white; }
header nav a.active { color: var(--color-green); }

/* Resources dropdown (compscience.com mega-menu pattern, scaled down):
   grouped links + one highlight card. CSS-only via hover/focus-within. */
.nav-dd { position: relative; }
.nav-dd > a { cursor: pointer; }
.nav-dd > a::after { content: " \25BE"; font-size: 0.6875rem; }
.nav-dd-panel {
  display: none;
  position: absolute;
  top: calc(100% + 10px);
  right: -60px;
  z-index: 50;
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-top: 3px solid var(--color-green);
  border-radius: var(--radius-xl);
  box-shadow: 0 12px 32px rgba(0,0,0,0.18);
  padding: var(--cs20);
  min-width: 480px;
}
/* Hover bridge so the pointer can cross the gap without closing it */
.nav-dd-panel::before { content: ""; position: absolute; top: -14px; left: 0; right: 0; height: 14px; }
.nav-dd:hover .nav-dd-panel,
.nav-dd:focus-within .nav-dd-panel { display: block; }
.nav-dd-cols { display: flex; gap: var(--cs20); align-items: stretch; }
.nav-dd-cols > div { flex: 1; display: flex; flex-direction: column; }
.nav-dd-group {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-500);
  margin: var(--cs8) 0 var(--cs4);
}
.nav-dd-group:first-child { margin-top: 0; }
.nav-dd-panel a {
  display: block;
  color: var(--color-gray-900);
  font-size: 0.875rem;
  font-weight: 500;
  text-decoration: none;
  padding: var(--cs4) 0;
}
.nav-dd-panel a:hover { color: var(--color-green-700); }
.nav-dd-card {
  flex: 0 0 200px;
  background: var(--color-midnight);
  border-radius: var(--radius-lg);
  padding: var(--cs16) !important;
  display: flex;
  flex-direction: column;
  gap: var(--cs6);
}
.nav-dd-card:hover { background: #032e39; }
.nav-dd-card .nav-dd-card-eyebrow {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-green);
}
.nav-dd-card .nav-dd-card-title { color: white; font-size: 0.9375rem; font-weight: 600; }
.nav-dd-card p { color: var(--color-gray-400); font-size: 0.75rem; line-height: 1.45; flex: 1; margin: 0; }
.nav-dd-card .nav-dd-card-cta { color: var(--color-green); font-size: 0.8125rem; font-weight: 600; }

@media (max-width: 900px) { .nav-dd { display: none; } }

/* Language switch (EN | ES) */
.lang-switch {
  display: inline-flex;
  align-items: center;
  gap: var(--cs6);
  border: 1px solid var(--color-gray-600);
  border-radius: 9999px;
  padding: 2px var(--cs10);
}
.lang-switch a {
  color: var(--color-gray-400);
  text-decoration: none;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.04em;
  transition: color 0.2s;
}
.lang-switch a:hover { color: white; }
.lang-switch a.active { color: var(--color-green); }
.lang-switch .sep { color: var(--color-gray-600); font-size: 0.75rem; }

/* Hero - dot-matrix texture echoes the device label */
.hero {
  background: var(--color-midnight);
  color: white;
  padding: var(--cs64) var(--cs40);
  position: relative;
  overflow: hidden;
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: radial-gradient(rgba(0, 197, 123, 0.13) 1.5px, transparent 1.5px);
  background-size: 22px 22px;
  mask-image: linear-gradient(120deg, transparent 30%, black 75%);
  -webkit-mask-image: linear-gradient(120deg, transparent 30%, black 75%);
}
.hero-inner { position: relative; z-index: 1; }
.hero-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  gap: var(--cs48);
}
.hero-copy { flex: 1 1 380px; }
.hero-copy .eyebrow {
  color: var(--color-green);
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  margin-bottom: var(--cs8);
}
.hero-copy h1 {
  font-size: 1.75rem;
  font-weight: 600;
  line-height: 1.25;
  margin-bottom: var(--cs12);
}
.hero-copy h1 span { color: var(--color-green); }
.hero-copy p {
  font-size: 1rem;
  line-height: 1.5rem;
  color: var(--color-gray-400);
  margin-bottom: var(--cs24);
}
.hero-cta { display: inline-flex; gap: var(--cs12); flex-wrap: wrap; }
.hero-art { flex: 0 1 380px; }
.hero-art img { width: 100%; height: auto; display: block; filter: drop-shadow(0 24px 40px rgba(0,0,0,0.45)); }

/* Buttons - ui_core .ui-button spec */
.ui-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--cs8);
  padding: var(--cs8) var(--cs16);
  border-radius: 9999px;
  font-family: var(--font-spline);
  font-size: 1rem;
  font-weight: 400;
  text-decoration: none;
  cursor: pointer;
  border: none;
  outline: none;
  transition: background-color 0.2s, color 0.2s, border-color 0.2s;
  user-select: none;
}
/* Primary = compscience.com .btn-primary: green fill, midnight text,
   hover inverts to midnight with brightened green text */
.ui-button.primary { background: var(--color-green); color: var(--color-midnight); }
.ui-button.primary:hover,
.ui-button.primary:active { background: var(--color-midnight); color: var(--color-green-300); }
.ui-button.primary:focus-visible {
  box-shadow: 0 0 0 4px rgba(0, 197, 123, 0.3), 0 1px 3px 0 rgba(0,0,0,0.1);
}
/* On dark sections the invert hover would vanish into the background -
   brighten the fill instead */
.hero .ui-button.primary:hover, .hero .ui-button.primary:active,
.dark-band .ui-button.primary:hover, .dark-band .ui-button.primary:active,
.contact-box .ui-button.primary:hover, .contact-box .ui-button.primary:active {
  background: var(--color-green-300);
  color: var(--color-midnight);
}
/* Secondary = compscience.com .btn-secondary: filled orange, midnight text,
   hover inverts to midnight/orange. Borderless (transparent keeps the size
   identical to the outlined on-dark variant). */
.ui-button.secondary {
  background: var(--vms-orange);
  color: var(--color-midnight);
  border: 1px solid transparent;
}
.ui-button.secondary:hover,
.ui-button.secondary:active { background: var(--color-midnight); color: var(--vms-orange); border-color: transparent; }
.ui-button.secondary:focus-visible {
  box-shadow: 0 0 0 2px currentColor, 0 1px 3px 0 rgba(0,0,0,0.1);
}
/* On-midnight variant: filled orange loses the invert hover on dark, and the
   homepage equivalent there is .btn-outline - white outline, transparent */
.hero .ui-button.secondary { background: transparent; color: white; border-color: var(--color-gray-600); }
.hero .ui-button.secondary:hover { background: transparent; border-color: white; color: white; }

/* Headline highlight words - same class grammar as compscience.com */
.highlight.orange { color: var(--vms-orange); }
.highlight.green { color: var(--color-green); }

/* Layout */
.container { max-width: 980px; margin: 0 auto; padding: 60px var(--cs24); width: 100%; }
.section { margin-bottom: 60px; }
.section:last-child { margin-bottom: 0; }
.section-title {
  font-size: 1.25rem;
  font-weight: 400;
  line-height: 1.5rem;
  color: var(--color-midnight);
  margin-bottom: var(--cs4);
}
/* gray-600, not gray-500: #949899 on the gray-100 page bg is ~2.6:1 and
   fails WCAG AA at this size */
.section-sub {
  font-size: 0.875rem;
  color: var(--color-gray-600);
  margin-bottom: var(--cs24);
}

/* Cards */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: var(--cs12);
}
.card {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  padding: var(--cs20);
  display: flex;
  flex-direction: column;
  gap: var(--cs8);
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.card svg { color: var(--color-green); flex-shrink: 0; }
.card-title { font-size: 0.875rem; font-weight: 600; color: var(--color-gray-900); }
.card-desc { font-size: 0.8125rem; line-height: 1.45; color: var(--color-gray-600); flex: 1; }

/* Horizontal progress stepper (Safety Pulse pattern: green dot,
   bold label, gray sub, dash connectors) */
.stepper {
  display: flex;
  align-items: center;
  gap: var(--cs10);
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-radius: var(--radius-xl);
  padding: var(--cs16);
  overflow-x: auto;
}
/* Auto margins center the row when it fits and keep the left edge
   reachable when it overflows (justify-content: center would clip it). */
.stepper > :first-child { margin-left: auto; }
.stepper > :last-child { margin-right: auto; }
/* Items may shrink (labels wrap) so the rail never grows a desktop scrollbar */
.stepper-item { display: flex; align-items: center; gap: var(--cs10); flex-shrink: 1; min-width: 0; }
.stepper-item > div:last-child { min-width: 0; }
.stepper-dot {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: var(--color-green);
  color: var(--color-midnight);
  font-weight: 700;
  font-size: 1rem;
  display: flex;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
}
.stepper-label { font-weight: 600; font-size: 0.875rem; color: var(--color-gray-900); line-height: 1.3; }
.stepper-sub { font-size: 0.75rem; color: var(--color-gray-600); line-height: 1.3; }
.stepper-dash { width: 20px; height: 3px; border-radius: 2px; background: var(--color-green); flex-shrink: 0; }

/* Numbered steps (setup flow) */
.steps { display: flex; flex-direction: column; gap: var(--cs12); }
.step {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  padding: var(--cs20);
  display: flex;
  gap: var(--cs16);
  align-items: flex-start;
}
.step-num {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--color-green);
  color: var(--color-midnight);
  font-weight: 600;
  font-size: 0.9375rem;
  display: flex;
  align-items: center;
  justify-content: center;
}
.step-body { flex: 1; }
.step-title { font-size: 0.9375rem; font-weight: 600; color: var(--color-gray-900); margin-bottom: var(--cs4); }
.step-desc { font-size: 0.875rem; line-height: 1.5; color: var(--color-gray-600); }
.step-desc code {
  background: var(--color-gray-200);
  border-radius: var(--radius-4);
  padding: 1px 6px;
  font-size: 0.8125rem;
}

/* Checklist blocks (technical details) */
.check-group { margin-bottom: var(--cs24); }
.check-group h4 {
  font-size: 0.875rem;
  font-weight: 600;
  color: var(--color-midnight);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: var(--cs8);
}
.check-list { list-style: none; display: flex; flex-direction: column; gap: var(--cs6); }
.check-list li {
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-radius: var(--radius-md);
  padding: var(--cs10) var(--cs14);
  display: flex;
  gap: var(--cs10);
  align-items: baseline;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-gray-900);
}
.check-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--color-green);
  transform: translateY(-1px);
}
.check-list li small { color: var(--color-gray-500); }

/* Compatibility table */
.compat-table { width: 100%; border-collapse: collapse; background: white; border-radius: var(--radius-xl); overflow: hidden; border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent); }
.compat-wrap { overflow-x: auto; border-radius: var(--radius-xl); }
.compat-table th {
  text-align: left;
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--color-gray-600);
  padding: var(--cs12) var(--cs16);
  border-bottom: 1px solid var(--color-gray-300);
  background: var(--color-gray-100);
}
.compat-table td {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-gray-900);
  padding: var(--cs12) var(--cs16);
  border-bottom: 1px solid var(--color-gray-200);
  vertical-align: top;
}
.compat-table tr:last-child td { border-bottom: none; }
.tag {
  display: inline-block;
  border-radius: 9999px;
  font-size: 0.75rem;
  font-weight: 500;
  padding: 2px 10px;
  white-space: nowrap;
}
.tag.ok { background: rgba(0, 197, 123, 0.12); color: var(--color-green-700); }
.tag.warn { background: rgba(249, 141, 0, 0.12); color: #b26400; }
.tag.no { background: rgba(255, 31, 31, 0.10); color: var(--color-red-600); }

/* "On this page" local jump links (long reference pages) */
.page-toc {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: var(--cs6) var(--cs16);
  padding: var(--cs12) var(--cs20);
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-radius: var(--radius-xl);
  margin-bottom: 60px;
  font-size: 0.8125rem;
}
.page-toc .toc-label {
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-gray-500);
}
.page-toc a { color: var(--color-gray-900); text-decoration: none; font-weight: 500; }
.page-toc a:hover { color: var(--color-green-700); }

/* Symptom quick-nav (troubleshooting): chips that jump to + open an accordion item */
.symptom-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: var(--cs8);
  margin-bottom: var(--cs24);
}
.symptom-grid a {
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-radius: 9999px;
  padding: var(--cs8) var(--cs14);
  font-size: 0.8125rem;
  font-weight: 500;
  color: var(--color-gray-900);
  text-decoration: none;
  text-align: center;
  line-height: 1.35;
  transition: border-color 0.2s, color 0.2s, box-shadow 0.2s;
}
.symptom-grid a:hover {
  border-color: var(--color-green);
  color: var(--color-green-700);
  box-shadow: 0 2px 8px rgba(0,0,0,0.06);
}
.faq-item[id] { scroll-margin-top: var(--cs16); }

/* Accordion (troubleshooting) */
.faq { display: flex; flex-direction: column; gap: var(--cs8); }
.faq-item {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  overflow: hidden;
  transition: box-shadow 0.2s;
}
.faq-item:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.faq-q {
  padding: var(--cs16) var(--cs20);
  font-size: 0.875rem;
  font-weight: 500;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: var(--cs12);
  cursor: pointer;
  user-select: none;
  color: var(--color-gray-900);
}
.faq-q svg { color: var(--color-green); flex-shrink: 0; transition: transform 0.2s; }
.faq-a {
  padding: 0 var(--cs20) var(--cs16);
  font-size: 0.875rem;
  line-height: 1.55;
  color: var(--color-gray-600);
  display: none;
}
.faq-a a { color: var(--color-green); font-weight: 600; text-decoration: none; }
.faq-a a:hover { text-decoration: underline; }
.faq-a ul { margin: var(--cs8) 0 0 var(--cs20); display: flex; flex-direction: column; gap: var(--cs4); }
.faq-a code {
  background: var(--color-gray-200);
  border-radius: var(--radius-4);
  padding: 1px 6px;
  font-size: 0.8125rem;
}
.faq-item.open .faq-a { display: block; }
.faq-item.open .faq-q svg { transform: rotate(180deg); }

/* "New" pill badge */
.badge-new {
  display: inline-block;
  background: var(--vms-orange);
  color: var(--color-midnight);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  border-radius: 9999px;
  padding: 2px 10px;
  vertical-align: middle;
  margin-left: var(--cs8);
}

/* Feature split: copy beside a visual */
.feature-split {
  display: flex;
  gap: var(--cs32);
  align-items: center;
  flex-wrap: wrap;
}
.feature-split > div { flex: 1 1 300px; }
.feature-list { list-style: none; display: flex; flex-direction: column; gap: var(--cs10); }
.feature-list li { display: flex; gap: var(--cs10); align-items: baseline; font-size: 0.875rem; line-height: 1.5; }
.feature-list li::before {
  content: "";
  flex-shrink: 0;
  width: 8px; height: 8px; border-radius: 50%;
  background: var(--color-green);
  transform: translateY(-1px);
}
.feature-list li strong { color: var(--color-gray-900); }

/* Non-interactive mock of the Camera Portal device-setup card */
.portal-mock {
  flex: 0 1 340px;
  background: var(--color-midnight);
  border-radius: var(--radius-xl);
  border-top: 3px solid var(--color-green);
  padding: var(--cs24);
  pointer-events: none;
  user-select: none;
  box-shadow: 0 16px 36px rgba(1, 35, 44, 0.28);
}
.portal-mock .pm-eyebrow {
  color: var(--color-green);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-bottom: var(--cs6);
}
.portal-mock .pm-title { color: white; font-size: 1.25rem; font-weight: 700; margin-bottom: var(--cs6); }
.portal-mock .pm-sub { color: var(--color-gray-400); font-size: 0.8125rem; line-height: 1.5; margin-bottom: var(--cs16); }
.portal-mock .pm-label {
  color: var(--color-gray-500);
  font-size: 0.6875rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  margin-bottom: var(--cs6);
}
.portal-mock .pm-input {
  border: 1.5px solid var(--color-green);
  border-radius: var(--radius-md);
  padding: var(--cs10) var(--cs14);
  color: var(--color-gray-500);
  font-family: monospace;
  font-size: 0.9375rem;
  letter-spacing: 0.06em;
  margin-bottom: var(--cs12);
  background: rgba(255,255,255,0.03);
}
.portal-mock .pm-btn {
  background: var(--color-green);
  color: var(--color-midnight);
  font-weight: 600;
  font-size: 0.9375rem;
  text-align: center;
  border-radius: var(--radius-md);
  padding: var(--cs10);
}

/* Product screenshots */
img.shot {
  display: block;
  width: 100%;
  max-width: 560px;
  height: auto;
  margin-top: var(--cs12);
  border-radius: var(--radius-lg);
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 60%, transparent);
  box-shadow: 0 12px 28px rgba(1, 35, 44, 0.18);
}
.hero img.shot, .feature-split img.shot { margin-top: 0; max-width: 100%; box-shadow: 0 24px 48px rgba(0,0,0,0.45); border-color: #0c4652; }

/* Full-bleed midnight band (compscience.com dark-section pattern) */
.dark-band {
  background: var(--color-midnight);
  color: white;
  margin: 0 calc(50% - 50vw) 60px;
  padding: var(--cs48) var(--cs24);
}
.dark-band-inner { max-width: 932px; margin: 0 auto; }
.dark-band .section-title { color: white; }
.dark-band .section-sub { color: var(--color-gray-400); }
.dark-band .ui-button.secondary { background: transparent; color: white; border-color: var(--color-gray-600); }
.dark-band .ui-button.secondary:hover { background: transparent; border-color: white; color: white; }

/* Dark panel cards (Camera Portal pattern: green top edge on midnight) */
.card.on-dark {
  background: #032e39;
  border: 1px solid #0c4652;
  border-top: 3px solid var(--color-green);
}
.card.on-dark .card-title { color: white; }
.card.on-dark .card-desc { color: var(--color-gray-400); }


/* Contact box */
.contact-box {
  background: var(--color-midnight);
  color: white;
  border-radius: var(--radius-xl);
  padding: var(--cs40);
  text-align: center;
}
.contact-box h2, .contact-box h3 { font-size: 1.25rem; font-weight: 400; line-height: 1.5rem; margin-bottom: var(--cs8); }
.contact-box p { color: var(--color-gray-400); margin-bottom: var(--cs24); font-size: 0.875rem; line-height: 1.5; }

/* Footer */
footer {
  background: var(--color-midnight);
  color: var(--color-gray-500);
  padding: var(--cs24) var(--cs40);
  font-size: 0.75rem;
  margin-top: auto;
}
.ft-inner {
  max-width: 980px;
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--cs16);
  flex-wrap: wrap;
}
.ft-inner img { height: 20px; width: auto; display: block; }
/* Tagline: "chance." orange / "science." green via .highlight spans,
   exactly as the compscience.com footer styles the same line */
.ft-tagline { color: var(--color-gray-300); font-style: italic; font-size: 0.8125rem; }
footer a { color: var(--color-green); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Mobile */
@media (max-width: 768px) {
  header { padding: var(--cs16) var(--cs20); }
  header nav { gap: var(--cs16); }
  header nav .hide-mobile { display: none; }
  .hero { padding: var(--cs40) var(--cs20); }
  .hero-inner { flex-direction: column-reverse; gap: var(--cs24); }
  .hero-art { flex-basis: auto; max-width: 300px; }
  .container { padding: var(--cs40) var(--cs16); }
  .contact-box { padding: var(--cs32) var(--cs20); }
}

/* Solution panels (overview #services) - top bars follow the homepage
   #systemCards sequence: first card orange, then green */
.svc-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: var(--cs16); }
.svc-grid .svc:nth-child(1) { border-top: 4px solid var(--vms-orange); }
.svc-grid .svc:nth-child(2) { border-top: 4px solid var(--color-green); }
.svc {
  background: white;
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  border-radius: var(--radius-xl);
  padding: var(--cs24);
  display: flex;
  flex-direction: column;
  gap: var(--cs10);
  transition: box-shadow 0.2s;
}
.svc:hover { box-shadow: 0 2px 8px rgba(0,0,0,0.06); }
.svc-eyebrow {
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-green-700);
}
.svc h3 { font-size: 1.25rem; font-weight: 600; color: var(--color-midnight); }
.svc-tag { font-size: 0.9375rem; font-weight: 600; color: var(--color-green-700); }
.svc ul { list-style: none; display: flex; flex-direction: column; gap: var(--cs8); }
.svc li {
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--color-gray-600);
  padding-left: var(--cs16);
  position: relative;
}
.svc li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 0.5em;
  width: 6px;
  height: 6px;
  border-radius: 2px;
  background: var(--color-green);
}
.svc-cta { margin-top: auto; padding-top: var(--cs8); display: flex; gap: var(--cs10); flex-wrap: wrap; }

/* ====================================================================
   Signal Path graphics + entrance motion (overview page)

   Progressive enhancement contract:
   - vms-motion.js adds .anim to <html> only when JS runs AND the user
     allows motion, then .in-view to each [data-animate] as it enters
     the viewport. Every "hidden" initial state below is scoped under
     html.anim, so with no JS or prefers-reduced-motion the page renders
     its complete final state immediately.
   - Travel/ambient loops are additionally wrapped in a
     prefers-reduced-motion media query as a second gate.
   ==================================================================== */

/* --- Generic entrance unit --- */
html.anim [data-animate] .fx { opacity: 0; transform: translateY(8px); }
html.anim [data-animate].in-view .fx {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--vms-ease), transform 0.4s var(--vms-ease);
}

/* --- G02: shared-origin branch above the solution panels.
   One VMS node splits into two lanes whose colors match the cards'
   top bars (orange = Safety Pulse, green = scheduled collection). --- */
.svc-branch { display: flex; flex-direction: column; align-items: center; }
.svc-branch-origin {
  display: inline-flex;
  align-items: center;
  gap: var(--cs8);
  background: var(--color-midnight);
  color: white;
  border-radius: 9999px;
  padding: var(--cs8) var(--cs16);
  font-size: 0.875rem;
  font-weight: 600;
}
.svc-branch-origin svg { color: var(--color-green); flex-shrink: 0; }
.svc-branch-paths { width: 100%; height: 56px; display: block; }
.svc-branch .bp { fill: none; stroke-width: 2.5; }
.svc-branch .bp-stem { stroke: var(--color-green); }
.svc-branch .bp-left { stroke: var(--vms-orange); }
.svc-branch .bp-right { stroke: var(--color-green); }
/* Draw-in: paths carry pathLength="1" so dasharray math is unit-free */
html.anim .svc-branch .bp { stroke-dasharray: 1; stroke-dashoffset: 1; }
html.anim .svc-branch.in-view .bp-stem { animation: bp-draw 0.4s var(--vms-ease) forwards; }
html.anim .svc-branch.in-view .bp-left,
html.anim .svc-branch.in-view .bp-right { animation: bp-draw 0.6s var(--vms-ease) 0.3s forwards; }
@keyframes bp-draw { to { stroke-dashoffset: 0; } }
@media (max-width: 768px) {
  /* Single-column cards: curves no longer point at anything - keep the
     shared origin + a simple vertical stem */
  .svc-branch-paths { display: none; }
  .svc-branch::after { content: ""; width: 2px; height: 20px; background: var(--color-green); margin: var(--cs6) 0 var(--cs10); }
}

/* --- "How it works" diagram frame (was inline styles) --- */
.diagram-frame {
  background: white;
  border-radius: var(--radius-xl);
  border: 1px solid color-mix(in srgb, var(--color-gray-400) 75%, transparent);
  padding: var(--cs24);
  overflow-x: auto;
}
.diagram-frame > svg { min-width: 640px; display: block; }
/* Two packets travel the diagram's arrows once on entrance (no loop -
   the dark band directly below owns the ambient loop) */
.hiw-pkt { opacity: 0; }
@media (prefers-reduced-motion: no-preference) {
  html.anim .diagram-frame.in-view .hiw-pkt-a { animation: hiw-pkt 0.9s var(--vms-ease) 0.3s forwards; }
  html.anim .diagram-frame.in-view .hiw-pkt-b { animation: hiw-pkt 0.9s var(--vms-ease) 1.3s forwards; }
}
@keyframes hiw-pkt {
  0% { opacity: 0; transform: translateX(0); }
  15% { opacity: 1; }
  85% { opacity: 1; }
  100% { opacity: 0; transform: translateX(66px); }
}

/* --- G03: outbound network architecture (dark band).
   Zones: [your network: cameras -> VMS] | firewall | [CompScience].
   Packets travel left-to-right only; the firewall boundary answers a
   crossing with a brief green state. --- */
.net-diagram { display: flex; align-items: stretch; margin-bottom: var(--cs24); }
.net-zone {
  position: relative;
  border: 1px dashed #1d4a55;
  border-radius: var(--radius-xl);
  padding: var(--cs20) var(--cs14) var(--cs14);
}
.net-zone-label {
  position: absolute;
  top: -0.65em;
  left: var(--cs14);
  background: var(--color-midnight);
  padding: 0 var(--cs6);
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  white-space: nowrap;
}
.net-local { flex: 1 1 auto; min-width: 0; }
.net-remote { flex: 0 1 220px; display: flex; flex-direction: column; justify-content: center; gap: var(--cs10); }
.net-flow { display: flex; align-items: center; gap: var(--cs10); height: 100%; }
.net-node {
  background: #0b3a44;
  border: 1px solid #1d4a55;
  border-radius: var(--radius-lg);
  padding: var(--cs12) var(--cs14);
  text-align: center;
  flex: 1 1 0;
  min-width: 0;
}
.net-node svg { color: var(--color-green); margin-bottom: var(--cs4); }
.net-node-title { font-size: 0.875rem; font-weight: 600; color: white; line-height: 1.3; }
.net-node-sub { font-size: 0.75rem; color: var(--color-gray-400); line-height: 1.35; margin-top: 2px; }
.net-node-vms { border-color: var(--color-green); }
.net-chip {
  display: inline-block;
  margin-top: var(--cs8);
  background: rgba(0, 197, 123, 0.12);
  color: var(--color-green-200);
  font-size: 0.6875rem;
  font-weight: 600;
  border-radius: 9999px;
  padding: 2px 10px;
  white-space: nowrap;
}

/* Connector line with arrowhead + traveling packet */
.net-link {
  position: relative;
  flex: 1 0 44px;
  height: 2px;
  background: color-mix(in srgb, var(--color-green) 55%, transparent);
}
.net-link::before {
  content: "";
  position: absolute;
  right: -1px;
  top: 50%;
  transform: translateY(-50%);
  border-left: 6px solid var(--color-green);
  border-top: 4px solid transparent;
  border-bottom: 4px solid transparent;
}
.net-link::after {
  content: "";
  position: absolute;
  top: 50%;
  left: 0;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  border-radius: 50%;
  background: var(--color-green);
  box-shadow: 0 0 8px rgba(0, 197, 123, 0.8);
  opacity: 0;
}
.net-link-label {
  position: absolute;
  bottom: 7px;
  left: 50%;
  transform: translateX(-50%);
  white-space: nowrap;
  font-size: 0.6875rem;
  color: var(--color-gray-400);
}

/* Firewall crossing: vertical dashed boundary behind a horizontal
   outbound connector */
.net-out {
  flex: 0 1 170px;
  position: relative;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 var(--cs4);
}
.net-out::before {
  content: "";
  position: absolute;
  top: 0;
  bottom: 0;
  left: 50%;
  border-left: 2px dashed #1d4a55;
}
.net-boundary-label {
  position: relative;
  font-size: 0.6875rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-gray-400);
  background: var(--color-midnight);
  padding: 0 var(--cs6);
  margin-bottom: var(--cs10);
  white-space: nowrap;
}
.net-out .net-link { width: 100%; flex: none; }
.net-link-sub {
  position: relative;
  font-size: 0.6875rem;
  color: var(--color-gray-400);
  background: var(--color-midnight);
  padding: 0 var(--cs6);
  margin-top: var(--cs10);
  text-align: center;
  line-height: 1.35;
}

/* Entrance: nodes resolve in signal order */
html.anim .net-diagram .net-node { opacity: 0; transform: translateY(8px); }
html.anim .net-diagram.in-view .net-node {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--vms-ease), transform 0.4s var(--vms-ease);
}
html.anim .net-diagram.in-view .net-node-vms { transition-delay: 0.12s; }
html.anim .net-diagram.in-view .net-remote .net-node:nth-of-type(1) { transition-delay: 0.3s; }
html.anim .net-diagram.in-view .net-remote .net-node:nth-of-type(2) { transition-delay: 0.42s; }

/* Ambient relay (the one loop in this viewport): camera->VMS packet,
   then VMS->CompScience packet, firewall confirms, long pause. 8s cycle. */
@media (prefers-reduced-motion: no-preference) {
  html.anim .net-diagram.in-view .net-link-a::after { animation: net-pkt-a 8s linear infinite; }
  html.anim .net-diagram.in-view .net-link-b::after { animation: net-pkt-b 8s linear infinite; }
  html.anim .net-diagram.in-view .net-out::before { animation: net-fw 8s linear infinite; }
}
@keyframes net-pkt-a {
  0% { left: 0; opacity: 0; }
  2% { opacity: 1; }
  14% { left: calc(100% - 8px); opacity: 1; }
  17% { left: calc(100% - 8px); opacity: 0; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes net-pkt-b {
  0%, 17% { left: 0; opacity: 0; }
  19% { opacity: 1; }
  33% { left: calc(100% - 8px); opacity: 1; }
  36% { left: calc(100% - 8px); opacity: 0; }
  100% { left: calc(100% - 8px); opacity: 0; }
}
@keyframes net-fw {
  0%, 22%, 34%, 100% { border-color: #1d4a55; }
  26%, 30% { border-color: var(--color-green); }
}

/* Below 900px the horizontal topology runs out of room: stack it
   vertically, packets travel downward (still outbound-only) */
@media (max-width: 900px) {
  .net-diagram { flex-direction: column; gap: 0; }
  .net-remote { flex: none; }
  .net-flow { flex-direction: column; align-items: stretch; }
  .net-node { flex: none; }
  .net-link { flex: none; width: 2px; height: 40px; align-self: center; }
  .net-link::before {
    right: auto;
    top: auto;
    bottom: -1px;
    left: 50%;
    transform: translateX(-50%);
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 6px solid var(--color-green);
    border-bottom: none;
  }
  .net-link::after { left: 50%; top: 0; margin-top: 0; margin-left: -4px; }
  .net-link-label {
    bottom: auto;
    left: auto;
    right: 12px;
    top: 50%;
    transform: translateY(-50%);
  }
  .net-out { flex: none; padding: var(--cs10) 0; }
  .net-out::before { top: 50%; bottom: auto; left: 0; right: 0; border-left: none; border-top: 2px dashed #1d4a55; }
  .net-boundary-label { margin-bottom: var(--cs6); }
  .net-out .net-link { width: 2px; height: 40px; }
  .net-link-sub { margin-top: var(--cs6); }
  @keyframes net-pkt-a {
    0% { top: 0; opacity: 0; }
    2% { opacity: 1; }
    14% { top: calc(100% - 8px); opacity: 1; }
    17% { top: calc(100% - 8px); opacity: 0; }
    100% { top: calc(100% - 8px); opacity: 0; }
  }
  @keyframes net-pkt-b {
    0%, 17% { top: 0; opacity: 0; }
    19% { opacity: 1; }
    33% { top: calc(100% - 8px); opacity: 1; }
    36% { top: calc(100% - 8px); opacity: 0; }
    100% { top: calc(100% - 8px); opacity: 0; }
  }
  @keyframes net-fw {
    0%, 22%, 34%, 100% { border-color: #1d4a55; }
    26%, 30% { border-color: var(--color-green); }
  }
}

/* --- G04: deployment stepper motion + emphasis ---
   Stage 1 carries the deployment ("prepare determines success"),
   stage 4 resolves to a confirmed check. */
.stepper-item.primary .stepper-dot { box-shadow: 0 0 0 4px rgba(0, 197, 123, 0.25); }
.stepper-item.primary .stepper-label { font-weight: 700; }
.stepper-dot.check { font-size: 1.125rem; }
html.anim .stepper .stepper-item { opacity: 0; transform: translateY(8px); }
html.anim .stepper .stepper-dash { transform: scaleX(0); transform-origin: left center; }
html.anim .stepper.in-view .stepper-item {
  opacity: 1;
  transform: none;
  transition: opacity 0.4s var(--vms-ease), transform 0.4s var(--vms-ease);
}
html.anim .stepper.in-view .stepper-dash {
  transform: scaleX(1);
  transition: transform 0.35s var(--vms-ease);
}
html.anim .stepper.in-view > :nth-child(2) { transition-delay: 0.15s; }
html.anim .stepper.in-view > :nth-child(3) { transition-delay: 0.3s; }
html.anim .stepper.in-view > :nth-child(4) { transition-delay: 0.45s; }
html.anim .stepper.in-view > :nth-child(5) { transition-delay: 0.6s; }
html.anim .stepper.in-view > :nth-child(6) { transition-delay: 0.75s; }
html.anim .stepper.in-view > :nth-child(7) { transition-delay: 0.9s; }
/* Vertical rail on mobile instead of a horizontal scroll */
@media (max-width: 768px) {
  .stepper { flex-direction: column; align-items: flex-start; gap: var(--cs8); overflow: visible; }
  .stepper > :first-child { margin-left: 0; }
  .stepper > :last-child { margin-right: 0; }
  .stepper-dash { width: 3px; height: 22px; margin-left: 19px; }
  html.anim .stepper .stepper-dash { transform: scaleY(0); transform-origin: center top; }
  html.anim .stepper.in-view .stepper-dash { transform: scaleY(1); }
}

/* --- Utility classes lifted out of inline style attributes --- */
.hero-tagline { font-weight: 600; color: var(--color-green); }
.cta-row { margin-top: var(--cs16); display: flex; gap: var(--cs12); flex-wrap: wrap; align-items: center; }
.cta-row.center { display: inline-flex; justify-content: center; margin-top: 0; }
.checkrow {
  margin-top: var(--cs20);
  display: flex;
  column-gap: var(--cs24);
  row-gap: var(--cs8);
  flex-wrap: wrap;
  align-items: center;
  font-size: 0.875rem;
  color: var(--color-gray-400);
}
.checkrow-lead { font-weight: 600; color: white; }
.checkrow .tick { color: var(--color-green); font-weight: 700; }
.section-note { margin-top: var(--cs16); max-width: 760px; font-size: 0.875rem; line-height: 1.6; color: var(--color-gray-600); }
.text-link { color: var(--color-green); font-weight: 600; text-decoration: none; }
.text-link:hover { text-decoration: underline; }
.card-grid.wide { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }
.ui-button.small { font-size: 0.8125rem; padding: var(--cs6) var(--cs12); width: fit-content; }
.btn-row { display: flex; gap: var(--cs8); flex-wrap: wrap; }
.feature-split > .split-media { flex: 0 1 380px; }
.cta-device {
  width: min(300px, 70%);
  height: auto;
  display: block;
  margin: 0 auto var(--cs24);
  filter: drop-shadow(0 16px 28px rgba(0, 0, 0, 0.45));
}
.contact-box .ui-button.secondary { background: transparent; color: white; border-color: var(--color-gray-600); }
.contact-box .ui-button.secondary:hover { background: transparent; border-color: white; color: white; }
