/* ════════════════════════════════════════════════════════════════
   ss-nav.css — sitewide mobile/tablet navigation drawer (2026-06)
   One drawer for every header system (homepage app, cp-topbar,
   services/company routes, method bar). Desktop is untouched: the
   hamburger only exists where each page's own nav links are hidden.
   ════════════════════════════════════════════════════════════════ */

:root {
  --ssn-lime: #cfff00;
  --ssn-ink: #0e0f10;
  --ssn-bone: #f4f1ea;
}

/* ── Hamburger button ── */
.ssn-burger {
  display: none;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  min-width: 44px;
  margin-left: 6px;
  padding: 0;
  background: transparent;
  border: 0;
  border-radius: 10px;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
  z-index: 5;
}
.ssn-burger:active { transform: scale(.94); }
.ssn-burger svg { width: 24px; height: 24px; display: block; }
.ssn-burger .ssn-x { display: none; }

/* Floating fallback when no topbar is found to mount into */
.ssn-burger.ssn-floating {
  position: fixed;
  top: 14px;
  right: 14px;
  z-index: 1200;
  background: rgba(14, 15, 16, .85);
  color: var(--ssn-bone);
  backdrop-filter: blur(8px);
  border: 1px solid rgba(244, 241, 234, .14);
  box-shadow: 0 4px 18px rgba(0, 0, 0, .25);
}

/* Show the burger only when the page's own nav links are hidden */
@media (max-width: 900px) {
  .ssn-burger { display: inline-flex; }
}

/* ── Drawer ── */
.ssn-drawer {
  position: fixed;
  inset: 0;
  z-index: 1300;
  display: flex;
  flex-direction: column;
  background: var(--ssn-ink);
  color: var(--ssn-bone);
  padding: max(16px, env(safe-area-inset-top)) 22px max(24px, env(safe-area-inset-bottom));
  transform: translateY(-103%);
  transition: transform .28s cubic-bezier(.32, .72, .28, 1);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  visibility: hidden;
}
.ssn-drawer.open { transform: translateY(0); visibility: visible; }

html.ssn-locked, html.ssn-locked body { overflow: hidden !important; }

/* Drawer header */
.ssn-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 52px;
  margin-bottom: 4vh;
}
.ssn-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--ssn-bone);
  text-decoration: none;
  font: 600 17px/1 'Inter Tight', 'Inter', system-ui, sans-serif;
  letter-spacing: -.01em;
}
.ssn-brand svg { width: 22px; height: 22px; }
.ssn-close {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  background: rgba(244, 241, 234, .07);
  border: 1px solid rgba(244, 241, 234, .12);
  border-radius: 12px;
  color: var(--ssn-bone);
  cursor: pointer;
}
.ssn-close svg { width: 18px; height: 18px; }

/* Nav links — big, thumb-friendly */
.ssn-links { display: flex; flex-direction: column; }
.ssn-links a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 17px 4px;
  border-bottom: 1px solid rgba(244, 241, 234, .09);
  color: var(--ssn-bone);
  text-decoration: none;
  font: 500 clamp(21px, 5.6vw, 26px)/1.2 'Inter Tight', 'Inter', system-ui, sans-serif;
  letter-spacing: -.02em;
  opacity: 0;
  transform: translateY(8px);
  transition: opacity .3s ease, transform .3s ease;
}
.ssn-drawer.open .ssn-links a { opacity: 1; transform: none; }
.ssn-drawer.open .ssn-links a:nth-child(1) { transition-delay: .04s; }
.ssn-drawer.open .ssn-links a:nth-child(2) { transition-delay: .08s; }
.ssn-drawer.open .ssn-links a:nth-child(3) { transition-delay: .12s; }
.ssn-drawer.open .ssn-links a:nth-child(4) { transition-delay: .16s; }
.ssn-drawer.open .ssn-links a:nth-child(5) { transition-delay: .20s; }
.ssn-drawer.open .ssn-links a:nth-child(6) { transition-delay: .24s; }
.ssn-links a .ssn-arrow {
  font-size: 18px;
  color: rgba(244, 241, 234, .35);
  transition: transform .15s, color .15s;
}
.ssn-links a:active .ssn-arrow { transform: translateX(4px); color: var(--ssn-lime); }
.ssn-links a[aria-current="page"] { color: var(--ssn-lime); }

/* CTA block — pinned visually at the bottom of the link stack */
.ssn-cta-wrap {
  margin-top: auto;
  padding-top: 5vh;
  display: flex;
  flex-direction: column;
  gap: 10px;
}
.ssn-cta {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-height: 54px;
  background: var(--ssn-lime);
  color: var(--ssn-ink);
  border-radius: 14px;
  text-decoration: none;
  font: 600 17px/1 'Inter Tight', 'Inter', system-ui, sans-serif;
  letter-spacing: -.01em;
}
.ssn-cta:active { transform: scale(.985); }
.ssn-whatsapp {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  min-height: 50px;
  background: rgba(37, 211, 102, .12);
  border: 1px solid rgba(37, 211, 102, .35);
  color: #46e07e;
  border-radius: 14px;
  text-decoration: none;
  font: 500 15px/1 'Inter Tight', 'Inter', system-ui, sans-serif;
}
.ssn-whatsapp svg { width: 19px; height: 19px; }
.ssn-foot {
  margin-top: 14px;
  display: flex;
  justify-content: center;
  gap: 18px;
  font: 400 12px/1 ui-monospace, monospace;
  letter-spacing: .06em;
  color: rgba(244, 241, 234, .45);
}
.ssn-foot a { color: inherit; text-decoration: none; }
.ssn-foot a:active { color: var(--ssn-lime); }

/* When the drawer is open, swap the burger icon to an X (for the
   floating variant that stays visible above the drawer) */
.ssn-burger[aria-expanded="true"] .ssn-bars { display: none; }
.ssn-burger[aria-expanded="true"] .ssn-x { display: block; }

/* Tablet (601–900px): drawer becomes a right-side sheet, not full-screen */
@media (min-width: 601px) and (max-width: 900px) {
  .ssn-drawer {
    left: auto;
    width: min(380px, 86vw);
    transform: translateX(103%);
    box-shadow: -12px 0 40px rgba(0, 0, 0, .35);
  }
  .ssn-drawer.open { transform: translateX(0); }
  .ssn-scrim {
    position: fixed;
    inset: 0;
    z-index: 1290;
    background: rgba(10, 11, 12, .45);
    opacity: 0;
    pointer-events: none;
    transition: opacity .25s;
  }
  .ssn-scrim.open { opacity: 1; pointer-events: auto; }
}
@media (max-width: 600px) {
  .ssn-scrim { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .ssn-drawer, .ssn-links a, .ssn-scrim { transition: none !important; }
}
