/* 1. FONT REGISTRATION */
/* Assuming your files are named exactly like this in a /fonts folder */
@font-face {
  font-family: 'Figtree';
  src: url('./assets/fonts/static/Figtree-Medium.ttf') format('ttf');
  font-weight: 500;
  font-style: normal;
}

@font-face {
  font-family: 'Figtree';
  src: url('./fonts/Figtree-ExtraBold.ttf') format('ttf');
  font-weight: 800;
  font-style: normal;
}

/* 2. DESIGN SYSTEM VARIABLES */
:root {
  /* Colors */
  --clr-yellow: #f4d04e;
  --clr-gray-950: #111111;
  --clr-gray-500: #6b6b6b;
  --clr-white: #ffffff;

  /* Spacing Scale */
  --space-300: 24px;
  --space-150: 12px;
  --space-100: 8px;
  --space-50: 4px;

  /* Typography Core */
  --ff-primary: 'Figtree', sans-serif;
  --lh-base: 150%;
  --ls-base: 0px;
  --fw-medium: 500;
  --fw-extra-bold: 800;
}

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

/* 3. TEXT PRESETS */
.text-preset-1 {
  font-family: var(--ff-primary);
  font-size: 24px;
  line-height: var(--lh-base);
  font-weight: var(--fw-extra-bold);
  letter-spacing: var(--ls-base);

  @media screen and (max-width: 768px) {
    font-size: 20px;
  }
}

.text-preset-2 {
  font-family: var(--ff-primary);
  font-size: 16px;
  line-height: var(--lh-base);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-base);

  @media screen and (max-width: 768px) {
    font-size: 14px;
  }
}

.text-preset-3 {
  font-family: var(--ff-primary);
  font-size: 14px;
  line-height: var(--lh-base);
  font-weight: var(--fw-medium);
  letter-spacing: var(--ls-base);

  @media screen and (max-width: 768px) {
    font-size: 12px;
  }
}

.text-preset-3-bold {
  font-family: var(--ff-primary);
  font-size: 14px;
  line-height: var(--lh-base);
  font-weight: var(--fw-extra-bold);
  letter-spacing: var(--ls-base);

  @media screen and (max-width: 768px) {
    font-size: 12px;
  }
}

html {
  height: 100%;
}

body {
  font-family: var(--ff-primary);
  background-color: var(--clr-yellow);
  display: flex;
  align-items: center;
  justify-content: center;
  height: 100%;
}

.card {
  background: var(--clr-white);
  width: 327px;
  height: 501px;
  border-radius: 20px;
  padding: var(--space-300);
  border: 1px solid var(--clr-gray-950);
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  box-shadow: 10px 10px 0 0 var(--clr-gray-950);
  transform: translateY(100px);
  opacity: 0;
  animation: appear 1.5s ease-in-out forwards;
  will-change: transform, opacity;
  & .card-image {
    width: 100%;
    height: auto;
    object-fit: contain;
    border-radius: 10px;
  }

  & .card-content {
    margin-block: var(--space-300);
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: var(--space-150);

    & .tag {
      background: var(--clr-yellow);
      color: var(--clr-gray-950);
      padding: var(--space-50) var(--space-150);
      border-radius: var(--space-50);
    }

    & .card-text {
      color: var(--clr-gray-500);
    }
  }

  & .author {
    display: flex;
    gap: var(--space-150);
    align-items: center;
    & .author-img {
      width: 32px;
    }
  }
}

@media screen and (min-width: 768px) {
  .card {
    width: 384px;
    height: 522px;
  }
}

@keyframes appear {
  0% {
    opacity: 0;
    transform: translateY(50px);
  }
  70% {
    opacity: 1;
    transform: translateY(-10px);
  }
  100% {
    opacity: 1;
    transform: translateY(00px);
  }
}
