/* ==========================================================================
   Site footer — Roadnote demo pages (demo/*.html)
   Footer + mobile sticky CTA bar + "DELTA Kit" back-link pill.
   Markup: partials/site-footer.html      Behaviour: js/components/site-footer.js
   ========================================================================== */

.site-footer {
  border-top: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
}

.site-footer__main {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 170px), 1fr));
  gap: 28px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 56px var(--gutter) 28px;
}

/* Brand + newsletter column */
.site-footer__brand {
  display: flex;
  flex-direction: column;
  gap: 12px;
  grid-column: span 2;
  min-width: 0;
}

.site-footer__name {
  font-family: var(--font-display);
  font-size: 22px;
  font-weight: 700;
  letter-spacing: -.02em;
}

.site-footer__pitch {
  max-width: 36ch;
  color: var(--ink-2);
  font-size: 15px;
}

.newsletter {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  max-width: 420px;
}

.newsletter__input {
  flex: 1;
  min-width: 180px;
  min-height: 44px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: 10px;
  background: var(--canvas);
}

.newsletter__submit {
  min-height: 44px;
  padding: 0 16px;
  border: 1px solid var(--ink);
  border-radius: 10px;
  background: var(--ink);
  color: var(--canvas);
  font-weight: 600;
}

.newsletter__note {
  font-size: 12px;
  color: var(--ink-3);
}

/* Link columns */
.site-footer__col {
  display: flex;
  flex-direction: column;
  gap: 9px;
  font-size: 14px;
}

/* Legal row */
.site-footer__legal {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  align-items: center;
  gap: 18px;
  max-width: var(--container);
  margin: 0 auto;
  padding: 18px var(--gutter) 28px;
  border-top: 1px solid var(--line);
  color: var(--ink-3);
  font-size: 13px;
}

.site-footer__status {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink-2);
  text-decoration: none;
}

.site-footer__legal-links {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
}

.site-footer__legal-links a {
  color: var(--ink-3);
}

/* Sticky mobile CTA bar ---------------------------------------------------
   Shown by site-footer.js on screens < 760px after 400px of scroll.       */
.sticky-cta {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 55;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 16px calc(10px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--line);
  background: color-mix(in oklab, var(--surface) 94%, transparent);
  backdrop-filter: blur(12px);
}

.sticky-cta__note {
  flex: 1;
  min-width: 0;
  color: var(--ink-2);
  font-size: 13px;
}

.sticky-cta__demo,
.sticky-cta__primary {
  display: flex;
  align-items: center;
  min-height: 44px;
  border-radius: 999px;
  font-size: 14px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}

.sticky-cta__demo {
  padding: 0 14px;
  border: 1px solid var(--line-2);
}

.sticky-cta__primary {
  padding: 0 18px;
  background: var(--action);
  color: var(--on-action);
}

.sticky-cta__primary:hover {
  color: var(--on-action);
}

.sticky-cta__dismiss {
  width: 44px;
  height: 44px;
  border: 0;
  background: none;
  color: var(--ink-3);
  font-size: 16px;
}

/* "DELTA Kit · …" back-link pill ---------------------------------------- */
.kit-pill {
  position: fixed;
  left: 16px;
  bottom: 16px;
  z-index: 60;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 14px 8px 10px;
  border-radius: 999px;
  background: var(--inverse);
  color: var(--on-inverse);
  font-family: var(--font-mono);
  font-size: 12px;
  text-decoration: none;
  box-shadow: 0 8px 24px -8px rgba(0, 0, 0, .4);
}

.kit-pill:hover {
  color: var(--on-inverse);
}

.kit-pill__icon {
  color: var(--action);
  font-size: 14px;
}

/* Lift the pill above the sticky bar while the bar is visible */
.has-sticky-cta .kit-pill {
  bottom: 84px;
}
