@font-face {
  font-family: Oswald;
  src: url("assets/Oswald-VariableFont_wght.ttf") format("truetype");
  font-weight: 100 700;
  font-style: normal;
  font-display: swap;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

:root {
  --green: #68b738;

  --black: #000000;
  --dark-black: #111111;
  --dark: #444444;
  --gray: #666666;
  --gray-light: #d9d9d9;
  --gray-border: #cdcdcd;
  --gray-track: #dcdcdc;

  --white: #ffffff;
  --light: #f2f2f2;
}

body {
  margin: 0;
  padding: 0;
  font-family: Oswald, Arial, Helvetica, sans-serif;
  font-size: 20px;
}

button,
input,
select,
textarea {
  font-family: inherit;
}

/* A11y helper */
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* Header */
.header {
  position: absolute;
  height: 160px;
  width: 100%;
  top: 0;
  display: flex;
  justify-content: space-between;
  padding: 0 110px;
  align-items: center;
}

.header__logo--tablet,
.header__logo--mobile1,
.header__logo--mobile2 {
  display: none;
}

.header__nav {
  display: flex;
  width: 480px;
}

.header__burger {
  display: none;
}

.header__menu {
  width: 100%;
  list-style: none;
  padding: 0;
  margin: 0;
  display: flex;
  justify-content: space-between;
}

.header__menu-link {
  text-decoration: none;
  text-transform: uppercase;
  font-size: 20px;
  color: var(--white);
}

.header__menu-link--active {
  text-decoration: underline;
  text-underline-offset: 12px;
  text-decoration-thickness: 2px;
}

/* Hero */
.hero {
  width: 100%;
  height: 700px;
  display: flex;
  align-items: center;
  background-image: url(assets/index_background_desktop.png);
  background-repeat: no-repeat;
  background-position: right top;
}

.hero__content {
  position: relative;
  left: 190px;
  max-width: 420px;
  min-height: 284px;
}

.hero__title {
  font-size: 60px;
  line-height: 1;
  margin: 0 0 40px;
  font-weight: 400;
}

.hero__subtitle {
  font-size: 20px;
  text-transform: uppercase;
  font-weight: 400;
  margin: 0 0 50px;
}

.button {
  font-size: 20px;
  text-transform: uppercase;
  text-decoration: none;
  color: var(--white);
  background-color: var(--green);
  border: none;
  padding: 14px 26px;
}

.button:hover {
  cursor: pointer;
}

.hero__image {
  position: absolute;
  right: 330px;
  top: 150px;
}

/* Programs */
.programs {
  display: flex;
  gap: 80px;
  justify-content: space-between;
  padding: 80px 110px 0;
}

.program {
  display: flex;
  flex: 1;
  flex-direction: column;
  gap: 40px;
  padding: 50px;
  background-color: var(--light);
}

.program__head {
  display: flex;
  gap: 65px;
  align-items: center;
}

.program__title {
  font-size: 36px;
  font-weight: 400;
  text-transform: uppercase;
  margin: 0;
}

.program__icon-circle {
  display: flex;
  justify-content: center;
  align-items: center;
  width: 100px;
  height: 100px;
  background-color: var(--green);
  border-radius: 50px;
}

.program--pro .program__icon {
  height: 56px;
  width: 134px;
}

.program--slim .program__icon {
  position: relative;
  top: -8px;
  height: 97px;
  width: 70px;
}

.program__text {
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.program__link {
  display: flex;
  text-decoration: none;
  text-transform: uppercase;
  font-size: 20px;
  color: var(--black);
}

.program__icon-arrow {
  padding-left: 28px;
}

/* How it works */
.how-it-works {
  padding: 70px 110px 0;
}

.how-it-works__title {
  margin: 0 0 30px 0;
  font-size: 60px;
  font-weight: 400;
}

.how-it-works__list {
  display: flex;
  gap: 80px;
  align-items: center;
  list-style: none;
  margin: 0;
  padding: 0;
  counter-reset: step;
}

.how-it-works__item {
  display: flex;
  flex-direction: column;
  gap: 20px;
  justify-content: center;
  height: 280px;
  position: relative;
  counter-increment: step;
}

.how-it-works__item::before {
  content: counter(step);
  position: absolute;
  right: 0;
  font-family: Oswald;
  font-size: 280px;
  font-weight: 400;
  color: var(--light);
  z-index: -1;
  pointer-events: none;
}

.how-it-works__icon-box {
  width: 80px;
  height: 80px;
  background: var(--green);
  display: flex;
  align-items: center;
  justify-content: center;
}

.how-it-works__text {
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--dark);
}

/* Example */
.example {
  height: 650px;
  display: flex;
  gap: 10%;
  padding: 0 110px 70px;
  background: linear-gradient(
    to bottom,
    var(--white) 0 34%,
    var(--light) 34% 100%
  );
}

.example__content {
  margin-top: 80px;
  width: 35%;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
}

.example__text {
  margin: 100px 0 50px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--dark);
}

.example__title {
  margin: 0;
  font-weight: 400;
  font-size: 60px;
}

/* Stats */
.stats {
  margin: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: start;
  column-gap: 42px;
  row-gap: 62px;
}

.stats__item {
  width: 162px;
  height: 70px;
  border: 1px solid var(--gray-border);
  border-radius: 3px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  position: relative;
}

.stats__item .stats__value {
  position: relative;
  margin: 0;
  bottom: 3px;
  font-size: 30px;
  text-transform: uppercase;
}

.stats__item .stats__term {
  position: absolute;
  width: auto;
  top: 54px;
  display: flex;
  justify-content: center;
  align-items: center;
  text-align: center;

  padding: 0 8px;
  background: var(--light);

  font-family: Arial, Helvetica, sans-serif;
  font-size: 14px;
  color: var(--dark);
  text-transform: lowercase;
}

.stats__cost {
  flex-basis: 100%;
  text-transform: uppercase;
  display: flex;
  gap: 60px;
}

.stats__cost .stats__term {
  display: flex;
  align-items: center;
  padding: 0;
  bottom: 0;
  font-family: Oswald, Arial, Helvetica, sans-serif;
  font-size: 20px;
  text-transform: uppercase;
  color: var(--black);
}

.stats__cost .stats__value {
  font-size: 20px;
  bottom: 0;
}

/* Compare */
.compare {
  width: 55%;
  height: 100%;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.compare__stage {
  position: relative;
  width: 100%;
  height: 100vw;
  max-height: 600px;
}

.compare__img {
  padding: 0 75px;
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.compare__img--after {
  clip-path: inset(0 50% 0 0);
}

.compare__controls {
  width: 100%;
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  gap: 20px;
}

.compare__label {
  display: inline-block;
  font-size: 20px;
  text-transform: uppercase;
}

.compare__range {
  width: 100%;
  appearance: none;
  background: transparent;
}

.compare__toggle {
  display: none;
}

.compare__range::-webkit-slider-runnable-track {
  height: 6px;
  background: var(--gray-light);
  border-radius: 3px;
}

.compare__range::-moz-range-track {
  height: 6px;
  background: var(--gray-light);
  border-radius: 3px;
}

.compare__range::-webkit-slider-thumb {
  appearance: none;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    var(--green) 0 5px,
    var(--white) 6px 100%
  );
  border: 1px solid var(--gray-track);
  cursor: pointer;
  margin-top: -14px;
  position: relative;
}

/* Contacts */
.contacts {
  height: 400px;
}

.contacts__card {
  width: 570px;
  height: 200px;
  display: flex;
  justify-content: center;
  gap: 90px;
  align-items: center;
  position: absolute;
  margin: 95px 110px 105px;
  background-color: var(--white);
  z-index: 1;
}

.contacts__title {
  margin: 0;
  width: 160px;
  height: 80px;
  display: flex;
  align-items: center;
  font-size: 20px;
  color: var(--dark-black);
  text-transform: uppercase;
  line-height: 21px;
  font-weight: 400;
}

.contacts__address {
  width: 155px;
  height: 80px;
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
  color: var(--dark);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  font-style: normal;
}

.contacts__text {
  margin: 0;
}

.contacts__map {
  height: 400px;
  width: 100%;
}

/* Footer */
.footer {
  background-color: var(--light);
  display: flex;
  padding: 57px 110px;
  justify-content: space-between;
  align-items: center;
}

.footer__logo {
  width: 128px;
  height: 24px;
}

.footer__social {
  width: 125px;
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: center;
}

.footer__social-link {
  display: block;
}

.footer__social-icon {
  display: block;
  color: var(--gray);
}

.footer__academy {
  width: 160px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  text-decoration: none;
  color: var(--dark);
  font-family: Arial, Helvetica, sans-serif;
  font-size: 16px;
}

.footer__academy-logo {
  display: block;
}

/* ===== ACCESSIBILITY / FOCUS ===== */
.header__menu-link:focus-visible,
.button:focus-visible,
.compare__range:focus-visible,
.footer__social-link:focus-visible {
  outline: 2px solid var(--green);
  outline-offset: 4px;
}

/* ===== TABLET ===== */
@media (max-width: 1439px) {
  .header {
    height: 100px;
    position: unset;
    padding: 0 30px;
  }
  .header__logo--desktop {
    display: none;
  }
  .header__logo--tablet {
    display: block;
  }
  .header__nav {
    width: 440px;
  }
  .header__menu {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
  }
  .header__menu-link {
    font-size: 18px;
    color: var(--black);
  }
  .header__menu-link--active {
    text-decoration-color: var(--green);
  }
  .hero {
    width: 100%;
    height: 760px;
    align-items: start;
    background-image: url(assets/index_can.png);
    background-position: 50% 100%;
  }
  .hero__content {
    top: 60px;
    left: 120px;
    width: 100%;
  }
  .hero__image {
    display: none;
  }

  .programs {
    gap: 30px;
    flex-direction: column;
    padding: 0 50px 0 30px;
  }

  .program {
    position: relative;
    padding: 80px 300px 50px 60px;
  }

  .program__head {
    display: block;
  }

  .program__icon-circle {
    position: absolute;
    right: 50px;
    top: 50%;
    transform: translateY(-45%);
    width: 200px;
    height: 200px;
    border-radius: 100px;
  }

  .program--pro .program__icon {
    height: 112px;
    width: 267px;
  }

  .program--slim .program__icon {
    top: -16px;
    height: 192px;
    width: 140px;
  }

  .program__icon-arrow {
    padding-left: 25px;
  }

  .how-it-works {
    padding: 45px 120px 0 30px;
  }
  .how-it-works__list {
    flex-wrap: wrap;
    row-gap: 40px;
    column-gap: 150px;
  }
  .how-it-works__item {
    width: calc(50% - 80px);
  }

  .example {
    flex-direction: column;
    width: 100%;
    height: auto;
    padding: 90px 42px 30px 30px;
    gap: 0;
    background: linear-gradient(
      to bottom,
      var(--white) 0 60%,
      var(--light) 60% 100%
    );
  }
  .example__content {
    width: 100%;
    margin: 0;
  }
  .example__text {
    margin: 60px 0 50px;
  }
  .stats {
    flex-wrap: nowrap;
  }
  .stats__term {
    background-color: var(--white);
  }
  .stats__cost {
    margin-left: auto;
    flex-basis: auto;
    justify-content: center;
    flex-direction: column;
    gap: 0px;
  }
  .stats__cost .stats__value {
    margin-left: auto;
  }
  .stats__item .stats__term {
    background-color: var(--white);
  }
  .compare {
    width: 100%;
  }

  .contacts {
    height: 600px;
  }

  .contacts__card {
    position: static;
    margin: 0;
    width: 100%;
    justify-content: space-between;
    padding: 0 75px;
  }

  .footer {
    padding: 55px 30px 60px;
  }
}

/* ===== MOBILE ===== */
@media (max-width: 767px) {
  .header {
    position: relative;
    z-index: 50;
    justify-content: space-between;
    height: 66px;
    padding: 11px 20px 18px;
    background: var(--white);
  }

  .header__logo--desktop,
  .header__logo--tablet {
    display: none;
  }

  .header__logo--mobile1,
  .header__logo--mobile2 {
    display: block;
  }

  .header__nav {
    width: auto;
    height: auto;
    position: relative;
  }

  .header__burger {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    padding: 0;
    border: 0;
    background: transparent;
    cursor: pointer;
  }

  .header__burger-img {
    display: block;
    width: 24px;
    height: 24px;
  }

  .header__menu {
    position: absolute;
    top: calc(100% + 12px);
    right: 0;
    left: auto;

    width: calc(100vw - 40px);
    max-width: 320px;

    margin: 0;
    padding: 8px 0;
    list-style: none;

    background: var(--white);
    border: 1px solid var(--gray-border);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.12);

    display: flex;
    flex-direction: column;
    gap: 0;

    transform-origin: top right;
    transform: scale(0.98);
    opacity: 0;
    pointer-events: none;
    transition:
      opacity 0.15s ease,
      transform 0.15s ease;
  }

  .header__menu-item {
    border-bottom: 1px solid var(--light);
  }

  .header__menu-item:last-child {
    border-bottom: 0;
  }

  .header__menu-link {
    display: block;
    padding: 14px 16px;
    font-size: 18px;
    color: var(--black);
    text-decoration: none;
    text-transform: uppercase;
  }

  .header__menu-link--active {
    color: var(--green);
  }

  .header--open .header__menu {
    opacity: 1;
    transform: scale(1);
    pointer-events: auto;
  }

  body.menu-open::before {
    content: "";
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.35);
    z-index: 40;
  }

  .hero {
    height: calc(100vw + 170px);
    background-image: url("assets/index_background_mobile.png");
    background-repeat: no-repeat;
    background-position: top center;
    background-size: 100% auto;

    display: flex;
    flex-direction: column;
    align-items: center;
  }

  .hero__content {
    display: contents;
    color: var(--white);
  }

  .hero__title {
    max-width: 250px;
    order: 1;
    font-size: 36px;
    text-align: center;
    margin: 25px 0;
  }

  .hero__subtitle {
    order: 2;
    margin: 0;
    font-size: 14px;
    text-transform: uppercase;
    text-align: center;
  }

  .hero__image {
    order: 3;
    position: static;
    width: 80%;
    height: auto;
    margin-top: auto;
    display: block;
  }

  .hero__button {
    order: 4;
    width: calc(100% - 40px);
    height: 40px;

    display: flex;
    justify-content: center;
    align-items: center;

    font-size: 14px;

    padding: 14px 0;
    margin: 0;
  }

  .programs {
    padding: 20px 20px 0;
    gap: 20px;
  }

  .program {
    padding: 20px 30px 20px 20px;
    gap: 20px;
  }
  .program__head {
    display: flex;
    gap: 20px;
  }

  .program__icon-circle {
    transform: translateY(0%);
    position: static;
    width: 50px;
    height: 50px;
    border-radius: 25px;
  }

  .program--pro .program__icon {
    height: 28px;
    width: 67px;
  }

  .program--slim .program__icon {
    position: relative;
    top: -4px;
    height: 50px;
    width: 36px;
  }

  .program__title {
    font-size: 24px;
  }
  .program__text {
    font-size: 14px;
    padding-bottom: 20px;
    border-bottom: solid 1px var(--gray-light);
  }
  .program__link {
    font-size: 16px;
  }

  .program__icon-arrow {
    padding-left: 15px;
  }

  .how-it-works {
    padding: 30px 20px 40px;
  }

  .how-it-works__title {
    margin-bottom: 40px;
    font-size: 36px;
  }

  .how-it-works__list {
    flex-wrap: wrap;
    row-gap: 20px;
    column-gap: 0px;
    height: auto;
  }
  .how-it-works__item {
    flex-direction: row;
    justify-content: space-between;
    width: 100%;
    height: auto;
  }

  .how-it-works__item::before {
    content: none;
  }

  .how-it-works__icon-box {
    width: 60px;
    height: 60px;
  }
  .how-it-works__text {
    width: calc(100% - 80px);
    margin: 0;
    display: flex;
    align-items: center;
    font-size: 14px;
  }
  .example {
    padding: 0;
    background-color: #eaeaea;
  }

  .example__title {
    font-size: 36px;
  }
  .example__text {
    font-size: 14px;
    margin: 33px 0 25px;
  }
  .example__content {
    padding: 30px 20px;
  }
  .stats {
    flex-wrap: wrap;
    justify-content: space-between;
    column-gap: 0;
    row-gap: 30px;
  }

  .stats__item {
    width: calc(50% - 15px);
    height: 64px;
  }

  .stats__term {
    font-size: 12px;
    display: flex;
    text-align: center;
  }

  .stats__value {
    font-size: 24px;
  }

  .stats__cost {
    font-size: 14px;
    flex-basis: 100%;
    flex-direction: row;
    justify-content: center;
    gap: 0;
    margin: 0;
    width: 100%;
  }

  .stats__cost .stats__term {
    font-size: 14px;
  }

  .stats__cost .stats__value {
    margin-left: 4px;
    font-size: 14px;
  }

  .compare {
    background-color: var(--white);
  }

  .compare__stage {
    width: 100%;
  }
  .compare__img {
    padding: 0;
    transition: clip-path 300ms ease;
  }

  .compare__toggle {
    display: block;
  }

  .compare__range {
    display: none;
  }

  .compare__controls {
    padding-top: 50px;
    justify-content: center;
    gap: 24px;
  }

  .compare__toggle {
    appearance: none;
    width: 84px;
    height: 14px;
    border-radius: 999px;
    border: 1px solid var(--gray-border);
    background: var(--white);
    cursor: pointer;
    position: relative;
    margin: 0;
    padding: 0;
    touch-action: manipulation;
  }

  .compare__toggle::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 6px;
    width: 34px;
    height: 6px;
    border-radius: 999px;
    background: var(--green);
    transform: translate(0, -50%);
    transition: transform 500ms ease;
  }

  .compare__toggle:checked::before {
    transform: translate(38px, -50%);
  }

  .contacts {
    width: 100%;
    height: 474px;
  }
  .contacts__card {
    height: 114px;
    width: 100%;
    gap: 10px;
    padding: 30px 20px 20px;
  }
  .contacts__title {
    font-size: 16px;
  }

  .contacts__address {
    justify-content: center;
  }
  .contacts__text {
    font-size: 14px;
  }
  .contacts__map {
    height: 360px;
  }

  .footer {
    flex-direction: column;
    width: 100%;
    height: 236px;
    padding: 40px 20px 20px;
  }

  .footer__academy {
    width: 100%;
    justify-content: space-between;
  }
  .footer__social {
    gap: 34px;
    width: 100%;
    justify-content: center;
    padding: 20px 0px;
    border-top: solid 1px var(--gray-light);
    border-bottom: solid 1px var(--gray-light);
  }
  .footer__social-icon {
    width: 70%;
    height: auto;
  }
  .footer__social-link {
    display: flex;
    justify-content: center;
  }
}
