@font-face {
  font-family: "Outfit";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("/assets/fonts/Outfit-VariableFont.woff2") format("woff2");
}

:root {
  --white: hsl(0 0% 100%);
  --black: hsl(0 0% 0%);
  --blue-500: hsl(215 51% 70%);
  --blue-800: hsl(215 32% 27%);
  --blue-900: hsl(216 50% 16%);
  --blue-950: hsl(217 54% 11%);
  --cyan-400: hsl(178 100% 50%);

  --font-sans: "Outfit", sans-serif;
  --fs-base: 1rem;
  --fs-lg: 1.125rem;
  --fs-xl: 1.375rem;
  --fw-light: 300;
  --fw-regular: 400;
  --fw-semibold: 600;
  --lh-tight: 1.25;
  --lh-snug: 1.45;

  --space-100: 8px;
  --space-200: 16px;
  --space-300: 24px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

* {
  margin: 0;
  padding: 0;
  font: inherit;
}

img {
  display: block;
  max-width: 100%;
}

a {
  text-decoration: none;
  color: var(--white);

  &:hover {
    color: var(--cyan-400);
  }
}

body {
  background-color: var(--blue-950);
  color: var(--blue-500);
  font-family: var(--font-sans);
  font-size: var(--fs-lg);
  font-weight: var(--fw-light);
  line-height: var(--lh-snug);
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  padding: 12px;
}

.sr-only {
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  height: 1px;
  overflow: hidden;
  position: absolute;
  white-space: nowrap;
  width: 1px;
}

.card {
  background-color: var(--blue-900);
  max-width: 21.875rem;
  padding: var(--space-300);
  border-radius: 15px;
  display: flex;
  flex-direction: column;
  gap: var(--space-300);
}

.card__image-link {
  display: block;
  position: relative;
  border-radius: 8px;
  overflow: hidden;

  &::before,
  &::after {
    position: absolute;
    content: "";
    inset: 0;
    opacity: 0;
  }

  &::before {
    background-color: var(--cyan-400);
  }

  &:hover::before {
    opacity: 0.7;
  }

  &::after {
    background-image: url("/assets/images/icon-view.svg");
    background-repeat: no-repeat;
    background-position: center;
  }

  &:hover::after {
    opacity: 1;
  }
}

.card__image {
  object-fit: cover;
}

.card__content {
  display: flex;
  flex-direction: column;
  gap: var(--space-300);
}

.card__title {
  font-weight: var(--fw-semibold);
  font-size: var(--fs-xl);
  line-height: var(--lh-snug);
}

.card__description {
  margin-block-start: var(--space-200);
}

.card__details {
  margin-block-start: var(--space-300);
  display: flex;
  justify-content: space-between;
}

.card__detail {
  display: flex;
  gap: var(--space-100);
  align-items: center;
}

.card__price {
  color: var(--cyan-400);
  font-weight: var(--fw-semibold);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.card__time {
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}

.card__separator {
  border: none;
  border-top: 1px solid var(--blue-800);
}

.card__footer {
  display: flex;
  gap: var(--space-200);
  align-items: center;
}

.card__avatar {
  border: 1px solid var(--white);
  border-radius: 50%;
}

.card__creator-name {
  font-weight: var(--fw-regular);
  font-size: var(--fs-base);
  line-height: var(--lh-snug);
}
