/* Nathan Boulet for Mayor of Timmins. Accent colour #2b5672 taken from his existing Wix site branding (18 uses on the homepage render). Neutral off-white / near-black page background; accent used only for buttons, icons, borders and headings. */
:root {
  --accent: #2b5672;
  --accent-dark: #17323f;
  --bg: #faf9f6;
  --fg: #16202a;
  --muted: #5b6b76;
  --card-bg: #ffffff;
  --border: #d8e0e3;
  --focus: #e6a817;
  /* Text in the accent: darkened on light, lightened on dark, so any swatch stays readable. */
  --ink: color-mix(in srgb, var(--accent) 72%, #000);
  --draft-bg: #fff4d6;
  --draft-fg: #6b4e00;
  --max-width: 1600px;
  --font-display: "Fraunces", Georgia, serif;
  --font-body: "Source Sans 3", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
}
/* Default is light regardless of OS preference; dark only applies when the visitor picks it
   with the theme toggle (data-theme="dark" set by js/site.js). */
:root[data-theme="dark"] {
  --bg: #0a0e12;
  --fg: #eef3f6;
  --muted: #a9b8c2;
  --card-bg: #12181d;
  --border: #263139;
  --accent: #6fa8c9;
  --accent-dark: #9fc7e0;
  --ink: color-mix(in srgb, var(--accent) 45%, #fff);
  --btn-text: #0a0e12;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font-family: var(--font-body);
  line-height: 1.6;
  font-size: 20px;
}
main p, .card p, .qa-item p { max-width: 65ch; }
h1, h2, h3 { font-family: var(--font-display); color: var(--ink); }
a { color: var(--ink); }
img { max-width: 100%; display: block; border-radius: 16px; }
main img { cursor: zoom-in; }
:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}
.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 16px;
}
@media (min-width: 720px) {
  .wrap { padding: 0 5vw; }
}
header.site-header {
  border-bottom: 1px solid var(--border);
  padding: 16px 0;
  position: sticky;
  top: 0;
  background: var(--bg);
  z-index: 10;
}
.site-header .wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
}
.brand {
  font-size: 22px;
  font-weight: 800;
  color: var(--fg);
  text-decoration: none;
}
nav.main-nav ul {
  list-style: none;
  display: flex;
  gap: 20px;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
nav.main-nav a {
  text-decoration: none;
  color: var(--fg);
  font-weight: 600;
  padding: 6px 2px;
}
nav.main-nav a:hover, nav.main-nav a[aria-current="page"] {
  color: var(--ink);
  border-bottom: 3px solid var(--accent);
}
.header-actions { display: flex; align-items: center; gap: 10px; position: relative; }
.header-btn { padding: 10px 20px; font-size: 16px; white-space: nowrap; }
/* .btn.header-btn: .btn is declared later and would otherwise win. Donate stays on mobile, the lawn sign moves to the menu. */
@media (max-width: 900px) { .btn.header-btn.secondary { display: none; } .btn.header-btn { padding: 8px 16px; font-size: 16px; } }
.hamburger {
  display: none;
  background: none;
  border: 1px solid var(--border);
  border-radius: 999px;
  width: 48px;
  height: 44px;
  font-size: 22px;
  color: var(--fg);
  cursor: pointer;
}
@media (max-width: 800px) {
  nav.main-nav { display: none; }
  .hamburger { display: block; }
  .brand { font-size: 18px; white-space: nowrap; }
  .site-header .wrap { flex-wrap: nowrap; }
  .header-actions { gap: 6px; }
  nav.main-nav.open {
    display: flex;
    position: fixed;
    inset: 0;
    background: var(--bg);
    z-index: 50;
    padding: 24px;
  }
  nav.main-nav.open { flex-direction: column; overflow-y: auto; }
  nav.main-nav.open ul { flex-direction: column; gap: 8px; width: 100%; }
  nav.main-nav.open a { display: block; padding: 16px 20px; font-size: 24px; border-radius: 16px; background: var(--card-bg); border: 1px solid var(--border); }
  nav.main-nav.open a[aria-current="page"] { border: 2px solid var(--accent); }
  nav.main-nav.open .nav-close { display: block; align-self: flex-end; width: 56px; height: 56px; font-size: 32px; background: var(--card-bg); border: 1px solid var(--border); border-radius: 50%; color: var(--fg); cursor: pointer; margin-bottom: 12px; }
}
.nav-close { display: none; }
.theme-picker { position: relative; }
.theme-dot {
  width: 28px; height: 28px; border-radius: 50%;
  background: var(--accent); border: 2px solid var(--border);
  cursor: pointer;
}
.theme-swatches {
  display: none;
  position: absolute;
  right: 0; top: 36px;
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 10px;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  z-index: 60;
  box-shadow: 0 8px 24px rgba(0,0,0,0.15);
}
.theme-swatches.open { display: grid; }
.theme-swatches button { width: 26px; height: 26px; border-radius: 50%; border: 2px solid var(--border); cursor: pointer; }
.mode-toggle {
  width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--border);
  background: var(--card-bg); color: var(--fg); display: inline-flex; align-items: center;
  justify-content: center; cursor: pointer; margin-left: 6px;
}
.mode-icon-dark { display: none; }
:root[data-theme="dark"] .mode-icon-light { display: none; }
:root[data-theme="dark"] .mode-icon-dark { display: block; }
main { display: block; }
.hero {
  padding: 48px 0 32px;
}
.hero.full-bleed {
  padding: 0;
  position: relative;
  overflow: hidden;
}
.hero.full-bleed img { width: 100%; height: calc(100svh - 81px); max-height: 85vh; min-height: 560px; object-fit: cover; object-position: center top; border-radius: 0 0 32px 32px; }
.hero.full-bleed .hero-overlay {
  position: absolute; inset: 0;
  display: flex; align-items: flex-end;
  border-radius: 0 0 32px 32px;
  background: linear-gradient(to top, rgba(0,0,0,0.75), rgba(0,0,0,0) 60%);
}
.hero.full-bleed .hero-overlay .wrap { padding-bottom: 56px; width: 100%; }
/* Mobile default: text sits over the full-bleed photo, so it needs to be white to read. */
.hero.full-bleed h1 { font-size: clamp(56px, 11vw, 176px); line-height: 0.95; letter-spacing: -0.02em; }
.hero.full-bleed h1, .hero.full-bleed p.lede { color: #fff; }
/* Wide screens: his portrait takes the right side, name sits on the plain page background,
   so it needs page text colour, not white-on-white. This block must stay AFTER the mobile
   rule above so it wins the cascade on desktop. */
@media (min-width: 900px) {
  .hero.full-bleed img { width: 46%; height: calc(100svh - 129px); max-height: 85vh; margin: 24px 5vw 24px auto; object-position: center top; border-radius: 40px; }
  .hero.full-bleed .hero-overlay { background: none; border-radius: 0; }
  .hero.full-bleed .hero-overlay { align-items: center; }
  .hero.full-bleed h1 { color: var(--fg); font-size: clamp(64px, 7.5vw, 150px); max-width: 7ch; }
  .hero.full-bleed p.lede { max-width: 26ch; color: var(--muted); }
}
.hero-cta .btn.secondary { background: #fff; color: #16202a; border-color: #fff; }
.hero-panel {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text, #fff);
  border-radius: 24px;
  padding: 12px 28px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: clamp(24px, 4vw, 48px);
  margin-bottom: 18px;
  letter-spacing: 0.02em;
}
.hero-panel .accent-a { text-decoration: underline; text-decoration-thickness: 3px; }
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-top: 20px; }
/* Near full bleed: edge to edge less a 12px gutter, so the corners can stay rounded. */
.photo-band { margin: 16px 12px 32px; }
.photo-band img { width: 100%; height: min(60vh, 560px); object-fit: cover; object-position: center 30%; border-radius: 28px; }
@media (max-width: 720px) { .photo-band img { height: 45vh; } }
[data-lightbox] { cursor: zoom-in; }
.lightbox-overlay {
  display: none;
  position: fixed; inset: 0;
  background: rgba(0,0,0,0.9);
  z-index: 100;
  align-items: center;
  justify-content: center;
}
.lightbox-overlay.open { display: flex; }
.lightbox-overlay img { max-width: 92vw; max-height: 88vh; border-radius: 12px; }
.lightbox-close {
  position: absolute; top: 20px; right: 20px;
  background: none; border: 2px solid #fff; color: #fff;
  width: 56px; height: 56px; border-radius: 50%;
  font-size: 30px; cursor: pointer;
}
.hero h1 {
  font-size: clamp(40px, 7vw, 80px);
  margin: 0 0 12px;
  line-height: 1.1;
}
.hero p.lede {
  font-size: clamp(20px, 2.4vw, 28px);
  color: var(--muted);
  max-width: 60ch;
}
.hero-photo {
  width: 100%;
  height: auto;
  border-radius: 12px;
  margin: 24px 0;
}
.btn {
  display: inline-block;
  background: var(--accent);
  color: var(--btn-text, #fff);
  padding: 16px 32px;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 700;
  font-size: 20px;
  border: 2px solid transparent;
  cursor: pointer;
}
.btn:hover { filter: brightness(0.9); }
.btn.secondary {
  background: transparent;
  color: var(--ink);
  border: 2px solid var(--accent);
}
.section { padding: 40px 0; }
.section h2 {
  font-size: clamp(26px, 4vw, 38px);
  margin-bottom: 20px;
}
.card {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-top: 6px solid var(--accent);
  border-radius: 28px;
  padding: 28px;
  box-shadow: 0 6px 24px rgba(0,0,0,0.08);
  margin-bottom: 20px;
}
@media (min-width: 720px) {
  .card { padding: 48px; }
}
.card-icon {
  color: var(--accent);
  margin-bottom: 10px;
  width: 56px;
  height: 56px;
}
.card summary {
  cursor: pointer;
  font-weight: 700;
  color: var(--fg);
  list-style: none;
  font-size: clamp(1.5rem, 2.4vw, 2rem);
  line-height: 1.25;
}
.card summary::-webkit-details-marker { display: none; }
.card summary::after {
  content: "+ Read more";
  display: inline-block;
  margin-left: 8px;
  color: var(--ink);
  font-weight: 700;
  font-size: 1.1rem;
  border: 2px solid var(--accent);
  border-radius: 999px;
  padding: 2px 14px;
  vertical-align: middle;
}
.card details[open] summary::after { content: "- Show less"; }
.card details > div { font-size: 1.25rem; line-height: 1.7; margin-top: 16px; }
.card .card-summary {
  font-family: var(--font-body);
  font-weight: 400;
  color: var(--muted);
  margin: 6px 0 0;
}
.alt-row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 24px;
  align-items: stretch;
  margin-bottom: 32px;
}
@media (min-width: 720px) {
  .alt-row { grid-template-columns: 1fr 1fr; }
  .alt-row.reverse .alt-photo { order: 2; }
  .alt-row .alt-photo img { height: 100%; min-height: 520px; }
}
.alt-photo img { width: 100%; height: 100%; object-fit: cover; aspect-ratio: 4/3; border-radius: 28px; }
/* Cutout portrait (background removed): sits on the page background, not a photo tile, so it
   reads on every accent colour and in both light and dark mode without a crop box behind it. */
.alt-photo.cutout { background: none; display: flex; align-items: flex-end; justify-content: center; aspect-ratio: auto; height: auto; }
.alt-photo.cutout img { width: auto; max-width: 100%; height: auto; max-height: 440px; aspect-ratio: auto; object-fit: contain; border-radius: 0; filter: drop-shadow(0 16px 20px rgba(0,0,0,0.22)); }
.gallery-strip {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 16px;
}
.gallery-strip img { aspect-ratio: 1; object-fit: cover; width: 100%; border-radius: 24px; }
@media (min-width: 640px) {
  .gallery-strip { grid-template-columns: repeat(4, 1fr); }
}
/* Home platform summary: six rounded tiles, one column on mobile, three by two on desktop. */
.platform-tiles { display: grid; grid-template-columns: 1fr; gap: 20px; margin: 24px 0; }
@media (min-width: 800px) {
  .platform-tiles { grid-template-columns: repeat(3, 1fr); }
}
.platform-tile {
  display: block; background: var(--card-bg); border: 1px solid var(--border);
  border-top: 6px solid var(--accent); border-radius: 24px; padding: 24px;
  text-decoration: none; color: var(--fg);
}
.platform-tile:hover { border-color: var(--accent); }
.platform-tile .card-icon { color: var(--accent); margin-bottom: 12px; }
.platform-tile h3 { font-size: 22px; margin: 0 0 8px; color: var(--ink); }
.platform-tile p { margin: 0; font-size: 16px; line-height: 1.5; color: var(--muted); }
.lang-toggle {
  background: transparent;
  border: 1px solid var(--border);
  color: var(--fg);
  border-radius: 999px;
  padding: 10px 16px;
  font-weight: 700;
  cursor: pointer;
  font-family: var(--font-body);
}
.lang-toggle:hover { border-color: var(--accent); }
.fr-provisional {
  background: var(--draft-bg);
  color: var(--draft-fg);
  border: 1px solid #e0c060;
  border-radius: 16px;
  padding: 12px 20px;
  margin: 16px 0 20px;
  display: none;
  font-weight: 600;
}
html[lang="fr"] .fr-provisional { display: block; }
.i-fr, .b-fr { display: none; }
html[lang="fr"] .i-en, html[lang="fr"] .b-en { display: none; }
html[lang="fr"] .i-fr { display: inline; }
html[lang="fr"] .b-fr { display: block; }
.grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 20px;
}
@media (min-width: 720px) {
  .grid.cols-2 { grid-template-columns: 1fr 1fr; }
  .grid.cols-3 { grid-template-columns: 1fr 1fr 1fr; }
}
.badge-draft {
  display: inline-block;
  background: var(--draft-bg);
  color: var(--draft-fg);
  border: 1px solid #e0c060;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
  margin-bottom: 10px;
  letter-spacing: 0.03em;
}
.badge-fillin {
  display: inline-block;
  background: #ffe3e3;
  color: #8a1c1c;
  border: 1px solid #e08080;
  font-size: 13px;
  font-weight: 700;
  padding: 3px 10px;
  border-radius: 999px;
}
form {
  display: grid;
  gap: 16px;
  max-width: 560px;
}
label { font-weight: 600; display: block; margin-bottom: 6px; }
input, textarea, select {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--border);
  border-radius: 14px;
  font-size: 18px;
  background: var(--bg);
  color: var(--fg);
}
textarea { min-height: 120px; }
.checkbox-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
}
.checkbox-row input { width: auto; margin-top: 4px; }
.form-msg { font-weight: 600; }
.form-msg.ok { color: #1a7a3a; }
.form-msg.err { color: #b02323; }
footer.site-footer {
  border-top: 1px solid var(--border);
  padding: 32px 0;
  margin-top: 40px;
  color: var(--muted);
  font-size: 15px;
}
footer.site-footer a { color: var(--muted); }
.footer-links {
  display: flex;
  gap: 16px;
  flex-wrap: wrap;
  margin-bottom: 12px;
}
.carousel-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 12px;
}
@media (min-width: 640px) {
  .carousel-grid { grid-template-columns: repeat(4, 1fr); }
}
.qa-item { margin-bottom: 28px; }
.qa-item h3 { font-size: 24px; margin-bottom: 8px; color: var(--ink); }
.rules-list li { margin-bottom: 10px; }
.donate-option { background: var(--card-bg); border: 1px solid var(--border); border-top: 6px solid var(--accent); border-radius: 28px; padding: 24px 28px; margin-bottom: 24px; }
.skip-link {
  position: absolute;
  left: -999px;
  top: 0;
  background: var(--accent);
  color: var(--btn-text, #fff);
  padding: 10px 16px;
  border-radius: 999px;
  z-index: 100;
}
.skip-link:focus { left: 8px; top: 8px; }

/* Campaign chat widget */
.chat-fab {
  position: fixed; right: 20px; bottom: 20px; z-index: 90;
  width: 58px; height: 58px; border-radius: 50%; border: none;
  background: var(--accent); color: var(--btn-text, #fff);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 8px 20px rgba(0,0,0,0.25); cursor: pointer;
}
.chat-fab:hover { background: var(--accent-dark); }
.chat-panel[hidden] { display: none; }
/* Bottom sheet: full width on mobile with a drag-handle look, centred max 640px on desktop,
   rounded top corners, sized in dvh so the mobile keyboard never covers the input. */
.chat-panel {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 91;
  margin: 0 auto; width: 100%; max-width: 640px;
  max-height: min(80dvh, 640px);
  background: var(--card-bg); border: 1px solid var(--border); border-bottom: none;
  border-radius: 20px 20px 0 0;
  box-shadow: 0 -12px 44px rgba(0,0,0,0.3);
  display: flex; flex-direction: column; overflow: hidden;
}
.chat-panel::before {
  content: ""; display: block; width: 40px; height: 4px; border-radius: 4px;
  background: var(--border); margin: 10px auto 0; flex: none;
}
.chat-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 10px 16px 12px; font-weight: 700; color: var(--fg);
}
.chat-close { background: none; border: none; color: var(--fg); font-size: 24px; line-height: 1; cursor: pointer; padding: 4px; }
.chat-log { flex: 1; overflow-y: auto; padding: 12px 16px; display: flex; flex-direction: column; gap: 8px; }
.chat-bubble { max-width: 85%; padding: 8px 12px; border-radius: 14px; font-size: 14px; line-height: 1.4; }
.chat-user { align-self: flex-end; background: var(--accent); color: var(--btn-text, #fff); }
.chat-bot { align-self: flex-start; background: var(--bg); border: 1px solid var(--border); color: var(--fg); }
.chat-form { display: flex; gap: 8px; padding: 10px 16px; border-top: 1px solid var(--border); padding-bottom: calc(10px + env(safe-area-inset-bottom, 0px)); }
.chat-input { flex: 1; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: var(--bg); color: var(--fg); font-size: 16px; }
.chat-msg { padding: 0 16px 8px; font-size: 12px; min-height: 0; }

/* Scroll reveal */
.reveal { opacity: 0; transform: translateY(24px); transition: opacity 0.5s ease, transform 0.5s ease; }
.reveal.in-view { opacity: 1; transform: translateY(0); }
@media (prefers-reduced-motion: reduce) {
  .reveal { opacity: 1; transform: none; transition: none; }
}
