/* beardfamily.org — "Scrapbook" */

@font-face { font-family: "Fraunces"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/Fraunces-latin.woff2) format("woff2"); }
@font-face { font-family: "Fraunces"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/Fraunces-Italic-latin.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: normal; font-weight: 400 700; font-display: swap; src: url(../fonts/NunitoSans-latin.woff2) format("woff2"); }
@font-face { font-family: "Nunito Sans"; font-style: italic; font-weight: 400 700; font-display: swap; src: url(../fonts/NunitoSans-Italic-latin.woff2) format("woff2"); }
@font-face { font-family: "Caveat"; font-style: normal; font-weight: 500; font-display: swap; src: url(../fonts/Caveat-latin.woff2) format("woff2"); }

:root {
  --page: #E6E8E1;
  --panel: #fff;
  --panel-edge: #D8DCD2;
  --ink: #2B2B2B;
  --muted: #5A5F58;
  --rule: #D3D7CC;
  --pine: #2F4A3A;
  --pine-dark: #223829;
  --serif: "Fraunces", Georgia, "Iowan Old Style", serif;
  --sans: "Nunito Sans", "Segoe UI", system-ui, Helvetica, Arial, sans-serif;
  --hand: "Caveat", "Bradley Hand", "Segoe Print", cursive;
  --measure: 68ch;
}

* { box-sizing: border-box; }
html { background: var(--page); }
body {
  margin: 0; color: var(--ink); background: var(--page);
  font-family: var(--sans); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
img { max-width: 100%; height: auto; }
a { color: var(--pine); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
a:focus-visible { outline: 2px solid var(--pine); outline-offset: 2px; }
b, strong { font-weight: 700; }
h1, h2, h3, h4 { font-family: var(--serif); font-weight: 400; line-height: 1.12; margin: 0; }

.wrap { max-width: 1100px; margin: 0 auto; padding: 0 16px; }

/* Header and navigation */
.site-header { padding-top: 14px; }
.site-header .top { display: flex; justify-content: space-between; align-items: baseline; gap: 8px 20px; flex-wrap: wrap; }
.brand { font-family: var(--serif); font-size: 26px; font-weight: 600; color: var(--pine); line-height: 1.1; }
.brand:hover { text-decoration: none; }
.brand small { display: block; font-family: var(--sans); font-size: 13px; font-weight: 400; color: var(--muted); margin-top: 2px; }
.site-nav { display: flex; gap: 0 16px; flex-wrap: wrap; }
.site-nav a { color: var(--ink); font-size: 15px; font-weight: 700; }
.site-nav a[aria-current] { color: var(--pine); text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--pine); }
.crumb { font-size: 13px; color: var(--muted); margin: 10px 0 0; }
.crumb a { color: var(--muted); }

/* Home hero */
.hero { display: grid; grid-template-columns: 1fr; gap: 20px 32px; align-items: center; padding: 18px 0 24px; }
.hero-photos { position: relative; height: 230px; }
.mat {
  position: absolute; display: block; background: var(--panel); padding: 6px 6px 22px;
  box-shadow: 0 6px 16px rgba(30, 40, 30, .18); color: var(--muted);
}
.mat:hover { text-decoration: none; z-index: 5; }
.mat img { display: block; width: 100%; height: auto; }
.mat span { font-family: var(--hand); font-size: 15px; color: #4a4a4a; position: absolute; left: 8px; right: 6px; bottom: 2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mat.m1 { width: 96px; left: 4px; top: 26px; transform: rotate(-4deg); }
.mat.m2 { width: 124px; left: 96px; top: 0; transform: rotate(2deg); z-index: 2; }
.mat.m3 { width: 106px; left: 208px; top: 40px; transform: rotate(-2deg); }
.hero-intro h1 { font-size: 30px; margin-bottom: 12px; }
.hero-intro p { margin: 0 0 16px; color: #3d3d3d; max-width: 46ch; }
.btn { display: inline-block; background: var(--pine); color: #fff; padding: 9px 16px; border-radius: 4px; font-weight: 700; font-size: 15px; }
.btn:hover { background: var(--pine-dark); text-decoration: none; }

/* Stories: the people list, on the home page and in the sidebar */
.panel { background: var(--panel); padding: 20px 18px 22px; border-radius: 4px; }
.panel h2 { font-size: 21px; font-weight: 600; margin-bottom: 10px; }
.stories { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: 1fr; gap: 0 28px; }
.stories li { padding: 9px 0; border-bottom: 1px solid var(--rule); }
.stories li:last-child { border-bottom: 0; }
.stories .who { font-weight: 700; display: block; }
.stories .when { font-size: 13px; color: var(--muted); margin-left: 6px; font-weight: 400; }
.stories .what { display: block; font-size: 14px; color: var(--muted); }
.stories li[aria-current] .who { color: var(--pine-dark); }
.stories li[aria-current] { border-left: 3px solid var(--pine); padding-left: 10px; margin-left: -13px; }
.panel .more { display: inline-block; margin-top: 12px; font-size: 14px; font-weight: 700; }

/* Two-column page shell */
.page { display: grid; grid-template-columns: 1fr; gap: 24px 40px; align-items: start; padding-top: 18px; }
.page > .main { min-width: 0; }
.aside { display: grid; gap: 18px; }
.aside .thumbs { display: flex; gap: 10px; flex-wrap: wrap; margin: 0; padding: 0; list-style: none; }
.aside .thumbs a { display: block; background: var(--panel); padding: 4px; box-shadow: 0 2px 6px rgba(30, 40, 30, .15); width: 64px; }
.aside .thumbs img { display: block; width: 100%; height: auto; }
.aside .links { margin: 0; padding: 0; list-style: none; font-size: 14px; }
.aside .links li { padding: 4px 0; }

/* Prose pages */
.prose { max-width: var(--measure); background: var(--panel); padding: 26px 22px 28px; border-radius: 4px; }
.prose h1 { font-size: 32px; margin: 0 0 6px; }
.prose h2 { font-size: 24px; margin: 30px 0 8px; font-weight: 600; }
.prose h3 { font-size: 20px; margin: 26px 0 6px; font-weight: 600; }
.prose h4 { font-family: var(--sans); font-size: 16px; font-weight: 700; margin: 22px 0 6px; color: var(--pine); }
.prose p { margin: 0 0 1em; }
.prose blockquote { margin: 0; padding: 0; }
.prose ul, .prose ol { padding-left: 1.4em; }
.prose li { margin: 0 0 .4em; }
.prose sup { line-height: 0; }
.prose sup a { font-size: .75em; }
.prose img { display: block; }
.dates { color: var(--muted); font-size: 16px; margin: 0 0 4px; }
.byline { font-family: var(--serif); font-style: italic; color: var(--muted); margin: 0 0 22px; font-size: 17px; }
.pager { display: flex; justify-content: space-between; gap: 20px; border-top: 1px solid var(--rule); margin-top: 30px; padding-top: 12px; font-size: 15px; font-weight: 700; }
.pager .next { margin-left: auto; }

/* Lineage: nested lists from the original page */
.lineage ul { padding-left: 1.2em; border-left: 1px dotted #9AA39A; margin: .3em 0 .6em; }
.lineage li { margin: .4em 0; }
.lineage p { margin: 0; }

/* Pictures */
.plate-grid { display: flex; gap: 28px 24px; flex-wrap: wrap; align-items: flex-end; margin: 0; padding: 0; list-style: none; }
.plate-grid .mat { position: static; width: 170px; transform: rotate(-1.5deg); }
.plate-grid li:nth-child(2n) .mat { transform: rotate(1.5deg); }
.plate-grid .mat span { position: static; display: block; margin-top: 6px; white-space: normal; }
.plate-grid .mat { padding-bottom: 8px; }
.figure { margin: 0; }
.figure img { display: block; background: var(--panel); padding: 8px; box-shadow: 0 6px 16px rgba(30, 40, 30, .18); }
.figure figcaption { font-family: var(--hand); font-size: 20px; color: #4a4a4a; margin-top: 10px; }
.back { margin: 20px 0 0; font-weight: 700; font-size: 15px; }

/* News */
.news { margin: 0; padding: 0; }
.news dt { color: var(--muted); font-size: 14px; }
.news dd { margin: 0 0 8px; }

/* Footer */
.site-footer { margin-top: 48px; border-top: 1px solid var(--rule); padding: 16px 0 40px; font-size: 14px; color: var(--muted); }
.site-footer .links { display: flex; gap: 0 18px; flex-wrap: wrap; margin: 0 0 8px; padding: 0; list-style: none; }
.site-footer p { margin: 0; }

/* Wider screens */
@media (min-width: 700px) {
  .wrap { padding: 0 28px; }
  .site-header { padding-top: 22px; }
  .brand { font-size: 30px; }
  .site-nav { gap: 0 22px; }
  .site-nav a { font-size: 16px; }
  .hero { grid-template-columns: 1.15fr 1fr; padding: 30px 0 34px; }
  .hero-photos { height: 340px; }
  .mat.m1 { width: 140px; left: 0; top: 34px; }
  .mat.m2 { width: 180px; left: 130px; top: 0; }
  .mat.m3 { width: 152px; left: 290px; top: 52px; }
  .mat span { font-size: 17px; }
  .hero-intro h1 { font-size: 40px; }
  .stories { grid-template-columns: 1fr 1fr; }
  .stories li[aria-current] { margin-left: 0; }
  .page { grid-template-columns: minmax(0, 1fr) 280px; padding-top: 26px; }
  .page .stories { grid-template-columns: 1fr; }
  .prose { padding: 34px 40px 36px; }
  .prose h1 { font-size: 38px; }
}
@media (min-width: 1000px) {
  .hero-intro h1 { font-size: 46px; }
  .page { grid-template-columns: minmax(0, 1fr) 320px; gap: 24px 56px; }
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}

/* Photos inside a story */
.figure.float { max-width: 260px; margin: 0 0 16px; }
.figure.float a:hover { text-decoration: none; }
.story-plates { margin-top: 26px; }
@media (min-width: 700px) {
  .figure.float { float: right; margin: 6px 0 12px 28px; max-width: 280px; }
  .prose .pager, .prose .story-plates { clear: both; }
}
