:root {
  --green-primary: #15563A;
  --green-light: #EAF3EC;
  --grey-muted: #E5E7EB;
  --accent: #F5C451;
  --text-main: #111827;
  --text-muted: #4B5563;
  --bg-main: #F9FAFB;
  --white: #FFFFFF;

  --radius-lg: 1rem;
  --radius-md: 0.75rem;
  --shadow-soft: 0 10px 30px rgba(15, 23, 42, 0.12);
  --mobile-pad: 16px;
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  scroll-behavior: smooth;
  scrollbar-gutter: stable;
}

body {
  margin: 0;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  background: var(--bg-main);
  color: var(--text-main);
  line-height: 1.6;
}

/* Layout helpers */

.page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.container {
  width: 100%;
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1.25rem;
}

/* Header / nav */

.site-header {
  background: var(--white);
  border-bottom: 1px solid var(--grey-muted);
  position: sticky;
  top: 0;
  z-index: 20;
}

.site-header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0.85rem 0;
}

.site-logo {
  display: flex;
  flex-direction: column;
}

.site-logo a {
  text-decoration: none;
  color: var(--text-main);
  display: inline-flex;
  align-items: center;
}

.site-title {
  font-weight: 700;
  font-size: 1.1rem;
}

.site-subtitle {
  font-size: 0.8rem;
  color: var(--text-muted);
}

/* Logo image */
.site-logo-img {
  height: 48px;
  width: auto;
  max-width: 260px;
  display: block;
}

@media (max-width: 700px) {
  .site-logo-img {
    height: 44px;
    max-width: 220px;
  }
}

/* ===== NAV: Desktop bubbles (default) ===== */

.site-nav .nav-desktop {
  display: flex;
  gap: 1rem;
  list-style: none;
  padding: 0;
  margin: 0;
}

.site-nav a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--text-muted);
  padding: 0.25rem 0.5rem;
  border-radius: 999px;
}

/* Hover bubble */
.site-nav a:hover {
  background: var(--green-light);
  color: var(--green-primary);
}

/* Active bubble */
.site-nav a.active {
  background: var(--green-primary);
  color: var(--white);
}

/* CTA (Get Involved) stays square-ish on desktop */
.site-nav a.nav-cta {
  background: transparent;
  color: var(--green-primary);
  border: 2px solid var(--green-primary);
  border-radius: 0.4rem;
  font-weight: 600;
  padding: 0.35rem 0.75rem;
}

.site-nav a.nav-cta:hover {
  background: var(--green-light);
  color: var(--green-primary);
}

.site-nav a.nav-cta.active {
  background: var(--green-primary);
  color: var(--white);
  border-color: var(--green-primary);
}

/* ===== NAV: Mobile hamburger + overlay ===== */

/* Desktop: hide hamburger */
.nav-mobile { display: none; }

@media (max-width: 700px) {
  /* Header layout: logo left, hamburger right */
  .site-header-inner {
    flex-direction: row;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem;
  }

  .site-subtitle {
    display: none;
  }

  /* Hide desktop UL, show hamburger */
  .site-nav .nav-desktop { display: none; }
  .nav-mobile { display: block; }

  /* Make details act as anchor for dropdown */
  .site-nav details.nav-mobile {
    position: relative;
    z-index: 999;
    margin-left: auto;
  }

  /* Hamburger button */
  .nav-toggle {
    list-style: none;
    cursor: pointer;
    width: 44px;
    height: 40px;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 10px;
    display: grid;
    place-items: center;
    user-select: none;
    position: relative;
  }

  .nav-toggle::-webkit-details-marker { display: none; }
  .nav-toggle::marker { content: ""; }

  .nav-toggle::before {
    content: "";
    width: 20px;
    height: 2px;
    background: currentColor;
    box-shadow: 0 6px 0 currentColor, 0 -6px 0 currentColor;
    display: block;
  }

  /* Open state icon (X-ish) */
  details.nav-mobile[open] .nav-toggle::before {
    width: 18px;
    height: 18px;
    background: transparent;
    box-shadow: none;
    border-right: 2px solid currentColor;
    border-bottom: 2px solid currentColor;
    transform: rotate(45deg);
  }

  /* Dropdown panel: overlays content */
  .site-nav details.nav-mobile > ul {
    list-style: none;
    margin: 0;
    padding: 0.6rem 0.75rem;
    border: 1px solid rgba(0,0,0,0.15);
    border-radius: 12px;
    background: #fff;

    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    width: min(85vw, 340px);
    max-height: 70vh;
    overflow: auto;

    box-shadow: var(--shadow-soft);
  }

  .site-nav details.nav-mobile li {
    list-style: none;
    margin: 0;
  }

  /* Mobile menu links: list rows */
  .site-nav details.nav-mobile a {
    display: block;
    text-align: left;
    padding: 0.65rem 0.25rem;
    border-radius: 0;
    background: transparent;
    color: var(--text-muted);
    font-weight: 600;
  }

  /* Divider between rows */
  .site-nav details.nav-mobile li + li {
    border-top: 1px solid rgba(0, 0, 0, 0.08);
  }

  /* Active indicator (left bar) for normal links */
  .site-nav details.nav-mobile a.active:not(.nav-cta) {
    font-weight: 700;
    color: var(--green-primary);
    border-left: 3px solid var(--green-primary);
    padding-left: 0.75rem;
  }

  /* Get Involved: ALWAYS highlighted in mobile menu */
  .site-nav details.nav-mobile a.nav-cta {
    background: var(--green-primary);
    color: var(--white);
    font-weight: 800;
    border: none;
    border-left: none;
    padding-left: 0.25rem;
  }

  .site-nav details.nav-mobile a.nav-cta:hover {
    background: #0f412d;
    color: var(--white);
  }

  .site-nav details.nav-mobile a.nav-cta.active {
    background: var(--green-primary);
    color: var(--white);
  }

  /* remove divider above the CTA row since it's last */
  .site-nav details.nav-mobile li:last-child {
    border-top: none;
    margin-top: 0.5rem;
  }
}

/* Hero / home */

.hero {
  padding: 3rem 0 2.5rem;
}

.hero-inner {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr);
  gap: 2.5rem;
  align-items: center;
}

.hero-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--green-primary);
}

.hero-title {
  font-size: clamp(2rem, 3vw, 2.6rem);
  margin: 0.3rem 0 0.8rem;
}

.hero-tagline {
  font-size: 1rem;
  color: var(--text-muted);
  max-width: 30rem;
}

.hero-actions {
  margin-top: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.7rem 1.2rem;
  border-radius: 999px;
  border: none;
  cursor: pointer;
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  transition: transform 0.04s ease, box-shadow 0.08s ease, background 0.1s ease;
}

.btn-primary {
  background: var(--green-primary);
  color: var(--white);
  box-shadow: var(--shadow-soft);
}

.btn-primary:hover {
  transform: translateY(-1px);
  background: #0f412d;
}

.btn-secondary {
  background: var(--green-light);
  color: var(--green-primary);
}

.btn-secondary:hover {
  background: #d8e9dc;
}

.hero-video-placeholder {
  background: var(--green-light);
  border-radius: var(--radius-lg);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.hero-video-box {
  position: relative;
  padding-top: 56.25%;
  border-radius: var(--radius-md);
  overflow: hidden;
  background: #000;
}

.hero-video-box iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

.hero-video-caption {
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

@media (max-width: 900px) {
  .hero-inner {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .container {
    padding-left: var(--mobile-pad);
    padding-right: var(--mobile-pad);
  }

  .hero-title {
    font-size: 1.85rem;
    line-height: 1.12;
    letter-spacing: -0.01em;
  }

  .hero-tagline {
    font-size: 1rem;
    line-height: 1.5;
    opacity: 0.92;
  }

  .hero-actions {
    gap: 0.6rem;
  }

  .btn {
    width: 100%;
    justify-content: center;
  }
}

/* Section utilities */

.section {
  padding: 2.5rem 0;
}

.section-header {
  margin-bottom: 1.5rem;
}

.section-kicker {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--green-primary);
}

.section-title {
  margin: 0.4rem 0;
  font-size: 1.4rem;
}

.section-intro {
  max-width: 40rem;
  color: var(--text-muted);
  font-size: 0.95rem;
}

@media (max-width: 700px) {
  .section {
    padding-top: 1.25rem;
    padding-bottom: 1.25rem;
  }

  .section-intro {
    font-size: 1rem;
    line-height: 1.45;
  }
}

/* Home priorities */

.priorities-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1.25rem;
}

.priority-card {
  background: var(--white);
  border-radius: var(--radius-md);
  padding: 1rem;
  box-shadow: var(--shadow-soft);
}

.priority-label {
  font-size: 0.75rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--green-primary);
}

.priority-title {
  margin: 0.4rem 0;
  font-weight: 600;
}

.priority-text {
  font-size: 0.9rem;
  color: var(--text-muted);
}

.priority-link {
  display: inline-flex;
  align-items: center;
  margin-top: 0.5rem;
  font-size: 0.85rem;
  color: var(--green-primary);
  text-decoration: none;
}

.priority-link:hover {
  text-decoration: underline;
}

@media (max-width: 900px) {
  .priorities-grid {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .priority-card,
  .update-card,
  .about-bio,
  .contact-form {
    border-radius: 16px;
    box-shadow: 0 8px 20px rgba(15, 23, 42, 0.10);
  }

  .priority-card {
    transition: transform 0.08s ease, box-shadow 0.12s ease;
  }

  .priority-card:active {
    transform: scale(0.99);
  }

  .priority-link {
    font-weight: 600;
  }
}

/* Policy page */

.policy-hero,
.commitments-hero,
.generic-hero {
  padding: 2.5rem 0 1.5rem;
}

.policy-nav {
  background: var(--green-light);
  padding: 0.75rem 0;
  margin-bottom: 1.5rem;
}

.policy-nav ul {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.policy-nav a {
  text-decoration: none;
  font-size: 0.85rem;
  padding: 0.3rem 0.8rem;
  border-radius: 999px;
  background: var(--white);
  color: var(--green-primary);
}

.policy-nav a:hover {
  background: #d8e9dc;
}

.policy-section {
  margin-bottom: 2rem;
}

.policy-section h2 {
  margin-bottom: 0.4rem;
}

.policy-section .section-intro {
  margin-bottom: 0.8rem;
}

.policy-item {
  margin-bottom: 0.6rem;
  background: var(--white);
  border-radius: 0.75rem;
  padding: 0.5rem 0.8rem;
  box-shadow: var(--shadow-soft);
}

.policy-item > summary {
  list-style: none;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.95rem;
}

.policy-item > summary::-webkit-details-marker {
  display: none;
}

.policy-item > summary::before {
  content: "+";
  margin-right: 0.5rem;
  color: var(--green-primary);
  font-weight: 700;
}

.policy-item[open] > summary::before {
  content: "–";
}

.policy-body {
  margin-top: 0.4rem;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.policy-footnotes {
  margin-top: 2.5rem;
  padding-top: 1rem;
  border-top: 1px solid var(--grey-muted);
}

.policy-footnotes h3 {
  font-size: 0.95rem;
}

.policy-footnotes ol {
  padding-left: 1.2rem;
  font-size: 0.85rem;
  color: var(--text-muted);
}

/* Commitments */

.commitments-list-section {
  padding-bottom: 2.5rem;
}

.commitments-list {
  list-style: none;
  padding: 0;
  margin: 1rem 0 0;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 0.75rem;
}

.commitments-list li {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  background: var(--white);
  padding: 0.7rem 0.9rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
  font-size: 0.95rem;
}

.checkmark {
  width: 1.3rem;
  height: 1.3rem;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-primary);
  color: var(--white);
  font-size: 0.85rem;
  flex-shrink: 0;
}

/* About */

.about-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr);
  gap: 2rem;
  align-items: flex-start;
  padding-bottom: 3rem;
}

.about-bio {
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.about-bio p {
  font-size: 0.95rem;
  color: var(--text-muted);
}

.about-key-points {
  display: grid;
  gap: 0.75rem;
}

.about-card {
  background: var(--green-light);
  padding: 0.9rem 1rem;
  border-radius: var(--radius-md);
}

.about-card h3 {
  margin: 0 0 0.3rem;
  font-size: 0.95rem;
}

.about-card p {
  margin: 0;
  font-size: 0.9rem;
  color: var(--text-muted);
}

.about-photo {
  display: flex;
  justify-content: center;
}

.about-photo img {
  width: 100%;
  max-width: 340px;
  height: auto;
  border-radius: 14px;
  object-fit: cover;
}

@media (max-width: 900px) {
  .about-layout {
    grid-template-columns: minmax(0, 1fr);
  }
}

@media (max-width: 700px) {
  .about-layout {
    grid-template-columns: 1fr;
    gap: 1rem;
  }

  .about-photo img {
    max-width: 220px;
    margin: 0 auto;
    display: block;
  }
}

/* Forms / Get involved */

.contact-form {
  margin-top: 1rem;
  background: var(--white);
  padding: 1.25rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.form-row {
  margin-bottom: 0.9rem;
}

.form-error {
  color: #b91c1c;
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

.form-success {
  color: #166534;
  font-size: 0.85rem;
  margin: 0.4rem 0 0;
}

/* Two-column layout for signup fields on wider screens */
.form-grid-2 {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.9rem 1rem;
}

@media (max-width: 700px) {
  .form-grid-2 {
    grid-template-columns: minmax(0, 1fr);
  }
}

.form-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.75rem;
  margin-top: 0.5rem;
}

.checkbox-inline {
  display: inline-flex;
  align-items: flex-start;
  gap: 0.4rem;
  font-size: 0.85rem;
  max-width: 28rem;
}

.checkbox-inline input[type="checkbox"] {
  margin-top: 0.15rem;
}

.signup-section {
  padding-top: 1.5rem;
  padding-bottom: 1.5rem;
}

.contact-form.signup-compact {
  max-width: 520px;
  padding: 0.9rem 1rem;
}

.postal-input {
  text-transform: uppercase;
}

.input-error {
  border-color: #b91c1c !important;
}

.form-row label {
  display: block;
  font-size: 0.85rem;
  font-weight: 600;
  margin-bottom: 0.25rem;
}

.form-row input,
.form-row textarea {
  width: 100%;
  padding: 0.55rem 0.6rem;
  border-radius: 0.5rem;
  border: 1px solid var(--grey-muted);
  font-size: 0.9rem;
  font-family: inherit;
}

.form-row input:focus,
.form-row textarea:focus {
  border-color: var(--green-primary);
  outline: none;
  box-shadow: 0 0 0 1px rgba(21, 86, 58, 0.2);
}

@media (max-width: 700px) {
  .form-actions {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Social links */

.social-links {
  list-style: none;
  padding: 0;
  margin: 0.75rem 0 0;
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
}

.social-links a {
  text-decoration: none;
  font-size: 0.9rem;
  color: var(--green-primary);
  background: var(--green-light);
  padding: 0.4rem 0.8rem;
  border-radius: 999px;
}

.social-links a:hover {
  background: #d8e9dc;
}

/* Updates */

.updates-list {
  list-style: none;
  padding: 0;
  margin: 1.5rem 0 0;
  display: grid;
  gap: 1rem;
}

.update-card {
  background: var(--white);
  padding: 1rem;
  border-radius: var(--radius-md);
  box-shadow: var(--shadow-soft);
}

.update-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
}

.update-title {
  margin: 0.25rem 0;
  font-size: 1rem;
}

.update-preview {
  font-size: 0.9rem;
  color: var(--text-muted);
}

/* Footer */

.site-footer {
  margin-top: auto;
  border-top: 1px solid var(--grey-muted);
  background: var(--white);
}

.site-footer-inner {
  padding: 1.2rem 0;
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  flex-wrap: wrap;
  gap: 0.75rem;
  justify-content: space-between;
}

.footer-links {
  display: flex;
  gap: 0.75rem;
}

.footer-links a {
  color: var(--green-primary);
  text-decoration: none;
  font-size: 0.8rem;
}

.footer-links a:hover {
  text-decoration: underline;
}

@media (max-width: 700px) {
  .site-footer-inner {
    flex-direction: column;
    align-items: flex-start;
  }
}

/* ===== Mobile banding for sections ===== */
@media (max-width: 700px) {
  body.page main > section {
    padding-top: 1.75rem;
    padding-bottom: 1.75rem;
    margin: 0;
    border-top: 1px solid rgba(0,0,0,0.06);
  }

  body.page main > section:first-of-type {
    border-top: none;
  }

  body.page main > section:nth-of-type(odd) {
    background: var(--white);
  }

  body.page main > section:nth-of-type(even) {
    background: var(--green-light);
  }

  /* Dark / light / dark home look */
  body.page main > section:nth-of-type(1) {
    background: var(--green-primary) !important;
    color: var(--white);
    border-top: none;
  }

  body.page main > section:nth-of-type(1) .hero-kicker,
  body.page main > section:nth-of-type(1) .hero-tagline,
  body.page main > section:nth-of-type(1) .hero-video-caption {
    color: rgba(255, 255, 255, 0.85);
  }

  body.page main > section:nth-of-type(1) .hero-title {
    color: var(--white);
  }

  body.page main > section:nth-of-type(1) .btn-primary {
    background: var(--white);
    color: var(--green-primary);
  }

  body.page main > section:nth-of-type(1) .btn-secondary {
    background: rgba(255, 255, 255, 0.12);
    color: var(--white);
    border: 1px solid rgba(255, 255, 255, 0.25);
  }

  body.page main > section:nth-of-type(3) {
    background: var(--green-primary) !important;
    color: var(--white);
  }

  body.page main > section:nth-of-type(3) .section-kicker,
  body.page main > section:nth-of-type(3) .section-intro {
    color: rgba(255, 255, 255, 0.85);
  }

  body.page main > section:nth-of-type(3) .section-title {
    color: var(--white);
  }

  body.page main > section:nth-of-type(3) .btn-primary {
    background: var(--white);
    color: var(--green-primary);
  }
}

/* Card readability inside dark bands (mobile) */
@media (max-width: 700px) {
  .priority-card,
  .update-card,
  .about-bio,
  .contact-form,
  .commitments-list li {
    color: var(--text-main);
  }

  .priority-text,
  .update-preview,
  .about-bio p,
  .contact-form p,
  .commitments-list .commitment-text {
    color: var(--text-muted);
  }

  .contact-form label {
    color: var(--text-main);
  }
}

/* Optional dark band utility (for specific sections if you add band-dark class) */
.band-dark {
  background: var(--green-primary);
  color: var(--white);
}

.band-dark .section-kicker,
.band-dark .section-title,
.band-dark .section-intro {
  color: rgba(255, 255, 255, 0.88);
}

.band-dark .contact-form,
.band-dark .commitments-list li,
.band-dark .priority-card,
.band-dark .update-card,
.band-dark .about-bio {
  background: var(--white);
  color: var(--text-main);
}

/* Reduced motion */
@media (prefers-reduced-motion: reduce) {
  * {
    scroll-behavior: auto !important;
    transition: none !important;
  }
}

/* Mobile floating button (FAB) */
@media (max-width: 700px) {
  .mobile-fab {
    position: fixed;
    right: 16px;      /* bottom-right */
    bottom: 16px;
    z-index: 50;

    background: var(--green-primary);
    color: var(--white);
    text-decoration: none;
    font-weight: 700;
    font-size: 0.95rem;

    padding: 0.75rem 1rem;
    border-radius: 999px;
    box-shadow: var(--shadow-soft);
  }

  .mobile-fab:active {
    transform: scale(0.98);
  }
}
