/* peacockcj.com, built from the Christopher Peacock kit (Nov 2026).
   Night for home, advisory and foundation; Paper for anything read for more than a minute. */

:root {
  --display: 'Libre Caslon Display', 'Libre Caslon Text', Georgia, serif;
  --text: 'Source Serif 4', Georgia, serif;
  --ui: 'Hanken Grotesk', system-ui, sans-serif;
  --gutter: clamp(24px, 4.45vw, 64px);
  --band: #0a2123;
  --band-ink: #ece4d4;
}
body[data-theme="night"] {
  --ground: #0e2a2d; --ground-deep: #0a2123; --surface: #143438; --rule: #244447; --rule-strong: #386065;
  --ink: #ece4d4; --ink-muted: #b4c4c0; --ink-faint: #8ca09c; --gold: #e4ab5c; --gold-strong: #cf9442; --water: #8cc3ba;
}
body[data-theme="paper"] {
  --ground: #ece4d4; --ground-deep: #e3d9c5; --surface: #f3ede1; --rule: #cfc6b3; --rule-strong: #a99f8a;
  --ink: #0e2a2d; --ink-muted: #3d5254; --ink-faint: #4f6163; --gold: #7a5815; --gold-strong: #5f430f; --water: #2e6b62;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--ground); color: var(--ink); font-family: var(--text);
  font-optical-sizing: auto; -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility;
}
img { max-width: 100%; height: auto; }
a { color: inherit; }
a:focus-visible { outline: 2px solid var(--water); outline-offset: 3px; border-radius: 2px; }
.skip { position: absolute; left: -9999px; top: 0; }
.skip:focus { left: 16px; top: 16px; z-index: 10; padding: 10px 14px; background: var(--ground); color: var(--ink); font-family: var(--ui); font-size: 15px; }

.wrap { max-width: 72rem; margin: 0 auto; padding-left: var(--gutter); padding-right: var(--gutter); }

/* header */
.site-header { border-bottom: 1px solid var(--rule); }
.site-header .wrap { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 40px; row-gap: 8px; padding-top: 24px; padding-bottom: 24px; }
.brand { display: flex; align-items: center; gap: 16px; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; display: block; }
.brand span { font-family: var(--display); font-size: 28px; line-height: 1.2; }
.nav { display: flex; flex-wrap: wrap; column-gap: 28px; }
.nav a { padding: 13px 0; font-family: var(--ui); font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--ink-muted); text-decoration: none; }
.nav a:hover { color: var(--ink); }
.nav a[aria-current="page"] { color: var(--gold); }

/* sections and the notebook margin */
main section { padding-bottom: 64px; }
.section--open { padding-top: clamp(64px, 7.2vw, 104px); }
main .section--close { padding-bottom: clamp(64px, 7.2vw, 104px); }
.section--article { padding-top: clamp(48px, 5vw, 80px); padding-bottom: 40px !important; }
.row { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 40px; row-gap: 16px; }
.row--rev { flex-direction: row-reverse; }
.row--base { align-items: baseline; }
.row--ruled { border-top: 1px solid var(--rule-strong); padding-top: 16px; }
.row--sub { border-top: 1px solid var(--rule); padding-top: 24px; margin-top: 24px; }
.row--item { border-top: 1px solid var(--rule); padding-top: 20px; padding-bottom: 20px; }
.margin { flex: 1 1 13rem; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.margin--tight { gap: 2px; }
.main { flex: 999 1 34rem; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.main--mid { gap: 16px; }
.main--tight { gap: 12px; }
.main--snug { gap: 8px; }
.main--flat { gap: 0; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.list-end { border-top: 1px solid var(--rule); }
.gap { height: 16px; }
.spacer { flex: 0 1 13rem; min-width: 0; }
.year { padding: 32px 0 8px; }

/* type */
.display-xl, .display-l, .display-m, .display-s, .sign-off, .statement { font-family: var(--display); font-weight: 400; margin: 0; }
.display-xl { font-size: clamp(48px, 6.2vw, 88px); line-height: 1; letter-spacing: -0.01em; max-width: 11em; }
.display-l { font-size: clamp(40px, 4.2vw, 60px); line-height: 1.05; letter-spacing: -0.005em; }
.display-m { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.12; }
.display-s { font-size: clamp(24px, 2vw, 28px); line-height: 1.2; }
.label { font-family: var(--ui); font-size: 13px; font-weight: 600; line-height: 1.3; letter-spacing: 0.02em; color: var(--water); }
.marginal { font-size: 15px; line-height: 1.45; font-style: italic; color: var(--ink-faint); }
.body { margin: 0; max-width: 38rem; font-size: 17px; line-height: 1.6; }
.body--muted { color: var(--ink-muted); }
.lede { font-size: 20px; }
.dek { margin: 0; max-width: 38rem; font-size: clamp(20px, 1.67vw, 24px); line-height: 1.4; font-style: italic; color: var(--ink-muted); }
.quote { margin: 0; max-width: 38rem; padding: 12px 0; border-top: 1px solid var(--rule); border-bottom: 1px solid var(--rule); font-size: clamp(22px, 2vw, 28px); line-height: 1.35; font-style: italic; }
.statement { max-width: 38rem; font-size: clamp(24px, 2vw, 28px); line-height: 1.3; }
.plain { color: inherit; text-decoration: none; }
.plain:hover { text-decoration: underline; text-decoration-color: var(--rule-strong); }

/* links and buttons: gold once per view */
.actions { display: flex; flex-wrap: wrap; align-items: center; column-gap: 28px; row-gap: 4px; }
.link { padding: 12px 0; font-family: var(--ui); font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--ink); text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; }
.link--muted { color: var(--ink-muted); }
.link--gold { color: var(--gold); text-decoration-color: currentColor; }
.link:hover { color: var(--ink); }
.link--gold:hover { color: var(--gold-strong); }
.btn { display: inline-block; padding: 15px 22px; background: var(--gold); color: var(--ground); font-family: var(--ui); font-size: 15px; font-weight: 600; line-height: 1; text-decoration: none; border-radius: 0; }
.btn:hover { background: var(--gold-strong); }
.inline-link { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 3px; }
a.marginal { align-self: flex-start; }

/* the three ways */
.ways { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule-strong); border-bottom: 1px solid var(--rule); }
.ways li { display: flex; flex-wrap: wrap; align-items: baseline; column-gap: 40px; row-gap: 8px; padding: 24px 0; }
.ways li + li { border-top: 1px solid var(--rule); }
.ways h2 { flex: 1 1 13rem; min-width: 0; }
.ways .main { flex-direction: row; flex-wrap: wrap; align-items: baseline; column-gap: 40px; row-gap: 4px; }
.ways .body { flex: 1 1 20rem; min-width: 0; }
.ways .link { flex: 0 0 auto; }

/* images */
.photo { display: block; width: 100%; max-width: 38rem; aspect-ratio: 3 / 2; object-fit: cover; object-position: center 30%; }
.fn-image { display: block; width: 100%; aspect-ratio: 16 / 9; object-fit: cover; }

/* books, lists, tags */
.book { display: flex; flex-wrap: wrap; align-items: flex-start; column-gap: 40px; row-gap: 20px; }
.book > img { flex: 0 0 auto; width: 160px; height: auto; display: block; }
.book > img.page { border: 1px solid var(--rule); } /* light covers and pages need an edge on Paper */
.book .text { flex: 1 1 20rem; min-width: 0; display: flex; flex-direction: column; gap: 14px; }
.essay-title { font-family: var(--display); font-weight: 400; font-size: clamp(24px, 2vw, 28px); line-height: 1.2; color: var(--ink); text-decoration: none; }
.essay-title:hover { text-decoration: underline; text-decoration-color: var(--rule-strong); text-underline-offset: 4px; }
.tags { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; margin: 0; padding: 0; }
.tags li { padding: 6px 14px; border: 1px solid var(--rule-strong); border-radius: 999px; font-family: var(--ui); font-size: 13px; font-weight: 500; line-height: 1.3; color: var(--ink-muted); }

/* essays */
.article-notes { padding-top: 10px; border-top: 1px solid var(--rule-strong); }
.prose { flex: 999 1 34rem; min-width: 0; max-width: 38rem; display: flex; flex-direction: column; gap: 20px; }
.prose p, .prose ul, .prose ol { margin: 0; font-size: 20px; line-height: 1.6; }
.prose ul, .prose ol { padding-left: 1.25em; display: flex; flex-direction: column; gap: 10px; }
.prose .lead { font-size: clamp(22px, 1.9vw, 26px); line-height: 1.45; }
.prose .beat { font-family: var(--display); font-size: clamp(24px, 2vw, 28px); line-height: 1.2; margin: 12px 0; }
.prose .break { margin: 8px 0; letter-spacing: 0.5em; color: var(--ink-faint); }
.prose blockquote { margin: 0; padding-left: 2rem; font-size: 20px; line-height: 1.6; color: var(--ink-muted); }
.prose h2, .prose h3 { margin: 16px 0 0; font-family: var(--display); font-weight: 400; line-height: 1.2; }
.prose h2 { font-size: clamp(24px, 2vw, 28px); }
.prose h3 { font-size: clamp(21px, 1.7vw, 24px); }
.prose strong { font-weight: 600; }
.epigraph { margin: 16px 0 0; max-width: 38rem; display: flex; flex-direction: column; gap: 8px; }
.epigraph p { margin: 0; font-size: 24px; line-height: 1.4; font-style: italic; }
.epigraph cite { font-family: var(--ui); font-style: normal; font-size: 13px; line-height: 1.4; color: var(--ink-faint); }
/* While There Is Life sample: the book's meditations, each with its title in Morse code */
.prose .part-label { margin-top: 32px; }
.prose .sig { font-size: 20px; line-height: 1.4; }
.prose .sig .place { font-style: italic; font-size: 17px; color: var(--ink-muted); }
.prose .med { display: flex; flex-direction: column; gap: 16px; margin-top: 12px; padding: 32px 0 0; border-top: 1px solid var(--rule); }
.prose h2 + .med { margin-top: 8px; padding-top: 0; border-top: 0; }
.prose .med h3 { margin: 0; font-size: clamp(24px, 2vw, 28px); }
.prose h2.part-title { margin-top: 0; font-size: clamp(30px, 2.8vw, 40px); line-height: 1.12; }
.prose .orn { color: var(--ink-faint); line-height: 0; }
.prose .orn svg { display: block; max-width: 100%; height: auto; }
.closing { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--rule); display: flex; flex-direction: column; gap: 8px; }

/* footer */
.site-footer { background: var(--ground-deep); }
.site-footer .wrap { padding-top: 64px; padding-bottom: 40px; display: flex; flex-direction: column; gap: 40px; }
.sign-off-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 24px; }
.sign-off { font-size: clamp(30px, 2.8vw, 40px); line-height: 1.12; }
.sign-off-row img { height: 48px; width: auto; display: block; }
.footer-row { border-top: 1px solid var(--rule); padding-top: 4px; display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; column-gap: 24px; }
.footer-row nav { display: flex; flex-wrap: wrap; column-gap: 24px; }
.footer-row nav a { padding: 12px 0; font-family: var(--ui); font-size: 15px; font-weight: 500; line-height: 1.2; color: var(--ink-muted); text-decoration: none; }
.footer-row nav a:hover { color: var(--ink); }
.copyright { padding: 12px 0; font-family: var(--ui); font-size: 13px; line-height: 1.4; color: var(--ink-faint); }

@media (max-width: 760px) {
  .spacer { display: none; }
}
@media (max-width: 600px) {
  .brand span { font-size: 24px; }
  .brand img { height: 38px; }
}
@media print {
  .site-header nav, .site-footer nav, .actions { display: none; }
  body { background: #fff; color: #000; }
}
