/* The site's frame since the new home: the warm ground, the top bar, the two
   drawers (Our services, See it live) and the light footer. Every page with
   body.nh uses it; the top bar and the drawers are rendered by block N in
   main.js from <header data-topbar>. */

body.nh {
  --nh-bg: #F1EFEA;
  --nh-ink: #141414;
  --nh-muted: #6B6762;
  --nh-rule: #D9D4CC;
  --nh-rule-soft: #E7E2DA;
  --nh-top: 68px;
  --nh-foot: 60px;
  background: var(--nh-bg);
  color: var(--nh-ink);
  font-family: var(--serif);
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}
body.nh .loader { background: var(--nh-bg); }

/* ---------- N1. top bar ---------- */
.nh-top {
  position: relative;
  z-index: 30;
  height: var(--nh-top);
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); /* the wordmark stays centred whatever the sides hold */
  align-items: center;
  padding: 0 28px;
  border-bottom: 1px solid var(--nh-rule-soft);
}
.nh-top__side { display: flex; align-items: center; gap: 8px; }
.nh-top__side--end { justify-content: flex-end; }
.nh-top__mark { font-family: var(--serif); font-weight: 500; font-size: 26px; line-height: 1; color: var(--nh-ink); }
/* The tally of tasks a visitor marked done in the hero: beside the wordmark,
   which stays centred; appears on the first click and bumps on each one. */
.nh-top__mid { position: relative; display: flex; align-items: center; }
.nh-tally {
  position: absolute; left: calc(100% + 12px); top: 50%;
  display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 10px 0 6px;
  border: 1px solid var(--nh-rule); border-radius: 999px; background: rgba(255,255,255,.55);
  font: 400 12px/1 var(--sans); color: var(--nh-muted); white-space: nowrap;
  opacity: 0; transform: translate(-6px, -50%) scale(.9); transform-origin: left center;
  transition: opacity 260ms ease, transform 360ms cubic-bezier(.2,.8,.2,1);
}
.nh-tally.is-on { opacity: 1; transform: translate(0, -50%); }
/* number and label share one size and one line box, so they sit on the same line */
.nh-tally b, .nh-tally .nh-tally__label { display: inline-block; font-size: 12px; line-height: 12px; }
.nh-tally b { font-weight: 600; color: var(--nh-ink); font-variant-numeric: tabular-nums; margin-right: -1px; }
.nh-tally svg { display: block; flex: none; }
.nh-tally.is-bump b { animation: nh-bump 420ms cubic-bezier(.2,.8,.2,1); }
@keyframes nh-bump { 0% { transform: scale(1); } 35% { transform: scale(1.4); color: #3C8A2E; } 100% { transform: scale(1); } }

.nh-pill {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 16px;
  border: 1px solid var(--nh-ink);
  border-radius: 999px;
  background: transparent;
  color: var(--nh-ink);
  font: 500 13.5px/1 var(--sans);
  white-space: nowrap;
  cursor: pointer;
  transition: background 200ms, color 200ms;
}
.nh-pill:hover, .nh-pill[aria-expanded="true"] { background: var(--nh-ink); color: var(--nh-bg); }
.nh-pill--solid { background: var(--nh-ink); color: var(--nh-bg); }
.nh-pill--solid:hover { background: #2a2a28; }

/* ---------- N3, N4. drawers ---------- */
.nh-scrim { position: fixed; inset: 0; z-index: 40; background: rgba(20,20,20,.28); opacity: 0; transition: opacity 300ms; }
.nh-scrim.is-on { opacity: 1; }
.nh-drawer {
  position: fixed; z-index: 41; top: 0; bottom: 0; width: min(400px, 100%);
  display: flex; flex-direction: column; overflow: hidden;
  padding: 24px 28px 28px; background: var(--nh-bg);
  transition: transform 450ms cubic-bezier(.2,.7,.2,1);
}
.nh-drawer--left { left: 0; border-right: 1px solid var(--nh-rule); transform: translateX(-100%); }
.nh-drawer--right { right: 0; border-left: 1px solid var(--nh-rule); transform: translateX(100%); }
.nh-drawer.is-on { transform: none; }
.nh-drawer__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 18px; }
.nh-drawer__head h2 { margin: 0; font: 400 13.5px/1 var(--sans); color: var(--nh-ink); }
.nh-drawer__head button { all: unset; cursor: pointer; color: var(--nh-ink); width: 24px; height: 24px; display: grid; place-items: center; margin-right: -7px; }
.nh-drawer__head button:focus-visible { outline: 1px solid var(--nh-ink); outline-offset: 2px; border-radius: 4px; }
.nh-drawer__cta { align-self: flex-start; flex: none; margin-top: 16px; font-weight: 400; }

.nh-services {
  list-style: none; margin: 0 -8px 0 0; padding: 0 8px 24px 0; flex: 1; min-height: 0;
  overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin;
  -webkit-mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
  mask-image: linear-gradient(#000 calc(100% - 36px), transparent);
}
.nh-services li { display: grid; grid-template-columns: 28px 1fr; align-items: baseline; padding: 6px 0; font: 400 15px/1.4 var(--serif); opacity: 0; transform: translateY(6px); transition: opacity 450ms ease, transform 450ms cubic-bezier(.2,.7,.2,1); }
.nh-drawer.is-on .nh-services li { opacity: 1; transform: none; }
.nh-services__n { font: 400 11px/1 var(--sans); color: var(--nh-muted); font-variant-numeric: tabular-nums; }
.nh-services__link { color: inherit; text-decoration: underline; text-decoration-color: var(--nh-rule); text-underline-offset: 3px; }
.nh-services__link:hover { text-decoration-color: var(--nh-ink); }

.nh-live__sub { margin: 0 0 18px; font-size: 18px; line-height: 1.4; }
.nh-live__form.login__card { width: 100%; max-width: none; margin: 0; padding: 0; border: 0; box-shadow: none; background: transparent; }
/* Fixed sizes, not the login card's viewport-scaled ones: 16px text is what
   stops an iPhone zooming in when a field is tapped. */
.nh-live__form .login__field input { height: 44px; padding: 0 14px; border-radius: 10px; font-size: 16px; }
.nh-live__form .login__btn { min-height: 44px; border-radius: 10px; font-size: 15px; }
.nh-live__form .login__legal { font-size: 13px; }
.nh-live__form { gap: 12px; }
/* Focus shows as a darker border, not the login page's blue ring. */
.nh-live__form .login__field input:focus, .nh-live__form .login__field input:focus-visible { outline: none; border-color: var(--nh-ink); }
/* A form that collects a name and an email shows where the privacy policy is. */
.nh-live__form.login__card[data-mode="request"] .login__legal { display: block; text-align: left; margin-top: 4px; }

/* ---------- About: a popover over its link ---------- */
/* Placed by block N (left, bottom, --tip). It grows out of the point over
   the link: a short rise and scale from that corner, the reverse on close. */
.nh-modal {
  position: fixed; z-index: 41; left: 16px; bottom: 72px;
  width: min(380px, calc(100% - 32px)); max-height: calc(100svh - 120px); overflow: visible;
  padding: 20px 22px 20px; background: var(--nh-bg); border: 1px solid var(--nh-rule); border-radius: 16px;
  box-shadow: 0 24px 60px -24px rgba(20,20,20,.35), 0 2px 6px rgba(20,20,20,.06);
  transform-origin: var(--tip, 32px) calc(100% + 10px);
  opacity: 0; transform: translateY(8px) scale(.94); pointer-events: none;
  transition: opacity 220ms ease, transform 380ms cubic-bezier(.2,.8,.2,1);
}
.nh-modal::after {
  content: ""; position: absolute; left: calc(var(--tip, 32px) - 7px); bottom: -7px; width: 12px; height: 12px;
  background: var(--nh-bg); border-right: 1px solid var(--nh-rule); border-bottom: 1px solid var(--nh-rule);
  transform: rotate(45deg); border-bottom-right-radius: 3px;
}
.nh-modal.is-on { opacity: 1; transform: none; pointer-events: auto; }
.nh-modal__head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.nh-modal__head h2 { margin: 0; font: 400 13.5px/1 var(--sans); color: var(--nh-ink); }
.nh-modal__head button { all: unset; cursor: pointer; width: 24px; height: 24px; display: grid; place-items: center; margin-right: -7px; color: var(--nh-ink); }
.nh-modal__head button:focus-visible { outline: 1px solid var(--nh-ink); outline-offset: 2px; border-radius: 4px; }
.nh-modal__text { margin: 0; font: 400 17px/1.45 var(--serif); color: var(--nh-ink); }
/* Security: four short commitments, each behind a green tick. */
.nh-sec { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 11px; }
.nh-sec li { display: grid; grid-template-columns: 14px 1fr; gap: 10px; align-items: start; font: 400 17px/1.35 var(--serif); color: var(--nh-ink); }
.nh-sec li svg { margin-top: 3px; }
/* The sign-off: photo, name, LinkedIn. */
.nh-sign { display: flex; align-items: center; gap: 10px; margin: 20px 0 0; }
.nh-sign__photo { width: 36px; height: 36px; border-radius: 50%; object-fit: cover; flex: none; }
.nh-sign__who { display: flex; flex-direction: column; gap: 3px; }
.nh-sign__name { font: 500 16px/1 var(--serif); color: var(--nh-ink); }
.nh-sign__role { font: 400 12px/1.2 var(--sans); color: var(--nh-muted); }
.nh-sign__row { display: flex; align-items: center; gap: 7px; }
.nh-sign__li svg { width: 11px; height: 11px; }
.nh-sign__li { display: inline-flex; color: var(--nh-muted); transition: color 150ms; }
.nh-sign__li:hover { color: var(--nh-ink); }

/* ---------- Cookies: the consent bar as a popover over its link ---------- */
/* Placed by block 10 (left, bottom, --tip); same card, point and motion as
   About. Accept and Decline stay side by side and the same size. */
.consent.consent--pop {
  right: auto; width: min(340px, calc(100% - 32px)); max-width: none;
  flex-direction: column; align-items: stretch; gap: 14px;
  padding: 18px 20px 18px; border: 1px solid var(--nh-rule); border-radius: 16px;
  background: var(--nh-bg); box-shadow: 0 24px 60px -24px rgba(20,20,20,.35), 0 2px 6px rgba(20,20,20,.06);
  font: 400 16px/1.45 var(--serif); color: var(--nh-ink);
  transform-origin: var(--tip, 32px) calc(100% + 10px);
  opacity: 0; transform: translateY(8px) scale(.94);
  transition: opacity 220ms ease, transform 380ms cubic-bezier(.2,.8,.2,1);
}
.consent.consent--pop.is-on { opacity: 1; transform: none; }
.consent.consent--pop.consent--float { left: 20px; bottom: 20px; transform-origin: left bottom; }
.consent.consent--pop.consent--float::after { display: none; }
.consent.consent--pop::after {
  content: ""; position: absolute; left: calc(var(--tip, 32px) - 7px); bottom: -7px; width: 12px; height: 12px;
  background: var(--nh-bg); border-right: 1px solid var(--nh-rule); border-bottom: 1px solid var(--nh-rule);
  transform: rotate(45deg); border-bottom-right-radius: 3px;
}
.consent.consent--pop .consent__actions { justify-content: flex-start; }
.consent.consent--pop .consent__btn { height: 34px; padding: 0 16px; border-radius: 999px; font: 500 13.5px/1 var(--sans); }
.consent.consent--pop .consent__btn--ghost { border-color: var(--nh-ink); }
.consent.consent--pop .consent__btn--ghost:hover { background: var(--nh-ink); color: var(--nh-bg); }
@media (prefers-reduced-motion: reduce) { .consent.consent--pop { transition: none; } }

/* ---------- 9. footer, home variant ---------- */
.footer--home { background: transparent; color: var(--nh-muted); font-family: var(--serif); border-top: 1px solid var(--nh-rule); }
.footer--home .footer__inner { max-width: none; margin: 0; min-height: var(--nh-foot); padding: 12px 28px; display: flex; align-items: center; justify-content: space-between; flex-wrap: nowrap; gap: 10px 24px; font-size: 13px; }
.footer--home .footer__links { display: flex; align-items: center; flex-wrap: wrap; gap: 6px 16px; min-width: 0; }
.footer--home .footer__links a { white-space: nowrap; }
.footer--home a { color: var(--nh-muted); border: 0; padding: 0; }
.footer--home a:hover { color: var(--nh-ink); }
.footer--home a[aria-current="page"] { color: var(--nh-ink); font-weight: 500; }
/* LinkedIn: the bare "in" mark, no box, in the links' grey, sitting on their baseline. */
/* A link that leaves the site (the DPA lives in the app) carries a small arrow. */
.footer--home .footer__ext { display: inline-flex; align-items: center; gap: 3px; }
.footer--home .footer__end { display: flex; align-items: center; gap: 14px; margin-left: auto; }
/* How often we ship: a small pulsing green dot and one line. */
.footer--home .footer__ship { margin: 0; display: inline-flex; align-items: center; gap: 8px; font: 400 12px/1.2 var(--sans); color: var(--nh-muted); white-space: nowrap; min-width: 0; }
.footer--home .footer__ship i { position: relative; width: 6px; height: 6px; border-radius: 50%; background: #5FAF4E; flex: none; }
.footer--home .footer__ship i::after { content: ""; position: absolute; inset: 0; border-radius: 50%; background: #5FAF4E; animation: nh-live 2s ease-out infinite; }
.footer--home .footer__ship span { white-space: nowrap; }
@media (max-width: 900px) { .footer--home .footer__end { display: none; } }
@media (prefers-reduced-motion: reduce) { .footer--home .footer__ship i::after { animation: none; } }

/* Up to 900px the tally is just the tick and the number, so it never runs
   into See it live or Log in (the label rule above is more specific, hence
   .nh-tally here too). */
@media (max-width: 900px) {
  .nh-tally { left: calc(100% + 5px); height: 20px; gap: 4px; padding: 0 6px 0 4px; }
  .nh-tally .nh-tally__label { display: none; }
  .nh-tally svg { width: 9px; height: 9px; }
}
/* Under 360px there is no room beside the wordmark: the tally hangs just
   under it, centred, inside the bar. */
@media (max-width: 360px) {
  .nh-tally { left: 50%; top: calc(100% + 2px); height: 18px; transform: translate(-50%, -4px) scale(.9); transform-origin: center top; }
  .nh-tally.is-on { transform: translate(-50%, 0); }
  .nh-top { padding: 0 12px; }
  .nh-top__mark { font-size: 20px; }
  .nh-top .nh-pill { padding-left: 10px; padding-right: 10px; font-size: 12.5px; }
}

/* ---------- small screens ---------- */
@media (max-width: 640px) {
  .nh-top { padding: 0 16px; }
  .nh-pill--live { display: none; }
  .nh-top__mark { font-size: 22px; }
  .footer--home .footer__inner { padding: 14px 16px; }
  /* the links stay on one line on a phone: smaller, tighter, spread to the width */
  .footer--home .footer__links { flex: 1; min-width: 0; max-width: 100%; flex-wrap: nowrap; justify-content: space-between; gap: 0 8px; font-size: 11.5px; overflow-x: auto; scrollbar-width: none; }
  .footer--home .footer__links::-webkit-scrollbar { display: none; }
  .footer--home .footer__ext svg { width: 7px; height: 7px; }
}

@media (prefers-reduced-motion: reduce) {
  .nh-drawer, .nh-scrim, .nh-services li, .nh-modal { transition: none; }
}

@keyframes nh-live { 0% { transform: scale(1); opacity: .6; } 100% { transform: scale(3.2); opacity: 0; } }
