:root {
  --primary-color: #f48847;
  --primary-color-hover: #d5763d;
  --primary-color-contrast: #fff;
  --flex-gap: 4rem;
}

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

body {
  font-family: "Libre Caslon Text", serif;
  line-height: 1.5rem;
  margin: 0;
  padding: 0;
}

a {
  text-decoration: none;
}

img {
  border: none;
}

header {
  background: url("dan-burton-mCD0221L65U-unsplash.jpg");
  background-size: cover;
  background-position: 100% 37.0033%;
  color: #fff;
  display: flex;
  flex-direction: column;
  min-height: 66vh;
  padding: 2rem 3rem 4rem 3rem;
  position: relative;
}

header:after {
  background: linear-gradient(rgba(0, 0, 0, 0.4), 150px, rgba(0, 0, 0, 0.34));
  content: "";
  display: block;
  position: absolute;
  left: 0;
  bottom: 0;
  top: 0;
  right: 0;
  z-index: 1;
}

header h1,
header p {
  position: relative;
  z-index: 2;
}

header h1 {
  flex: auto;
  margin: 0;
}

header p {
  margin: 0;
}

header .tagline {
  font-size: 2rem;
  font-weight: bold;
  line-height: 2.5rem;
  margin: 1rem 0;
}

header .subtag {
  font-size: 1.5rem;
  line-height: 2rem;
}

header .logo {
  display: block;
  margin: auto;
  max-width: 240px;
}

section,
footer .content {
  margin: 4rem auto;
  max-width: 1600px;
  padding: 1rem 2rem;
  text-align: center;
}

section h2,
footer h2 {
  font-size: 2rem;
  line-height: 2.5rem;
  margin: 2rem 0 4rem;
}

section ul {
  display: flex;
  flex-wrap: wrap;
  list-style: none;
  gap: var(--flex-gap);
  margin: 0;
  padding: 0;
}

.stand-out {
  --per-row: 4;
}

.stand-out li {
  flex: calc(
    (100% / var(--per-row))
    - ((var(--per-row) - 1) / var(--per-row)) * var(--flex-gap)
  ) 1 1;
  min-width: 240px;
}

.delicious h2 {
  color: var(--primary-color);
}

.delicious p,
footer p {
  max-width: 800px;
  margin: auto;
}

.services {
  --per-row: 3;
}

.services li {
  flex: calc(
    (100% / var(--per-row))
    - ((var(--per-row) - 1) / var(--per-row)) * var(--flex-gap)
  ) 1 1;
  min-width: 240px;
}

footer {
  background: var(--primary-color);
  color: var(--primary-color-contrast);
  padding: 1rem 0;
}

footer a {
  color: var(--primary-color-contrast);
}

footer .content {
  display: flex;
  flex-wrap: wrap;
  gap: var(--flex-gap);
}

footer a:focus,
footer a:hover {
  text-decoration: underline;
}

footer h2,
footer p {
  flex: 100%;
}

footer p {
  font-size: 1.25rem;
  line-height: 2rem;
  margin-bottom: 6rem;
}

footer .email {
  flex: auto;
  font-size: 1.125rem;
  line-height: 1rem;
  margin-bottom: 2rem;
}

footer .elsewhere {
  flex: 100%;
  font-size: 1.25rem;
  line-height: 2rem;
  margin: 0;
}

/**
* Generic elements
*/

.cta a {
  background: var(--primary-color);
  color: var(--primary-color-contrast);
  display: inline-block;
  font-weight: bold;
  padding: 1.5rem 2.5rem;
  margin-top: 2rem;
}

.cta a:focus,
.cta a:hover {
  background: var(--primary-color-hover);
}

/**
* Media queries
*/
@media screen and (min-width: 640px) {
  header .tagline {
    font-size: 3rem;
    line-height: 4rem;
  }

  header .subtag {
    font-size: 1.5rem;
    line-height: 3rem;
  }

  section {
    margin: 8rem auto;
  }

  section,
  footer .content {
    padding: 1rem 4rem;
  }

  section h2,
  footer h2 {
    font-size: 3rem;
    line-height: 3rem;
  }

  footer p {
    font-size: 1.5rem;
    line-height: 2rem;
  }

  footer .email {
    font-size: 2rem;
    line-height: 2rem;
    text-align: left;
  }

  footer .elsewhere {
    flex: 320px 0 1;
    font-size: 2rem;
    line-height: 2.5rem;
    text-align: left;
  }
}

@media screen and (min-width: 760px) {
  footer .email {
    font-size: 3rem;
    line-height: 3rem;
  }
}
