/* Universal Selector to remove default browser settings */
* {
  padding: 0rem;
  margin: 0rem;
  box-sizing: border-box;
}

@font-face {
  font-family: "Main";
  src: url("./assets/fonts/Outfit-VariableFont_wght.ttf");
  font-weight: 300 600;
}

/* CSS Variables */
:root {
  /* Primary */
  --Softblue: hsl(215, 51%, 70%);
  --Cyan: hsl(178, 100%, 50%);

  /* Neutral */

  --mainBG: hsl(217, 54%, 11%);
  --cardBG: hsl(216, 50%, 16%);
  --line: hsl(215, 32%, 27%);
  --White: hsl(0, 0%, 100%);
}

html {
  font-size: 18px;
}

body {
  font-family: "Main";
  font-weight: 300;
}

main {
  display: flex;
  justify-content: center;
  align-items: center;
  height: 100vh;
  background-color: var(--mainBG);
}

section {
  display: flex;
  flex-direction: column;
  background-color: var(--cardBG);
  gap: 20px;
  width: 350px;
  height: 596px;
  padding: 25px;
  border-radius: 20px;
}

.active,
.active > img {
  width: 300px;
  height: 300px;
  border-radius: 10px;
}

.active {
  border-radius: 11px;
  position: relative;
}

.active > img:nth-child(2) {
  width: 50px;
  height: 50px;
  position: absolute;
  left: 125px;
  top: 125px;
  display: none;
}

.content > h1 {
  color: var(--White);
  font-size: 22px;
  font-weight: 600;
}

:where(.content > p, .purchase > h2:nth-child(2), h3) {
  color: var(--Softblue);
}

.content > p {
  line-height: 140%;
}

h2:first-child {
  color: var(--Cyan);
  font-weight: 400;
  letter-spacing: 0.2px;
}

:where(.content > p, .purchase, hr, .creator, .content > h1) {
  padding-bottom: 20px;
}

.purchase {
  display: flex;
  justify-content: space-between;
}

h2 {
  display: flex;
  align-items: center;
  font-size: 18px;
}

:where(h2:nth-child(2), h3) {
  font-weight: 300;
}

h2 > img {
  padding-right: 10px;
}

hr {
  border: 0;
  border-top: 1px solid var(--line);
}

.creator {
  display: flex;
  align-items: center;
  font-size: 14px;
}

.creator > img {
  width: 30px;
  height: 30px;
  border: 1px solid var(--White);
  border-radius: 50px;
  margin-right: 15px;
}

.creator > h3 > span {
  color: var(--White);
}

@media (hover: hover) {
  .creator > h3 > span:hover,
  h1:hover,
  .active {
    cursor: pointer;
  }
}

.creator > h3 > span:active,
h1:active {
  color: var(--Cyan);
}

.active:active {
  background-color: var(--Cyan);
}

.active:active > img {
  opacity: 0.5;
}

.active:active > img:nth-child(2) {
  display: block;
  opacity: 1;
}

/* Extra small devices (phones, 600px and down) */
@media only screen and (max-width: 600px) {
  html {
    font-size: 16px;
  }

  section {
    width: 327px;
    height: 544px;
  }

  .active,
  .active > img {
    width: 280px;
    height: 280px;
  }

  .active > img:nth-child(2) {
    left: 115px;
    top: 115px;
  }

  h2 {
    font-size: 16px;
  }

  :where(.content > p, .purchase, hr, .creator, .content > h1) {
    padding-bottom: 16px;
  }
}
