/* ─── Variables ─────────────────────────────────────────────── */
:root {
  --bg:        #F4F0E6;
  --surface:   #EAE5D8;
  --border:    #D6D0C0;
  --text:      #2A2A22;
  --text-muted:#6B6558;
  --blue:      #5B93BE;
  --blue-dark: #3E6F96;
  --amber:     #DCA832;
  --sage:      #7A9E82;
  --pink:      #F07878;

  --font-serif: 'Lora', Georgia, serif;
  --font-sans:  'Inter', system-ui, sans-serif;

  --radius: 8px;
  --max-w: 1100px;
  --gap: 2rem;
}

/* ─── Reset ─────────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.7;
}
img { max-width: 100%; display: block; }
a { color: var(--blue-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ─── Layout ─────────────────────────────────────────────────── */
.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 0 1.5rem;
}

/* ─── Staging banner ─────────────────────────────────────────── */
.staging-banner {
  background: var(--pink);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 600;
  letter-spacing: 0.12em;
  text-align: center;
  padding: 0.4rem 1rem;
  text-transform: uppercase;
}

/* ─── Header ─────────────────────────────────────────────────── */
.site-header {
  background: var(--bg);
  border-bottom: 1px solid var(--border);
  position: sticky;
  top: 0;
  z-index: 100;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 0.75rem;
  padding-bottom: 0.75rem;
}
.site-logo img {
  height: 52px;
  width: auto;
}
.site-nav {
  display: flex;
  gap: 2rem;
  font-size: 0.95rem;
  font-weight: 500;
}
.site-nav a {
  color: var(--text);
  padding-bottom: 2px;
  border-bottom: 2px solid transparent;
  transition: border-color 0.2s, color 0.2s;
}
.site-nav a:hover,
.site-nav a.active {
  color: var(--blue-dark);
  border-bottom-color: var(--blue);
  text-decoration: none;
}

/* ─── Footer ─────────────────────────────────────────────────── */
.site-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  margin-top: 5rem;
  padding: 2.5rem 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}
.footer-inner {
  display: flex;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
  gap: 1rem;
}
.footer-links {
  display: flex;
  gap: 1.5rem;
}
.footer-links a { color: var(--text-muted); }
.footer-links a:hover { color: var(--text); }

/* ─── Typography ─────────────────────────────────────────────── */
h1, h2, h3, h4 {
  font-family: var(--font-serif);
  line-height: 1.25;
  font-weight: 600;
}
h1 { font-size: clamp(2rem, 4vw, 3rem); }
h2 { font-size: clamp(1.4rem, 3vw, 2rem); }
h3 { font-size: 1.25rem; }
p { max-width: 68ch; }

/* ─── Hero ───────────────────────────────────────────────────── */
.hero {
  padding: 5rem 0 4rem;
  text-align: center;
}
.hero h1 {
  margin-bottom: 1.25rem;
  color: var(--text);
}
.hero p {
  font-size: 1.15rem;
  color: var(--text-muted);
  max-width: 54ch;
  margin: 0 auto 2rem;
}
.hero-actions {
  display: flex;
  gap: 1rem;
  justify-content: center;
  flex-wrap: wrap;
}

/* ─── Buttons ────────────────────────────────────────────────── */
.btn {
  display: inline-block;
  padding: 0.65rem 1.5rem;
  border-radius: var(--radius);
  font-weight: 500;
  font-size: 0.95rem;
  transition: opacity 0.2s, transform 0.1s;
  cursor: pointer;
}
.btn:hover { opacity: 0.88; text-decoration: none; transform: translateY(-1px); }
.btn-primary { background: var(--blue); color: #fff; }
.btn-secondary { background: var(--surface); color: var(--text); border: 1px solid var(--border); }
.btn-amber { background: var(--amber); color: #fff; }

/* ─── Section ────────────────────────────────────────────────── */
.section {
  padding: 4rem 0;
}
.section-label {
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--sage);
  margin-bottom: 0.5rem;
}
.section-title {
  margin-bottom: 2rem;
}

/* ─── Cards ──────────────────────────────────────────────────── */
.card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  transition: box-shadow 0.2s;
}
.card:hover { box-shadow: 0 4px 16px rgba(0,0,0,0.07); }
.card.card-static { transition: none; cursor: default; }
.card.card-static:hover { box-shadow: none; }
.card h3 { margin-bottom: 0.5rem; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card-meta {
  font-size: 0.82rem;
  color: var(--text-muted);
  margin-bottom: 0.5rem;
}
.card-link {
  display: inline-block;
  margin-top: 1rem;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--blue-dark);
}

/* ─── Grid ───────────────────────────────────────────────────── */
.grid-3 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: var(--gap);
}
.grid-2 {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(380px, 1fr));
  gap: var(--gap);
}

/* ─── Recent list (home page) ────────────────────────────────── */
.recent-list {
  list-style: none;
  padding: 0;
  margin: 0;
}
.recent-list li {
  padding: 0.65rem 0;
  border-bottom: 1px solid var(--border);
}
.recent-list li:last-child { border-bottom: none; }
.recent-list a {
  color: var(--text);
  font-size: 1.02rem;
}
.recent-list a:hover { color: var(--blue-dark); }
.recent-list .recent-more a {
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* ─── Tags ───────────────────────────────────────────────────── */
.tags {
  display: flex;
  flex-wrap: wrap;
  gap: 0.4rem;
  margin-top: 0.75rem;
}
.tag {
  font-size: 0.75rem;
  font-weight: 500;
  padding: 0.2rem 0.6rem;
  border-radius: 20px;
  background: var(--bg);
  border: 1px solid var(--border);
  color: var(--text-muted);
  cursor: pointer;
  transition: background 0.15s, color 0.15s, border-color 0.15s;
}
.tag:hover,
.tag.active {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

/* ─── Tag filter bar ─────────────────────────────────────────── */
.filter-bar {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-bottom: 2.5rem;
  align-items: center;
}
.filter-bar .filter-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--text-muted);
  margin-right: 0.25rem;
}
.filter-clear {
  font-size: 0.8rem;
  color: var(--text-muted);
  text-decoration: underline;
  cursor: pointer;
  background: none;
  border: none;
  padding: 0;
}
.filter-clear:hover { color: var(--text); }

/* ─── Resource card ──────────────────────────────────────────── */
.resource-card[hidden] { display: none; }
.resource-card .card-institution { color: var(--sage); font-weight: 500; }

/* ─── Event card ─────────────────────────────────────────────── */
.event-card {
  display: flex;
  gap: 1.25rem;
  align-items: flex-start;
}
.event-card-img {
  width: 120px;
  min-width: 120px;
  height: 90px;
  object-fit: cover;
  border-radius: var(--radius);
  background: var(--border);
}
.event-card-img-placeholder {
  width: 120px;
  min-width: 120px;
  height: 90px;
  border-radius: var(--radius);
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--text-muted);
  font-size: 1.5rem;
}
.event-card-body h3 { font-size: 1.05rem; margin-bottom: 0.25rem; }
.event-card-body p { font-size: 0.9rem; color: var(--text-muted); margin-bottom: 0; }

/* ─── Pagination ─────────────────────────────────────────────── */
.pagination {
  display: flex;
  gap: 0.5rem;
  justify-content: center;
  margin-top: 3rem;
}
.pagination a, .pagination span {
  padding: 0.4rem 0.9rem;
  border-radius: var(--radius);
  font-size: 0.9rem;
  border: 1px solid var(--border);
  color: var(--text);
}
.pagination a:hover { background: var(--surface); text-decoration: none; }
.pagination .current { background: var(--blue); color: #fff; border-color: var(--blue); }

/* ─── Page header ─────────────────────────────────────────────── */
.page-header {
  padding: 3.5rem 0 2.5rem;
  border-bottom: 1px solid var(--border);
  margin-bottom: 3rem;
}
.page-header h1 { margin-bottom: 0.5rem; }
.page-header p { font-size: 1.05rem; color: var(--text-muted); }

/* ─── Divider ────────────────────────────────────────────────── */
.divider {
  border: none;
  border-top: 1px solid var(--border);
  margin: 3rem 0;
}

/* ─── Utility ────────────────────────────────────────────────── */
.text-muted { color: var(--text-muted); }
.text-center { text-align: center; }
.mt-1 { margin-top: 0.5rem; }
.mt-2 { margin-top: 1rem; }
.mt-3 { margin-top: 2rem; }
.mb-1 { margin-bottom: 0.5rem; }
.mb-2 { margin-bottom: 1rem; }
.empty-state {
  text-align: center;
  padding: 4rem 0;
  color: var(--text-muted);
}
.empty-state p { margin: 0 auto; }

/* ─── About page ──────────────────────────────────────────────── */
.about-body { max-width: 70ch; }
.about-body p { margin-bottom: 1.25rem; }
.about-body h2 { margin: 2.5rem 0 0.75rem; }

/* ─── Responsive ─────────────────────────────────────────────── */
@media (max-width: 640px) {
  .site-nav { gap: 1.25rem; font-size: 0.88rem; }
  .event-card { flex-direction: column; }
  .event-card-img, .event-card-img-placeholder { width: 100%; min-width: unset; height: 160px; }
  .footer-inner { flex-direction: column; text-align: center; }
  .hero { padding: 3rem 0 2.5rem; }
}
