/* ==========================================================
   pace2: Participatory AI for Community Engagement
   One file, no framework. Edit the tokens at the top to
   change colors and fonts everywhere. Colors match the slides.
   ========================================================== */

/* ---------- Tokens ---------- */
:root {
  --font: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;

  --green-deep: #0e3b2e;
  --green: #1e6b4f;
  --coral: #e8613a;
  --gold: #f2b33d;

  /* Light theme */
  --bg: #ffffff;
  --ink: #13221d;
  --body: #34423d;
  --muted: #5e6e68;
  --rule: #dfe7e3;
  --tint: #e8f2ed;
  --tint-2: #d3e6dc;
  --card: #f4f8f6;
  --accent: #1e6b4f;
  --accent-hover: #0e3b2e;
  --current-bg: #fce7df;
  --current-ink: #b8461f;
  --time: #c94f2b;
  color-scheme: light;
}

/* Dark theme: follows the system unless the visitor picked light */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0f1714;
    --ink: #eaf1ed;
    --body: #cbd6d1;
    --muted: #a3b3ad;
    --rule: #26332e;
    --tint: #18261f;
    --tint-2: #213229;
    --card: #15201b;
    --accent: #8fd3b3;
    --accent-hover: #c2ecd8;
    --current-bg: #3a2219;
    --current-ink: #ffb79c;
    --time: #ff9a76;
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0f1714;
  --ink: #eaf1ed;
  --body: #cbd6d1;
  --muted: #a3b3ad;
  --rule: #26332e;
  --tint: #18261f;
  --tint-2: #213229;
  --card: #15201b;
  --accent: #8fd3b3;
  --accent-hover: #c2ecd8;
  --current-bg: #3a2219;
  --current-ink: #ffb79c;
  --time: #ff9a76;
  color-scheme: dark;
}

/* ---------- Base ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; scroll-padding-top: 76px; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }

body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 17px; line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--accent); text-underline-offset: 3px; }
a:hover { color: var(--accent-hover); }
:focus-visible { outline: 3px solid var(--gold); outline-offset: 3px; }
img { max-width: 100%; height: auto; display: block; }

.skip-link { position: absolute; left: 16px; top: -60px; z-index: 20; background: var(--bg); padding: 10px 14px; border-radius: 6px; }
.skip-link:focus { top: 12px; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 clamp(16px, 5vw, 56px); }

/* ---------- Nav (sticky; the current section is highlighted as you scroll) ---------- */
.site-nav {
  position: sticky; top: 0; z-index: 10;
  background: var(--bg); border-bottom: 1px solid transparent;
  transition: border-color .2s, box-shadow .2s;
}
.site-nav.scrolled { border-bottom-color: var(--rule); box-shadow: 0 4px 18px rgba(0, 0, 0, .06); }
.site-nav .wrap { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 20px; padding-top: 12px; padding-bottom: 12px; max-width: none; }
.brand { display: flex; align-items: center; gap: 10px; color: var(--ink); text-decoration: none; font-weight: 700; }
.brand img { width: 34px; height: 34px; background: #fff; border-radius: 8px; padding: 3px; }
.brand-sub { display: block; font-size: 12px; font-weight: 600; color: var(--muted); letter-spacing: .04em; line-height: 1.2; }
.site-nav ul { display: flex; flex-wrap: wrap; gap: 2px; list-style: none; margin: 0 0 0 auto; padding: 0; }
.site-nav ul a { display: block; padding: 8px 14px; border-radius: 999px; color: var(--ink); text-decoration: none; font-weight: 500; }
.site-nav ul a:hover { color: var(--accent); }
.site-nav ul a[aria-current="location"] { background: var(--current-bg); color: var(--current-ink); font-weight: 700; }
.theme-toggle {
  width: 40px; height: 40px; display: grid; place-items: center; cursor: pointer;
  border: 1px solid var(--rule); border-radius: 50%; background: var(--card); color: var(--ink);
}
.theme-toggle .sun { display: none; }
:root[data-theme="dark"] .theme-toggle .sun { display: block; }
:root[data-theme="dark"] .theme-toggle .moon { display: none; }
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) .theme-toggle .sun { display: block; }
  :root:not([data-theme="light"]) .theme-toggle .moon { display: none; }
}

/* ---------- Hero ---------- */
.hero {
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: clamp(28px, 5vw, 64px);
  align-items: center; padding-top: clamp(36px, 7vw, 88px); padding-bottom: clamp(24px, 5vw, 56px);
}
.kicker { margin: 0 0 14px; color: var(--time); font-size: 14px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
h1 { margin: 0 0 28px; font-size: clamp(36px, 5.4vw, 60px); line-height: 1.06; letter-spacing: -.02em; font-weight: 800; }
.facts { margin: 0 0 30px; border-top: 1px solid var(--rule); }
.facts div { display: grid; grid-template-columns: 76px minmax(0, 1fr); gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--rule); }
.facts dt { font-size: 13px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); padding-top: 3px; }
.facts dd { margin: 0; color: var(--body); line-height: 1.45; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin: 0; }
.btn {
  display: inline-block; padding: 11px 22px; border-radius: 999px; font-weight: 600; text-decoration: none;
  border: 1.5px solid var(--accent); color: var(--accent);
}
.btn:hover { background: var(--tint); }
.btn.primary { background: var(--coral); border-color: var(--coral); color: #fff; }
.btn.primary:hover { background: #cf5230; border-color: #cf5230; color: #fff; }
.hero-photo { margin: 0; }
.hero-photo img { border-radius: 16px; width: 100%; aspect-ratio: 4 / 3; object-fit: cover; }
.hero-photo figcaption { margin-top: 8px; font-size: 13px; color: var(--muted); }

/* ---------- Sections ---------- */
.block { padding-top: clamp(40px, 6vw, 72px); }
h2 { margin: 0 0 22px; font-size: clamp(26px, 3vw, 34px); letter-spacing: -.01em; }
.prose { max-width: 760px; }
.prose p { margin: 0 0 16px; color: var(--body); }

/* Schedule */
.schedule { list-style: none; margin: 0; padding: 0; border-top: 1px solid var(--rule); }
.schedule li { display: grid; grid-template-columns: 84px minmax(0, 1fr); gap: 16px; padding: 16px 12px; border-bottom: 1px solid var(--rule); }
.schedule li.activity { background: var(--card); }
.schedule time { color: var(--time); font-weight: 700; font-variant-numeric: tabular-nums; }
.schedule strong { display: block; font-weight: 600; }
.schedule span { color: var(--muted); font-size: 15px; }

/* Organizers */
.people { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 24px; }
.person { display: grid; grid-template-columns: 112px minmax(0, 1fr); gap: 20px; background: var(--card); border: 1px solid var(--rule); border-radius: 16px; padding: 24px; }
.person img { width: 112px; height: 112px; border-radius: 50%; object-fit: cover; }
.person h3 { margin: 0 0 4px; font-size: 22px; }
.person .role { color: var(--muted); font-size: 15px; line-height: 1.45; margin: 0 0 12px; }
.person p { margin: 0 0 12px; color: var(--body); font-size: 16px; }
.person .links { display: flex; flex-wrap: wrap; gap: 8px 18px; margin: 0; font-weight: 600; }

/* Slides */
.slides-card { background: var(--tint); border-radius: 16px; padding: clamp(20px, 4vw, 32px); max-width: 760px; }
.slides-card p { margin: 0 0 18px; color: var(--body); }
.slides-card .actions { margin: 0; }

/* Footer */
.site-footer { margin-top: clamp(56px, 8vw, 96px); padding: 32px 0 40px; background: #0e3b2e; color: #d7e7df; font-size: 15px; }
.site-footer a { color: #fff; }
.site-footer p { margin: 0 0 6px; }

/* ---------- Small screens ---------- */
@media (max-width: 860px) {
  .hero { grid-template-columns: 1fr; }
  .people { grid-template-columns: 1fr; }
}
@media (max-width: 600px) {
  .site-nav ul { order: 3; width: 100%; margin: 0; overflow-x: auto; flex-wrap: nowrap; }
  .site-nav .theme-toggle { margin-left: auto; }
  .person { grid-template-columns: 1fr; }
  .person img { width: 96px; height: 96px; }
  .schedule li { grid-template-columns: 60px minmax(0, 1fr); padding: 14px 6px; }
}
@media (max-width: 420px) {
  .site-nav ul a { padding: 8px 10px; font-size: 15px; }
}
