* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}

:root {
  --full-slider-bar: hsl(174, 77%, 80%);
  --slider-bg: hsl(174, 86%, 45%);
  --slider-active-bg: hsl(174, 45%, 45%);
  --discount-bg: hsl(14, 92%, 95%);
  --discount-text: hsl(15, 100%, 70%);
  --cta-text: hsl(226, 100%, 87%);

  --pricing-component-bg: hsl(0, 0%, 100%);
  --main-bg: hsl(230, 100%, 99%);
  --empty-slider-bar: hsl(224, 65%, 95%);
  --toggle-bg: hsl(223, 50%, 87%);
  --text: hsl(225, 20%, 60%);
  --text-cta-bg: hsl(227, 35%, 25%);
}

body {
  height: 100vh;
  display: flex;
  justify-content: center;
  align-items: center;
  flex-direction: column;
  font-family: "Manrope", sans-serif;
  background-image: url(images/bg-pattern.svg);
  background-size: cover;
  background-repeat: no-repeat;
}

h1 {
  font-weight: 800;
  color: var(--text-cta-bg);
}

span,
p {
  color: var(--text);
}

.circles {
  position: absolute;
  top: 2rem;
}

.head {
  position: absolute;
  text-align: center;
  top: 4.5rem;
}

.head p {
  font-size: 15px;
  font-weight: 800;
}

.main {
  position: absolute;
  top: 13rem;
  height: max-content;
  box-shadow: 0 0px 7px 3px rgba(0, 0, 0, 0.1);
  background: var(--pricing-component-bg);
  border-radius: 0.25rem;
  width: 35rem;
}

.pricing {
  display: grid;
  align-items: center;
  justify-content: space-between;
  grid-template-columns: 1fr 1fr;
  margin: 2em 4rem 0 4rem;
}

.pricing p {
  font-weight: 800;
}

.per-month {
  display: flex;
  margin-left: auto;
}

.price {
  color: var(--text-cta-bg);
}

.month {
  font-size: 15px;
  font-weight: 600;
  margin-top: 0.8em;
  margin-left: 0.3em;
}

.range {
  grid-column: 1/3;
  display: flex;
  margin: 2rem auto;
  width: 100%;
  position: relative;
  background-color: var(--empty-slider-bar);
  border-radius: 1rem;
}

.fill {
  position: absolute;
  content: "";
  width: 50%;
  height: 0.5rem;
  border-radius: 1rem;
  background-color: var(--full-slider-bar);
}

.slider {
  -webkit-appearance: none;
  position: relative;
  background: transparent;
  width: 100%;
  height: 0.5rem;
  border-radius: 1rem;
  outline: none;
}

.slider::-webkit-slider-thumb {
  -webkit-appearance: none;
  background-image: url(images/icon-slider.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--slider-bg);
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
}

.slider::-webkit-slider-thumb:hover {
  box-shadow: 0 0.6rem 1rem 0 var(--slider-bg);
}

.slider::-webkit-slider-thumb:active {
  cursor: grabbing;
  background-color: var(--slider-active-bg);
}

.slider::-moz-range-track {
  -webkit-appearance: none;
  position: relative;
  background: transparent;
  width: 100%;
  height: 0.5rem;
  border-radius: 1rem;
  outline: none;
}

.slider::-moz-range-thumb {
  -webkit-appearance: none;
  background-image: url(images/icon-slider.svg);
  background-position: center;
  background-repeat: no-repeat;
  background-color: var(--slider-bg);
  height: 2rem;
  width: 2rem;
  border-radius: 50%;
  cursor: pointer;
  transition: 0.3s;
  border: none;
}

.slider::-moz-range-thumb:hover {
  box-shadow: 0 0.6rem 1rem 0 var(--slider-bg);
}

.slider::-moz-range-thumb:active {
  cursor: grabbing;
  background-color: var(--slider-active-bg);
}

.billing {
  display: flex;
  align-items: center;
  margin-left: 5.7em;
  margin-bottom: 2em;
  gap: 0.5em;
}

.switch {
  -webkit-appearance: none;
  position: relative;
  background: var(--toggle-bg);
  width: 3rem;
  height: 1.5rem;
  border-radius: 1rem;
  outline: none;
}

.switch::before {
  content: "";
  position: absolute;
  background: var(--main-bg);
  width: 1.5rem;
  height: 1.5rem;
  top: 0;
  left: 0;
  border-radius: 1rem;
  transform: scale(0.7);
  transition: 0.35s;
}

.switch:checked {
  background: var(--slider-bg);
}

.switch:checked::before {
  left: 1.5rem;
}

.discount {
  color: var(--discount-text);
  background-color: var(--discount-bg);
  font-weight: 800;
  width: 7.4em;
  height: 1.6em;
  text-align: center;
  border-radius: 1em;
  padding-top: 0.1em;
  margin-left: 3px;
}

.short-text,
.long-text {
  color: var(--discount-text);
}

.short-text {
  display: none;
}

hr {
  color: #ffffff57;
  height: 1px;
}

.features {
  margin: 2em 4em;
  line-height: 1.8em;
}

.btn {
  position: absolute;
  top: 17rem;
  left: 19.6rem;
  padding: 1em 3.5em;
  border-radius: 2em;
  font-weight: 800;
  color: var(--cta-text);
  background: var(--text-cta-bg);
  border: none;
  outline: none;
  cursor: pointer;
}

.btn:hover {
  opacity: 0.7;
}

.attribution {
  position: absolute;
  top: 40rem;
}

.attribution p {
  display: inline;
}

.attribution a {
  text-decoration: none;
  outline: none;
  color: var(--text-cta-bg);
}

/* =============
  media qurries 
================ */

@media screen and (max-width: 576px) {
  .circles {
    top: 0.5rem;
  }

  .head {
    top: 3rem;
  }

  .head h1 {
    line-height: 1em;
    margin-bottom: 0.5rem;
  }

  .main {
    top: 11rem;
    width: 320px;
    height: 27rem;
  }

  .pricing {
    width: 90%;
    margin: 2rem auto;
  }

  .pricing p {
    order: 1;
    grid-column: 1/3;
    text-align: center;
  }

  .range {
    order: 2;
    grid-column: 1/3;
  }

  .per-month {
    order: 3;
    grid-column: 1/3;
    margin: auto;
  }

  .billing {
    font-size: 0.8rem;
    margin: 1rem;
    gap: 0.4rem;
  }

  .discount {
    width: 3.3rem;
    margin: 0;
  }

  .short-text {
    display: unset;
  }

  .long-text {
    display: none;
  }

  .features {
    position: relative;
    display: flex;
    flex-direction: column;
    text-align: center;
  }

  .btn {
    top: 6rem;
    left: 5px;
  }

  .attribution {
    display: flex;
    flex-direction: column;
  }

  .attribution p {
    display: inline-block;
    height: 1.75rem;
  }
}
