/* CUSTOM PROPS */
:root {
  --heading-color: #34313d;
  --text-color: #9e9aa8;
  --white: #fff;
  --gray: #bfbfbf;
  --bg-color: #4b3f6b;
  --black: #232127;
  --body-bg: #f2f2f2;
  --extra-color: #2bd0d0;
  --hover: #9ae3e3;
}

/* FONT-FACE  */
@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-MediumItalic.woff2") format("woff2"),
  url("../fonts/Poppins-MediumItalic.woff") format("woff");
  font-weight: 500;
  font-style: italic;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Bold.woff2") format("woff2"),
  url("../fonts/Poppins-Bold.woff") format("woff");
  font-weight: bold;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: "Poppins";
  src: url("../fonts/Poppins-Medium.woff2") format("woff2"),
  url("../fonts/Poppins-Medium.woff") format("woff");
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}


/* GLOBAL-STYLES  */
html {
  box-sizing: border-box;
  height: 100%;
  scroll-behavior: smooth;
}

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

body {
  display: flex;
  flex-direction: column;
  height: 100%;
  background-color: var(--body-bg);
  color: var(--text-color);
  font-family: "Poppins", "Arial", sans-serif;
  font-size: 15px;
  line-height: 26px;
  padding: 0;
  margin: 0;
  overflow-x: hidden;
}

img {
  max-width: 100%;
  height: auto;
}


/* CONTAINER  */
.container {
  max-width: 1150px;
  width: 100%;
  padding-left: 20px;
  padding-right: 20px;
  margin-left: auto;
  margin-right: auto;
}

*:focus {
  outline: 3px dashed var(--heading-color);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: -1px;
  border: 0;
  padding: 0;
  clip: rect(0 0 0 0);
  overflow: hidden;
}


/* BUTTON  */
.button {
  display: inline-block;
  text-transform: capitalize;
  text-decoration: none;
  background-color: var(--extra-color);
  color: var(--white);
  font-size: 20px;
  line-height: normal;
  font-weight: 700;
  border-radius: 28px;
  padding: 14px 40px 12px;
  white-space: nowrap;
}

.button:hover {
  background: var(--hover);
}

.button:active {
  opacity: 0.6;
}

.button--small {
  font-size: 15px;
  line-height: normal;
  padding: 9px 24px;
  font-weight: 700;
  color: var(--white);
  white-space: nowrap;
}

.button--login {
  background-color: transparent;
  color: var(--text-color);
  margin-right: 37px;
}

.button--login:hover {
  opacity: 0.8;
  background: none;
}

.button--login:active {
  opacity: 0.6;
}

.button--rectangle {
  padding: 17px 40px;
  border-radius: 10px;
  border: none;
}

.button--rectangle-small {
  min-width: 134px;
  padding-top: 10px;
  padding-bottom: 7px;
  padding-right: 0;
  padding-left: 0;
  border-radius: 5px;
}

.button--rectangle-small-copied {
  background-color: #3a3054;
}

.button--rectangle-small-copied:hover {
  opacity: 0.8;
  background-color: #3a3054;
}

.button--rectangle-small-copied:active {
  opacity: 0.6;
  background-color: #3a3054;
}


/* MAIN-CONTENT  */
.main-content {
  flex-grow: 1;
}

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

/* SITE HEADER  */
.site-header {
  padding-top: 48px;
  padding-bottom: 48px;
  display: flex;
  align-items: center;
  justify-content: space-between;
}

.site-header__container {
  display: flex;
  align-items: center;
}

.logo {
  display: flex;
  flex-shrink: 0;
}

.logo:hover {
  opacity: 0.8;
}

.logo:active {
  opacity: 0.6;
}

.logo__img {
  width: 120px;
  height: 32px;
  object-fit: cover;
}

/* SITE NAVIGATOR  */
.sitenav {
  margin-left: 45px;
  margin-right: auto;
  padding-right: 30px;
}

.sitenav__list {
  display: flex;
  margin: 0;
  padding: 0;
  list-style: none;
}

.sitenav__item:not(:last-child) {
  margin-right: 30px;
}

.sitenav__item:last-child {
  margin-left: 2px;
}

.sitenav__link {
  display: block;
  text-decoration: none;
  font-size: 15px;
  line-height: normal;
  font-weight: 700;
  color: var(--text-color);
}

.sitenav__link:hover {
  color: var(--black);
}

.sitenav__link:active {
  opacity: 0.6;
}

.auth-wrapper {
  display: flex;
  align-items: center;
}


/* HERO  */
.url-shortener-form-wrapper__container {
  margin-top: -84px;
}

.url-shortener-form__inner {
  display: flex;
  padding: 64px 52px;
  background-color: var(--bg-color);
  background-image: url(../img/bg.svg);
  background-size: cover;
  background-repeat: no-repeat;
  background-position: center center;
  border-radius: 10px;
  margin-bottom: 24px;
}

.url-shortener-form__input-wrapper {
  display: flex;
  flex-direction: column;
  position: relative;
  flex-grow: 1;
  margin-right: 24px;
}

.url-shortener-form__input {
  display: block;
  width: 100%;
  flex-grow: 1;
  border: 3px solid transparent;
  border-radius: 10px;
  padding: 14px 32px;
  font-size: 20px;
  line-height: 36px;
  letter-spacing: 0.15px;
}

/* AUTOFILL  */
input:-webkit-autofill,
input:-webkit-autofill:hover,
input:-webkit-autofill:focus,
textarea:-webkit-autofill,
textarea:-webkit-autofill:hover,
textarea:-webkit-autofill:focus,
select:-webkit-autofill,
select:-webkit-autofill:hover,
select:-webkit-autofill:focus {
  -webkit-text-fill-color: inherit;
  -webkit-box-shadow: 0 0 0px 1000px 000 inset;
  transition: background-color 5000s ease-in-out 0s;
}

/* VALID-INVALID  */
.url-shortener-form__input:not(:focus):not(:placeholder-shown):valid {
  border-color: transparent;
}

.url-shortener-form__input:not(:focus):not(:placeholder-shown):invalid {
  border-color: #f46363;
}

.url-shortener-form__input:focus ~ .url-shortener-form__input-error-msg {
  display: block;
}

.url-shortener-form__input-error-msg {
  display: none;
  position: absolute;
  left: 0;
  top: calc(100% + 8px);
  font-style: italic;
  color: #f46363;
  font-size: 16px;
  line-height: 18px;
  letter-spacing: 0.11px;
}

/* PLACEHOLDER-COLOR  */
::-webkit-input-placeholder,
::-moz-placeholder,
:-ms-input-placeholder,
:-moz-placeholder {
  color: var(--heading-color);
  opacity: 0.5;
  font-size: 20px;
  line-height: 36px;
  letter-spacing: 0.15px;
}

.url-shortener-form__results-wrapper {
  display: none;
}

.url-shortener-form__results-wrapper--open {
  display: block;
}

.url-shortener-form__results-list {
  display: flex;
  flex-direction: column;
  margin: 0;
  padding: 0;
  list-style: none;
}

.url-shortener-form__results-item:not(:last-child) {
  margin-bottom: 16px;
}

.url-shortener-form__results-inner {
  display: flex;
  align-items: center;
  padding-top: 16px;
  padding-bottom: 16px;
  padding-left: 32px;
  padding-right: 24px;
  background-color: var(--white);
  border-radius: 5px;
  text-overflow: ellipsis;
}

.url-shortener-form__result-link {
  margin-right: auto;
  color: var(--heading-color);
  font-size: 20px;
  line-height: 36px;
  font-weight: 500;
  letter-spacing: 0.15px;
}

.url-shortener-form__result {
  margin-left: 24px;
  margin-right: 24px;
  color: var(--extra-color);
}

.hero__container {
  display: flex;
  align-items: center;
  padding-top: 30px;
  padding-bottom: 152px;
}

.hero__bg {
  width: 733px;
  height: 482px;
  object-fit: cover;
  position: relative;
  right: -100px;
}

.hero__content {
  min-width: 564px;
  display: flex;
  flex-direction: column;
  align-items: flex-start;
}

.hero__title {
  margin: 0;
  margin-bottom: 5px;
  color: var(--black);
  font-size: 80px;
  line-height: 90px;
  letter-spacing: -2px;
}

.hero__description {
  margin: 0;
  margin-bottom: 38px;
  font-size: 22px;
  line-height: 36px;
  font-weight: 500;
  letter-spacing: 0.15px;
}


/* FEATURES  */
.features {
  padding-top: 198px;
  padding-bottom: 120px;
}

.features__top {
  max-width: 540px;
  margin-bottom: 100px;
  margin-right: auto;
  margin-left: auto;
  text-align: center;
}

.title {
  margin: 0;
  margin-bottom: 18px;
  color: var(--heading-color);
  font-size: 40px;
  line-height: 48px;
  white-space: nowrap;
}

.features__description {
  margin: 0;
  font-weight: 500;
  font-size: 18px;
  line-height: 32px;
  letter-spacing: 0.12px;
}

.feature-list__container {
  position: relative;
  display: flex;
  align-items: flex-start;
}

.feature-list__container::before {
  content: "";
  position: absolute;
  top: 150px;
  z-index: -1;
  width: 1110px;
  height: 8px;
  background-color: var(--extra-color);
}

.features__list-item {
  position: relative;
  background-color: var(--white);
  width: 350px;
  min-height: 267px;
  border-radius: 5px;
  padding-top: 77px;
  padding-left: 32px;
  padding-right: 32px;
  flex-shrink: 0;
}

.features__list-item:not(:last-child) {
  margin-right: 30px;
}

.features__list-item:nth-child(2) {
  margin-top: 44px;
}

.features__list-item:nth-child(3) {
  margin-top: 88px;
}

.features__list-badge {
  position: absolute;
  top: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  width: 88px;
  height: 88px;
  border-radius: 50%;
  background-color: var(--bg-color);
  transform: translateY(-50%);
}

.features__list-badge-img {
  object-fit: cover;
}

.features__list-title {
  margin: 0;
  margin-bottom: 12px;
  color: var(--heading-color);
  font-size: 22px;
  line-height: normal;
}

.features__list-description {
  margin: 0;
}


/* CTA  */
.cta {
  background-image: url(../img/bg_huge.svg);
  background-color: var(--bg-color);
  background-size: cover;
}

.cta *:focus {
  outline-color: var(--white);
}

.cta__container {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding-top: 57px;
  padding-bottom: 57px;
}

.title--cta {
  color: var(--white);
  margin-bottom: 32px;
}


/* SITE FOOTER  */
.site-footer {
  background-color: var(--black);
}

.site-footer *:focus {
  outline-color: var(--white);
}

.site-footer__container {
  display: flex;
  align-items: flex-start;
  padding-top: 72px;
  padding-bottom: 72px;
}


/* MENUS  */
.menues {
  display: flex;
  margin-left: auto;
  padding-left: 50px;
  color: var(--white);
}

.menu:not(:last-child) {
  margin-right: 90px;
}

.menu__list {
  padding: 0;
  margin: 0;
  list-style: none;
}

.menu__title {
  margin-top: 0;
  margin-bottom: 22px;
  font-size: 16px;
  line-height: normal;
  font-weight: 700;
  letter-spacing: -0.25px;
}

.menu__list:not(:last-child) {
  margin-bottom: 10px;
}

.menu__link {
  text-decoration: none;
  color: var(--gray);
  font-size: 15px;
  line-height: normal;
  letter-spacing: -0.23px;
  white-space: nowrap;
}

.menu__link:hover {
  color: var(--extra-color);
}

.menu__link:active {
  opacity: 0.6;
}

.social-list {
  display: flex;
  align-items: center;
  margin: 0;
  margin-left: 100px;
  padding: 0;
  list-style: none;
}

.social-list__item:not(:last-child) {
  margin-right: 24px;
}

.social-list__link {
  color: var(--white);
  display: flex;
}

.social-list__link:hover {
  color: var(--extra-color);
}

.social-list__link:active {
  opacity: 0.6;;
}
