/* =========================================================
   Zaki Mohammed for Nanaimo City Council - Stylesheet
   Color palette: Dusty Rose / Burgundy / Blush / Cream
   ========================================================= */

:root {
  --dusty-rose: #D89AA5;
  --burgundy: #541E2B;
  --burgundy-dark: #3D1520;
  --blush: #EBC4C8;
  --cream: #FFF8F0;

  --text-main: #3A2226;
  --text-muted: #7A5B60;

  --font-heading: 'Fraunces', Georgia, serif;
  --font-body: 'Work Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;

  --container-width: 1120px;
  --radius: 14px;
  --shadow-soft: 0 10px 30px rgba(84, 30, 43, 0.12);
}

/* ---------- Custom cursor ---------- */
@media (hover: hover) and (pointer: fine) {
  body, a, button, summary, .btn { cursor: none; }
  input, textarea { cursor: text; }
}
.cursor-glow {
  position: fixed;
  top: 0;
  left: 0;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  background: var(--dusty-rose);
  box-shadow: 0 0 12px 4px rgba(216, 154, 165, 0.8), 0 0 26px 10px rgba(216, 154, 165, 0.35);
  pointer-events: none;
  z-index: 9999;
  transform: translate(-50%, -50%);
  visibility: hidden;
  animation: cursor-blink 1.4s ease-in-out infinite;
}
.cursor-glow.active { visibility: visible; }
@keyframes cursor-blink {
  0%, 100% { opacity: 1; transform: translate(-50%, -50%) scale(1); }
  50% { opacity: 0.35; transform: translate(-50%, -50%) scale(0.7); }
}
@media (hover: none), (pointer: coarse) {
  .cursor-glow { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  .cursor-glow { animation: none; }
}

/* ---------- Reset ---------- */
* { box-sizing: border-box; }
html { scroll-behavior: smooth; font-size: 106.25%; }
body {
  margin: 0;
  font-family: var(--font-body);
  color: var(--text-main);
  background: var(--cream);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }

/* ---------- Scroll reveal ---------- */
.js .reveal {
  opacity: 0;
  transition: opacity 1.1s ease;
}
.js .reveal.revealed { opacity: 1; }
@media (prefers-reduced-motion: reduce) {
  .js .reveal { opacity: 1; transition: none; }
}
a { color: inherit; text-decoration: none; }
ul { margin: 0; padding: 0; list-style: none; }
h1, h2, h3, h4 {
  font-family: var(--font-heading);
  color: var(--burgundy);
  line-height: 1.15;
  margin: 0 0 0.5em;
}
p { margin: 0 0 1em; }

.container {
  width: 100%;
  max-width: var(--container-width);
  margin: 0 auto;
  padding: 0 20px;
}

.section { padding: 64px 0; }
.center { text-align: center; }

.section-eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-size: 0.95rem;
  font-weight: 700;
  color: var(--dusty-rose);
  margin-bottom: 0.5em;
}
.section-eyebrow.center { text-align: center; }
.section-intro {
  max-width: 640px;
  margin: 0 auto 40px;
  color: var(--text-muted);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 14px 28px;
  border-radius: 999px;
  font-weight: 600;
  font-size: 1rem;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform 0.15s ease, box-shadow 0.15s ease, background 0.15s ease;
}
.btn:hover { transform: translateY(-2px); }
.btn-primary {
  background: var(--burgundy);
  color: var(--cream);
}
.btn-primary:hover { background: var(--burgundy-dark); box-shadow: var(--shadow-soft); }
.btn-outline {
  background: transparent;
  border-color: var(--burgundy);
  color: var(--burgundy);
}
.btn-outline:hover { background: var(--burgundy); color: var(--cream); }
.btn-large { padding: 16px 40px; font-size: 1.05rem; }

/* ---------- Header / Nav ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: rgba(255, 248, 240, 0.95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--blush);
}
#banner,
#biography,
#platform,
#donate,
#volunteer,
#lawn-sign {
  scroll-margin-top: 72px;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: 14px;
  padding-bottom: 14px;
}
.logo {
  font-family: var(--font-heading);
  font-weight: 700;
  font-size: 1.15rem;
  color: var(--burgundy);
  display: flex;
  flex-direction: column;
  line-height: 1.2;
}
.logo span {
  font-family: var(--font-body);
  font-weight: 500;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--dusty-rose);
}

.nav-toggle {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  width: 44px;
  height: 44px;
  padding: 13px 9px;
  margin-right: -9px;
  background: none;
  border: none;
  cursor: pointer;
}
.nav-toggle span {
  display: block;
  height: 2px;
  width: 100%;
  background: var(--burgundy);
  border-radius: 2px;
  transition: transform 0.2s ease, opacity 0.2s ease;
}
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(8px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-8px) rotate(-45deg); }

.primary-nav {
  position: absolute;
  top: 100%;
  left: 0;
  right: 0;
  background: var(--cream);
  border-bottom: 0 solid var(--blush);
  display: flex;
  flex-direction: column;
  padding: 0 20px;
  max-height: 0;
  overflow: hidden;
  visibility: hidden;
  transition: max-height 0.25s ease, padding 0.25s ease, visibility 0s linear 0.25s;
}
.primary-nav.open {
  max-height: 400px;
  padding: 8px 20px 20px;
  border-bottom-width: 1px;
  visibility: visible;
  transition: max-height 0.25s ease, padding 0.25s ease;
}
.primary-nav a {
  padding: 12px 0;
  font-weight: 500;
  border-bottom: 1px solid rgba(84, 30, 43, 0.08);
}
.primary-nav a:last-child { border-bottom: none; }

/* ---------- Banner ---------- */
.banner {
  position: relative;
  overflow: hidden;
  min-height: 68vh;
  display: flex;
  align-items: flex-end;
  color: var(--cream);
}
.banner-media {
  position: absolute;
  inset: 0;
  z-index: 0;
}
.banner-photo-img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: 47% 18%;
}
.banner-overlay {
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(61, 21, 32, 0.2) 0%, rgba(61, 21, 32, 0.6) 55%, rgba(61, 21, 32, 0.93) 100%);
}
.banner-inner {
  position: relative;
  z-index: 1;
  padding-bottom: 44px;
}
.banner-text { text-align: left; max-width: 640px; }
.eyebrow {
  text-transform: none;
  letter-spacing: 0.02em;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--blush);
  margin-bottom: 0.75em;
}
.banner h1 {
  font-size: clamp(2rem, 6vw, 3.4rem);
  font-weight: 700;
  text-transform: uppercase;
  margin-bottom: 0.3em;
  color: var(--cream);
  text-shadow: 3px 3px 0 var(--dusty-rose);
}
.tagline {
  font-size: 1.3rem;
  color: var(--blush);
  max-width: 560px;
  margin: 0 0 1.5em;
}
.banner-actions {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
}
.banner-actions .btn {
  padding: 17px 36px;
  font-size: 1.1rem;
}
.banner .btn-primary {
  background: var(--dusty-rose);
  color: var(--burgundy);
}
.banner .btn-primary:hover {
  background: var(--blush);
}

.photo-frame {
  width: 220px;
  height: 220px;
  margin: 0 auto;
  border-radius: 50%;
  background: var(--dusty-rose);
  border: 6px solid var(--cream);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  display: flex;
  align-items: flex-end;
  justify-content: center;
}
.photo-frame svg { fill: var(--cream); opacity: 0.85; width: 70%; }
.photo-frame.small { width: 240px; height: 240px; }
.photo-frame img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
.bio-photo-img { object-position: 63% 12%; }

/* ---------- Biography ---------- */
.bio-inner {
  display: flex;
  flex-direction: column;
  gap: 36px;
  align-items: center;
  text-align: center;
}
.bio-facts {
  margin-top: 20px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  color: var(--text-muted);
}
.bio-text h2 { font-size: clamp(1.6rem, 4vw, 2.2rem); }

.bio-more {
  position: relative;
  max-height: 0;
  overflow: hidden;
  transition: max-height 0.6s ease;
}
.bio-more::after {
  content: "";
  position: absolute;
  bottom: 0;
  left: 0;
  right: 0;
  height: 70px;
  background: linear-gradient(180deg, transparent, var(--cream));
  transition: opacity 0.3s ease;
  pointer-events: none;
}
.bio-more.expanded {
  max-height: 2000px;
}
.bio-p1-rest { display: none; }
.bio-p1-rest.expanded { display: block; }
@media (min-width: 768px) {
  .bio-p1-rest { display: block; }
}
.bio-more.expanded::after {
  opacity: 0;
}
.read-more-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 4px 0 1.6em;
  padding: 6px 2px;
  background: none;
  border: none;
  border-bottom: 2px solid var(--dusty-rose);
  color: var(--burgundy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 0.95rem;
  cursor: pointer;
  transition: color 0.2s ease, border-color 0.2s ease;
}
.read-more-btn:hover {
  color: var(--burgundy-dark);
  border-color: var(--burgundy);
}
.read-more-btn .arrow {
  transition: transform 0.3s ease;
}
.read-more-btn[aria-expanded="true"] .arrow {
  transform: rotate(180deg);
}

/* ---------- Platform ---------- */
.platform { background: var(--blush); }
.platform .section-eyebrow { color: var(--burgundy); }
.platform h2 { font-size: clamp(1.8rem, 4.5vw, 2.4rem); }
.platform-accordion {
  display: grid;
  grid-template-columns: 1fr;
  gap: 18px;
  margin-top: 32px;
}
.platform-item {
  position: relative;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  overflow: hidden;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}
.platform-item:hover {
  transform: translateY(-4px);
  box-shadow: 0 16px 34px rgba(84, 30, 43, 0.22);
}
.platform-item summary::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  width: 45%;
  height: 100%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(255, 255, 255, 0.45) 40%,
    rgba(255, 255, 255, 0.9) 50%,
    rgba(255, 255, 255, 0.45) 60%,
    transparent 100%
  );
  filter: blur(4px);
  transform: skewX(-20deg);
  pointer-events: none;
  z-index: 2;
}
.platform-item:not([open]):hover summary::after {
  animation: platform-sweep 2.4s ease forwards;
}
@keyframes platform-sweep {
  from { left: -75%; }
  to { left: 125%; }
}
.platform-item summary {
  position: relative;
  overflow: hidden;
  cursor: pointer;
  list-style: none;
  padding: 20px 24px;
  display: flex;
  align-items: center;
  gap: 12px;
  font-family: var(--font-heading);
  font-weight: 600;
  font-size: 1.1rem;
  color: var(--burgundy);
  transition: background 0.2s ease;
}
.platform-item summary::-webkit-details-marker { display: none; }
.platform-item summary::marker { content: ""; }
.platform-item summary:hover { background: #E6E3E0; }
.platform-icon2 { font-size: 1.3rem; transition: transform 0.2s ease; }
.platform-item summary:hover .platform-icon2 { transform: scale(1.15) rotate(-4deg); }
.platform-item .chev {
  margin-left: auto;
  color: var(--dusty-rose);
  font-size: 0.9rem;
  transition: transform 0.2s ease, color 0.2s ease;
}
.platform-item[open] .chev { transform: rotate(180deg); }
.platform-item summary:hover .chev { color: var(--burgundy); }
.platform-intro {
  padding: 0 24px;
  margin: 0 0 8px;
  color: var(--burgundy);
  font-family: var(--font-heading);
  font-style: italic;
  font-size: 1.02rem;
}
.platform-points {
  padding: 4px 24px 24px 46px;
  margin: 0;
  list-style: disc;
}
.platform-points li {
  margin-bottom: 12px;
  line-height: 1.6;
  font-size: 0.93rem;
  color: var(--text-main);
}
.platform-points li::marker { color: var(--dusty-rose); }

/* ---------- Donate ---------- */
.donate { background: var(--dusty-rose); }
.donate h2, .donate .section-eyebrow { color: var(--burgundy); }
.donate-copy {
  max-width: 560px;
  margin: 0 auto 32px;
  color: var(--burgundy-dark);
}
.donate-actions { text-align: center; }
.donate-alt {
  margin-top: 20px;
  font-size: 0.95rem;
  color: var(--burgundy-dark);
}
.donate-alt a { text-decoration: underline; font-weight: 600; }
.nowrap { white-space: nowrap; }
.mobile-break { display: none; }
@media (max-width: 767px) {
  .mobile-break { display: inline; }
}

.donate-amounts {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 10px;
  margin-bottom: 22px;
}
.amount-chip {
  padding: 10px 22px;
  border-radius: 999px;
  border: 2px solid var(--burgundy);
  background: transparent;
  color: var(--burgundy);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: 1rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}
.amount-chip:hover { background: rgba(84, 30, 43, 0.08); }
.amount-chip.active { background: var(--burgundy); color: var(--cream); }
.amount-custom {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 10px 16px;
  border-radius: 999px;
  border: 2px solid var(--burgundy);
  background: var(--cream);
  color: var(--burgundy);
  font-weight: 600;
}
.amount-custom input {
  width: 90px;
  border: none;
  background: transparent;
  font-family: var(--font-body);
  font-size: 1rem;
  color: var(--burgundy);
}
.amount-custom input:focus { outline: none; }
.amount-custom input::-webkit-outer-spin-button,
.amount-custom input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.donate-status {
  margin-top: 12px;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2em;
  color: var(--burgundy-dark);
}
.donate-status.error { color: #7a1f1f; }
.donate-status.success { color: #1f5c33; }

/* ---------- Checkout modal ---------- */
.checkout-modal {
  position: fixed;
  inset: 0;
  z-index: 2000;
  display: none;
}
.checkout-modal.open { display: block; }
.checkout-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(61, 21, 32, 0.55);
}
.checkout-modal-panel {
  position: relative;
  z-index: 1;
  max-width: 480px;
  width: calc(100% - 32px);
  max-height: calc(100vh - 64px);
  margin: 32px auto;
  background: var(--cream);
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(61, 21, 32, 0.4);
  overflow: auto;
  padding: 20px;
}
.checkout-modal-close {
  position: absolute;
  top: 10px;
  right: 14px;
  background: none;
  border: none;
  font-size: 1.8rem;
  line-height: 1;
  color: var(--burgundy);
  cursor: pointer;
  z-index: 2;
}
body.modal-open { overflow: hidden; }

#donateBtn {
  position: relative;
  overflow: hidden;
}
#donateBtn::before,
#donateBtn::after {
  content: "";
  position: absolute;
  top: 0;
  left: -75%;
  height: 100%;
  transform: skewX(-20deg);
  pointer-events: none;
  animation: donate-sweep 8s ease-in-out infinite;
}
#donateBtn::before {
  width: 70%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(216, 154, 165, 0.55) 50%,
    transparent 100%
  );
  filter: blur(16px);
}
#donateBtn::after {
  width: 45%;
  background: linear-gradient(
    100deg,
    transparent 0%,
    rgba(235, 196, 200, 0.45) 38%,
    rgba(216, 154, 165, 0.7) 50%,
    rgba(235, 196, 200, 0.45) 62%,
    transparent 100%
  );
  filter: blur(4px);
}
@keyframes donate-sweep {
  0% { left: -75%; }
  40% { left: 125%; }
  100% { left: 125%; }
}
@media (prefers-reduced-motion: reduce) {
  #donateBtn::after { animation: none; }
}

/* ---------- Forms (Volunteer + Lawn Sign) ---------- */
.form-section-inner {
  display: flex;
  flex-direction: column;
  gap: 32px;
}
.form-section-inner.reverse { flex-direction: column; }
.lawn-sign { background: var(--blush); }
.form-copy h2 { font-size: clamp(1.5rem, 4vw, 2rem); }
.form-copy p { color: var(--text-muted); }

.campaign-form {
  background: var(--cream);
  border: 1px solid var(--blush);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-soft);
}
.lawn-sign .campaign-form { background: #fff; }
.lawn-sign-photo {
  width: 100%;
  max-width: 420px;
  border-radius: var(--radius);
  box-shadow: var(--shadow-soft);
  margin: 0 0 20px;
}

.hidden-field { position: absolute; left: -9999px; }

.form-row { margin-bottom: 18px; }
.form-row label {
  display: block;
  font-weight: 600;
  font-size: 0.9rem;
  margin-bottom: 6px;
  color: var(--burgundy);
}
.req { color: var(--dusty-rose); }
.form-row input[type="text"],
.form-row input[type="email"],
.form-row input[type="tel"],
.form-row textarea {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--blush);
  border-radius: 8px;
  font-family: var(--font-body);
  font-size: 1rem;
  background: #fff;
  color: var(--text-main);
}
.form-row input:focus,
.form-row textarea:focus {
  outline: none;
  border-color: var(--dusty-rose);
  box-shadow: 0 0 0 3px rgba(216, 154, 165, 0.35);
}
.two-col { display: grid; grid-template-columns: 1fr; gap: 18px; }

.checkbox-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 10px;
}
.checkbox {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 400;
  font-size: 0.95rem;
}
.checkbox input { width: 16px; height: 16px; accent-color: var(--burgundy); }

.form-status {
  margin-top: 14px;
  font-weight: 600;
  font-size: 0.9rem;
  min-height: 1.2em;
}
.form-status.success { color: #2f7a4d; }
.form-status.error { color: #b3261e; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--burgundy);
  color: var(--blush);
  padding-top: 48px;
}
.footer-inner {
  display: grid;
  grid-template-columns: 1fr;
  gap: 32px;
  padding-bottom: 32px;
  border-bottom: 1px solid rgba(255, 248, 240, 0.15);
}
.footer-name {
  font-family: var(--font-heading);
  font-size: 1.3rem;
  color: var(--cream);
  margin-bottom: 0.1em;
}
.site-footer h4 {
  color: var(--cream);
  font-size: 0.85rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  margin-bottom: 0.8em;
}
.site-footer a { display: block; margin-bottom: 6px; opacity: 0.9; }
.site-footer a:hover { opacity: 1; text-decoration: underline; }
.social-icons { display: flex; gap: 16px; }
.social-icons a { display: inline-block; }

.footer-authorization {
  font-size: 0.75rem;
  opacity: 0.75;
  max-width: 720px;
  margin: 24px auto 0;
  text-align: center;
}
.footer-copyright {
  font-size: 0.75rem;
  opacity: 0.6;
  text-align: center;
  margin: 8px 0 0;
  padding-bottom: 24px;
}
.footer-copyright a {
  display: inline;
  margin-bottom: 0;
  color: inherit;
  text-decoration: underline;
}
.footer-copyright a:hover { opacity: 1; }

/* =========================================================
   Tablet and up
   ========================================================= */
@media (min-width: 768px) {
  .section { padding: 88px 0; }

  .nav-toggle { display: none; }
  .primary-nav {
    position: static;
    flex-direction: row;
    align-items: center;
    max-height: none;
    overflow: visible;
    visibility: visible;
    border-bottom: none;
    padding: 0;
    gap: 28px;
    background: transparent;
  }
  .primary-nav a { padding: 0; border-bottom: none; font-size: 0.95rem; }

  .banner-inner { padding-bottom: 64px; }

  .bio-inner { flex-direction: row; text-align: left; align-items: flex-start; gap: 56px; }
  .bio-photo { flex-shrink: 0; }
  .photo-frame.small { width: 320px; height: 320px; }

  .platform-accordion { grid-template-columns: repeat(2, 1fr); align-items: start; }

  .form-section-inner { flex-direction: row; align-items: center; }
  .form-section-inner .form-copy { flex: 0 0 34%; }
  .form-section-inner .campaign-form { flex: 1; }
  .form-section-inner.reverse { flex-direction: row-reverse; }

  .two-col { grid-template-columns: 1fr 1fr; }
  .checkbox-grid { grid-template-columns: 1fr 1fr; }

  .footer-inner { grid-template-columns: 1.4fr 1fr 1fr 1fr; text-align: left; }
}

@media (min-width: 1024px) {
  .banner h1 { font-size: 3.6rem; }
}
