/* Общий каркас многостраничного сайта: шапка, футер, базовая типографика.
   Подключается на всех статических страницах. Токены — единые с остальными. */

:root {
  /* Светлая тема — по умолчанию */
  --ink: #F4F5F7; --panel: #FFFFFF; --panel-2: #EDEFF3;
  --line: #E4E6EB; --line-2: #D4D8DF;
  --text: #14171B; --muted: #5A616B; --faint: #666D76;
  --accent: #FF8001; --accent-2: #F07600;
  --bar: rgba(255,255,255,.9); --foot: #EDEFF3;
  --wrap: 1180px;
}
:root[data-theme="dark"] {
  /* Тёмная тема — override */
  --ink: #101215; --panel: #16191E; --panel-2: #1A1E23;
  --line: #23262B; --line-2: #2E3339;
  --text: #EDEEF0; --muted: #9AA1AA; --faint: #868D96;
  --accent-2: #FF9527;
  --bar: rgba(16,18,21,.92); --foot: #0C0E11;
}
* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0; background: var(--ink); color: var(--text);
  font-family: 'IBM Plex Sans', system-ui, sans-serif; -webkit-font-smoothing: antialiased;
  line-height: 1.5;
}
a { color: inherit; text-decoration: none; }
img { max-width: 100%; display: block; }

/* ── Шапка ─────────────────────────────────────────── */
.site-head {
  position: sticky; top: 0; z-index: 40;
  background: var(--bar); backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--line);
}
.head-in {
  max-width: var(--wrap); margin: 0 auto; padding: 0 24px;
  height: 64px; display: flex; align-items: center; gap: 20px;
}
.head-logo img { height: 28px; }
.head-nav { margin-left: auto; display: flex; align-items: center; gap: 22px; }
.head-nav a { color: var(--muted); font-size: 14.5px; white-space: nowrap; transition: color .15s; padding: 9px 2px; display: inline-flex; align-items: center; }
.head-nav a:hover { color: var(--text); }
.head-nav a.here { color: var(--accent); }
.head-cta {
  display: inline-flex; align-items: center; height: 40px; padding: 0 18px;
  background: var(--accent); color: #17130A !important; font-weight: 600; border-radius: 3px;
}
.head-cta:hover { background: var(--accent-2); }
.head-burger {
  display: none; margin-left: auto; width: 42px; height: 42px;
  background: transparent; border: 1px solid var(--line-2); border-radius: 4px;
  flex-direction: column; align-items: center; justify-content: center; gap: 4px; cursor: pointer;
}
.head-acc { display: none; }
.head-lang { margin-left: auto; height: 42px; padding: 0 12px; display: inline-flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); cursor: pointer; flex: none; font: inherit; font-size: 13px; font-weight: 600; letter-spacing: .04em; }
.head-lang:hover { color: var(--accent); border-color: var(--accent); }
.head-theme { width: 42px; height: 42px; display: flex; align-items: center; justify-content: center; background: transparent; border: 1px solid var(--line-2); border-radius: 4px; color: var(--muted); cursor: pointer; flex: none; }
.head-theme:hover { color: var(--accent); border-color: var(--accent); }
.head-theme svg { width: 20px; height: 20px; }
.head-burger span { width: 18px; height: 2px; background: var(--text); transition: .2s; }
.head-burger.open span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
.head-burger.open span:nth-child(2) { opacity: 0; }
.head-burger.open span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 1040px) {
  .head-acc { display: flex; margin-left: auto; width: 42px; height: 42px; align-items: center; justify-content: center; color: var(--text); border: 1px solid var(--line-2); border-radius: 4px; }
  .head-acc svg { width: 20px; height: 20px; }
  .head-burger { display: flex; margin-left: 8px; }
  .head-nav {
    position: fixed; inset: 64px 0 auto 0; margin: 0; flex-direction: column; align-items: stretch;
    gap: 0; background: var(--panel); border-bottom: 1px solid var(--line);
    padding: 8px 0; max-height: calc(100vh - 64px); overflow-y: auto;
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s;
  }
  .head-nav.open { transform: none; opacity: 1; pointer-events: auto; }
  .head-nav a { padding: 14px 24px; font-size: 16px; border-bottom: 1px solid var(--line); }
  .head-cta { margin: 12px 24px; height: 48px; justify-content: center; }
}

/* ── Базовые блоки контента ────────────────────────── */
.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.section { padding: 64px 0; }
.section-sm { padding: 40px 0; }

.crumbs { max-width: var(--wrap); margin: 0 auto; padding: 18px 24px 0; font-size: 13px; color: var(--faint); }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--accent); }
.crumbs span { color: var(--faint); }

.page-head { max-width: var(--wrap); margin: 0 auto; padding: 30px 24px 8px; }
.page-head h1 {
  font-family: 'Unbounded', sans-serif; font-weight: 700; letter-spacing: -.02em;
  font-size: clamp(28px, 5vw, 46px); margin: 0 0 14px; line-height: 1.08;
}
.page-head .sub { max-width: 680px; color: var(--muted); font-size: 17px; line-height: 1.6; margin: 0; }

h2 { font-family: 'Unbounded', sans-serif; font-weight: 600; font-size: clamp(22px,3vw,30px); letter-spacing: -.01em; margin: 0 0 16px; }
h3 { font-family: 'Unbounded', sans-serif; font-weight: 500; font-size: 20px; margin: 28px 0 12px; }
.prose { max-width: 760px; color: var(--muted); font-size: 16.5px; line-height: 1.75; }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 18px; padding-left: 22px; }
.prose li { margin: 0 0 8px; }
.prose a { color: var(--accent); }
.prose a:hover { text-decoration: underline; }
.prose b, .prose strong { color: var(--text); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; height: 52px; padding: 0 26px;
  border-radius: 3px; font-weight: 600; font-size: 15px; cursor: pointer; border: none;
}
.btn-primary { background: var(--accent); color: #17130A; }
.btn-primary:hover { background: var(--accent-2); }
.btn-ghost { border: 1px solid var(--line-2); color: var(--text); background: transparent; }
.btn-ghost:hover { border-color: var(--accent); color: var(--accent); }

/* ── Футер ─────────────────────────────────────────── */
.site-foot { border-top: 1px solid var(--line); background: var(--foot); margin-top: 40px; }
.foot-in { max-width: var(--wrap); margin: 0 auto; padding: 54px 24px 30px; display: grid; gap: 40px; grid-template-columns: 1.4fr 1fr 1fr 1fr 1fr; }
.foot-col h4 { font-size: 12px; letter-spacing: .12em; text-transform: uppercase; color: var(--faint); margin: 0 0 16px; font-family: 'IBM Plex Mono', monospace; font-weight: 500; }
.foot-col a, .foot-col p { color: var(--muted); font-size: 14px; margin: 0 0 10px; display: block; }
.foot-col a:hover { color: var(--accent); }
.foot-brand img { height: 30px; margin-bottom: 16px; }
.foot-brand .tag { color: var(--faint); font-size: 13.5px; line-height: 1.6; max-width: 260px; }
.foot-phone { color: var(--text) !important; font-size: 17px !important; font-weight: 600; font-family: 'Unbounded', sans-serif; }
.foot-bottom { border-top: 1px solid var(--line); }
.foot-bottom-in { max-width: var(--wrap); margin: 0 auto; padding: 20px 24px; display: flex; flex-wrap: wrap; gap: 14px 24px; align-items: center; font-size: 13px; color: var(--faint); }
.foot-bottom-in a { color: var(--faint); }
.foot-bottom-in a:hover { color: var(--accent); }
.foot-bottom-in .spacer { margin-left: auto; }

@media (max-width: 820px) {
  .foot-in { grid-template-columns: 1fr 1fr; gap: 32px; }
}
@media (max-width: 500px) {
  .foot-in { grid-template-columns: 1fr; }
}

/* Тематический FAQ на страницах (JS-free аккордеон, FAQPage schema) */
.pfaq { max-width: 1180px; margin: 46px auto 0; padding: 0 24px; }
.pfaq h2 { margin: 0 0 18px; }
.pfaq-item { border: 1px solid var(--line); border-radius: 6px; background: var(--panel); margin-bottom: 10px; overflow: hidden; }
.pfaq-item > summary { list-style: none; cursor: pointer; padding: 17px 22px; font-size: 15.5px; color: var(--text); display: flex; justify-content: space-between; gap: 16px; align-items: center; }
.pfaq-item > summary::-webkit-details-marker { display: none; }
.pfaq-item > summary::after { content: '+'; color: var(--accent); font-size: 22px; line-height: 1; flex: none; }
.pfaq-item[open] > summary::after { content: '\2212'; }
.pfaq-item > div { padding: 0 22px 20px; color: var(--muted); font-size: 15px; line-height: 1.65; }

/* Видимый фокус для навигации с клавиатуры: без него пользователь табом ходит
   вслепую. focus-visible не мешает мышке — рамка появляется только с клавиатуры. */
:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
  border-radius: 3px;
}
a:focus-visible, button:focus-visible, input:focus-visible,
select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

/* Уважаем системную настройку «уменьшить движение» */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
    scroll-behavior: auto !important;
  }
}
