@import url("https://fonts.googleapis.com/css2?family=Poppins:wght@500;700&display=swap");

:root {
  --body-font: "Poppins", sans-serif;
  --cyan: hsl(180, 66%, 49%);
  --light-cyan: #9be3e2;
  --dark-violet: hsl(257, 27%, 26%);
  --red: hsl(0, 87%, 67%);
  --gray: hsl(0, 0%, 75%);
  --grayish-violet: hsl(257, 7%, 63%);
  --very-dark-blue: hsl(255, 11%, 22%);
  --very-dark-violet: hsl(260, 8%, 14%);
  --white: rgb(255, 255, 255);
}

* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
html {
  font-size: 112.5%;
}
body {
  font-family: var(--body-font);
  background-color: var(--white);
  -ms-overflow-style: none; /* for Internet Explorer, Edge */
  scrollbar-width: none; /* for Firefox */
  overflow-y: scroll;
  min-height: 100vh;
}
body::-webkit-scrollbar {
  display: none; /* for Chrome, Safari, and Opera */
}

nav,
.menu-section,
.section-1,
.section-3,
.url-input-block,
.search-result-block {
  width: 100%;
  display: flex;
  flex-direction: row;
}
/** Header **/

nav {
  align-items: center;
  gap: 2.3rem;
  padding: 2.9rem 9.2rem;
  position: relative;
}

.menu-section {
  justify-content: space-between;
}

nav ul li {
  word-spacing: 1px;
  text-align: center;
}
a,
li {
  text-decoration: none;
  list-style: none;
  cursor: pointer;
}

.links-section a,
.buttons-section li:first-child a,
.url-button {
  font-weight: 700;
}
/** Gray Ps **/
.gray-p li a,
.gray-p,
.gray-p::placeholder {
  color: var(--grayish-violet);
}
/** Hamburger **/
.fa-solid.fa-bars {
  font-size: 2rem;
  display: none;
}

/** Cyan Btns **/

.cyan-btn {
  color: var(--white);
  background-color: var(--cyan);
  cursor: pointer;
  border-color: transparent;
  border-radius: 35px;
  text-align: center;
  transition: all ease-in-out 0.2s;
}

.links-section {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 0.8rem;
  transition: all ease-in-out 0.2s;
  align-items: center;
  text-align: center;
  gap: 1rem;
}
.buttons-section {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0.5rem;
}

.buttons-section li .gray-p {
  font-size: 0.8rem;
}

.sign-up-btn {
  padding: 0.7rem 1.3rem;
  font-weight: 500;
  font-size: 0.8rem;
  text-align: center;
}

/** Section 1 **/
.section-1 {
  position: relative;
  display: grid;
  grid-template-columns: 40rem auto;
  background-color: var(--white);
  margin: 0 auto;
  width: 80%;
  height: 26.5rem;
  max-height: 100%;
  padding: 5.4rem 1.3rem;
}

.main-info {
  display: flex;
  flex-direction: column;
  grid-row: span 1;
  width: 80%;
}
.main-info p {
  font-weight: 500;
  font-size: 1.2rem;
}
.main-info .cyan-btn {
  width: max-content;
  font-size: 1.1rem;
  font-weight: 500;
  margin-top: 2.1rem;
  padding: 0.8rem 2.3rem;
}

h1 {
  font-size: 4.2rem;
  font-weight: 700;
  line-height: 5.2rem;
}
.section-1 {
  overflow-x: none;
}
.section-1 img {
  object-fit: cover;
  position: static;
  display: inline-block;
  grid-row: span 2;
  margin-left: -3rem;
  margin-top: -4rem;
  align-items: stretch;
  overflow-x: hidden;
}

/** Section 2 **/
.section-2 {
  display: flex;
  flex-direction: row;
  position: static;
  justify-content: space-around;
  align-items: center;
  align-content: center;
  width: 77%;
  height: 10rem;
  max-height: 100%;
  background-color: var(--dark-violet);
  background-image: url("images/bg-shorten-desktop.svg");
  background-size: cover;
  background-repeat: no-repeat;
  border-radius: 15px;
  transform: translate(0, 50%);
  margin: 0 auto;
  margin-top: 0.5rem;
  padding: 2.2rem;
  gap: 0.6rem;
  z-index: 1;
}
.url-input-block {
  position: relative;
  display: flex;
  flex-direction: column;
  border-color: transparent;
  cursor: text;
  width: 72%;
}

.url-input.shown {
  border-color: var(--red);
  border-width: 4px;
}

.url-input.shown::placeholder {
  color: var(--red);
}
.url-input {
  border-radius: 10px;
  border-color: transparent;
  font-size: 1.1rem;
  font-weight: 500;
  padding: 14px;
  cursor: text;
  color: var(--gray);
}
.url-input::placeholder {
  font-size: 1.1rem;
  font-weight: 500;
  color: var(--gray);
}

.error-msg {
  display: none;
}

.error-msg.shown {
  position: absolute;
  display: inline-block;
  margin-top: 3.5rem;
  color: var(--red);
}

.url-button.cyan-btn {
  border-radius: 10px;
  width: 18%;
  padding: 20px;
  font-size: 1rem;
}

/** Section 3 **/
.section-3 {
  display: flex;
  flex-direction: column;
  align-items: center;
  background-color: #f0f1f6;
  z-index: 0;
  padding-bottom: 6.5rem;
  margin-top: 7rem;
  gap: 1rem;
}

/** Shortening **/
.search-result-block {
  position: relative;
  display: flex;
  flex-direction: column;
  justify-content: space-around;
  gap: 2rem;
  margin-top: 2rem;
  align-items: center;
}
.reset-results {
  display: none;
}

.reset-results.active {
  display: inline-block;
  width: max-content;
  border-radius: 10px;
  padding: 20px;
  font-size: 1rem;
  font-weight: 700;
}

.result {
  display: flex;
  flex-direction: row;
  justify-content: space-between;
  align-items: center;
  width: 70%;
  margin: 0 auto;
  background-color: white;
  color: black;
  padding: 1rem;
  border-radius: 15px;
  font-size: 1.1rem;
}

.results {
  display: flex;
  flex-direction: row;
  justify-content: space-evenly;
  gap: 1rem;
  align-items: center;
}

.result-block-hr,
.menu-hr {
  display: none;
}
.results p {
  color: var(--cyan);
}
.inserted-link {
  width: 60%;
  text-overflow: ellipsis;
  white-space: nowrap;
  overflow: hidden;
  text-align: center;
}

.copy-btn {
  color: var(--white);
  background-color: var(--cyan);
  cursor: pointer;
  border-color: transparent;
  border-radius: 10px;
  text-align: center;
  font-size: 1rem;
  padding: 0.5rem 1rem;
  transition: all ease-in-out 0.2s;
}

.section-3 h2 {
  margin-top: 5rem;
  font-size: 2.2rem;
  text-align: center;
}
.section-3 .info {
  text-align: center;
  color: var(--grayish-violet);
  font-weight: 500;
  max-width: 38vw;
  margin: 0 auto;
  padding: 0.5rem;
}

.section-3-blocks {
  position: relative;
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  align-items: center;
  gap: 2rem;
  width: 77%;
  margin: 0 auto;
  justify-content: space-evenly;
}
.section-3-blocks::before {
  content: "";
  width: 75%;
  height: 8px;
  top: 55%;
  left: 10%;
  background-color: var(--cyan);
  position: absolute;
  z-index: 0;
}
.section-3-blocks > * {
  border-radius: 10px;
  background-color: var(--white);
  z-index: 2;
}

.section-3-blocks img {
  position: static;
  background-color: var(--dark-violet);
  padding: 1.2rem;
  border-radius: 50%;
  position: relative;
  transform: translate(30%, -50%);
  z-index: 1;
}
.section-3-blocks h3 {
  margin-top: -1rem;
  padding-right: 1.9rem;
  padding-left: 1.9rem;
}
.section-3-blocks p {
  padding: 1rem 1.9rem;
  font-size: 0.9rem;
  font-weight: 500;
}

.section-3-blocks div:nth-child(2) {
  margin-top: 4rem;
}

.section-3-blocks div:nth-child(3) {
  margin-top: 10rem;
}

/** Section 4 **/
.section-4 {
  display: flex;
  flex-direction: column;
  text-align: center;
  align-items: center;
  padding-top: 1rem;
  padding-bottom: 2.9rem;
  background-color: var(--dark-violet);
  background-image: url("images/bg-boost-desktop.svg");
  background-size: cover;
  background-repeat: no-repeat;
}

.section-4 h2 {
  margin-top: 2.5rem;
  margin-bottom: 1.3rem;
  font-size: 2.1rem;
  color: var(--white);
}

.section-4 .cyan-btn {
  padding: 0.7rem 2.5rem;
  font-weight: 700;
  font-size: 1.1rem;
}

/** Footer **/
footer {
  display: grid;
  grid-template-columns: 15rem 1fr;
  grid-template-rows: 1fr;
  width: 100%;
  background-color: var(--very-dark-violet);
  color: var(--white);
  transition: all ease-in-out 0.2s;
  padding: 3rem;
}
.footer-menu {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  font-size: 0.9rem;
  grid-row: span 2;
}

.logo-img {
  object-fit: cover;
  padding-left: 20%;
  grid-row: span 1;
}
.footer-menu h4 {
  font-weight: 700;
  padding-bottom: 1rem;
}

.footer-menu li {
  line-height: 1.8rem;
  font-weight: 500;
}

.social-media {
  display: flex;
  flex-direction: row;
  text-align: left;
  gap: 20px;
}

.social-media img {
  width: 1.6rem;
  height: 1.6rem;
  max-height: 100%;
  max-width: 100%;
  object-fit: cover;
  color: black;
  cursor: pointer;
  filter: invert(100%) sepia(0%) saturate(0%) hue-rotate(116deg) brightness(103%) contrast(103%);
  transition: all ease-in-out 0.2s;
}

/** Hover States **/

@media (hover: hover) {
  .cyan-btn:hover {
    background-color: var(--light-cyan);
    transition: all ease-in-out 0.2s;
  }

  .links-section a:hover {
    color: var(--dark-violet);
    transition: all ease-in-out 0.2s;
  }

  .social-media img:hover {
    filter: invert(97%) sepia(65%) saturate(4201%) hue-rotate(123deg) brightness(88%) contrast(83%);
    transition: all ease-in-out 0.2s;
  }
  .footer-menu a:hover {
    transition: all ease-in-out 0.2s;
    color: var(--cyan);
  }
  .fa-solid.fa-bars:hover {
    cursor: pointer;
  }
  .copy-btn:hover {
    background-color: var(--dark-violet);
    transition: all ease-in-out 0.2s;
  }
}

/** Media Q **/

@media screen and (max-width: 1360px) {
  h1 {
    font-size: 3rem;
  }

  .main-info .cyan-btn {
    max-width: 50%;
    min-width: 100%;
    padding-top: 10px;
    margin-top: 10px;
  }
  .social-media {
    flex-wrap: wrap;
    justify-content: center;
  }
}

@media screen and (max-width: 1100px) {
  /** Hamburger **/
  .fa-solid.fa-bars {
    display: inline-block;
    width: 100%;
    text-align: right;
  }

  .menu-section {
    display: none;
  }

  .section-3 .info {
    max-width: 90vw;
    padding: 2rem 1rem;
  }
  .menu-section.show {
    position: absolute;
    left: 0;
    right: 0;
    margin: 0 auto;
    top: 100%;
    display: grid;
    grid-template-columns: 1fr;
    gap: 1rem;
    max-width: 50%;
    min-width: 70%;
    z-index: 2;
    justify-items: center;
    background-color: var(--dark-violet);
    padding: 2rem;
    border-radius: 20px;
  }

  .menu-section.show a {
    font-size: 1.2rem;
    color: var(--white);
    letter-spacing: 1px;
  }
  .links-section,
  .buttons-section {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  nav {
    padding: 1rem;
  }
  .section-1 {
    display: flex;
    flex-direction: column-reverse;
    height: 60rem;
    justify-content: center;
    align-items: center;
    width: 100%;
    position: relative;
  }

  .section-1 img {
    object-fit: contain;
    width: 90%;
    margin: 0 auto;
  }
  .section-2 {
    width: 90%;
  }

  .result,
  .results {
    display: flex;
    flex-direction: column;
    text-align: left;
  }
  .results {
    width: fit-content;
    overflow-y: hidden;
  }

  .result-block-hr {
    display: inline-block;
    border-color: var(--white);
    width: 90%;
    margin: 1rem;
  }

  .menu-hr {
    display: inline-block;
    border-color: var(--gray);
    width: 90%;
  }

  .copy-btn {
    width: 90%;
  }
  .main-info {
    text-align: center;
    align-items: center;
  }
  .section-3-blocks {
    display: flex;
    flex-direction: column;
    gap: 1rem;
    width: 80%;
  }

  .section-3-blocks::before {
    width: 8px;
    height: 75%;
    top: 0;
    left: 50%;
  }
  .section-3-blocks div:nth-child(2) {
    margin-top: 2rem;
  }

  .section-3-blocks div:nth-child(3) {
    margin-top: 2rem;
  }

  footer {
    display: flex;
    flex-direction: column;
    text-align: center;
    justify-items: center;
  }
  .footer-menu {
    grid-template-columns: 1fr;
    grid-template-rows: repeat(4, 1fr);
    align-items: center;
    text-align: center;
    gap: 1rem;
    justify-content: center;
  }
  .logo-img {
    padding-left: 0;
  }
}

@media screen and (max-width: 801px) {
  .section-2 {
    width: 80%;
    display: grid;
    grid-template-rows: repeat(2, 1fr);
    grid-template-columns: 2fr;
    justify-content: center;
    height: initial;
    gap: 1.5rem;
  }

  .url-input-block,
  .url-button.cyan-btn {
    width: 100%;
  }
}
