/* Jasper County Historical Commission - public site
   Palette taken from the county's own landmarks: piney-woods green,
   the dark cast-aluminum of Texas historical markers, WPA brick,
   and pale limestone. */

:root {
  --paper: #EEF1EC;      /* limestone */
  --paper-2: #E3E8E1;
  --ink: #1C2420;
  --muted: #56635B;
  --pine: #22392D;
  --pine-2: #2F4A3B;
  --plate: #26302B;      /* marker metal */
  --silver: #D3D8CF;     /* raised marker letters */
  --brick: #8B3A2B;
  --brick-2: #732E22;
  --rule: #C3CBC1;
  --gold: #C4996C;      /* the Commission seal */
  --gold-2: #A97E52;
  --focus: #C4996C;

  --display: "Barlow Condensed", "Arial Narrow", sans-serif;
  --text: "Source Serif 4", Georgia, "Times New Roman", serif;

  --wrap: 1160px;
  --narrow: 760px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--text);
  font-size: 1.125rem;
  line-height: 1.65;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brick); text-underline-offset: .18em; text-decoration-thickness: 1px; }
a:hover { color: var(--brick-2); text-decoration-thickness: 2px; }
:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }

h1, h2, h3 {
  font-family: var(--display);
  font-weight: 600;
  line-height: 1.08;
  letter-spacing: .005em;
  margin: 0 0 .5em;
  color: var(--pine);
}
h1 { font-size: clamp(2.4rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.75rem, 3vw, 2.3rem); }
h3 { font-size: 1.5rem; }
p { margin: 0 0 1em; }

.wrap { max-width: var(--wrap); margin: 0 auto; padding: 0 24px; }
.wrap.narrow { max-width: var(--narrow); }
.lead { font-size: 1.25rem; color: var(--muted); max-width: 40em; }
.muted { color: var(--muted); }

.skip { position: absolute; left: -999px; top: 0; background: #fff; padding: 8px 12px; z-index: 10; }
.skip:focus { left: 8px; }

.demo-banner {
  background: var(--gold);
  color: #1d1606;
  font-family: var(--display);
  font-size: 1rem;
  letter-spacing: .02em;
  text-align: center;
  padding: 6px 16px;
}

/* ---------- Header ---------- */
.site-header { background: var(--paper); border-bottom: 1px solid var(--rule); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 80px; }
.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--pine); margin-right: auto; }
.brand-text { display: flex; flex-direction: column; font-family: var(--display); line-height: 1; }
.brand-county { font-size: 1rem; font-weight: 500; color: var(--muted); }
.brand-org { font-size: 1.45rem; font-weight: 700; }
.brand img { border-radius: 50%; }
.site-nav ul { list-style: none; margin: 0; padding: 0; display: flex; gap: 4px; align-items: center; }
.site-nav a {
  display: block; padding: 8px 10px; text-decoration: none; white-space: nowrap;
  font-family: var(--display); font-size: 1.15rem; font-weight: 500; color: var(--ink);
  border-bottom: 2px solid transparent;
}
.site-nav a:hover { color: var(--pine); border-bottom-color: var(--rule); }
.site-nav a[aria-current="page"] { color: var(--pine); border-bottom-color: var(--pine); }
.site-nav a.nav-cta { background: var(--pine); color: var(--paper); border-radius: 3px; margin-left: 8px; border: 0; }
.site-nav a.nav-cta:hover, .site-nav a.nav-cta[aria-current="page"] { background: var(--pine-2); color: #fff; }
.nav-toggle { display: none; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-block; padding: 11px 20px; border-radius: 3px; border: 2px solid transparent;
  font-family: var(--display); font-size: 1.15rem; font-weight: 600; letter-spacing: .01em;
  text-decoration: none; cursor: pointer; line-height: 1.2;
}
.btn-primary { background: var(--brick); color: #fff; }
.btn-primary:hover { background: var(--brick-2); color: #fff; }
.btn-ghost { border-color: var(--pine); color: var(--pine); background: transparent; }
.btn-ghost:hover { background: var(--pine); color: var(--paper); }
.btn-light { background: var(--silver); color: var(--plate); }
.btn-light:hover { background: #fff; color: var(--plate); }
.btn-outline-light { border-color: var(--silver); color: var(--silver); }
.btn-outline-light:hover { background: rgba(211,216,207,.12); color: #fff; }

/* ---------- Hero: a Texas historical marker plate ---------- */
.hero { padding: 48px 0 56px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 40px; align-items: stretch; }
.marker {
  background: var(--plate);
  border-radius: 14px;
  padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.06), 0 1px 0 rgba(0,0,0,.25);
  /* faint cast-metal grain */
  background-image: radial-gradient(rgba(255,255,255,.035) 1px, transparent 1px);
  background-size: 4px 4px;
}
.marker-inner {
  height: 100%;
  border: 2px solid var(--silver);
  border-radius: 9px;
  padding: 40px 40px 36px;
  display: flex; flex-direction: column; align-items: center; text-align: center;
  color: var(--silver);
}
.marker-seal { margin-bottom: 20px; border-radius: 50%; box-shadow: 0 0 0 3px var(--plate), 0 0 0 4px rgba(196,153,108,.5); }
.marker-motto { font-family: var(--display); font-size: 1.35rem; font-weight: 500; color: var(--gold); margin: -8px 0 18px; letter-spacing: .02em; }
.marker-title {
  color: var(--silver);
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  font-size: clamp(2rem, 3.6vw, 2.9rem);
  line-height: 1.02;
  text-shadow: 0 1px 0 rgba(0,0,0,.45);
  margin-bottom: 20px;
}
.marker-text { font-size: 1.15rem; line-height: 1.6; max-width: 30em; color: #C4CAC1; margin-bottom: 28px; }
.marker-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: auto; }

.hero-photo { margin: 0; display: flex; flex-direction: column; }
.hero-photo { justify-content: center; }
.hero-photo img { width: 100%; height: auto; border-radius: 2px; background: #fff; box-shadow: 0 1px 2px rgba(28,36,32,.18), 0 12px 28px -12px rgba(28,36,32,.35); transform: rotate(-1.2deg); }
.hero-photo figcaption { font-size: .95rem; color: var(--muted); margin-top: 18px; font-style: italic; max-width: 34em; }

/* ---------- Sections ---------- */
.band { padding: 56px 0; border-top: 1px solid var(--rule); }
.band-tint { background: var(--paper-2); }
.section-title { margin-bottom: 28px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.section-head .section-title { margin-bottom: 28px; }

.event-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 28px; }
.event { display: grid; grid-template-columns: 96px 1fr; gap: 24px; align-items: start; }
.event-date {
  background: var(--pine); color: var(--paper); text-align: center; border-radius: 4px;
  font-family: var(--display); padding: 10px 6px 12px;
}
.event-month { display: block; font-size: 1.1rem; font-weight: 500; }
.event-day { display: block; font-size: 2.1rem; font-weight: 700; line-height: 1; }
.event h3 { margin-bottom: .2em; }
.event h3 a { color: var(--pine); text-decoration: none; }
.event h3 a:hover { text-decoration: underline; }
.event-when { font-weight: 600; color: var(--ink); }

.pillars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.pillar { border-top: 3px solid var(--pine); padding-top: 18px; }
.pillar p { color: var(--ink); }

.news-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 40px; }
.news-item img { aspect-ratio: 3 / 2; object-fit: cover; object-position: top; width: 100%; border-radius: 3px; margin-bottom: 14px; }
.news-item h3 a, .post-row h2 a { color: var(--pine); text-decoration: none; }
.news-item h3 a:hover, .post-row h2 a:hover { text-decoration: underline; }
.news-meta { font-size: .95rem; color: var(--muted); margin-bottom: .4em; }
.news-meta a { color: var(--muted); }

.visit-strip { background: var(--pine); color: var(--paper); border-top: 0; }
.visit-strip .section-title { color: #fff; margin-bottom: 10px; }
.visit-strip .lead { color: #C9D2CB; }
.visit-strip a { color: #fff; }
.visit-grid { display: grid; grid-template-columns: 1.1fr 1.4fr auto; gap: 40px; align-items: start; }
.visit-facts { margin: 0; display: grid; grid-template-columns: repeat(3, 1fr); gap: 24px; }
.visit-facts.stacked { grid-template-columns: 1fr; gap: 18px; }
.visit-facts dt { font-family: var(--display); font-size: 1.1rem; font-weight: 600; color: #A9B8AE; }
.visit-facts.stacked dt { color: var(--muted); }
.visit-facts dd { margin: 0; }
.visit-action { display: flex; flex-direction: column; gap: 12px; }
.visit-strip .btn-ghost { border-color: var(--silver); color: var(--silver); }
.visit-strip .btn-ghost:hover { background: rgba(255,255,255,.1); color: #fff; }

/* Photograph collection: prints with a white border, like the originals */
.gallery-band { background: var(--plate); border-top: 0; }
.gallery-band .section-title { color: var(--silver); }
.gallery-band .section-head a { color: var(--gold); }
.gallery { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.gallery figure { margin: 0; }
.gallery img { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; background: #f4f3ee; padding: 8px; border-radius: 2px; filter: grayscale(.15); }
.gallery a:hover img { filter: none; }
.gallery figcaption { color: #AEB6AD; font-size: .95rem; line-height: 1.45; margin-top: 10px; }

/* ---------- Inner pages ---------- */
.page-head { padding: 56px 0 32px; border-bottom: 1px solid var(--rule); margin-bottom: 40px; }
.page-head h1 { margin-bottom: .3em; }
.page-body { padding-bottom: 64px; }
.page-figure { margin: 0 0 32px; }
.page-figure img { border-radius: 4px; width: 100%; max-height: 520px; object-fit: cover; }
.prose { font-size: 1.15rem; line-height: 1.75; }
.prose h2 { margin-top: 1.6em; }
.prose h3 { margin-top: 1.4em; }
.prose ul, .prose ol { padding-left: 1.3em; }
.prose li { margin-bottom: .5em; }
.prose blockquote { margin: 1.5em 0; padding-left: 20px; border-left: 3px solid var(--pine); color: var(--muted); font-style: italic; }
.prose img { border-radius: 4px; margin: 1.5em auto; max-height: 900px; width: auto; }
.prose table { border-collapse: collapse; width: 100%; font-size: 1rem; }
.prose th, .prose td { border-bottom: 1px solid var(--rule); padding: 8px; text-align: left; }
.page-cta { margin-top: 48px; padding-top: 24px; border-top: 1px solid var(--rule); display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.page-cta p { margin: 0; font-family: var(--display); font-size: 1.35rem; color: var(--pine); }

.tabs { display: flex; gap: 6px; margin-top: 20px; flex-wrap: wrap; }
.tabs a { font-family: var(--display); font-size: 1.1rem; padding: 6px 14px; border: 1px solid var(--rule); border-radius: 3px; text-decoration: none; color: var(--ink); }
.tabs a[aria-current="page"] { background: var(--pine); border-color: var(--pine); color: var(--paper); }
.post-list { display: grid; gap: 36px; padding-bottom: 32px; }
.post-row { display: grid; grid-template-columns: 200px 1fr; gap: 28px; padding-bottom: 36px; border-bottom: 1px solid var(--rule); }
.post-row:not(:has(.post-thumb)) { grid-template-columns: 1fr; }
.post-thumb img { aspect-ratio: 4 / 3; object-fit: cover; object-position: top; border-radius: 3px; }
.post-row h2 { font-size: 1.8rem; margin-bottom: .25em; }
.pager { display: flex; gap: 24px; justify-content: center; padding: 16px 0 64px; font-family: var(--display); font-size: 1.15rem; }
.empty { color: var(--muted); padding: 24px 0 64px; }
.event-box { display: grid; grid-template-columns: auto 1fr; gap: 6px 20px; background: var(--paper-2); border-left: 4px solid var(--pine); padding: 18px 22px; margin: 0 0 32px; }
.event-box div { display: contents; }
.event-box dt { font-family: var(--display); font-weight: 600; font-size: 1.15rem; color: var(--pine); }
.event-box dd { margin: 0; }
.draft-flag { display: inline-block; background: var(--gold); color: #1d1606; padding: 2px 10px; border-radius: 3px; font-family: var(--display); }
.post-foot { margin-top: 40px; color: var(--muted); font-size: 1rem; }

/* ---------- Contact ---------- */
.contact-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 64px; padding-bottom: 72px; }
.contact-form label { display: block; font-family: var(--display); font-weight: 600; font-size: 1.2rem; color: var(--pine); margin: 18px 0 6px; }
.contact-form .optional { font-family: var(--text); font-weight: 400; font-size: .95rem; color: var(--muted); }
.contact-form input, .contact-form select, .contact-form textarea {
  width: 100%; font: inherit; font-size: 1.05rem; padding: 11px 12px; color: var(--ink);
  background: #fff; border: 1px solid #A7B2A9; border-radius: 3px;
}
.contact-form textarea { resize: vertical; min-height: 180px; }
.contact-form input:focus, .contact-form select:focus, .contact-form textarea:focus { border-color: var(--pine); outline: 3px solid rgba(192,138,30,.5); outline-offset: 0; }
.contact-form [aria-invalid="true"] { border-color: var(--brick); background: #FBF4F2; }
.contact-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; }
.contact-form button { margin-top: 26px; }
.field-help { font-size: .98rem; color: var(--muted); margin: -2px 0 8px; }
.field-error { display: block; color: var(--brick); font-size: .98rem; margin-top: 6px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.notice { padding: 18px 22px; border-radius: 4px; margin-bottom: 20px; }
.notice h2 { font-size: 1.8rem; margin-bottom: .3em; }
.notice-ok { background: #E1EBDD; border-left: 4px solid var(--pine); }
.notice-bad { background: #F6E6E2; border-left: 4px solid var(--brick); }
.contact-aside h2 { font-size: 1.6rem; }

/* ---------- Footer ---------- */
.site-footer { background: var(--plate); color: #BFC6BD; font-size: 1rem; padding-top: 48px; }
.site-footer a { color: var(--silver); }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 40px; padding-bottom: 32px; }
.footer-name { font-family: var(--display); font-size: 1.5rem; font-weight: 600; color: var(--silver); margin-bottom: .4em; }
.footer-head { font-family: var(--display); font-size: 1.15rem; font-weight: 600; color: var(--silver); margin-bottom: .3em; }
.footer-hours { font-size: .95rem; }
.fb { display: inline-flex; gap: 8px; align-items: center; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(211,216,207,.18); padding-top: 16px; padding-bottom: 24px; font-size: .92rem; }
.footer-base p { margin: 0; }

/* ---------- Small screens ---------- */
@media (max-width: 960px) {
  .hero-grid, .visit-grid, .contact-grid { grid-template-columns: 1fr; }
  .hero-photo { order: -1; }
  .pillars, .news-grid { grid-template-columns: 1fr; gap: 32px; }
  .gallery { grid-template-columns: repeat(2, 1fr); gap: 20px; }
  .hero-photo img { transform: none; }
  .visit-facts { grid-template-columns: 1fr 1fr; }
  .visit-action { flex-direction: row; flex-wrap: wrap; }
  .footer-grid { grid-template-columns: 1fr; gap: 24px; }
  .contact-grid { gap: 40px; }
}
@media (max-width: 1040px) {
  .nav-toggle {
    display: inline-block; font-family: var(--display); font-size: 1.15rem; font-weight: 600;
    background: transparent; color: var(--pine); border: 2px solid var(--pine); border-radius: 3px; padding: 6px 14px; cursor: pointer;
  }
  .header-inner { flex-wrap: wrap; }
  .site-nav { display: none; width: 100%; padding-bottom: 14px; }
  .site-nav.open { display: block; }
  .site-nav ul { flex-direction: column; align-items: stretch; gap: 0; }
  .site-nav a { padding: 12px 4px; border-bottom: 1px solid var(--rule); }
  .site-nav a[aria-current="page"] { border-bottom-color: var(--pine); }
  .site-nav a.nav-cta { margin: 12px 0 0; text-align: center; }
}
@media (max-width: 600px) {
  body { font-size: 1.06rem; }
  .wrap { padding: 0 16px; }
  .hero { padding: 24px 0 40px; }
  .marker-inner { padding: 28px 18px 24px; }
  .band { padding: 44px 0; }
  .event { grid-template-columns: 72px 1fr; gap: 16px; }
  .event-day { font-size: 1.7rem; }
  .post-row { grid-template-columns: 1fr; }
  .contact-form .two { grid-template-columns: 1fr; gap: 0; }
  .visit-facts { grid-template-columns: 1fr; }
  .footer-base { flex-direction: column; }
}
@media (prefers-reduced-motion: reduce) { * { scroll-behavior: auto !important; transition: none !important; } }
