@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;700&family=Lexend+Deca&display=swap');

/* Global Settings =================================== */
:root {
  --bg-dark-blue: #090b1a;
  --dark-blue: #1b1938;
  --violet: #aa5cdb;
  --purple: #530d7e;
  --white: #ffffff;
  --dark-gray: #ffffff99;
}

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

html {
  font-size: 93.75%;
}

body {
  width: 100%;
  height: 100%;
  background-color: var(--bg-dark-blue);
  font-family: 'Inter', sans-serif;
}

main {
  width: 100%;
  min-height: 100vh;
  height: 100%;

  display: flex;
  justify-content: center;
  align-items: center;
}

/* Card =================================== */
#card {
  background-color: var(--dark-blue);
  border-radius: 10px;
}

/* Image =================================== */
.image-header {
  position: relative;
}

.image-header::before {
  content: "";
  display: block;
  width: 100%;
  height: 100%;
  position: absolute;
  opacity: .6;
  background-color: var(--purple);
}

/* Content =================================== */
.content-container {
  width: 100%;
}
.content > h1 {
  color: var(--white);
}

.content > h1 > span {
  color: var(--violet);
}

.content > p {
  color: var(--dark-gray);
  line-height: 1.5rem;
}

.content > .stats-container {
  width: 100%;
  font-family: 'Inter', sans-serif;
  color: var(--light-gray);
}

.stats > .stats-number {
  color: var(--white);
  font-weight: 700;
}

.stats > .stats-name {
  color: var(--dark-gray);
  text-transform: uppercase;
  letter-spacing: 1.5px;
}

/* Attribution =================================== */
.attribution {
  background-color: var(--white);
  padding: 1rem 0;
  font-size: 1.2rem;
  font-family: 'Lexend Deca', sans-serif;
  line-height: 2rem;

  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: .5rem;
}

.attribution a {
  color: var(--purple);
  text-decoration: none;

  position: relative;
}

.attribution a::before {
  content: "";
  display: block;
  width: 100%;
  height: 2px;
  background-color: var(--purple);
  transform: scaleX(0);

  position: absolute;
  bottom: -3px;
  left: 0;

  transition: transform .4s;
}

.attribution a:hover::before {
  transform: scaleX(1);
}

.attribution i {
  font-size: 1.5rem;
}

/* Desktop Screen =================================== */
@media (min-width: 651px) {
  main {
    height: 100vh;
  }
  #card {
    width: min(100vw, 1000px);
    height: 460px;
    margin: 0 2rem;
    display: flex;
  }
  .image-header {
    order: 1;
    width: 100%;
    height: 100%;
    border-radius: 0 10px 10px 0;

    background: url("../images/image-header-desktop.jpg") right center no-repeat;
    background-size: cover;
  }
  .image-header::before {
    border-radius: 0 10px 10px 0;
  }
  .content-container {
    width: 100%;
    display: flex;
    align-items: center;
  }
  .content {
    width: 90%;
    height: 80%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    padding: 1.5rem;
    margin-left: 1rem;
  }
  .content > h1 {
    font-size: min(4.5vw, 2.5rem);
    padding: 1.5rem 0 2.5rem 0;
  }
  .content > p {
    font-size: 1.1rem;
    margin-bottom: 5rem;
  }
  .stats-container {
    display: flex;
    justify-content: space-between;
  }
  .stats {
    margin: 0 1rem 1rem 1rem;
  }
  .stats > .stats-number {
    font-size: min(3.5vw, 1.8rem);
    margin-bottom: .5rem;
  }
  .stats > .stats-name {
    font-size: min(1.5vw, 1rem);
  }
}

/* Mobile Screen =================================== */
@media (max-width: 650px) {
  #card {
    width: 85%;
    margin: 3rem 0;
  }
  .image-header {
    width: 100%;
    height: 250px;
    margin-bottom: 2rem;
    border-radius: 10px 10px 0 0;

    background: url("../images/image-header-mobile.jpg") top center no-repeat;
    background-size: cover;
  }
  .image-header::before {
    border-radius: 10px 10px 0 0;
  }
  .content {
    width: 80%;
    margin: 0 auto;
  }
  .content > h1 {
    font-size: 1.8rem;
    text-align: center;
    margin-bottom: 1rem;
  }
  .content > p {
    font-size: 1rem;
    text-align: center;
    margin-bottom: 1.5rem;
  }
  .stats {
    text-align: center;
    margin-bottom: 2rem;
  }
  .stats > .stats-number {
    font-size: 1.5rem;
    font-weight: 700;
    margin-bottom: .5rem;
  }
  .stats > .stats-name {
    font-size: .8rem;
  }
}