/* ============================================================
   Asad Mahmood for Thorold City Council
   Palette: teal / charcoal / gold (non-partisan civic)
   Signature: stepped "lock chamber" + canal water motif,
   echoing the Welland Canal flight locks through Thorold.
   ============================================================ */

:root {
  /* Brand */
  --teal:        #0F766E;
  --teal-dark:   #0B5853;
  --teal-deep:   #093f3b;
  --teal-700:    #0d6a62;
  --teal-tint:   #E6F2F0;
  --teal-tint-2: #d3e8e5;
  --charcoal:    #1F2937;
  --ink:         #111827;
  --gold:        #B9860B;   /* AA-safe gold for text on white */
  --gold-bright: #D4A017;   /* decorative / on-dark use */
  --gold-pale:   #F4E3B2;
  --paper:       #FFFFFF;
  --paper-2:     #F6F9F8;
  --paper-3:     #EEF5F3;
  --line:        #E4ECEA;
  --muted:       #4B5563;

  /* Type */
  --display: "Bricolage Grotesque", "Public Sans", system-ui, sans-serif;
  --body:    "Public Sans", system-ui, -apple-system, Segoe UI, Roboto, sans-serif;

  /* Scale */
  --step--1: clamp(0.83rem, 0.8rem + 0.15vw, 0.9rem);
  --step-0:  clamp(1rem, 0.96rem + 0.2vw, 1.125rem);
  --step-1:  clamp(1.2rem, 1.1rem + 0.5vw, 1.45rem);
  --step-2:  clamp(1.5rem, 1.3rem + 1vw, 2rem);
  --step-3:  clamp(2rem, 1.6rem + 2vw, 3rem);
  --step-4:  clamp(2.7rem, 1.9rem + 3.6vw, 4.7rem);

  --wrap: 1140px;
  --radius: 18px;
  --radius-sm: 12px;
  --shadow-sm: 0 1px 2px rgba(16,24,40,.05), 0 2px 6px rgba(16,24,40,.04);
  --shadow: 0 2px 4px rgba(16,24,40,.04), 0 18px 40px -22px rgba(11,88,83,.4);
  --shadow-lg: 0 30px 60px -30px rgba(11,88,83,.45);
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}

body {
  margin: 0;
  font-family: var(--body);
  font-size: var(--step-0);
  line-height: 1.62;
  color: var(--charcoal);
  background: var(--paper);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}

h1, h2, h3, h4 { font-family: var(--display); color: var(--ink); line-height: 1.06; letter-spacing: -.018em; margin: 0 0 .4em; text-wrap: balance; }
h1 { font-size: var(--step-4); font-weight: 800; }
h2 { font-size: var(--step-3); font-weight: 700; }
h3 { font-size: var(--step-1); font-weight: 700; }
p  { margin: 0 0 1em; max-width: 64ch; text-wrap: pretty; }
a  { color: var(--teal-dark); }

.wrap { width: min(100% - 2.5rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(3.2rem, 6.5vw, 6rem) 0; position: relative; }
.section--tint { background: var(--paper-2); }
.section--pattern {
  background:
    radial-gradient(circle at 1px 1px, rgba(15,118,110,.07) 1px, transparent 0) 0 0/22px 22px,
    var(--paper-2);
}

/* ---------- Accessibility utilities ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.skip-link { position: absolute; left: 1rem; top: -3.5rem; z-index: 200; background: var(--ink); color: #fff; padding: .65rem 1rem; border-radius: 10px; transition: top .18s ease; }
.skip-link:focus { top: 1rem; }
:where(a, button, input, select, textarea, summary):focus-visible { outline: 3px solid var(--gold-bright); outline-offset: 2px; border-radius: 8px; }

/* ---------- Eyebrow ---------- */
.eyebrow {
  font-family: var(--display); text-transform: uppercase; letter-spacing: .16em;
  font-size: var(--step--1); font-weight: 700; color: var(--teal-dark);
  display: inline-flex; align-items: center; gap: .6rem; margin-bottom: 1rem;
}
.eyebrow::before { content: ""; width: 28px; height: 3px; border-radius: 3px; background: linear-gradient(90deg, var(--gold-bright), var(--gold)); display: inline-block; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: .5rem;
  font-family: var(--display); font-weight: 700; font-size: var(--step-0);
  padding: .82rem 1.5rem; border-radius: 12px; border: 2px solid transparent;
  cursor: pointer; text-decoration: none; line-height: 1;
  transition: transform .14s cubic-bezier(.2,.8,.2,1), background .18s ease, box-shadow .18s ease, border-color .18s ease;
  will-change: transform;
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--primary { background: linear-gradient(180deg, var(--teal), var(--teal-dark)); color: #fff; box-shadow: 0 10px 22px -12px rgba(11,88,83,.8); }
.btn--primary:hover { box-shadow: 0 16px 28px -12px rgba(11,88,83,.85); }
.btn--gold { background: linear-gradient(180deg, #E3B021, var(--gold-bright)); color: #2a1f00; box-shadow: 0 10px 22px -12px rgba(212,160,23,.85); }
.btn--gold:hover { filter: brightness(1.03); }
.btn--ghost { background: rgba(255,255,255,.6); color: var(--ink); border-color: var(--line); backdrop-filter: blur(4px); }
.btn--ghost:hover { border-color: var(--teal); color: var(--teal-dark); }
.btn--block { width: 100%; justify-content: center; }
.btn svg { flex: none; }

/* ---------- Header / nav ---------- */
.site-header {
  position: sticky; top: 0; z-index: 100;
  background: rgba(255,255,255,.82);
  backdrop-filter: saturate(150%) blur(12px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s ease, box-shadow .2s ease, background .2s ease;
}
.site-header.is-scrolled { border-bottom-color: var(--line); box-shadow: 0 6px 24px -18px rgba(16,24,40,.5); background: rgba(255,255,255,.92); }
.nav { display: flex; align-items: center; justify-content: space-between; gap: 1rem; padding: .7rem 0; }
.brand { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--ink); }
.brand__mark {
  width: 44px; height: 44px; flex: none; border-radius: 12px;
  background: linear-gradient(150deg, var(--teal), var(--teal-deep));
  display: grid; place-items: center; box-shadow: inset 0 1px 0 rgba(255,255,255,.18), 0 6px 14px -8px rgba(11,88,83,.9);
}
.brand__name { font-family: var(--display); font-weight: 800; font-size: 1.18rem; line-height: 1; }
.brand__name small { display: block; font-weight: 600; font-size: .72rem; letter-spacing: .05em; color: var(--muted); margin-top: 4px; text-transform: uppercase; }

.nav__links { display: flex; align-items: center; gap: .15rem; list-style: none; margin: 0; padding: 0; }
.nav__links a { text-decoration: none; color: var(--charcoal); font-weight: 600; padding: .5rem .75rem; border-radius: 9px; font-size: .98rem; transition: background .15s ease, color .15s ease; }
.nav__links a:hover { background: var(--teal-tint); color: var(--teal-dark); }
.nav__cta { margin-left: .45rem; }

.nav__toggle { display: none; background: none; border: 2px solid var(--line); border-radius: 11px; padding: .55rem .65rem; cursor: pointer; }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after { content: ""; display: block; width: 22px; height: 2px; background: var(--ink); border-radius: 2px; position: relative; transition: transform .2s ease, opacity .2s ease; }
.nav__toggle span::before { position: absolute; top: -6px; }
.nav__toggle span::after  { position: absolute; top: 6px; }

@media (max-width: 880px) {
  .nav__toggle { display: inline-block; }
  .nav__links {
    position: absolute; left: 0; right: 0; top: 100%; flex-direction: column; align-items: stretch; gap: 0;
    background: #fff; border-bottom: 1px solid var(--line); box-shadow: var(--shadow);
    padding: .5rem 1.25rem 1.1rem; display: none;
  }
  .nav__links.is-open { display: flex; }
  .nav__links a { padding: .85rem .4rem; border-radius: 0; border-bottom: 1px solid var(--line); }
  .nav__cta { margin: .7rem 0 0; }
  .nav__cta a { text-align: center; }
}

/* ---------- HERO ---------- */
.hero { position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background:
    radial-gradient(120% 90% at 85% -10%, #14857c 0%, transparent 55%),
    radial-gradient(100% 120% at 0% 110%, #0a4f4a 0%, transparent 60%),
    linear-gradient(165deg, var(--teal-dark), var(--teal-deep));
}
/* faint topographic lines */
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .5;
  background-image: repeating-linear-gradient(115deg, rgba(255,255,255,.05) 0 1px, transparent 1px 64px);
}
.hero__inner { position: relative; z-index: 2; padding: clamp(3.4rem, 7vw, 6.5rem) 0 clamp(5rem, 8vw, 7.5rem); }
.hero__grid { display: grid; grid-template-columns: 1.12fr .88fr; gap: clamp(1.5rem, 4vw, 3.4rem); align-items: center; }
.hero h1 { color: #fff; max-width: 15ch; }
.hero h1 .accent { color: var(--gold-pale); }
.hero__sub { font-family: var(--display); font-weight: 700; color: var(--gold-bright); letter-spacing: .01em; font-size: var(--step-1); margin: .35rem 0 1.1rem; display: inline-flex; align-items: center; gap: .6rem; }
.hero__sub::after { content: ""; flex: 1; height: 2px; min-width: 30px; background: linear-gradient(90deg, var(--gold-bright), transparent); border-radius: 2px; }
.hero__lede { color: #eaf5f3; font-size: var(--step-1); max-width: 42ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .7rem; margin-top: 1.7rem; }

.hero__cta .btn--ghost { color: #fff; border-color: rgba(255,255,255,.4); background: rgba(255,255,255,.08); }
.hero__cta .btn--ghost:hover { background: rgba(255,255,255,.16); border-color: #fff; color: #fff; }
.hero__cta .btn--light { background: #fff; color: var(--teal-dark); box-shadow: 0 12px 24px -12px rgba(0,0,0,.5); }

/* framed photo with gold corners */
.hero__card { position: relative; }
.hero__frame { position: relative; padding: 12px; border-radius: calc(var(--radius) + 6px); background: linear-gradient(160deg, rgba(255,255,255,.16), rgba(255,255,255,.04)); border: 1px solid rgba(255,255,255,.18); box-shadow: var(--shadow-lg); }
.hero__frame::before, .hero__frame::after { content: ""; position: absolute; width: 34px; height: 34px; border: 3px solid var(--gold-bright); }
.hero__frame::before { top: -3px; left: -3px; border-right: 0; border-bottom: 0; border-radius: 14px 0 0 0; }
.hero__frame::after { bottom: -3px; right: -3px; border-left: 0; border-top: 0; border-radius: 0 0 14px 0; }
.hero__photo {
  aspect-ratio: 4/5; border-radius: var(--radius); overflow: hidden; position: relative;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255,255,255,.1), transparent 60%),
    repeating-linear-gradient(135deg, rgba(255,255,255,.05) 0 16px, rgba(255,255,255,.015) 16px 32px),
    var(--teal);
  display: grid; place-items: center; text-align: center; color: #d6ebe7; padding: 1.2rem;
}
.hero__photo img { width: 100%; height: 100%; object-fit: cover; }
.hero__photo .ph { font-size: .85rem; line-height: 1.45; max-width: 26ch; opacity: .9; }
.hero__photo .ph svg { display: block; margin: 0 auto .6rem; opacity: .8; }
.hero__badge {
  position: absolute; left: 50%; bottom: -18px; transform: translateX(-50%);
  background: #fff; color: var(--teal-dark); font-family: var(--display); font-weight: 700;
  font-size: .82rem; letter-spacing: .02em; padding: .5rem 1rem; border-radius: 999px;
  box-shadow: var(--shadow); white-space: nowrap; display: inline-flex; align-items: center; gap: .5rem;
}
.hero__badge i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold-bright); display: inline-block; }

/* canal-lock wave at base of hero */
.hero__wave { position: absolute; left: 0; right: 0; bottom: -1px; z-index: 1; line-height: 0; }
.hero__wave svg { display: block; width: 100%; height: auto; }

@media (max-width: 780px) {
  .hero__grid { grid-template-columns: 1fr; }
  .hero__card { order: -1; max-width: 300px; margin-inline: auto; }
}

/* ---------- Signals row ---------- */
.signals { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1.1rem; margin-top: -3.5rem; position: relative; z-index: 3; }
.signals div { background: #fff; padding: 1.5rem 1.5rem; border-radius: var(--radius); border: 1px solid var(--line); box-shadow: var(--shadow); }
.signals .ic { width: 42px; height: 42px; border-radius: 11px; background: var(--teal-tint); color: var(--teal-dark); display: grid; place-items: center; margin-bottom: .8rem; }
.signals strong { display: block; font-family: var(--display); font-size: 1.12rem; color: var(--ink); margin-bottom: .25rem; }
.signals p { margin: 0; font-size: .95rem; color: var(--muted); }
@media (max-width: 720px) { .signals { grid-template-columns: 1fr; margin-top: -2.5rem; } }

/* ---------- Priorities cards ---------- */
.section-head { max-width: 62ch; margin-bottom: 2.4rem; }
.cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(270px, 1fr)); gap: 1.2rem; }
.card {
  background: #fff; border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.7rem 1.6rem; box-shadow: var(--shadow-sm); position: relative; overflow: hidden;
  transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s ease, border-color .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); border-color: var(--teal-tint-2); }
.card__num { position: absolute; top: .8rem; right: 1.1rem; font-family: var(--display); font-weight: 800; font-size: 2.6rem; line-height: 1; color: var(--paper-3); user-select: none; }
.card__icon { width: 50px; height: 50px; border-radius: 13px; display: grid; place-items: center; margin-bottom: 1rem;
  background: linear-gradient(160deg, var(--teal-tint), #fff); color: var(--teal-dark); border: 1px solid var(--teal-tint-2); position: relative; z-index: 1; }
.card h3 { margin: 0 0 .45rem; position: relative; z-index: 1; }
.card p { color: var(--muted); margin: 0; font-size: .97rem; position: relative; z-index: 1; }

/* ---------- Split / Meet ---------- */
.split { display: grid; grid-template-columns: .92fr 1.08fr; gap: clamp(1.6rem, 4.5vw, 3.6rem); align-items: center; }
@media (max-width: 840px) { .split { grid-template-columns: 1fr; } }
.portrait-frame { position: relative; }
.portrait-frame::before { content: ""; position: absolute; inset: 0; transform: translate(16px,16px); border: 2px solid var(--teal-tint-2); border-radius: var(--radius); z-index: 0; }
.portrait {
  position: relative; z-index: 1; border-radius: var(--radius); aspect-ratio: 4/5; overflow: hidden;
  border: 1px solid var(--line); box-shadow: var(--shadow);
  background: linear-gradient(180deg, var(--teal-tint), #fff);
  display: grid; place-items: center; color: var(--muted); text-align: center; padding: 1.6rem;
}
.portrait img { width: 100%; height: 100%; object-fit: cover; }
.portrait .ph svg { opacity: .35; margin-bottom: .6rem; }

/* ---------- Inclusion band ---------- */
.band {
  position: relative; overflow: hidden; border-radius: var(--radius);
  background:
    radial-gradient(120% 120% at 100% 0%, #2a3a4d 0%, transparent 55%),
    linear-gradient(165deg, var(--charcoal), #161e29);
  color: #fff; padding: clamp(2.2rem, 5vw, 3.8rem);
}
.band::after { content: ""; position: absolute; right: -40px; bottom: -40px; width: 220px; height: 220px; opacity: .12;
  background: repeating-linear-gradient(180deg, var(--gold-bright) 0 10px, transparent 10px 26px); transform: rotate(0deg); border-radius: 20px; }
.band h2 { color: #fff; }
.band p { color: #e6e8ec; }
.band .pills { display: flex; flex-wrap: wrap; gap: .55rem; margin-top: 1.4rem; position: relative; z-index: 1; }
.band .pills span { border: 1px solid rgba(255,255,255,.26); border-radius: 999px; padding: .4rem 1rem; font-size: .92rem; background: rgba(255,255,255,.04); transition: background .15s ease, border-color .15s ease; }
.band .pills span:hover { background: rgba(212,160,23,.16); border-color: var(--gold-bright); }

/* ---------- Forms ---------- */
.form-card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2rem); box-shadow: var(--shadow); }
.form { display: grid; gap: 1.05rem; }
.field { display: grid; gap: .38rem; }
.field label { font-weight: 700; font-size: .95rem; }
.field .hint { font-size: .84rem; color: var(--muted); font-weight: 400; }
.field input, .field select, .field textarea {
  font: inherit; padding: .72rem .85rem; border: 1.5px solid var(--line); border-radius: 11px;
  background: var(--paper-2); color: var(--ink); width: 100%; transition: border-color .15s ease, background .15s ease, box-shadow .15s ease;
}
.field input:hover, .field select:hover, .field textarea:hover { border-color: var(--teal-tint-2); }
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--teal); background: #fff; outline: 3px solid var(--gold-bright); outline-offset: 1px; box-shadow: 0 0 0 4px var(--teal-tint); }
.field--row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.05rem; }
@media (max-width: 560px) { .field--row { grid-template-columns: 1fr; } }
.checkbox { display: grid; grid-template-columns: auto 1fr; gap: .65rem; align-items: start; font-size: .92rem; }
.checkbox input { width: 1.15rem; height: 1.15rem; margin-top: .22rem; accent-color: var(--teal); }
.form__status { font-weight: 600; padding: .85rem 1rem; border-radius: 11px; display: none; }
.form__status.ok  { display: block; background: var(--teal-tint); color: var(--teal-dark); border: 1px solid var(--teal-tint-2); }
.form__status.err { display: block; background: #fdeaea; color: #9b1c1c; border: 1px solid #f6cccc; }

/* ---------- Donate amounts ---------- */
.amounts { display: grid; grid-template-columns: repeat(4, 1fr); gap: .65rem; }
@media (max-width: 560px) { .amounts { grid-template-columns: repeat(2, 1fr); } }
.amount { border: 1.5px solid var(--line); background: var(--paper-2); border-radius: 12px; padding: .95rem .5rem; font-family: var(--display); font-weight: 700; font-size: 1.12rem; cursor: pointer; color: var(--ink); transition: transform .12s ease, border-color .15s ease, background .15s ease, color .15s ease; }
.amount:hover { transform: translateY(-2px); border-color: var(--teal-tint-2); }
.amount[aria-pressed="true"] { border-color: var(--teal); background: var(--teal-tint); color: var(--teal-dark); box-shadow: 0 0 0 3px var(--teal-tint); }

.notice { border-left: 5px solid var(--gold-bright); background: linear-gradient(180deg, #fffaf0, #fff); padding: 1.1rem 1.3rem; border-radius: 0 12px 12px 0; font-size: .95rem; box-shadow: var(--shadow-sm); }
.notice strong { color: var(--ink); }

/* ---------- Footer ---------- */
.site-footer { position: relative; background: linear-gradient(165deg, #131a24, var(--ink)); color: #cbd5e1; padding: clamp(2.6rem,5vw,3.6rem) 0 2rem; margin-top: 0; }
.site-footer .wave-top { position: absolute; top: -1px; left: 0; right: 0; line-height: 0; transform: rotate(180deg); }
.site-footer .wave-top svg { width: 100%; height: auto; display: block; }
.site-footer a { color: #e2e8f0; }
.footer__grid { display: grid; grid-template-columns: 1.5fr 1fr 1fr; gap: 2.2rem; }
@media (max-width: 760px) { .footer__grid { grid-template-columns: 1fr; gap: 1.6rem; } }
.footer__grid h4 { font-family: var(--display); color: #fff; margin: 0 0 .8rem; font-size: 1rem; }
.footer__grid ul { list-style: none; margin: 0; padding: 0; display: grid; gap: .5rem; }
.footer__grid ul a { text-decoration: none; opacity: .85; }
.footer__grid ul a:hover { opacity: 1; text-decoration: underline; }
.footer__auth { margin-top: 2.2rem; padding-top: 1.5rem; border-top: 1px solid #2c3a4a; font-size: .85rem; color: #94a3b8; }
.footer__auth strong { color: #cbd5e1; }

/* ---------- Section divider wave ---------- */
.wave-divide { line-height: 0; }
.wave-divide svg { display: block; width: 100%; height: auto; }

/* legacy hooks kept harmless */
.hero__steps, .divider-steps { display: none; }

/* ---------- Scroll reveal ---------- */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s cubic-bezier(.2,.8,.2,1); }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-d="1"] { transition-delay: .08s; }
.reveal[data-d="2"] { transition-delay: .16s; }
.reveal[data-d="3"] { transition-delay: .24s; }
@media (prefers-reduced-motion: reduce) { .reveal { opacity: 1; transform: none; } }
.hero__photo img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    border-radius: 12px;
    display: block;
}
/* Election Notice Banner */
.election-banner {
  background: #b91c1c;
  color: #fff;
  padding: 0.75rem 1rem;
  font-size: 0.95rem;
  font-weight: 500;
  text-align: center;
}

.election-banner .wrap {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.election-banner a {
  color: #fff;
  font-weight: 700;
  text-decoration: underline;
}

.election-banner a:hover {
  opacity: 0.9;
}