/* Main menu (assets/js/navmenu.js). */
.mn {
  position: relative; align-self: stretch; align-items: center;
  font-family: var(--mag-sans);
}
.mn-list { position: relative; display: flex; align-items: center; gap: 2px; margin: 0; padding: 0; list-style: none; }
/* Position and size are sprung by the script; only the fade is CSS. */
.mn-hl {
  position: absolute; left: 0; top: 0; z-index: 0; border-radius: 8px; background: rgba(11, 29, 51, 0.06); pointer-events: none; opacity: 0;
  will-change: transform; transition: opacity 80ms ease;
}
.mn-hl.is-on { opacity: 1; }
.mn-item { position: relative; z-index: 1; }
.mn-trigger, .mn-link {
  display: inline-flex; align-items: center; height: 32px; padding: 0 12px; border-radius: 8px;
  font-size: 12px; font-weight: 500; letter-spacing: 0.025em; color: #4b5563; white-space: nowrap;
  transition: color 150ms ease;
}
.mn-trigger:hover, .mn-link:hover, .mn-trigger[data-state="open"] { color: #0b0b0c; }
.mn-trigger:focus-visible, .mn-link:focus-visible, .mn-entry:focus-visible { outline: 2px solid #1f4e8c; outline-offset: 2px; }
.mn-chev { margin-left: 5px; transition: transform 260ms cubic-bezier(0.34, 1.4, 0.64, 1); }
.mn-trigger[data-state="open"] .mn-chev { transform: translateY(1px) rotate(180deg); }

/* The shared panel: slides between headings, takes the size of what it shows. */
.mn-pos { position: absolute; top: 100%; left: 0; z-index: 60; padding-top: 6px; will-change: transform; pointer-events: none; }
/* Opening and closing are a quick fade and scale from the heading; moves between
   headings and size changes are sprung by the script. */
.mn-viewport {
  position: relative; width: 0; height: 0; overflow: hidden; opacity: 0; transform: scale(0.97); visibility: hidden;
  background: #fff; border: 1px solid rgba(11, 29, 51, 0.08); border-radius: 14px;
  box-shadow: 0 1px 2px rgba(11, 29, 51, 0.04), 0 18px 44px -18px rgba(11, 29, 51, 0.28);
  contain: layout paint;
  transition: opacity 120ms ease-in, transform 120ms ease-in, visibility 0s 120ms;
}
.mn-viewport.is-open {
  opacity: 1; transform: none; visibility: visible; pointer-events: auto;
  transition: opacity 160ms cubic-bezier(0.23, 1, 0.32, 1), transform 160ms cubic-bezier(0.23, 1, 0.32, 1), visibility 0s;
}
.mn-content { position: absolute; top: 0; left: 0; width: max-content; padding: 8px; }
.mn-content[hidden] { display: none; }
.mn-hl-in {
  position: absolute; left: 0; top: 0; z-index: 0; border-radius: 10px; background: rgba(11, 29, 51, 0.05); pointer-events: none; opacity: 0;
  will-change: transform; transition: opacity 80ms ease;
}
.mn-hl-in.is-on { opacity: 1; }

.mn-entry { position: relative; z-index: 1; display: flex; flex-direction: column; gap: 3px; padding: 10px 12px; border-radius: 10px; color: #0b0b0c; text-decoration: none; }
.mn-entry strong { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 600; }
.mn-entry small { font-size: 12px; line-height: 1.45; color: #5b6b7e; }
.mn-entry svg { width: 15px; height: 15px; color: #5b6b7e; flex: none; }

.mn-product { display: grid; grid-template-columns: 220px 250px; gap: 6px; }
.mn-feature { justify-content: space-between; min-height: 168px; padding: 16px; background: #f5f7f9; }
.mn-feature-mark { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; background: #fff; box-shadow: inset 0 0 0 1px #e6ebf0; }
.mn-feature-agent { width: 26px; height: 26px; }
/* The hero's "MAG Assistant" pill, in index.html. */
.pill-agent { width: 16px; height: 16px; }
.mn-feature strong { font-size: 14px; }
.mn-feature em { margin-top: 6px; font-style: normal; font-size: 12px; font-weight: 600; color: #0b0b0c; }
.mn-col { display: flex; flex-direction: column; gap: 2px; }
.mn-resources { display: flex; flex-direction: column; gap: 2px; width: 280px; }

@media (prefers-reduced-motion: reduce) {
  .mn-hl, .mn-hl-in, .mn-viewport, .mn-viewport.is-open, .mn-chev { transition-duration: 0ms; transition-delay: 0ms; }
}
