/* Shared header and footer for completearray.com (React pages and the static
   pages under public/). Restyled to the Complete Array brand 2026-10-10:
   white header with the real logo, Complete Array blue buttons, and the old
   completearray.com footer (navy-to-blue gradient, rounded top corners).
   Brand notes: ~/Documents/Codex/complete-array-transition/complete-array-brand.md
   The class names keep their old kis- prefix so the static pages still match. */

html,
body {
  max-width: 100%;
  overflow-x: clip;
}

.kis-site-nav,
.kis-site-footer,
.kis-back-to-top {
  --ca-blue: #155eef;
  --ca-blue-dark: #1447e6;
  --ca-navy: #091e42;
  --ca-ink: #000321;
  --ca-grey: #565a7c;
  --ca-light: #f6f6ff;
  --ca-line: #e3e8f4;
}

.kis-site-nav,
.kis-site-footer {
  box-sizing: border-box;
  width: 100%;
  font-family: Poppins, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
}

.kis-site-nav *,
.kis-site-footer * {
  box-sizing: border-box;
}

.kis-site-nav a,
.kis-site-footer a {
  color: inherit;
  text-decoration: none;
  -webkit-tap-highlight-color: transparent;
}

.kis-site-nav a:focus-visible,
.kis-site-footer a:focus-visible {
  outline: 3px solid var(--ca-blue);
  outline-offset: 4px;
  border-radius: 4px;
}

.kis-site-footer a:focus-visible {
  outline-color: #ffffff;
}

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

.kis-site-nav {
  position: relative;
  z-index: 1000;
  height: 84px;
  padding: 0 clamp(24px, 5vw, 76px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  border-bottom: 1px solid var(--ca-line);
  color: var(--ca-navy);
  background: #ffffff;
}

.kis-site-nav--overlay {
  position: absolute;
  inset: 0 0 auto;
  background: rgba(255, 255, 255, 0.92);
}

.kis-site-brand-group {
  display: inline-flex;
  flex: 0 1 auto;
  align-items: center;
  min-width: 0;
}

.kis-site-brand {
  display: inline-flex;
  flex: 0 0 auto;
  align-items: center;
  gap: 7px;
}

.ca-logo {
  display: block;
  width: auto;
  height: 64px;
}

/* Static pages that still use the text word mark get it in Complete Array blue. */
.kis-site-brand-word {
  color: var(--ca-blue);
  font-size: 21px;
  font-weight: 700;
  line-height: 1;
  white-space: nowrap;
}

.kis-site-brand-clock {
  color: var(--ca-grey);
  font-size: 14px;
  letter-spacing: 0.1em;
}

.kis-site-nav-links {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: clamp(20px, 2.2vw, 34px);
  color: var(--ca-navy);
  font-size: clamp(14px, 1.05vw, 16px);
  font-weight: 500;
  white-space: nowrap;
}

.kis-site-nav-links > a:not(.kis-site-nav-cta) {
  transition: color 0.2s ease;
}

.kis-site-nav-links > a:not(.kis-site-nav-cta):hover {
  color: var(--ca-blue);
}

.kis-site-nav a.kis-site-nav-cta {
  padding: 11px 18px;
  border: 1px solid var(--ca-blue);
  border-radius: 5px;
  color: #ffffff;
  background: var(--ca-blue);
  font-weight: 600;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.kis-site-nav a.kis-site-nav-cta:hover {
  border-color: var(--ca-blue-dark);
  background: var(--ca-blue-dark);
}

/* ---------- Back to top ---------- */

.kis-back-to-top {
  position: fixed;
  /* Stacked just above the GHL chat button (right 20px, bottom 20px, about 60px
     tall), so the two never overlap (J, 2026-10-13). */
  right: 26px;
  bottom: 96px;
  z-index: 1200;
  width: 46px;
  min-height: 46px;
  padding: 0;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 0;
  border-radius: 999px;
  color: #ffffff;
  background: var(--ca-navy);
  box-shadow: 0 10px 28px rgba(9, 30, 66, 0.22);
  font: 600 14px/1 Poppins, ui-sans-serif, system-ui, Arial, sans-serif;
  cursor: pointer;
  opacity: 0;
  pointer-events: none;
  transform: translateY(12px);
  transition: opacity 0.24s ease, transform 0.24s ease, background 0.2s ease;
}

.kis-back-to-top span {
  display: inline-block;
  font-size: 19px;
  line-height: 1;
}

.kis-back-to-top.is-visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateY(0);
}

.kis-back-to-top:hover {
  background: var(--ca-blue);
}

.kis-back-to-top:focus-visible {
  outline: 3px solid var(--ca-blue);
  outline-offset: 4px;
}

/* ---------- Footer (old completearray.com style) ---------- */

footer.kis-site-footer {
  flex-wrap: wrap;
  margin: 0;
  padding: 56px clamp(24px, 7vw, 112px) 44px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 22px 34px;
  border-radius: 0;
  color: #ffffff;
  background: linear-gradient(90deg, #090f66 0%, #0a278d 50%, #083eb5 100%);
}

.kis-site-footer-brand {
  padding: 10px 16px;
  border-radius: 12px;
  background: #ffffff;
}

.kis-site-footer-brand .ca-logo {
  height: 46px;
}

.kis-site-footer p {
  margin: 0;
  color: rgba(255, 255, 255, 0.9);
  font-family: "Open Sans", ui-sans-serif, system-ui, Arial, sans-serif;
  font-size: 15px;
  font-weight: 400;
}

.kis-site-footer nav {
  display: flex;
  align-items: center;
  gap: 25px;
  font-size: 15px;
  font-weight: 500;
  white-space: nowrap;
}

.kis-site-footer nav a {
  display: inline-flex;
  min-height: 44px;
  align-items: center;
  color: #ffffff;
  transition: opacity 0.2s ease;
}

.kis-site-footer nav a:hover {
  opacity: 0.8;
}

.kis-site-footer nav a.kis-site-footer-cta {
  padding: 0 16px;
  border-radius: 5px;
  color: var(--ca-navy);
  background: #ffffff;
  font-weight: 600;
}

.kis-site-footer nav a.kis-site-footer-cta:hover {
  opacity: 1;
  background: var(--ca-light);
}

.kis-site-footer-contact a,
.kis-site-footer-maker a {
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ---------- Tablets and phones ---------- */

@media (max-width: 880px) {
  .kis-back-to-top {
    display: none;
  }

  .kis-site-nav {
    height: 68px;
    padding-inline: 20px;
  }

  .ca-logo {
    height: 46px;
  }

  .kis-site-nav-links {
    gap: 14px;
    font-size: 14px;
  }

  .kis-site-nav-wide {
    display: none;
  }

  .kis-site-nav a.kis-site-nav-cta {
    padding: 10px 12px;
    font-size: 14px;
  }

  footer.kis-site-footer {
    /* Extra room at the bottom so the chat button never sits on the contact line. */
    padding-block: 40px 96px;
    border-radius: 0;
    flex-direction: column;
    gap: 18px;
    text-align: center;
  }

  .kis-site-footer-contact {
    order: 3;
  }

  .kis-site-footer nav {
    justify-content: center;
    flex-wrap: wrap;
    gap: 6px 22px;
  }
}

@media (max-width: 520px) {
  .kis-site-nav {
    padding-inline: 16px;
    gap: 12px;
  }

  .ca-logo {
    height: 42px;
  }

  .kis-site-brand-clock {
    display: none;
  }

  .kis-site-brand-word {
    font-size: 17px;
  }
}

@media (max-width: 380px) {
  .kis-site-nav {
    padding-inline: 12px;
    gap: 10px;
  }

  .ca-logo {
    height: 38px;
  }

  .kis-site-nav-links {
    gap: 10px;
    font-size: 13.5px;
  }

  .kis-site-nav a.kis-site-nav-cta {
    padding-inline: 9px;
  }

  .kis-site-nav-cta span {
    display: none;
  }

  .kis-site-footer nav {
    gap: 4px 16px;
  }
}

@media (max-width: 340px) {
  .kis-site-nav {
    padding-inline: 10px;
    gap: 8px;
  }

  .ca-logo {
    height: 34px;
  }

  .kis-site-nav-links {
    gap: 8px;
  }
}

/* Sticky header on content pages (2026-10-02). Phones: hides on scroll
   down, returns on scroll up (public/site-shell.js toggles .is-hidden). */
.kis-site-nav--sticky {
  position: sticky;
  top: 0;
  transition: transform 0.25s ease;
}

html:has(.kis-site-nav--sticky) {
  scroll-padding-top: 94px;
}

@media (max-width: 880px) {
  .kis-site-nav--sticky.is-hidden {
    transform: translateY(-100%);
  }
  html:has(.kis-site-nav--sticky) {
    scroll-padding-top: 76px;
  }
}

@media (prefers-reduced-motion: reduce) {
  .kis-site-nav--sticky { transition: none; }
}

/* ---------- Page frame: footer sits at the bottom on short pages (2026-10-13) ---------- */

.ca-page {
  display: flex;
  flex-direction: column;
}

.ca-page > * {
  width: 100%;
  flex-shrink: 0;
}

.ca-page > footer.kis-site-footer {
  margin-top: auto;
}

/* ---------- Phone menu (2026-10-13) ---------- */

.kis-site-nav-menu {
  display: none;
  min-height: 40px;
  padding: 0 12px;
  border: 1px solid var(--ca-line);
  border-radius: 5px;
  color: var(--ca-navy);
  background: #ffffff;
  font: 600 14px/1 Poppins, ui-sans-serif, system-ui, Arial, sans-serif;
  cursor: pointer;
}

.kis-site-menu {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  display: flex;
  flex-direction: column;
  padding: 8px 20px 16px;
  border-bottom: 1px solid var(--ca-line);
  background: #ffffff;
  box-shadow: 0 16px 30px rgba(9, 30, 66, 0.12);
}

.kis-site-menu a {
  padding: 14px 4px;
  border-bottom: 1px solid var(--ca-line);
  color: var(--ca-navy);
  font: 600 17px/1.2 Poppins, ui-sans-serif, system-ui, Arial, sans-serif;
}

.kis-site-menu a:last-child {
  border-bottom: 0;
}

@media (max-width: 880px) {
  .kis-site-nav-menu {
    display: inline-flex;
    align-items: center;
  }
  .kis-site-nav.is-menu-open {
    transform: none !important;
  }
}

@media (min-width: 881px) {
  .kis-site-menu {
    display: none;
  }
}
