/* Groupart — мобильное меню и доступность движения.
   Поток C плана plan-public-calculator-improvements.md.
   Независимый слой поверх /css/base.css и calculator.css:
   подключается ПОД НИМИ, ничего в них не переопределяет, кроме
   точечных правок по критериям потока C:
   1) burger ≥44×44 (таргет пальцем/клавиатурой);
   2) видимое отличие текущего пункта «Калькулятор» (aria-current="page");
   3) prefers-reduced-motion отключает pageIn и smooth scroll,
      а также переходы мобильного меню.
   Логика (inert, focus trap, фокус-возврат) — в menu.js. */

/* ---------- 1. Burger: минимальный таргет 44×44 ---------- */

.burger {
  min-width: 44px;
  min-height: 44px;
  align-items: center;
  justify-content: center;
}

/* ---------- 2. Текущий пункт навигации ---------- */

/* Десктопная навигация: цвет + жирность + подчёркивание. */
.nav__link[aria-current="page"] {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
  text-underline-offset: 6px;
  text-decoration-thickness: 2px;
  text-decoration-color: var(--accent, #f9ea31);
}

/* Обычная ссылка без aria-current не должна выглядеть как текущая. */
.nav__link:not([aria-current="page"]) { text-decoration: none; }

/* Мобильное меню: цвет + жирность + акцентная линия слева. */
.mobile-menu a[aria-current="page"] {
  color: var(--accent, #f9ea31);
  font-weight: 700;
  border-left: 3px solid var(--accent, #f9ea31);
  padding-left: 12px;
}

/* Видимый фокус только для клавиатуры (не мешает мыши/пальцу). */
.nav__link:focus-visible,
.mobile-menu a:focus-visible,
.burger:focus-visible {
  outline: 2px solid var(--accent, #f9ea31);
  outline-offset: 3px;
}

/* По умолчанию плавное появление страницы и прокрутка. */
html { scroll-behavior: smooth; }
.page-fade { animation: pageIn 0.45s ease-out both; }
@keyframes pageIn {
  from { opacity: 0.35; transform: translateY(6px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- 3. Reduced motion: без pageIn и smooth scroll ---------- */

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto !important; }

  /* pageIn (появление страницы) — выключаем полностью. */
  .page-fade { animation: none !important; }

  /* Переходы меню и burger — тоже без анимации. */
  .mobile-menu,
  .mobile-menu a,
  .burger span {
    transition: none !important;
  }
}
