/* ==========================================================================
   Layout: header and menu, footer, mobile call / quote bar
   Same structure as zOneStopShop.com and zManufacturer.com: the Zimmermann logo with
   the site name beside it, a short menu, and one green button.
   ========================================================================== */

/* Header --------------------------------------------------------------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 1000;
  background: rgba(255,255,255,.96);
  backdrop-filter: saturate(140%) blur(8px);
  border-bottom: 1px solid var(--rule);
}

.site-header__bar {
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

/* Brand: the Zimmermann logo (img/logo.png), then the site name.
   If the logo file is missing, js/site.js shows the company name as text. */
.brand {
  display: flex;
  align-items: center;
  gap: .8rem;
  min-width: 0;
  text-decoration: none;
  color: var(--blue);
}
.brand__logo { height: 36px; width: auto; flex: none; }
.brand__name {
  font-weight: 900;
  font-size: 1.1rem;
  letter-spacing: -0.02em;
  line-height: 1;
  white-space: nowrap;
}
/* min-width and overflow: if a visitor's browser falls back to a wider typeface, the site name
   is trimmed at the edge instead of running under the menu. */
.brand__text {
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
  padding: .1rem 0 .15rem .8rem;
  border-left: 1px solid var(--rule);
  font-weight: 900;
  font-size: 1.15rem;
  letter-spacing: -0.02em;
  line-height: 1.05;
  white-space: nowrap;
}
.brand__text small {
  margin-top: .22rem;
  font-weight: 400;
  font-size: .72rem;
  letter-spacing: 0;
  color: var(--mark);
}
/* The city fits beside the name only while the menu is folded away (tablet widths) */
.brand__city { display: none; }
@media (min-width: 600px) and (max-width: 1179px) {
  .brand__city { display: inline; }
}
@media (max-width: 599px) {
  .brand { gap: .6rem; }
  .brand__logo { height: 28px; }
  .brand__text { padding-left: .6rem; font-size: 1rem; }
  .brand__text small { font-size: .64rem; }
}
/* Phones: the site name goes under the logo, so the Menu button always has room */
@media (max-width: 439px) {
  .brand { flex-direction: column; align-items: flex-start; gap: .22rem; }
  .brand__logo { height: 24px; }
  .brand__text { padding: 0 0 .15rem; border-left: 0; font-size: .86rem; line-height: 1; }
  .brand__text small { display: none; }
}

/* Menu ------------------------------------------------------------------- */
.site-nav {
  display: flex;
  align-items: center;
  gap: clamp(.9rem, 1.7vw, 1.6rem);
}
.site-nav a:not(.btn) {
  padding: .5rem 0 .35rem;
  border-bottom: 3px solid transparent;
  color: var(--blue);
  font-weight: 700;
  font-size: .95rem;
  text-decoration: none;
  white-space: nowrap;
}
.site-nav a:not(.btn):hover { border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--green); color: var(--ink); }
.site-nav .btn { min-height: 44px; padding: .6rem 1.1rem; white-space: nowrap; }

.nav-toggle {
  display: none;
  min-height: 44px;
  padding: .5rem .95rem;
  border: 2px solid var(--blue);
  border-radius: var(--radius);
  background: transparent;
  color: var(--blue);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}
.nav-toggle[aria-expanded="true"] { background: var(--blue); color: var(--paper); }

/* Below 1180px the menu folds under a Menu button */
@media (max-width: 1179px) {
  .nav-toggle { display: inline-flex; align-items: center; }
  .site-nav {
    display: none;
    position: absolute;
    left: 0; right: 0; top: 100%;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: .25rem var(--gutter) 1.25rem;
    background: var(--paper);
    border-bottom: 1px solid var(--rule);
    box-shadow: 0 18px 30px -18px rgba(11,31,63,.35);
  }
  .site-nav.is-open { display: flex; }
  .site-nav a:not(.btn) {
    padding: .95rem 0;
    border-bottom: 1px solid var(--rule);
    font-size: 1.05rem;
  }
  .site-nav a:not(.btn):hover { border-bottom-color: var(--rule); }
  .site-nav a[aria-current="page"]:not(.btn) { border-bottom-color: var(--rule); box-shadow: inset 4px 0 0 var(--green); padding-left: .9rem; }
  .site-nav .btn { margin-top: 1rem; }
}

/* Footer --------------------------------------------------------------- */
.site-footer {
  background: var(--ink);
  color: var(--slate-light);
  padding-block: clamp(2.5rem, 5vw, 4rem) 1.5rem;
  font-size: .95rem;
}
.site-footer a { color: var(--paper); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; text-decoration-color: var(--green); }
.site-footer :focus-visible { outline-color: var(--green); }
.site-footer h2 {
  color: var(--green);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: 0;
  margin-bottom: .75rem;
}
.site-footer__grid {
  display: grid;
  grid-template-columns: 1.55fr 1fr 1fr 1fr;
  gap: clamp(1.5rem, 3.5vw, 3rem);
}
.site-footer__logo { height: 40px; width: auto; margin-bottom: 1.1rem; }
.site-footer__name {
  display: block;
  margin-bottom: 1rem;
  color: var(--paper);
  font-weight: 900;
  font-size: 1.3rem;
  letter-spacing: -0.02em;
  line-height: 1.1;
}
.site-footer__links { display: grid; gap: .45rem; }

/* Social links under the footer address, as on zOneStopShop.com: the official LinkedIn and Facebook
   logos (img/), unaltered. Each keeps its own proportions; the LinkedIn file is wider than it is
   tall. If a file is missing, js/site.js shows the name as a text link instead. */
.site-footer__social { margin-top: 1.1rem; }
.site-footer__social-label { display: block; margin-bottom: .35rem; }
.social { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: .5rem; align-items: center; }
.social li { margin: 0; }
.social a {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 44px;
  min-height: 44px;
  font-weight: 700;
}
.social img { height: 28px; width: auto; transition: opacity .15s var(--ease); }
.social a:hover img { opacity: .85; }
.social a span { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.social a.is-text { justify-content: flex-start; min-width: 0; margin-right: .75rem; }
.social a.is-text span { position: static; width: auto; height: auto; overflow: visible; clip: auto; white-space: normal; text-decoration: underline; text-decoration-color: rgba(255,255,255,.3); }
.social a.is-text:hover span { text-decoration-color: var(--green); }

.site-footer__legal {
  margin-top: 2.5rem;
  padding-top: 1.25rem;
  border-top: 1px solid rgba(255,255,255,.14);
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: .5rem 1.5rem;
  font-size: var(--fs-sm);
}
@media (max-width: 1019px) {
  .site-footer__grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 599px) {
  .site-footer__grid { grid-template-columns: 1fr; }
}

/* Mobile call / quote bar: fixed to the bottom on phones --------------- */
.mobile-cta {
  display: none;
  position: fixed;
  left: 0; right: 0; bottom: 0;
  z-index: 900;
  padding: .6rem var(--gutter) calc(.6rem + env(safe-area-inset-bottom));
  background: rgba(255,255,255,.97);
  border-top: 1px solid var(--rule);
  gap: .6rem;
}
.mobile-cta .btn { flex: 1; }
@media (max-width: 767px) {
  .mobile-cta { display: flex; }
  body { padding-bottom: 76px; }
  /* Out of the way while someone is typing in the form */
  body:has(.quote-form:focus-within) .mobile-cta { display: none; }
}
