/* ═══════════════════════════════════════════════════════════════════
   Buildhaus mobile drawer · v4.1 "Ervaid, dark" (2026-07-04)
   Direct port of the approved Ervaid mobile menu: a light paper
   panel that docks BELOW the header (the nav stays over the page,
   so its colors never fight the panel), light-weight serif links
   in sentence case with a hairline rule under each row, one solid
   square-cornered button, then socials with icons, the studio
   email, and locations. No eyebrows, no numbers, no patterns,
   no boxes. Slides in from the right like Ervaid.
   ═══════════════════════════════════════════════════════════════════ */

/* Stacking: hero ledger carries z-index 95; drawer above content,
   nav above drawer. */
.nav-drawer { z-index: 120; }
.nav { z-index: 130; }

.nav-drawer {
  position: fixed;
  top: 60px;                      /* docks under the 60px mobile nav */
  left: 0; right: 0; bottom: 0;
  height: auto;
  background: #0E1714;            /* Ervaid structure, Buildhaus dark green */
  border-top: 1px solid rgba(250, 250, 248, 0.14);
  padding: 24px 20px 48px;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  transform: translateX(100%);    /* Ervaid slide-in from the right */
  transition: transform 0.45s cubic-bezier(0.16, 1, 0.3, 1), visibility 0.45s;
  visibility: hidden;
  pointer-events: none;
}
.nav-drawer.is-open {
  transform: translateX(0);
  visibility: visible;
  pointer-events: auto;
}

.nav-drawer-inner {
  display: block;
  max-width: 480px;
  margin: 0 auto;
  counter-reset: navnum;
}

/* Ervaid has no menu eyebrow; neither do we */
.nav-drawer-eyebrow { display: none; }
.nav-drawer .drawer-follow { display: none; }

/* ── Links: light serif, sentence case, ruled rows (Ervaid) ── */
.nav-drawer .drawer-link {
  display: block;
  font-family: var(--font-display-serif, "Fraunces", Georgia, serif);
  font-weight: 400;
  font-size: 24px;
  letter-spacing: -0.005em;
  line-height: 1.2;
  text-transform: none;
  color: #FAFAF8;
  text-decoration: none;
  padding: 16px 0;
  border: none;
  border-bottom: 1px solid rgba(250, 250, 248, 0.14);
  transition: color 0.2s ease;
}
.nav-drawer .drawer-link::before {
  content: "-";
  margin-right: 12px;
  color: inherit;
}
.nav-drawer .drawer-link::after { content: none; }
.nav-drawer .drawer-link[aria-current="page"],
.nav-drawer .drawer-link.active {
  color: #FBDC11;
  font-style: italic;
  padding-left: 0;
}

/* ── CTA: Ervaid's solid square-cornered button, Buildhaus ink ── */
.nav-drawer .drawer-cta {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin: 20px 0 0;
  padding: 15px 24px;
  border: none;
  border-radius: 2px;
  background: #FAFAF8;
  color: #111C18;
  font-family: "Inter", -apple-system, system-ui, sans-serif;
  font-weight: 600;
  font-size: 15px;
  letter-spacing: -0.005em;
  line-height: 1;
  text-transform: none;
  text-decoration: none;
}
.nav-drawer .drawer-cta::before { content: none; }
.nav-drawer .drawer-cta::after { content: none; }
.nav-drawer .drawer-cta:active { opacity: 0.9; transform: none; }

/* ── Socials: icons back, quiet ink row ── */
.nav-drawer .drawer-socials {
  display: flex;
  gap: 26px;
  margin-top: 32px;
  padding-top: 20px;
  border-top: 1px solid rgba(250, 250, 248, 0.14);
}
.nav-drawer .drawer-socials a {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  min-height: 44px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.8);
  text-decoration: none;
}
.nav-drawer .drawer-socials a:active { color: #FBDC11; }
.nav-drawer .drawer-socials svg {
  display: inline-block;
  width: 15px;
  height: 15px;
  flex: 0 0 auto;
}

/* ── Contact: quiet label + ink serif email ── */
.nav-drawer .drawer-contact {
  display: block;
  margin-top: 24px;
  padding: 0;
  border: none;
  border-radius: 0;
  background: transparent;
  color: #FAFAF8;
  text-decoration: none;
}
.nav-drawer .drawer-contact .label {
  display: block;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 9px;
  font-weight: 500;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.55);
  margin-bottom: 7px;
}
.nav-drawer .drawer-contact .value {
  display: inline-block;
  font-family: var(--font-display-serif, "Fraunces", Georgia, serif);
  font-weight: 500;
  font-size: 21px;
  letter-spacing: -0.005em;
  color: #FAFAF8;
  border-bottom: 1px solid rgba(251, 220, 17, 0.85);
  padding-bottom: 2px;
}

/* legacy work.html block, superseded by the contact line */
.nav-drawer .drawer-meta { display: none; }

.nav-drawer .drawer-locations {
  margin: 22px 0 0;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  font-family: "JetBrains Mono", ui-monospace, monospace;
  font-size: 10px;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: rgba(250, 250, 248, 0.55);
}
.nav-drawer .drawer-locations .dot {
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #FBDC11;
  flex-shrink: 0;
}

@media (prefers-reduced-motion: reduce) {
  .nav-drawer { transition: opacity 0.2s ease; transform: none; }
  .nav-drawer:not(.is-open) { opacity: 0; }
  .nav-drawer.is-open { opacity: 1; }
  .nav-drawer .drawer-link,
  .nav-drawer .drawer-cta { transition: none; }
}

/* ═══════════════════════════════════════════════════════════════════
   MOBILE DE-BOX (2026-07-04). Del's rule: on phones, NO enclosing
   border boxes around text sections, anywhere. Cards flatten into
   clean editorial lists separated by single hairlines. Photo frames
   (work minis, studio plate) keep their borders; text boxes do not.
   Desktop keeps the framed-card look.
   ═══════════════════════════════════════════════════════════════════ */
@media (max-width: 899px) {
  /* services: who-we-build-for cells */
  .wws-cell,
  .wws-cell:hover {
    border: none;
    background: transparent;
    box-shadow: none;
    transform: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(44, 58, 49, 0.22);
    padding-bottom: 22px;
  }
  .wws-grid { gap: 22px; }
  .wws-cell:last-child { border-bottom: none; }

  /* services: the seven practice cards */
  .service,
  .service:hover {
    border: none;
    background: transparent;
    box-shadow: none;
    transform: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(44, 58, 49, 0.22);
  }
  .services-grid > .service:last-child { border-bottom: none; }

  /* services: the niches block as a left-aligned editorial close */
  .wws-foot {
    border: none;
    border-radius: 0;
    background: transparent;
    max-width: none;
    padding: 24px 0 0;
    margin-top: 28px;
    border-top: 1px solid rgba(44, 58, 49, 0.22);
    text-align: left;
    align-items: flex-start;
    gap: 12px;
  }
  .wws-foot-eyebrow { justify-content: flex-start; }
  .wws-foot-lead { max-width: none; }
  .wws-foot-chips {
    justify-content: flex-start;
    gap: 6px 0;
    margin-top: 2px;
  }
  .wws-foot-chips li {
    border: none;
    background: transparent;
    border-radius: 0;
    padding: 0;
    font-size: 11px;
    letter-spacing: 0.08em;
    color: rgba(17, 28, 24, 0.62);
  }
  .wws-foot-chips li::after {
    content: "\00B7";
    margin: 0 9px;
    color: rgba(17, 28, 24, 0.35);
  }
  .wws-foot-chips li:last-child::after { content: none; }
  .wws-foot-note { max-width: none; margin-top: 4px; }

  /* now page: bench cards */
  .bench-card,
  .bench-card:hover {
    border: none;
    border-radius: 0;
    background: transparent;
    box-shadow: none;
    transform: none;
    padding-left: 0;
    padding-right: 0;
    border-bottom: 1px solid rgba(44, 58, 49, 0.22);
    padding-bottom: 22px;
  }
  .bench-list > .bench-card:last-child { border-bottom: none; }

  /* icon chips lose their enclosing tiles too: bare glyphs only */
  .wws-icon,
  .service-icon {
    border: none !important;
    background: transparent !important;
    box-shadow: none;
    border-radius: 0;
    width: auto;
    height: auto;
    padding: 0;
    justify-content: flex-start;
    justify-self: start;
  }
}
