/*
Theme Name: Hooded Hawk
Theme URI: https://blog.hoodedhawk.com/
Author: John Boswell
Description: The blog in the Coins site's dress — parchment ground, ink, verdigris and bronze, Cinzel and Spectral, with the same Auto / Light / Dark switch. Written 2026-09-07 to replace the 2007 "connections" theme. Source of record: Infrastructure/blog/theme-hoodedhawk/.
Version: 1.0
License: GNU General Public License v2 or later
Text Domain: hoodedhawk
*/

/* ---------- palette: the Coins catalogue's tokens, light then dark ---------- */
:root {
  color-scheme: light;
  --bg: #fdfcf8;
  --surface: #fff;
  --surface-card: #fffdf7;
  --surface-sunken: #f2ece0;
  --surface-tint: #f7f0e2;
  --ink: #1e1a14;
  --ink-strong: #2e1f0a;
  --ink-accent: #5a3e1b;
  --ink-caption: #6a5a42;
  --muted: #666;
  --muted-faint: #a09a88;
  --link: #7a5c2e;
  --link-hot: #7a2e12;
  --gold: #8b6914;
  --verdigris: #4a7a6b;
  --bronze: #a8763e;
  --rule: #c9b48a;
  --rule-soft: #e0d8c8;
  --rule-card: #e0d6bd;
  --masthead-bg: #2e3a3f;
  --masthead-rule: #3c4a50;
  --masthead-title: #f2f3f0;
  --masthead-lede: #aeb6b5;
  --masthead-accent: #c58f4b;
  --display: 'Cinzel', Georgia, serif;
  --body: 'Spectral', Georgia, serif;
  --mono: 'IBM Plex Mono', ui-monospace, Menlo, monospace;
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #17140f;
  --surface: #201c15;
  --surface-card: #211d16;
  --surface-sunken: #262117;
  --surface-tint: #241f16;
  --ink: #e8e2d4;
  --ink-strong: #f2ead8;
  --ink-accent: #d8b877;
  --ink-caption: #b6ac95;
  --muted: #a09a8c;
  --muted-faint: #7d786c;
  --link: #d2a869;
  --link-hot: #e08a5a;
  --gold: #c79a3f;
  --verdigris: #6fb39c;
  --bronze: #b8894f;
  --rule: #4a3f2a;
  --rule-soft: #3a3225;
  --rule-card: #3d3527;
  --masthead-bg: #1f282c;
  --masthead-rule: #2e3a3f;
}

/* ---------- ground ---------- */
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--body); font-size: 18px; line-height: 1.6;
}
a { color: var(--link); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover, a:focus { color: var(--link-hot); }
img { max-width: 100%; height: auto; }
::selection { background: var(--gold); color: #fff; }

/* ---------- masthead ---------- */
.masthead {
  background: var(--masthead-bg); border-bottom: 3px solid var(--masthead-accent);
  color: var(--masthead-title);
}
.masthead-inner {
  max-width: 1120px; margin: 0 auto; padding: 22px 24px 16px;
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px 28px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 18px; }
.crest img { display: block; height: 78px; width: auto; border-radius: 8px; border: 1px solid var(--masthead-rule); box-shadow: 0 2px 8px rgba(0,0,0,.35); }
.crest:hover img { border-color: var(--masthead-accent); }
@media (max-width: 600px) { .crest img { height: 58px; } }
.site-title { margin: 0; font-family: var(--display); font-weight: 600; font-size: 2.1rem; letter-spacing: .04em; line-height: 1.1; }
.site-title a { color: var(--masthead-title); text-decoration: none; }
.site-title a:hover { color: var(--masthead-accent); }
.site-tagline { margin: .35em 0 0; color: var(--masthead-lede); font-size: .95rem; font-style: italic; }
.site-nav { display: flex; align-items: center; gap: 4px 18px; flex-wrap: wrap; font-family: var(--display); font-size: .82rem; letter-spacing: .06em; text-transform: uppercase; }
.site-nav a { color: var(--masthead-lede); text-decoration: none; padding: 4px 0; border-bottom: 2px solid transparent; }
.site-nav a:hover, .site-nav a[aria-current] { color: var(--masthead-title); border-bottom-color: var(--masthead-accent); }
.theme-toggle {
  font: inherit; font-size: .78rem; letter-spacing: .06em; text-transform: uppercase;
  background: transparent; color: var(--masthead-lede); border: 1px solid var(--masthead-rule);
  border-radius: 999px; padding: 5px 12px; cursor: pointer; margin-left: 6px;
}
.theme-toggle:hover { color: var(--masthead-title); border-color: var(--masthead-accent); }
.theme-toggle .tt-glyph { margin-right: .4em; }

/* ---------- the picture lightbox (js/lightbox.js) ---------- */
.hh-lb[hidden] { display: none; }
.hh-lb { position: fixed; inset: 0; z-index: 60; background: rgba(20,16,10,.92); display: flex; align-items: center; justify-content: center; padding: 16px 56px; }
.hh-lb figure { margin: 0; max-width: 100%; max-height: 100%; display: flex; flex-direction: column; align-items: center; }
.hh-lb img { max-width: min(96vw, 1400px); max-height: 84vh; width: auto; height: auto; object-fit: contain; border-radius: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.6); cursor: pointer; }
.hh-lb figcaption { color: #eee8dc; font-size: .95rem; margin-top: 12px; text-align: center; max-width: 80ch; line-height: 1.4; }
.hh-lb button { position: absolute; font: inherit; font-size: 2.2rem; line-height: 1; color: #eee8dc; background: rgba(0,0,0,.35); border: 1px solid rgba(255,255,255,.25); border-radius: 999px; width: 48px; height: 48px; cursor: pointer; }
.hh-lb button:hover { background: rgba(0,0,0,.6); border-color: var(--masthead-accent); }
.hh-lb-close { top: 14px; right: 14px; }
.hh-lb-prev { left: 8px; top: 50%; transform: translateY(-50%); }
.hh-lb-next { right: 8px; top: 50%; transform: translateY(-50%); }
.hh-lb button[hidden] { display: none; }
@media (max-width: 600px) { .hh-lb { padding: 12px 8px; } .hh-lb button { width: 40px; height: 40px; font-size: 1.8rem; } .hh-lb-prev, .hh-lb-next { top: auto; bottom: 14px; transform: none; } .hh-lb-prev { left: 14px; } .hh-lb-next { right: 14px; } .hh-lb img { max-height: 76vh; } }

/* ---------- the crest lightbox ---------- */
.crest-box[hidden] { display: none; }
.crest-box { position: fixed; inset: 0; z-index: 50; background: rgba(20,16,10,.88); display: flex; align-items: center; justify-content: center; padding: 24px; cursor: zoom-out; }
.crest-box figure { margin: 0; max-width: min(92vw, 560px); text-align: center; }
.crest-box img { width: 100%; height: auto; max-height: 78vh; object-fit: contain; border-radius: 10px; box-shadow: 0 12px 40px rgba(0,0,0,.6); }
.crest-box figcaption { color: #eee8dc; font-size: .95rem; margin-top: 14px; line-height: 1.45; }
.crest { cursor: zoom-in; }

/* ---------- the masthead picture ---------- */
.banner { height: 200px; background: var(--surface-tint); border-top: 1px solid var(--masthead-rule); }
.banner-coin { display: flex; align-items: center; justify-content: center; background: radial-gradient(ellipse at center, var(--surface-tint) 0%, var(--bg) 70%); }
.coin-pair { display: flex; align-items: center; gap: 22px; text-decoration: none; color: var(--ink-accent); }
.coin-pair img { height: 150px; width: 150px; object-fit: contain; border-radius: 50%; background: transparent; filter: drop-shadow(0 4px 8px rgba(0,0,0,.25)); }
.coin-pair .coin-name { font-family: var(--display); font-size: .9rem; letter-spacing: .05em; text-transform: uppercase; max-width: 220px; text-align: center; line-height: 1.3; }
.coin-pair:hover .coin-name { color: var(--link-hot); }
@media (max-width: 600px) { .banner { height: 150px; } .coin-pair img { height: 110px; width: 110px; } .coin-pair .coin-name { display: none; } }

/* ---------- layout ---------- */
.page { max-width: 1120px; margin: 0 auto; padding: 28px 24px 60px; display: grid; grid-template-columns: minmax(0, 1fr) 280px; gap: 40px 56px; }
.content { min-width: 0; max-width: 72ch; }
@media (max-width: 860px) { .page { grid-template-columns: 1fr; gap: 32px; } .content { max-width: none; } }

/* ---------- posts ---------- */
.post { padding: 0 0 36px; margin: 0 0 36px; border-bottom: 1px solid var(--rule-soft); }
.post:last-of-type { border-bottom: 0; }
.post-title { font-family: var(--display); font-weight: 600; font-size: 1.7rem; line-height: 1.2; margin: 0 0 .25em; color: var(--ink-strong); letter-spacing: .01em; }
.post-title a { color: inherit; text-decoration: none; }
.post-title a:hover { color: var(--link-hot); }
.post-meta { font-size: .88rem; color: var(--muted); margin: 0 0 1.1em; }
.post-meta a { color: var(--ink-accent); }
.post-meta .sep { margin: 0 .5em; color: var(--muted-faint); }
.entry { font-size: 1.05rem; }
.entry > :first-child { margin-top: 0; }
.entry p { margin: 0 0 1.1em; }
.entry h1, .entry h2, .entry h3, .entry h4 { font-family: var(--display); font-weight: 600; color: var(--ink-accent); line-height: 1.25; margin: 1.6em 0 .5em; }
.entry h2 { font-size: 1.3rem; } .entry h3 { font-size: 1.12rem; } .entry h4 { font-size: 1rem; }
.entry blockquote { margin: 1.2em 0; padding: .2em 1.2em; border-left: 3px solid var(--verdigris); color: var(--ink-caption); font-style: italic; }
.entry pre, .entry code { font-family: var(--mono); font-size: .88em; }
.entry pre { background: var(--surface-sunken); border: 1px solid var(--rule-soft); border-radius: 6px; padding: 12px 14px; overflow-x: auto; }
.entry code { background: var(--surface-sunken); padding: .1em .35em; border-radius: 4px; }
.entry pre code { background: none; padding: 0; }
.entry hr { border: 0; border-top: 1px solid var(--rule); margin: 2em 0; }
.entry table { border-collapse: collapse; width: 100%; font-size: .95em; margin: 1em 0; }
.entry th, .entry td { border-bottom: 1px solid var(--rule-soft); padding: 6px 8px; text-align: left; vertical-align: top; }
.entry th { color: var(--ink-accent); font-weight: 600; }
.entry ul, .entry ol { padding-left: 1.4em; }
.entry li { margin: .25em 0; }
.entry img { border-radius: 4px; }
.entry .alignleft, .entry img.alignleft { float: left; margin: .3em 1.2em .8em 0; }
.entry .alignright, .entry img.alignright { float: right; margin: .3em 0 .8em 1.2em; }
.entry .aligncenter, .entry img.aligncenter { display: block; margin: 1em auto; }
.entry .alignnone { margin: .5em 0; }
.entry figure { margin: 1.2em 0; }
.entry figcaption, .entry .wp-caption-text, .entry .gallery-caption { font-size: .85rem; color: var(--ink-caption); margin-top: .4em; line-height: 1.4; }
.entry .wp-caption { max-width: 100%; }
.entry iframe, .entry video, .entry embed, .entry object { max-width: 100%; }

/* classic [gallery] shortcode */
.entry .gallery { display: grid; gap: 10px; margin: 1.2em 0; grid-template-columns: repeat(3, 1fr); }
.entry .gallery-columns-1 { grid-template-columns: 1fr; }
.entry .gallery-columns-2 { grid-template-columns: repeat(2, 1fr); }
.entry .gallery-columns-4 { grid-template-columns: repeat(4, 1fr); }
.entry .gallery-columns-5 { grid-template-columns: repeat(5, 1fr); }
.entry .gallery-item { margin: 0; }
.entry .gallery-item img { width: 100%; height: 100%; aspect-ratio: 4 / 3; object-fit: cover; border: 1px solid var(--rule-card); background: var(--surface-sunken); }
@media (max-width: 600px) { .entry .gallery, .entry .gallery-columns-4, .entry .gallery-columns-5 { grid-template-columns: repeat(2, 1fr); } }
/* block gallery */
.entry .wp-block-gallery { gap: 10px; }
.entry .wp-block-gallery .wp-block-image img { border: 1px solid var(--rule-card); }

.post-footer { margin-top: 1.4em; font-size: .88rem; color: var(--muted); }
.post-footer a { color: var(--ink-accent); }
.read-more { font-family: var(--display); font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; }

/* archive headings, pagination */
.archive-title { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--ink-accent); margin: 0 0 1.4em; padding-bottom: .5em; border-bottom: 1px solid var(--rule); letter-spacing: .03em; }
.archive-title span { color: var(--muted); font-weight: 400; font-family: var(--body); font-style: italic; letter-spacing: 0; }
.pagination { display: flex; justify-content: space-between; gap: 16px; margin: 8px 0 0; padding-top: 18px; border-top: 1px solid var(--rule); font-family: var(--display); font-size: .82rem; letter-spacing: .05em; text-transform: uppercase; }
.pagination a { text-decoration: none; }
.post-nav { display: flex; justify-content: space-between; gap: 16px; margin-top: 28px; padding-top: 16px; border-top: 1px solid var(--rule); font-size: .92rem; }
.post-nav a { text-decoration: none; max-width: 48%; }
.post-nav .label { display: block; font-family: var(--display); font-size: .72rem; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }

/* ---------- sidebar ---------- */
.sidebar { font-size: .95rem; }
.widget { margin: 0 0 30px; padding: 0 0 22px; border-bottom: 1px solid var(--rule-soft); }
.widget:last-child { border-bottom: 0; }
.widget h2 { font-family: var(--display); font-weight: 600; font-size: .86rem; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-accent); margin: 0 0 .7em; }
.widget ul { list-style: none; margin: 0; padding: 0; }
.widget li { margin: 0 0 .45em; padding-left: 0; line-height: 1.4; }
.widget a { text-decoration: none; }
.widget a:hover { text-decoration: underline; }
.widget .hh-books li { padding: .35em 0; border-bottom: 1px dotted var(--rule-soft); }
.widget .hh-books li:last-child { border-bottom: 0; }
.widget .search-form { display: flex; gap: 6px; }
.widget .search-form label { flex: 1; }
.widget .search-field { width: 100%; font: inherit; padding: .4em .6em; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); }
.widget .search-submit { font: inherit; font-size: .85rem; padding: .4em .8em; border: 1px solid var(--gold); background: var(--gold); color: #fff; border-radius: 6px; cursor: pointer; }
.widget .search-submit:hover { background: var(--bronze); border-color: var(--bronze); }
.widget select { max-width: 100%; font: inherit; }

/* ---------- comments ---------- */
.comments { margin-top: 40px; padding-top: 20px; border-top: 1px solid var(--rule); }
.comments h2, .comments h3 { font-family: var(--display); font-weight: 600; font-size: 1rem; letter-spacing: .05em; text-transform: uppercase; color: var(--ink-accent); }
.comment-list, .comment-list .children { list-style: none; padding: 0; margin: 0; }
.comment-list .children { margin-left: 24px; }
.comment-list li { margin: 0 0 18px; }
.comment-list .comment-body { background: var(--surface-card); border: 1px solid var(--rule-card); border-radius: 8px; padding: 12px 16px; font-size: .95rem; }
.comment-list .comment-meta { font-size: .85rem; color: var(--muted); margin-bottom: .4em; }
.comment-list .comment-meta a { color: var(--ink-accent); }
.comment-list .avatar { display: none; }
.comment-list .reply a { font-size: .82rem; }
.comment-form label { display: block; font-size: .88rem; color: var(--muted); margin-top: .8em; }
.comment-form input[type=text], .comment-form input[type=email], .comment-form input[type=url], .comment-form textarea { width: 100%; font: inherit; padding: .45em .6em; border: 1px solid var(--rule); border-radius: 6px; background: var(--surface); color: var(--ink); }
.comment-form .submit { font: inherit; padding: .5em 1.1em; border: 1px solid var(--gold); background: var(--gold); color: #fff; border-radius: 6px; cursor: pointer; margin-top: .8em; }
.comment-form .comment-notes, .comment-form .logged-in-as { font-size: .85rem; color: var(--muted); }

/* ---------- footer ---------- */
.site-footer { border-top: 1px solid var(--rule); margin: 0 auto; max-width: 1120px; padding: 18px 24px 40px; color: var(--muted); font-size: .85rem; display: flex; justify-content: space-between; gap: 12px 24px; flex-wrap: wrap; }
.site-footer a { color: var(--ink-accent); text-decoration: none; }
.site-footer a:hover { text-decoration: underline; }

/* ---------- accessibility, print ---------- */
.screen-reader-text { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
@media print { .masthead, .sidebar, .site-footer, .comments, .pagination, .post-nav { display: none; } .page { display: block; } body { background: #fff; color: #000; } }
