/* ==========================================================================
   Nav buttons — info + mail, shared by the home masthead and the case-study
   header
   ==========================================================================
   Desktop (the author's 1300px nav export): solid white 44x41 squares, black
   glyphs, 16 apart, right edge at x=1370, top level with the logo at y=54.
   Phones (the 393px export): #D9D9D9 26x24 squares, 16 apart, smaller glyphs.

   Both pages size in --u (1 design px of the 1440 frame, capped at 1px), so
   the bar is the same on home and case studies. The buttons keep their own
   colours on any ground; only the logo follows the header tone. */
.navbtn {
  --btn-bg: #FFFFFF;
  --btn-ink: #000000;
  display: grid;
  place-items: center;
  flex: none;
  inline-size: calc(44 * var(--u));
  block-size: calc(41 * var(--u));
  padding: 0;
  border: 0;
  border-radius: 0;
  background: var(--btn-bg);
  color: var(--btn-ink);
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  transition:
    background-color var(--dur-hover) var(--step-hover),
    transform 120ms var(--ease-out);
}

.navbtn__icon { display: block; fill: currentColor; }
.navbtn__icon--info { inline-size: calc(10 * var(--u)); block-size: calc(21 * var(--u)); }
.navbtn__icon--mail { inline-size: calc(22 * var(--u)); block-size: calc(14 * var(--u)); }
/* The envelope's flap lines are cut in the button's own colour. */
.navbtn__lines { fill: none; stroke: var(--btn-bg); stroke-width: 1.3; }

@media (hover: hover) and (pointer: fine) {
  .navbtn:hover { --btn-bg: #E4E4E4; }
}
.navbtn:focus-visible {
  outline: 2px solid #F1EDE4;
  outline-offset: 3px;
}
.navbtn:active { transform: scale(0.94); }

/* The case-study header scales in --dp, which parts from --u below 1024px
   (css/responsive.css re-bases --u for the home scene). */
.work-head__nav .navbtn { inline-size: calc(44 * var(--dp)); block-size: calc(41 * var(--dp)); }
.work-head__nav .navbtn__icon--info { inline-size: calc(10 * var(--dp)); block-size: calc(21 * var(--dp)); }
.work-head__nav .navbtn__icon--mail { inline-size: calc(22 * var(--dp)); block-size: calc(14 * var(--dp)); }

/* Hidden while its card is out — the button IS the card, mid-morph. */
.navbtn.is-lifted { visibility: hidden; }

@media (max-width: 768px) {
  .navbtn,
  .work-head__nav .navbtn {
    --btn-bg: #D9D9D9;
    --btn-ink: #1B1414;
    inline-size: 26px;
    block-size: 24px;
  }
  .navbtn__icon--info,
  .work-head__nav .navbtn__icon--info { inline-size: 6px; block-size: 13px; }
  .navbtn__icon--mail,
  .work-head__nav .navbtn__icon--mail { inline-size: 12px; block-size: 8px; }
  @media (hover: hover) and (pointer: fine) {
    .navbtn:hover { --btn-bg: #CACACA; }
  }
}
