* {
  line-height: 1.15; /* 1 */
  -webkit-text-size-adjust: 100%; /* 2 */
  scroll-behavior: smooth;
}

body {
  padding: 0;
  margin: 0;
  box-sizing: border-box;
  background-color: var(--primary-color);
}

:root {
  --primary-color: hsl(204, 90%, 23%);
  --secondary-color: hsl(277, 27%, 58%);
  --color-white: hsl(0, 0%, 100%);
  --color-grey: hsl(0, 3%, 72%);
}

.nav-bar {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  background-color: hsla(277, 27%, 58%, 0.6);
  padding: 0.95em, 1em;
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-family: "Open Sans", sans-serif;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1), 0 4px 8px rgba(0, 0, 0, 0.3);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  z-index: 999;
}

.nav-logo {
  margin-right: 20px;
  padding-left: 20px;
  color: var(--color-white);
  margin-bottom: 5px;
}

.nav-links {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  justify-content: space-between;
  flex-wrap: wrap;
  margin-right: 60px;
  gap: 25px;
}

.nav-link {
  color: var(--color-white);
  text-decoration: none;
  margin-left: 20px;
  transition: color 0.5s ease;
  flex: 1;
  text-align: center;
  position: relative;
}

.nav-link::before {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 0;
  height: 2px;
  background-color: var(--color-grey);
  transition: width 0.5s ease;
}

.nav-link:hover::before {
  width: 100%;
}

.nav-link::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  width: 100%;
  height: 2px;
  background-color: transparent;
  transition: background-color 0.5s ease;
}

.nav-link:hover::after {
  background-color: var(--color-grey);
}

.nav-links li {
  text-align: center;
}

.btn {
  position: relative;
  background-color: var(--primary-color);
  opacity: 0.7;
  padding: 10px 20px;
  border-radius: 10px;
  box-shadow: 0 30px 50px rgba(0, 0, 0, 0.2);
  text-decoration: none;
  color: var(--color-white);
  overflow: hidden;
  align-self: center;
  justify-self: center;
}

.btn span {
  position: relative;
  z-index: 1;
}

.btn::before {
  content: "";
  position: absolute;
  background-color: var(--color-grey);
  width: 0;
  height: 0;
  left: var(--xPos);
  top: var(--yPos);
  transform: translate(-50%, -50%);
  border-radius: 50%;
  transition: width 1s, height 1s;
}

.btn:hover::before {
  width: 300px;
  height: 300px;
}

.btn-1 {
  background-image: linear-gradient(-180deg, var(--color-grey), var(--secondary-color));
  font-size: clamp(0.8rem, 8vw, 0.9rem);
  font-weight: 600;
  color: #fff;
  width: max-content;
  outline: 0;
  border: 0;
  border-radius: 6px;
  box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
  padding: 10px 20px;
  margin-top: 26px;
  text-align: center;
  transform: scale(1);
  transition: all 0.2s ease-in;
  cursor: pointer;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
  pointer-events: auto;
}

.btn-1:hover {
  box-shadow: 0 4px 10px rgba(155, 119, 177, 0.402);
  transform: scale(0.98);
}

main {
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr;
  place-items: center;
  min-height: 100vh;
}

/* Content */

.content {
  padding-left: 120px;
  color: var(--color-white);
  user-select: none;
  margin-block: 200px;
}

.content h1 {
  font-family: "Dancing Script", cursive;
  font-size: clamp(2.5rem, 4vw, 6rem);
  font-weight: 700;
  background: -webkit-linear-gradient(
    0deg,
    rgb(22, 132, 206),
    var(--secondary-color)
  );
  background-clip: text;
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  line-height: 1.1;
  margin-bottom: 36px;
  padding-left: 10px;
}

.content p {
  font-size: clamp(0.9rem, 4vw, 1.2rem);
  line-height: 1.6;
  padding-right: 100px;
}

/* Stacked Cards */

.stack {
  position: relative;
}

.card {
  position: absolute;
  transform: translate(-50%, -50%);
  top: 50%;
  left: 50%;
  width: 350px;
  height: 500px;
  border-radius: 2rem;
  box-shadow: 0 5px 10px 0 rgba(0, 0, 0, 0.25),
    0 15px 20px 0 rgba(0, 0, 0, 0.125);
  transition: transform 0.6s;
  user-select: none;
}

.card img {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  object-fit: cover;
  pointer-events: none;
}

.card:nth-last-child(n + 5) {
  --x: calc(-50% + 90px);
  transform: translate(var(--x), -50%) scale(0.85);
  box-shadow: 0 0 1px 1px rgba(0, 0, 0, 0.01);
}

.card:nth-last-child(4) {
  --x: calc(-50% + 60px);
  transform: translate(var(--x), -50%) scale(0.9);
}

.card:nth-last-child(3) {
  --x: calc(-50% + 30px);
  transform: translate(var(--x), -50%) scale(0.95);
}

.card:nth-last-child(2) {
  --x: calc(-50%);
  transform: translate(var(--x), -50%) scale(1);
}

.card:nth-last-child(1) {
  --x: calc(-50% - 30px);
  transform: translate(var(--x), -50%) scale(1.05);
}

.card:nth-last-child(1) img {
  box-shadow: 0 1px 5px 5px rgba(255, 193, 111, 0.5);
}

.swap {
  animation: swap 1.3s ease-out forwards;
}

@keyframes swap {
  30% {
    transform: translate(calc(var(--x) - 250px), -50%) scale(0.85) rotate(-5deg)
      rotateY(65deg);
  }
  100% {
    transform: translate(calc(var(--x) - 30px), -50%) scale(0.5);
    z-index: -1;
  }
}
