/* Palette and type scale taken from style-guide.md, kept in one place so the
   theme can be changed without hunting through the rules below. */
:root {
  --clr-white: hsl(0, 0%, 100%);
  --clr-slate-300: hsl(212, 45%, 89%);
  --clr-slate-500: hsl(216, 15%, 48%);
  --clr-slate-900: hsl(218, 44%, 22%);
  --clr-link: hsl(228, 45%, 44%);

  --font-body: "Outfit", system-ui, -apple-system, "Segoe UI", sans-serif;
  --fs-title: 1.375rem;   /* 22px */
  --fs-text: 0.9375rem;   /* 15px */

  --radius-card: 20px;
  --radius-image: 10px;
  --space-card: 1rem;
}

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

body {
  margin: 0;
  /* Padding rather than a margin on the card: a fixed 100px margin pushed the
     card off-screen on a 375px phone. */
  padding: 1.5rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 2rem;

  background-color: var(--clr-slate-300);
  font-family: var(--font-body);
  font-size: var(--fs-text);
}

.card {
  /* Fluid up to the design width, so it fills a narrow screen and stops
     growing on a desktop. */
  width: 100%;
  max-width: 320px;
  padding: var(--space-card);

  background-color: var(--clr-white);
  border-radius: var(--radius-card);
  box-shadow: 0 25px 25px hsl(216 15% 48% / 0.15);
}

.card__image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--radius-image);
}

.card__body {
  padding: 1.5rem 1rem 0.75rem;
  text-align: center;
}

.card__title {
  margin: 0 0 1rem;
  color: var(--clr-slate-900);
  font-size: var(--fs-title);
  font-weight: 700;
  line-height: 1.3;
}

.card__text {
  margin: 0;
  color: var(--clr-slate-500);
  font-weight: 400;
  line-height: 1.4;
}

.attribution {
  font-size: 0.6875rem;
  text-align: center;
  color: var(--clr-slate-500);
}

.attribution a {
  color: var(--clr-link);
}

/* Keyboard users get the same affordance mouse users do. */
.attribution a:hover {
  text-decoration: none;
}

.attribution a:focus-visible {
  outline: 2px solid var(--clr-slate-900);
  outline-offset: 2px;
  border-radius: 2px;
}
