/* ============================================================
   mega-menu.css
   Premium enterprise mega menu for NAS Services
   Compact · refined · cinematic — sized down for desktop balance
   Test-page scoped (service-cloud.html only)
   ============================================================ */

/* ===========================================
   TRIGGER · "Services" link + chevron toggle
   - Link navigates to its page
   - Chevron toggles the mega menu
   - Hovering the whole group opens the menu
   =========================================== */
.nav-bar .nav-link--mega-group {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  height: 100%;
  padding: 0 2px;
  position: relative;
  color: rgba(255, 255, 255, .78);
  transition: color .2s ease;
}
.nav-bar .nav-link--mega-group:hover,
.nav-bar .nav-link--mega-group.active,
.nav-bar .nav-link--mega-group.is-open { color: var(--c-white); }

/* Underline animation on the wrapper */
.nav-bar .nav-link--mega-group::after {
  content: '';
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: #5EEAD4;
  transform: scaleX(0);
  transform-origin: center;
  transition: transform .5s cubic-bezier(.16,1,.3,1), background .2s ease;
}
.nav-bar .nav-link--mega-group.active::after,
.nav-bar .nav-link--mega-group.is-open::after { transform: scaleX(1); }
.nav-bar .nav-link--mega-group:not(.active):not(.is-open):hover::after {
  transform: scaleX(.65);
  background: rgba(94, 234, 212, .45);
}

/* "Services" text link */
.nav-bar .nav-link-text {
  display: inline-flex;
  align-items: center;
  height: 100%;
  padding: 0;
  color: inherit;
  font-family: inherit;
  font-size: .95rem;
  font-weight: 500;
  letter-spacing: -.005em;
  text-decoration: none;
  transition: color .2s ease;
}
.nav-bar .nav-link-text:hover { color: var(--c-white); }

/* Chevron toggle button */
.nav-bar .nav-chev-btn {
  background: transparent;
  border: 0;
  cursor: pointer;
  padding: 4px 5px;
  margin-left: 1px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .55);
  border-radius: 6px;
  transition: background .2s ease, color .2s ease;
}
.nav-bar .nav-chev-btn:hover {
  background: rgba(255, 255, 255, .06);
  color: var(--c-white);
}
.nav-bar .nav-chev-btn[aria-expanded="true"] { color: #5EEAD4; }
.nav-bar .nav-chev-btn[aria-expanded="true"] .nav-chev { transform: rotate(180deg); }
.nav-bar .nav-chev-btn:focus-visible {
  outline: 2px solid rgba(94, 234, 212, .55);
  outline-offset: 2px;
}

.nav-bar .nav-chev {
  width: 10px; height: 10px;
  display: block;
  transition: transform .3s cubic-bezier(.22,.61,.36,1);
}

/* ===========================================
   BACKDROP · subtle dim under the menu
   =========================================== */
.mega-backdrop {
  position: fixed;
  inset: 78px 0 0 0;
  background: rgba(8, 22, 50, .32);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 280ms cubic-bezier(.22,.61,.36,1);
  z-index: 94;
}
.mega-backdrop.is-open { opacity: 1; pointer-events: auto; }

/* ===========================================
   OVERLAY · the mega menu container
   =========================================== */
.mega-overlay {
  position: fixed;
  top: 78px;
  left: 0;
  right: 0;
  z-index: 95;
  pointer-events: none;
  opacity: 0;
  transform: translateY(-10px);
  transition: opacity 260ms cubic-bezier(.22,.61,.36,1),
              transform 320ms cubic-bezier(.16,1,.3,1);
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.mega-overlay.is-open {
  pointer-events: auto;
  opacity: 1;
  transform: translateY(0);
}

.mega-inner {
  position: relative;
  max-width: 1160px;
  margin: 0 auto;
  padding: 26px clamp(18px, 3vw, 32px) 20px;
  background:
    linear-gradient(180deg, #0B1E3F 0%, #0E2348 70%, #0C1F40 100%);
  border: 1px solid rgba(94, 234, 212, .12);
  border-top: none;
  border-radius: 0 0 22px 22px;
  box-shadow:
    0 24px 64px rgba(8, 22, 50, .42),
    0 0 0 1px rgba(255, 255, 255, .03),
    inset 0 1px 0 rgba(255, 255, 255, .04);
  isolation: isolate;
  overflow: hidden;
}

/* Blueprint grid overlay */
.mega-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(94, 234, 212, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, var(--c-black), transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, var(--c-black), transparent 95%);
  pointer-events: none;
  z-index: 1;
}

/* Top accent line — gradient sweep */
.mega-inner::before {
  content: '';
  position: absolute;
  top: 0;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(90deg, transparent 0%, rgba(94, 234, 212, .5) 35%, rgba(255, 107, 53, .5) 65%, transparent 100%);
  pointer-events: none;
  z-index: 2;
}

/* Floating orange accent — drifts subtly */
.mega-inner::after {
  content: '';
  position: absolute;
  top: 28%;
  right: -100px;
  width: 260px;
  height: 260px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, .12), transparent 65%);
  pointer-events: none;
  z-index: 1;
  filter: blur(28px);
  animation: megaDrift 14s ease-in-out infinite;
}
@keyframes megaDrift {
  0%, 100% { transform: translate(0, 0); }
  50%      { transform: translate(-36px, 24px); }
}

/* Cursor-reactive light */
.mega-glow {
  position: absolute;
  width: 420px;
  height: 420px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(30, 99, 233, .22), transparent 60%);
  pointer-events: none;
  z-index: 1;
  filter: blur(44px);
  opacity: 0;
  transform: translate(-50%, -50%);
  transition: opacity 320ms ease-out;
  left: 50%;
  top: 50%;
  will-change: transform, left, top;
}
.mega-overlay.is-open .mega-glow { opacity: 1; }

/* ===========================================
   COLUMNS LAYOUT
   =========================================== */
.mega-cols {
  position: relative;
  z-index: 3;
  display: grid;
  grid-template-columns: 1fr 1.45fr 1fr;
  gap: 28px;
}

/* 2-column variant — used by the Solutions + Industries mega menu */
.mega-cols--2 {
  grid-template-columns: 1.55fr 1fr;
  gap: 36px;
}

/* single-column variant — used by the Solutions mega menu */
.mega-cols--1 {
  grid-template-columns: 1fr;
  gap: 28px;
}
.mega-col--wide { position: relative; }
.mega-col--wide::after {
  content: '';
  position: absolute;
  top: 8px; bottom: 8px;
  right: -18px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.07) 30%, rgba(255,255,255,.07) 70%, transparent);
}

/* 2-column grid for the 8 solutions inside the Solutions column */
.mega-grid-2col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px 12px;
}

/* "All Solutions" / "All Industries" launcher row */
.mega-item--all {
  background: linear-gradient(135deg, rgba(94, 234, 212, .08), rgba(30, 99, 233, .08));
  border: 1px solid rgba(94, 234, 212, .18);
  margin-bottom: 10px;
}
.mega-item--all .mega-title { color: #5EEAD4; }
.mega-item--all .mega-icon {
  background: linear-gradient(135deg, rgba(30, 99, 233, .26), rgba(94, 234, 212, .18));
  color: #5EEAD4;
  border-color: rgba(94, 234, 212, .35);
}
.mega-item--all:hover {
  background: linear-gradient(135deg, rgba(94, 234, 212, .14), rgba(30, 99, 233, .12));
  border-color: rgba(94, 234, 212, .32);
}

/* secondary pill colour variant */
.mega-cat-pill--alt {
  color: #5EEAD4;
  background: rgba(94, 234, 212, .14);
  border-color: rgba(94, 234, 212, .28);
}

.mega-col {
  opacity: 0;
  transform: translateY(8px);
  transition: opacity 320ms cubic-bezier(.22,.61,.36,1),
              transform 380ms cubic-bezier(.16,1,.3,1);
}
.mega-overlay.is-open .mega-col { opacity: 1; transform: translateY(0); }
.mega-overlay.is-open .mega-col:nth-child(1) { transition-delay: 60ms; }
.mega-overlay.is-open .mega-col:nth-child(2) { transition-delay: 110ms; }
.mega-overlay.is-open .mega-col:nth-child(3) { transition-delay: 160ms; }

/* Column 2 (featured) — faint vertical dividers */
.mega-col--featured { position: relative; }
.mega-col--featured::before,
.mega-col--featured::after {
  content: '';
  position: absolute;
  top: 8px; bottom: 8px;
  width: 1px;
  background: linear-gradient(180deg, transparent, rgba(255,255,255,.07) 30%, rgba(255,255,255,.07) 70%, transparent);
}
.mega-col--featured::before { left: -14px; }
.mega-col--featured::after  { right: -14px; }

/* ===========================================
   CATEGORY HEADER
   =========================================== */
.mega-cat {
  display: flex;
  align-items: center;
  gap: 9px;
  margin-bottom: 16px;
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.mega-cat-dot {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: #1E63E9;
  box-shadow: 0 0 0 3px rgba(30, 99, 233, .14);
  flex-shrink: 0;
}
.mega-cat-dot--accent {
  background: #FF6B35;
  box-shadow: 0 0 0 3px rgba(255, 107, 53, .18);
}
.mega-cat-label {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 10px;
  font-weight: 600;
  color: rgba(255, 255, 255, .62);
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mega-cat-pill {
  margin-left: auto;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  color: #FF6B35;
  background: rgba(255, 107, 53, .14);
  border: 1px solid rgba(255, 107, 53, .25);
  padding: 3px 7px;
  border-radius: 999px;
  letter-spacing: .14em;
  text-transform: uppercase;
}

/* ===========================================
   SERVICE ITEMS
   =========================================== */
.mega-item {
  display: grid;
  grid-template-columns: 34px 1fr;
  gap: 12px;
  padding: 9px 12px;
  margin: 0 -12px;
  border-radius: 10px;
  text-decoration: none;
  color: inherit;
  position: relative;
  transition:
    background .26s cubic-bezier(.22,.61,.36,1),
    transform .26s cubic-bezier(.16,1,.3,1);
  align-items: center;
}
.mega-item + .mega-item { margin-top: 2px; }

.mega-item:hover,
.mega-item:focus-visible {
  background: rgba(255, 255, 255, .04);
  transform: translateX(3px);
  outline: none;
}

/* Left accent stripe on hover — subtle premium signal */
.mega-item::before {
  content: '';
  position: absolute;
  left: 4px;
  top: 50%;
  width: 2px;
  height: 0;
  background: linear-gradient(180deg, #5EEAD4, #1E63E9);
  border-radius: 2px;
  transform: translateY(-50%);
  transition: height .26s cubic-bezier(.16,1,.3,1);
}
.mega-item:hover::before,
.mega-item:focus-visible::before { height: 60%; }

/* Right arrow indicator on hover */
.mega-item::after {
  content: '';
  position: absolute;
  right: 12px;
  top: 50%;
  width: 12px;
  height: 12px;
  transform: translateY(-50%) translateX(-4px);
  opacity: 0;
  background: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none'><path d='M2.5 8 H13 M9 4 L13 8 L9 12' stroke='%235EEAD4' stroke-width='1.6' fill='none' stroke-linecap='round' stroke-linejoin='round'/></svg>") center/contain no-repeat;
  transition: opacity .22s ease, transform .26s cubic-bezier(.16,1,.3,1);
}
.mega-item:hover::after { opacity: 1; transform: translateY(-50%) translateX(0); }

.mega-icon {
  width: 34px;
  height: 34px;
  border-radius: 10px;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .08);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: rgba(255, 255, 255, .76);
  transition:
    background .26s ease,
    color .26s ease,
    border-color .26s ease,
    transform .26s cubic-bezier(.16,1,.3,1);
  flex-shrink: 0;
}
.mega-icon svg { width: 17px; height: 17px; }

.mega-item:hover .mega-icon {
  background: linear-gradient(135deg, rgba(30, 99, 233, .22), rgba(94, 234, 212, .14));
  color: #5EEAD4;
  border-color: rgba(94, 234, 212, .32);
  transform: scale(1.04);
}

/* Current page indicator */
.mega-item.is-current {
  background: rgba(94, 234, 212, .06);
}
.mega-item.is-current .mega-icon {
  background: linear-gradient(135deg, rgba(30, 99, 233, .22), rgba(94, 234, 212, .14));
  color: #5EEAD4;
  border-color: rgba(94, 234, 212, .32);
}
.mega-item.is-current::before { height: 60%; }
.mega-feature.is-current {
  border-color: rgba(94, 234, 212, .5);
}
.mega-feature.is-current::after {
  content: 'You are here';
  position: absolute;
  top: 14px;
  right: 18px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  color: #5EEAD4;
  background: rgba(94, 234, 212, .15);
  border: 1px solid rgba(94, 234, 212, .35);
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .14em;
  text-transform: uppercase;
  z-index: 2;
}

.mega-text {
  display: grid;
  gap: 3px;
  min-width: 0;
}
.mega-title {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-size: .9rem;
  font-weight: 600;
  color: var(--c-white);
  letter-spacing: -.005em;
  line-height: 1.2;
}
.mega-desc {
  font-family: 'Inter', sans-serif;
  font-size: .74rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .56);
  line-height: 1.4;
  letter-spacing: -.002em;
}

/* Compact variant */
.mega-item--compact {
  grid-template-columns: 26px 1fr;
  gap: 10px;
  padding: 7px 10px;
  margin: 0 -10px;
}
.mega-item--compact .mega-icon {
  width: 26px;
  height: 26px;
  border-radius: 7px;
}
.mega-item--compact .mega-icon svg { width: 14px; height: 14px; }
.mega-item--compact .mega-title { font-size: .82rem; }
.mega-item--compact .mega-desc { font-size: .7rem; line-height: 1.35; }
.mega-item--compact + .mega-item--compact { margin-top: 0; }
.mega-item--compact::after { right: 10px; width: 10px; height: 10px; }
.mega-item--compact::before { left: 3px; }

/* ===========================================
   FEATURED CARD
   =========================================== */
.mega-feature {
  position: relative;
  display: block;
  margin: 0 -3px 14px;
  padding: 18px 20px;
  border-radius: 13px;
  background:
    linear-gradient(160deg, rgba(30, 99, 233, .24) 0%, rgba(94, 234, 212, .07) 50%, rgba(255, 107, 53, .12) 100%);
  border: 1px solid rgba(94, 234, 212, .2);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  isolation: isolate;
  transition:
    transform .35s cubic-bezier(.16,1,.3,1),
    border-color .3s ease,
    box-shadow .35s ease;
}
.mega-feature:hover {
  transform: translateY(-2px);
  border-color: rgba(94, 234, 212, .42);
  box-shadow: 0 16px 36px rgba(8, 22, 50, .42);
}

.mega-feature::before {
  content: '';
  position: absolute;
  top: -40px; right: -40px;
  width: 180px; height: 180px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(94, 234, 212, .2), transparent 65%);
  pointer-events: none;
  z-index: 0;
  animation: featureBreathe 4.5s ease-in-out infinite;
}
@keyframes featureBreathe {
  0%, 100% { transform: scale(1); opacity: .85; }
  50%      { transform: scale(1.1); opacity: 1; }
}

.mega-feature-bg {
  position: absolute;
  right: 12px;
  top: 50%;
  transform: translateY(-50%);
  width: 100px;
  height: 70px;
  opacity: .9;
  pointer-events: none;
  z-index: 0;
}
.mega-feature-bg svg { width: 100%; height: 100%; display: block; }

.mega-feature-tag {
  position: relative;
  z-index: 1;
  display: inline-flex;
  align-items: center;
  gap: 5px;
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 8.5px;
  font-weight: 700;
  color: #5EEAD4;
  background: rgba(94, 234, 212, .14);
  border: 1px solid rgba(94, 234, 212, .28);
  padding: 4px 8px;
  border-radius: 999px;
  letter-spacing: .14em;
  text-transform: uppercase;
  margin-bottom: 10px;
}
.mega-feature-tag::before {
  content: '';
  width: 4px;
  height: 4px;
  border-radius: 50%;
  background: #5EEAD4;
  box-shadow: 0 0 5px rgba(94, 234, 212, .8);
  animation: tagPulse 1.6s ease-in-out infinite;
}
@keyframes tagPulse {
  0%, 100% { opacity: 1; }
  50%      { opacity: .35; }
}

.mega-feature-title {
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: 1.08rem;
  font-weight: 700;
  color: var(--c-white);
  margin: 0 0 6px;
  letter-spacing: -.015em;
  line-height: 1.15;
}
.mega-feature-desc {
  position: relative;
  z-index: 1;
  font-family: 'Inter', sans-serif;
  font-size: .76rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .7);
  margin: 0 0 12px;
  line-height: 1.45;
  max-width: 75%;
}
.mega-feature-cta {
  position: relative;
  z-index: 1;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem;
  font-weight: 700;
  color: #5EEAD4;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: gap .25s ease, color .2s ease;
}
.mega-feature-cta::after {
  content: '→';
  font-size: 1rem;
  transition: transform .3s cubic-bezier(.16,1,.3,1);
}
.mega-feature:hover .mega-feature-cta::after { transform: translateX(4px); }
.mega-feature:hover .mega-feature-cta { color: var(--c-white); }

/* ===========================================
   FOOTER STRIP
   =========================================== */
.mega-footer {
  position: relative;
  z-index: 3;
  margin-top: 22px;
  padding-top: 16px;
  border-top: 1px solid rgba(255, 255, 255, .06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 20px;
  flex-wrap: wrap;
  opacity: 0;
  transform: translateY(6px);
  transition: opacity 320ms ease-out, transform 320ms ease-out;
}
.mega-overlay.is-open .mega-footer {
  opacity: 1;
  transform: translateY(0);
  transition-delay: 240ms;
}

.mega-footer-left {
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.mega-footer-eyebrow {
  font-family: 'JetBrains Mono', ui-monospace, monospace;
  font-size: 9.5px;
  font-weight: 700;
  color: #FF6B35;
  letter-spacing: .14em;
  text-transform: uppercase;
}
.mega-footer-text {
  font-family: 'Inter', sans-serif;
  font-size: .84rem;
  font-weight: 500;
  color: rgba(255, 255, 255, .78);
  line-height: 1.45;
}
.mega-footer-text strong { color: var(--c-white); font-weight: 600; }

.mega-footer-right {
  display: flex;
  gap: 14px;
  align-items: center;
}

.mega-footer-link {
  font-family: 'Space Grotesk', sans-serif;
  font-size: .8rem;
  font-weight: 600;
  color: rgba(255, 255, 255, .68);
  text-decoration: none;
  padding: 8px 0;
  transition: color .2s ease;
}
.mega-footer-link:hover { color: #5EEAD4; }

.mega-footer-cta {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-family: 'Space Grotesk', sans-serif;
  font-size: .85rem;
  font-weight: 700;
  color: #0B1E3F;
  background: #5EEAD4;
  padding: 10px 18px;
  border-radius: 999px;
  text-decoration: none;
  transition:
    transform .26s cubic-bezier(.16,1,.3,1),
    background .25s ease,
    box-shadow .3s ease;
  box-shadow: 0 6px 18px -6px rgba(94, 234, 212, .5);
  letter-spacing: -.005em;
}
.mega-footer-cta:hover {
  background: #34D5BD;
  transform: translateY(-1px);
  box-shadow: 0 10px 26px -8px rgba(94, 234, 212, .6);
}
.mega-footer-cta svg { width: 13px; height: 13px; }

/* ===========================================
   RESPONSIVE
   =========================================== */
@media (max-width: 1080px) {
  .mega-cols { grid-template-columns: 1fr 1.3fr 1fr; gap: 22px; }
  .mega-cols--2 { grid-template-columns: 1.4fr 1fr; gap: 28px; }
  .mega-col--featured::before { left: -11px; }
  .mega-col--featured::after  { right: -11px; }
  .mega-col--wide::after { right: -14px; }
  .mega-feature-desc { max-width: 100%; }
  .mega-feature-bg { display: none; }
  .mega-grid-2col { grid-template-columns: 1fr; }
}

@media (max-width: 880px) {
  .mega-inner {
    padding: 18px 16px;
    border-radius: 0 0 18px 18px;
    max-height: calc(100vh - 78px - 16px);
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }
  .mega-cols,
  .mega-cols--2 { grid-template-columns: 1fr; gap: 18px; }
  .mega-col--featured::before,
  .mega-col--featured::after,
  .mega-col--wide::after { display: none; }
  .mega-cat { margin-bottom: 12px; padding-bottom: 10px; }
  .mega-feature { padding: 16px; }
  .mega-feature-title { font-size: 1rem; }

  .mega-footer { margin-top: 18px; padding-top: 14px; flex-direction: column; align-items: stretch; gap: 12px; }
  .mega-footer-right { justify-content: flex-end; }
  .mega-footer-cta { justify-content: center; }
}

@media (prefers-reduced-motion: reduce) {
  .mega-overlay,
  .mega-col,
  .mega-footer { transition-duration: .12s !important; }
  .mega-inner::after,
  .mega-feature::before,
  .mega-feature-tag::before { animation: none !important; }
}


/* ===========================================
   MOBILE MENU  ·  hamburger + slide-in drawer
   =========================================== */
.mobile-menu-toggle {
  display: none;
  width: 40px; height: 40px;
  padding: 0;
  margin-left: 6px;
  background: rgba(255, 255, 255, .06);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 10px;
  cursor: pointer;
  position: relative;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 5px;
  transition: background .2s ease, border-color .2s ease;
  z-index: 110;
  justify-self: end;
  align-self: center;
}
.mobile-menu-toggle:hover { background: rgba(255, 255, 255, .12); border-color: rgba(255, 255, 255, .3); }
.mobile-menu-toggle .mm-bar {
  display: block;
  width: 18px; height: 2px;
  background: var(--c-white);
  border-radius: 1px;
  transition: transform .32s cubic-bezier(.22,.61,.36,1), opacity .2s ease;
  transform-origin: center;
}
.mobile-menu-toggle.is-active .mm-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.mobile-menu-toggle.is-active .mm-bar:nth-child(2) { opacity: 0; }
.mobile-menu-toggle.is-active .mm-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

@media (max-width: 880px) {
  .mobile-menu-toggle { display: inline-flex; }
}

/* Drawer wrapper — full viewport, above nav-bar */
.mobile-drawer {
  position: fixed;
  inset: 0;
  z-index: 9999;
  pointer-events: none;
  font-family: 'Inter', system-ui, -apple-system, sans-serif;
}
.mobile-drawer.is-open { pointer-events: auto; }

/* Backdrop dim/blur — fades in with drawer */
.mobile-drawer .md-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(8, 22, 50, .55);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 0;
  transition: opacity 280ms cubic-bezier(.22,.61,.36,1);
  cursor: pointer;
}
.mobile-drawer.is-open .md-backdrop { opacity: 1; }

/* Panel slides in from right */
.mobile-drawer .md-panel {
  position: absolute;
  top: 0; right: 0; bottom: 0;
  width: min(360px, 92vw);
  background: linear-gradient(180deg, #0B1E3F 0%, #0E2348 70%, #0C1F40 100%);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  box-shadow: -24px 0 64px rgba(8, 22, 50, .42);
  transform: translateX(100%);
  transition: transform 360ms cubic-bezier(.16,1,.3,1);
}
.mobile-drawer.is-open .md-panel { transform: translateX(0); }
.mobile-drawer .md-panel::before {
  content: '';
  position: absolute; inset: 0;
  background-image:
    linear-gradient(rgba(94, 234, 212, .05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(94, 234, 212, .05) 1px, transparent 1px);
  background-size: 28px 28px;
  mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, var(--c-black), transparent 95%);
  -webkit-mask-image: radial-gradient(ellipse 80% 100% at 50% 0%, var(--c-black), transparent 95%);
  pointer-events: none;
}
.mobile-drawer .md-panel::after {
  content: '';
  position: absolute; top: -60px; right: -100px;
  width: 260px; height: 260px; border-radius: 50%;
  background: radial-gradient(circle, rgba(255, 107, 53, .12), transparent 65%);
  filter: blur(28px);
  pointer-events: none;
}

/* Drawer header — sticky so close button stays reachable while scrolling */
.mobile-drawer .md-head {
  position: sticky;
  top: 0;
  z-index: 4;
  display: flex; align-items: center; justify-content: space-between;
  padding: 18px 20px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  background: linear-gradient(180deg, #0B1E3F 0%, rgba(11, 30, 63, .92) 100%);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
}
.mobile-drawer .md-brand { text-decoration: none; display: inline-flex; }
.mobile-drawer .md-wordmark {
  font-family: 'Manrope', 'Inter', sans-serif;
  font-weight: 800;
  font-size: 1.2rem;
  color: var(--c-white);
  letter-spacing: -.05em;
}
.mobile-drawer .md-close {
  width: 36px; height: 36px;
  display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .14);
  border-radius: 10px;
  color: var(--c-white);
  cursor: pointer;
  transition: background .2s ease, border-color .2s ease, transform .2s ease;
}
.mobile-drawer .md-close:hover { background: rgba(255, 107, 53, .15); border-color: rgba(255, 107, 53, .4); }
.mobile-drawer .md-close svg { width: 18px; height: 18px; }

/* Drawer nav (accordion) — flows naturally inside the scrollable panel */
.mobile-drawer .md-nav {
  position: relative; z-index: 2;
  padding: 8px 14px 14px;
}

/* Top-level flat link (Home) — matches accordion section look but no chevron / no expand */
.mobile-drawer .md-flat {
  display: flex;
  align-items: center;
  padding: 16px 6px;
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-white);
  text-decoration: none;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  letter-spacing: -.01em;
  transition: color .2s ease, padding-left .2s ease;
}
.mobile-drawer .md-flat:hover,
.mobile-drawer .md-flat:focus-visible {
  color: #5EEAD4;
  padding-left: 10px;
  outline: none;
}
.mobile-drawer .md-group {
  border-bottom: 1px solid rgba(255, 255, 255, .06);
  padding: 4px 0;
}
.mobile-drawer .md-group summary {
  list-style: none;
  cursor: pointer;
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px 6px;
  user-select: none;
}
.mobile-drawer .md-group summary::-webkit-details-marker { display: none; }
.mobile-drawer .md-cat {
  font-family: 'Space Grotesk', 'Inter', sans-serif;
  font-weight: 700;
  font-size: 1.05rem;
  color: var(--c-white);
  letter-spacing: -.01em;
}
.mobile-drawer .md-chev {
  width: 12px; height: 12px;
  color: rgba(255, 255, 255, .55);
  transition: transform .3s cubic-bezier(.22,.61,.36,1), color .2s ease;
}
.mobile-drawer .md-group[open] .md-chev {
  transform: rotate(180deg);
  color: #5EEAD4;
}
.mobile-drawer .md-list {
  list-style: none;
  margin: 0;
  padding: 2px 0 14px 6px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.mobile-drawer .md-list a {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 12px;
  color: rgba(255, 255, 255, .76);
  font-size: .94rem;
  font-weight: 500;
  text-decoration: none;
  border-radius: 8px;
  transition: background .2s ease, color .2s ease, transform .2s ease;
  position: relative;
}
.mobile-drawer .md-list a:hover,
.mobile-drawer .md-list a:focus-visible {
  color: var(--c-white);
  background: rgba(255, 255, 255, .05);
  transform: translateX(3px);
  outline: none;
}
.mobile-drawer .md-arr {
  font-family: 'JetBrains Mono', monospace;
  color: #5EEAD4;
  font-weight: 700;
}

/* Drawer footer — sits naturally after the nav (no fixed positioning) */
.mobile-drawer .md-foot {
  position: relative; z-index: 2;
  padding: 18px 20px 22px;
  margin-top: 8px;
  border-top: 1px solid rgba(255, 255, 255, .08);
  display: flex; flex-direction: column; gap: 12px;
}

.mobile-drawer .md-lang {
  display: flex;
  width: 100%;
  background: rgba(255, 255, 255, .04);
  border: 1px solid rgba(255, 255, 255, .18);
  border-radius: 999px;
  padding: 4px;
}
.mobile-drawer .md-lang-opt {
  flex: 1;
  background: transparent;
  border: none;
  color: rgba(255, 255, 255, .7);
  font-family: inherit;
  font-size: .9rem;
  font-weight: 600;
  padding: 10px 14px;
  border-radius: 999px;
  cursor: pointer;
  transition: background .2s ease, color .2s ease;
  letter-spacing: .02em;
}
.mobile-drawer .md-lang-opt:hover { color: var(--c-white); }
.mobile-drawer .md-lang-opt.active {
  background: rgba(255, 255, 255, .14);
  color: var(--c-white);
}

.mobile-drawer .md-cta {
  width: 100%;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  background: #5EEAD4;
  color: #0B1E3F;
  padding: 14px 22px;
  border-radius: 999px;
  font-family: 'Inter', sans-serif;
  font-weight: 700;
  font-size: .98rem;
  text-decoration: none;
  transition: background .2s ease, transform .2s cubic-bezier(.16,1,.3,1), box-shadow .2s ease;
  box-shadow: 0 6px 18px -6px rgba(94, 234, 212, .5);
}
.mobile-drawer .md-cta:hover { background: #34D5BD; transform: translateY(-1px); box-shadow: 0 12px 24px -8px rgba(94, 234, 212, .6); }
.mobile-drawer .md-cta svg { width: 15px; height: 15px; }

.mobile-drawer .md-foot-social {
  display: flex; justify-content: center; gap: 12px;
  padding-top: 6px;
}
.mobile-drawer .md-foot-social a {
  display: inline-flex; align-items: center; justify-content: center;
  width: 36px; height: 36px;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, .18);
  color: rgba(255, 255, 255, .76);
  text-decoration: none;
  transition: background .2s ease, border-color .2s ease, color .2s ease, transform .2s cubic-bezier(.16,1,.3,1);
}
.mobile-drawer .md-foot-social a:hover {
  background: rgba(94, 234, 212, .1);
  border-color: rgba(94, 234, 212, .4);
  color: #5EEAD4;
  transform: translateY(-2px);
}
.mobile-drawer .md-foot-social svg { width: 14px; height: 14px; }

/* On mobile, the existing _nas-shared rule already hides .talk-btn-area content;
   make sure the desktop Talk-to-sales is still visible on mobile narrow */
@media (max-width: 880px) {
  .nav-bar .talk-btn { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  .mobile-menu-toggle .mm-bar { transition: none; }
}

html[dir="rtl"] .mega-feature-bg {
  right: auto;
  left: 12px;
}
