/* Mitino Online — общие стили сайта.
   Тема «Зимняя ночь Митино»: цвета лаунчера (art/launcher_out/assets.json), форма — срезанные углы кнопки «Войти в игру». */

/* ---------- шрифты (локальные файлы, лицензия OFL — см. fonts/OFL-*.txt) ---------- */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/unbounded-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 400 800; font-display: swap;
  src: url('../fonts/unbounded-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/onest-normal-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: 'Onest'; font-style: normal; font-weight: 400 700; font-display: swap;
  src: url('../fonts/onest-normal-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

/* ---------- токены ---------- */
:root {
  color-scheme: dark;

  --night: #050B18;          /* фон страницы, поля ввода */
  --glass: #081226;          /* панели */
  --glass-a: rgba(8, 18, 38, .84);
  --glass-strong: rgba(8, 18, 38, .94);
  --edge: rgba(42, 111, 214, .45);
  --edge-soft: rgba(42, 111, 214, .22);
  --neon: #1E9BFF;
  --ice: #5CC8FF;
  --deep: #0A5FD6;
  --text: #FFFFFF;
  --frost: #9FB3C8;          /* вторичный текст */
  --dim: #6F849B;            /* подсказки */
  --window: #FFB84D;         /* свет окон и фонарей */
  --window-hi: #FFD596;
  --ok: #3DDC84;
  --warn: #FFB84D;
  --bad: #FF4D5E;

  --cut: 14px;               /* срез угла у крупных элементов */
  --cut-s: 8px;
  --r-s: 4px;

  /* шрифты: Unbounded — заголовки, Onest — текст */
  --f-head: 'Unbounded', 'Segoe UI', system-ui, sans-serif;
  --f-body: 'Onest', 'Segoe UI', system-ui, sans-serif;
  --head-style: normal;
  --head-weight: 700;
  --head-track: -0.01em;
  --head-scale: 1;

  /* шкала (классическая: 14 16 18 21 24 30 36 48 60 72) */
  --t-xs: .8125rem;
  --t-s: .875rem;
  --t-m: 1rem;
  --t-l: 1.125rem;
  --t-xl: 1.3125rem;
  --t-2: 1.5rem;
  --t-3: 1.875rem;
  --t-4: 2.25rem;
  --t-5: 3rem;
  --t-6: 3.75rem;

  --gutter: 16px;
  --wrap: 1200px;
}

@media (min-width: 720px) { :root { --gutter: 32px; } }

/* ---------- основа ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--night);
  color: var(--text);
  font: 400 var(--t-m)/1.6 var(--f-body);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}
main { flex: 1; }
[hidden] { display: none !important; }
img { max-width: 100%; display: block; }
a { color: var(--ice); text-underline-offset: 3px; }
a:hover { color: var(--text); }
h1, h2, h3 {
  font-family: var(--f-head);
  font-style: var(--head-style);
  font-weight: var(--head-weight);
  letter-spacing: var(--head-track);
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}
p { margin: 0; }
:focus-visible { outline: 2px solid var(--ice); outline-offset: 3px; border-radius: 2px; }
::selection { background: var(--deep); color: #fff; }

.wrap { width: 100%; max-width: calc(var(--wrap) + var(--gutter) * 2); margin: 0 auto; padding: 0 var(--gutter); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.skip { position: absolute; left: 8px; top: -60px; z-index: 100; background: var(--neon); color: #fff; padding: 8px 14px; }
.skip:focus { top: 8px; }

/* ---------- кнопки: срезанные углы, как «Войти в игру» в лаунчере ---------- */
.btn {
  --c: var(--cut-s);
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  min-height: 44px;
  padding: 10px 22px;
  border: 0;
  font: 600 var(--t-m)/1.2 var(--f-body);
  color: var(--text);
  text-decoration: none;
  cursor: pointer;
  clip-path: polygon(var(--c) 0, 100% 0, 100% calc(100% - var(--c)), calc(100% - var(--c)) 100%, 0 100%, 0 var(--c));
  transition: filter .15s, background-color .15s, transform .1s;
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible { outline: none; filter: brightness(1.15); box-shadow: inset 0 0 0 2px #fff; }
.btn-main {
  background: linear-gradient(180deg, var(--ice) 0%, var(--neon) 45%, var(--deep) 100%);
  text-shadow: 0 1px 2px rgba(0, 40, 110, .55);
}
.btn-main:hover { filter: brightness(1.12); color: #fff; }
.btn-ghost {
  background: rgba(30, 155, 255, .12);
  box-shadow: inset 0 0 0 1px var(--edge);
}
.btn-ghost:hover { background: rgba(30, 155, 255, .22); color: #fff; }
.btn-big { --c: var(--cut); min-height: 56px; padding: 14px 30px; font-size: var(--t-l); }
.btn svg { width: 20px; height: 20px; flex: none; }

/* ---------- шапка ---------- */
.site-head {
  position: sticky; top: 0; z-index: 50;
  background: rgba(5, 11, 24, .82);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--edge-soft);
}
.site-head .wrap { display: flex; align-items: center; gap: 24px; min-height: 64px; }
.brand { flex: none; display: block; }
.brand img { height: 40px; width: auto; }
.nav { display: flex; gap: 4px; margin-right: auto; }
.nav a {
  color: var(--frost); text-decoration: none; font-weight: 500;
  padding: 8px 12px; border-radius: var(--r-s);
}
.nav a:hover, .nav a[aria-current="page"] { color: var(--text); background: rgba(30, 155, 255, .1); }
.nav .nav-m { display: none; }
.head-actions { display: flex; gap: 8px; align-items: center; }
.head-actions .btn { min-height: 40px; padding: 8px 16px; font-size: var(--t-s); }
.menu-btn { display: none; }

@media (max-width: 960px) {
  .site-head .wrap { gap: 12px; }
  .nav {
    display: none;
    position: absolute; left: 0; right: 0; top: 100%;
    flex-direction: column; gap: 0;
    background: var(--glass);
    border-bottom: 1px solid var(--edge);
    box-shadow: 0 24px 48px rgba(0, 0, 0, .6);
    padding: 8px var(--gutter) 16px;
  }
  .nav.open { display: flex; }
  .nav .nav-m { display: block; color: var(--ice); font-weight: 600; }
  .nav a { padding: 14px 4px; font-size: var(--t-l); border-bottom: 1px solid var(--edge-soft); border-radius: 0; }
  .menu-btn {
    display: inline-flex; align-items: center; justify-content: center;
    width: 44px; height: 44px; margin-left: auto;
    background: transparent; border: 1px solid var(--edge); border-radius: var(--r-s); color: var(--text); cursor: pointer;
  }
  .head-actions .hide-m { display: none; }
}
@media (max-width: 420px) {
  .brand img { height: 32px; }
  .head-actions .btn { padding: 8px 12px; }
  .head-actions .long { display: none; }
}
@media (min-width: 421px) { .head-actions .short { display: none; } }

/* ---------- подвал ---------- */
.site-foot {
  margin-top: 96px;
  border-top: 1px solid var(--edge-soft);
  background: linear-gradient(180deg, rgba(8, 18, 38, .6), var(--night));
  color: var(--frost);
  font-size: var(--t-s);
}
.site-foot .wrap { display: grid; gap: 32px; padding-top: 48px; padding-bottom: 40px; grid-template-columns: 1fr; }
.site-foot h2 { font-size: var(--t-s); font-family: var(--f-body); font-style: normal; font-weight: 600; color: var(--text); margin-bottom: 12px; letter-spacing: 0; }
.site-foot ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.site-foot a { color: var(--frost); text-decoration: none; }
.site-foot a:hover { color: var(--text); text-decoration: underline; }
.foot-brand img { height: 36px; width: auto; margin-bottom: 14px; }
.foot-brand p { max-width: 34ch; }
.foot-legal { grid-column: 1 / -1; padding-top: 24px; border-top: 1px solid var(--edge-soft); color: var(--dim); font-size: var(--t-xs); }
@media (min-width: 720px) {
  .site-foot .wrap { grid-template-columns: 2fr 1fr 1fr 1fr; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}
