/* =====================================================================
   CAMPAIGN TEMPLATE — shared stylesheet
   ---------------------------------------------------------------------
   REBRAND IN ONE PLACE: change the values under :root to match the
   candidate / party colours. Everything else follows automatically.
   ===================================================================== */

:root {
  /* --- Brand colours (change these to rebrand) --- */
  --green-900: #0c3b2a;   /* deepest — dark sections, footer            */
  --green-700: #14664a;   /* headings on light, borders                 */
  --green-500: #1e8c66;   /* primary brand green                        */
  --green-300: #6fc3a2;   /* soft green — subtle fills                  */
  --gold:      #f2b441;   /* accent — actions, highlights, underlines   */
  --gold-deep: #cf9317;   /* accent hover                               */

  /* --- Neutrals --- */
  --ink:    #10201a;      /* body text                                  */
  --ink-60: #4a5b53;      /* muted text                                 */
  --paper:  #fbfcfa;      /* page background                            */
  --mist:   #f0f4f0;      /* alternating section background             */
  --line:   rgba(16, 32, 26, .12);
  --white:  #ffffff;

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

  /* --- Structure --- */
  --wrap: 1160px;
  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 18px 50px -22px rgba(12, 59, 42, .35);
  --shadow-sm: 0 6px 20px -12px rgba(12, 59, 42, .4);
}

/* ------------------------------------------------------------------ Reset */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
body {
  font-family: var(--body);
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
ul { list-style: none; padding: 0; }

/* --------------------------------------------------------------- Type scale */
h1, h2, h3, h4 { font-family: var(--display); line-height: 1.05; font-weight: 700; letter-spacing: -.02em; }
h1 { font-size: clamp(2.6rem, 7vw, 5rem); }
h2 { font-size: clamp(2rem, 4.5vw, 3.2rem); }
h3 { font-size: clamp(1.3rem, 2.4vw, 1.7rem); letter-spacing: -.01em; }
p  { color: var(--ink-60); }
.lead { font-size: clamp(1.05rem, 1.6vw, 1.28rem); color: var(--ink); }

.eyebrow {
  font-family: var(--body);
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: var(--green-500);
  display: inline-flex;
  align-items: center;
  gap: .6rem;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 2px;
  background: var(--gold);
  display: inline-block;
}
.on-dark .eyebrow { color: var(--gold); }
.on-dark .eyebrow::before { background: var(--gold); }

/* ------------------------------------------------------------------ Layout */
.wrap { width: min(100% - 2.4rem, var(--wrap)); margin-inline: auto; }
.section { padding: clamp(4rem, 9vw, 7rem) 0; }
.section--mist { background: var(--mist); }
.section--dark { background: var(--green-900); color: #dfeee7; }
.section--dark h1, .section--dark h2, .section--dark h3 { color: #fff; }
.section--dark p { color: #b7d3c7; }
/* .card is always a white surface, even sitting inside a dark section — its
   own text needs the normal light-background colors, not the section's. */
.section--dark .card h3 { color: var(--ink); }
.section--dark .card p { color: var(--ink-60); }
.section-head { max-width: 640px; margin-bottom: 3rem; }
.section-head p { margin-top: 1rem; }
.center { text-align: center; margin-inline: auto; }

.grid { display: grid; gap: 1.6rem; }
@media (min-width: 720px)  { .cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 860px)  { .cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 980px)  { .cols-4 { grid-template-columns: repeat(4, 1fr); } }

/* ----------------------------------------------------------------- Buttons */
.btn {
  --bg: var(--green-500); --fg: #fff;
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--bg); color: var(--fg);
  padding: .85rem 1.5rem; border: 0; border-radius: 999px;
  font-weight: 600; font-size: .98rem;
  transition: transform .15s ease, box-shadow .2s ease, background .2s ease;
  box-shadow: var(--shadow-sm);
}
.btn:hover { transform: translateY(-2px); }
.btn:active { transform: translateY(0); }
.btn--gold { --bg: var(--gold); --fg: var(--green-900); }
.btn--gold:hover { background: var(--gold-deep); }
.btn--ghost {
  --bg: transparent; --fg: var(--green-900);
  box-shadow: inset 0 0 0 2px var(--line);
}
.on-dark .btn--ghost { --fg: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.28); }
.btn--ghost:hover { box-shadow: inset 0 0 0 2px var(--green-500); }
.btn--lg { padding: 1.05rem 1.9rem; font-size: 1.05rem; }
.btn--block { width: 100%; justify-content: center; }
.btn svg { width: 18px; height: 18px; }

/* -------------------------------------------------------------------- Nav */
.nav {
  position: sticky; top: 0; z-index: 50;
  background: rgba(251, 252, 250, .82);
  backdrop-filter: saturate(1.4) blur(12px);
  border-bottom: 1px solid var(--line);
}
.nav__inner { display: flex; align-items: center; justify-content: space-between; height: 74px; gap: .6rem; }
.brand { display: flex; align-items: center; gap: .7rem; font-family: var(--display); font-weight: 700; font-size: 1.15rem; letter-spacing: -.02em; min-width: 0; }
.brand__mark {
  width: 40px; height: 40px; border-radius: 12px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: linear-gradient(140deg, var(--green-500), var(--green-900));
  font-family: var(--display); font-weight: 700;
}
/* The name/party text needs to shrink and truncate (not overflow) once the
   nav bar runs out of room on very small screens — the Donate button and
   menu toggle beside it must stay fully visible. */
.brand > span:not(.brand__mark) { min-width: 0; overflow: hidden; }
.brand__name { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.brand small { display: block; font-family: var(--body); font-weight: 500; font-size: .72rem; letter-spacing: .12em; text-transform: uppercase; color: var(--green-500); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.nav__links { display: flex; align-items: center; gap: .3rem; }
.nav__links a {
  padding: .5rem .8rem; border-radius: 8px; font-size: .95rem; font-weight: 500; color: var(--ink);
  transition: background .15s, color .15s;
}
.nav__links a:hover { background: var(--mist); }
.nav__links a.is-active { color: var(--green-700); }
.nav__links a.is-active::after {
  content: ""; display: block; height: 2px; background: var(--gold);
  border-radius: 2px; margin-top: 2px;
}
.nav__cta { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.nav__toggle { display: none; width: 44px; height: 44px; border: 1px solid var(--line); border-radius: 10px; background: var(--white); }
.nav__toggle span, .nav__toggle span::before, .nav__toggle span::after {
  content: ""; display: block; width: 20px; height: 2px; background: var(--ink); margin-inline: auto; transition: .2s;
}
.nav__toggle span::before { transform: translateY(-6px); }
.nav__toggle span::after  { transform: translateY(4px); }
.nav.is-open .nav__toggle span { background: transparent; }
.nav.is-open .nav__toggle span::before { transform: rotate(45deg); }
.nav.is-open .nav__toggle span::after  { transform: rotate(-45deg) translateY(-2px) translateX(1px); }

@media (max-width: 900px) {
  .nav__toggle { display: grid; place-items: center; }
  .nav__links {
    position: absolute; inset: 74px 0 auto 0;
    flex-direction: column; align-items: stretch; gap: 0;
    background: var(--paper); border-bottom: 1px solid var(--line);
    padding: .6rem 1.2rem 1.2rem;
    box-shadow: var(--shadow);
    transform: translateY(-8px); opacity: 0; pointer-events: none; transition: .18s;
  }
  .nav.is-open .nav__links { transform: none; opacity: 1; pointer-events: auto; }
  .nav__links a { padding: .85rem .5rem; border-bottom: 1px solid var(--line); border-radius: 0; }
  .nav__links a.is-active::after { display: none; }
  .nav__cta .btn--ghost { display: none; }

  /* Candidate photo leads the hero on small screens, ahead of the name/bio. */
  .hero .hero__grid .portrait { order: -1; }

  /* Full-width, stacked buttons are easier to tap than a cramped side-by-side row. */
  .btn { width: 100%; justify-content: center; }
  .nav .btn { width: auto; }
  .hero__cta { flex-direction: column; align-items: stretch; }
}

/* ------------------------------------------------------------------- Hero */
.hero { position: relative; padding: clamp(3rem, 7vw, 4.5rem) 0 clamp(3.5rem, 8vw, 5rem); overflow: hidden; }
.hero::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background:
    radial-gradient(70% 80% at 88% -10%, rgb(var(--green-rgb, 30 140 102) / 36%), transparent 62%),
    radial-gradient(60% 70% at 4% 105%, rgb(var(--gold-rgb, 242 180 65) / 30%), transparent 58%);
}
.hero__grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero__grid { grid-template-columns: 1.1fr .9fr; gap: 3.5rem; } }

/* Homepage-only: on mobile, About comes right after the manifesto preview,
   ahead of the track record — desktop keeps the manifesto → track record →
   about order untouched, this only reflows the stacked mobile order. */
@media (max-width: 900px) {
  .home-mid-sections { display: flex; flex-direction: column; }
  .home-mid-sections .section--mist { order: 1; }
  .home-mid-sections .section--dark { order: 2; }
}
.hero__party {
  display: inline-flex; align-items: center; gap: .55rem;
  background: var(--white); border: 1px solid var(--line);
  padding: .4rem .9rem .4rem .5rem; border-radius: 999px;
  font-weight: 600; font-size: .88rem; box-shadow: var(--shadow-sm);
}
.hero__party .dot { width: 22px; height: 22px; border-radius: 50%; background: linear-gradient(140deg, var(--green-500), var(--gold)); }
.hero__party-sym { width: 24px; height: 24px; border-radius: 50%; object-fit: contain; background: var(--white); }
.hero__partyname { font-weight: 700; color: var(--ink); margin-top: .35rem; font-size: 1rem; }
.hero h1 { margin: 1.2rem 0 .4rem; }
.hero h1 span { color: var(--green-700); }
.hero__slogan { font-family: var(--display); font-weight: 600; font-size: clamp(1.1rem, 2vw, 1.5rem); color: var(--ink); letter-spacing: -.01em; }
.hero__slogan::before { content: "“"; color: var(--gold); }
.hero__slogan::after  { content: "”"; color: var(--gold); }
.hero__bio { margin: 1.3rem 0 1.8rem; max-width: 46ch; }
.hero__cta { display: flex; flex-wrap: wrap; gap: .8rem; }

/* Portrait with duotone frame + tally motif */
.portrait { position: relative; }
.portrait__frame {
  aspect-ratio: 4 / 5; border-radius: 22px; overflow: hidden; position: relative;
  background: linear-gradient(160deg, var(--green-500), var(--green-900));
  box-shadow: var(--shadow); isolation: isolate;
}
.portrait__frame img { width: 100%; height: 100%; object-fit: cover; }
.portrait__badge {
  position: absolute; left: -14px; bottom: 26px; z-index: 2;
  background: var(--gold); color: var(--green-900);
  padding: .7rem 1.1rem; border-radius: 12px; box-shadow: var(--shadow);
  font-family: var(--display); font-weight: 700; line-height: 1;
}
.portrait__badge small { display: block; font-family: var(--body); font-weight: 600; font-size: .68rem; letter-spacing: .1em; text-transform: uppercase; opacity: .8; margin-bottom: .2rem; }
.portrait__tally { position: absolute; top: 18px; right: -12px; z-index: 2; display: flex; gap: 5px; background: var(--white); padding: .55rem .7rem; border-radius: 10px; box-shadow: var(--shadow-sm); }
.portrait__tally i { width: 4px; height: 26px; border-radius: 2px; background: var(--green-500); display: block; }
.portrait__tally i:nth-child(5) { transform: rotate(24deg); transform-origin: bottom; background: var(--gold); }

/* Party symbol — prominent affiliation badge on the hero portrait */
.portrait__party {
  position: absolute; top: 22px; right: -16px; z-index: 3;
  width: 76px; height: 76px; border-radius: 50%;
  background: var(--white); box-shadow: var(--shadow);
  display: grid; place-items: center; padding: 13px;
}
.portrait__party img { width: 100%; height: 100%; object-fit: contain; }
@media (max-width: 560px) {
  .portrait__party { width: 60px; height: 60px; right: -8px; top: 14px; padding: 10px; }
}

/* Placeholder image blocks (swap for real photos) */
.ph {
  background:
    linear-gradient(135deg, rgba(255,255,255,.14), transparent),
    linear-gradient(160deg, var(--green-500), var(--green-900));
  color: rgba(255,255,255,.9); display: grid; place-items: center; text-align: center;
  font-size: .8rem; letter-spacing: .05em; padding: 1rem;
}

/* ------------------------------------------------------------------ Cards */
.card {
  background: var(--white); border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.6rem; box-shadow: var(--shadow-sm);
  transition: transform .18s ease, box-shadow .2s ease;
}
.card:hover { transform: translateY(-4px); box-shadow: var(--shadow); }
.card__ico { width: 46px; height: 46px; border-radius: 12px; display: grid; place-items: center; background: var(--mist); color: var(--green-700); margin-bottom: 1rem; }
.card__ico svg { width: 22px; height: 22px; }
.card h3 { margin-bottom: .5rem; }
.card p { font-size: .96rem; }

/* Pillar (manifesto) numbered */
.pillar { position: relative; }
.pillar__no { font-family: var(--display); font-weight: 700; font-size: 1rem; color: var(--gold-deep); background: var(--mist); width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; margin-bottom: 1rem; }

/* Stats / achievements counters */
.stats { display: grid; gap: 1.4rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 820px) { .stats { grid-template-columns: repeat(4, 1fr); } }
.stat__num { font-family: var(--display); font-weight: 700; font-size: clamp(2.4rem, 5vw, 3.4rem); line-height: 1; color: #fff; }
.stat__num .suffix { color: var(--gold); }
.stat__label { margin-top: .5rem; font-size: .92rem; color: #b7d3c7; }

/* Achievement list */
.timeline { display: grid; gap: 1rem; }
.timeline__item { display: grid; grid-template-columns: auto 1fr; gap: 1.1rem; align-items: start; padding: 1.3rem 1.5rem; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.timeline__year { font-family: var(--display); font-weight: 700; color: var(--green-700); background: var(--mist); border-radius: 8px; padding: .35rem .6rem; font-size: .9rem; white-space: nowrap; }
.timeline__item h3 { margin-bottom: .3rem; }

/* Gallery */
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 760px) { .gallery { grid-template-columns: repeat(3, 1fr); } }
.gallery figure { position: relative; border-radius: var(--radius-sm); overflow: hidden; aspect-ratio: 1; }
.gallery .ph { width: 100%; height: 100%; }
.gallery figure img { transition: transform .35s ease; }
.gallery figure:hover img { transform: scale(1.08); }
.gallery figcaption {
  position: absolute; inset: auto 0 0 0; padding: 1.4rem .9rem .8rem;
  background: linear-gradient(transparent, rgba(12,59,42,.8)); color: #fff; font-size: .85rem; font-weight: 500;
  opacity: 0; transform: translateY(8px); transition: .2s;
}
.gallery figure:hover figcaption { opacity: 1; transform: none; }
.gallery figure.tall { grid-row: span 2; aspect-ratio: auto; }

/* Blog */
.posts { display: grid; gap: 1.6rem; }
@media (min-width: 760px) { .posts { grid-template-columns: repeat(2, 1fr); } }
@media (min-width: 1000px){ .posts { grid-template-columns: repeat(3, 1fr); } }
.post-card { display: flex; flex-direction: column; overflow: hidden; padding: 0; }
.post-card .ph { aspect-ratio: 16/10; }
.post-card__body { padding: 1.4rem; display: flex; flex-direction: column; flex: 1; }
.post-card__meta { font-size: .78rem; letter-spacing: .04em; text-transform: uppercase; color: var(--green-500); font-weight: 600; margin-bottom: .6rem; }
.post-card h3 { font-size: 1.25rem; margin-bottom: .5rem; }
.post-card p { font-size: .95rem; flex: 1; }
.post-card a.more { margin-top: 1rem; font-weight: 600; color: var(--green-700); display: inline-flex; gap: .4rem; align-items: center; }
.post-card a.more:hover { color: var(--gold-deep); }

/* Article body */
.article { max-width: 720px; margin-inline: auto; }
.article h2 { font-size: 1.7rem; margin: 2rem 0 .8rem; }
.article p { color: var(--ink); margin-bottom: 1.1rem; }
.article blockquote { border-left: 3px solid var(--gold); padding: .4rem 0 .4rem 1.3rem; margin: 1.6rem 0; font-family: var(--display); font-size: 1.3rem; color: var(--green-900); }

/* Comments */
.comment { display: grid; grid-template-columns: auto 1fr; gap: 1rem; padding: 1.3rem 0; border-top: 1px solid var(--line); }
.avatar { width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center; font-family: var(--display); font-weight: 700; color: #fff; background: linear-gradient(140deg, var(--green-500), var(--green-900)); }
.comment__meta { font-size: .85rem; color: var(--ink-60); margin-bottom: .25rem; }
.comment__meta b { color: var(--ink); font-weight: 600; }

/* ------------------------------------------------------------------ Forms */
.form { display: grid; gap: 1.1rem; }
.form .row { display: grid; gap: 1.1rem; }
@media (min-width: 640px) { .form .row.two { grid-template-columns: 1fr 1fr; } .form .row.three { grid-template-columns: repeat(3, 1fr); } }
.field { display: grid; gap: .4rem; }
.field label { font-size: .88rem; font-weight: 600; color: var(--ink); }
.field label .opt { font-weight: 400; color: var(--ink-60); }
.field input, .field select, .field textarea {
  width: 100%; padding: .8rem .9rem; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--white); color: var(--ink); font: inherit; transition: border-color .15s, box-shadow .15s;
}
.field textarea { resize: vertical; min-height: 130px; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--green-500); box-shadow: 0 0 0 3px rgba(30,140,102,.15);
}
.form-note { font-size: .85rem; color: var(--ink-60); }
.form-panel { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.4rem, 3vw, 2.4rem); box-shadow: var(--shadow-sm); }

/* Donation methods */
.pay { display: grid; gap: 1.2rem; }
@media (min-width: 760px) { .pay { grid-template-columns: repeat(3, 1fr); } }
.pay__card { text-align: left; }
.pay__amounts { display: flex; flex-wrap: wrap; gap: .5rem; margin: 1rem 0; }
.pay__amounts button {
  border: 1px solid var(--line); background: var(--white); border-radius: 999px;
  padding: .5rem 1rem; font-weight: 600; color: var(--green-700); transition: .15s;
}
.pay__amounts button:hover, .pay__amounts button.sel { background: var(--green-500); color: #fff; border-color: var(--green-500); }
.pay__row { display: flex; justify-content: space-between; padding: .5rem 0; border-bottom: 1px dashed var(--line); font-size: .95rem; }
.pay__row b { font-family: var(--display); }

/* CTA band */
.cta-band { background: linear-gradient(140deg, var(--green-700), var(--green-900)); color: #fff; border-radius: var(--radius); padding: clamp(2rem, 5vw, 3.4rem); text-align: center; box-shadow: var(--shadow); }
.cta-band h2 { color: #fff; }
.cta-band p { color: #cfe6db; max-width: 52ch; margin: 1rem auto 1.8rem; }
.cta-band .btn--ghost { --fg: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.4); }

/* Page header (interior pages) */
.page-head {
  padding: clamp(3rem, 6vw, 4.5rem) 0 clamp(2rem, 4vw, 3rem);
  background: linear-gradient(120deg, rgb(var(--green-rgb, 30 140 102) / 14%), rgb(var(--gold-rgb, 242 180 65) / 12%));
  border-bottom: 1px solid var(--line);
}
.page-head p { max-width: 60ch; margin-top: 1rem; }
.crumbs { font-size: .85rem; color: var(--ink-60); margin-bottom: 1rem; }
.crumbs a:hover { color: var(--green-700); }

/* ----------------------------------------------------------------- Footer */
.footer { background: var(--green-900); color: #b7d3c7; padding: clamp(3rem, 6vw, 4.5rem) 0 2rem; }
.footer__grid { display: grid; gap: 2rem; }
.footer__grid > div { min-width: 0; }
@media (min-width: 760px) { .footer__grid { grid-template-columns: 1.6fr 1fr 1fr; } }
.footer h4 { color: #fff; font-size: 1rem; margin-bottom: 1rem; letter-spacing: .02em; }
.footer a { color: #b7d3c7; }
.footer a:hover { color: var(--gold); }
.footer li { margin-bottom: .55rem; }
.footer .brand { color: #fff; margin-bottom: 1rem; }
.footer .brand small { color: var(--gold); }
.socials { display: flex; gap: .6rem; margin-top: 1.1rem; }
.socials a { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; background: rgba(255,255,255,.08); }
.socials a:hover { background: var(--gold); color: var(--green-900); }
.socials svg { width: 18px; height: 18px; }
.footer__bottom { margin-top: 2.5rem; padding-top: 1.5rem; border-top: 1px solid rgba(255,255,255,.12); display: flex; flex-wrap: wrap; gap: .6rem 1.5rem; justify-content: space-between; font-size: .85rem; }

/* --------------------------------------------------------------- Reveal fx */
.reveal { opacity: 0; transform: translateY(18px); transition: opacity .6s ease, transform .6s ease; }
.reveal.in { opacity: 1; transform: none; }
.reveal[data-delay="1"] { transition-delay: .08s; }
.reveal[data-delay="2"] { transition-delay: .16s; }
.reveal[data-delay="3"] { transition-delay: .24s; }

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto !important; }
  .reveal { opacity: 1; transform: none; transition: none; }
  .btn:hover, .card:hover { transform: none; }
}

/* Skip link (a11y) */
.skip { position: absolute; left: -999px; top: 0; background: var(--gold); color: var(--green-900); padding: .6rem 1rem; border-radius: 0 0 8px 0; z-index: 100; font-weight: 600; }
.skip:focus { left: 0; }
