/* ---------- Base ---------- */
:root {
  --rotary-blue: #17458f;
  --rotary-blue-dark: #0f2f63;
  --rotary-gold: #f7a81b;
  --ink: #24272b;
  --ink-soft: #565b62;
  --paper: #ffffff;
  --paper-alt: #f5f7fb;
  --border: #e2e6ee;
  --radius: 1rem;
  --max-width: 72rem;
  font-size: 16px;
}

* {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
}

body {
  margin: 0;
  font-family:
    "Segoe UI",
    system-ui,
    -apple-system,
    Roboto,
    Helvetica,
    Arial,
    sans-serif;
  color: var(--ink);
  background: var(--paper);
  line-height: 1.6;
}

h1,
h2,
h3 {
  line-height: 1.2;
  margin: 0 0 0.6em;
  color: var(--rotary-blue-dark);
}

h1 {
  font-size: clamp(2rem, 5vw, 3.2rem);
}

h2 {
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
}

h3 {
  font-size: 1.15rem;
}

p {
  margin: 0 0 1em;
  color: var(--ink-soft);
}

a {
  color: var(--rotary-blue);
}

ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.wrap {
  max-width: var(--max-width);
  margin: 0 auto;
  padding: 0 1.5rem;
}

.sr-only {
  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: -999px;
  top: 0;
  background: var(--rotary-blue);
  color: #fff;
  padding: 0.75rem 1.25rem;
  z-index: 200;
  border-radius: 0 0 0.5rem 0;
}

.skip-link:focus {
  left: 0;
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 0.85rem 1.6rem;
  border-radius: 999px;
  font-weight: 600;
  text-decoration: none;
  border: 2px solid transparent;
  cursor: pointer;
  font-size: 1rem;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease;
}

.btn:hover {
  transform: translateY(-2px);
}

.btn-primary {
  background: var(--rotary-gold);
  color: var(--rotary-blue-dark);
  box-shadow: 0 6px 16px rgba(247, 168, 27, 0.35);
}

.btn-ghost {
  background: transparent;
  color: var(--paper);
  border-color: rgba(255, 255, 255, 0.7);
}

/* ---------- Subsite bar ---------- */
.subsite-bar {
  background: var(--rotary-blue-dark);
  color: rgba(255, 255, 255, 0.85);
  font-size: 0.85rem;
  padding: 0.5rem 0;
}

.subsite-bar a {
  color: inherit;
  text-decoration: none;
}

.subsite-bar a:hover {
  text-decoration: underline;
}

/* ---------- Header ---------- */
.site-header {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--paper);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 4.5rem;
  gap: 1rem;
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  text-decoration: none;
  font-weight: 700;
  color: var(--rotary-blue-dark);
  font-size: 1.05rem;
  white-space: nowrap;
}

.brand-mark {
  width: 2.5rem;
  height: 2.5rem;
  flex-shrink: 0;
}

.nav-toggle {
  display: none;
  background: none;
  border: none;
  cursor: pointer;
  padding: 0.5rem;
}

.hamburger,
.hamburger::before,
.hamburger::after {
  display: block;
  width: 1.5rem;
  height: 2px;
  background: var(--ink);
  border-radius: 2px;
}

.hamburger {
  position: relative;
}

.hamburger::before,
.hamburger::after {
  content: "";
  position: absolute;
  left: 0;
}

.hamburger::before {
  top: -0.45rem;
}

.hamburger::after {
  top: 0.45rem;
}

.primary-nav ul {
  display: flex;
  align-items: center;
  gap: 1.75rem;
}

.primary-nav a {
  text-decoration: none;
  color: var(--ink);
  font-weight: 600;
  font-size: 0.95rem;
}

.primary-nav a:hover {
  color: var(--rotary-blue);
}

.nav-cta {
  white-space: nowrap;
  background: var(--rotary-blue);
  color: #fff !important;
  padding: 0.5rem 1.1rem !important;
  border-radius: 999px;
}

.nav-cta:hover {
  background: var(--rotary-blue-dark);
}

/* ---------- Hero ---------- */
.hero {
  position: relative;
  overflow: hidden;
  background: linear-gradient(
    135deg,
    var(--rotary-blue) 0%,
    var(--rotary-blue-dark) 100%
  );
  color: #fff;
  padding: 5rem 0 6rem;
}

.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/Town-of-Victoria-Park-Stock-Photos-2023-020.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.15;
  z-index: 0;
}

.market-page .hero::before {
  background-image: url("images/market-photo.jpg");
}

.hero-inner {
  position: relative;
  z-index: 2;
  max-width: 40rem;
}

.hero .eyebrow {
  color: var(--rotary-gold);
}

.hero h1 {
  color: #fff;
}

.hero .lead {
  color: rgba(255, 255, 255, 0.9);
  font-size: 1.15rem;
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  margin-top: 2rem;
}

.social-links {
  display: flex;
  justify-content: flex-end;
  gap: 0.75rem;
  margin-top: 1.5rem;
}

.social-links a {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.7);
  color: #fff;
  transition:
    background 0.15s ease,
    transform 0.15s ease;
}

.social-links a:hover {
  background: rgba(255, 255, 255, 0.15);
  transform: translateY(-2px);
}

.hero-blob {
  position: absolute;
  right: -8rem;
  top: -6rem;
  width: 28rem;
  height: 28rem;
  border-radius: 50%;
  background: radial-gradient(
    circle,
    rgba(247, 168, 27, 0.35),
    transparent 70%
  );
  z-index: 1;
}

/* ---------- Sections ---------- */
.section {
  padding: 4.5rem 0;
}

.section.alt {
  background: var(--paper-alt);
}

#when-and-where {
  position: relative;
  overflow: hidden;
}

#when-and-where::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/john-macmillan-park.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.8;
  z-index: 0;
}

#when-and-where > .wrap {
  position: relative;
  z-index: 1;
}

#projects {
  position: relative;
  overflow: hidden;
}

#projects::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image: url("images/market-photo.jpg");
  background-size: cover;
  background-position: center;
  opacity: 0.5;
  z-index: 0;
}

#projects > .wrap {
  position: relative;
  z-index: 1;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  font-size: 0.8rem;
  color: var(--rotary-gold);
}

.section-intro {
  max-width: 42rem;
  font-size: 1.05rem;
}

.two-col {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 2rem;
  margin-bottom: 2.5rem;
}

.value-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
}

.meeting-card + .value-grid {
  margin-top: 2rem;
}

.value-grid li {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.75rem;
}

.value-grid h3 {
  color: var(--rotary-blue);
}

/* ---------- Meetings ---------- */
.meeting-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.location-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
}

.location-card > .location-details {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
}

.meeting-card dl,
.location-card dl {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.5rem;
  flex: 1;
  margin: 0;
  min-width: 16rem;
}

.meeting-card dt,
.location-card dt {
  font-weight: 700;
  color: var(--rotary-blue);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 0.25rem;
}

.meeting-card dd,
.location-card dd {
  margin: 0;
  color: var(--ink-soft);
}

/* ---------- Projects ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 1.75rem;
}

.card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  border-top: 4px solid var(--rotary-gold);
}

/* ---------- Vendor list ---------- */
.vendor-list {
  border-top: 1px solid var(--border);
}

.vendor-item {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 0.5rem 1.5rem;
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--border);
}

.vendor-item h3 {
  flex: 0 0 12rem;
  margin: 0;
}

.vendor-item p {
  flex: 1 1 20rem;
  margin: 0;
}

.vendor-link {
  flex: 0 0 auto;
  font-weight: 600;
  white-space: nowrap;
}

/* ---------- Supporters ---------- */
.supporter-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 2rem;
}

.supporter-item a {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1rem;
  width: 22rem;
  padding: 2rem 1.5rem;
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  text-decoration: none;
  text-align: center;
  transition: transform 0.15s ease;
}

.supporter-item a:hover {
  transform: translateY(-2px);
}

.supporter-item span {
  font-weight: 600;
  color: var(--ink);
  font-size: 0.95rem;
}

.supporter-logo {
  max-height: 6rem;
  max-width: 20rem;
  object-fit: contain;
}

/* ---------- Members ---------- */
.member-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1.75rem;
}

.member-card {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  text-align: center;
}

.member-avatar {
  display: grid;
  place-items: center;
  width: 4rem;
  height: 4rem;
  margin: 0 auto 1rem;
  border-radius: 50%;
  background: var(--rotary-blue);
  color: #fff;
  font-weight: 800;
  font-size: 1.1rem;
}

.member-role {
  color: var(--rotary-gold);
  font-weight: 700;
  margin: 0;
  text-transform: uppercase;
  font-size: 0.85rem;
  letter-spacing: 0.05em;
}

/* ---------- Contact ---------- */
.contact-wrap {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 3rem;
  align-items: start;
}

address {
  font-style: normal;
  color: var(--ink-soft);
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.5rem;
  display: inline-block;
}

.contact-logo {
  max-width: 20rem;
  height: auto;
}

.contact-form {
  background: var(--paper);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 2rem;
  display: grid;
  gap: 1.25rem;
}

.field {
  display: grid;
  gap: 0.4rem;
}

.field label {
  font-weight: 600;
  font-size: 0.9rem;
}

.field input,
.field textarea {
  font: inherit;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: 0.5rem;
  resize: vertical;
}

.field input:focus,
.field textarea:focus {
  outline: 2px solid var(--rotary-blue);
  outline-offset: 1px;
}

/* ---------- Footer ---------- */
.site-footer {
  background: var(--rotary-blue-dark);
  color: rgba(255, 255, 255, 0.85);
  padding: 2rem 0;
  text-align: center;
  font-size: 0.9rem;
}

.footer-inner p {
  color: inherit;
  margin: 0.25rem 0;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .two-col,
  .value-grid,
  .card-grid,
  .member-grid {
    grid-template-columns: 1fr;
  }

  .contact-wrap {
    grid-template-columns: 1fr;
  }

  .meeting-card dl,
  .location-card dl {
    grid-template-columns: 1fr;
  }

  .vendor-item {
    flex-direction: column;
    align-items: flex-start;
    gap: 0.5rem;
  }

  .vendor-item h3 {
    flex-basis: auto;
  }

  .vendor-item p {
    flex: 1;
  }
}

@media (max-width: 720px) {
  .nav-toggle {
    display: block;
  }

  .primary-nav {
    position: absolute;
    top: 4.5rem;
    left: 0;
    right: 0;
    background: var(--paper);
    border-bottom: 1px solid var(--border);
    max-height: 0;
    overflow: hidden;
    transition: max-height 0.25s ease;
  }

  .primary-nav.open {
    max-height: 24rem;
  }

  .primary-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 0.5rem 1.5rem 1.5rem;
  }

  .primary-nav li {
    border-bottom: 1px solid var(--border);
  }

  .primary-nav a {
    display: block;
    padding: 0.9rem 0;
  }

  .nav-cta {
    display: inline-block;
    margin-top: 0.75rem;
  }

  .hero {
    padding: 3.5rem 0 4rem;
    text-align: left;
  }

  .meeting-card,
  .location-card > .location-details {
    flex-direction: column;
    align-items: stretch;
  }
}
