/* СИТР — стили компонентов дизайн-системы «СИТР». Значения — только из токенов (tokens.css). */
:root { --st-logo-ink: #0F3D36; --st-logo-core: #C9A227; }
[data-theme="dark"] { --st-logo-ink: #F5F2EA; --st-logo-core: #C9A227; }

body { margin: 0; background: var(--surface); color: var(--ink); font-family: var(--font-sans); font-size: 16px; line-height: 26px; -webkit-font-smoothing: antialiased; }
.st-logo { display: block; flex: none; }
.st-icon { display: inline-block; flex: none; vertical-align: middle; }

/* focus */
.st-btn:focus-visible, .st-link:focus-visible, .st-faq__btn:focus-visible, .st-header a:focus-visible, .st-header__toggle:focus-visible,
.st-footer a:focus-visible, .st-field__control:focus-visible, .st-check__box:focus-visible {
  outline: var(--stroke-focus) solid var(--focus); outline-offset: 2px;
}

/* ---------- Button ---------- */
.st-btn { display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2); box-sizing: border-box; min-height: 44px; padding: 0 var(--space-5);
  border-radius: var(--radius-md); border: var(--stroke-control) solid transparent; font-family: var(--font-sans); font-size: 16px; line-height: 20px; font-weight: 500;
  text-decoration: none; cursor: pointer; white-space: nowrap; max-width: 100%; transition: background-color .15s, border-color .15s, color .15s; }
.st-btn--lg { min-height: 52px; padding: 0 var(--space-6); font-size: 17px; }
.st-btn--primary { background: var(--primary); color: var(--on-primary); }
.st-btn--primary:hover { background: var(--primary-hover); }
.st-btn--secondary { background: transparent; color: var(--primary); border-color: var(--primary); }
.st-btn--secondary:hover { background: var(--primary-soft); }
.st-btn--text { background: transparent; color: var(--primary); padding: 0 var(--space-2); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 4px; }
.st-btn--text:hover { color: var(--primary-hover); text-decoration-thickness: 2px; }
.st-btn:disabled, .st-btn[aria-disabled="true"] { opacity: .45; cursor: not-allowed; }
/* Узкий экран: длинная подпись переносится, кнопка не шире контейнера. Вертикальный padding виден только у двух строк: одну держит min-height. */
@media (max-width: 720px) {
  .st-btn { white-space: normal; text-wrap: balance; text-align: center; padding-top: var(--space-2); padding-bottom: var(--space-2); }
  .st-btn > span { min-width: 0; overflow-wrap: anywhere; }
}

.st-link { display: inline-flex; align-items: center; gap: var(--space-1); color: var(--link); font-weight: 500; font-size: 15px; text-decoration: none; border-bottom: 1px solid currentColor; padding-bottom: 1px; }
.st-link:hover { color: var(--primary-hover); }

/* ---------- Tag ---------- */
.st-tag { display: inline-flex; align-items: center; gap: var(--space-1); font-family: var(--font-mono); font-size: 12px; line-height: 16px; padding: 4px var(--space-2); border-radius: var(--radius-xs); background: var(--surface-sunken); color: var(--ink); }
.st-tag--primary { background: var(--primary-soft); color: var(--primary); }
.st-tag--accent { background: var(--accent); color: var(--on-accent); }
.st-tag--success { background: var(--success-soft); color: var(--success); }

/* ---------- Fields ---------- */
.st-field { display: flex; flex-direction: column; gap: var(--space-2); min-width: 0; }
.st-field__label { font-size: 14px; line-height: 20px; font-weight: 500; color: var(--ink); }
.st-field__req { color: var(--danger); }
.st-field__control { box-sizing: border-box; width: 100%; min-width: 0; min-height: 48px; padding: 12px var(--space-4); font: inherit; font-size: 16px; line-height: 22px; color: var(--ink);
  background: var(--surface-raised); border: var(--stroke-control) solid var(--line-strong); border-radius: var(--radius-md); }
textarea.st-field__control { resize: vertical; min-height: 112px; }
.st-field__control::placeholder { color: var(--ink-muted); opacity: 1; }
.st-field__control:hover { border-color: var(--ink-muted); }
.st-field__control:focus { border-color: var(--primary); outline: none; box-shadow: 0 0 0 1px var(--primary); }
.st-field__msg { margin: 0; font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.st-field--error .st-field__control { border-color: var(--danger); }
.st-field__msg--error { color: var(--danger); }

.st-check { display: flex; gap: var(--space-3); align-items: flex-start; }
.st-check__box { appearance: none; -webkit-appearance: none; flex: none; width: 20px; height: 20px; margin: 2px 0 0; border: var(--stroke-control) solid var(--line-strong); border-radius: var(--radius-xs); background: var(--surface-raised); cursor: pointer; display: grid; place-content: center; }
.st-check__box:checked { background: var(--primary); border-color: var(--primary); }
.st-check__box:checked::after { content: ""; width: 10px; height: 5px; border-left: 2px solid var(--on-primary); border-bottom: 2px solid var(--on-primary); transform: translateY(-1px) rotate(-45deg); }
.st-check__label { min-width: 0; font-size: 14px; line-height: 22px; color: var(--ink-muted); }
.st-check__label a { color: var(--link); }

/* ---------- Cards ---------- */
.st-card { box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-raised); border: var(--stroke-hairline) solid var(--line); border-radius: var(--radius-lg); color: var(--ink); }
.st-card__title { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 700; letter-spacing: -0.01em; overflow-wrap: anywhere; }
.st-card__text { margin: 0; font-size: 15px; line-height: 24px; color: var(--ink-muted); }
.st-card .st-link { align-self: flex-start; margin-top: auto; }

.st-service__icon { flex: none; max-width: 100%; width: 52px; height: 52px; border-radius: var(--radius-md); background: var(--primary-soft); color: var(--primary); display: grid; place-items: center; position: relative; }
.st-service__icon::after { content: ""; position: absolute; right: -3px; top: -3px; width: 8px; height: 8px; border-radius: 2px; background: var(--accent); }
.st-service__list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); font-size: 15px; line-height: 22px; }
.st-service__list li { display: flex; gap: var(--space-2); align-items: flex-start; }
.st-service__list li > span, .st-plan__features li > span { min-width: 0; overflow-wrap: anywhere; }
.st-service__list .st-icon { color: var(--success); margin-top: 3px; }

.st-case__head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; }
.st-case__service { font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-muted); }
.st-case__metrics { margin: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(140px, 100%), 1fr)); gap: var(--space-4); padding: var(--space-4) 0; border-top: var(--stroke-hairline) solid var(--line); border-bottom: var(--stroke-hairline) solid var(--line); }
.st-case__metric { display: flex; flex-direction: column-reverse; gap: var(--space-1); }
.st-case__metric dd { margin: 0; font-family: var(--font-display); font-size: 36px; line-height: 40px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.st-case__metric dt { font-size: 13px; line-height: 18px; color: var(--ink-muted); }
.st-case__stack { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: var(--space-2); }
.st-case__stack li { font-family: var(--font-mono); font-size: 12px; line-height: 16px; padding: 4px var(--space-2); border-radius: var(--radius-xs); background: var(--surface-sunken); color: var(--ink); }

/* ---------- Steps ---------- */
.st-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: var(--space-5); counter-reset: none; }
.st-steps--horizontal { grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); }
.st-steps__item { display: flex; flex-direction: column; gap: var(--space-4); }
.st-steps--horizontal .st-steps__item { border-top: var(--stroke-control) solid var(--primary); padding-top: var(--space-4); }
.st-steps--vertical .st-steps__item { flex-direction: row; gap: var(--space-5); padding-bottom: var(--space-5); border-bottom: var(--stroke-hairline) solid var(--line); }
.st-steps__num { font-family: var(--font-mono); font-size: 14px; line-height: 20px; font-weight: 500; color: var(--accent-ink); }
.st-steps--vertical .st-steps__num { flex: none; width: 48px; height: 48px; border: var(--stroke-control) solid var(--primary); border-radius: var(--radius-md); display: grid; place-items: center; color: var(--primary); }
.st-steps__body { display: flex; flex-direction: column; gap: var(--space-2); }
.st-steps__title { margin: 0; font-family: var(--font-display); font-size: 19px; line-height: 26px; font-weight: 700; overflow-wrap: anywhere; }
.st-steps__text { margin: 0; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.st-steps__meta { margin: 0; font-family: var(--font-mono); font-size: 12px; line-height: 16px; color: var(--ink-muted); }

/* ---------- FAQ ---------- */
.st-faq { border-top: var(--stroke-hairline) solid var(--line); }
.st-faq__item { border-bottom: var(--stroke-hairline) solid var(--line); }
.st-faq__h { margin: 0; }
.st-faq__btn { width: 100%; display: flex; align-items: center; justify-content: space-between; gap: var(--space-5); padding: var(--space-5) 0; background: none; border: 0; cursor: pointer; text-align: left;
  font-family: var(--font-display); font-size: 19px; line-height: 26px; font-weight: 600; color: var(--ink); overflow-wrap: anywhere; }
.st-faq__btn .st-icon { color: var(--primary); }
.st-faq__btn:hover { color: var(--primary); }
.st-faq__panel { padding: 0 var(--space-9) var(--space-5) 0; }
.st-faq__panel p { margin: 0; font-size: 16px; line-height: 26px; color: var(--ink-muted); max-width: 720px; }

/* ---------- Header ---------- */
.st-header { background: var(--surface-raised); border-bottom: var(--stroke-hairline) solid var(--line); }
.st-header__inner { box-sizing: border-box; max-width: var(--container-max); margin: 0 auto; padding: 0 var(--page-padding); min-height: var(--header-height); display: flex; align-items: center; gap: var(--space-6); }
.st-header__logo { display: inline-flex; flex: none; }
.st-header__nav { flex: 1 1 auto; }
.st-header__nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: var(--space-5); }
.st-header__nav a { color: var(--ink); text-decoration: none; font-size: 15px; line-height: 20px; padding: var(--space-2) 0; border-bottom: 2px solid transparent; }
.st-header__nav a:hover, .st-header__nav a[aria-current="page"] { color: var(--primary); border-bottom-color: var(--accent); }
.st-header__actions { display: flex; align-items: center; gap: var(--space-5); flex: none; }
.st-header__phone { color: var(--ink); text-decoration: none; font-size: 15px; font-weight: 500; white-space: nowrap; }
.st-header__toggle { display: none; width: 44px; height: 44px; align-items: center; justify-content: center; border: var(--stroke-control) solid var(--line-strong); border-radius: var(--radius-md); background: var(--surface-raised); color: var(--ink); cursor: pointer; }
@media (max-width: 960px) {
  .st-header__inner { flex-wrap: wrap; min-height: 64px; }
  .st-header__toggle { display: inline-flex; }
  .st-header__phone, .st-header__actions .st-btn { display: none; }
  .st-header__actions { margin-left: auto; }
  .st-header__nav { display: none; order: 3; flex-basis: 100%; padding-bottom: var(--space-4); }
  .st-header.is-open .st-header__nav { display: block; }
  .st-header__nav ul { flex-direction: column; gap: 0; }
  .st-header__nav a { display: block; padding: var(--space-3) 0; border-bottom: var(--stroke-hairline) solid var(--line); }
}

/* ---------- Footer ---------- */
.st-footer { background: var(--surface-inverse); color: var(--on-inverse); }
.st-footer__inner { box-sizing: border-box; max-width: var(--container-max); margin: 0 auto; padding: var(--space-8) var(--page-padding) var(--space-7); display: grid; grid-template-columns: minmax(240px, 1.4fr) repeat(3, minmax(160px, 1fr)); gap: var(--space-6); }
.st-footer__tagline { margin: var(--space-4) 0; font-size: 14px; line-height: 22px; color: var(--on-inverse-muted); max-width: 320px; }
.st-footer__contacts, .st-footer__col ul { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-2); }
.st-footer__contacts li { display: flex; align-items: center; gap: var(--space-2); color: var(--accent-on-inverse); }
.st-footer__h { margin: 0 0 var(--space-3); font-family: var(--font-mono); font-size: 12px; line-height: 16px; letter-spacing: 0.06em; text-transform: uppercase; color: var(--accent-on-inverse); }
.st-footer a { color: var(--on-inverse); text-decoration: none; font-size: 14px; line-height: 22px; }
.st-footer a:hover, .st-footer a:focus-visible { color: var(--accent-on-inverse); text-decoration: underline; text-underline-offset: 3px; }
.st-footer__legal { box-sizing: border-box; max-width: var(--container-max); margin: 0 auto; padding: var(--space-5) var(--page-padding) var(--space-6); border-top: var(--stroke-hairline) solid rgba(245, 242, 234, 0.18);
  display: flex; flex-wrap: wrap; gap: var(--space-2) var(--space-6); font-family: var(--font-mono); font-size: 12px; line-height: 18px; color: var(--on-inverse-muted); }
.st-footer__legal p { margin: 0; }
@media (max-width: 860px) { .st-footer__inner { grid-template-columns: 1fr 1fr; } .st-footer__brand { grid-column: 1 / -1; } }
@media (max-width: 520px) { .st-footer__inner { grid-template-columns: minmax(0, 1fr); } }

/* ---------- Pricing ---------- */
.st-pricing { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(260px, 100%), 1fr)); gap: var(--space-5); align-items: stretch; }
.st-plan { position: relative; box-sizing: border-box; display: flex; flex-direction: column; gap: var(--space-4); padding: var(--space-6); background: var(--surface-raised); border: var(--stroke-hairline) solid var(--line); border-radius: var(--radius-lg); }
.st-plan--hl { border: 2px solid var(--primary); }
.st-plan__badge { position: absolute; top: -13px; left: var(--space-6); font-family: var(--font-mono); font-size: 12px; line-height: 16px; padding: 4px var(--space-2); border-radius: var(--radius-xs); background: var(--accent); color: var(--on-accent); }
.st-plan__name { margin: 0; font-family: var(--font-display); font-size: 22px; line-height: 30px; font-weight: 700; overflow-wrap: anywhere; }
.st-plan__desc { margin: 0; font-size: 15px; line-height: 23px; color: var(--ink-muted); }
.st-plan__price { margin: 0; display: flex; align-items: baseline; gap: var(--space-2); flex-wrap: wrap; padding: var(--space-4) 0; border-top: var(--stroke-hairline) solid var(--line); border-bottom: var(--stroke-hairline) solid var(--line); }
.st-plan__amount { font-family: var(--font-display); font-size: 30px; line-height: 36px; font-weight: 700; letter-spacing: -0.02em; color: var(--primary); }
.st-plan__period { font-size: 14px; color: var(--ink-muted); }
.st-plan__features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: var(--space-3); font-size: 15px; line-height: 22px; flex: 1 1 auto; }
.st-plan__features li { display: flex; gap: var(--space-2); align-items: flex-start; }
.st-plan__features .st-icon { color: var(--success); margin-top: 2px; }
.st-plan__cta { width: 100%; }
