/*
Theme Name:  Sborkascen
Theme URI:   https://sborkascen.ru
Author:      Кутлементьева Анна
Description: Собственная тема сайта «Сборка сцен». Стиль v2 (утверждён владельцем 2026-07-10): монохром с янтарным штрихом, смена светлого/тёмного фона при скролле, заголовки-манифесты (Unbounded), карточки с подписью на фото. Спецификация — SPEC.md, дизайн — docs/ux-guidelines.md.
Version:     0.3.0
Requires at least: 6.0
Requires PHP: 8.1
Text Domain: sborkascen
*/

/* ============================================================
   Дизайн-система v2. Монохром: базовый светлый фон + статичные
   тёмные секции-острова (класс sc-section--tint). Смена фона при
   скролле отключена по решению владельца 2026-07-11.
   ============================================================ */
:root {
  --radius: 10px;
  --radius-lg: 16px;
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Unbounded", "Inter", system-ui, sans-serif;
  --content: 720px;
  --wide: 1200px;
  /* Янтарный штрих (утверждён 2026-07-10) — только микродетали */
  --c-accent: #E3A65C;
  --c-accent-text: #131110;
}
body {
  /* Светлый режим — базовый для всего сайта.
     --c-muted затемнён до #6E6A63 для контраста AA на светлом (Д11). */
  --c-bg: #FAF7F2;  --c-text: #171512; --c-muted: #6E6A63;
  --c-border: #E7E1D8;
  --btn-bg: #171512; --btn-text: #FAF7F2;
  --c-warn-bg: #FFF6E5; --c-warn-border: #F0C36D;
}
/* Тёмная секция — статичный «остров»: сама красит фон и локально
   переопределяет токены на тёмные (смена фона при скролле отключена
   по решению владельца 2026-07-11). */
.sc-section--tint {
  --c-bg: #131110;  --c-text: #F4EFE8; --c-muted: #8F877C;
  --c-border: #2E2A26;
  --btn-bg: #F4EFE8; --btn-text: #131110;
  --c-warn-bg: #2A2115; --c-warn-border: #7A5A2E;
  background: #131110; color: #F4EFE8;
}

/* Заголовочный шрифт Unbounded — self-hosted (инструкция 04).
   Пока файла нет, работает жирный системный фолбэк. */
@font-face {
  font-family: "Unbounded";
  src: url("assets/fonts/unbounded-800.woff2") format("woff2");
  font-weight: 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- База ---------- */
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.6;
  color: var(--c-text);
  background: var(--c-bg);
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; display: block; }
a { color: inherit; text-underline-offset: 3px; }
h1, h2 {
  font-family: var(--font-display);
  text-transform: uppercase;
  font-weight: 800;
  line-height: 1.1;
  margin: 0 0 0.5em;
}
h1 { font-size: clamp(30px, 5.4vw, 68px); max-width: 18ch; }
h2 { font-size: clamp(22px, 3.4vw, 44px); max-width: 24ch; }
h3 { line-height: 1.25; margin: 0 0 0.5em; font-size: clamp(18px, 2.5vw, 22px); }

/* Доступность: видимый фокус и skip-link */
:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
.sc-skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-accent); color: var(--c-accent-text);
  padding: 10px 16px; border-radius: 0 0 var(--radius) 0;
}
.sc-skip-link:focus { left: 0; }

/* ---------- Каркас ---------- */
.sc-container { max-width: var(--wide); margin: 0 auto; padding: 0 16px; }

.sc-header { border-bottom: 1px solid var(--c-border); background: transparent; }
.sc-header__inner {
  display: flex; align-items: center; gap: 16px;
  min-height: 64px; flex-wrap: wrap;
}
.sc-logo {
  font-family: var(--font-display);
  font-weight: 800; font-size: 17px; text-transform: uppercase;
  text-decoration: none; color: var(--c-text); letter-spacing: .02em;
}
.sc-nav ul { list-style: none; display: flex; gap: 20px; margin: 0; padding: 0; flex-wrap: wrap; }
.sc-nav a { color: var(--c-text); text-decoration: none; }
.sc-nav a:hover { color: var(--c-accent); }

.sc-main { padding: 32px 0 64px; }

/* Футер — всегда тёмный, независимо от режима страницы */
.sc-footer {
  background: #131110; color: #8F877C;
  font-size: 14px; padding: 40px 0; margin-top: 48px;
}
.sc-footer a { color: #B9B1A6; }
.sc-footer__row { margin: 0 0 8px; }

/* ---------- Кнопки: контраст вместо цвета (стиль v2) ---------- */
.sc-btn {
  display: inline-block; text-decoration: none; cursor: pointer;
  background: var(--btn-bg); color: var(--btn-text);
  font-weight: 600; font-size: 16px;
  padding: 13px 26px; border: 0; border-radius: 999px;
  transition: transform .2s ease;
}
.sc-btn:hover { transform: translateY(-2px); }
.sc-btn--ghost {
  background: transparent; color: var(--c-text);
  box-shadow: inset 0 0 0 2px var(--c-text);
}

/* ---------- Gutenberg: широкие блоки ---------- */
.alignwide { max-width: var(--wide); margin-left: auto; margin-right: auto; }
.alignfull { width: 100%; max-width: none; }

.screen-reader-text {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip-path: inset(50%); white-space: nowrap;
}

/* ---------- Мобильное меню (логика assets/js/nav.js) ---------- */
.sc-burger {
  margin-left: auto; width: 44px; height: 44px;
  border: 1px solid var(--c-border); border-radius: var(--radius);
  background: transparent; cursor: pointer; font-size: 20px; line-height: 1;
  color: var(--c-text);
}
.sc-nav { display: none; }
.sc-nav.is-open {
  display: block; position: absolute; top: 100%; left: 0; right: 0;
  background: var(--c-bg); border-bottom: 1px solid var(--c-border);
  padding: 12px 16px 16px; z-index: 80;
}
.sc-nav.is-open ul { flex-direction: column; gap: 12px; }
.sc-header { position: relative; }
.sc-header .sc-btn { display: none; }

/* ---------- Адаптив ---------- */
@media (min-width: 900px) {
  .sc-header__inner { min-height: 72px; }
  .sc-burger { display: none; }
  .sc-nav { display: block; margin-left: auto; position: static; }
  .sc-header .sc-btn { display: inline-block; }
}

/* ---------- Доступность: уважаем «уменьшить движение» (Д11) ----------
   Смена светлый↔тёмный и подъёмы кнопок становятся мгновенными —
   состояние меняется, но без анимации, которая может беспокоить. */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    transition-duration: 0.01ms !important;
    animation-duration: 0.01ms !important;
  }
  .sc-btn:hover { transform: none; }
}
