/* ============================================================================
   Shared site chrome — marquee strip + footer. Single source of truth
   (paired with chrome.js, which injects the markup and the cursor behavior).
   Loaded by index.html, articles.html, and every generated post page.
   ============================================================================ */

/* ---------- Marquee strip ---------- */
.marquee-strip {
  overflow: hidden;
  /* Section padding reduced by 32px each side to make room for the inner
     .marquee-hover zone (total visual padding above/below text stays 80/120). */
  padding: 48px 0 88px;
  background: var(--bg);
  /* Rounded bottom corners — the lime footer underneath is revealed through
     these cut-off corners, like a "scroll-up reveal". */
  border-radius: 0 0 72px 72px;
  position: relative;
  z-index: 2;
}
/* Smaller hot zone: only ~32px above + below the text triggers the custom
   cursor. Outside it the default cursor returns. */
.marquee-hover {
  padding: 32px 0;
  cursor: none;
}
/* Custom "Book a demo" cursor follow — only inside the marquee strip. */
.marquee-cursor {
  position: fixed;
  top: 0;
  left: 0;
  pointer-events: none;
  z-index: 9999;
  opacity: 0;
  transform: translate(-9999px, -9999px);
  transition: opacity 0.15s ease;
  will-change: transform;
}
.marquee-cursor.visible { opacity: 1; }
.marquee-cursor .cursor-arrow { display: block; }
/* Identical to the primary-nav .btn.btn-primary. */
.marquee-cursor .cursor-tag {
  position: absolute;
  top: 40px;                 /* sits just below the 44px-tall arrow */
  left: 28px;                /* right of the arrow's tip */
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 42px;
  padding: 0 20px;
  background: var(--accent);
  color: var(--ink);
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 14.5px;
  line-height: 1;
  border-radius: 12px;
  white-space: nowrap;
  box-shadow: 0 6px 18px rgba(0,0,0,0.10);
}
.marquee-track {
  display: inline-flex;
  align-items: center;
  gap: clamp(40px, 4.5vw, 96px);
  white-space: nowrap;
  font-family: var(--font-body);
  font-weight: 300;            /* Roobert Light */
  font-size: clamp(72px, 14vw, 260px);
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--ink);
  animation: marquee 28s linear infinite;
}
.marquee-track .dot {
  flex-shrink: 0;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: #707070;
}
@keyframes marquee {
  from { transform: translateX(0); }
  to   { transform: translateX(-50%); }
}

/* ---------- Footer ---------- */
.site-footer {
  /* The lime peeks through the marquee's rounded bottom corners as it scrolls up. */
  background: var(--accent);
  color: var(--ink);
  padding: 96px 60px 40px;
  margin-top: -72px;
  position: relative;
  z-index: 1;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr;
  gap: 48px;
  max-width: 1280px;
  margin: 0 auto;
  padding-top: 40px;
}
.footer-logo img { height: 32px; width: auto; display: block; }
.footer-col h4 {
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: rgba(8, 8, 8, 0.55);
  margin: 0 0 24px;
}
.footer-col a {
  display: block;
  font-family: var(--font-body);
  font-weight: 400;
  font-size: 16px;
  color: var(--ink);
  text-decoration: none;
  margin-bottom: 12px;
  transition: opacity 0.18s ease;
}
.footer-col a:hover { opacity: 0.6; }
.footer-bottom {
  max-width: 1280px;
  margin: 96px auto 0;
  padding-top: 16px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}
.footer-copyright { font-family: var(--font-body); font-size: 14px; color: var(--ink); }
.footer-social { display: flex; gap: 18px; align-items: center; }
.footer-social a { color: var(--ink); display: inline-flex; transition: opacity 0.18s ease; }
.footer-social a:hover { opacity: 0.65; }
.footer-social svg { width: 22px; height: 22px; display: block; }

@media (max-width: 880px) {
  .site-footer { padding: 64px 24px 32px; }
  .footer-grid { grid-template-columns: 1fr 1fr; gap: 32px; }
  .footer-bottom { flex-direction: column; gap: 16px; align-items: flex-start; }
}

/* Mobile footer: drop the logo (the revealed top nav shows it at the bottom —
   see nav.js .nav-at-bottom), leaving a clean 2×2 of columns
   (Product / Use Cases · Resources / Company). Social row sits below the
   columns, copyright below that. */
@media (max-width: 700px) {
  .footer-logo { display: none; }
  /* Fill the screen with the green footer: tall enough to clear a full viewport
     PLUS the 72px the "Book a demo" curve overlaps, so you scroll completely
     past the curve into solid green (the curve still exists above). */
  .site-footer {
    min-height: calc(100vh + 72px);
    display: flex;
    flex-direction: column;
    /* 20px sides so the columns line up with the nav logo's left edge. */
    padding: 128px 20px 32px;   /* top clears the revealed nav logo (footer overlaps the marquee by 72px) */
  }
  /* As flex items, the grid + bottom bar would center at content width via their
     desktop `margin: 0 auto`; drop the auto side margins so they fill and
     left-align to the logo. */
  .footer-grid { margin: 0; }
  /* Pin social + copyright to the bottom of the footer (= bottom of the screen
     once scrolled down), regardless of viewport height. */
  .footer-bottom {
    flex-direction: column-reverse;   /* markup is copyright→social; reverse puts social on top */
    align-items: flex-start;
    gap: 24px;
    margin: auto 0 0;   /* margin-top:auto pins to bottom; sides 0 to left-align */
  }
}
