/* Ochag — 00-base.css
   Фундамент: переменные, шрифты, базовая типографика, утилиты, reduced-motion.
   Тёплый минимализм. Ничего лишнего — без теней/эффектов сверх контракта. */

/* ============ ШРИФТЫ ============ */
/* Manrope (self-hosted, variable, OFL) — база: тело, UI, заголовки. */
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Manrope';
  font-style: normal;
  font-weight: 200 800;
  font-display: swap;
  src: url('../fonts/manrope-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* Golos Text (self-hosted, variable, OFL) — ТОЛЬКО цифры/цены (табличные). */
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golos-latin.woff2') format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+2074, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: 'Golos Text';
  font-style: normal;
  font-weight: 400 700;
  font-display: swap;
  src: url('../fonts/golos-cyrillic.woff2') format('woff2');
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}

/* ============ ПЕРЕМЕННЫЕ (§2 контракта) ============ */
:root {
  /* Отступы (тонкая настройка поверх preset spacing из theme.json) */
  --space-2xs: 8px;
  --space-xs: 16px;
  --space-s: 24px;
  --space-m: 32px;
  --space-l: 48px;
  --space-xl: 64px;
  --space-2xl: 96px;
  --space-3xl: 160px;

  /* Контейнер и сетка */
  --container: 1168px;
  --gutter: 24px;

  /* Радиусы */
  --radius: 12px;
  --radius-lg: 18px;

  /* Тени (тёплые, дозированно — максимум для приподнятых карточек) */
  --shadow-soft: 0 1px 2px rgba(60, 45, 35, .05);
  --shadow-card: 0 1px 2px rgba(60, 45, 35, .05), 0 8px 24px rgba(60, 45, 35, .06);

  /* Motion */
  --dur-fast: 150ms;
  --dur-base: 300ms;
  --dur-slow: 500ms;
  --ease-out: cubic-bezier(0, 0, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --ease-standard: cubic-bezier(0.2, 0, 0, 1);
  --ease-emphasized: cubic-bezier(0.05, 0.7, 0.1, 1);
}

/* ============ СБРОС / БАЗА ============ */
*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
}

body {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "ss01", "cv11";
  text-rendering: optimizeLegibility;
}

img,
picture,
svg,
video {
  max-width: 100%;
  height: auto;
}

/* ============ ТИПОГРАФИКА (§4 плейбука) ============ */
h1,
.ochag-h1 {
  font-family: var(--wp--preset--font-family--sans);
  font-size: clamp(2.5rem, 9vw, 5.5rem);
  line-height: 1.04;
  letter-spacing: -0.02em;
  font-weight: 700;
  text-wrap: balance;
}

h2 {
  font-size: clamp(1.75rem, 4vw, 3rem);
  line-height: 1.12;
  letter-spacing: -0.01em;
  text-wrap: balance;
}

h3 {
  font-size: 1.375rem;
  line-height: 1.2;
  letter-spacing: -0.005em;
}

p {
  text-wrap: pretty;
}

/* Тело */
body,
.ochag-body {
  font-size: 1.0625rem;
  line-height: 1.55;
}

/* Капс-лейбл */
.ochag-label {
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 500;
}

/* ============ УТИЛИТЫ ============ */

/* Контейнер: max-width + боковые паддинги + центрирование */
.ochag-container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}

/* Капс-надзаголовок (eyebrow) — терракота-текст, uppercase +0.10em */
.ochag-eyebrow {
  display: inline-block;
  font-size: 0.8125rem;
  line-height: 1.4;
  letter-spacing: 0.10em;
  text-transform: uppercase;
  font-weight: 600;
  color: var(--wp--preset--color--accent-dark);
  margin: 0;
}

/* Крупная секционная цифра 01 / 02 у левой оси */
.ochag-num {
  font-family: 'Golos Text', var(--wp--preset--font-family--sans);
  font-variant-numeric: tabular-nums lining-nums;
  font-size: clamp(1.5rem, 3vw, 2.25rem);
  font-weight: 600;
  line-height: 1;
  color: var(--wp--preset--color--muted);
}

/* Цифры/цены: Golos + табличные цифры */
.ochag-nums,
.o-nums {
  font-family: 'Golos Text', var(--wp--preset--font-family--sans);
  font-variant-numeric: tabular-nums lining-nums;
}

/* Sticky-header helper — кнопка замера всегда под рукой (без blur/glass). */
.ochag-header {
  position: sticky;
  top: 0;
  z-index: 100;
}
.ochag-header__inner {
  gap: 1.75rem;
}
.ochag-header .wp-block-site-title a {
  text-decoration: none;
  color: var(--wp--preset--color--ink);
}
.ochag-nav__links a {
  text-decoration: none;
  color: var(--wp--preset--color--ink);
  transition: color var(--dur-fast) var(--ease-standard);
}
.ochag-nav__links a:hover {
  color: var(--wp--preset--color--accent-dark);
}

/* Мобайл: прячем текстовые якоря, оставляем лого + CTA. */
@media (max-width: 600px) {
  .ochag-nav__links {
    display: none;
  }
}

/* ============ TELEGRAM FLOAT (общий, рендерится плагином на всех страницах) ============ */
.ochag-tg-float {
  position: fixed;
  right: 16px;
  bottom: 16px;
  z-index: 200;
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.7rem 1rem;
  background: var(--wp--preset--color--accent);
  color: var(--wp--preset--color--on-accent);
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  box-shadow: var(--shadow-card);
  transition: background-color var(--dur-fast) var(--ease-standard);
}
.ochag-tg-float:hover {
  background: var(--wp--preset--color--accent-dark);
  color: var(--wp--preset--color--on-accent);
}
.ochag-tg-float svg {
  display: block;
}
@media (max-width: 600px) {
  .ochag-tg-float__text {
    display: none;
  }
  .ochag-tg-float {
    padding: 0.85rem;
    bottom: 84px; /* не перекрываем липкую кнопку замера снизу */
  }
}

/* ============ SCROLL-REVEAL (§5 контракта) ============ */
.ochag-reveal {
  opacity: 0;
  transform: translateY(20px);
  transition:
    opacity var(--dur-base) var(--ease-out),
    transform var(--dur-base) var(--ease-out);
  transition-delay: calc(var(--i, 0) * 60ms);
  will-change: opacity, transform;
}
.ochag-reveal.is-in {
  opacity: 1;
  transform: none;
}

/* ============ ГЛОБАЛЬНЫЙ ПРЕДОХРАНИТЕЛЬ ============ */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
  .ochag-reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

/* ---- Интеграция (оркестратор) ---- */
/* Гарантия от горизонтального скролла на мобиле */
html, body { overflow-x: clip; }
/* На мобиле CTA в шапке дублируется sticky-баром снизу — прячем в шапке, оставляем чистый лого */
@media (max-width: 600px) {
  .ochag-header .wp-block-buttons { display: none; }
}
/* Кнопка шапки не переносится */
.ochag-header .wp-block-button__link { white-space: nowrap; }

/* Фолбэк: если JS не загрузился/выключен — reveal-элементы видны (не прячем контент за JS) */
html:not(.ochag-js) .ochag-reveal { opacity: 1 !important; transform: none !important; }
