@import url("https://fonts.cdnfonts.com/css/ica-rubrik-black");
@import url("https://fonts.cdnfonts.com/css/poppins");

/* =========================
   GLOBAL
========================= */

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

body {
  font-family: "Poppins", sans-serif;
  background-color: black;
  background-image:
    repeating-linear-gradient(
      to right,
      transparent 0 100px,
      #25283b22 100px 101px
    ),
    repeating-linear-gradient(
      to bottom,
      transparent 0 100px,
      #25283b22 100px 101px
    );
}

body::before {
  position: absolute;
  width: min(1400px, 90vw);
  top: 10%;
  left: 50%;
  height: 90%;
  transform: translateX(-50%);
  content: "";
  background-image: url(images/bg.png);
  background-size: 100%;
  background-repeat: no-repeat;
  background-position: top center;
  pointer-events: none;
}

html,
body {
  width: 100%;
  overflow-x: hidden;
}

/* =========================
   BANNER
========================= */

.banner {
  position: relative;

  width: 100%;
  height: 100vh;

  overflow: hidden;

  text-align: center;
}

/* =========================
   OVERLAY
========================= */

.banner::before {
  content: "";

  position: absolute;
  inset: 0;

  background: linear-gradient(to top, rgba(0, 0, 0, 0.55), rgba(0, 0, 0, 0.1));

  z-index: 1;
}

/* =========================
   3D SLIDER
========================= */

.banner .slider {
  position: absolute;

  width: 200px;
  height: 250px;

  top: 10%;
  left: calc(50% - 100px);

  transform-style: preserve-3d;

  transform: perspective(1000px) rotateX(-16deg);

  transition: transform 0.2s ease-out;

  z-index: 4;
}

.banner .slider .item {
  position: absolute;
  inset: 0;

  overflow: hidden;

  border-radius: 12px;

  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.35);

  transform: rotateY(
      calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
    )
    translateZ(550px);
}

/* =========================
   SLIDER IMAGE / VIDEO
========================= */

.banner .slider .item img,
.banner .slider .item video {
  width: 100%;
  height: 100%;

  object-fit: cover;
  object-position: center;
}

/* =========================
   CONTENT
========================= */

.banner .content {
  position: absolute;

  left: 50%;
  bottom: 0;

  transform: translateX(-50%);

  width: min(1400px, 100%);
  height: 100%;

  padding: 40px;

  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;

  text-align: center;

  z-index: 3;
}

/* =========================
   TITLE
========================= */

.banner .content h1 {
  position: relative;

  font-family: "ICA Rubrik", sans-serif;

  font-size: clamp(4rem, 14vw, 16rem);

  line-height: 0.8;
  margin-bottom: -35px;

  color: #25283b;

  text-shadow: 0 10px 25px rgba(0, 0, 0, 0.25);
}

.banner .content h1::after {
  content: attr(data-content);

  position: absolute;
  inset: 0;

  color: transparent;

  -webkit-text-stroke: 2px rgba(255, 255, 255, 0.749);

  z-index: 2;
}

/* =========================
   SUBTITLE
========================= */

.banner .content .author {
  margin-top: -10px;

  text-align: center;

  color: transparent;
  -webkit-text-stroke: 1px white;

  text-shadow: 0 5px 15px rgba(0, 0, 0, 0.5);

  z-index: 5;
}

.banner .content .author h2 {
  font-size: clamp(2rem, 7vw, 8rem);
  margin-bottom: -40px;
}

.banner .content .author p {
  font-size: clamp(1rem, 3.5vw, 4rem);
  letter-spacing: 2px;
  line-height: 0.8;
  margin-top: 0;
}

/* =========================
   DESKTOP BACKGROUND IMAGE
========================= */

.banner .content .model {
  position: absolute;
  inset: 0;

  width: 100%;
  height: 100%;

  background-image: url("./images/Porsche_911_GT3_RS_10.jpg");

  background-repeat: no-repeat;

  background-size: cover;

  background-position: center center;

  z-index: 1;
}

/* =========================
   NAVIGATION
========================= */

.navigation {
  position: absolute;

  bottom: 30px;
  left: 50%;

  transform: translateX(-50%);

  display: flex;
  gap: 20px;

  z-index: 10;
}

.navigation button {
  width: 45px;
  height: 45px;

  border: none;
  border-radius: 50%;

  background: rgba(37, 40, 59, 0.7);

  color: white;

  font-size: 18px;

  cursor: pointer;

  transition: all 0.3s ease;
}

.navigation button:hover {
  background: rgba(37, 40, 59, 1);

  transform: scale(1.1);
}

/* ==== Floating Home Button ==== */
.floating-home-btn {
  position: fixed;
  top: 10px;
  right: 70px;
  z-index: 1000;
}

.home-btn {
  border: 0;
  color: rgba(0, 0, 0);
  background-color: transparent;
  display: inline-block;
  font-size: 1em;
  font-weight: bold;
  letter-spacing: 0.25em;
  text-transform: uppercase;
  text-decoration: none;
  transition:
    transform 0.35s,
    box-shadow 0.35s,
    color 0.35s;
}

.home-btn:hover {
  transform: translateY(-4px);
  color: rgb(0, 0, 0);
  background-color: transparent;
}

/* =========================
   TABLET
========================= */

@media screen and (max-width: 1023px) {
  .banner .slider {
    width: 160px;
    height: 200px;

    left: calc(50% - 80px);
  }

  .banner .slider .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(320px);
  }

  .banner .content h1 {
    font-size: clamp(4rem, 16vw, 8rem);
  }

  /* ==== Floating Home Button ==== */
  .floating-home-btn {
    position: fixed;
    top: 10px;
    right: 20px;
    z-index: 1000;
  }

  .home-btn {
    border: 0;
    color: rgb(0, 0, 0);
    background-color: transparent;
    display: inline-block;
    font-size: 1em;
    font-weight: bold;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    transition:
      transform 0.35s,
      box-shadow 0.35s,
      color 0.35s;
  }

  .home-btn:hover {
    transform: translateY(-4px);
    color: rgb(0, 0, 0);
    background-color: transparent;
  }
}

/* =========================
   MOBILE
========================= */

@media screen and (max-width: 767px) {
  .banner .content .author {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 2px;
    margin-bottom: 50px;
  }

  .banner {
    height: 100dvh;
  }

  /* ===== MOBILE BACKGROUND ===== */

  .banner .content .model {
    background-image: url("./images/Porsche_911_GT3_RS_FOR_MOBILE.png") !important;

    background-size: cover !important;

    background-position: center center !important;

    background-repeat: no-repeat !important;
  }

  /* ===== SLIDER ===== */

  .banner .slider {
    width: 110px;
    height: 160px;

    top: 8%;

    left: calc(50% - 55px);
  }

  .banner .slider .item {
    transform: rotateY(
        calc((var(--position) - 1) * (360 / var(--quantity)) * 1deg)
      )
      translateZ(200px);
  }

  /* ===== CONTENT ===== */

  .banner .content {
    justify-content: flex-end;
    padding-bottom: 30px;
  }

  /* ===== TITLE ===== */

  .banner .content h1 {
    font-size: 4.5rem;

    margin-bottom: 15px;
  }

  .banner .content .author h2 {
    margin: 0;
    line-height: 1;
    letter-spacing: 2px;
    font-size: 50px;
  }

  .banner .content .author p {
    margin: 0;
    line-height: 0.98;
    letter-spacing: 1px;
    font-size: 30px;
  }

  /* ===== BUTTONS ===== */

  .navigation {
    bottom: 20px;
  }

  .navigation button {
    width: 35px;
    height: 35px;

    font-size: 14px;
  }

  /* ==== Floating Home Button ==== */
  .floating-home-btn {
    position: fixed;
    top: 10px;
    right: 15px;
    z-index: 1000;
  }

  .home-btn {
    border: 0;
    color: rgb(0, 0, 0);
    background-color: transparent;
    display: inline-block;
    font-size: 0.8em;
    font-weight: bold;
    letter-spacing: 0.25em;
    text-transform: uppercase;
    text-decoration: none;
    transition:
      transform 0.35s,
      box-shadow 0.35s,
      color 0.35s;
  }
}
