/* ------------------- */
/* Fonts               */
/* ------------------- */
@font-face {
  font-family: "Figtree VF";
  src: url("/assets/fonts/Figtree-VariableFont_wght.ttf");
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/static/Figtree-SemiBold.ttf");
  font-weight: 500;
  font-style: normal;
}
@font-face {
  font-family: "Figtree";
  src: url("/assets/fonts/static/Figtree-ExtraBold.ttf");
  font-weight: 800;
  font-style: normal;
}

/* ------------------- */
/* Debug               */
/* ------------------- */
/* * {
  outline: 1px solid red;
  background-color: rgba(255, 0, 0, 10%);
} */

/* ------------------- */
/* Custom properties   */
/* ------------------- */
:root {
  --clr-yellow-400: hsl(47 88% 63%);
  --clr-gray-500: hsl(0 0% 42%);
  --clr-gray-950: hsl(0 0% 7%);
  --clr-white: hsl(0 0% 100%);
  --clr-black: hsl(0 0% 0%);

  --ff-vf-serif: "Figtree VF", serif;
  --ff-serif: "Figtree", serif;

  --fs-300: 0.75rem;
  --fs-400: 0.875rem;
  --fs-600: 1.25rem;

  --lh-300: 1.5;
  --lh-400: 1.5;
  --lh-600: 1.5;

  --fw-500: 500;
  --fw-800: 800;
}

@media (min-width: 30rem) {
  :root {
    --fs-300: 0.875rem;
    --fs-400: 1rem;
    --fs-600: 1.5rem;
  }
}

/* ------------------- */
/* Reset               */
/* ------------------- */

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

/* Prevent font size inflation */
html {
  -moz-text-size-adjust: none;
  -webkit-text-size-adjust: none;
  text-size-adjust: none;
}

/* Remove default margin in favour of better control in authored CSS */
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 body defaults */
body {
  min-height: 100vh;
  line-height: 1.5;
  margin: 0;
  line-height: var(--lh-400);
  font-family: var(--ff-serif);
  font-optical-sizing: auto;
  font-size: var(--fs-400);
  font-weight: var(--fw-500);
  color: var(--clr-gray-500);
  background-color: var(--clr-yellow-400);
}

@supports (font-variation-settings: normal) {
  body {
    font-family: var(--ff-vf-serif);
  }
}

/* Balance text wrapping on headings */
h1,
h2,
h3,
h4 {
  text-wrap: balance;
}

/* A elements that don't have a class get default styles */
a:not([class]) {
  text-decoration-skip-ink: auto;
}

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

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

/* Make sure textareas without a rows attribute are not tiny */
textarea:not([rows]) {
  min-height: 10em;
}

/* Anything that has been anchored to should have extra scroll margin */
:target {
  scroll-margin-block: 5ex;
}

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

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

.space-y-12 > * + * {
  margin-top: 0.75rem;
}
.space-y-24 > * + * {
  margin-top: 1.5rem;
}

/* ------------------- */
/* 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-yellow-400 {
  background-color: var(--clr-yellow-400);
}
.bg-white {
  background-color: var(--clr-white);
}

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

.fs-300 {
  font-size: var(--fs-300);
  line-height: var(--lh-300);
}
.fs-400 {
  font-size: var(--fs-400);
  line-height: var(--lh-400);
}
.fs-600 {
  font-size: var(--fs-600);
  line-height: var(--lh-600);
}
.fw-500 {
  font-weight: var(--fw-500);
}
.fw-800 {
  font-weight: var(--fw-800);
}

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

/* ------------------- */
/* Block               */
/* ------------------- */
.layout {
  grid-template-rows: 1fr auto 1fr;
  grid-template-areas:
    "header"
    "main"
    "footer";
  padding: 1.5rem;
}

main {
  grid-area: main;
  display: grid;
  place-items: center;
}

footer {
  grid-area: footer;
  align-self: end;
}

.card {
  background-color: var(--clr-white);
  padding: 1.5rem;
  border: 1px solid var(--clr-gray-950);
  border-radius: 20px;
  box-shadow: 8px 8px 0 0 var(--clr-black);
  max-width: 20.4375rem;
  position: relative;
}

@media (min-width: 30em) {
  .card {
    max-width: 24rem;
  }
}

.card-illustration {
  border-radius: 10px;
}

.card-badge {
  border-radius: 4px;
  background-color: var(--clr-yellow-400);
  color: var(--clr-gray-950);
  display: inline-block;
  font-size: var(--fs-300);
  font-weight: var(--fw-800);
  padding: 0.25rem 0.75rem;
}

.card-link {
  text-decoration: none;
  color: currentColor;
}

.card-link:hover,
.card-link:focus {
  color: var(--clr-yellow-400);
}

.card-link::before {
  content: "";
  position: absolute;
  inset: 0;
}

.card-author {
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.card-author-image {
  max-width: 32px;
  aspect-ratio: 1;
}

.card-author-name {
  font-size: 0.875rem;
  font-weight: var(--fw-800);
  color: var(--clr-gray-950);
}
