@media (orientation: landscape) {

  #animal-card {
    height: 80vh;
  }
}

@media (orientation: portrait) {

  #animal-card {
    width: 90vw;
    max-height: 90vh;
  }
}

#animal-card {
  aspect-ratio: 63 / 88;
  margin: 20px auto;
  padding: 1rem;
  box-shadow:
    0 4px 8px rgb(0 0 0 / 20%),
    0 6px 20px rgb(0 0 0 / 19%);
  background: linear-gradient(
    180deg,
    rgb(220 255 190) 0%,
    rgb(170 250 120) 25%,
    rgb(130 235 89) 60%,
    rgb(95 185 60) 100%
  );
  border-radius: 20px;
  position: relative;
  overflow: hidden;
  font-size: clamp(0.9rem, 2.5vw, 0.9rem);
  line-height: 1.2rem;
}

#animal-card::before {
  content: "";
  z-index: 0;
  position: absolute;
  inset: 15px;
  border-radius: 10px;

  /* pink base */
  background-color: var(--card-color, #f56bfa);
  background-image:
    radial-gradient(circle at 30% 30%, rgb(255 255 255 / 80%), var(--card-color, #f56bfa) 70%),
    url("./assets/texture.webp"), url("./assets/texture.webp");

  background-size:
    100% 100%,
    cover;
  background-position: center, center;
  background-repeat: no-repeat, repeat;

  /* soften the texture’s impact */
  background-blend-mode: multiply, overlay, multiply;
  border-top: 1px solid #333;
  border-left: 1px solid #333;
  opacity: 0.95;
  box-shadow: inset 0 0 12px rgb(255 255 255 / 40%);
}

#animal-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: 25px;
  pointer-events: none;
  mix-blend-mode: overlay;

  background: linear-gradient(
    120deg,
    rgb(255 255 255 / 0%) 35%,
    rgb(255 255 255 / 25%) 50%,
    rgb(255 255 255 / 0%) 65%
  );
  background-size: 300% 300%;
  background-repeat: no-repeat;
  animation: shimmer-diag 6s ease-in-out infinite;
  z-index: 2;
}

@keyframes shimmer-diag {

  0% {
    background-position: 100% 100%;
  }

  45% {
    background-position: 0 0;
  }

  100% {
    background-position: -80% -80%;
  }
}

#animal-card .content {
  position: relative;
  z-index: 1;
  padding: 1rem;
}

#animal-card h1 {
  font-size: 2rem;
  font-family: Futura, Montserrat, sans-serif;
  font-weight: 550;
  text-align: left;
  margin: auto;
}

#animal-card .img-wrap {
  width: 100%;
  aspect-ratio: 3 / 2;
  margin: 1em auto;
  border: 3px solid rgb(124 227 12 / 60%);
  box-shadow: 0 2px 8px rgb(0 0 0 / 25%);
  overflow: hidden;
}

#animal-card .img-wrap img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

#animal-card ul {
  margin: 20px auto;
  width: 90%;
  margin-left: 10%;
}

#animal-card li {
  line-height: 1.8rem;
  position: relative;
  padding-left: 1.8em;
  margin: 0.5em 0;
}

#animal-card li strong {
  width: 25%;
  font-weight: 600;
  display: inline-block;
  margin-right: 1em;
}

#animal-card li::before {
  content: "";
  position: absolute;
  left: 0;
  top: 50%;
  width: 1em; /* adjust to match line height */
  height: 1em;
  background-size: contain;
  background-repeat: no-repeat;
  background-position: center;
  transform: translateY(-50%); /* vertically center */
}

#animal-card li#animal-type::before {
  background-image: url("./assets/label.png");
}

#animal-card li#animal-habitat::before {
  background-image: url("./assets/habitat.png");
}

#animal-card li#animal-diet::before {
  background-image: url("./assets/diet.png");
}

#animal-card p {
  font-weight: 600;
  font-style: italic;
  text-align: center;
}
