/* J.B. Peacock — jbpeacock.com */
:root {
  --ink: #101814;
  --ink-soft: #1a2620;
  --paper: #f4efe5;
  --paper-deep: #e8dfcf;
  --gold: #c9a45f;
  --gold-bright: #e3c27e;
  --sage: #aebfb3;
  --muted: #69766f;
  --white: #fffdf8;
  --shadow: 0 24px 70px rgba(0, 0, 0, .22);
  --radius: 18px;
  --content: 1160px;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  margin: 0;
  color: var(--ink);
  background: var(--paper);
  font-family: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 1rem;
  line-height: 1.7;
  text-rendering: optimizeLegibility;
}
img { max-width: 100%; display: block; }
a { color: inherit; }
p { margin: 0 0 1.15rem; }
h1, h2, h3 {
  margin: 0 0 .75rem;
  font-family: Georgia, "Times New Roman", serif;
  line-height: 1.08;
  letter-spacing: -.025em;
}
h1 { font-size: clamp(3rem, 8vw, 6.8rem); }
h2 { font-size: clamp(2rem, 4vw, 3.6rem); }
h3 { font-size: clamp(1.35rem, 2.2vw, 1.8rem); }

.skip-link {
  position: fixed; top: .75rem; left: .75rem; z-index: 1000;
  transform: translateY(-180%); padding: .65rem 1rem;
  border-radius: 999px; background: var(--white); color: var(--ink);
}
.skip-link:focus { transform: none; }

.site-header {
  position: sticky; top: 0; z-index: 100;
  color: var(--white);
  background: rgba(11, 18, 15, .93);
  border-bottom: 1px solid rgba(255,255,255,.1);
  backdrop-filter: blur(14px);
}
.nav-shell {
  width: min(calc(100% - 2rem), var(--content));
  min-height: 70px; margin: auto;
  display: flex; align-items: center; justify-content: space-between; gap: 1.5rem;
}
.brand {
  text-decoration: none; font-family: Georgia, "Times New Roman", serif;
  font-size: 1.25rem; font-weight: 700; letter-spacing: .02em;
}
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: .25rem; }
.site-nav a {
  padding: .5rem .75rem; border-radius: 999px;
  color: rgba(255,255,255,.78); text-decoration: none; font-size: .94rem;
}
.site-nav a:hover, .site-nav a:focus-visible, .site-nav a[aria-current="page"] {
  color: var(--white); background: rgba(255,255,255,.1);
}

.hero {
  min-height: 78vh; color: var(--white); display: grid; place-items: center;
  background-image:
    linear-gradient(90deg, rgba(8, 14, 11, .92) 0%, rgba(8, 14, 11, .7) 46%, rgba(8, 14, 11, .24) 100%),
    url('../images/archivebg.webp'),
    url('../images/archivebg.jpg');
  background-size: cover; background-position: center;
}
.hero-inner {
  width: min(calc(100% - 2rem), var(--content)); padding: 6rem 0;
}
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  margin-bottom: 1.1rem; color: var(--gold-bright);
  font-size: .8rem; font-weight: 800; letter-spacing: .16em; text-transform: uppercase;
}
.eyebrow::before { content: ""; width: 2.2rem; height: 1px; background: currentColor; }
.hero h1 { max-width: 820px; text-wrap: balance; }
.hero-copy { max-width: 670px; color: rgba(255,255,255,.82); font-size: clamp(1.05rem, 2vw, 1.3rem); }
.actions { display: flex; flex-wrap: wrap; gap: .8rem; margin-top: 2rem; }
.button {
  display: inline-flex; align-items: center; justify-content: center;
  min-height: 48px; padding: .75rem 1.15rem; border: 1px solid transparent;
  border-radius: 999px; text-decoration: none; font-weight: 750;
}
.button-primary { background: var(--gold); color: #17130c; }
.button-primary:hover, .button-primary:focus-visible { background: var(--gold-bright); }
.button-secondary { border-color: rgba(255,255,255,.38); color: var(--white); background: rgba(0,0,0,.18); }
.button-secondary:hover, .button-secondary:focus-visible { background: rgba(255,255,255,.1); }
.button-dark { background: var(--ink); color: var(--white); }
.button-dark:hover, .button-dark:focus-visible { background: var(--ink-soft); }

.section { padding: clamp(4rem, 8vw, 7rem) 0; }
.section-dark { background: var(--ink); color: var(--white); }
.section-muted { background: var(--paper-deep); }
.container { width: min(calc(100% - 2rem), var(--content)); margin: auto; }
.section-heading { max-width: 720px; margin-bottom: 2.2rem; }
.section-heading p { color: var(--muted); font-size: 1.08rem; }
.section-dark .section-heading p { color: rgba(255,255,255,.68); }

.grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.15rem; }
.card {
  display: flex; flex-direction: column; min-height: 100%; padding: 1.5rem;
  background: rgba(255,255,255,.72); border: 1px solid rgba(16,24,20,.1);
  border-radius: var(--radius); box-shadow: 0 10px 30px rgba(31, 37, 33, .06);
}
.card:hover { transform: translateY(-2px); box-shadow: 0 18px 40px rgba(31,37,33,.11); }
.card, .card:hover { transition: transform .2s ease, box-shadow .2s ease; }
.card p { color: #4f5a54; }
.card .meta { margin-bottom: .8rem; color: #6a5a3e; font-size: .76rem; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.card-link { margin-top: auto; font-weight: 800; text-underline-offset: .2em; }
.section-dark .card { background: rgba(255,255,255,.06); border-color: rgba(255,255,255,.1); box-shadow: none; }
.section-dark .card p { color: rgba(255,255,255,.68); }
.section-dark .card .meta { color: var(--gold-bright); }

.page-hero { padding: clamp(4rem, 8vw, 7rem) 0; background: var(--ink); color: var(--white); }
.page-hero h1 { font-size: clamp(2.7rem, 7vw, 5.4rem); }
.page-hero p { max-width: 720px; color: rgba(255,255,255,.72); font-size: 1.15rem; }
.prose { max-width: 760px; }
.prose h2 { margin-top: 2.2rem; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.prose h3 { margin-top: 1.7rem; }
.prose li { margin-bottom: .6rem; }
.prose code { padding: .15em .35em; border-radius: .35rem; background: #e3dbc9; font-size: .92em; }
.callout { margin: 1.7rem 0; padding: 1.15rem 1.25rem; border-left: 4px solid var(--gold); background: #eee5d5; border-radius: 0 12px 12px 0; }

.story-banner {
  min-height: 48vh; display: grid; align-items: end; color: var(--white);
  background-image: linear-gradient(rgba(8,14,11,.45), rgba(8,14,11,.9)), url('../images/archivebg.webp');
  background-size: cover; background-position: center;
}
.story-banner .container { padding-top: 5rem; padding-bottom: 3rem; }
.story-banner h1 { font-size: clamp(2.8rem, 7vw, 5.3rem); max-width: 900px; }
.story-status { max-width: 760px; padding: 2rem; border: 1px solid rgba(16,24,20,.12); border-radius: var(--radius); background: var(--white); box-shadow: var(--shadow); }

.contact-panel {
  display: grid; grid-template-columns: 1.1fr .9fr; gap: 2rem; align-items: center;
  padding: clamp(2rem, 5vw, 4rem); border-radius: 26px; background: var(--ink); color: var(--white);
}
.contact-panel p { color: rgba(255,255,255,.7); }
.contact-box { padding: 1.25rem; border-radius: 16px; background: rgba(255,255,255,.07); border: 1px solid rgba(255,255,255,.1); }

.site-footer { padding: 2.4rem 0; background: #0a0f0d; color: rgba(255,255,255,.66); }
.footer-shell { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
.footer-shell a { color: var(--white); }

@media (max-width: 850px) {
  .grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .contact-panel { grid-template-columns: 1fr; }
  .nav-shell { align-items: flex-start; padding: .85rem 0; flex-direction: column; gap: .65rem; }
  .site-nav { width: 100%; }
  .site-header { position: relative; }
}
@media (max-width: 560px) {
  .grid { grid-template-columns: 1fr; }
  .hero { min-height: 70vh; background-position: 43% center; }
  .site-nav a { padding-left: .55rem; padding-right: .55rem; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition: none !important; }
}


/* Reading pages */
.story-card-details {
  margin-top: auto;
  margin-bottom: .55rem;
  color: var(--muted) !important;
  font-size: .88rem;
}
.card .story-card-details + .card-link { margin-top: 0; }
.story-banner-content { padding-right: 1rem; }
.story-byline {
  margin: .25rem 0 1rem;
  color: rgba(255,255,255,.82);
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.2rem;
}
.story-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1.2rem;
  color: rgba(255,255,255,.72);
  font-size: .92rem;
}
.story-meta span + span::before {
  content: "•";
  margin-right: 1.2rem;
  color: var(--gold-bright);
}
.story-section { padding: clamp(2.5rem, 7vw, 6rem) 0; }
.story-shell {
  width: min(calc(100% - 2rem), 780px);
  margin: auto;
}
.story-introduction {
  margin: 0 0 clamp(3rem, 7vw, 5.5rem);
  padding: 1.2rem 1.35rem;
  border-left: 4px solid var(--gold);
  border-radius: 0 14px 14px 0;
  background: var(--paper-deep);
}
.story-introduction p { margin-bottom: .45rem; color: #49534e; }
.story-introduction a { font-weight: 800; text-underline-offset: .2em; }
.story-text {
  color: #1b211e;
  font-family: Georgia, "Times New Roman", serif;
  font-size: clamp(1.08rem, 1.8vw, 1.22rem);
  line-height: 1.82;
  hanging-punctuation: first last;
}
.story-text p {
  margin: 0 0 .95rem;
  text-indent: 1.35em;
}
.story-text h2 + p,
.story-text p:first-child { text-indent: 0; }
.chapter-number,
.chapter-title {
  position: relative;
  margin: clamp(4rem, 9vw, 7rem) 0 2.2rem;
  padding-top: 1.4rem;
  color: var(--ink);
  text-align: center;
  font-size: clamp(1.55rem, 3vw, 2.15rem);
  letter-spacing: .01em;
}
.chapter-number::before,
.chapter-title::before {
  content: "";
  position: absolute;
  top: 0;
  left: 50%;
  width: 4.5rem;
  height: 1px;
  transform: translateX(-50%);
  background: var(--gold);
}
.story-text > h2:first-child { margin-top: 0; }
.story-end {
  margin: clamp(3rem, 8vw, 6rem) 0;
  color: var(--gold);
  text-align: center;
  font-size: 1.2rem;
}
.story-navigation {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  padding-top: 1.5rem;
  border-top: 1px solid rgba(16,24,20,.13);
}
.story-nav-card {
  display: flex;
  min-height: 112px;
  flex-direction: column;
  justify-content: center;
  padding: 1rem 1.15rem;
  border: 1px solid rgba(16,24,20,.12);
  border-radius: 14px;
  background: rgba(255,255,255,.55);
  text-decoration: none;
}
.story-nav-card:hover,
.story-nav-card:focus-visible { background: var(--white); }
.story-nav-card span {
  color: var(--muted);
  font-size: .76rem;
  font-weight: 800;
  letter-spacing: .1em;
  text-transform: uppercase;
}
.story-nav-card strong {
  margin-top: .3rem;
  font-family: Georgia, "Times New Roman", serif;
  font-size: 1.1rem;
}
.story-nav-next { text-align: right; }

@media (max-width: 560px) {
  .story-meta { display: block; }
  .story-meta span { display: block; }
  .story-meta span + span::before { content: none; }
  .story-navigation { grid-template-columns: 1fr; }
  .story-nav-spacer { display: none; }
  .story-nav-next { text-align: left; }
  .story-text { line-height: 1.72; }
  .story-text p { text-indent: 1.05em; }
}

@media print {
  .site-header,
  .story-introduction,
  .story-navigation,
  .site-footer { display: none !important; }
  body { background: #fff; color: #000; }
  .story-banner {
    min-height: auto;
    color: #000;
    background: none;
  }
  .story-banner .container { padding: 1.2in 0 .5in; }
  .story-banner .eyebrow { color: #000; }
  .story-byline,
  .story-meta { color: #000; }
  .story-section { padding: 0; }
  .story-shell { width: 100%; max-width: none; }
  .story-text { color: #000; font-size: 11pt; line-height: 1.5; }
  .chapter-number,
  .chapter-title { break-after: avoid; }
  .story-text p { orphans: 3; widows: 3; }
}
