/* ============================================================
   впорядке — общий базовый стиль сайта (assets/base.css)
   Подключается на всех страницах: /, /takt/, /takt-kabinet/.
   Токены синхронизированы с TMA (src/styles.css):
   фон #F5EFE6, текст #3D2F26/#6B5444/#A89880, линии #D9CFC4,
   карточки #FCF9F6 r16–18, primary-кнопка #3D2F26 r14.
   Шрифт Inter 400/500/600 — самохостится из ./fonts (без CDN).

   Здесь — только общее: токены, база, кнопки, чипы, шапка,
   футер, юридические страницы. Специфика страниц — в их
   собственных css (home.css, takt-kabinet/styles.css).
   ============================================================ */

:root {
  --bg: #F5EFE6;
  --text: #3D2F26;
  --text-2: #6B5444;
  --text-3: #A89880;
  --line: #D9CFC4;
  --card: #FCF9F6;
  --card-2: #FFFFFF;
  --primary: #3D2F26;
  --primary-hover: #4C3A2C;
  --r-card: 18px;
  --r-card-sm: 16px;
  --r-btn: 14px;
  /* лёгкая тень в духе .session-bubble */
  --shadow-card: 0 1px 2px rgba(61, 47, 38, .05), 0 10px 30px rgba(61, 47, 38, .07);
  --shadow-soft: 0 1px 2px rgba(61, 47, 38, .04), 0 4px 14px rgba(61, 47, 38, .06);
  --max: 1120px;
}

/* ---------- Inter: self-hosted (cyrillic + latin), 400/500/600 ---------- */
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('fonts/inter-400-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: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('fonts/inter-500-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: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('fonts/inter-600-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;
}

/* ---------- база ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
  font-size: 16.5px;
  line-height: 1.55;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
a { color: inherit; }
button { font: inherit; }
img, svg { display: block; }
figure { margin: 0; }
strong { font-weight: 600; }

.container { width: min(var(--max), 100% - 32px); margin-inline: auto; }
@media (min-width: 768px) { .container { width: min(var(--max), 100% - 48px); } }
.muted { color: var(--text-3); }

.kicker {
  margin: 0 0 6px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--text-3);
}

/* ---------- TODO-плейсхолдеры: единый стиль, без lorem ---------- */
.todo {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .82em;
  line-height: 1.4;
  color: var(--text-2);
  background: var(--card);
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 2px 8px;
  white-space: nowrap;
}
.scope--wrap { white-space: normal; word-break: break-all; }
/* фактические scope — моноширинный чип, жирный */
.scope {
  display: inline-block;
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: .85em;
  font-weight: 600;
  color: var(--text);
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 2px 8px;
  white-space: nowrap;
}

/* ---------- кнопки (как .wizard-btn--primary) ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border-radius: var(--r-btn);
  padding: 13px 24px;
  font-family: inherit;
  font-size: 16px;
  font-weight: 500;
  line-height: 1.2;
  text-decoration: none;
  border: 1px solid transparent;
  cursor: pointer;
  white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, transform .05s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: #fff; }
.btn-primary:hover { background: var(--primary-hover); }
.btn-secondary {
  background: var(--card-2);
  color: var(--text);
  border-color: var(--line);
}
.btn-secondary:hover { background: #fff; border-color: #C8BBAC; }
.btn:focus-visible {
  outline: 2px solid var(--text-2);
  outline-offset: 2px;
}
/* крупная пара кнопок в hero главной */
.btn--lg { padding: 15px 28px; }

/* ---------- шапка ---------- */
.site-header {
  border-bottom: 1px solid var(--line);
  background: rgba(245, 239, 230, .85);
  backdrop-filter: blur(8px);
  position: sticky;
  top: 0;
  z-index: 10;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 0;
}
.brand {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  text-decoration: none;
  color: var(--text);
  font-weight: 600;
  font-size: 18px;
  letter-spacing: .01em;
}
/* логотип в .brand: по умолчанию нейтральный; круглые аватар-марки — .logo-img--round */
.logo-img { display: block; flex: none; }
.logo-img--round { border-radius: 50%; object-fit: cover; }
.site-nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.site-nav a {
  text-decoration: none;
  color: var(--text-2);
  font-size: 14.5px;
  font-weight: 500;
  padding: 7px 12px;
  border-radius: 10px;
  transition: background .15s ease, color .15s ease;
}
.site-nav a:hover { background: rgba(61, 47, 38, .06); color: var(--text); }

/* ---------- футер ---------- */
.site-footer {
  border-top: 1px solid var(--line);
  margin-top: 40px;
  padding: 38px 0 44px;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 1.2fr;
  gap: 28px;
  align-items: start;
}
.footer-brand p { margin: 10px 0 0; color: var(--text-3); font-size: 14px; max-width: 300px; }
.footer-col h3 {
  margin: 0 0 10px;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text-3);
}
.footer-col ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
.footer-col a { text-decoration: none; color: var(--text-2); font-size: 15px; }
.footer-col a:hover { color: var(--text); text-decoration: underline; }
.footer-support { color: var(--text-2); font-size: 15px; }
.footer-support .hint { display: block; margin-top: 8px; color: var(--text-3); font-size: 13px; }
.footer-bottom {
  margin-top: 30px;
  padding-top: 18px;
  border-top: 1px solid rgba(217, 207, 196, .6);
  color: var(--text-3);
  font-size: 13.5px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
}

/* ---------- юридические страницы ---------- */
.legal { max-width: 760px; padding: 56px 0 24px; }
.legal h1 {
  margin: 0 0 6px;
  font-size: clamp(28px, 3.6vw, 38px);
  line-height: 1.15;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.legal .legal-sub { color: var(--text-3); font-size: 14px; margin: 0 0 30px; }
.legal h2 {
  margin: 38px 0 10px;
  font-size: 21px;
  font-weight: 600;
}
.legal p, .legal li { color: var(--text-2); font-size: 15.5px; }
.legal p { margin: 0 0 12px; }
.legal ul { margin: 0 0 12px; padding-left: 22px; display: grid; gap: 6px; }
.legal strong { color: var(--text); font-weight: 600; }
.legal .box {
  background: var(--card);
  border: 1px solid rgba(217, 207, 196, .65);
  border-radius: var(--r-card-sm);
  padding: 18px 20px;
  margin: 14px 0 16px;
}
.legal .box p:last-child { margin-bottom: 0; }

/* ---------- адаптив (общий) ---------- */
@media (max-width: 900px) {
  .footer-grid { grid-template-columns: 1fr; gap: 22px; }
}
@media (max-width: 720px) {
  .header-inner { flex-wrap: wrap; padding: 12px 0; }
  .site-nav { gap: 0; }
  .site-nav a { padding: 6px 9px; font-size: 13.5px; }
}
