/* Village of Wrenfield (a fictional village made for a software demo). */

@font-face {
  font-family: "Source Serif 4";
  src: url("fonts/source-serif-4-600.woff2") format("woff2");
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3.woff2") format("woff2");
  font-weight: 200 900;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "Source Sans 3";
  src: url("fonts/source-sans-3-italic.woff2") format("woff2");
  font-weight: 200 900;
  font-style: italic;
  font-display: swap;
}

:root {
  --green: #1F4D3A;   /* header and accent */
  --paper: #FAF7F0;   /* background */
  --ink: #1F2328;     /* text */
  --rule: #D9D4C7;
  --width: 1040px;
}

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

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

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: "Source Sans 3", "Segoe UI", sans-serif;
  font-size: 1.0625rem;
  line-height: 1.55;
  overflow-wrap: break-word;
}

img { max-width: 100%; height: auto; display: block; }

a { color: var(--green); text-underline-offset: 0.15em; }
a:hover { text-decoration-thickness: 2px; }
a[href^="tel:"], .nowrap { white-space: nowrap; }
:focus-visible { outline: 3px solid var(--green); outline-offset: 2px; }

h1, h2, h3 {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  line-height: 1.2;
}
h2 {
  font-size: 1.6rem;
  margin: 0 0 12px;
}
h3 {
  font-size: 1.2rem;
  margin: 0 0 6px;
}
p { margin: 0 0 12px; }
ul { margin: 0 0 12px; padding-left: 1.2em; }
li { margin-bottom: 6px; }

.wrap {
  max-width: calc(var(--width) + 32px);
  margin: 0 auto;
  padding: 0 16px;
}

.skip {
  position: absolute;
  left: 16px;
  top: -100px;
  background: var(--paper);
  color: var(--green);
  padding: 8px;
}
.skip:focus { top: 8px; }

/* Header -------------------------------------------------------------- */

.site-header {
  background: var(--green);
  color: var(--paper);
}
.site-header .wrap {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px 32px;
  padding-top: 22px;
  padding-bottom: 18px;
}
.wordmark {
  margin: 0;
  font-size: 1.9rem;
}
.wordmark a { color: var(--paper); text-decoration: none; }
.wordmark a:hover { text-decoration: underline; }
.site-header :focus-visible { outline-color: var(--paper); }

.site-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 4px 22px;
}
.site-nav li { margin: 0; }
.site-nav a { color: var(--paper); }

/* Layout -------------------------------------------------------------- */

.page {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 300px;
  gap: 0 56px;
  padding-top: 36px;
}
.page > main > section,
.page > aside > section {
  border-top: 1px solid var(--rule);
  padding: 22px 0 18px;
}
.page > main > section:first-child,
.page > aside > section:first-child {
  border-top: 0;
  padding-top: 0;
}

.lede { font-size: 1.15rem; }


/* Upcoming meetings: the main thing on the page. */
.meetings {
  width: 100%;
  border-collapse: collapse;
  margin: 8px 0 14px;
}
.meetings th, .meetings td {
  text-align: left;
  vertical-align: top;
  padding: 12px 16px 12px 0;
  border-bottom: 1px solid var(--rule);
}
.meetings thead th {
  font-size: 0.9rem;
  border-bottom: 2px solid var(--green);
  padding-top: 0;
}
.meetings tbody th {
  font-family: "Source Serif 4", Georgia, serif;
  font-weight: 600;
  font-size: 1.15rem;
}

.dated { list-style: none; padding: 0; }
.dated li {
  display: grid;
  grid-template-columns: 7.5em 1fr;
  gap: 12px;
  padding: 6px 0;
  border-bottom: 1px solid var(--rule);
  margin: 0;
}
.dated li:last-child { border-bottom: 0; }
.dated .when { font-weight: 600; }

.news-item { margin-bottom: 24px; }
.news-item .when { font-size: 0.95rem; margin-bottom: 8px; }
.news-photo { margin: 6px 0 12px; }

.parks {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(0, 1fr);
  gap: 24px;
  align-items: start;
}

.contacts { margin: 0; }
.contacts dt { font-weight: 600; margin-top: 10px; }
.contacts dd { margin: 0; }

.hall-photo { margin-bottom: 14px; }

/* Inner pages --------------------------------------------------------- */

.inner {
  max-width: 720px;
  padding-top: 36px;
}
.inner h1 { font-size: 2.1rem; margin: 0 0 16px; }
.inner h2 { margin-top: 28px; }
.crumb { margin-bottom: 18px; }

.not-found h1 { font-size: 2.6rem; }
.not-found .lede { font-size: 1.3rem; }

/* Footer -------------------------------------------------------------- */

.site-footer {
  border-top: 1px solid var(--rule);
  margin-top: 48px;
  padding: 22px 0 40px;
  font-size: 0.95rem;
}
.site-footer p { margin: 0 0 6px; }
.fiction { font-weight: 600; }

@media (max-width: 820px) {
  .page { grid-template-columns: minmax(0, 1fr); }
  .page > aside { border-top: 1px solid var(--rule); padding-top: 22px; }
  .parks { grid-template-columns: minmax(0, 1fr); }
}

@media (max-width: 520px) {
  .wordmark { font-size: 1.6rem; }
  .meetings thead { display: none; }
  .meetings tr { display: block; border-bottom: 1px solid var(--rule); padding: 10px 0; }
  .meetings th, .meetings td { display: block; border: 0; padding: 2px 0; }
  .dated li { grid-template-columns: 1fr; gap: 0; }
}
