/* ============================================================
   Дизайн-система
   Тёплый белый фон, графитовый текст, красный — только акцент.
   ============================================================ */

:root {
  /* фон */
  --bg: #F7F7F5;
  --bg-soft: #FAFAF8;
  --surface: #FFFFFF;
  --surface-2: #F2F2EE;

  /* текст */
  --ink: #171717;
  --ink-2: #252525;
  --ink-3: #4A4A47;
  --muted: #6E6E6A;
  --muted-2: #92928D;

  /* линии */
  --line: #E6E6E1;
  --line-2: #DEDED8;

  /* фирменный красный — акцент, не фон */
  --red: #C8252D;
  --red-hover: #AC1F26;
  --red-soft: #FBEEEE;
  --red-line: #F2D3D4;

  /* спокойный цвет доверия */
  --trust: #3F6B52;
  --trust-soft: #EDF3EF;
  --trust-line: #D6E5DB;

  /* серо-голубой — технические метки */
  --steel: #46606F;
  --steel-soft: #EDF1F3;
  --steel-line: #DAE2E6;

  --amber: #8A6A1F;
  --amber-soft: #FBF4E4;
  --amber-line: #EADFC2;

  --radius-sm: 10px;
  --radius: 14px;
  --radius-lg: 18px;
  --radius-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(23, 23, 23, .04);
  --shadow: 0 2px 8px rgba(23, 23, 23, .05);
  --shadow-lg: 0 12px 36px rgba(23, 23, 23, .10);

  --container: 1240px;
  --header-h: 68px;

  --font: "Inter", -apple-system, BlinkMacSystemFont, "Segoe UI", "Helvetica Neue",
          "SF Pro Text", Roboto, Arial, sans-serif;
  --mono: "SF Mono", ui-monospace, "JetBrains Mono", Menlo, Consolas, monospace;
}

* { box-sizing: border-box; }

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

body {
  margin: 0;
  font-family: var(--font);
  background: var(--bg);
  color: var(--ink);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; color: inherit; }

h1, h2, h3, h4 { margin: 0; font-weight: 640; letter-spacing: -0.018em; line-height: 1.14; }
h1 { font-size: clamp(32px, 4.6vw, 54px); }
h2 { font-size: clamp(26px, 3vw, 38px); }
h3 { font-size: clamp(19px, 1.6vw, 23px); letter-spacing: -0.012em; }
h4 { font-size: 17px; letter-spacing: -0.008em; }
p { margin: 0; }

::selection { background: #F6DADB; color: var(--ink); }

:focus-visible {
  outline: 2px solid var(--red);
  outline-offset: 2px;
  border-radius: 6px;
}

/* ---------------- раскладка ---------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding: 0 24px;
}
.container-narrow { max-width: 880px; }

.section { padding: 88px 0; }
.section-sm { padding: 56px 0; }
.section-tight { padding: 40px 0; }
.section--surface { background: var(--surface); }
.section--soft { background: var(--bg-soft); }
.section--line { border-top: 1px solid var(--line); }

.stack { display: grid; gap: 16px; }
.stack-sm { display: grid; gap: 8px; }
.stack-lg { display: grid; gap: 32px; }
.row { display: flex; gap: 12px; align-items: center; }
.row-wrap { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.between { display: flex; gap: 16px; align-items: center; justify-content: space-between; }
.grid { display: grid; gap: 20px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.spacer { flex: 1; }

/* ---------------- типографика ---------------- */

.eyebrow {
  font-size: 12px;
  font-weight: 650;
  letter-spacing: .13em;
  text-transform: uppercase;
  color: var(--red);
}
.eyebrow--muted { color: var(--muted-2); }

.lead { font-size: clamp(16px, 1.3vw, 19px); color: var(--ink-3); line-height: 1.6; }
.muted { color: var(--muted); }
.small { font-size: 13.5px; }
.tiny { font-size: 12.5px; color: var(--muted); }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.nowrap { white-space: nowrap; }
.strong { font-weight: 620; }
.center { text-align: center; }
.section-head { max-width: 760px; display: grid; gap: 14px; margin-bottom: 40px; }
.section-head.center { margin-inline: auto; }

/* ---------------- кнопки ---------------- */

.btn {
  --btn-bg: var(--surface);
  --btn-fg: var(--ink);
  --btn-line: var(--line-2);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  height: 48px;
  padding: 0 22px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--btn-line);
  background: var(--btn-bg);
  color: var(--btn-fg);
  font-size: 15px;
  font-weight: 560;
  letter-spacing: -0.005em;
  cursor: pointer;
  transition: background .16s ease, border-color .16s ease, transform .12s ease, color .16s ease;
  white-space: nowrap;
}
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: none; }

.btn--primary { --btn-bg: var(--red); --btn-fg: #fff; --btn-line: var(--red); }
.btn--primary:hover { --btn-bg: var(--red-hover); --btn-line: var(--red-hover); }

.btn--dark { --btn-bg: var(--ink); --btn-fg: #fff; --btn-line: var(--ink); }
.btn--dark:hover { --btn-bg: #000; }

.btn--ghost { --btn-bg: transparent; --btn-line: var(--line-2); }
.btn--ghost:hover { --btn-bg: var(--surface); }

.btn--quiet { --btn-bg: var(--surface-2); --btn-line: transparent; }
.btn--quiet:hover { --btn-bg: #EAEAE4; }

.btn--sm { height: 38px; padding: 0 16px; font-size: 14px; }
.btn--lg { height: 56px; padding: 0 28px; font-size: 16.5px; }
.btn--block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; }

.link {
  color: var(--ink);
  border-bottom: 1px solid var(--line-2);
  padding-bottom: 1px;
  transition: border-color .15s, color .15s;
}
.link:hover { color: var(--red); border-color: var(--red-line); }
.link--red { color: var(--red); border-color: var(--red-line); }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 42px; height: 42px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
}
.icon-btn:hover { border-color: var(--line-2); color: var(--red); }
.icon-btn.is-active { color: var(--red); border-color: var(--red-line); background: var(--red-soft); }

/* ---------------- формы ---------------- */

.field { display: grid; gap: 7px; }
.field > label, .label {
  font-size: 13px;
  font-weight: 560;
  color: var(--ink-3);
}
.input, .select, .textarea {
  width: 100%;
  height: 46px;
  padding: 0 14px;
  border: 1px solid var(--line-2);
  border-radius: var(--radius-sm);
  background: var(--surface);
  font: inherit;
  font-size: 15px;
  color: var(--ink);
  transition: border-color .15s, box-shadow .15s;
  appearance: none;
}
.textarea { height: auto; min-height: 104px; padding: 12px 14px; line-height: 1.5; resize: vertical; }
.select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' fill='none' stroke='%236E6E6A' stroke-width='1.6' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat;
  background-position: right 14px center;
  padding-right: 36px;
  cursor: pointer;
}
.input:focus, .select:focus, .textarea:focus {
  outline: none;
  border-color: #B9B9B2;
  box-shadow: 0 0 0 3px rgba(23,23,23,.05);
}
.input::placeholder, .textarea::placeholder { color: var(--muted-2); }
.input-group { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }

.check {
  display: flex;
  align-items: center;
  gap: 10px;
  font-size: 14.5px;
  cursor: pointer;
  padding: 3px 0;
  color: var(--ink-2);
}
.check input { accent-color: var(--red); width: 17px; height: 17px; margin: 0; cursor: pointer; }
.check .count { margin-left: auto; color: var(--muted-2); font-size: 12.5px; }

.hint { font-size: 12.5px; color: var(--muted); }

/* ---------------- утилиты ---------------- */

.hide { display: none !important; }
.sr {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}
.only-mobile { display: none; }
.divider { height: 1px; background: var(--line); border: 0; margin: 0; }

@media (max-width: 1080px) {
  .grid-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .section { padding: 56px 0; }
  .section-sm { padding: 40px 0; }
  .container { padding: 0 16px; }
  .grid-2, .grid-3, .grid-4 { grid-template-columns: minmax(0, 1fr); }
  .only-mobile { display: initial; }
  .no-mobile { display: none !important; }
  body { padding-bottom: 64px; }  /* место под нижнюю навигацию */
}
