/*
 * Denovers · Mobile nav panel
 * Fullscreen overlay menu that slides down on burger tap.
 * Pairs with /assets/nav-mobile.js
 *
 * Active states:
 *   .mnav-link.is-active           top-level item is on the current page
 *   .mnav-section.is-active        section header (Services / Industries) matches
 *   .mnav-sublist a.is-active      specific sub-item matches the current page
 */

/* Panel itself · fixed fullscreen · hidden by default · slides from top */
.mnav {
  position: fixed; inset: 0;
  z-index: 100;
  background: #FFFFFF;
  display: flex;
  flex-direction: column;
  transform: translateY(-100%);
  transition: transform .35s cubic-bezier(0.16, 1, 0.3, 1);
  visibility: hidden;
}
.mnav.is-open {
  transform: translateY(0);
  visibility: visible;
}

/* Top bar · brand left, close button right */
.mnav-top {
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px;
  border-bottom: 1px solid #EBEBE6;
  flex-shrink: 0;
}
.mnav-brand {
  display: inline-flex; align-items: center; gap: 10px;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 17px; font-weight: 600; letter-spacing: -0.015em;
  color: #0C0C0A;
  text-decoration: none;
}
.mnav-brand .brand-mark {
  width: 22px; height: 22px; background: #0C0C0A;
  border-radius: 2px; position: relative;
}
.mnav-brand .brand-mark::after {
  content: ""; position: absolute;
  right: 4px; top: 4px; width: 6px; height: 6px;
  background: var(--accent); border-radius: 50%;
}
.mnav-close {
  width: 40px; height: 40px;
  background: transparent;
  border: 1px solid rgba(12,12,10,0.14);
  border-radius: 4px;
  display: inline-flex; align-items: center; justify-content: center;
  cursor: pointer;
  color: #0C0C0A;
  font-size: 22px; line-height: 1;
  padding: 0;
}
.mnav-close:hover { background: #0C0C0A; color: #FFFFFF; border-color: #0C0C0A; }

/* Scrollable body · holds all links */
.mnav-body {
  flex: 1;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding: 18px 20px 32px;
  display: flex; flex-direction: column;
  gap: 0;
}

/* Top-level standalone link · Work / Engagements / Testimonials */
.mnav-link {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500;
  font-size: 22px; letter-spacing: -0.018em;
  color: #0C0C0A;
  padding: 18px 4px;
  text-decoration: none;
  border-bottom: 1px solid #EBEBE6;
  display: block;
  transition: color .15s ease;
}
.mnav-link:hover { color: var(--accent); }
.mnav-link.is-active { color: var(--accent); }

/* Section with sub-items · Services / Industries */
.mnav-section {
  padding: 18px 4px;
  border-bottom: 1px solid #EBEBE6;
}
.mnav-section-head {
  font-family: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500;
  font-size: 22px; letter-spacing: -0.018em;
  color: #0C0C0A;
  display: block;
  margin-bottom: 14px;
}
.mnav-section.is-active .mnav-section-head { color: var(--accent); }

.mnav-sublist {
  list-style: none; margin: 0; padding: 0;
  display: flex; flex-direction: column;
  gap: 2px;
}
.mnav-sublist a {
  display: block;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-size: 15px; font-weight: 400;
  color: #2D2D29;
  padding: 9px 0 9px 14px;
  text-decoration: none;
  letter-spacing: -0.01em;
  border-left: 2px solid transparent;
  transition: color .15s ease, border-color .15s ease;
}
.mnav-sublist a:hover { color: var(--accent); }
.mnav-sublist a.is-active {
  color: var(--accent);
  border-left-color: var(--accent);
}

/* CTA pinned to bottom of viewport · safe-area aware */
.mnav-cta-wrap {
  flex-shrink: 0;
  padding: 16px 20px calc(16px + env(safe-area-inset-bottom));
  border-top: 1px solid #EBEBE6;
  background: #FFFFFF;
}
.mnav-cta {
  display: block;
  width: 100%;
  padding: 16px 20px;
  background: #0C0C0A;
  color: #FFFFFF;
  font-family: "Geist", -apple-system, BlinkMacSystemFont, system-ui, sans-serif;
  font-weight: 500;
  font-size: 15px; letter-spacing: -0.005em;
  text-align: center;
  border-radius: 2px;
  border: 1px solid #0C0C0A;
  text-decoration: none;
  transition: background .2s ease, color .2s ease, border-color .2s ease;
}
.mnav-cta:hover { background: var(--accent); border-color: var(--accent); }

/* Body scroll lock when menu open · iOS-Safari-safe via position:fixed */
body.mnav-open {
  overflow: hidden;
  position: fixed;
  left: 0; right: 0;
  width: 100%;
}

/* Burger animates to X when expanded */
.nav .burger span,
.nav .burger span::before,
.nav .burger span::after {
  transition: transform .25s ease, top .25s ease, background .25s ease;
}
.nav .burger[aria-expanded="true"] span { background: transparent; }
.nav .burger[aria-expanded="true"] span::before {
  top: 0; transform: rotate(45deg);
}
.nav .burger[aria-expanded="true"] span::after {
  top: 0; transform: rotate(-45deg);
}

/* Hide the desktop nav links on mobile · burger + brand only · the .mnav
   panel takes over. Matches the existing breakpoint (980px) used by
   .nav-cta { display: none } and .burger { display: inline-flex } */
@media (max-width: 980px) {
  .nav .nav-links { display: none !important; }
}

/* Mobile menu only renders on mobile · hidden on desktop */
@media (min-width: 981px) {
  .mnav { display: none !important; }
  body.mnav-open { overflow: visible; position: static; }
}
