/* =========================================================
   Domovoi · Shared site navigation
   A consistent two-part bar used across every page:
   - the dark "domovoi" frame (main menu + Free-tools submenu)
   - inspired by the Considered tool-bar treatment
   Requires color/type tokens from colors_and_type.css.
   ========================================================= */

.snav {
  background: var(--plum-800);
  color: var(--milk-50);
  border-bottom: 1px solid rgba(252,251,246,0.12);
  position: relative;
  z-index: 60;
}
.snav-row {
  max-width: 1280px;
  margin: 0 auto;
  min-height: 54px;
  display: flex;
  align-items: center;
  gap: 16px;
  padding: 7px 40px;
}

/* brand / home */
.snav-home {
  display: inline-flex; align-items: center; gap: 8px;
  text-decoration: none; flex-shrink: 0;
}
.snav-home img { width: 30px; height: 30px; object-fit: contain; display: block; }
.snav-home .w {
  font-family: var(--font-display); font-weight: 800; font-size: 21px;
  letter-spacing: -0.03em; color: var(--milk-50); text-transform: lowercase;
}

.snav-sep { color: rgba(252,251,246,0.30); font-weight: 400; flex-shrink: 0; }

/* Free-tools submenu group */
.snav-group { display: inline-flex; align-items: center; gap: 14px; flex-shrink: 0; }
.snav-label {
  font-size: 10.5px; font-weight: 700; letter-spacing: 0.14em;
  text-transform: uppercase; color: var(--butter-300); white-space: nowrap;
}

/* links (used by both submenu + main menu) */
.snav-link {
  font-size: 13.5px; font-weight: 600; color: rgba(252,251,246,0.72);
  text-decoration: none; padding: 4px 1px; white-space: nowrap;
  border-bottom: 2px solid transparent; line-height: 1.2;
  transition: color var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
.snav-link:hover { color: var(--milk-50); }
.snav-link.active { color: var(--milk-50); border-bottom-color: var(--coral-300); }

.snav-spacer { flex: 1 1 16px; }

/* main menu (right) */
.snav-main { display: inline-flex; align-items: center; gap: 16px; flex-shrink: 0; }

/* alpha pill */
.snav-alpha {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 12.5px; font-weight: 700; color: var(--milk-50);
  text-decoration: none; padding: 8px 14px; border-radius: 999px;
  background: rgba(255,201,61,0.12); border: 1px solid rgba(255,201,61,0.4);
  white-space: nowrap; flex-shrink: 0;
  transition: background var(--dur) var(--ease);
}
.snav-alpha:hover { background: rgba(255,201,61,0.22); }
.snav-pulse {
  width: 7px; height: 7px; border-radius: 50%; background: var(--coral-300);
  animation: snav-pulse 2.4s var(--ease) infinite;
}
@keyframes snav-pulse {
  0%   { box-shadow: 0 0 0 0 rgba(242,85,119,0.55); }
  70%  { box-shadow: 0 0 0 8px rgba(242,85,119,0); }
  100% { box-shadow: 0 0 0 0 rgba(242,85,119,0); }
}

/* optional theme toggle that lives in the bar (home page) */
.snav-toggle {
  width: 36px; height: 36px; flex-shrink: 0;
  display: inline-flex; align-items: center; justify-content: center;
  border-radius: 999px; cursor: pointer; padding: 0;
  background: rgba(255,201,61,0.12);
  color: var(--milk-50);
  border: 1px solid rgba(255,201,61,0.4);
  transition: background var(--dur) var(--ease);
}
.snav-toggle:hover { background: rgba(255,201,61,0.22); }
.snav-toggle svg { width: 18px; height: 18px; }
.snav-toggle .icon-sun { display: none; }
.snav-toggle .icon-moon { display: block; }
body.theme-plum .snav-toggle .icon-sun { display: block; }
body.theme-plum .snav-toggle .icon-moon { display: none; }

/* ---- mobile menu ---- */
.snav-burger {
  display: none;
  width: 38px; height: 38px; flex-shrink: 0;
  align-items: center; justify-content: center;
  border-radius: 10px; cursor: pointer; padding: 0;
  background: rgba(252,251,246,0.08);
  color: var(--milk-50);
  border: 1px solid rgba(252,251,246,0.18);
}
.snav-burger svg { width: 20px; height: 20px; }

@media (max-width: 920px) {
  .snav-label, .snav-sep { display: none; }
  .snav-row { gap: 12px; padding: 7px 22px; }
}
@media (max-width: 720px) {
  .snav-burger { display: inline-flex; }
  .snav-group, .snav-main { display: none; }
  .snav-spacer { display: none; }
  .snav-home { margin-right: auto; }
  /* expanded state */
  .snav.open .snav-group,
  .snav.open .snav-main {
    display: flex; flex-direction: column; align-items: flex-start;
    gap: 4px; width: 100%;
  }
  .snav.open .snav-row { flex-wrap: wrap; row-gap: 10px; padding-bottom: 14px; }
  .snav.open .snav-group { order: 3; padding-top: 8px; border-top: 1px solid rgba(252,251,246,0.12); }
  .snav.open .snav-main { order: 2; }
  .snav.open .snav-label { display: block; margin-bottom: 2px; }
  .snav.open .snav-link { font-size: 15px; padding: 6px 0; }
}
