/* ============================================================
   ZUBRITSKY — design-system.css
   Источник правды: Brandkit.dc.html (финальные макеты).
   Палитра, типографика (Unbounded + Manrope, самохостинг),
   компоненты и все 12 анимаций макетов — 1:1.
   ============================================================ */

/* ---------- 1. Шрифты (самохостинг, woff2, cyr+lat) ---------- */
@font-face { font-family: "Unbounded"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/unbounded-cyr-400.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/unbounded-lat-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/unbounded-cyr-600.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/unbounded-lat-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/unbounded-cyr-700.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/unbounded-lat-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap;
  src: url("/static/fonts/unbounded-cyr-800.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 800; font-display: swap;
  src: url("/static/fonts/unbounded-lat-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Unbounded"; font-weight: 900; font-display: swap;
  src: url("/static/fonts/unbounded-cyr-900.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 900; font-display: swap;
  src: url("/static/fonts/unbounded-lat-900.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }

@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/manrope-cyr-400.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400; font-display: swap;
  src: url("/static/fonts/manrope-lat-400.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap;
  src: url("/static/fonts/manrope-cyr-500.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 500; font-display: swap;
  src: url("/static/fonts/manrope-lat-500.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/manrope-cyr-600.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 600; font-display: swap;
  src: url("/static/fonts/manrope-lat-600.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/manrope-cyr-700.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 700; font-display: swap;
  src: url("/static/fonts/manrope-lat-700.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap;
  src: url("/static/fonts/manrope-cyr-800.woff2") format("woff2"); unicode-range: U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 800; font-display: swap;
  src: url("/static/fonts/manrope-lat-800.woff2") format("woff2"); unicode-range: U+0000-00FF, U+2000-206F, U+20AC, U+2192; }

/* ---------- 2. Токены (Brandkit 1:1) ---------- */
:root {
  --ink:          #17130F;
  --terra:        #B2461F;
  --terra-hover:  #8F3717;
  --accent:       #E0682F;
  --bg:           #F2EDE4;
  --bg-2:         #EAE2D3;
  --white:        #FFFFFF;

  --ink-45:  rgba(23, 19, 15, .45);
  --ink-15:  rgba(23, 19, 15, .15);
  --paper-75: rgba(242, 237, 228, .75);
  --paper-55: rgba(242, 237, 228, .55);
  --paper-15: rgba(242, 237, 228, .15);

  --font-head: "Unbounded", sans-serif;
  --font-text: "Manrope", sans-serif;

  --h1: clamp(34px, 5vw, 64px);
  --h2: clamp(22px, 2.6vw, 32px);

  --track-tight: -.01em;
  --track-caps:  .04em;
  --track-label: .14em;

  --container: 1200px;
}

/* ---------- 3. База ---------- */
*, *::before, *::after { box-sizing: border-box; }
/* Атрибут hidden ДОЛЖЕН побеждать любые .class { display: ... } —
   иначе элементы, скрытые через hidden (шаги калькулятора, формы
   "отправлено", вкладки), показываются все разом. */
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-text);
  font-size: 15px;
  line-height: 1.6;
  overflow-x: hidden;
  /* sticky footer: на коротких страницах футер прижат к низу экрана */
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
.site-main { flex: 1 0 auto; }
img { max-width: 100%; display: block; }
a { color: inherit; }
h1, h2, h3, h4 { font-family: var(--font-head); margin: 0; }
h1 { font-weight: 800; font-size: var(--h1); letter-spacing: var(--track-tight);
     text-transform: uppercase; line-height: 1.04; }
h2 { font-weight: 800; font-size: var(--h2); letter-spacing: var(--track-tight);
     text-transform: uppercase; line-height: 1.15; }

.container { max-width: var(--container); margin: 0 auto; padding: 0 40px; }
@media (max-width: 720px) { .container { padding: 0 18px; } }

.label {
  font-size: 12px; font-weight: 700; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-45);
}

/* Квадратная «плиточная» точка бренда (правка дизайнера: не круглая) */
.dot { display: inline-block; width: .2em; height: .2em; background: var(--terra);
       margin-left: -.06em; vertical-align: baseline; }

/* ---------- 4. Кнопки (Brandkit 1:1) ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 18px;
  font-family: var(--font-head); font-weight: 600; font-size: 13.5px;
  letter-spacing: var(--track-caps); text-transform: uppercase;
  text-decoration: none; cursor: pointer; border: 0;
  transition: background .18s ease, color .18s ease, border-color .18s ease;
}
.btn-primary { background: var(--terra); color: var(--bg); padding: 21px 32px; }
.btn-primary:hover { background: var(--terra-hover); }
.btn-primary .arr { font-family: var(--font-text); font-size: 20px; line-height: 1; }
.btn-secondary { background: none; color: var(--ink);
  border: 1px solid var(--ink); padding: 20px 32px; }
.btn-secondary:hover { background: var(--ink); color: var(--bg); }
.on-dark .btn-secondary { color: var(--bg); border-color: var(--paper-55); }
.on-dark .btn-secondary:hover { background: var(--bg); color: var(--ink); }

/* ---------- 5. Карточки и тёмные секции ---------- */
.card { background: var(--white); padding: 26px 24px; }
.card-tint { background: var(--bg-2); padding: 26px 24px; }
.section-dark { background: var(--ink); color: var(--bg); }
.section-dark .label { color: var(--paper-55); }

.rule-head {
  display: flex; align-items: baseline; justify-content: space-between;
  gap: 24px; padding-bottom: 20px; border-bottom: 2px solid var(--ink);
}
.section-dark .rule-head { border-color: var(--paper-15); }

/* ---------- 6. Формы ---------- */
.field input, .field textarea, .field select {
  width: 100%; background: var(--white); color: var(--ink);
  border: 1px solid var(--ink-15); padding: 16px 18px;
  font-family: var(--font-text); font-size: 15px; border-radius: 0;
}
.field input:focus, .field textarea:focus, .field select:focus {
  outline: 2px solid var(--terra); outline-offset: -1px; border-color: var(--terra);
}
.field-label {
  display: block; margin-bottom: 8px;
  font-size: 12px; font-weight: 700; letter-spacing: var(--track-label);
  text-transform: uppercase; color: var(--ink-45);
}

/* ---------- 7. Анимации (12 шт., из финальных макетов 1:1) ---------- */
@keyframes dimIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes drawY { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes fadeUp { from { opacity: 0; transform: translateY(16px); } to { opacity: 1; transform: translateY(0); } }
@keyframes headerFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes logoIn { from { opacity: 0; transform: translateY(-14px); } to { opacity: 1; transform: translateY(0); } }
@keyframes marquee { from { transform: translateX(0); } to { transform: translateX(-50%); } }
@keyframes pulseDot { 0%, 100% { opacity: 1; } 50% { opacity: .25; } }
@keyframes riseIn { from { transform: translateY(110%); } to { transform: translateY(0); } }
@keyframes scrollDot { 0% { transform: translateY(0); opacity: 0; } 25% { opacity: 1; } 75% { opacity: 1; } 100% { transform: translateY(26px); opacity: 0; } }
@keyframes sheetUp { from { transform: translateY(100%); } to { transform: translateY(0); } }
@keyframes stepIn { from { opacity: 0; transform: translateX(26px); } to { opacity: 1; transform: translateX(0); } }
@keyframes stepInBack { from { opacity: 0; transform: translateX(-26px); } to { opacity: 1; transform: translateX(0); } }

.a-fadeUp  { animation: fadeUp .8s cubic-bezier(.22, 1, .36, 1) both; }
.a-logoIn  { animation: logoIn .7s cubic-bezier(.22, 1, .36, 1) both; }
.a-dimIn   { animation: dimIn .6s ease both; }
.a-riseIn  { overflow: hidden; }
.a-riseIn > * { animation: riseIn .9s cubic-bezier(.22, 1, .36, 1) both; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
