@import url("https://fonts.googleapis.com/css2?family=Work+Sans:wght@100;200;300;400;500;600;700;800;900&display=swap");

/* Common Styles */
* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
  list-style-type: none;
  outline: none;
  text-decoration: none;
  font-family: "Work Sans", sans-serif;
}

html {
  font-size: 62.5%;
  scroll-behavior: smooth;
  margin-top: 0;
  margin-left: 0;
  margin-right: 0;
}

:root {
  --primary-color: #6edae6;
  --white-color: #fff;
  --black-color: #000;
}

.center {
  display: flex;
  justify-content: center;
  align-items: center;
}
/* End of Common Styles */

/* Section 1 */
.section-1 {
  width: 100%;
  height: 100vh;
  background-color: var(--primary-color);
  display: flex;
  align-items: center;
  justify-content: space-evenly;
  clip-path: polygon(100% 0, 100% 95%, 38% 100%, 0 100%, 0 0);
  position: relative;
}

/* Navbar */
.navbar {
  position: absolute;
  top: 3rem;
  right: 10%;
}

.navbar-link {
  font-size: 2.5rem;
  display: inline-block;
  margin: 0 3rem;
  color: whitesmoke;
  text-shadow: black 0px 0px 10px;
  transition: transform 0.5s;
}

.navbar-link:hover {
  transform: scale(1.3);
}
/* End of Navbar */

/* Cube */
.cube-wrapper {
  perspective: 100rem;
}

.cube {
  width: 30rem;
  height: 40rem;
  transform-style: preserve-3d;
  transform: rotateX(0) rotateY(20deg) rotateZ(0);
  position: relative;
  top: 0rem;
  transition: transform 0.5s;
}

.front-side,
.back-side {
  width: 100%;
  height: 100%;
  background-color: #fee;
  position: absolute;
  transform-style: preserve-3d;
  box-shadow: inset 0.1rem 0.1rem 0.1rem #ddd, inset -0.1rem -0.1rem 0.1rem #ddd;
}

.front-side {
  padding: 0 rem;
  transform: translateZ(5rem);
}

.front-side::before,
.front-side::after {
  content: "";
  width: 100%;
  height: 10rem;
  background-color: #fee;
  position: absolute;
  box-shadow: inset 0.1rem 0.1rem 0.1rem #ddd, inset -0.1rem -0.1rem 0.1rem #ddd;
}

.front-side::before {
  top: 0;
  left: 0;
  transform: rotateX(-90deg);
  transform-origin: top;
}

.front-side::after {
  bottom: 0;
  left: 0;
  transform: rotateX(90deg);
  transform-origin: bottom;
}

.front-side img {
  width: 100%;
  height: 100%;
  object-fit:contain;
}
.back-side img {
  width: 100%;
  height: 100%;
  object-fit:contain;
}

.back-side {
  transform: translateZ(-5rem);
}

.back-side::before,
.back-side::after {
  content: "$49.70";
  width: 10rem;
  height: 100%;
  background-color: #fee;
  position: absolute;
  display: flex;
  justify-content: center;
  align-items: center;
  font-size: 3rem;
  font-weight: 300;
  color: black;
  box-shadow: inset 0.1rem 0.1rem 0.1rem #ddd, inset -0.1rem -0.1rem 0.1rem #ddd;
}

.back-side::before {
  top: 0;
  left: 0;
  transform: rotateY(-90deg);
  transform-origin: left;
}

.back-side::after {
  top: 0;
  right: 0;
  transform: rotateY(90deg);
  transform-origin: right;
}

.back-side i {
  font-size: 12rem;
  color: var(--primary-color);
  text-shadow: 0.1rem 0.1rem 0.2rem #aaa, -0.1rem -0.1rem 0.2rem #aaa;
  transform: rotateY(180deg);
}

/* Controls */
.controls {
  position: absolute;
  bottom: -15rem;
  left: 50%;
  transform: translateX(-50%);
  width: 10rem;
  height: 10rem;
  background-color: rgba(0, 0, 0, 0.9);
  border-radius: 50%;
  border: 1rem solid rgba(0, 0, 0, 0.8);
}

.controls a {
  position: absolute;
}

.controls a:nth-child(1) {
  top: 0;
  left: 50%;
  transform: translateX(-50%);
}

.controls a:nth-child(2) {
  bottom: 0;
  left: 50%;
  transform: translateX(-50%);
}

.controls a:nth-child(3) {
  top: 50%;
  left: 0;
  transform: translateY(-50%);
}

.controls a:nth-child(4) {
  top: 50%;
  right: 0;
  transform: translateY(-50%);
}

.controls a:nth-child(5) {
  top: 10%;
  right: 10%;
  transform: rotate(45deg);
}

.controls a:nth-child(6) {
  bottom: 10%;
  left: 10%;
  transform: rotate(45deg);
}

.controls i {
  font-size: 1.5rem;
  color: var(--primary-color);
  opacity: 0.5;
  transition: opacity 0.5s;
}

.controls a:hover i {
  opacity: 1;
}
/* End of Controls */
/* End of Cube */

/* Banner */
.section-1-banner {
  flex-direction: column;
}

.section-1-banner h1 {
  font-size: 13rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.5rem;
  color: white;
  text-shadow: black 0px 0px 10px;
}

.section-1-banner p {
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: 0.1rem;
  margin: 2rem 0 4rem 0;
  color: white;
  text-shadow: black 0px 0px 10px;
}

.section-1-banner em {
  text-shadow: black 0px 0px 10px;
}

.section-1-banner button {
  padding: 2rem 4rem;
  font-size: 2rem;
  background-color: var(--black-color);
  color: var(--primary-color);
  font-weight: 400;
  letter-spacing: 0.1rem;
  border: none;
  border-radius: 0.5rem;
  cursor: pointer;
  clip-path: polygon(
    50% 0%,
    81% 5%,
    100% 0,
    100% 100%,
    80% 95%,
    50% 100%,
    20% 95%,
    0 100%,
    0 0,
    23% 5%
  );
  transition: clip-path 0.5s;
}

.section-1-banner button:hover {
  clip-path: polygon(
    40% 15%,
    77% 15%,
    100% 10%,
    100% 90%,
    75% 85%,
    40% 85%,
    30% 100%,
    0 50%,
    0 50%,
    30% 0
  );
}
/* End of Banner */

/* Slideshow */
.slideshow {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  z-index: -1;
}

.slideshow div {
  width: 100%;
  height: 100%;
  position: absolute;
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
  opacity: 0;
  transition: opacity 5s;
}

.slideshow div.change {
  opacity: 1;
}
/* End of Slideshow */
/* End of Section 1 */

/* Section 2 */
.section-2 {
  width: 100%;
  height: 130vh;
  padding: 10vh 0;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: space-around;
}

/* Section 2 Heading */
.section-2-heading {
  font-size: 10rem;
  font-weight: 200;
  color: var(--black-color);
  position: relative;
  margin-bottom: 5rem;
}

.section-2-heading::before {
  content: "";
  width: 130%;
  height: 30vw;
  background-image: linear-gradient(var(--primary-color), var(--white-color));
  position: absolute;
  top: 0;
  left: 0;
  transform: skewX(-50deg);
  transform-origin: left top;
  z-index: -1;
  border-radius: 1rem;
}
/* End of Section 2 Heading */

/* Section 2 Images */
.iphones {
  height: 60vh;
  width: 50vw;
  background-image: linear-gradient(var(--primary-color), var(--white-color));
  border-radius: 0.5rem;
}

.iphones img {
  width: inherit;
  height: inherit;
  object-fit: contain;
  position: absolute;
  transition: opacity 3s;
}

.iphone-img-2 {
  opacity: 0;
}

.iphones:hover .iphone-img-1 {
  opacity: 0;
}

.iphones:hover .iphone-img-2 {
  opacity: 1;
}
/* End of Section 2 Images */

/* Section 2 Buttons */
.iphone-btns {
  display: flex;
}

.iphone-btn {
  width: 6rem;
  height: 6rem;
  background-image: linear-gradient(
    to right,
    rgb(51, 51, 51) 60%,
    rgb(82, 82, 82)
  );
  margin: 0 3rem;
  border-radius: 50%;
  position: relative;
}

.iphone-btn::after {
  content: "";
  width: 50%;
  height: 50%;
  display: block;
  border: 0.1rem solid #6edae6;
  border-radius: 1rem;
}

.iphone-btn span {
  position: absolute;
  top: -3rem;
  font-size: 2.5rem;
  font-weight: 500;
  text-transform: uppercase;
  letter-spacing: 0.1rem;
  color: var(--primary-color);
  width: max-content;
  transform: scale(0);
  transition: transform 0.5s;
}

.iphone-btn:hover span {
  transform: scale(1);
}
/* End of Section 2 Buttons */
/* End of Section 2 */

/* Section 3 */
.section-3 {
  width: 100%;
  height: 100%;
  background-color: var(--black-color);
  flex-direction: column;
  padding: 15rem 0;
  clip-path: polygon(68% 0, 100% 0, 100% 97%, 38% 100%, 0 100%, 0 3%);
}

/* Section 3 Heading */
.section-3-heading {
  font-size: 10rem;
  font-weight: 200;
  color: var(--primary-color);
  margin-bottom: 15rem;
}
/* End of Section 3 Heading */

/* Section 3 Content */
.section-3-content {
  width: 77%;
  flex-direction: column;
  perspective: 1000rem;
  position: relative;
}

/* Section 3 Images */
.section-3-content img {
  width: inherit;
}

.macbook-img-1 {
  transform: rotateX(-80deg);
  transform-origin: bottom;
}

.change .macbook-img-1 {
  transform: rotateX(0);
  transition: transform 3s;
}
/* End of Section 3 Images */

/* Section 3 Loading */
.loading-wrapper {
  position: absolute;
  top: 6%;
  width: 60%;
  height: 85%;
  z-index: -1;
  opacity: 0;
  background: linear-gradient(
      rgba(255, 255, 255, 0.6),
      rgba(255, 255, 255, 0.6)
    ),
    url(images/MacBook/macbook-1-desktop.png) center no-repeat;
}

.change .loading-wrapper {
  opacity: 1;
  transition: opacity 1s 2s;
}

.loading {
  width: 100%;
  height: 100%;
  position: absolute;
  top: 0;
  left: 0;
  background-color: var(--black-color);
  flex-direction: column;
}

.change .loading {
  opacity: 0;
  transition: 1s 5s;
}

.loading i {
  font-size: 10rem;
  color: var(--white-color);
  margin-bottom: 2rem;
}

.progress-bar {
  width: 22rem;
  height: 0.3rem;
  background-color: #888;
  border-radius: 5rem;
  position: relative;
}

.progress-bar::after {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  width: 0;
  height: 100%;
  background-color: var(--white-color);
}

.change .progress-bar::after {
  width: 100%;
  transition: width 1s 3s;
}
/* End of Section 3 Loading */

/* Section 3 Info */
.macbook-info {
  position: absolute;
  width: 70rem;
  text-align: center;
  opacity: 0;
}

.change .macbook-info {
  opacity: 1;
  transition: opacity 1s 6.7s;
}

.macbook-info-heading {
  font-size: 7rem;
  font-weight: 400;
  color: var(--primary-color);
}

.macbook-price {
  font-size: 3rem;
  font-weight: 300;
  margin: 3rem 0;
}

.macbook-btn {
  width: 25rem;
  height: 5rem;
  background-image: linear-gradient(#ddd, #fff);
  border: none;
  border-radius: 0.5rem;
  box-shadow: 0.1rem 0.1rem 0.1rem #fff, -0.1rem -0.1rem 0.1rem #fff;
  font-size: 2.5rem;
  font-weight: 500;
  letter-spacing: 0.2rem;
  color: var(--primary-color);
  cursor: pointer;
}
/* End of Section 3 Info */
/* End of Section 3 Content */
/*End of Section 3 */
/* Section 4 */
.section-4-heading {
  flex-direction: column;
}

.section-4-heading h1 {
  font-size: 5rem;
  font-weight: 300;
  text-transform: uppercase;
  letter-spacing: 0.3rem;
  margin: 3rem 0 0 0;
}

em {
  color:white;
  font-size: 7rem;
  font-weight: 450;
  letter-spacing: 0.1rem;
  margin: 2rem 0 4rem 0;
}

.section-4-heading p {
  font-size: 4rem;
  font-weight: 400;
  letter-spacing: 0.1rem;
  margin: 2rem 0 4rem 0;
}

.section-4 {
  width: 100%;
  height: 100vh;
  background-color: #93cfd1;
  flex-direction: column;
  display: flex;
  align-items: center;
}

.section-4-heading button {
  padding: 2rem 4rem;
  font-size: 2rem;
  background-color: var(--black-color);
  color: var(--primary-color);
  font-weight: 400;
  letter-spacing: 0.1rem;
  border: none;
  margin: 2rem 0 4rem 0;
  border-radius: 0.5rem;
  cursor: pointer;
  clip-path: polygon(
    50% 0%,
    81% 5%,
    100% 0,
    100% 100%,
    80% 95%,
    50% 100%,
    20% 95%,
    0 100%,
    0 0,
    23% 5%
  );
  transition: clip-path 0.5s;
}

.section-4-heading button:hover {
  clip-path: polygon(
    40% 15%,
    77% 15%,
    100% 10%,
    100% 90%,
    75% 85%,
    40% 85%,
    30% 100%,
    0 50%,
    0 50%,
    30% 0
  );
}

/* Section 5 */
.section-5 {
  width: 100%;
  height: 30vh;
  background-color: #479ea0;
  flex-direction: column;
}

.social-media {
  margin-top: 5rem;
  margin-bottom: 5rem;
}

.social-media-link {
  margin: 0 2rem;
  padding: 0.7rem;
  background-color: hsl(120, 33%, 4%);
  border-radius: 0.5rem;
  display: inline-block;
}

.social-media-link i {
  font-size: 3rem;
  color: white;
}

.copyright {
  color: black;
  font-size: 3rem;
  letter-spacing: 0.2rem;
  font-weight: 300;
  text-align: center;
}
/* End of Section 5 */

/* Responsive */
@media (max-width: 1500px) {
  html {
    font-size: 45%;
  }
}

@media (max-width: 1100px) {
  html {
    font-size: 40%;
  }

  .navbar-link {
    font-weight: 500;
  }

  .section-1-banner h1, em {
    font-size: 7rem;
  }

  .section-1-banner p {
    font-size: 3rem;
  }

}

@media (max-width: 900px) {
  .section-3-content {
    width: 100%;
  }

  .loading-wrapper {
    width: 75%;
  }

  .loading i {
    font-size: 5rem;
  }

}

@media (max-width: 700px) {
  .logo {
    top: 0;
    left: 2rem;
  }

  .logo i {
    font-size: 7rem;
  }

  .controls {
    display: none;
  }

  .cube-wrapper {
    opacity: 0.37;
  }

  .cube {
    top: 3rem;
  }

  .section-1-banner {
    position: absolute;
  }

  em {
    color:white;
  }

  .section-1-banner h1 {
    position: center;
    left: 5rem;
  }

  .section-1-banner h1::first-letter {
    visibility:none;
    opacity: 0;
  }

  .section-1-banner button:hover {
    clip-path: polygon(
      50% 0%,
      81% 5%,
      100% 0,
      100% 100%,
      80% 95%,
      50% 100%,
      20% 95%,
      0 100%,
      0 0,
      23% 5%
    );
  }
}
  .iphones {
    height: 70vh;
    width: 70vw;
  }

  .airpods-img-1 {
    display: none;
  }

  .airpods .airpods-img-2 {
    width: 100%;
  }

  .airpods-btn {
    background-color: var(--white-color);
    color: var(--primary-color);
    box-shadow: 0.1rem 0.1rem 0.1rem #ddd;
  }

  .icon-link {
    margin: 0 2rem;
  }


@media (max-width: 550px) {
  .navbar-link {
    margin: 0 1.5rem;
  }

  .section-2-heading {
    font-size: 7rem;
    text-align: center;
  }

  .macbook-info-heading {
    font-size: 5rem;
  }

  .macbook-btn {
    width: 15rem;
    height: 3rem;
    font-size: 1.7rem;
  }
}
@media (max-width: 450px) {
  html {
    font-size: 35%;
  }

  .logo {
    top: 10rem;
    left: 50%;
    transform: translateX(-50%);
  }

  .navbar {
    left: 50%;
    transform: translateX(-50%);
    width: 100%;
  }

  .section-4-heading h1, p, em {
    text-align: center;
    position: relative;
  }

  .section-4-heading button:hover {
    clip-path: polygon(
      50% 0%,
      81% 5%,
      100% 0,
      100% 100%,
      80% 95%,
      50% 100%,
      20% 95%,
      0 100%,
      0 0,
      23% 5%
    );
  }
  .iphones {
    width: 75vw;
  }

  .section-3-heading {
    font-size: 6rem;
  }

  .macbook-info {
    width: 40rem;
  }

  .macbook-info-heading {
    font-size: 3rem;
  }

  .macbook-price {
    font-size: 2rem;
    font-weight: 300;
  }
}
/* End of Responsive */