/* Общие шрифты, цвета и меню сайта СценКом. Подключается на всех страницах. Пункты меню — в content/home.json */
@font-face { font-family: 'Oswald'; src: url('./fonts/oswald-500.ttf') format('truetype'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('./fonts/oswald-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Oswald'; src: url('./fonts/oswald-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Noto Sans'; src: url('./fonts/noto-400.ttf') format('truetype'); font-weight: 400 500; font-display: swap; }
@font-face { font-family: 'Noto Sans'; src: url('./fonts/noto-600.ttf') format('truetype'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Noto Sans'; src: url('./fonts/noto-700.ttf') format('truetype'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Noto Sans'; src: url('./fonts/noto-800.ttf') format('truetype'); font-weight: 800; font-display: swap; }

:root {
  --blue-500: oklch(60% 0.19 262);
  --blue-100: oklch(93% 0.035 262);
  --gold-500: oklch(76% 0.16 102);
  --coral-500: oklch(67% 0.22 36);
  --ink-900: oklch(18% 0.01 260);
  --paper-50: oklch(98% 0.008 95);
  --line-200: oklch(87% 0.012 95);
  --surface-page: var(--paper-50);
  --surface-accent: var(--blue-500);
  --surface-highlight: var(--gold-500);
  --text-main: var(--ink-900);
  --text-on-accent: var(--paper-50);
  --action-primary: var(--blue-500);
  --action-highlight: var(--gold-500);
  --display: 'Oswald', 'Arial Narrow', sans-serif;
  --body: 'Noto Sans', sans-serif;
  --page-pad: 18px;
  --header-h: 72px;
}

/* шапка закреплена вверху экрана: якоря не прячутся под неё */
html { scroll-padding-top: calc(var(--header-h) + 12px); }
/* место под закреплённую шапку на страницах, кроме главной (там отступ даёт первый экран) */
#site-menu { min-height: var(--header-h); }

/* сброс внутри меню — чтобы оно выглядело одинаково и на страницах со старыми стилями */
.site-header, .mobile-menu { box-sizing: border-box; font-family: var(--body); font-size: 16px; line-height: 1.6; text-align: left; }
.site-header *, .mobile-menu * { box-sizing: border-box; }
.site-header { color: var(--ink-900); }
.site-header a, .mobile-menu a { color: inherit; text-decoration: none; -webkit-tap-highlight-color: transparent; }
.site-header svg, .mobile-menu svg { display: block; }
.site-header button, .mobile-menu button { font: inherit; cursor: pointer; }
.site-header a:focus-visible, .site-header button:focus-visible,
.mobile-menu a:focus-visible, .mobile-menu button:focus-visible { outline: 3px solid var(--coral-500); outline-offset: 4px; }

.site-header {
  position: fixed;
  inset: 0 0 auto;
  z-index: 30;
  height: var(--header-h);
  margin: 0;
  padding: 0 var(--page-pad);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid var(--line-200);
  background: color-mix(in oklch, var(--paper-50) 90%, transparent);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
}
.brand { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; }
.brand-mark { width: 32px; height: 32px; flex: 0 0 auto; }
.brand span { font-family: var(--display); font-weight: 700; font-size: 25px; letter-spacing: .025em; line-height: 1; }
.desktop-nav, .header-link { display: none; }
.menu-button, .mobile-menu-top button {
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  border: 0;
  background: transparent;
  color: inherit;
  transition: transform 180ms ease-out;
}
.menu-button:active, .mobile-menu-top button:active { transform: scale(.9); }
.mobile-menu {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  flex-direction: column;
  padding: 14px var(--page-pad) max(28px, env(safe-area-inset-bottom));
  color: var(--paper-50);
  background: var(--blue-500);
  opacity: 0;
  visibility: hidden;
  transform: translateY(-12px);
  transition: opacity 180ms ease-out, transform 220ms ease-out, visibility 220ms;
}
.mobile-menu.is-open { opacity: 1; visibility: visible; transform: translateY(0); }
.mobile-menu-top { display: flex; justify-content: space-between; align-items: center; }
.mobile-menu nav { margin: auto 0; border-top: 1px solid rgba(255,255,255,.5); }
.mobile-menu nav a {
  min-height: 70px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: 1px solid rgba(255,255,255,.5);
  font-family: var(--display);
  font-size: 28px;
  font-weight: 600;
  text-transform: uppercase;
}
.mobile-menu nav a.is-current { color: var(--gold-500); }
.mobile-menu p { margin: 0; font-size: 14px; line-height: 1.5; }

@media (min-width: 700px) {
  :root { --page-pad: 32px; }
}
@media (min-width: 1024px) {
  :root { --page-pad: 40px; --header-h: 82px; }
  .site-header { display: grid; grid-template-columns: 1fr auto 1fr; }
  .brand-mark { width: 36px; height: 36px; }
  .brand span { font-size: 29px; }
  .desktop-nav { display: flex; align-items: center; gap: 32px; }
  .desktop-nav a { position: relative; min-height: 44px; display: flex; align-items: center; font-size: 13px; font-weight: 600; }
  .desktop-nav a::after { content: ''; position: absolute; left: 0; right: 100%; bottom: 5px; height: 2px; background: var(--blue-500); transition: right 180ms ease-out; }
  .desktop-nav a:hover::after, .desktop-nav a.is-current::after { right: 0; }
  .desktop-nav a.is-current { color: var(--blue-500); }
  .header-link { justify-self: end; min-height: 44px; display: inline-flex; align-items: center; gap: 8px; border-bottom: 2px solid var(--ink-900); font-size: 13px; font-weight: 700; }
  .header-link:hover { color: var(--blue-500); border-color: var(--blue-500); }
  .menu-button { display: none; }
}
@media (min-width: 1440px) {
  :root { --page-pad: 56px; }
}
