/* John Wood the Elder: Bath stone, ink and a little ochre */
:root {
  --paper: #f7f2e8;
  --stone: #ece2cf;
  --stone-dark: #d8c7a6;
  --ink: #2a241e;
  --muted: #6b5f52;
  --accent: #7a4a1f;
  --accent-2: #2f5d62;
  --rule: #d9ccb4;
  --radius: 4px;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --sans: -apple-system, BlinkMacSystemFont, "Segoe UI", system-ui, sans-serif;
  --wrap: 1160px;
  --text: 680px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font: 19px/1.6 var(--serif);
  font-feature-settings: "onum" 1, "liga" 1;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--accent); text-decoration-thickness: 1px; text-underline-offset: 3px; }
a:hover { color: var(--ink); }
h1, h2, h3, h4 { font-weight: 400; line-height: 1.15; letter-spacing: -0.005em; margin: 0 0 .5em; }
h1 { font-size: clamp(2.2rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.5rem, 2.6vw, 2rem); }
h3 { font-size: 1.3rem; }
h4 { font-size: 1.1rem; font-style: italic; }
[hidden] { display: none !important; }

.skip { position: absolute; left: -999px; }
.skip:focus { left: 1rem; top: 1rem; background: #fff; padding: .5rem 1rem; z-index: 10; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap--text { max-width: calc(var(--text) + 48px); }

.kicker {
  font: 600 .72rem/1.4 var(--sans);
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 0 0 .9rem;
}
.kicker a { color: inherit; text-decoration: none; }
.kicker a:hover { color: var(--accent); }
.lede { font-size: 1.2rem; color: var(--muted); max-width: 40em; }

/* Masthead */
.masthead { border-bottom: 1px solid var(--rule); background: var(--paper); }
.masthead__inner { display: flex; align-items: center; justify-content: space-between; gap: 1rem 2rem; flex-wrap: wrap; padding-top: 18px; padding-bottom: 18px; }
.brand { text-decoration: none; color: var(--ink); display: flex; align-items: baseline; gap: .7rem; }
.brand__name { font-size: 1.35rem; }
.brand__dates { font: 500 .75rem var(--sans); letter-spacing: .12em; color: var(--muted); }
.nav { display: flex; flex-wrap: wrap; gap: .2rem 1.4rem; font: 500 .85rem var(--sans); }
.nav a { color: var(--ink); text-decoration: none; padding: .3rem 0; border-bottom: 1px solid transparent; }
.nav a:hover, .nav a[aria-current] { border-bottom-color: var(--accent); color: var(--accent); }

/* Home hero */
.hero { background: var(--stone); border-bottom: 1px solid var(--rule); }
.hero__inner { display: grid; grid-template-columns: 1.1fr .9fr; gap: 56px; align-items: center; padding-top: 64px; padding-bottom: 64px; }
.hero h1 span { display: block; font-size: .45em; letter-spacing: .2em; color: var(--muted); margin-top: .6rem; font-family: var(--sans); }
.hero__img { margin: 0; }
.hero__img img { width: 100%; aspect-ratio: 4/3; object-fit: cover; border-radius: var(--radius); }
.hero__img figcaption { font: .8rem var(--sans); color: var(--muted); margin-top: .5rem; }
.hero__img figcaption a { color: inherit; }
.hero__actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 1.8rem; }
.button {
  display: inline-block; font: 600 .9rem var(--sans); text-decoration: none;
  background: var(--accent); color: #fff; padding: .8rem 1.3rem; border-radius: var(--radius);
}
.button:hover { background: var(--ink); color: #fff; }
.button--quiet { background: transparent; color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.button--quiet:hover { background: var(--accent); color: #fff; }

/* Sections */
.section { padding-top: 64px; }
.section__head { display: flex; justify-content: space-between; align-items: baseline; border-bottom: 1px solid var(--rule); margin-bottom: 24px; }
.section__head a { font: 500 .85rem var(--sans); text-decoration: none; }
.subhead { margin-top: 48px; border-bottom: 1px solid var(--rule); padding-bottom: .4rem; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.panel { display: block; padding: 32px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); text-decoration: none; color: var(--ink); transition: border-color .15s; }
.panel:hover { border-color: var(--accent); color: var(--ink); }
.panel p:not(.kicker) { color: var(--muted); }
.panel__more { font: 600 .85rem var(--sans); color: var(--accent); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 32px 24px; padding-bottom: 24px; }
.card { display: flex; flex-direction: column; text-decoration: none; color: var(--ink); }
.card__img { display: block; aspect-ratio: 4/3; background: var(--stone); border-radius: var(--radius); overflow: hidden; }
.card__img img { width: 100%; height: 100%; object-fit: cover; transition: transform .4s ease; }
.card:hover .card__img img { transform: scale(1.03); }
.card__body { display: block; padding-top: .8rem; }
.card__meta { display: block; font: 600 .7rem var(--sans); letter-spacing: .12em; text-transform: uppercase; color: var(--muted); }
.card__title { display: block; font-size: 1.15rem; line-height: 1.3; margin-top: .25rem; }
.card:hover .card__title { color: var(--accent); }
.card__summary { display: block; font-size: .95rem; color: var(--muted); margin-top: .4rem; }
.cards--books .card__img { aspect-ratio: 3/4; }
.cards--books .card__img img { object-fit: contain; background: var(--stone); }

/* Filter */
.filter { display: flex; gap: .5rem; flex-wrap: wrap; margin: 1.5rem 0 2rem; }
.filter button {
  font: 600 .85rem var(--sans); padding: .55rem 1rem; border-radius: 99px; cursor: pointer;
  background: transparent; color: var(--ink); border: 1px solid var(--stone-dark);
}
.filter button span { color: var(--muted); font-weight: 400; margin-left: .3rem; }
.filter button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.filter button[aria-pressed="true"] span { color: var(--stone-dark); }

/* Pages */
.page__head { padding-top: 56px; padding-bottom: 8px; }
.page__head--wide { padding-bottom: 0; }
.page { padding-bottom: 64px; }
.prose { overflow-wrap: break-word; }
.prose > * + * { margin-top: 1em; }
.prose p, .prose ul, .prose ol, .prose blockquote { margin-bottom: 0; }
.prose h2 { margin-top: 1.8em; }
.prose h3, .prose h4 { margin-top: 1.5em; }
.prose blockquote { margin-left: 0; padding: .2em 0 .2em 1.2em; border-left: 3px solid var(--stone-dark); color: var(--muted); font-size: .95em; }
.prose blockquote strong { font-weight: 400; }
.prose figure, .hero-figure { margin: 2em 0; }
.prose figcaption, .hero-figure figcaption { font: .82rem/1.5 var(--sans); color: var(--muted); margin-top: .6rem; }
.prose figcaption a, .hero-figure figcaption a { color: inherit; }
.prose img { border-radius: var(--radius); }
.prose iframe { width: 100%; max-width: 100%; border: 0; border-radius: var(--radius); }
.hero-figure img { width: 100%; border-radius: var(--radius); }
.hero-figure--cover img { max-width: 320px; }
.big-link { font-size: 1.4rem; }
.ask { margin-top: 3em; padding: 1.2em 1.4em; background: var(--stone); border-radius: var(--radius); font-size: .95rem; }
.pager { display: flex; justify-content: space-between; gap: 1rem; border-top: 1px solid var(--rule); margin-top: 3rem; padding-top: 1.2rem; padding-bottom: 64px; font: 500 .9rem var(--sans); }
.pager a { text-decoration: none; }

/* Building page */
.building__head { padding-top: 56px; }
.building__grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 56px; align-items: start; }
.building__main { max-width: var(--text); }
.building .hero-figure { margin-top: 0; }
.facts { position: sticky; top: 24px; background: #fff; border: 1px solid var(--rule); border-radius: var(--radius); padding: 22px; font-family: var(--sans); font-size: .9rem; }
.facts dl { margin: 0; display: grid; grid-template-columns: auto 1fr; gap: .5rem 1rem; }
.facts dt { color: var(--muted); font-size: .72rem; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; padding-top: .2rem; }
.facts dd { margin: 0; }
.minimap { height: 220px; margin-top: 18px; border-radius: var(--radius); z-index: 0; }
.facts__links { font-size: .8rem; margin: .6rem 0 0; color: var(--muted); }

/* Map page */
.bigmap { height: 72vh; min-height: 420px; border-radius: var(--radius); border: 1px solid var(--rule); margin-bottom: 64px; z-index: 0; }
.legend { font: .85rem var(--sans); color: var(--muted); display: flex; align-items: center; gap: .5rem; }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; margin-left: .8rem; }
.dot:first-child { margin-left: 0; }
.dot--elder { background: #7a4a1f; }
.dot--younger { background: #2f5d62; }
.mapbtns a { width: auto !important; padding: 0 10px; font: 600 12px var(--sans); }
.leaflet-container { font-family: var(--sans); }
.leaflet-popup-content a { color: var(--accent); }

/* Timeline */
.timeline { list-style: none; padding-top: 24px; padding-bottom: 64px; position: relative; }
.timeline::before { content: ""; position: absolute; left: calc(24px + 86px); top: 24px; bottom: 64px; width: 1px; background: var(--stone-dark); }
.timeline__year { display: grid; grid-template-columns: 72px 1fr; gap: 0 28px; padding: .55rem 0; }
.timeline__label { font-size: 1.25rem; color: var(--accent); text-align: right; font-variant-numeric: oldstyle-nums; }
.timeline__year ul { list-style: none; margin: 0; padding: 0; }
.timeline__year li { position: relative; padding: .2rem 0; }
.timeline__year li::before { content: ""; position: absolute; left: -19px; top: .75em; width: 9px; height: 9px; border-radius: 50%; background: var(--accent); border: 2px solid var(--paper); }
.timeline__item--younger::before { background: var(--accent-2) !important; }
.timeline__life { font-style: italic; color: var(--muted); }
.timeline__life::before { background: var(--ink) !important; }
.timeline__item span { font: 600 .68rem var(--sans); letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-left: .4rem; }

/* Footer */
.footer { background: var(--ink); color: #d9cfbf; margin-top: 64px; }
.footer__inner { padding-top: 48px; padding-bottom: 48px; font-size: .95rem; }
.footer__lede { font-size: 1.1rem; color: #f2ebdd; max-width: 36em; }
.footer a { color: #f2ebdd; }
.footer__small { font: .8rem var(--sans); color: #a89c8a; }
.page + .footer, .building + .footer { margin-top: 0; }

@media (max-width: 860px) {
  body { font-size: 18px; }
  .hero__inner, .split, .building__grid { grid-template-columns: 1fr; gap: 32px; }
  .hero__inner { padding-top: 40px; padding-bottom: 40px; }
  .facts { position: static; }
  .nav { gap: .1rem 1rem; }
}
@media (max-width: 520px) {
  .timeline::before { left: calc(24px + 59px); }
  .timeline__year { grid-template-columns: 48px 1fr; gap: 0 22px; }
  .timeline__year li::before { left: -16px; }
  .timeline__label { font-size: 1rem; }
}

/* Home page note about the site */
.intro-note p { max-width: 40em; font-size: 1.1rem; margin: 0; padding-left: 18px; border-left: 3px solid var(--accent, #b8893f); }
