/* John Mathew & Associates — minimal white theme.
   All colours live in :root; components use var(--…) only. */

:root {
  --primary:       #2b2b2b;   /* charcoal ink */
  --primary-dark:  #1a1a1a;
  --primary-light: #555459;
  --accent:        #8a6d3b;   /* muted brass, used sparingly */
  --accent-light:  #c9b48a;
  --bg:            #ffffff;
  --bg-alt:        #f7f7f5;
  --text:          #1d1d1d;
  --text-muted:    #6b6b6b;
  --border:        #e6e4df;
  --focus:         #8a6d3b;
  --font-heading:  'Cormorant Garamond', 'Palatino Linotype', Palatino, Georgia, serif;
  --font-body:     'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --section-padding: 88px 0;
  --header-h: 76px;

  /* Bootstrap hooks */
  --bs-body-bg: var(--bg);
  --bs-body-color: var(--text);
  --bs-link-color-rgb: 43, 43, 43;
  --bs-link-hover-color-rgb: 138, 109, 59;
}

html { scroll-padding-top: calc(var(--header-h) + 16px); }
@media (prefers-reduced-motion: no-preference) { html { scroll-behavior: smooth; } }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.7;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-heading);
  font-weight: 600;
  color: var(--primary-dark);
  letter-spacing: 0.005em;
  line-height: 1.2;
}
h1 { font-size: clamp(2.4rem, 4.5vw, 3.4rem); }
h2 { font-size: clamp(1.7rem, 3vw, 2.1rem); }
h3 { font-size: 1.45rem; }
.h5, h5 { font-family: var(--font-body); font-size: 0.8rem; font-weight: 600; text-transform: uppercase; letter-spacing: 0.12em; color: var(--text-muted); }

a { color: var(--primary); text-underline-offset: 3px; text-decoration-thickness: 1px; }
a:hover { color: var(--accent); }
::selection { background: var(--accent-light); color: var(--primary-dark); }

:focus-visible { outline: 2px solid var(--focus); outline-offset: 3px; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 2000;
  background: var(--primary); color: var(--bg); padding: 0.5rem 1rem;
}
.skip-link:focus { left: 1rem; top: 1rem; color: var(--bg); }

.noscript-bar { background: var(--bg-alt); border-bottom: 1px solid var(--border); padding: 0.6rem 1rem; text-align: center; font-size: 0.9rem; }

.text-muted-ink { color: var(--text-muted); }
.eyebrow {
  font-size: 0.75rem; font-weight: 600; letter-spacing: 0.16em; text-transform: uppercase;
  color: var(--accent); margin-bottom: 0.75rem;
}

.tagline { display: flex; flex-direction: column; text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.8rem; line-height: 1.5; color: var(--text-muted); }
.hero-lead .tagline { font-size: 1rem; letter-spacing: 0.12em; }

/* ---------- Header ---------- */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease;
}
.site-header.scrolled { border-bottom-color: var(--border); box-shadow: 0 2px 12px rgba(0,0,0,.04); }
.site-header .navbar { min-height: var(--header-h); }
.navbar-brand { display: flex; align-items: center; gap: 0.75rem; color: var(--primary-dark); }
.navbar-brand:hover { color: var(--primary-dark); }
.brand-mark { height: 48px; width: auto; }
.brand-text { display: flex; flex-direction: column; line-height: 1.15; }
.brand-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; }
.brand-sub { font-size: 0.68rem; letter-spacing: 0.08em; text-transform: uppercase; color: var(--text-muted); }

.navbar .nav-link { color: var(--text); font-size: 0.92rem; font-weight: 500; padding: 0.5rem 0.85rem; }
.navbar .nav-link:hover, .navbar .nav-link:focus { color: var(--accent); }
.navbar .nav-link.active { color: var(--primary-dark); box-shadow: inset 0 -1px 0 var(--accent); }
.navbar-toggler { border: 1px solid var(--border); }
.navbar-toggler:focus { box-shadow: none; outline: 2px solid var(--focus); }

.dropdown-menu { border: 1px solid var(--border); border-radius: 2px; box-shadow: 0 8px 24px rgba(0,0,0,.06); padding: 0.4rem 0; }
.dropdown-item { font-size: 0.9rem; padding: 0.45rem 1.1rem; color: var(--text); }
.dropdown-item:hover, .dropdown-item:focus { background: var(--bg-alt); color: var(--primary-dark); }
.dropdown-item.active, .dropdown-item:active { background: var(--bg-alt); color: var(--accent); }

@media (max-width: 1199.98px) {
  .navbar-collapse { border-top: 1px solid var(--border); margin-top: 0.5rem; padding: 0.5rem 0 1rem; }
  .navbar .nav-link.active { box-shadow: none; color: var(--accent); }
  .dropdown-menu { border: 0; box-shadow: none; padding-left: 0.75rem; }
  .nav-cta { margin-top: 0.5rem; }
}

/* ---------- Buttons ---------- */
.btn-ink, .btn-outline-ink {
  border-radius: 2px; font-weight: 500; letter-spacing: 0.02em; padding: 0.65rem 1.4rem;
  border: 1px solid var(--primary);
}
.btn-ink { background: var(--primary); color: var(--bg); }
.btn-ink:hover, .btn-ink:focus { background: var(--primary-dark); border-color: var(--primary-dark); color: var(--bg); }
.btn-outline-ink { background: transparent; color: var(--primary); }
.btn-outline-ink:hover, .btn-outline-ink:focus, .btn-outline-ink.active { background: var(--primary); color: var(--bg); }
.btn-sm.btn-outline-ink { padding: 0.4rem 1rem; }

.more-link { display: inline-block; font-size: 0.9rem; font-weight: 500; text-decoration: none; border-bottom: 1px solid var(--border); padding-bottom: 2px; margin-top: 0.5rem; }
.more-link:hover { border-bottom-color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: var(--section-padding); }
.section-alt { background: var(--bg-alt); border-top: 1px solid var(--border); border-bottom: 1px solid var(--border); }
.section-title { margin-bottom: 1rem; }
.lead-text { font-size: 1.15rem; color: var(--primary-light); max-width: 46rem; }

.home-hero { padding: 96px 0 80px; border-bottom: 1px solid var(--border); }
.hero-title { font-size: clamp(2.8rem, 6vw, 4.6rem); font-weight: 500; margin-bottom: 1rem; }
.hero-title .amp { font-style: italic; color: var(--accent); }
.hero-lead { font-size: 1.2rem; color: var(--primary-light); margin-bottom: 2rem; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; }
.hero-mark { max-height: 380px; width: auto; opacity: 0.92; }

.page-hero { padding: 64px 0 40px; }
.page-hero h1 { margin-bottom: 0.75rem; }
.page-hero h1::after { content: ""; display: block; width: 3rem; height: 1px; background: var(--accent); margin-top: 1.25rem; }

.crumbs { padding-top: 28px; font-size: 0.85rem; color: var(--text-muted); }
.crumbs a { color: var(--text-muted); text-decoration: none; }
.crumbs a:hover { color: var(--accent); }
.crumbs + .page-hero { padding-top: 16px; }

.prose p { margin-bottom: 1.25rem; }
.prose h2 { margin-top: 2.25rem; margin-bottom: 0.75rem; }

/* ---------- Lists ---------- */
.rule-list { list-style: none; padding: 0; margin: 0 0 1.25rem; }
.rule-list li { position: relative; padding: 0.6rem 0 0.6rem 1.5rem; border-bottom: 1px solid var(--border); }
.rule-list li::before { content: ""; position: absolute; left: 0; top: 1.3rem; width: 0.6rem; height: 1px; background: var(--accent); }

.two-col-list { list-style: none; padding: 0; columns: 1; margin: 1rem 0 1.25rem; }
.two-col-list li { padding: 0.35rem 0; break-inside: avoid; font-family: var(--font-heading); font-size: 1.25rem; }
@media (min-width: 576px) { .two-col-list { columns: 2; } }

.link-list { list-style: none; padding: 0; margin: 0; }
.link-list li { padding: 0.5rem 0; border-bottom: 1px solid var(--border); font-size: 0.93rem; }
.link-list li:last-child { border-bottom: 0; }
.ext { font-size: 0.7em; color: var(--text-muted); margin-left: 0.25rem; }

.contact-lines li { padding: 0.15rem 0; }
.contact-lines .label { display: inline-block; min-width: 3.5rem; font-size: 0.75rem; letter-spacing: 0.1em; text-transform: uppercase; color: var(--text-muted); }
address { font-style: normal; line-height: 1.7; }

.download-list li { padding: 0.5rem 0; }
.download-link { text-decoration: none; }
.download-link i { color: var(--primary-light); margin-right: 0.4rem; }

/* ---------- Cards & panels ---------- */
.area-card, .person-card, .article-teaser, .side-panel {
  background: var(--bg); border: 1px solid var(--border); border-radius: 2px; padding: 1.75rem;
}
.area-card { height: 100%; display: flex; flex-direction: column; transition: border-color .2s ease; }
.area-card:hover { border-color: var(--accent-light); }
.area-card h3 a { text-decoration: none; color: var(--primary-dark); }
.area-card p { color: var(--primary-light); flex-grow: 1; font-size: 0.95rem; }
.side-panel { margin-bottom: 1.5rem; }
.article-teaser { margin-bottom: 1.5rem; }
.article-teaser h3 a { text-decoration: none; }
.byline { font-size: 0.85rem; color: var(--text-muted); margin-bottom: 0.5rem; }

.person-card { height: 100%; }
.person-card h2 { font-size: 1.6rem; margin-bottom: 1rem; }
.person-card dl, .facts { margin: 0; }
.person-card dt, .facts dt { font-size: 0.72rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-top: 0.75rem; }
.person-card dd, .facts dd { margin: 0.15rem 0 0; font-size: 0.95rem; }

.note-box { border-left: 2px solid var(--accent); background: var(--bg-alt); padding: 0.85rem 1.1rem; font-size: 0.92rem; color: var(--primary-light); margin-bottom: 1.25rem; }

.post-card { background: var(--bg); border: 1px solid var(--border); border-radius: 2px; height: 100%; display: flex; flex-direction: column; }
.post-card-img { width: 100%; aspect-ratio: 16 / 9; object-fit: cover; border-bottom: 1px solid var(--border); }
.post-card-body { padding: 1.5rem; display: flex; flex-direction: column; flex-grow: 1; }
.post-card-body h2 { font-size: 1.5rem; }
.post-card-body h2 a { text-decoration: none; color: var(--primary-dark); }
.post-card-body p:not(.byline) { color: var(--primary-light); flex-grow: 1; font-size: 0.95rem; }
.post-hero-img { width: 100%; height: auto; margin-bottom: 2rem; border: 1px solid var(--border); }
/* Images inside post text: own line, full column width at most, centred,
   with breathing room. Without this they sit inline on the text baseline. */
.prose img {
  display: block;
  max-width: 100%;
  height: auto;
  margin: 1.5rem auto;
  border: 1px solid var(--border);
}
.prose p > img:first-child { margin-top: 0.5rem; }
.prose img + br { display: none; }  /* drop the line break the editor adds after an image */

/* ---------- Footer ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 64px 0 24px; font-size: 0.93rem; background: var(--bg); }
.footer-brand { display: flex; gap: 0.9rem; align-items: center; }
.footer-brand img { height: 48px; width: auto; }
.footer-name { font-family: var(--font-heading); font-size: 1.35rem; font-weight: 600; margin: 0; color: var(--primary-dark); }
.footer-heading { font-family: var(--font-body); font-size: 0.75rem; letter-spacing: 0.14em; text-transform: uppercase; color: var(--text-muted); font-weight: 600; margin-bottom: 1rem; }
.footer-links li { padding: 0.15rem 0; }
.footer-links a { text-decoration: none; }
.footer-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 0.5rem; border-top: 1px solid var(--border); margin-top: 48px; padding-top: 20px; font-size: 0.82rem; color: var(--text-muted); }
.footer-bottom a { color: var(--text-muted); }

/* ---------- Disclaimer modal ---------- */
#disclaimerModal .modal-content { border-radius: 2px; border: 1px solid var(--border); }
#disclaimerModal .modal-title { font-size: 1.8rem; }
#disclaimerModal .modal-body { font-size: 0.95rem; }
#disclaimerModal .modal-body li { margin-bottom: 0.5rem; }
.modal-backdrop.show { opacity: 0.35; }

/* ---------- Responsive ---------- */
@media (max-width: 767.98px) {
  :root { --section-padding: 56px 0; }
  .home-hero { padding: 56px 0 48px; }
  .page-hero { padding: 40px 0 24px; }
  .brand-name { font-size: 1.15rem; }
  .brand-sub { font-size: 0.6rem; }
  .area-card, .person-card, .article-teaser, .side-panel { padding: 1.25rem; }
}

@media print {
  .site-header, .site-footer, #disclaimerModal, .modal-backdrop, .hero-actions { display: none !important; }
  body { font-size: 11pt; }
  a { text-decoration: none; }
}
