/* Static content pages (blog, guides, service pages) rendered by scripts/content/render.mjs.
   Palette follows the React site: ivory, beige, charcoal; beige is darkened for small text contrast. */
:root {
  color-scheme: light;
  --ivory: #f5ede0;
  --paper: #fbf7f1;
  --charcoal: #1a1a1a;
  --ink: #2a2420;
  --muted: #5c524a;
  --beige: #c4956a;
  --brown: #7a5434;
  --line: rgba(122, 84, 52, .18);
  --serif: "EB Garamond", Georgia, "Times New Roman", serif;
  --label: Raleway, "Helvetica Neue", Arial, sans-serif;
  --sans: system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ivory); color: var(--ink); font: 17px/1.75 var(--sans); overflow-x: hidden; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--brown); text-underline-offset: 3px; }
a:hover { color: var(--charcoal); }
:focus-visible { outline: 2px solid var(--brown); outline-offset: 3px; }
h1, h2, h3 { font-family: var(--serif); font-weight: 400; color: var(--charcoal); line-height: 1.15; }

.wrap { width: min(1120px, calc(100% - 32px)); margin: 0 auto; }
.skip-link { position: absolute; left: 16px; top: -60px; z-index: 10; padding: 10px 16px; background: var(--charcoal); color: var(--ivory); }
.skip-link:focus { top: 12px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 5; border-bottom: 1px solid var(--line); background: rgba(245, 237, 224, .94); backdrop-filter: blur(10px); }
.header-inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--brown); }
.brand img { width: auto; height: 40px; }
.brand span { font: 600 10px/1 var(--label); letter-spacing: .3em; text-transform: uppercase; }
.site-header nav { margin-left: auto; }
.site-header nav ul { display: flex; gap: 6px 22px; margin: 0; padding: 0; list-style: none; }
.site-header nav a { font: 600 11px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; color: var(--ink); text-decoration: none; padding: 8px 0; }
.site-header nav a:hover, .site-header nav a[aria-current="page"] { color: var(--brown); box-shadow: inset 0 -1px 0 var(--beige); }

/* Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 20px; border-radius: 999px; background: var(--charcoal); color: var(--ivory); font: 700 10px/1 var(--label); letter-spacing: .16em; text-transform: uppercase; text-decoration: none; transition: background .2s; }
.btn:hover { background: var(--brown); color: #fff; }
.btn-small { min-height: 38px; padding: 0 16px; }
.btn-ghost { background: transparent; color: var(--ivory); box-shadow: inset 0 0 0 1px rgba(245, 237, 224, .35); }
.btn-ghost:hover { background: rgba(245, 237, 224, .1); }
.text-link { font: 600 12px/1.4 var(--label); letter-spacing: .08em; color: var(--beige); }
.visit-card .text-link:hover { color: var(--ivory); }

/* Breadcrumb */
.breadcrumb ol { display: flex; flex-wrap: wrap; gap: 4px 0; margin: 28px 0 0; padding: 0; list-style: none; font: 500 12px/1.5 var(--label); color: var(--muted); }
.breadcrumb li + li::before { content: "/"; margin: 0 10px; color: var(--beige); }
.breadcrumb a { color: var(--muted); }
.breadcrumb [aria-current] { color: var(--ink); }

/* Entry (article or service page) */
.eyebrow { margin: 0 0 16px; font: 700 11px/1.4 var(--label); letter-spacing: .24em; text-transform: uppercase; color: var(--brown); }
.eyebrow a { color: inherit; text-decoration: none; }
.eyebrow a:hover { text-decoration: underline; }
.entry-header { max-width: 820px; padding: 44px 0 34px; }
.entry-header h1, .blog-header h1 { margin: 0; font-size: clamp(38px, 6.4vw, 66px); letter-spacing: -.02em; }
.lead { margin: 24px 0 0; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.7; color: var(--muted); }
.article-meta { margin: 22px 0 0; font: 500 13px/1.6 var(--label); color: var(--muted); }
.entry-figure { margin: 0; }
.entry-figure img { width: 100%; max-height: 560px; object-fit: cover; border-radius: 2px; box-shadow: 0 24px 60px rgba(26, 26, 26, .12); }
.entry-figure figcaption { margin-top: 10px; font-size: 14px; color: var(--muted); }
.entry-layout { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 56px; padding: 56px 0 24px; align-items: start; }
.entry-content { min-width: 0; max-width: 740px; }

.toc { margin-bottom: 40px; padding: 22px 24px; border-left: 2px solid var(--beige); background: var(--paper); }
.toc-title { margin: 0 0 8px; font: 700 11px/1.4 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--brown); }
.toc ol { margin: 0; padding-left: 20px; }
.toc li { margin: 4px 0; }

.prose h2 { margin: 52px 0 14px; font-size: clamp(28px, 3.6vw, 38px); scroll-margin-top: 90px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 32px 0 8px; font-size: 24px; scroll-margin-top: 90px; }
.prose p, .prose li { color: var(--ink); }
.prose p { margin: 0 0 18px; }
.prose ul, .prose ol { margin: 0 0 22px; padding-left: 22px; }
.prose li { margin: 8px 0; }
.prose li::marker { color: var(--brown); }
.prose strong { color: var(--charcoal); }
.callout { margin: 28px 0; padding: 20px 24px; border-radius: 2px; background: #fff; box-shadow: inset 3px 0 0 var(--beige); }
.callout p:last-child { margin-bottom: 0; }
.prose-figure { margin: 30px 0 34px; }
.prose-figure img { width: 100%; max-height: 520px; object-fit: cover; border-radius: 2px; background: rgba(196, 149, 106, .12); box-shadow: 0 16px 40px rgba(26, 26, 26, .08); }
.prose-figure figcaption { margin-top: 10px; font-size: 14px; line-height: 1.5; color: var(--muted); }
.table-wrap { margin: 24px 0 28px; overflow-x: auto; border: 1px solid var(--line); background: #fff; }
.prose table { width: 100%; min-width: 560px; border-collapse: collapse; font-size: 15px; line-height: 1.55; }
.prose th, .prose td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
.prose th { font: 700 11px/1.4 var(--label); letter-spacing: .1em; text-transform: uppercase; color: var(--brown); background: var(--paper); }
.prose tr:last-child td { border-bottom: 0; }
.commercial-link { margin: 36px 0 0; padding: 16px 20px; border: 1px solid var(--line); font: 500 14px/1.6 var(--label); }

.faq, .sources { margin-top: 56px; padding-top: 40px; border-top: 1px solid var(--line); }
.faq h2, .sources h2 { margin: 0 0 20px; font-size: clamp(28px, 3.4vw, 36px); }
.faq-item { margin-bottom: 14px; padding: 20px 22px; background: rgba(255, 255, 255, .6); border: 1px solid var(--line); }
.faq-item h3 { margin: 0 0 8px; font-size: 21px; }
.faq-item p { margin: 0; color: var(--muted); font-size: 16px; }
.sources ul { margin: 0; padding-left: 20px; font-size: 15px; color: var(--muted); }
.sources li { margin: 8px 0; }

.visit-card { position: sticky; top: 96px; padding: 28px; background: var(--charcoal); color: var(--ivory); }
.visit-card .eyebrow { color: var(--beige); }
.visit-card h2 { margin: 0 0 14px; font-size: 28px; color: var(--ivory); }
.visit-card p { margin: 0 0 12px; font-size: 14px; line-height: 1.7; color: rgba(245, 237, 224, .78); }
.visit-actions { display: grid; gap: 10px; margin: 20px 0 14px; }
.visit-actions .btn:first-child { background: var(--beige); color: var(--charcoal); }
.visit-actions .btn:first-child:hover { background: var(--ivory); }

/* Cards */
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 28px; margin: 0; padding: 0; list-style: none; }
.card { position: relative; display: flex; flex-direction: column; background: #fff; box-shadow: 0 16px 40px rgba(26, 26, 26, .06); transition: transform .25s, box-shadow .25s; }
.card:hover, .card:focus-within { transform: translateY(-3px); box-shadow: 0 22px 50px rgba(26, 26, 26, .1); }
.card-image { width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.card-body { display: flex; flex: 1; flex-direction: column; padding: 22px 22px 24px; }
.card-category { margin: 0 0 10px; font: 700 10px/1.4 var(--label); letter-spacing: .2em; text-transform: uppercase; color: var(--brown); }
.card h2, .card h3 { margin: 0 0 10px; font-size: 24px; }
.card-link { color: var(--charcoal); text-decoration: none; }
.card-link::after { content: ""; position: absolute; inset: 0; }
.card-link:hover, .card-link:focus-visible { text-decoration: underline; text-decoration-color: var(--beige); }
.card-body > p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--muted); }
.card-body .card-date { margin-top: auto; padding-top: 16px; font: 500 12px/1.4 var(--label); letter-spacing: .06em; color: var(--muted); }

.related { padding: 32px 0 80px; }
.related h2 { margin: 0 0 24px; font-size: clamp(28px, 3.4vw, 38px); }

/* Blog index */
.blog-header { max-width: 860px; padding: 48px 0 24px; }
.category-nav ul { display: flex; flex-wrap: wrap; gap: 10px; margin: 32px 0 0; padding: 0; list-style: none; }
.category-nav a { display: inline-flex; align-items: center; min-height: 40px; padding: 0 18px; border: 1px solid rgba(122, 84, 52, .35); border-radius: 999px; font: 700 10px/1 var(--label); letter-spacing: .14em; text-transform: uppercase; text-decoration: none; color: var(--brown); }
.category-nav a:hover { background: var(--charcoal); border-color: var(--charcoal); color: var(--ivory); }
.category { padding: 48px 0 16px; scroll-margin-top: 80px; }
.category-head { display: flex; flex-wrap: wrap; align-items: baseline; gap: 6px 24px; margin-bottom: 26px; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.category-head h2 { margin: 0; font-size: clamp(30px, 4vw, 42px); }
.category-head p { margin: 0; color: var(--muted); font-size: 15px; }
.services { margin: 56px 0 88px; padding: 32px; background: var(--paper); border: 1px solid var(--line); }
.services h2 { margin: 0 0 16px; font-size: 30px; }
.services ul { display: flex; flex-wrap: wrap; gap: 10px 28px; margin: 0; padding: 0; list-style: none; font: 600 13px/1.6 var(--label); }

.draft-banner { padding: 12px 16px; background: #8a1f11; color: #fff; font: 600 14px/1.5 var(--label); text-align: center; }

/* Footer */
.site-footer { padding: 56px 0; background: var(--charcoal); color: rgba(245, 237, 224, .75); font-size: 14px; }
.footer-grid { display: grid; grid-template-columns: 1.3fr 1fr 1fr; gap: 40px; }
.footer-title { margin: 0 0 14px; font: 700 11px/1.4 var(--label); letter-spacing: .22em; text-transform: uppercase; color: var(--beige); }
.site-footer p { margin: 0 0 10px; }
.site-footer ul { margin: 0; padding: 0; list-style: none; }
.site-footer li { margin: 0 0 8px; }
.site-footer a { color: var(--ivory); text-decoration: none; }
.site-footer a:hover { color: var(--beige); text-decoration: underline; }

@media (max-width: 960px) {
  .entry-layout { grid-template-columns: 1fr; gap: 40px; }
  .visit-card { position: static; }
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-grid { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 700px) {
  body { font-size: 16px; }
  .header-inner { flex-wrap: wrap; gap: 4px 16px; padding: 10px 0; min-height: 0; }
  .site-header { position: static; }
  .site-header nav { order: 3; width: 100%; margin: 0; overflow-x: auto; }
  .site-header nav ul { gap: 18px; }
  .btn-small { margin-left: auto; }
  .entry-header { padding-top: 28px; }
  .entry-layout { padding-top: 36px; }
  .cards { grid-template-columns: 1fr; }
  .footer-grid { grid-template-columns: 1fr; }
  .services { padding: 24px; }
  .toc { padding: 18px; }
}
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .card { transition: none; }
}
