/* ==========================================================================
   ГЛОБАЛЬНЫЕ СТИЛИ «БИЗНЕСДЕТИ»
   «Настройки сайта» → свой CSS (custom.css). Загружается на всех страницах,
   в редакторе Тильды — нет. Общий JS и спрайт иконок — в HEAD-коде (BD).
   Шрифты Jost и Noto Serif подключены в HEAD (запасные до покупки
   веб-лицензий Century Gothic и Georgia), в блоки их не добавлять.

   Решения по UI — .scratch/biznesdeti-site/map.md, витрина — /ui-kit.
   ========================================================================== */

/* Цифры в заголовках: Georgia рисует их «прыгающими» (старостильными), и на разных
   устройствах по-разному. Цифры и знаки при них берутся из Noto Serif — ровные,
   одной высоты везде. Остальные буквы — по-прежнему из --bd-font-title. */
@font-face {
  font-family: 'BD Digits';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url(https://fonts.gstatic.com/s/notoserif/v33/ga6daw1J5X9T9RW6j9bNVls-hfgvz8JcMofYTYf6D33WsNFH.woff2) format('woff2');
  unicode-range: U+0025, U+0028-0029, U+002B, U+002D, U+0030-0039, U+2013-2014, U+2116;
}

/* Корневой размер: 16px на всех экранах, крупнеют только заголовки (clamp) */
html,
html body { font-size: 16px; }
/* Ровные цифры одной высоты во всех шрифтах сайта */
html body { font-variant-numeric: lining-nums; }

:root {
  /* Бренд-палитра (брендбук) */
  --bd-brown: #683c11;
  --bd-dark-red: #93281f;
  --bd-accent-red: #db0d23;
  --bd-accent-orange: #e69732;
  --bd-accent-yellow: #f8d047;

  /* Расширение палитры для веба */
  --bd-ink: #2a1606;               /* тёмные секции, подвал */
  --bd-bg-light: #ffffff;
  --bd-bg-soft: #faf7f2;
  --bd-bg-warm: #f6ebdc;           /* плашки, подложки иконок */
  --bd-text-main: #222222;
  --bd-text-muted: #555555;
  --bd-line: #eadfce;
  --bd-border-light: rgba(230, 151, 50, 0.2);

  /* Фирменный градиент — только для G1 (полоса) и G2 (свечение) */
  --bd-gradient-brand: linear-gradient(120deg, #db0d23 0%, #e8552a 35%, #e69732 70%, #f8d047 100%);

  /* Шрифты */
  --bd-font-title: 'BD Digits', 'Georgia', 'Noto Serif', serif;
  --bd-font-main: 'Century Gothic', 'Jost', Arial, sans-serif;

  /* Отступы */
  --bd-pad-x-desktop: 2.5rem;
  --bd-pad-x-tablet: 2rem;
  --bd-pad-x-mobile: 1.25rem;
  --bd-pad-y-desktop: 5rem;
  --bd-pad-y-mobile: 3rem;
  --bd-custom-max-width: 100%;

  /* Радиусы и тени: у кнопок цветной тени нет */
  --bd-radius-btn: 0.75rem;
  --bd-radius-card: 1.25rem;
  --bd-shadow-card: 0 0.75rem 2rem rgba(104, 60, 17, 0.06);

  /* Анимация появления */
  --bd-reveal-shift: 1rem;
  --bd-reveal-duration: 0.5s;
}

/* ---------- Блок и контейнер ---------- */
html body .bd-block {
  width: 100%;
  box-sizing: border-box;
  background-color: var(--bd-bg-light);
  color: var(--bd-text-main);
  font-family: var(--bd-font-main);
  padding: var(--bd-pad-y-desktop) var(--bd-pad-x-desktop);
}

html body .bd-block--soft { background-color: var(--bd-bg-soft); }

html body .bd-block--dark {
  background: var(--bd-ink);
  color: #ffffff;
}

html body .bd-container {
  width: 100%;
  max-width: var(--bd-custom-max-width);
  margin-left: auto;
  margin-right: auto;
  box-sizing: border-box;
}

/* ---------- Типографика: заголовки целиком коричневые, растут плавно ---------- */
html body .bd-title {
  font-family: var(--bd-font-title);
  font-size: clamp(1.75rem, 1.2rem + 2.2vw, 3rem);
  line-height: 1.15;
  font-weight: 700;
  color: var(--bd-brown);
  margin: 0 0 1rem;
}

html body .bd-lead {
  font-family: var(--bd-font-main);
  font-size: 1.125rem;
  line-height: 1.6;
  color: var(--bd-text-muted);
  margin: 0;
}

html body .bd-block--dark .bd-title { color: #ffffff; }
html body .bd-block--dark .bd-lead { color: rgba(255, 255, 255, 0.78); }

/* Короткая линия-акцент под заголовком */
html body .bd-line {
  display: block;
  width: 4rem;
  height: 0.125rem;
  margin: 1.25rem 0;
  border-radius: 6.25rem;
  background: var(--bd-accent-red);
}

/* ---------- Карточка: информационная, без ховера ---------- */
html body .bd-card {
  background: var(--bd-bg-light);
  border: 1px solid var(--bd-line);
  border-radius: var(--bd-radius-card);
  padding: 1.75rem;
  box-sizing: border-box;
}

/* ---------- Тег секции (T1): красный капс с линией слева ---------- */
html body .bd-badge {
  display: inline-flex !important;
  align-items: center;
  gap: 0.75rem;
  padding: 0;
  background: none;
  border: 0;
  border-radius: 0;
  color: var(--bd-accent-red);
  font-family: var(--bd-font-main);
  font-size: 0.8125rem;
  font-weight: 700;
  line-height: 1.2;
  text-transform: uppercase;
  letter-spacing: 0.12em;
}
html body .bd-badge::before {
  content: "";
  flex-shrink: 0;
  width: 1.75rem;
  height: 1.5px;
  background: currentColor;
}
html body .bd-badge .bd-badge-dot { display: none !important; }
html body .bd-block--dark .bd-badge { color: var(--bd-accent-yellow); }

/* ==========================================================================
   КНОПКИ
   .bd-button            — главное действие: красная сплошная
   .bd-button--outline   — второстепенное: коричневый контур
   .bd-button--dark      — коричневая сплошная
   .bd-button--gold      — жёлтая на тёмном фоне
   .bd-button--light     — белый контур на тёмном фоне
   .bd-button--block     — на всю ширину
   ========================================================================== */
html body a.bd-button,
html body button.bd-button,
html body .bd-button {
  display: inline-flex !important;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  min-height: 3rem;
  padding: 0.875rem 1.75rem;
  background: var(--bd-accent-red);
  color: #ffffff !important;
  font-family: var(--bd-font-main);
  font-size: 1rem;
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: 0.01em;
  white-space: nowrap;
  border-radius: var(--bd-radius-btn);
  border: 1.5px solid var(--bd-accent-red);
  box-shadow: none;
  cursor: pointer;
  text-decoration: none !important;
  transition: background-color 0.2s ease, border-color 0.2s ease, color 0.2s ease;
  outline: none !important;
  -webkit-tap-highlight-color: transparent;
}
html body .bd-button::before { content: none; }

html body a.bd-button:hover,
html body button.bd-button:hover,
html body .bd-button:hover {
  background: var(--bd-dark-red);
  border-color: var(--bd-dark-red);
  color: #ffffff !important;
  transform: none;
  box-shadow: none;
}
html body .bd-button:active { background: #7a1f17; border-color: #7a1f17; transform: none; box-shadow: none; }
html body .bd-button:focus-visible { outline: 2px solid var(--bd-accent-orange) !important; outline-offset: 3px; }

html body .bd-button svg { width: 1.125rem; height: 1.125rem; flex-shrink: 0; transition: transform 0.2s ease; }
html body .bd-button:hover svg { transform: translateX(3px); }

html body .bd-button.bd-button--outline {
  background: transparent;
  color: var(--bd-brown) !important;
  border-color: var(--bd-brown);
}
html body .bd-button.bd-button--outline:hover {
  background: var(--bd-brown);
  border-color: var(--bd-brown);
  color: #ffffff !important;
}

html body .bd-button.bd-button--dark {
  background: var(--bd-brown);
  border-color: var(--bd-brown);
  color: #ffffff !important;
}
html body .bd-button.bd-button--dark:hover { background: #502d0b; border-color: #502d0b; }

html body .bd-button.bd-button--gold {
  background: var(--bd-accent-yellow);
  border-color: var(--bd-accent-yellow);
  color: var(--bd-ink) !important;
}
html body .bd-button.bd-button--gold:hover { background: #ffffff; border-color: #ffffff; color: var(--bd-ink) !important; }

html body .bd-button.bd-button--light {
  background: transparent;
  color: #ffffff !important;
  border-color: rgba(255, 255, 255, 0.55);
}
html body .bd-button.bd-button--light:hover { background: #ffffff; border-color: #ffffff; color: var(--bd-ink) !important; }

html body .t-form-success-popup { display: none !important; }

html body .bd-button.bd-button--block { display: flex !important; width: 100%; }

/* Кнопки отправки форм Тильды: tilda-forms задаёт им свой шрифт и насыщенность */
html body .t-submit.bd-button,
html body .t-submit.bd-button .t-btnflex__text {
  font-family: var(--bd-font-main) !important;
  font-weight: 700 !important;
}

/* ---------- Ссылка (A): тонкое подчёркивание с отступом, не шире текста ---------- */
html body .bd-link {
  display: inline;
  color: var(--bd-dark-red);
  font-weight: 600;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.25em;
  text-decoration-color: rgba(147, 40, 31, 0.4);
  transition: text-decoration-color 0.2s ease, color 0.2s ease;
  cursor: pointer;
}
html body .bd-link:hover { text-decoration-color: currentColor; }
html body .bd-link:focus-visible { outline: 2px solid var(--bd-accent-orange); outline-offset: 2px; border-radius: 2px; }
html body .bd-link--nowrap { white-space: nowrap; }
/* Тильда красит ссылки-телефоны в цвет текста (:where(.t-records) a[href^="tel"]) — возвращаем цвет ссылки */
html body .bd-link[href^="tel"] { color: var(--bd-dark-red); }
html body .bd-block--dark .bd-link[href^="tel"],
html body .bd-g2 .bd-link[href^="tel"],
html body .bd-link--light[href^="tel"] { color: var(--bd-accent-yellow); }
html body .bd-block--dark .bd-link,
html body .bd-g2 .bd-link,
html body .bd-link--light { color: var(--bd-accent-yellow); text-decoration-color: rgba(248, 208, 71, 0.45); }
html body .bd-block--dark .bd-link:hover,
html body .bd-g2 .bd-link:hover,
html body .bd-link--light:hover { text-decoration-color: currentColor; }

/* ---------- Иконка из спрайта BD ---------- */
html body .bd-icon {
  display: inline-block;
  width: 1.5rem;
  height: 1.5rem;
  flex-shrink: 0;
  vertical-align: middle;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}
html body .bd-icon--sm { width: 1.125rem; height: 1.125rem; }
html body .bd-icon--lg { width: 2rem; height: 2rem; }

/* ---------- G1: тонкая фирменная полоса сверху секции ---------- */
html body .bd-g1 { position: relative; }
html body .bd-g1::before {
  content: "";
  position: absolute;
  left: 0;
  right: 0;
  top: 0;
  height: 4px;
  background: var(--bd-gradient-brand);
  pointer-events: none;
}

/* ---------- G2: тёплое свечение на тёмной CTA-секции ---------- */
html body .bd-g2 {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  background: var(--bd-ink);
  color: #f3e9dc;
}
html body .bd-g2::after {
  content: "";
  position: absolute;
  right: -20%;
  bottom: -60%;
  width: 70%;
  aspect-ratio: 1;
  background: radial-gradient(closest-side, rgba(230, 151, 50, 0.45), rgba(219, 13, 35, 0.18) 55%, transparent);
  z-index: -1;
  pointer-events: none;
}

/* ---------- Появление по скроллу (BD.reveal). Без JS всё видно сразу ---------- */
html.bd-js [data-reveal] {
  opacity: 0;
  transform: translateY(var(--bd-reveal-shift));
  transition: opacity var(--bd-reveal-duration) ease, transform var(--bd-reveal-duration) ease;
}
html.bd-js [data-reveal].is-in { opacity: 1; transform: none; }

/* ---------- Плашка cookie (BD.cookies) ---------- */
html body .bd-cookies {
  position: fixed;
  left: 1.5rem;
  bottom: 1.5rem;
  z-index: 980;
  display: flex;
  align-items: center;
  gap: 1.25rem;
  max-width: 36rem;
  padding: 1.125rem 1.25rem 1.125rem 1.5rem;
  box-sizing: border-box;
  background: var(--bd-bg-light);
  border: 1px solid var(--bd-line);
  border-radius: var(--bd-radius-card);
  box-shadow: 0 0.75rem 2.5rem rgba(104, 60, 17, 0.16);
  font-family: var(--bd-font-main);
  opacity: 0;
  transform: translateY(1rem);
  transition: opacity 0.4s ease, transform 0.4s ease;
}
html body .bd-cookies.is-in { opacity: 1; transform: none; }
html body .bd-cookies__text {
  margin: 0;
  font-size: 0.875rem;
  line-height: 1.5;
  color: var(--bd-text-main);
}
html body .bd-cookies .bd-link { font-weight: 600; }
html body .bd-cookies button.bd-cookies__btn { flex-shrink: 0; box-sizing: border-box; height: auto; min-height: 2.75rem; padding: 0.625rem 1.5rem; }

/* ---------- Адаптив: 1024 / 767 / 480 ---------- */
@media (max-width: 1024px) {
  html body .bd-block {
    padding-left: var(--bd-pad-x-tablet);
    padding-right: var(--bd-pad-x-tablet);
  }
}

@media (max-width: 767px) {
  html body .bd-block {
    padding: var(--bd-pad-y-mobile) var(--bd-pad-x-mobile);
  }
  html body .bd-lead { font-size: 1rem; }
  html body .bd-card { padding: 1.25rem; }
}

@media (max-width: 480px) {
  html body .bd-button { padding: 0.8125rem 1.375rem; }
}

@media (max-width: 600px) {
  html body .bd-cookies {
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(0.75rem + env(safe-area-inset-bottom, 0px));
    flex-direction: column;
    align-items: stretch;
    gap: 0.875rem;
    padding: 1.125rem;
  }
}

/* ---------- Уменьшение анимаций по желанию пользователя ---------- */
@media (prefers-reduced-motion: reduce) {
  html body .bd-button,
  html body .bd-button svg,
  html body .bd-link,
  html body .bd-cookies { transition: none !important; }
  html.bd-js [data-reveal] { opacity: 1; transform: none; transition: none; }
}
