/* ============================================
   NAV V2 — sans-serif links, highlighter active state,
   logo slot. Loaded last on every v2 page.
   ============================================ */

.nav-logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: -0.02em;
  text-transform: none;
  color: #2B2B2B;
}

/* Placeholder until the real logo arrives — swap the text for an <img>. */
.nav-logo-mark {
  flex-shrink: 0;
  width: 34px;
  height: 34px;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 2px dashed #2B2B2B;
  border-radius: 50%;
  overflow: hidden;
  font-family: var(--font-mono);
  font-size: 8px;
  font-weight: 700;
  letter-spacing: 0.04em;
  color: var(--ink-muted);
}

.nav-logo-mark img {
  width: 100%;
  height: 100%;
  object-fit: contain;
}

.nav-links { gap: 28px; }

.nav-link,
.nav-link.active {
  padding: 2px 2px;
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 500;
  letter-spacing: 0;
  text-transform: none;
  border: none;
  border-radius: 0;
  box-shadow: none;
  background: linear-gradient(var(--label-yellow), var(--label-yellow)) no-repeat 0 88% / 0 8px;
  transition: background-size 0.25s var(--ease), color var(--transition);
}

.nav-link { color: var(--ink-light); }

.nav-link:hover,
.nav-link.active {
  color: #2B2B2B;
  background-size: 100% 8px;
}

.nav-contact {
  font-family: var(--font-body);
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0;
  text-transform: none;
  padding: 7px 18px;
}

@media (max-width: 768px) {
  .nav-link,
  .nav-link.active { font-size: 22px; }
  .nav-contact { font-size: 18px; }
}

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

/* Real logo in the nav (replaces the dashed placeholder) */
.nav-logo-mark--img {
  border: none;
  border-radius: 0;
  width: 34px;
  height: 34px;
}
.nav-logo-mark--img img { width: 100%; height: 100%; object-fit: contain; }

/* Wordmark: name only, Archivo Black (self-hosted, SIL OFL), all caps. The M logo stays as the favicon. */
@font-face {
  font-family: 'Archivo Black';
  src: url('../fonts/archivo-black-latin.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
.nav-logo-mark { display: none; }
.nav-logo-name {
  font-family: 'Archivo Black', var(--font-body), sans-serif;
  font-size: 18px;
  font-weight: 400;
  letter-spacing: 0.03em;
  text-transform: uppercase;
  color: #2B2B2B;
}

/* ---------- Floating pill nav ----------
   The bar floats 16px below the top edge as a white pill with the site's
   border and hard shadow. --nav-height grows so page content clears it. */
:root { --nav-height: 88px; }

.nav {
  top: 16px;
  left: 0;
  right: 0;
  width: auto;
  height: 64px;
  background: transparent;
  border-bottom: none;
  pointer-events: none;
}
.nav-inner {
  pointer-events: auto;
  max-width: min(var(--max-width), calc(100% - 2 * var(--container-padding)));
  height: 64px;
  padding: 0 10px 0 26px;
  background: #fff;
  border: var(--border-width) solid #2B2B2B;
  border-radius: 999px;
  box-shadow: 4px 4px 0 #2B2B2B;
}
.nav-contact {
  height: 44px;
  padding: 0 20px;
  border-radius: 999px;
  box-shadow: 3px 3px 0 #2B2B2B;
}
.nav-contact:hover { box-shadow: 4px 4px 0 #2B2B2B; }

@media (max-width: 768px) {
  .nav { top: 12px; height: 56px; }
  .nav-inner {
    max-width: calc(100% - 24px);
    height: 56px;
    padding: 0 8px 0 20px;
  }
  .nav-links {
    top: 0;
    height: 100vh;
    padding-top: var(--nav-height);
    border-radius: 0;
    z-index: -1;
  }
  .nav-contact { height: 44px; }
}

/* Auto-hide on scroll down, show on scroll up (js/main.js) */
.nav { transition: transform 0.3s ease; }
.nav.nav--hidden { transform: translateY(calc(-100% - 24px)); }
@media (prefers-reduced-motion: reduce) { .nav { transition: none; } }

/* Auto-hide v2: fade out/in with a small lift, instead of sliding all the way off */
.nav {
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
.nav.nav--hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  .nav, .nav.nav--hidden { transition: opacity 0.2s linear, visibility 0s linear 0.2s; }
  .nav.nav--hidden { transform: none; }
}
/* Beat style.css "body.loaded > *" (which pins opacity: 1 and its own transition) */
nav.nav,
body.loaded > nav.nav {
  opacity: 1;
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0s;
}
nav.nav.nav--hidden,
body.loaded > nav.nav.nav--hidden {
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 0.3s ease, transform 0.3s ease, visibility 0s linear 0.3s;
}
@media (prefers-reduced-motion: reduce) {
  nav.nav, body.loaded > nav.nav,
  nav.nav.nav--hidden, body.loaded > nav.nav.nav--hidden { transition: opacity 0.2s linear, visibility 0s linear 0.2s; }
  nav.nav.nav--hidden, body.loaded > nav.nav.nav--hidden { transform: none; }
}

/* Compact pill: as wide as its content, centred (desktop). Phones keep the full-width pill. */
@media (min-width: 769px) {
  .nav-inner {
    width: max-content;
    max-width: calc(100% - 2 * var(--container-padding));
    gap: 56px;
    padding: 0 10px 0 28px;
  }
  .nav-links { gap: 24px; }
}

/* Split nav (2026-11-17, desktop): the name sits alone at top-left, lined up with
   the page's left edge; the links + "Let's talk" form a short pill at top-right.
   Both ends follow the hero grid (1120px). Phones keep the single full-width pill. */
@media (min-width: 769px) {
  .nav-inner {
    width: auto;
    max-width: min(1120px, calc(100% - 2 * var(--container-padding)));
    padding: 0;
    gap: 24px;
    background: transparent;
    border: none;
    box-shadow: none;
    border-radius: 0;
  }
  .nav-logo { pointer-events: auto; }
  .nav-links {
    pointer-events: auto;
    height: 60px;
    padding: 0 8px 0 24px;
    background: #fff;
    border: var(--border-width) solid #2B2B2B;
    border-radius: 999px;
    box-shadow: 4px 4px 0 #2B2B2B;
  }
  .nav-contact { height: 42px; }
  .nav-logo-name { font-size: 20px; }
}
/* Once the page has scrolled, the bare name gets its own small pill so it reads over content */
@media (min-width: 769px) {
  .nav-logo {
    height: 60px;
    padding: 0 2px;
    border: var(--border-width) solid transparent;
    border-radius: 999px;
    transition: background 0.25s ease, border-color 0.25s ease, box-shadow 0.25s ease, padding 0.25s ease;
  }
  .nav.nav--scrolled .nav-logo {
    padding: 0 22px;
    background: #fff;
    border-color: #2B2B2B;
    box-shadow: 4px 4px 0 #2B2B2B;
  }
}
/* Name without a pill (2026-11-17): it only shows near the top of the page, where nothing
   sits under it. Once the page scrolls (nav--scrolled), the name fades away; the links
   pill keeps its hide-on-scroll-down / show-on-scroll-up behaviour. */
@media (min-width: 769px) {
  .nav.nav--scrolled .nav-logo {
    padding: 0 2px;
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
  }
  .nav-logo {
    transition: opacity 0.25s ease, visibility 0s linear 0.25s;
  }
  .nav:not(.nav--scrolled) .nav-logo {
    opacity: 1;
    visibility: visible;
    transition: opacity 0.25s ease, visibility 0s linear 0s;
  }
}
/* The name no longer gets a pill: drop the leftover transparent border/padding so it lines up exactly */
@media (min-width: 769px) {
  .nav-logo, .nav.nav--scrolled .nav-logo { padding: 0; border: 0; }
}
/* Nav ends follow the page container (same edges as every section and card) */
@media (min-width: 769px) {
  .nav-inner { max-width: calc(min(var(--max-width), 100%) - 2 * var(--container-padding)); }
}
