:root {
  color-scheme: light;
  font-family: "Gill Sans", "Gill Sans MT", Calibri, "Trebuchet MS", sans-serif;
  line-height: 1.5;
}

* {
  box-sizing: border-box;
}

body {
  min-width: 320px;
  max-width: 1240px;
  min-height: 100vh;
  margin: 0 auto;
  padding: 1rem;
  color: #241510;
  background: #e9967a;
}

a {
  color: #4a1608;
  font-weight: 600;
}

a:focus-visible,
button:focus-visible,
input:focus-visible,
textarea:focus-visible {
  outline: 3px solid #174a8b;
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  top: -4rem;
  left: 1rem;
  z-index: 1;
  padding: 0.5rem 0.75rem;
  color: #fff;
  background: #241510;
}

.skip-link:focus {
  top: 1rem;
}

.site-header {
  display: grid;
  grid-template-columns: minmax(5rem, 1fr) minmax(0, 2fr) minmax(5rem, 1fr);
  gap: clamp(0.75rem, 3vw, 2rem);
  align-items: center;
  max-width: 900px;
  margin: 0 auto 1.5rem;
  text-align: center;
}

.site-header > img,
.site-header > a > img {
  display: block;
  width: 100%;
  max-width: 220px;
  height: auto;
  margin: auto;
}

.site-header h1 {
  margin: 0;
  font-size: clamp(1.75rem, 5vw, 3rem);
  line-height: 1.1;
  color: #000;
  text-shadow: 2px 2px 4px #00000072;
}

.site-header p {
  margin: 0.75rem 0 0;
  overflow-wrap: anywhere;
}

main {
  width: 100%;
}

.img-container {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 18rem), 1fr));
  gap: clamp(1rem, 3vw, 1.75rem);
  padding: clamp(0.25rem, 4vw, 2rem) 0;
}

.img-container > img {
  display: block;
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border: 2px solid #241510;
  border-radius: 0.625rem;
}

.form-page {
  max-width: 48rem;
  margin: 0 auto;
}

.form-page .site-header {
  grid-template-columns: minmax(5rem, 1fr) minmax(0, 2fr) minmax(5rem, 1fr);
}

form {
  display: grid;
  gap: 1rem;
}

label {
  display: block;
  margin-bottom: 0.35rem;
  font-weight: 700;
}

input,
textarea,
button {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.6rem 0.75rem;
  border: 2px solid #542316;
  border-radius: 0.35rem;
  font: inherit;
}

textarea {
  min-height: 8rem;
  resize: vertical;
}

button {
  color: #fff;
  background: #542316;
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: #32150d;
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  align-items: center;
}

.form-actions button {
  width: auto;
}

.error {
  margin: 0;
  color: #8b0000;
  font-weight: 700;
}

@media (max-width: 560px) {
  body {
    padding: 0.75rem;
  }

  .site-header,
  .form-page .site-header {
    grid-template-columns: 1fr 1fr;
  }

  .site-header > div {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  .site-header > img,
  .site-header > a > img {
    max-width: 8rem;
  }

  .site-header > img:first-child {
    grid-column: 1;
    grid-row: 2;
  }

  .site-header > a {
    grid-column: 2;
    grid-row: 2;
  }

  .form-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .form-actions button {
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    transition-duration: 0.01ms !important;
  }
}
