:root {
  --font-body: "Nunito Sans", Arial, sans-serif;
  --font-heading: "Overpass", Arial, sans-serif;
  --color-text: #151515;
  --color-background: #efefef;
  --color-white: #ffffff;
  --color-muted: #d9d9d9;
  --color-accent: #e84427;
  --color-accent-dark: #c43a21;
  --color-border: rgb(21 21 21 / 10%);
  --container-width: 1312px;
  --container-gutter: 64px;
  --page-width: 1440px;
  --space-1: 4px;
  --space-2: 8px;
  --space-3: 12px;
  --space-4: 16px;
  --space-5: 24px;
  --space-6: 32px;
  --space-7: 48px;
  --space-8: 64px;
  --section-space: 120px;
  --section-heading-gap: 48px;
  --text-body: 16px;
  --text-h1: 68px;
  --text-h2: 46px;
  --text-h3: 18px;
  --text-h4: 14px;
  --text-btn1: 14px;
  --text-btn2: 12px;
  --text-btn3: 14px;
  --header-height: 139px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-height) + var(--space-5));
}

body {
  margin: 0;
  min-width: 320px;
  font-family: var(--font-body);
  font-size: var(--text-body);
  line-height: 1.4;
  color: var(--color-text);
  background: var(--color-background);
}

h1, h2, h3, h4, p, figure {
  margin: 0;
}

h1, h2, h3, h4, .h1, .h2, .h3AA, .h3Aa, .h4 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
  overflow-wrap: break-word;
}

h1, .h1 { font-size: var(--text-h1); }
h2, .h2 { font-size: var(--text-h2); }
h3, .h3AA, .h3Aa { font-size: var(--text-h3); }
h4, .h4 { font-size: var(--text-h4); }
h1, h2, h4, .h1, .h2, .h3AA, .h4 { text-transform: uppercase; }

.p1, .p2 {
  font-family: var(--font-body);
  font-size: var(--text-body);
  font-weight: 400;
  line-height: 1.4;
}

.btn1, .btn2, .btn3 {
  font-family: var(--font-heading);
  font-weight: 900;
  line-height: 1.2;
}

.btn1 > span, .btn2 > span, .btn3 > span { display: block; }
button, .btn1, .btn2, .btn3, button > span, .btn1 > span, .btn2 > span, .btn3 > span { text-box: trim-both cap alphabetic; }

.btn1 { font-size: var(--text-btn1); text-transform: uppercase; }
.btn2 { font-size: var(--text-btn2); text-transform: uppercase; }
.btn3 { font-size: var(--text-btn3); font-weight: 600; }

img, picture, video, svg {
  display: block;
  max-width: 100%;
}

img, video { height: auto; }

button, input, select, textarea { font: inherit; }
button, a, input, select, textarea { -webkit-tap-highlight-color: transparent; }
button { cursor: pointer; }
a { color: inherit; }

:focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 4px;
}

.container {
  width: 100%;
  max-width: var(--page-width);
  margin-inline: auto;
  padding-inline: var(--container-gutter);
}

.category-card { min-width: 0; overflow: hidden; border: 1px solid var(--color-muted); border-radius: 6px; transition: border-color 150ms ease; }
.category-card:hover, .category-card:focus-visible { border-color: var(--color-accent); }
.category-card__line { width: 100%; height: auto; }

.section { margin-block-start: var(--section-space); }
.section__heading { display: flex; flex-direction: column; gap: 8px; margin-bottom: var(--section-heading-gap); }

.skip-link {
  position: fixed;
  z-index: 100;
  inset-block-start: var(--space-4);
  inset-inline-start: var(--space-4);
  padding: var(--space-3) var(--space-4);
  color: var(--color-white);
  background: var(--color-text);
  transform: translateY(calc(-100% - var(--space-5)));
}

.skip-link:focus { transform: translateY(0); }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Единые точки адаптива: 1024px (планшет), 767px (телефон).
   Блоки используют те же точки только когда нужно изменить компоновку. */
@media (max-width: 1024px) {
  :root {
    --container-gutter: 36px;
    --section-space: 64px;
    --section-heading-gap: 24px;
    --text-body: 14px;
    --text-h1: 40px;
    --text-h2: 28px;
    --text-h3: 16px;
    --text-btn1: 12px;
    --text-btn2: 11px;
    --text-btn3: 13px;
    --header-height: 105px;
  }
}

@media (max-width: 767px) {
  :root {
    --container-gutter: 24px;
    --header-height: 97px;
  }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}
