/* ==========================================================================
   Performator — site navigation (dropdown + burger + mobile menu + footer).
   Shared across the marketing site and SEO pages. Load after page styles.
   ========================================================================== */

/* --- top nav links / dropdown buttons --- */
.nav-links { flex-wrap: nowrap; }
.nav-link,
.nav-btn {
  display: inline-flex; align-items: center; gap: 6px;
  color: var(--muted); font-size: 0.9375rem; text-decoration: none;
  background: none; border: none; font: inherit; cursor: pointer; padding: 6px 0;
  transition: color 140ms var(--ease-out-expo);
}
.nav-link:hover, .nav-btn:hover { color: var(--ink); }
.nav-link.current, .nav-drop.is-current > .nav-btn { color: var(--ink); font-weight: 600; }

.nav-drop { position: relative; }
/* Invisible bridge that keeps :hover alive while the cursor crosses
   from .nav-btn to .drop — prevents the dropdown from vanishing mid‑move */
.nav-drop::after {
  content: ""; position: absolute; top: 100%; left: -6px; right: -6px;
  height: 12px; z-index: calc(var(--z-dropdown) - 1);
}
.nav-caret { flex: none; transition: transform 180ms var(--ease-out-expo); }
.nav-drop.is-open > .nav-btn .nav-caret { transform: rotate(180deg); }

.drop {
  position: absolute; top: calc(100% + 8px); left: 0; min-width: 230px;
  background: var(--bg); border: 1px solid var(--line); border-radius: 14px;
  padding: 6px; box-shadow: 0 16px 36px -12px oklch(0 0 0 / 0.22);
  display: none; flex-direction: column; gap: 2px; z-index: var(--z-dropdown);
}
.nav-drop.is-open > .drop { display: flex; }
@media (hover: hover) and (pointer: fine) {
  .nav-drop:hover > .drop { display: flex; }
}
.drop a {
  padding: 9px 12px; border-radius: 9px; font-size: 0.875rem; color: var(--ink);
  text-decoration: none; white-space: nowrap;
}
.drop a:hover { background: var(--bg-alt); color: var(--primary); }

/* --- burger (mobile) --- */
.nav-burger {
  display: none; flex-direction: column; justify-content: center; gap: 5px;
  width: 44px; height: 44px; border: none; background: none; cursor: pointer;
  margin-left: auto; padding: 0;
}
.nav-burger span {
  width: 20px; height: 2px; border-radius: 2px; background: var(--ink);
  margin-inline: auto; transition: transform 200ms var(--ease-out-expo), opacity 200ms;
}
.nav-burger[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-burger[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-burger[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* --- mobile slide-down panel --- */
.mobile-menu {
  position: absolute; top: 100%; left: 0; right: 0; z-index: var(--z-sticky);
  background: oklch(1 0 0 / 0.96); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft); padding: 8px 0 28px;
  max-height: calc(100dvh - 68px); overflow-y: auto;
}
.mobile-menu[hidden] { display: none; }
.m-group { padding: 16px 0; border-bottom: 1px solid var(--line-soft); }
.m-label {
  font-size: 0.6875rem; color: var(--faint); text-transform: uppercase;
  letter-spacing: 0.06em; font-weight: 620; margin-bottom: 10px;
}
.m-group a { display: block; padding: 8px 0; font-size: 0.9375rem; color: var(--ink); text-decoration: none; }
.m-group a:hover { color: var(--primary); }
.mobile-menu .btn { margin-top: 20px; width: 100%; }

@media (max-width: 900px) {
  .nav-links { display: none; }
  .nav-burger { display: flex; }
}

/* --- cookie notice --- */
.cookie-notice {
  position: fixed; left: var(--sp-4); right: var(--sp-4); bottom: var(--sp-4); z-index: var(--z-toast);
  max-width: 760px; margin-inline: auto;
  display: flex; align-items: center; gap: var(--sp-5); flex-wrap: wrap;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  padding: var(--sp-5) var(--sp-6); box-shadow: var(--sh-2);
}
.cookie-notice p { flex: 1 1 320px; margin: 0; font-size: var(--text-sm); color: var(--muted); line-height: 1.6; }
.cookie-notice a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
.cookie-notice a:hover { color: var(--primary); }
.cookie-notice button { flex: none; }
.cookie-notice[hidden] { display: none; }
@media (max-width: 560px) {
  .cookie-notice { flex-direction: column; align-items: stretch; text-align: center; gap: var(--space-3); padding: var(--space-4); }
  /* In a column flex container the desktop 320px flex-basis becomes height. */
  .cookie-notice p { flex: 0 1 auto; }
  .cookie-notice button { width: 100%; }
}
