/* ------------------- */
/* Custom properties   */
/* ------------------- */
:root {
  --clr-cyan-400: 178 100% 50%;
  --clr-blue-400: 215 51% 70%;
  --clr-blue-700: 215 32% 27%;
  --clr-blue-800: 216 50% 16%;
  --clr-blue-900: 217 54% 11%;
  --clr-neutral-100: 0 0% 100%;
  --clr-neutral-900: 0 0% 0%;

  --ff-sans: "Outfit", sans-serif;

  --fs-300: 0.9375rem;
  --fs-400: 1.125rem;
  --fs-600: 1.375rem;

  --fw-400: 300;
  --fw-500: 400;
  --fw-600: 600;
}

/* ------------------- */
/* Reset               */
/* ------------------- */
/* Box sizing rules */
*,
*::before,
*::after {
  box-sizing: border-box;
}

/* Remove default margin */
body,
h1,
h2,
h3,
h4,
p,
figure,
blockquote,
dl,
dd {
  margin: 0;
}

/* Remove list styles on ul, ol elements with a list role, which suggests default styling will be removed */
ul[role="list"],
ol[role="list"] {
  list-style: none;
}

/* Set core root defaults */
html:focus-within {
  scroll-behavior: smooth;
}

/* Set core body defaults */
body {
  min-height: 100vh;
  text-rendering: optimizeSpeed;
  line-height: 1.5;
  font-family: var(--ff-sans);
  font-size: var(--fs-400);
  font-weight: var(--fw-400);
  color: hsl(var(--clr-blue-400));
  background-color: hsl(var(--clr-blue-900));
}

a {
  color: hsl(var(--clr-neutral-100));
  text-decoration: none;
}

a:focus,
a:hover {
  color: hsl(var(--clr-cyan-400));
}

/* Make images easier to work with */
img,
picture {
  max-width: 100%;
  display: block;
}

/* Inherit fonts for inputs and buttons */
input,
button,
textarea,
select {
  font: inherit;
}

/* Remove all animations, transitions and smooth scroll for people that prefer not to see them */
@media (prefers-reduced-motion: reduce) {
  html:focus-within {
    scroll-behavior: auto;
  }

  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
}

h1,
h2,
h3 {
  line-height: 1.3;
}

/* ------------------- */
/* Composition         */
/* ------------------- */
.flex {
  display: flex;
  gap: var(--flex-gap, 1rem);
}

.grid {
  display: grid;
  gap: var(--grid-gap, 1rem);
}

/* ------------------- */
/* Utility             */
/* ------------------- */
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.bg-blue-800 {
  background-color: hsl(var(--clr-blue-800));
}

.text-cyan-400 {
  color: hsl(var(--clr-cyan-400));
}

.fs-300 {
  font-size: var(--fs-300);
}
.fs-600 {
  font-size: var(--fs-600);
}

.fw-500 {
  font-weight: var(--fw-500);
}
.fw-600 {
  font-weight: var(--fw-600);
}

.mt-12 {
  margin-top: 0.75rem;
}
.mt-16 {
  margin-top: 1rem;
}
.mt-24 {
  margin-top: 1.5rem;
}

@media (min-width: 35em) {
  .md-mt-16 {
    margin-top: 1rem;
  }
  .md-mt-24 {
    margin-top: 1.5rem;
  }
}

.text-center {
  text-align: center;
}

/* ------------------- */
/* Block               */
/* ------------------- */
.container {
  place-items: center;
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  min-height: 100vh;
  min-width: fit-content;
  padding: 1rem 1.5rem;
}

.container > main {
  grid-area: main;
}

.container > footer {
  grid-area: footer;
  align-self: end;
}

.card {
  width: min(100%, 20rem);
  padding: 1.5rem;
  border-radius: 15px;
  margin-inline: auto;
  box-shadow: 0px 25px 50px 0px hsl(var(--clr-neutral-900) / 0.1);
}

@media (min-width: 35em) {
  .card {
    width: 22rem;
  }
}

.card > button {
  cursor: pointer;
  border: 0;
  border-radius: 8px;
  overflow: hidden;
  aspect-ratio: 1;
  width: 100%;
  background-image: url(/assets/image-equilibrium.jpg);
  background-size: cover;
  position: relative;
}

.card > button::after {
  content: "";
  position: absolute;
  inset: 0;
  background-color: hsl(var(--clr-cyan-400) / 0.5);
  background-image: url(/assets/icon-view.svg);
  background-repeat: no-repeat;
  background-position: center;
  opacity: 0;
}

.card > button:hover::after,
.card > button:focus::after {
  opacity: 1;
}

.card > .card-details {
  justify-content: space-between;
}

.card > .card-details > div {
  --flex-gap: 0.375rem;
  align-items: center;
}

.card > .card-line {
  border-bottom: 1px solid hsl(var(--clr-blue-700));
}

.card > .card-creator {
  align-items: center;
}

.card > .card-creator img {
  max-width: 2rem;
  border: 1px solid hsl(var(--clr-neutral-100));
  border-radius: 50%;
  box-sizing: content-box;
}
