/* =========================================================================
   Shared site chrome: header and footer.
   The only source of header and footer CSS for every page.
   Colour and font values mirror the tokens in /styles.css; keep them in step.
   ========================================================================= */

.topbar,
.footer-deep {
  --chrome-red: #C00000;
  --chrome-grey-900: #262626;
  --chrome-grey-700: #404040;
  --chrome-grey-500: #737373;
  --chrome-grey-300: #D4D4D4;
  --chrome-grey-200: #E5E5E5;
  --chrome-white: #FFFFFF;
  --chrome-page-max: 1200px;
  --chrome-font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto,
    "Helvetica Neue", Arial, sans-serif;
  --chrome-font-serif: "Instrument Serif", "Iowan Old Style", "Apple Garamond",
    "Palatino Linotype", Georgia, serif;
}

/* ---------- Header ---------- */

.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  background: var(--chrome-white);
  border-bottom: 1px solid var(--chrome-grey-200);
  height: var(--topbar-height, 72px);
  display: flex;
  align-items: center;
  font-family: var(--chrome-font-sans);
  line-height: 1.65;
}

.topbar-inner {
  max-width: var(--chrome-page-max);
  margin: 0 auto;
  padding: 0 32px;
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

.topbar-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  text-decoration: none;
  color: var(--chrome-grey-900);
}

.topbar-brand img {
  height: 20px;
  width: auto;
  display: block;
}

.topbar-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}

.topbar-link {
  font-size: 14px;
  font-weight: 500;
  color: var(--chrome-grey-700);
  text-decoration: none;
  transition: color 120ms ease;
}

.topbar-link:hover {
  color: var(--chrome-grey-900);
}

.topbar-cta {
  font-size: 14px;
  font-weight: 500;
  color: var(--chrome-red);
  text-decoration: none;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

@media (max-width: 900px) {
  .topbar-inner {
    padding: 0 20px;
  }
}

/* Small screens: Services and Demo stay; only Platform is dropped. */
@media (max-width: 640px) {
  .topbar-nav .topbar-link:not([href="/services"]) {
    display: none;
  }
}

/* ---------- Footer ---------- */

.footer-deep {
  background: var(--chrome-grey-900);
  color: var(--chrome-grey-300);
  padding: 64px 32px 40px;
  font-family: var(--chrome-font-sans);
  line-height: 1.65;
}

.footer-deep-inner {
  max-width: var(--chrome-page-max);
  margin: 0 auto;
}

.footer-deep-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 48px;
  margin-bottom: 48px;
  align-items: start;
}

.footer-brand-col img {
  height: 18px;
  width: auto;
  filter: brightness(0) invert(1);
  margin-bottom: 16px;
}

.footer-brand-col p {
  font-size: 13px;
  line-height: 1.55;
  margin: 0;
  color: var(--chrome-grey-500);
  max-width: 220px;
}

/* The five links are one grid block that reflows as the width narrows:
   three columns filled across in rows, then two columns filled top to
   bottom, then one column. */
.footer-links ul {
  list-style: none;
  padding: 0;
  margin: 0;
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  grid-auto-flow: row;
  column-gap: 48px;
}

.footer-links li {
  margin: 0 0 8px;
}

.footer-links a {
  font-size: 13.5px;
  color: var(--chrome-grey-300);
  text-decoration: none;
  line-height: 1.5;
  transition: color 120ms ease;
}

.footer-links a:hover {
  color: var(--chrome-white);
}

.footer-deep-signoff {
  border-top: 1px solid #3a3a3a;
  padding-top: 24px;
  font-family: var(--chrome-font-serif);
  font-style: italic;
  font-size: 13.5px;
  color: var(--chrome-grey-500);
  text-align: left;
}

@media (max-width: 900px) {
  .footer-deep-grid {
    gap: 24px;
  }
  .footer-links ul {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    grid-template-rows: repeat(3, auto);
    grid-auto-flow: column;
    column-gap: 24px;
  }
}

@media (max-width: 600px) {
  .footer-deep-grid {
    grid-template-columns: 1fr;
  }
  .footer-links ul {
    grid-template-columns: 1fr;
    grid-template-rows: none;
    grid-auto-flow: row;
  }
}
