/*region CSS NORMALIZE*/

/**
  Нормализация блочной модели
 */
*,
::before,
::after {
  box-sizing: border-box;
}

/**
  Убираем внутренние отступы слева тегам списков,
  у которых есть атрибут class
 */
:where(ul, ol):where([class]) {
  padding-left: 0;
}

/**
  Убираем внешние отступы body и двум другим тегам,
  у которых есть атрибут class
 */
body,
:where(blockquote, figure, fieldset):where([class]) {
  margin: 0;
}

/**
  Убираем внешние отступы вертикали нужным тегам,
  у которых есть атрибут class
 */
:where(
  h1,
  h2,
  h3,
  h4,
  h5,
  h6,
  p,
  ul,
  ol,
  dl
):where([class]) {
  margin-block: 0;
}

:where(dd[class]) {
  margin-left: 0;
}

:where(fieldset[class]) {
  padding: 0;
  border: none;
}

/**
  Убираем стандартный маркер маркированному списку,
  у которого есть атрибут class
 */
:where(ul[class]) {
  list-style: none;
}

:where(address[class]) {
  font-style: normal;
}

/**
  Обнуляем вертикальные внешние отступы параграфа,
  объявляем локальную переменную для внешнего отступа вниз,
  чтобы избежать взаимодействие с более сложным селектором
 */
p {
  --paragraphMarginBottom: 24px;

  margin-block: 0;
}

/**
  Внешний отступ вниз для параграфа без атрибута class,
  который расположен не последним среди своих соседних элементов
 */
p:where(:not([class]):not(:last-child)) {
  margin-bottom: var(--paragraphMarginBottom);
}


/**
  Упрощаем работу с изображениями и видео
 */
img,
video {
  display: block;
  max-width: 100%;
  height: auto;
}

/**
  Наследуем свойства шрифт для полей ввода
 */
input,
textarea,
select,
button {
  font: inherit;
}

html {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  height: 100%;
  /**
    Убираем скачок интерфейса по горизонтали
    при появлении / исчезновении скроллбара
   */
  scrollbar-gutter: stable;
}

/**
  Плавный скролл
 */
html {
  scroll-behavior: smooth;
}

body {
  /**
    Пригодится в большинстве ситуаций
    (когда, например, нужно будет "прижать" футер к низу сайта)
   */
  min-height: 100%;
  /**
    Унифицированный интерлиньяж
   */
  line-height: 1.5;
}

/**
  Нормализация высоты элемента ссылки при его инспектировании в DevTools
 */
a:where([class]) {
  display: inline-flex;
}

/**
  Курсор-рука при наведении на элемент
 */
button,
label {
  cursor: pointer;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут fill со значением 'none' или начинается с 'url')
 */
:where([fill]:not(
  [fill="none"],
  [fill^="url"]
)) {
  fill: currentColor;
}

/**
  Приводим к единому цвету svg-элементы
  (за исключением тех, у которых уже указан
  атрибут stroke со значением 'none')
 */
:where([stroke]:not(
  [stroke="none"],
  [stroke^="url"]
)) {
  stroke: currentColor;
}

/**
  Чиним баг задержки смены цвета при взаимодействии с svg-элементами
 */
svg * {
  transition-property: fill, stroke;
}

/**
  Приведение рамок таблиц в классический 'collapse' вид
 */
:where(table) {
  border-collapse: collapse;
  border-color: currentColor;
}

/**
  Удаляем все анимации и переходы для людей,
  которые предпочитают их не использовать
 */
@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;
  }
}

/*endregion*/

/*region FONTS*/
@font-face {
  font-family: 'Roboto';
  src: url("./fonts/Roboto-Thin.woff2") format("woff2");
  font-weight: normal;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url("./fonts/Roboto-Medium.woff2") format("woff2");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Roboto';
  src: url("./fonts/Roboto-Italic.woff2") format("woff2");
  font-weight: normal;
  font-style: italic;
  font-display: swap;
}

/*endregion*/

:root {
  font-family: 'Roboto', Arial, sans-serif;
  --text-color-on-header: white;
  --border-color: #c03434;
  --header-color: black;

  --card-title-color: rgba(197, 197, 197, 0.42);
  --card-title-color-best: #f3b326;

  --card-content-color: rgba(227, 227, 227, 0.23);
  --card-content-color-best: #FBF5E4FF;

  --card-green-color: #2c9320;
  --card-bad-mark-color: #e7b548;
}

a {
  text-decoration: none;
  color: inherit;
  outline: none;
}

body {
  background-color: var(--header-color);
}

.wrapper {
  width: clamp(320px, 100%, 1920px);
  margin: 0 auto;
}

#step-two,
#step-three,
.instruction {
  scroll-margin-top: 6vw;
}


/*region -----  HEADER and NAV MENU ----- */

.header {
  color: var(--text-color-on-header);
}

.burger {
  display: none;
  font-size: 2em;
  background: var(--border-color);
  border: none;
  cursor: pointer;
  margin-left: auto;
  margin-right: 1rem;
}

.header-close {
  display: none;
  font-weight: bold;
  transform: rotate(45deg);
  color: white;
  font-size: 3rem;
  background: none;
  border: none;
  position: fixed;
  top: 1%;
  right: 5%;
}

.header-menu {
  height: 6rem;
  position: fixed;
  display: flex;
  flex-direction: row;
  width: clamp(320px, 100%, 1920px);
  align-items: center;
  transition: all 0.5s ease;
}

.header-menu.scrolled {
  background-color: var(--header-color);
  z-index: 1;
}

.logo {
  width: 7rem;
  padding: 1rem;
}

.nav-menu {
  flex: 1;
  display: flex;
  flex-direction: row;
  font-size: 1.5rem;
  justify-content: flex-end;
  padding-right: 1rem;
  gap: 1.2rem;
}

.nav-menu__element {
  transition: all 0.3s ease;
  align-self: center;
}

.nav-menu__element:hover {
  border-bottom: 2px solid var(--border-color);
}

.nav-menu__element:last-child,
.hero__button,
.instruction__button {
  border: 1px solid var(--text-color-on-header);
  border-radius: 50px;
  padding: 0.5rem 2rem;
  margin-left: 1.5rem;
  transition: all 0.3s ease;
  background: var(--border-color);
}

.nav-menu__element:last-child:hover,
.hero__button:hover,
.instruction__button:hover,
.hero__button.orange:hover {
  border-color: var(--border-color);
  color: var(--border-color);
  background: var(--text-color-on-header);
  font-weight: bold;
}

/*endregion*/

/*region -----  HERO SECTION ----- */

.hero-section {
  height: 100vh;
  color: var(--text-color-on-header);
  background-image: linear-gradient(rgba(0, 0, 0, 0.5), rgba(0, 0, 0, 0.5)),
  url("/img/hero-back.jpg");
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  display: flex;
  justify-content: center;
  align-items: center;
}

.hero-content {
  height: 100%;
  width: 50%;
  flex-direction: column;
  display: flex;
  justify-content: center;
  align-items: center;
  justify-self: center;
  text-align: center;
}

.hero__title {
  font-size: 3rem;
}

.hero__text {
  font-size: 1.3rem;
  padding-top: 1rem;
}

.hero__button {
  margin-top: 3rem;
  font-weight: bold;
}

.hero__button.orange {
  background-color: #f3b326;
  color: black;
}

/*endregion*/

/*region ----- INSTRUCTION ----- */
.instruction {
  background: white;
  padding: 2rem 0;
  display: flex;
  justify-content: center;
  align-items: center;
}

.instruction__content {
  padding: 2rem;
  width: 80%;
  border: 4px solid grey;
  background-color: var(--card-title-color);
  display: flex;
  flex-direction: column;
  justify-self: center;
  text-align: justify;
}

.instruction__button {
  color: white;
  margin-right: auto;
}

.instruction__content img {
  width: 80%;
  align-self: center;
}

.instruction__inner-link {
  color: #c03434;
}

/*endregion*/

/*region ----- TELEGRAM ----- */

.telegram {
  background: #3C90D4FF;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 1rem;
  gap: 2rem;
  font-size: 2rem;
  color: white;
}

.tg-logo {
  width: 5rem;
  border: 3px solid white;
  border-radius: 50px;
}

.tg-link {
  color: #000B7BFF;
  font-weight: bold;
}

/*endregion*/


/*region ----- FOOTER ----- */

.footer-block {
  display: flex;
  flex-direction: column;
  color: var(--text-color-on-header);
  align-items: center;
  gap: 1rem;
  padding: 1rem;
  background-image: var(--header-color);
}

/*endregion*/

/*region ----- MEDIA MAX WIDTH 1200px -----*/

@media (max-width: 1300px) {
  .html {
    font-size: 12px;
  }

  #step-two,
  #step-three {
    scroll-margin-top: 35vw;
  }

  .hero-section {
    height: auto;
    padding: 10rem 0 2rem 0;
  }

  .burger,
  .header-close {
    display: block;
  }

  .nav-menu,
  .logo.active,
  .nav-menu a:last-child {
    display: none;
  }

  .nav-menu.active {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    background: var(--header-color);
    position: fixed;
    top: 0;
    left: 0;
    height: 100vh;
    width: 100vw;
    justify-content: center;
    align-content: center;
  }

  .hero-content {
    width: 90%;
  }

  .hero__title {
    font-size: 1.7rem;
  }

  .hero__text {
    font-size: 1.2rem;
  }

  .instruction {
    padding: 0.5rem 0;
  }

  .instruction__content {
    padding: 0.5rem;
    width: 95%;
    border: none;
    justify-self: center;
  }


  .instruction__content img {
    width: 100%;
  }

  .telegram {
    flex-direction: column;
    word-wrap: break-word; /* старый синтаксис */
    overflow-wrap: anywhere;
    text-align: center;
    gap: 0;
  }

}

/*endregion*/