/* ============================================================
   NR THEME — CURTAIN-REVEAL FOOTER
   Dark colour role (.nr-section--dark) comes from nr-type.css.
   The .nr-avail dot + nr-avail-pulse keyframes are defined sitewide in
   nr-header.css and reused here (no need to re-port).

   Curtain: the footer is position:fixed behind the page (z-index 0); the
   scrolling content (.nr-content, opened in header.php) sits above it with a
   paper background and a JS-set bottom margin = footer height, so the footer is
   revealed as the content scrolls up off it. I made ONLY the footer the fixed
   curtain — the CTA band scrolls as the final content block above it (both are
   dark, so the reveal reads as one continuous dark region). This keeps the
   curtain ≤ viewport height so its top is never cut off, and the CTA headline
   can never be clipped by the fixed layer.
   ============================================================ */

/* ------------------------------------------------------------
   CURTAIN MECHANICS
   ------------------------------------------------------------ */
.nr-content {
  position: relative;
  z-index: 1;                       /* above the fixed footer (z-index 0) */
  background: var(--colour-paper);  /* opaque: hides the curtain until revealed */
  min-height: 100svh;               /* short pages still cover the curtain + stay scrollable */
  /* margin-bottom (= footer height, the reveal gap) is set by nr-footer.js */
}

.nr-site-footer[data-footer] {
  position: fixed;
  bottom: 0;
  left: 0;
  width: 100%;
  z-index: 0;
}

/* Static fallback — no reveal when reduced motion is requested. Footer just
   sits at the end. */
@media (prefers-reduced-motion: reduce) {
  .nr-content { margin-bottom: 0 !important; }
  .nr-site-footer[data-footer] { position: static; }
}

/* ------------------------------------------------------------
   FOOTER PROPER
   ------------------------------------------------------------ */
/* Compact — natural content height (columns + bottom bar), like the live. */

.nr-site-footer__inner {
  /* border-box here (padding sits inside, so it can't overflow on mobile), so
     add the gutters to the cap → the INNER content lands at --content-max and
     lines up exactly with the page content (.nr-work / .nr-case), which is
     content-box (gutters outside its 1240). */
  max-width: calc(var(--content-max, 1240px) + 2 * var(--gutter, clamp(20px, 4vw, 64px)));
  width: 100%;
  box-sizing: border-box;   /* keep padding inside 100% so it can't overflow the
                               viewport on mobile (the overflow was de-centering
                               the fixed preloader) */
  margin: 0 auto;
  padding: clamp(3rem, 7vh, 5rem) var(--gutter, clamp(20px, 4vw, 64px)) clamp(2rem, 4vh, 3rem);
  display: grid;
  grid-template-columns: 1.6fr 1fr 1fr;   /* identity | index | connect */
  gap: clamp(2rem, 5vw, 4rem);
}
.nr-site-footer__col { min-width: 0; }

/* Column A — identity */
.nr-site-footer .nr-site-footer__wordmark {   /* specificity beats .nr-section--dark p */
  font-family: var(--font-display, 'Fraunces', Georgia, serif);
  font-size: clamp(2.5rem, 4vw, 3rem);
  font-weight: 300;
  font-variation-settings: "opsz" 72, "wght" 300;
  letter-spacing: -0.01em;
  line-height: 1;
  color: var(--colour-paper);
  margin: 0 0 1rem;
}
.nr-site-footer__identity .nr-body { margin: 0 0 1.25rem; }

.nr-site-footer .nr-avail {           /* scoped: must not override .nr-avail--header */
  position: relative;
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-family: var(--font-body, 'DM Sans', system-ui, sans-serif);
  font-size: var(--text-sm, 0.833rem);
  color: var(--colour-paper);        /* bright on dark, like the live; dot is currentColor */
}
.nr-site-footer__loc { margin: 1.25rem 0 0; }

/* Columns B & C — index / connect */
.nr-site-footer__heading { margin: 0 0 1.25rem; }
.nr-footer-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.nr-footer-list li { margin: 0 0 0.65rem; }
.nr-footer-list a { font-size: var(--text-sm, 0.833rem); }  /* .nr-link → paper + growing underline */

/* Bottom bar */
.nr-site-footer__bottom {
  /* border-box here (padding sits inside, so it can't overflow on mobile), so
     add the gutters to the cap → the INNER content lands at --content-max and
     lines up exactly with the page content (.nr-work / .nr-case), which is
     content-box (gutters outside its 1240). */
  max-width: calc(var(--content-max, 1240px) + 2 * var(--gutter, clamp(20px, 4vw, 64px)));
  width: 100%;
  box-sizing: border-box;
  margin: 0 auto;
  padding: 1.25rem var(--gutter, clamp(20px, 4vw, 64px));
  border-top: 0.5px solid var(--colour-rule-dark, #1c1b18);
  display: flex;
  align-items: center;
  justify-content: space-between;
}
.nr-site-footer__bottom .nr-body-sm { margin: 0; }
.nr-site-footer__top {
  color: var(--colour-mid-on-dark);
  text-decoration: none;
  font-size: 1rem;
  line-height: 1;
  transition: color 0.3s ease;
}
.nr-site-footer__top:hover,
.nr-site-footer__top:focus-visible { color: var(--colour-paper); }

/* ------------------------------------------------------------
   Mobile — stack the columns
   ------------------------------------------------------------ */
@media (max-width: 767px) {
  /* Identity spans the full width; Index + Connect share a 2-col row beneath it. */
  .nr-site-footer__inner {
    grid-template-columns: 1fr 1fr;
    gap: 2.5rem clamp(1.5rem, 6vw, 2.5rem);
  }
  .nr-site-footer__identity { grid-column: 1 / -1; }
}