/* ══════════════════════════════════════════════════════════════
   КРАТНО — shared site stylesheet (single source of truth)
   Loaded by every page as:  <link rel="stylesheet" href="/assets/site.css">
   Page-specific styles stay in that page's own <style> block.
   Change brand tokens HERE and every page updates. See BRAND.md.
   ══════════════════════════════════════════════════════════════ */

:root {
  --bg: #fafaf7;
  --ink: #1a1a1a;
  --muted: #6b6b6b;
  --yellow: #ffeb3b;
  --blue: #0061ff;
  --blue-dark: #004fd6;
  --line: rgba(26, 26, 26, 0.07);
  --radius: 24px;
  --max: 1200px;
  --font-head: "Unbounded", sans-serif;
  --font-body: "Inter", -apple-system, sans-serif;
}

/* ── Base ─────────────────────────────────── */
* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; overflow-x: clip; }
body {
  font-family: var(--font-body);
  background: var(--bg);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3, .logo-word, .btn, nav a { font-family: var(--font-head); }
.mark {
  background: linear-gradient(transparent 62%, var(--yellow) 62%, var(--yellow) 96%, transparent 96%);
  padding: 0 2px;
}

/* ── Buttons ──────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 9px;
  border: none; cursor: pointer; text-decoration: none;
  border-radius: 999px; font-weight: 500;
  transition: transform 0.15s, box-shadow 0.15s, background 0.15s;
}
.btn:hover { transform: translateY(-1px); }
.btn-yellow {
  background: var(--blue); color: #fff;
  padding: 11px 22px; font-size: 12.5px;
  box-shadow: 0 1px 0 rgba(26, 26, 26, 0.12);
}
.btn-yellow:hover { background: var(--blue-dark); box-shadow: 0 4px 14px rgba(0, 97, 255, 0.4); }
.btn-dark {
  background: var(--blue); color: #fff;
  padding: 16px 28px; font-size: 13px;
}
.btn-dark:hover { background: var(--blue-dark); box-shadow: 0 6px 18px rgba(0, 97, 255, 0.35); }

/* ── Header ───────────────────────────────── */
header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(250, 250, 247, 0.92);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.header-inner {
  max-width: var(--max); margin: 0 auto;
  display: flex; align-items: center; justify-content: space-between;
  padding: 14px 40px;
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; color: var(--ink); flex-shrink: 0; }
.header-cta { white-space: nowrap; }
.brand img { width: 32px; height: 32px; border-radius: 8px; }
.logo-word { font-weight: 700; font-size: 17px; letter-spacing: 0.04em; }
nav { display: flex; gap: clamp(16px, 2.2vw, 30px); }
nav a {
  text-decoration: none; color: var(--ink);
  font-size: 12.5px; font-weight: 500; letter-spacing: 0.01em;
  white-space: nowrap;
  transition: color 0.15s;
}
nav a:hover, nav a.active { color: var(--blue); }
.hamburger { display: none; background: none; border: none; cursor: pointer; padding: 8px; }
.hamburger span {
  display: block; width: 22px; height: 2.5px; margin: 4.5px 0;
  background: var(--ink); border-radius: 2px;
  transition: transform 0.2s, opacity 0.2s;
}
body.menu-open .hamburger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.menu-open .hamburger span:nth-child(2) { opacity: 0; }
body.menu-open .hamburger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.mobile-menu { display: none; }

/* ── Footer ───────────────────────────────── */
footer {
  margin-top: auto;
  border-top: 1px solid var(--line);
  background: rgba(26, 26, 26, 0.015);
}
.footer-inner {
  max-width: var(--max); margin: 0 auto;
  padding: 40px 40px 34px;
  display: flex; flex-wrap: wrap; align-items: center;
  justify-content: space-between; gap: 22px;
}
.footer-inner .brand .logo-word { font-size: 15px; }
.footer-nav { display: flex; flex-wrap: wrap; gap: 22px; }
.footer-nav a {
  text-decoration: none; color: var(--muted);
  font-size: 12.5px; font-weight: 500; font-family: var(--font-head);
  transition: color 0.15s;
}
.footer-nav a:hover { color: var(--blue); }
.footer-copy { color: #9a9a94; font-size: 12px; width: 100%; padding-top: 6px; }

/* ── Socials ──────────────────────────────── */
.socials { display: flex; gap: 18px; }
.socials a { color: #9a9a94; transition: color 0.15s; }
.socials a:hover { color: var(--ink); }
.socials svg { width: 21px; height: 21px; }

/* ── Newsletter modal ─────────────────────── */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 26, 26, 0.5); backdrop-filter: blur(4px);
  display: none; align-items: center; justify-content: center; padding: 24px;
}
body.modal-open .modal-overlay { display: flex; }
.modal {
  background: #fff; border-radius: var(--radius);
  max-width: 430px; width: 100%;
  padding: 38px 34px 34px; position: relative;
  box-shadow: 0 30px 80px rgba(26, 26, 26, 0.3);
}
.modal-close {
  position: absolute; top: 14px; right: 14px;
  background: none; border: none; cursor: pointer;
  font-size: 22px; line-height: 1; padding: 6px; color: #9a9a94;
}
.modal-close:hover { color: var(--ink); }
.modal h2 { font-size: 20px; font-weight: 700; margin-bottom: 12px; }
.modal p { color: var(--muted); font-size: 14.5px; line-height: 1.6; margin-bottom: 22px; }
.modal input {
  width: 100%; padding: 14px 16px;
  font: 15px var(--font-body);
  border: 1.5px solid rgba(26, 26, 26, 0.15); border-radius: 12px;
  background: var(--bg); outline: none; margin-bottom: 12px;
}
.modal input:focus { border-color: var(--blue); }
.modal .btn { width: 100%; justify-content: center; padding: 15px; font-size: 13px; }
.nl-extra { position: absolute; left: -9999px; top: -9999px; opacity: 0; height: 0; overflow: hidden; }
.modal-error { display: none; color: #d32f2f; font-size: 13px; margin-top: 10px; }
.modal.error .modal-error { display: block; }
.modal-success { display: none; text-align: center; padding: 12px 0 4px; font-size: 15px; line-height: 1.6; }
.modal.done form { display: none; }
.modal.done .modal-success { display: block; }

/* ── Responsive header/footer ─────────────── */
/* The nav collapses at 1080px, not 900px: with the «Консультация» link the
   desktop row no longer fits on narrow laptops. */
@media (max-width: 1080px) {
  .header-inner { padding: 12px 20px; }
  nav { display: none; }
  .header-cta { display: none; }
  .hamburger { display: block; }
  .mobile-menu {
    position: absolute; top: 100%; left: 0; right: 0;
    background: var(--bg);
    border-bottom: 1px solid rgba(26, 26, 26, 0.08);
    box-shadow: 0 18px 30px rgba(26, 26, 26, 0.08);
    padding: 6px 24px 24px; flex-direction: column;
  }
  body.menu-open .mobile-menu { display: flex; }
  .mobile-menu a:not(.btn) {
    font-family: var(--font-head);
    font-size: 14px; font-weight: 500; color: var(--ink);
    text-decoration: none; padding: 16px 2px;
    border-bottom: 1px solid rgba(26, 26, 26, 0.06);
  }
  .mobile-menu a:not(.btn):hover { color: var(--blue); }
  .mobile-menu .btn { margin-top: 20px; justify-content: center; padding: 15px; font-size: 13px; }
}
@media (max-width: 900px) {
  .footer-inner { padding: 34px 24px 30px; }
}

/* ── Telegram: second door under the email forms, and the closing line
      on the open guides ───────────────────────────────────────────── */
.tg-alt {
  margin-top: 16px; text-align: center;
  font-size: 13.5px; line-height: 1.6; color: var(--muted);
}
.tg-alt a {
  color: var(--blue); font-weight: 600; text-decoration: none;
  border-bottom: 1px solid rgba(0, 97, 255, 0.35);
  transition: border-color 0.15s;
}
.tg-alt a:hover { border-color: var(--blue); }
.tg-alt.tg-close { max-width: 800px; margin: 0 auto 64px; padding: 0 24px; }
