/* ============================================================
   base.css — CSS reset, типографика, accessibility, общие компоненты.
   Подключается ДО theme.css каждого шаблона.
   ============================================================ */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.6;
  color: #1a1d21;
  background: #ffffff;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}
img, picture, video { max-width: 100%; height: auto; display: block; }
button, input, textarea, select { font: inherit; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
h1, h2, h3, h4, h5, h6 { margin: 0 0 .5em; line-height: 1.2; font-weight: 700; }
p { margin: 0 0 1em; }
ul, ol { margin: 0 0 1em; padding-left: 1.2em; }

/* Accessibility */
:focus-visible {
  outline: 3px solid #4a8cff;
  outline-offset: 2px;
  border-radius: 4px;
}
.skip-link {
  position: absolute; top: -40px; left: 8px;
  background: #1a1d21; color: #fff;
  padding: 8px 16px; border-radius: 4px;
  z-index: 9999;
  transition: top .2s;
}
.skip-link:focus { top: 8px; }

/* Visually hidden but accessible */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

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

/* ===== Site footer (общий для всех шаблонов) ===== */
.site-footer {
  background: #0e1015;
  color: #c5cdd6;
  padding: 56px 24px 24px;
  margin-top: 96px;
}
.site-footer a { color: #c5cdd6; }
.site-footer a:hover { color: #ffffff; }
.site-footer__inner {
  max-width: 1180px; margin: 0 auto;
  display: grid; gap: 40px;
  grid-template-columns: 1.4fr 2fr;
}
.site-footer__brand {
  display: flex; gap: 14px; align-items: flex-start;
}
.site-footer__brand img {
  border-radius: 12px;
  flex-shrink: 0;
}
.site-footer__brand strong { display: block; color: #fff; font-size: 1.1rem; margin-bottom: 4px; }
.site-footer__brand span { display: block; font-size: .9rem; opacity: .7; }
.site-footer__nav {
  display: grid; gap: 32px;
  grid-template-columns: repeat(3, 1fr);
}
.site-footer__nav h4 {
  color: #fff; font-size: .85rem;
  text-transform: uppercase; letter-spacing: .08em;
  margin-bottom: 16px;
}
.site-footer__nav ul {
  list-style: none; padding: 0; margin: 0;
  display: flex; flex-direction: column; gap: 8px;
  font-size: .95rem;
}
.site-footer__bottom {
  max-width: 1180px; margin: 40px auto 0;
  padding-top: 24px;
  border-top: 1px solid rgba(255,255,255,.08);
  font-size: .85rem; opacity: .7;
}
@media (max-width: 768px) {
  .site-footer__inner { grid-template-columns: 1fr; }
  .site-footer__nav { grid-template-columns: repeat(2, 1fr); }
}

/* ===== Cookie banner (общий) ===== */
.cookie-banner {
  position: fixed; bottom: 16px; left: 16px; right: 16px;
  max-width: 520px; margin: 0 auto;
  background: #1a1d21; color: #fff;
  border-radius: 12px;
  padding: 16px 20px;
  display: flex; align-items: center; gap: 16px;
  box-shadow: 0 8px 32px rgba(0,0,0,.25);
  z-index: 1000;
  font-size: .92rem;
}
.cookie-banner p { margin: 0; flex: 1; }
.cookie-banner__accept {
  background: #fff; color: #1a1d21;
  border: 0; border-radius: 8px;
  padding: 10px 18px;
  font-weight: 600;
  white-space: nowrap;
}
.cookie-banner__accept:hover { background: #f0f0f0; }
.cookie-banner[hidden] { display: none; }

/* ===== Утилитарные классы ===== */
.container { max-width: 1180px; margin: 0 auto; padding: 0 24px; }
.no-scroll { overflow: hidden; }

/* ===== Lightbox (для скриншотов, используется через data-lightbox) ===== */
.lightbox {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  display: flex; align-items: center; justify-content: center;
  z-index: 2000;
  padding: 32px;
}
.lightbox[hidden] { display: none; }
.lightbox img {
  max-width: 100%; max-height: 100%;
  border-radius: 8px;
}
.lightbox__close {
  position: absolute; top: 16px; right: 16px;
  background: rgba(255,255,255,.1); color: #fff;
  border: 0; border-radius: 50%;
  width: 44px; height: 44px;
  font-size: 1.4rem;
  display: flex; align-items: center; justify-content: center;
}
.lightbox__close:hover { background: rgba(255,255,255,.2); }
