/* ================================================
   BASE.CSS — Токены, сброс, типографика, сетка
   Центр Банкротства
   ================================================ */

/* ── Токены ── */
:root {
  --navy:        #0E3656;
  --navy-dark:   #0A2540;
  --navy-mid:    #1a4a6e;
  --gold:        #BAA378;
  --gold-light:  rgba(186,163,120,.18);
  --red:         #BE1E2F;
  --cta:         #5E47D2;
  --cta-hover:   #4E39C2;
  --bg:          #FDFEFF;
  --bg-warm:     #E9E9E4;
  --bg-blue:     #F0F5FA;
  --text:        #0E3656;
  --text-muted:  #424242;
  --text-light:  #6b7a8d;
  --border:      #C2C2C2;
  --border-gold: rgba(186,163,120,.5);

  --font:    'Fira Sans', system-ui, sans-serif;
  --font-ui: 'Inter', system-ui, sans-serif;

  --px:          clamp(1rem, 4vw, 1.5rem);
  --container:   1200px;
  --content-max: var(--container);
  --gap:         1.5rem;
  --section-py:  5rem;

  --radius:    8px;
  --radius-lg: 16px;
  --radius-xl: 24px;

  --shadow-sm: 0 2px 8px rgba(14,54,86,.07);
  --shadow:    0 4px 20px rgba(14,54,86,.10);
  --shadow-md: 0 4px 24px rgba(14,54,86,.12);
  --shadow-lg: 0 8px 40px rgba(14,54,86,.15);

  --transition: .25s ease;
}

/* ── Сброс ── */
*,*::before,*::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--font);
  font-size: 1rem;
  line-height: 1.65;
  color: var(--text);
  background: var(--bg);
  overflow-x: hidden;
}
img, svg { display: block; max-width: 100%; height: auto; }
a { color: inherit; text-decoration: none; }
ul,ol { list-style: none; }
button { cursor: pointer; font-family: inherit; border: none; background: none; }
input,textarea,select { font-family: inherit; font-size: 1rem; }

/* ── Типографика ── */
h1,.h1 { font-size: clamp(2rem, 5vw, 3.75rem); font-weight: 700; line-height: 1.08; color: var(--navy); }
h2,.h2 { font-size: clamp(1.5rem, 3.5vw, 1.875rem); font-weight: 700; line-height: 1.15; color: var(--navy); }
h3,.h3 { font-size: clamp(1.05rem, 2vw, 1.25rem); font-weight: 700; line-height: 1.25; color: var(--navy); }
h4,.h4 { font-size: 1rem; font-weight: 700; color: var(--navy); }
p { text-wrap: pretty; }

/* ── Контейнер ── */
.container {
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--px);
}

/* ── Секции ── */
.section { padding-block: var(--section-py); }
.section--warm  { background: var(--bg-warm); }
.section--blue  { background: var(--bg-blue); }
.section--navy  { background: var(--navy); color: #fff; }
.section--navy  h2,.section--navy h3 { color: #fff; }

/* ── Сетки ── */
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: var(--gap); }
.grid-3 { display: grid; grid-template-columns: repeat(3,1fr); gap: var(--gap); }
.grid-4 { display: grid; grid-template-columns: repeat(4,1fr); gap: var(--gap); }

@media (max-width: 1200px) {
  .grid-4 { grid-template-columns: repeat(2,1fr); }
}
@media (max-width: 768px) {
  .grid-2,.grid-3,.grid-4 { grid-template-columns: 1fr; }
  .section { padding-block: 3rem; }
  :root { --section-py: 3rem; }
}
@media (max-width: 360px) {
  :root { --px: .875rem; }
}

/* ── Заголовок секции ── */
.section-title { margin-bottom: 2.5rem; }
.section-title h2 { position: relative; display: inline-block; }
.section-title h2::after {
  content: '';
  display: block;
  width: 56px; height: 3px;
  background: var(--gold);
  margin-top: .5rem;
  border-radius: 2px;
}
.section-title--center { text-align: center; }
.section-title--center h2::after { margin-inline: auto; }
.section-title--white h2 { color: #fff; }
.section-title--white h2::after { background: var(--gold); }

/* ── Скролл-анимации (только когда JS загружен) ── */
.js-ready [data-anim] {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity .4s ease, transform .4s ease;
}
.js-ready [data-anim].in-view {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .js-ready [data-anim],
  .js-ready [data-anim].in-view { opacity: 1; transform: none; transition: none; }
}

/* ── Утилиты ── */
.text-center { text-align: center; }
.text-navy   { color: var(--navy); }
.text-red    { color: var(--red); }
.text-muted  { color: var(--text-muted); }
.fw-bold     { font-weight: 700; }
.mt-2        { margin-top: 1rem; }
.mt-3        { margin-top: 1.5rem; }
.mb-2        { margin-bottom: 1rem; }

.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap;
}
