/* UA version: Red Hat Display has no Cyrillic (neither on Google Fonts nor in the brand file). Manrope, geometric
   and with similar proportions, is used only for Cyrillic letters; Latin and numerals stay in Red Hat Display. */
:root { --font-display: "Red Hat Display", "Manrope", system-ui, sans-serif; }

/* Primary buttons have a fixed width in Figma (measured for English) and would crop the Ukrainian labels, which are
   longer. Here the width follows the text; the animation is unchanged: the track starts pulled back on the left icon
   (negative margin instead of translateX) and moves 51 px on hover. */
.btn-primary { width: auto !important; }
.btn-primary__label { width: auto !important; white-space: nowrap; }
.btn-primary__track { margin-left: -51px; transform: none; }
@media (hover: hover) and (pointer: fine) {
  .btn-primary:hover .btn-primary__track { transform: translateX(51px); }
}
.btn-primary:focus-visible .btn-primary__track { transform: translateX(51px); }
.btn-primary:active .btn-primary__track { transform: translateX(51px) scale(0.98); }

/* Home hero outline button: the Ukrainian label may wrap on mobile. */
@media (max-width: 640px) {
  .btn-outline { height: auto; min-height: 50px; padding-top: 12px; padding-bottom: 12px; white-space: normal; text-align: left; }
}

/* Mobile (up to 420 px): long labels such as "Запросити індивідуальну модифікацію" overflowed the screen width and the
   button was cropped. The label may wrap onto two lines; to allow this the two animation texts are overlaid
   (instead of stacked in a one-line box) and the second slides in from below on hover, as before. */
@media (max-width: 420px) {
  .btn-primary { max-width: 100%; }
  .btn-primary__label { white-space: normal; max-width: calc(100vw - 2 * var(--page-gutter) - 50px); }
  .btn-primary__label { padding: 0 14px; }
  .btn-primary__roll { display: grid; height: auto; line-height: 1.15; }
  /* The modification CTA is the longest (three lines): slightly smaller to fit the button's 50 px. */
  .p-config .btn-primary__label { font-size: 13px; }
  .btn-primary__roll > span { grid-area: 1 / 1; white-space: normal; }
  .btn-primary__roll > span + span { transform: translateY(100%); }
  .btn-primary:focus-visible .btn-primary__roll > span:first-child { transform: translateY(-100%); }
  .btn-primary:focus-visible .btn-primary__roll > span + span { transform: none; }
}
@media (max-width: 420px) and (hover: hover) and (pointer: fine) {
  .btn-primary:hover .btn-primary__roll > span + span { transform: none; }
}

/* Specification headings on mobile: long Ukrainian words ("Командування") did not fit in 320 px at 38 px. */
@media (max-width: 420px) {
  .specs__title { font-size: min(38px, 10.4vw); }
}

/* Privacy Policy on mobile: "КОНФІДЕНЦІЙНОСТІ" in uppercase did not fit in 320–375 px at 36 px. */
@media (max-width: 640px) {
  .legal__title { font-size: min(36px, 7.4vw); }
}
