* {
  box-sizing: border-box;
}
/* This is put at the start of the css for a simple reset so padding/borders don't mess up your widths */
/*this is for my own memory to understand why things are the way they are in css */

:root {
  --color-bg: #faf9f6;
  --color-text: #1a1a1a;
  --color-accent: #4a7c59;
  --font-heading: Georgia, serif;
  --font-body: system-ui, sans-serif;
}
/* Color and font variables, used throughout the site */

body {
  font-family: var(--font-body);
  line-height: 1.5;
  margin: 0;
  background-color: var(--color-bg);
  color: var(--color-text);
}
/* Base page styles */

/* Heading styles */
h1 {
  font-family: var(--font-heading);
  font-size: 2.5rem;
  text-transform: uppercase;
  letter-spacing: 2px;
}

h2 {
  font-family: var(--font-heading);
  font-size: 1.5rem;
  color: var(--color-accent);
  letter-spacing: 1px;
}

/* Navigation bar using flexbox */
nav ul {
  display: flex;
  list-style: none;
  padding: 0;
  margin: 0;
  gap: 1.5rem;  /*  only works in firefox I think?*/
  flex-wrap: wrap;
}


/* Nav link styles */
nav a {
  text-decoration: none;
  color: var(--color-text);
  font-weight: bold;
  text-transform: uppercase;
  font-size: 0.9rem;
}

/* Grid layout for the three summary points */
.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 1rem;
}

img {
  width: 100%;
}

/*ensuring the screen adjusts if moved onto a phone */
@media only screen and (max-width: 600px) {
  nav ul {
    flex-direction: column;
  }
  h1 {
    font-size: 1.8rem;
  }
}