:root {
  --Light-red: hsl(356, 100%, 66%);
  --Very-light-red: hsl(355, 100%, 74%);
  --Very-dark-blue : hsl(208, 49%, 24%);
  --Grayish-blue : hsl(240, 2%, 79%);
  --Very-dark-grayish-blue: hsl(207, 13%, 34%);
  --Very-dark-black-blue: hsl(240, 10%, 16%);
  --Intro-linear-gradient: hsl(13, 100%, 72%), hsl(353, 100%, 62%);
  --Very-dark-gray-blue: hsl(237, 17%, 21%);
  --Very-dark-desaturated-blue: hsl(237, 23%, 32%);
}
* {
  box-sizing: border-box;
  padding: 0;
  margin: 0;
}
body {
  font-family: "Ubuntu", serif;
}
h1, h2, h3, p {
  font-family: "Overpass", serif;
  line-height: 2;
}
a {
  text-decoration: none;
  color: var(--Very-dark-blue);
}
li {
  list-style: none;
}
.container {
  /* padding: 50px 160px; */
  padding: 3rem 10rem;
}
.btn {
  background-color: white;
  border: none;
  color: var(--Light-red);
  border-radius: 50px;
  transition: .3s;
  width: 135px;
  height: 45px;
  display: flex;
  justify-content: center;
  align-items: center;
  font-weight: 700;
}
.btn:hover {
  color: white;
  background-color: var(--Very-light-red);
}

header {
  color: white;
  background-image: linear-gradient(45deg, var(--Intro-linear-gradient));
  position: relative;
  height: 80vh;
  border-bottom-left-radius: 90px;
}
header::after {
  content: '';
  position: absolute;
  background-image: url(./images/bg-pattern-intro-desktop.svg);
  width: 100%;
  height: 100%;
  top: 0;
  left: 0;
  background-size: 220.5%;
  background-position-x: 25.3%;
  background-position-y: 52.16%;
}
nav {
  display: flex;
  position: relative;
  z-index: 8;
}
nav > img {
  margin-right: 60px;
}
nav .desktop-nav {
  display: flex;
  justify-content: space-between;
  flex: 1;
  align-items: center;
}
nav .desktop-nav > ul {
  display: flex;
  gap: 30px;
}
nav .desktop-nav > ul li {
  position: relative;
  margin: 10px 0;
}
nav ul li span {
  cursor: pointer;
}
nav ul li span:hover {
  text-decoration: underline;
}
nav ul li img {
  margin-left: 10px;
  transition: 0.5s;
}
nav .desktop-nav ul li ul {
  display: none;
  background-color: white;
  padding: 10px 20px;
  position: absolute;
  width: 130px;
  border-radius: 4px;
  left: 50%;
  transform: translateX(-50%);
  top: 40px;
}
nav  ul li.open img {
  transform: rotate(180deg);
}
nav ul li ul a {
  color: var(--Very-dark-blue);
}
nav ul li ul a:hover {
  color: black;
  font-weight: 500;
} 
nav .desktop-nav .rogester {
  display: flex;
  align-items: center;
  gap: 30px;
}
nav .desktop-nav .rogester a:not(.btn) {
  color: white;
}
nav .mobile-nav {
  display: none;
  align-items: center;
  margin-left: auto;
}
nav .mobile-nav .toggle {
  cursor: pointer;
}
nav .mobile-nav .toggle img:last-of-type {
  display: none;
}
nav .mobile-nav .toggle.open img:first-of-type {
  display: none;
}
nav .mobile-nav .toggle.open img:last-of-type {
  display: block;
}
nav .links-container {
  display: none;
  position: absolute;
  top: 4rem;
  width: 100%;
  right: 0;
  background-color: white;
  padding: 20px;
  color: var(--Very-dark-blue);
  border-radius: 4px;
  text-align: center;
  box-shadow: 0px 0px 10px 0px hsl(0deg 0% 0% / 5%);
}
nav .toggle.open + .links-container {
  display: block;
}
nav .links-container ul li {
  padding: 10px;
} 
nav .links-container ul li ul {
  display: none;
  background-color: hsl(240deg 2% 79% / 50%);
  border-radius: 4px;
  margin-top: 15px;
} 
nav ul li.open ul {
  display: block;
}
nav .mobile-nav .rogester {
  border-top: 1px solid hsl(240deg 2% 79% / 50%);
  margin-top: 10px;
  padding-top: 20px;
}
nav .mobile-nav .rogester .btn {
  background-image: linear-gradient(45deg, var(--Intro-linear-gradient));
  color: white;
  margin: auto;
  margin-top: 20px;
}

.intro {
  text-align: center;
  position: relative;
  z-index: 6;
}
.intro h1 {
  /* font-size: 55px; */
  font-size: 3.5rem;
  margin-top: 15%;
}
.intro p {
  padding: 10px 0 40px;
}
.intro .btns {
  display: flex;
  justify-content: center;
  gap: 20px;
}
.intro .btns .btn:last-of-type {
  background-color: transparent;
  border: 1px solid white;
  color: white;
}
.intro .btns .btn:last-of-type:hover {
  background-color: white;
  color: var(--Light-red);
}

section {
  padding-top: 150px;
  overflow: hidden;
}
h2, h3 {
  color: var(--Very-dark-blue);
}
h2 {
  text-align: center;
  font-size: 2.8rem;
}
h3 {
  margin-bottom: 10px;
  font-size: 1.8rem;
}

.editor, .phones, .laptop {
  display: flex;
  justify-content: space-between;
  align-items: center;
  position: relative;
}
.editor .s-device, .laptop .s-device {
  display: none;
  padding-bottom: 20px;
}
.editor h3:not(:first-of-type), .laptop h3:not(:first-of-type) {
  margin-top: 2.8rem;
}
.editor p, .laptop p {
  color: var(--Very-dark-grayish-blue);
}

.editor {
  padding-bottom: 10rem;
}
.editor article {
  width: 60vw;
}
.editor .illust img.l-device {
  position: relative;
  top: -20px;
  right: -50%;
  scale: 1.6;
  max-width: 100%;
}
.editor .illust img.s-device {
  width: 80vw;
}
.phones {
  background-color: var(--Very-dark-blue);
  color: white;
  height: 400px;
  display: flex;
  gap: 40px;
  border-radius: 0 100px;
}
.phones::before {
  content: '';
  position: absolute;
  background-image: url(./images/bg-pattern-circles.svg);
  background-repeat: no-repeat;
  top: 0;
  left: 0;
  background-size: cover;
  background-position-x: -17rem;
  background-position-y: -42rem;
  width: 90%;
  height: 100%;
}
.phones article, .phones img {
  position: relative;
  z-index: 4;
}
.phones img {
  margin-top: 40px;
}
.phones h3 {
  color: white;
}
.laptop {
  padding-bottom: 11rem;
  padding-top: 14rem;
}
.laptop article {
  width: 60vw;
}
.laptop .illust img.l-device {
  position: relative;
  top: -20px;
  left: -45%;
  scale: 1.6;
  max-width: 100%;
}
.laptop .illust img.s-device {
  width: 100vw;
}


footer {
  background-color: var(--Very-dark-black-blue);
  color: var(--Grayish-blue);
  display: flex;
  justify-content: space-between;
  align-items: start;
  position: relative;
  border-radius: 0 100px 0 0;
}
footer ul, footer img {
  margin-top: 20px;
}
footer ul:last-of-type {
  margin-right: 9.5rem;
}
footer ul li {
  margin-bottom: 20px;
}
footer ul li:first-of-type {
  font-weight: 600;
  margin-bottom: 30px;
}
footer ul li a {
  color: var(--Grayish-blue);
}
footer ul li a:hover {
  text-decoration: underline;
}
footer .attribution {
  font-size: 14px;
  position: absolute;
  bottom: 10px;
  right: 50%;
  transform: translate(50%);
  opacity: 0.8;
}
footer .attribution a {
  color: hsl(355deg 100% 78.53%);
}


@media (max-width: 1200px) {
  .container {
    padding: 3rem 8rem;
  }
  .phones {
    margin: 5rem 0;
  }
}
@media (max-width: 1000px) {
  .container {
    padding: 3rem 4rem;
  }
  .laptop article, .editor article {
    width: 75vw;
  }
}
@media (max-width: 860px) {
  nav > img {
    margin-right: 30px;
  }
  nav .desktop-nav .rogester {
    gap: 20px;
  }
  .intro h1 {
    font-size: 3rem;
  }
  .phones img {
    width: 50vw;
  }
}
/* Mediam & Small device */
@media (max-width: 820px) { 
  nav .desktop-nav {
    display: none;
  }
  nav .mobile-nav {
    display: flex;
  }
  footer ul:last-of-type {
    margin-right: 3rem;
  }
}
@media (max-width: 770px) { 
  .container {
    padding: 2rem;
  }
  header {
    height: 95vh;
  }
  header::after {
    background-image: url(./images/bg-pattern-intro-mobile.svg);
  }
  section {
    padding-top: 6rem;
  }
  .editor, .phones, .laptop {
    flex-direction: column;
    text-align: center;
  }
  .editor article {
    order: 2;
  }
  .editor article, .laptop article {
    width: fit-content;
  }
  .editor .l-device, .laptop .l-device {
    display: none;
  }
  .editor .s-device, .laptop .s-device {
    display: block;
  }
  .phones {
    height: 600px;
    margin: 10rem 0 0;
  }
  .phones::before {
    background-position-x: -3rem;
    background-position-y: -17rem;
    width: 115%;
  }
  .phones img {
    top: -40%;
    width: 70vw;
  }
  .phones article {
    top: -30%;
  }
  footer {
    display: block;
    text-align: center;
  }
  footer ul, footer img {
    margin-top: 45px;
  }
  footer ul:last-of-type {
    margin-right: 0;
  }
}

