/* Mobile drawer — redesigned 2026-09-02
   Clean, tight, premium. Icons and labels sit on ONE row inside a card.
   Matches HTML class names: .drawer__nav, .drawer__nav-item, .drawer__nav-icon, .drawer__nav-label
*/

/* ---------- Overlay ---------- */
.drawer-overlay {
  position: fixed;
  inset: 0;
  z-index: var(--z-scrim);
  background: rgba(0, 0, 0, .6);
  opacity: 0;
  pointer-events: none;
  transition: opacity .28s ease;
}
.drawer-overlay.active {
  opacity: 1;
  pointer-events: auto;
}

/* ---------- Panel ---------- */
.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: var(--z-drawer);
  width: min(360px, 90vw);
  background: linear-gradient(180deg, #0d0f13 0%, #0a0b0f 100%);
  border-left: 1px solid rgba(255, 255, 255, .06);
  box-shadow: -20px 0 60px rgba(0, 0, 0, .6);
  display: flex;
  flex-direction: column;
  overflow: hidden;
  transform: translateX(100%);
  transition: transform .32s cubic-bezier(.22, 1, .36, 1);
  padding-top: env(safe-area-inset-top, 0);
  padding-bottom: env(safe-area-inset-bottom, 0);
}
.drawer.open {
  transform: translateX(0);
}

/* ---------- Header ---------- */
.drawer__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 1.125rem 1.25rem .75rem;
  flex-shrink: 0;
}
.drawer__logo {
  display: inline-flex;
  align-items: center;
  gap: .625rem;
  text-decoration: none;
}
.drawer__logo-img {
  width: 40px;
  height: 40px;
  border-radius: 8px;
  object-fit: contain;
  flex-shrink: 0;
}
.drawer__logo-text,
.drawer__logo span {
  display: inline !important;
  font-family: var(--font-display);
  font-size: 1.0625rem;
  font-weight: 800;
  color: #fff;
  letter-spacing: -.02em;
}

.drawer__close {
  width: 40px;
  height: 40px;
  border-radius: 50%;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .1);
  color: #fff;
  display: flex;
  align-items: center;
  justify-content: center;
  cursor: pointer;
  flex-shrink: 0;
  -webkit-tap-highlight-color: transparent;
  transition: background .2s ease, transform .2s ease;
}
.drawer__close:hover,
.drawer__close:active {
  background: rgba(255, 255, 255, .12);
  transform: rotate(90deg);
}

/* ---------- Tagline strip ---------- */
.drawer__tagline {
  display: block;
  margin: 0 1.25rem 1rem;
  padding: .75rem 1rem;
  font-family: var(--font-body);
  font-size: .75rem;
  font-weight: 600;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--color-primary-bright, #4d8dff);
  background: rgba(37, 99, 235, .08);
  border: 1px solid rgba(37, 99, 235, .18);
  border-radius: 10px;
  text-align: center;
  line-height: 1.4;
  flex-shrink: 0;
}

/* ---------- Nav list (the main event) ---------- */
.drawer__nav {
  display: flex;
  flex-direction: column;
  gap: .375rem;
  padding: 0 1rem;
  flex: 1 1 auto;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
}

.drawer__nav-item {
  display: flex;
  align-items: center;
  gap: .875rem;
  padding: .875rem 1rem;
  border-radius: 12px;
  background: transparent;
  color: rgba(255, 255, 255, .85);
  text-decoration: none;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1;
  min-height: 52px;
  transition: background .18s ease, color .18s ease, transform .15s ease;
  -webkit-tap-highlight-color: transparent;
}
.drawer__nav-item:hover,
.drawer__nav-item:active {
  background: rgba(255, 255, 255, .05);
  color: #fff;
}
.drawer__nav-item.active {
  background: rgba(37, 99, 235, .12);
  color: #fff;
}

.drawer__nav-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .7);
  flex-shrink: 0;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.drawer__nav-icon svg {
  width: 16px;
  height: 16px;
  display: block;
}
.drawer__nav-item:hover .drawer__nav-icon,
.drawer__nav-item.active .drawer__nav-icon {
  background: rgba(37, 99, 235, .18);
  border-color: rgba(37, 99, 235, .25);
  color: #7ba8ff;
}

.drawer__nav-label {
  flex: 1;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 600;
  letter-spacing: -.01em;
  line-height: 1.2;
  color: inherit;
}

/* Primary CTA row (Free Estimate inside nav list) */
.drawer__nav-item--cta {
  margin-top: .75rem;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff !important;
  border: 1px solid rgba(255, 255, 255, .1);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
  justify-content: center;
  gap: .5rem;
}
.drawer__nav-item--cta:hover,
.drawer__nav-item--cta:active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  color: #fff !important;
  transform: translateY(-1px);
}
.drawer__nav-item--cta .drawer__nav-icon {
  background: rgba(255, 255, 255, .18);
  border-color: rgba(255, 255, 255, .25);
  color: #fff;
}
.drawer__nav-item--cta .drawer__nav-label {
  font-weight: 700;
}

/* ---------- Footer (contact block + call CTA) ---------- */
.drawer__footer {
  margin-top: auto;
  padding: 1rem 1.25rem calc(1rem + env(safe-area-inset-bottom, 0));
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  flex-direction: column;
  gap: .75rem;
  flex-shrink: 0;
}

.drawer__contact {
  display: flex;
  flex-direction: column;
  gap: .25rem;
  color: rgba(255, 255, 255, .55);
  font-size: .8125rem;
  line-height: 1.5;
}
.drawer__contact strong {
  color: rgba(255, 255, 255, .8);
  font-weight: 600;
}

.drawer__cta-btn,
.drawer__call {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: 100%;
  padding: .9375rem 1rem;
  background: linear-gradient(180deg, #2563eb 0%, #1d4ed8 100%);
  color: #fff;
  font-family: var(--font-display);
  font-size: 1rem;
  font-weight: 700;
  letter-spacing: -.01em;
  border-radius: 12px;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, .08);
  box-shadow: 0 6px 20px rgba(37, 99, 235, .35);
  transition: transform .15s ease, box-shadow .2s ease;
  -webkit-tap-highlight-color: transparent;
}
.drawer__cta-btn:hover,
.drawer__call:hover,
.drawer__cta-btn:active,
.drawer__call:active {
  background: linear-gradient(180deg, #3b82f6 0%, #2563eb 100%);
  transform: translateY(-1px);
  box-shadow: 0 8px 24px rgba(37, 99, 235, .45);
}

/* Legacy caps chips (kept if referenced elsewhere, tightened) */
.drawer__caps {
  padding: .25rem 1rem .5rem;
  flex-shrink: 0;
}
.drawer__caps-title {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, .4);
  margin-bottom: .5rem;
}
.drawer__caps-grid {
  display: flex;
  flex-wrap: wrap;
  gap: .375rem;
}
.drawer__cap-chip {
  display: inline-flex;
  align-items: center;
  padding: .3rem .65rem;
  font-size: .75rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .6);
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .06);
  border-radius: 100px;
  text-decoration: none;
}

/* ---------- FAB pair (menu + top) ---------- */
.fab-pair {
  position: fixed;
  right: 1rem;
  bottom: calc(80px + env(safe-area-inset-bottom, 0) + .75rem);
  z-index: var(--z-floating);
  display: flex;
  flex-direction: column;
  gap: .5rem;
  opacity: 0;
  pointer-events: none;
  transform: translateX(64px);
  transition: opacity .28s ease, transform .32s cubic-bezier(.22, 1, .36, 1);
}
.fab-pair.visible {
  opacity: 1;
  pointer-events: auto;
  transform: translateX(0);
}
.fab-pair.drawer-open {
  opacity: 0;
  pointer-events: none;
}
.fab-btn {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(255, 255, 255, .1);
  background: rgba(12, 12, 14, .9);
  backdrop-filter: blur(16px) saturate(160%);
  -webkit-backdrop-filter: blur(16px) saturate(160%);
  color: rgba(255, 255, 255, .8);
  cursor: pointer;
  box-shadow: 0 4px 16px rgba(0, 0, 0, .4);
  transition: background .18s ease, transform .18s ease;
  -webkit-tap-highlight-color: transparent;
}
.fab-btn:hover,
.fab-btn:active {
  background: rgba(30, 30, 34, .95);
  color: #fff;
  transform: scale(1.05);
}

body.drawer-locked {
  overflow: hidden;
}

/* ---------- Desktop: hide drawer entirely ---------- */
@media (min-width: 901px) {
  .drawer,
  .drawer-overlay,
  .fab-pair {
    display: none !important;
  }
}
