:root {
  color-scheme: light;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  --page: #f7f5ef;
  --ink: #263e35;
  --muted: #56645b;
  --line: #d6dcd4;
  --button: #263e35;
  --button-hover: #365547;
  --button-text: #fff;
  --focus: #906c2a;
  --art-filter: none;
  color: var(--ink);
  background: var(--page);
  font-synthesis: none;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
}

main {
  flex: 1;
  width: min(100%, 780px);
  margin: auto;
  padding: clamp(48px, 10vh, 110px) 24px;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  text-align: center;
}

.location {
  margin: 0 0 40px;
  font-size: 12px;
  line-height: 1.6;
  letter-spacing: .18em;
  text-transform: uppercase;
}

.logo { margin: 0; width: min(100%, 560px); }
.logo img { display: block; width: 100%; height: auto; }

.channel {
  width: 100%;
  margin-top: 48px;
  padding-top: 32px;
  border-top: 1px solid var(--line);
}

.youtube-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 12px;
  min-height: 54px;
  padding: 16px 24px;
  border: 1px solid var(--button);
  border-radius: 4px;
  background: var(--button);
  color: var(--button-text);
  font-size: 15px;
  font-weight: 600;
  line-height: 1.5;
  text-decoration: none;
}

.youtube-link[href]:hover { background: var(--button-hover); }
.youtube-link:focus-visible { outline: 3px solid var(--focus); outline-offset: 5px; }
.youtube-icon { width: 23px; height: 23px; flex-shrink: 0; }
.arrow { margin-left: 8px; }

footer {
  position: relative;
  color: var(--muted);
  text-align: center;
}

.village-illustration { display: block; width: 100%; height: auto; }
.site-address {
  margin: 0;
  padding: 0 24px 8px;
  font-size: 12px;
  line-height: 1.5;
  letter-spacing: .08em;
}

.route19-credit {
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  margin: 0 auto 16px;
  border-radius: 4px;
  opacity: .35;
}
.route19-credit img {
  display: block;
  width: 24px;
  height: auto;
  filter: var(--art-filter);
}
.route19-credit:hover, .route19-credit:focus-visible { opacity: .8; }
.route19-credit:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

@media (max-width: 400px) {
  .youtube-link { padding: 14px 16px; gap: 9px; font-size: 14px; }
  .arrow { margin-left: 0; }
}

/* The artwork has no painted background in either theme. */
.logo img, .village-illustration { filter: var(--art-filter); }

.theme-toggle {
  position: absolute;
  top: 20px;
  right: 20px;
  display: grid;
  place-items: center;
  width: 44px;
  height: 44px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  color: var(--muted);
  background: transparent;
  cursor: pointer;
}
.theme-toggle[hidden] { display: none; }
.theme-toggle:hover { color: var(--ink); background: var(--line); }
.theme-toggle:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }
.theme-icon { width: 20px; height: 20px; }
.theme-icon-sun { display: none; }
:root[data-theme="dark"] .theme-icon-moon { display: none; }
:root[data-theme="dark"] .theme-icon-sun { display: block; }
main { padding-top: max(100px, 10vh); }

:root[data-theme="dark"] {
  color-scheme: dark;
  --page: #222625;
  --ink: #ecebe4;
  --muted: #b9c4bc;
  --line: #48534c;
  --button: #c5d9c9;
  --button-hover: #dce9dd;
  --button-text: #1f3329;
  --focus: #e3bd74;
  --art-filter: invert(1) brightness(.95);
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme]) {
    color-scheme: dark;
    --page: #222625;
    --ink: #ecebe4;
    --muted: #b9c4bc;
    --line: #48534c;
    --button: #c5d9c9;
    --button-hover: #dce9dd;
    --button-text: #1f3329;
    --focus: #e3bd74;
    --art-filter: invert(1) brightness(.95);
  }
}
