/* ============================================================
   Fourfront — Site nav (shared component)
   Loaded on every hi-fi page. Uses literal hex values so it works
   regardless of which design-token CSS the page imports
   (assets/fourfront-tokens.css or brand.css).
============================================================ */

/* Outer sticky wrapper. Full-bleed liquid-glass background. */
.nav-wrap {
  position: sticky;
  top: 0;
  z-index: 50;
  padding: 0;
  margin: 0;
  background: rgba(235, 238, 237, 0.65);
  backdrop-filter: blur(20px) saturate(160%);
  -webkit-backdrop-filter: blur(20px) saturate(160%);
  border-top: 1px solid rgba(7, 44, 34, 0.08);
  border-bottom: 1px solid rgba(7, 44, 34, 0.08);
  box-shadow:
    0 1px 0 rgba(255, 255, 255, 0.5) inset,
    0 8px 24px -8px rgba(7, 44, 34, 0.10);
  color: #072C22;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
}

/* Inner bar — content constrained to 1280px, transparent (background lives on wrapper) */
.nav-wrap .nav-bar {
  width: 100%;
  max-width: calc(1280px + 200px); /* 1280 content + 100px gutter each side */
  margin: 0 auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 72px;
  padding: 8px 100px;
  background: transparent;
  border: 0;
}

/* Brand lockup */
.nav-wrap .nav-brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: inherit;
  text-decoration: none;
}
.nav-wrap .nav-brand img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: block;
}
.nav-wrap .nav-brand .name {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: #072C22;
  opacity: 0.95;
}

/* Centre nav links */
.nav-wrap .nav-links {
  display: flex;
  align-items: center;
  gap: 28px;
  margin: 0;
  padding: 0;
}
.nav-wrap .nav-links a {
  font-size: 14px;
  font-weight: 500;
  letter-spacing: -0.005em;
  color: rgba(7, 44, 34, 0.78);
  text-decoration: none;
  transition: color 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
  /* explicit reset of brand.css's .nav-links a rules */
  display: inline-flex;
  align-items: center;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.nav-wrap .nav-links a:hover {
  color: #072C22;
}
.nav-wrap .nav-links a.is-active {
  color: #072C22;
  font-weight: 600;
}

/* CTA — lime pill with dark chip (matches homepage hi-fi exactly).
   Uses its own class so brand.css `.btn` / page-local `.btn` rules
   never reach it. */
.nav-wrap .nav-cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 48px;
  padding: 6px 6px 6px 20px;
  border-radius: 9999px;
  border: 1px solid transparent;
  font-family: inherit;
  font-weight: 700;
  font-size: 14px;
  letter-spacing: -0.015em;
  line-height: 26px;
  text-decoration: none;
  cursor: pointer;
  background: #EAFE45;
  color: #072C22;
  transition:
    background-color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    box-shadow 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-wrap .nav-cta .chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  margin-left: 4px;
  border-radius: 50%;
  background: #072C22;
  color: #EAFE45;
  border: 0;
  transition:
    background-color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-wrap .nav-cta .chip svg {
  display: block;
  width: 16px;
  height: 16px;
  stroke: currentColor;
  fill: none;
}
.nav-wrap .nav-cta:hover {
  box-shadow: 0 8px 24px rgba(7, 44, 34, 0.12);
  transform: translateY(-1px);
}
.nav-wrap .nav-cta:hover .chip {
  background: #19392A;
  transform: translateX(2px);
}
/* Active CTA — when current page IS contact (the CTA points to it) */
.nav-wrap .nav-cta.is-active {
  background: #072C22;
  color: #ECF0EF;
}
.nav-wrap .nav-cta.is-active .chip {
  background: #EAFE45;
  color: #072C22;
}
.nav-wrap .nav-cta.is-active:hover .chip {
  background: #ECF0EF;
}

/* Mobile */
@media (max-width: 1100px) {
  .nav-wrap .nav-bar { padding: 8px 40px; }
}
@media (max-width: 880px) {
  .nav-wrap .nav-links { display: none; }
  .nav-wrap .nav-bar { padding: 8px 20px; }
}
@media (max-width: 560px) {
  .nav-wrap .nav-cta {
    padding-left: 16px;
    font-size: 13px;
    height: 44px;
  }
  .nav-wrap .nav-cta .chip {
    width: 32px;
    height: 32px;
  }
}

/* Focus rings */
.nav-wrap a:focus-visible,
.nav-wrap .nav-cta:focus-visible {
  outline: 2px solid #EAFE45;
  outline-offset: 3px;
  border-radius: 8px;
}
.nav-wrap .nav-cta:focus-visible {
  outline-offset: 2px;
  border-radius: 9999px;
}

/* ============================================================
   HAMBURGER TRIGGER  (auto-injected into .nav-bar by nav.js)
   Hidden on desktop, shown ≤880px.
============================================================ */
.nav-burger {
  display: none;
  width: 44px;
  height: 44px;
  margin-left: 10px;
  padding: 0;
  border: 0;
  background: transparent;
  cursor: pointer;
  border-radius: 12px;
  -webkit-tap-highlight-color: transparent;
  position: relative;
  z-index: 60; /* above the menu sheet so the X stays clickable */
  transition: background 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.nav-burger:hover {
  background: rgba(7, 44, 34, 0.08);
}
.nav-burger:focus-visible {
  outline: 2px solid #EAFE45;
  outline-offset: 2px;
}
.nav-burger__lines {
  position: absolute;
  inset: 0;
  display: block;
}
.nav-burger__lines .b {
  position: absolute;
  left: 50%;
  width: 22px;
  height: 2px;
  background: #072C22;
  border-radius: 2px;
  transform-origin: center;
  transition:
    transform 420ms cubic-bezier(0.65, 0, 0.35, 1),
    background-color 320ms cubic-bezier(0.2, 0.7, 0.2, 1),
    top 280ms cubic-bezier(0.65, 0, 0.35, 1),
    width 320ms cubic-bezier(0.65, 0, 0.35, 1);
}
.nav-burger__lines .b1 {
  top: 17px;
  margin-left: -11px;
}
.nav-burger__lines .b2 {
  top: 25px;
  margin-left: -11px;
  width: 14px; /* second line shorter — softer look */
}
/* Morph into X when open. Color flips to lime on dark menu. */
.nav-burger.is-open .nav-burger__lines .b {
  background: #EAFE45;
  width: 22px;
}
.nav-burger.is-open .nav-burger__lines .b1 {
  top: 21px;
  transform: rotate(45deg);
}
.nav-burger.is-open .nav-burger__lines .b2 {
  top: 21px;
  transform: rotate(-45deg);
}

@media (max-width: 880px) {
  .nav-burger { display: inline-flex; margin-left: 0; }
  /* On mobile, the "Neem contact op" CTA lives inside the hamburger menu —
     hide it from the top bar so the nav reads as brand + burger only. */
  .nav-wrap .nav-cta { display: none; }
  /* When menu is open, drop the nav-wrap glass behind the dark menu sheet */
  .nav-wrap.menu-open {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    -webkit-backdrop-filter: none;
            backdrop-filter: none;
  }
}

/* ============================================================
   FULL-SCREEN MENU SHEET (auto-injected into <body>)
============================================================ */
.ff-menu {
  position: fixed;
  inset: 0;
  z-index: 55;
  pointer-events: none;
  font-family: "Plus Jakarta Sans", system-ui, -apple-system, sans-serif;
  color: #ECF0EF;
}
.ff-menu.is-open { pointer-events: auto; }

/* Sheet itself — luxurious "puff out from the hamburger" reveal:
   scale from the top-right anchor (where the burger sits) plus a brief
   border-radius morph so the early frames read as a soft round bloom
   before settling into the full rectangular sheet. */
.ff-menu__sheet {
  position: absolute;
  inset: 0;
  background: #072C22;
  /* Subtle lime depth from the bottom-left — gives the dark sheet
     a faint emerald glow without looking like a gradient banner. */
  background-image:
    radial-gradient(120% 80% at 0% 100%, rgba(234, 254, 69, 0.10), transparent 55%),
    radial-gradient(80% 60% at 100% 0%, rgba(255, 255, 255, 0.05), transparent 60%);
  transform-origin: calc(100% - 42px) 50px;
  transform: scale(0);
  opacity: 0;
  border-radius: 60% 0 0 60%;
  will-change: transform, opacity, border-radius;
  transition:
    transform 640ms cubic-bezier(0.22, 1, 0.36, 1),
    opacity 280ms cubic-bezier(0.4, 0, 0.2, 1),
    border-radius 640ms cubic-bezier(0.22, 1, 0.36, 1);
  display: flex;
  flex-direction: column;
  padding: 0;
}
.ff-menu.is-open .ff-menu__sheet {
  transform: scale(1);
  opacity: 1;
  border-radius: 0;
}
.ff-menu.is-closing .ff-menu__sheet {
  transform: scale(0);
  opacity: 0;
  border-radius: 60% 0 0 60%;
  transition:
    transform 420ms cubic-bezier(0.7, 0, 0.84, 0),
    opacity 280ms cubic-bezier(0.4, 0, 0.2, 1) 120ms,
    border-radius 420ms cubic-bezier(0.7, 0, 0.84, 0);
}

/* Top bar inside sheet */
.ff-menu__topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 20px;
  height: 72px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}
.ff-menu__brand {
  display: inline-flex;
  align-items: center;
  gap: 12px;
  color: #ECF0EF;
  text-decoration: none;
}
.ff-menu__brand img {
  width: 36px;
  height: 36px;
  border-radius: 7px;
  display: block;
}
.ff-menu__brand span {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.ff-menu__close {
  width: 44px;
  height: 44px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: #EAFE45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 220ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 220ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ff-menu__close:hover {
  background: rgba(234, 254, 69, 0.10);
  border-color: rgba(234, 254, 69, 0.32);
  transform: rotate(90deg);
}
.ff-menu__close:focus-visible {
  outline: 2px solid #EAFE45;
  outline-offset: 2px;
}

/* Eyebrow tag */
.ff-menu__eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(236, 240, 239, 0.55);
  white-space: nowrap;
}
.ff-menu__eyebrow .dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #EAFE45;
  box-shadow: 0 0 0 3px rgba(234, 254, 69, 0.18);
}

/* Body — big nav list */
.ff-menu__body {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 20px;
  padding: 32px 24px 24px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}
.ff-menu__list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-direction: column;
}
.ff-menu__item {
  position: relative;
  border-bottom: 1px solid rgba(255, 255, 255, 0.06);
}
.ff-menu__item:last-child { border-bottom: 0; }
.ff-menu__item a {
  display: block;
  padding: 18px 4px;
  text-decoration: none;
  color: #ECF0EF;
  font-size: clamp(28px, 8vw, 40px);
  font-weight: 600;
  letter-spacing: -0.025em;
  line-height: 1.1;
  transition:
    color 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 320ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ff-menu__item a:hover,
.ff-menu__item a:focus-visible {
  color: #EAFE45;
  transform: translateX(6px);
  outline: 0;
}
.ff-menu__item .t { display: block; }
.ff-menu__item.is-active a .t {
  color: #EAFE45;
}

/* Foot — connect + CTA */
.ff-menu__foot {
  padding: 20px 24px 28px;
  border-top: 1px solid rgba(255, 255, 255, 0.08);
  display: flex;
  flex-direction: column;
  gap: 18px;
}
.ff-menu__connect {
  display: flex;
  align-items: center;
  gap: 12px;
}
.ff-menu__socials {
  display: flex;
  gap: 10px;
}
.ff-menu__socials a {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: #ECF0EF;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
  transition:
    background 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    border-color 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    color 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ff-menu__socials a:hover {
  background: #EAFE45;
  border-color: #EAFE45;
  color: #072C22;
  transform: translateY(-2px);
}
.ff-menu__socials a:focus-visible {
  outline: 2px solid #EAFE45;
  outline-offset: 2px;
}
.ff-menu__cta {
  display: inline-flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  height: 60px;
  padding: 6px 6px 6px 24px;
  border-radius: 9999px;
  background: #EAFE45;
  color: #072C22;
  font-weight: 700;
  font-size: 16px;
  letter-spacing: -0.015em;
  text-decoration: none;
  transition:
    box-shadow 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ff-menu__cta:hover {
  box-shadow: 0 12px 28px rgba(234, 254, 69, 0.30);
  transform: translateY(-1px);
}
.ff-menu__cta:focus-visible {
  outline: 2px solid #EAFE45;
  outline-offset: 3px;
}
.ff-menu__cta .chip {
  width: 48px;
  height: 48px;
  border-radius: 50%;
  background: #072C22;
  color: #EAFE45;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition:
    background 240ms cubic-bezier(0.2, 0.7, 0.2, 1),
    transform 240ms cubic-bezier(0.2, 0.7, 0.2, 1);
}
.ff-menu__cta:hover .chip {
  background: #19392A;
  transform: translateX(2px);
}

/* ============================================================
   STAGGERED ENTRANCE
   Items use --i (set inline in JS) to compute their delay.
   They rest at translateY(28px) + opacity 0, then settle in
   one by one after the sheet's clip-path reveal begins.
============================================================ */
.ff-menu__eyebrow,
.ff-menu__item,
.ff-menu__connect,
.ff-menu__cta {
  opacity: 0;
  transform: translateY(28px);
  transition:
    opacity 520ms cubic-bezier(0.16, 1, 0.3, 1),
    transform 620ms cubic-bezier(0.16, 1, 0.3, 1);
  transition-delay: 0ms;
}
.ff-menu.is-open .ff-menu__eyebrow,
.ff-menu.is-open .ff-menu__item,
.ff-menu.is-open .ff-menu__connect,
.ff-menu.is-open .ff-menu__cta {
  opacity: 1;
  transform: translateY(0);
  transition-delay: calc(180ms + var(--i, 0) * 70ms);
}
/* On close, snap items back instantly so the next open feels fresh */
.ff-menu.is-closing .ff-menu__eyebrow,
.ff-menu.is-closing .ff-menu__item,
.ff-menu.is-closing .ff-menu__connect,
.ff-menu.is-closing .ff-menu__cta {
  transition-duration: 220ms;
  transition-delay: 0ms;
}

/* Small-screen tightening */
@media (max-width: 380px) {
  .ff-menu__body { padding: 24px 20px 20px; }
  .ff-menu__foot { padding: 18px 20px 24px; }
  .ff-menu__item a { font-size: clamp(26px, 8vw, 34px); padding: 16px 4px; }
}

/* Above mobile: never show the menu sheet even if state lingers */
@media (min-width: 881px) {
  .ff-menu { display: none; }
}

/* Reduced motion: keep functional, drop the flourish */
@media (prefers-reduced-motion: reduce) {
  .ff-menu__sheet { transition: none; }
  .ff-menu__eyebrow,
  .ff-menu__item,
  .ff-menu__connect,
  .ff-menu__cta {
    transition: opacity 160ms linear;
    transform: none;
    transition-delay: 0ms !important;
  }
  .nav-burger__lines .b { transition: transform 160ms linear, top 160ms linear, background-color 160ms linear; }
}
