* {
  box-sizing: border-box;
}

body {
  display: grid;
  grid-template-rows: auto minmax(0, 1fr) auto;
  min-height: 100vh;
  min-height: 100svh;
  margin: 0;
  font-family: Arial, Helvetica, sans-serif;
  background-color: #65113f;
  color: #ffffff;
}

.body {
  display: flex;
  justify-content: center;
  align-items: center;
  min-height: 0;
  padding: 16px;
}

.container {
  text-align: center;
  width: min(100%, 520px);
  border: 1px solid #eadcf0;
  padding: clamp(20px, 4vh, 32px);
  background-color: #65113f;
  border-radius: 12px;
}

h1 {
  font-size: clamp(1.75rem, 6vw, 3rem);
  margin: 0 0 12px;
}

p {
  line-height: 1.5;
}

.container p {
  margin: 0 0 20px;
}

.home-link {
  display: inline-block;
  padding: 10px 18px;
  border: 2px solid #ffffff;
  border-radius: 6px;
  color: #ffffff;
  background-color: #65113f;
  font-weight: bold;
  text-decoration: none;
}

.home-link:hover,
.home-link:focus-visible {
  color: black;
  background-color: #efb1b8;
}

.home-link:focus-visible {
  outline: 3px solid #eadcf0;
  outline-offset: 4px;
}

.wordmark-logo {
  display: block;
  width: auto;
  height: 200px;
  padding: 2.5em;
  max-width: 260px;
  object-fit: contain;
}

.wordmark {
  display: inline-flex;
  align-items: center;
  color: var(--ink);
  text-decoration: none;
}

.site-header {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  width: min(100% - 32px, 1280px);
  height: 84px;
  margin: 0 auto;
}

.footer-logo {
  display: block;
  width: auto;
  height: 100px;
  max-width: 180px;
  object-fit: contain;
}

.site-footer {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto auto;
  grid-template-areas: "brand summary links age";
  align-items: center;
  gap: 12px 20px;
  width: min(100% - 32px, 1280px);
  margin: 0 auto;
  padding: 12px 0;
}

.footer-brand {
  grid-area: brand;
}

.site-footer > p {
  grid-area: summary;
  min-width: 0;
  margin: 0;
}

.footer-age {
  grid-area: age;
  justify-self: end;
}

.footer-links {
  display: flex;
  grid-area: links;
  justify-content: center;
  flex-wrap: wrap;
  gap: 8px 16px;
}

.site-footer a {
  color: #ffffff;
}

.site-footer a:focus-visible {
  outline: 2px solid #eadcf0;
  outline-offset: 3px;
}

@media (max-width: 640px) {
  .site-header {
    height: 68px;
  }

  .wordmark-logo {
    height: 60px;
  }

  .site-footer {
    grid-template-columns: auto 1fr auto;
    grid-template-areas:
      "brand summary age"
      "links links links";
    gap: 8px 12px;
    padding: 8px 0 12px;
    font-size: 0.875rem;
  }

  .footer-logo {
    height: 40px;
    max-width: 130px;
  }

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

@media (max-height: 500px) {
  .site-header {
    height: 56px;
  }

  .wordmark-logo {
    height: 50px;
  }

  .container {
    padding: 16px;
  }

  h1 {
    font-size: clamp(1.5rem, 6vh, 2.5rem);
    margin-bottom: 8px;
  }

  .container p {
    margin-bottom: 12px;
  }

  .footer-logo {
    height: 36px;
  }

  .site-footer {
    padding: 6px 0;
  }
}
