/* Red-Handed Lions: colours come from the crest image itself.
   --yellow is the image's background, --blue is the blue at the foot of the shield. */
:root {
  --yellow: #FFFFC1;
  --blue: #0000E6;
  --red: #E90101;          /* the hand and lions; used only for decoration and focus rings */
  --column: 44rem;         /* header, content and footer share one column so their edges line up */
  color-scheme: light;
}

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

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  background: var(--yellow);
  color: var(--blue);
  font-family: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  font-size: 1.125rem;
  line-height: 1.65;
}

a {
  color: var(--blue);
  text-underline-offset: 0.2em;
}
a:hover { text-decoration-thickness: 0.15em; }
a:focus-visible, .button:focus-visible {
  outline: 3px solid var(--red);
  outline-offset: 3px;
}

.skip-link {
  position: absolute;
  left: 0.5rem;
  top: -4rem;
  padding: 0.5rem 0.9rem;
  background: var(--blue);
  color: var(--yellow);
  z-index: 10;
}
.skip-link:focus { top: 0.5rem; }

/* ---------- header ---------- */
.site-header {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 0.5rem 1.5rem;
  max-width: var(--column);
  margin: 0 auto;
  padding: 1.25rem 1.25rem 0.9rem;
  border-bottom: 3px solid var(--red);
}
.brand {
  font-size: 1.35rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.brand:hover { text-decoration: underline; }
.site-nav { display: flex; gap: 1.5rem; }
.site-nav a { text-decoration: none; padding: 0.15rem 0; }
.site-nav a:hover, .site-nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 0.15em; }

/* ---------- content ---------- */
main {
  max-width: var(--column);
  margin: 0 auto;
  padding: 2rem 1.25rem 3rem;
}
h1 {
  margin: 0 0 1rem;
  font-size: 2rem;
  line-height: 1.2;
}
.lede { margin: 0 0 1.75rem; }
.home h1, .home .lede { text-align: center; }

/* keep long lines of text readable inside the wider column */
main p { max-width: 38rem; }

.crest { margin: 0; text-align: center; }
.crest img {
  display: block;
  width: min(100%, 27.5rem);
  height: auto;
  margin: 0 auto;
}
.crest figcaption {
  margin: 1rem auto 0;
  max-width: 30rem;
  font-size: 0.95rem;
  line-height: 1.5;
}

.button {
  display: inline-block;
  margin-top: 0.5rem;
  padding: 0.6rem 1.1rem;
  border: 2px solid var(--blue);
  border-radius: 0.4rem;
  font-weight: 700;
  text-decoration: none;
}
.button:hover { background: var(--blue); color: var(--yellow); }

/* ---------- footer ---------- */
.site-footer {
  max-width: var(--column);
  margin: 0 auto;
  padding: 1rem 1.25rem 2rem;
  border-top: 3px solid var(--red);
  font-size: 0.95rem;
}

@media (max-width: 30rem) {
  body { font-size: 1.0625rem; }
  h1 { font-size: 1.65rem; }
}

@media print {
  body { background: #fff; }
  .skip-link, .site-nav { display: none; }
}
