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

body {
  margin: 0;
  background-color: #F4EFE9;
  color: #263238;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.65;
}

.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: clamp(1rem, 3vw, 2rem) clamp(1rem, 5vw, 3rem);
  background-color: #F4EFE9;
}

.site-name {
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.25rem, 2vw, 1.75rem);
  font-weight: 700;
  color: #263238;
  text-decoration: none;
}

.site-brand {
  display: inline-flex;
  align-items: center;
  gap: 0.6rem;
}

.site-logo {
  display: block;
  width: clamp(2.375rem, 4vw, 3rem);
  height: clamp(2.375rem, 4vw, 3rem);
  flex: 0 0 auto;
  border-radius: 50%;
  object-fit: contain;
}

.site-navigation ul {
  display: flex;
  flex-wrap: wrap;
  gap: clamp(0.8rem, 2vw, 1.4rem);
  list-style: none;
  margin: 0;
  padding: 0;
}

.site-navigation a {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background-color: #263238;
  color: #FFF8F0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(0.9rem, 1.5vw, 1rem);
  font-weight: 600;
  text-decoration: none;
}

.site-navigation a[aria-current="location"] {
  background-color: #B85C32;
}

.site-navigation a:hover,
.site-navigation a:focus {
  background-color: #D1733F;
  color: #FFF8F0;
  outline: 2px solid #FFF8F0;
  outline-offset: 2px;
}

.page-masthead {
  display: grid;
  place-content: center;
  min-height: clamp(10rem, 16vw, 14rem);
  padding: clamp(2rem, 4vw, 3rem) clamp(1rem, 4vw, 3rem);
  background-color: #263238;
  border-bottom: 0.35rem solid #B85C32;
  text-align: center;
}

.page-masthead h1 {
  margin: 0 0 0.35rem;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(2rem, 4vw, 3rem);
  line-height: 1.1;
  color: #FFF8F0;
}

.page-masthead p {
  margin: 0;
  color: #FFF8F0;
  font-size: clamp(1.05rem, 0.55vw + 0.95rem, 1.22rem);
}

.purchase-main {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 3rem);
}

.purchase-panel {
  display: grid;
  grid-template-columns: minmax(12rem, 15rem) minmax(0, 1fr);
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
  padding: clamp(1rem, 3vw, 2rem);
  border-radius: 8px;
  background-color: #8b9270;
}

.purchase-cover {
  width: 100%;
  max-width: 15rem;
  justify-self: center;
}

.purchase-cover img {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 2 / 3;
  object-fit: contain;
}

.purchase-content h2 {
  margin: 0 0 0.35rem;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-size: clamp(1.65rem, 1.5vw + 1.15rem, 2.35rem);
  line-height: 1.15;
}

.purchase-status {
  margin: 0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-weight: 700;
}

.purchase-instruction {
  margin: 0.75rem 0 0;
}

.retailer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 1rem 0;
}

.retailer-button {
  display: inline-block;
  padding: 0.5rem 1rem;
  border-radius: 999px;
  background-color: #263238;
  color: #FFF8F0;
  font-family: "Trebuchet MS", "Segoe UI", Arial, sans-serif;
  font-weight: 600;
  text-decoration: none;
}

.retailer-button:hover,
.retailer-button:focus {
  background-color: #D1733F;
  color: #FFF8F0;
  outline: 2px solid #FFF8F0;
  outline-offset: 2px;
}

.back-to-books {
  color: #263238;
}

.site-footer {
  max-width: 72rem;
  margin: 0 auto;
  padding: clamp(1.5rem, 4vw, 3rem) clamp(1rem, 5vw, 3rem);
  border-top: 1px solid #ccc;
  color: #333;
  text-align: center;
}

.footer-newsletter-link {
  color: inherit;
  text-decoration: underline;
  text-underline-offset: 0.18em;
}

.footer-newsletter-link:hover,
.footer-newsletter-link:focus-visible {
  color: #B85C32;
}

.footer-newsletter-link:focus-visible {
  outline: 2px solid #B85C32;
  outline-offset: 3px;
}

@media (max-width: 42rem) {
  .site-header {
    align-items: flex-start;
  }

  .site-navigation ul {
    justify-content: flex-start;
  }

  .purchase-panel {
    grid-template-columns: 1fr;
  }

  .purchase-cover {
    max-width: 12rem;
  }

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

  .retailer-links {
    justify-content: center;
  }
}
