/* ==========================================================================
   Static archive theme — framework-free, mobile-first.
   All design tokens live in :root so the site can be reskinned quickly.
   ========================================================================== */

:root {
  /* colour */
  --c-bg: #ffffff;
  --c-bg-alt: #f4f6f9;
  --c-surface: #ffffff;
  --c-text: #1c2430;
  --c-text-muted: #5a6673;
  --c-border: #dfe4ea;
  --c-accent: #4b2e84;
  --c-accent-soft: #ece7f7;
  --c-accent-contrast: #ffffff;
  --c-link: #3d2470;
  --c-focus: #005982;

  /* typography */
  --font-body: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-head: var(--font-body);
  --fs-base: clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --fs-h1: clamp(2rem, 1.5rem + 2.4vw, 3.25rem);
  --fs-h2: clamp(1.5rem, 1.25rem + 1.2vw, 2.25rem);
  --fs-h3: clamp(1.25rem, 1.12rem + 0.6vw, 1.6rem);
  --fs-h4: clamp(1.1rem, 1.05rem + 0.3vw, 1.3rem);
  --lh: 1.65;

  /* spacing scale */
  --s-1: 0.25rem;
  --s-2: 0.5rem;
  --s-3: 0.75rem;
  --s-4: 1rem;
  --s-5: 1.5rem;
  --s-6: 2rem;
  --s-7: 3rem;
  --s-8: 4.5rem;

  --radius: 12px;
  --radius-sm: 6px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 8px 24px rgba(16, 24, 40, .08);
  --maxw: 1140px;
  --maxw-text: 72ch;
}

@media (prefers-color-scheme: dark) {
  :root {
    --c-bg: #12161c;
    --c-bg-alt: #171d25;
    --c-surface: #1b222b;
    --c-text: #e6eaef;
    --c-text-muted: #a3adb9;
    --c-border: #2c353f;
    --c-accent: #b6a1ee;
    --c-accent-soft: #262036;
    --c-accent-contrast: #16121f;
    --c-link: #bda9f2;
    --c-focus: #7fc4e8;
  }
}

/* ------------------------------------------------------------------ reset */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; }
}
body {
  margin: 0;
  background: var(--c-bg);
  color: var(--c-text);
  font-family: var(--font-body);
  font-size: var(--fs-base);
  line-height: var(--lh);
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}
img { max-width: 100%; height: auto; display: block; }
a { color: var(--c-link); }
:focus-visible { outline: 3px solid var(--c-focus); outline-offset: 2px; border-radius: 3px; }

h1, h2, h3, h4, h5, h6 {
  font-family: var(--font-head);
  line-height: 1.2;
  margin: 0 0 var(--s-3);
  text-wrap: balance;
}
h1 { font-size: var(--fs-h1); letter-spacing: -0.02em; }
h2 { font-size: var(--fs-h2); letter-spacing: -0.01em; }
h3 { font-size: var(--fs-h3); }
h4 { font-size: var(--fs-h4); }
p, ul, ol, table, blockquote, figure { margin: 0 0 var(--s-4); }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--c-accent); color: var(--c-accent-contrast);
  padding: var(--s-3) var(--s-4); border-radius: 0 0 var(--radius-sm) 0;
}
.skip-link:focus { left: 0; }
.muted { color: var(--c-text-muted); }

/* ----------------------------------------------------------------- header */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: color-mix(in srgb, var(--c-bg) 88%, transparent);
  backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--c-border);
}
.header-inner {
  max-width: var(--maxw); margin-inline: auto;
  padding: var(--s-3) var(--s-4);
  display: flex; align-items: center; gap: var(--s-4);
  flex-wrap: wrap;
}
.brand {
  display: flex; align-items: center; gap: var(--s-3);
  font-weight: 700; text-decoration: none; color: var(--c-text);
  margin-right: auto; line-height: 1.15;
}
.brand-mark {
  display: grid; place-items: center;
  width: 2.25rem; height: 2.25rem; flex: 0 0 auto;
  border-radius: var(--radius-sm);
  background: var(--c-accent); color: var(--c-accent-contrast);
  font-weight: 800;
}
.brand-text { font-size: 0.95rem; max-width: 22ch; }

.nav-toggle {
  display: inline-flex; flex-direction: column; justify-content: center; gap: 5px;
  width: 2.75rem; height: 2.75rem; padding: 0 0.6rem;
  background: transparent; border: 1px solid var(--c-border);
  border-radius: var(--radius-sm); cursor: pointer;
}
.nav-toggle-bar { display: block; height: 2px; background: var(--c-text); border-radius: 2px; transition: transform .2s, opacity .2s; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav { flex-basis: 100%; display: none; }
.nav.is-open { display: block; }
.nav ul { list-style: none; margin: 0; padding: var(--s-2) 0 var(--s-3); display: flex; flex-direction: column; gap: var(--s-1); }
.nav a {
  display: block; padding: var(--s-3); border-radius: var(--radius-sm);
  text-decoration: none; color: var(--c-text); font-weight: 500;
}
.nav a:hover { background: var(--c-bg-alt); }
.nav a.is-current { background: var(--c-accent-soft); color: var(--c-link); font-weight: 700; }

@media (min-width: 768px) {
  .nav-toggle { display: none; }
  .nav { display: block; flex-basis: auto; }
  .nav ul { flex-direction: row; align-items: center; gap: var(--s-1); padding: 0; }
  .nav a { padding: var(--s-2) var(--s-3); }
  .brand-text { font-size: 1rem; }
}

/* ------------------------------------------------------------------- main */
main { flex: 1 0 auto; }
.page { max-width: var(--maxw); margin-inline: auto; padding: var(--s-6) var(--s-4) var(--s-8); }
.page-head { margin-bottom: var(--s-6); padding-bottom: var(--s-4); border-bottom: 1px solid var(--c-border); }
.post-meta { color: var(--c-text-muted); margin: 0; font-size: 0.95rem; }

/* rich text content blocks */
.rich { max-width: var(--maxw-text); }
.vc-col > .rich, .card-body.rich, .tab-pane .rich { max-width: none; }
.rich > *:last-child { margin-bottom: 0; }
.rich ul, .rich ol { padding-left: 1.35em; }
.rich li { margin-bottom: var(--s-2); }
.rich li > ul, .rich li > ol { margin-top: var(--s-2); }
.rich blockquote {
  margin: var(--s-5) 0; padding: var(--s-3) var(--s-5);
  border-left: 4px solid var(--c-accent); background: var(--c-bg-alt);
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
}
.rich table { width: 100%; border-collapse: collapse; display: block; overflow-x: auto; }
.rich th, .rich td { border: 1px solid var(--c-border); padding: var(--s-2) var(--s-3); text-align: left; }
.rich th { background: var(--c-bg-alt); }
.rich h2, .rich h3, .rich h4 { margin-top: var(--s-5); }
.rich img { border-radius: var(--radius); margin: var(--s-4) 0; }
.display-heading h1, .display-heading h2 { font-size: var(--fs-h1) !important; line-height: 1.1 !important; }

/* WPBakery row/column approximation */
.vc-row { display: grid; grid-template-columns: repeat(12, 1fr); gap: var(--s-5); margin-bottom: var(--s-6); }
.vc-row:last-child { margin-bottom: 0; }
.vc-col { grid-column: span 12; min-width: 0; }
@media (min-width: 860px) {
  .vc-col { grid-column: span var(--span, 12); }
  .vc-col--span-4 { grid-column: span 4; }
  .vc-col--span-6 { grid-column: span 6; }
  .vc-col--span-8 { grid-column: span 8; }
  .vc-col--span-12 { grid-column: span 12; }
}
.spacer { height: var(--s-6); }

/* Utilities (replace one-off inline styles) */
.fw-normal { font-weight: 400; }
.text-default { color: var(--c-text); }
.text-slate { color: #415464; }
.hero-line { font-size: 9vh; line-height: 1.2; }
.is-hidden { display: none; }
.visually-offscreen { position: absolute; left: -5000px; }

/* cards */
.card {
  background: var(--c-surface); border: 1px solid var(--c-border);
  border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow); height: 100%;
}
.card img { border-radius: 0; margin: 0; width: 100%; aspect-ratio: 3/2; object-fit: cover; }
.card-body { padding: var(--s-4); }
.card-body h4, .card-body h3 { margin-top: 0; }
.card-secondary { color: var(--c-text-muted); font-size: 0.95rem; }
.card-link { display: block; text-decoration: none; color: inherit; transition: transform .18s ease, box-shadow .18s ease; }
.card-link:hover .card { box-shadow: 0 12px 32px rgba(16,24,40,.16); transform: translateY(-3px); }

.cta { background: var(--c-bg-alt); border-radius: var(--radius); padding: var(--s-5); }

/* buttons */
.btn {
  display: inline-block; padding: var(--s-3) var(--s-5);
  background: var(--c-accent); color: var(--c-accent-contrast);
  border-radius: 999px; text-decoration: none; font-weight: 600;
  border: 2px solid var(--c-accent);
}
.btn:hover { filter: brightness(1.08); }
.btn-outline { background: transparent; color: var(--c-link); }
.btn-disabled { opacity: .55; cursor: not-allowed; background: var(--c-border); border-color: var(--c-border); color: var(--c-text); }

/* media */
.media { margin: var(--s-5) 0; }
.media img { border-radius: var(--radius); }
.media figcaption, .video-card figcaption { color: var(--c-text-muted); font-size: 0.925rem; padding-top: var(--s-2); }
.gallery { display: grid; grid-template-columns: 1fr; gap: var(--s-3); margin: var(--s-5) 0; }
.gallery-item { margin: 0; }
.gallery-item img { border-radius: var(--radius-sm); aspect-ratio: 1/1; object-fit: cover; }
.gallery-item img.gallery-zoomable { cursor: zoom-in; }
.gallery-item img.gallery-zoomable:focus-visible { outline: 3px solid var(--c-accent); outline-offset: 2px; }
@media (min-width: 768px) { .gallery { grid-template-columns: repeat(auto-fill, minmax(350px, 1fr)); } }

/* gallery lightbox */
dialog.lightbox {
  position: fixed; border: 0; padding: var(--s-5); border-radius: var(--radius);
  background: var(--c-bg); color: var(--c-text);
  max-width: min(90vw, 900px); max-height: 90vh;
  box-shadow: 0 20px 60px rgba(0, 0, 0, .35);
}
dialog.lightbox::backdrop { background: rgba(0, 0, 0, .7); backdrop-filter: blur(2px); }
dialog.lightbox .lightbox-img { display: block; margin: 0 auto; max-width: 100%; max-height: 75vh; object-fit: contain; border-radius: var(--radius-sm); }
dialog.lightbox .lightbox-caption { color: var(--c-text-muted); font-size: 0.925rem; margin: var(--s-3) 0 0; max-width: 100%; text-align: center; }
dialog.lightbox .lightbox-caption:empty { margin: 0; }
.lightbox-close {
  position: absolute; top: var(--s-3); right: var(--s-3);
  width: 44px; height: 44px; min-width: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%; border: 2px solid var(--c-border);
  background: var(--c-bg); color: var(--c-text);
  font-size: 1.1rem; line-height: 1; cursor: pointer;
}
.lightbox-close:hover, .lightbox-close:focus-visible { background: var(--c-bg-alt); }
.video-card a { text-decoration: none; }
.video-card img { border-radius: var(--radius); }
.video-embed { position: relative; width: 100%; aspect-ratio: 16/9; border-radius: var(--radius); overflow: hidden; }
.video-embed iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.map-card { background: var(--c-bg-alt); border-radius: var(--radius); padding: var(--s-5); margin: var(--s-5) 0; }

/* tabs */
.tabs { margin: var(--s-5) 0; }
.tab-list { display: flex; flex-wrap: wrap; gap: var(--s-2); border-bottom: 2px solid var(--c-border); margin-bottom: var(--s-5); }
.tab-btn {
  appearance: none; border: 0; background: transparent; cursor: pointer;
  padding: var(--s-3) var(--s-4); font: inherit; font-weight: 600; color: var(--c-text-muted);
  border-bottom: 3px solid transparent; margin-bottom: -2px; border-radius: var(--radius-sm) var(--radius-sm) 0 0;
}
.tab-btn:hover { color: var(--c-text); background: var(--c-bg-alt); }
.tab-btn[aria-selected="true"] { color: var(--c-link); border-bottom-color: var(--c-accent); }
.tab-pane[hidden] { display: none; }
/* no-JS / pre-JS fallback: show every pane with its heading */
.tabs:not(.tabs-ready) .tab-pane { display: block !important; }
.tabs:not(.tabs-ready) .tab-list { display: none; }

/* fallbacks and notes */
.fallback-note, .embed-note {
  background: var(--c-accent-soft); border-left: 4px solid var(--c-accent);
  padding: var(--s-3) var(--s-4); border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  font-size: 0.95rem;
}
.unresolved-shortcode { margin: var(--s-4) 0; }
.raw-html form { display: grid; gap: var(--s-3); max-width: 32rem; }
.raw-html input[type="text"], .raw-html input[type="email"], .raw-html input:not([type]) {
  padding: var(--s-3); border: 1px solid var(--c-border); border-radius: var(--radius-sm);
  background: var(--c-surface); color: var(--c-text); font: inherit; width: 100%;
}
.raw-html input[type="submit"] {
  padding: var(--s-3) var(--s-5); background: var(--c-accent); color: var(--c-accent-contrast);
  border: 0; border-radius: 999px; font: inherit; font-weight: 600; cursor: pointer; justify-self: start;
}

.sitemap, .index-list { list-style: none; padding: 0; }
.sitemap li, .index-list li { padding: var(--s-3) 0; border-bottom: 1px solid var(--c-border); }

/* ----------------------------------------------------------------- footer */
.site-footer { background: var(--c-bg-alt); border-top: 1px solid var(--c-border); padding: var(--s-6) var(--s-4) var(--s-5); margin-top: var(--s-7); }
.footer-inner { max-width: var(--maxw); margin-inline: auto; display: grid; gap: var(--s-5); }
@media (min-width: 768px) { .footer-inner { grid-template-columns: 2fr 1fr; } }
.footer-title { font-weight: 700; margin: 0 0 var(--s-2); }
.footer-nav { list-style: none; padding: 0; margin: 0; display: grid; gap: var(--s-2); }
.footer-nav a { text-decoration: none; }
.footer-nav a:hover { text-decoration: underline; }
.copyright { max-width: var(--maxw); margin: var(--s-5) auto 0; color: var(--c-text-muted); font-size: 0.9rem; }

/* Links whose target file was not present in the database export. */
a.missing-asset { text-decoration: underline wavy var(--c-focus); }
a.missing-asset::after {
  content: " (file missing)";
  font-size: 0.8em; color: var(--c-text-muted); font-weight: 600; white-space: nowrap;
}
