/* ============================================================
   Green Party of Alabama — site styles
   ============================================================ */

:root {
  /* Brand greens */
  --green-primary: #00A95C;
  --green-dark:    #186e3e;
  --green-darker:  #163722;
  --green-soft:    #def1e3;

  /* Wordmark warm grey */
  --grey-warm: #4c4e56;

  /* Four-pillar colors */
  --peace:     #5ab2d1;
  --justice:   #e89742;
  --democracy: #7656a0;
  --ecology:   #f3c637;

  /* Neutrals */
  --bg:        #ffffff;
  --bg-alt:    #f8f8f6;
  --rule:      #e6e6e0;
  --ink:       #2a2a2a;
  --ink-muted: #5e5e5e;

  /* Body type. To swap in real Omnes via Adobe Fonts:
     1. Add a Typekit/Adobe Fonts <link> in each page's <head>
        that activates omnes-pro.
     2. Change "Nunito" below to "omnes-pro".  */
  --font-body: "Nunito", -apple-system, BlinkMacSystemFont, "Segoe UI",
               Roboto, Helvetica, Arial, sans-serif;

  --container: 1200px;
  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 12px;
  --r-pill: 999px;

  --shadow-sm: 0 1px 2px rgba(20, 30, 20, 0.06);
  --shadow-md: 0 8px 22px rgba(20, 30, 20, 0.08);
  --shadow-lg: 0 18px 40px rgba(20, 30, 20, 0.10);
}

/* --- Base --- */
*,
*::before,
*::after { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

img, svg { max-width: 100%; display: block; }

a {
  color: var(--green-primary);
  text-decoration: none;
  transition: color 120ms ease;
}
a:hover { color: var(--green-dark); text-decoration: underline; }

h1, h2, h3, h4 {
  font-family: inherit;
  font-weight: 800;
  color: var(--green-dark);
  line-height: 1.2;
  margin: 0 0 0.5em;
  letter-spacing: -0.005em;
}
h1 { font-size: 2.4rem; }
h2 { font-size: 2rem; }
h3 { font-size: 1.3rem; }
p  { margin: 0 0 1.1em; }

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

::selection { background: var(--green-soft); color: var(--ink); }

/* --- Two-tone top strip --- */
.top-strip {
  height: 18px;
  background: linear-gradient(
    to right,
    var(--green-primary) 0%,
    var(--green-primary) 50%,
    var(--grey-warm) 50%,
    var(--grey-warm) 100%
  );
}

/* --- Top header (now contains both brand and nav) --- */
.site-header {
  background: #fff;
  padding: 1rem 0;
  border-bottom: 1px solid var(--rule);
  position: sticky;
  top: 0;
  z-index: 40;
}
.site-header .container {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 2rem;
  flex-wrap: wrap;
}

.logo-wordmark {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
  color: inherit;
}
.logo-wordmark:hover { text-decoration: none; }

.logo-image {
  height: 54px;
  width: auto;
  display: block;
}

.header-cta {
  display: inline-block;
  padding: 0.7rem 1.5rem;
  background: var(--green-dark);
  color: #fff;
  font-weight: 700;
  border-radius: var(--r-md);
  transition: background 120ms ease, transform 120ms ease;
}
.header-cta:hover {
  background: var(--green-darker);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

/* --- Primary nav (lives inside the white header) --- */
.site-nav {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  flex: 1 1 auto;
}
.nav-list {
  list-style: none;
  margin: 0;
  padding: 0;
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
}
.nav-list a {
  display: block;
  padding: 0.6rem 0.85rem;
  color: var(--grey-warm);
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-sm);
  transition: color 120ms ease;
}
.nav-list a:hover {
  color: var(--green-primary);
  text-decoration: none;
}
.nav-list a[aria-current="page"] {
  color: var(--green-primary);
}

.menu-toggle {
  display: none;
  background: transparent;
  border: 1.5px solid var(--grey-warm);
  color: var(--grey-warm);
  padding: 0.5rem 1rem;
  border-radius: var(--r-sm);
  font-family: inherit;
  font-weight: 800;
  font-size: 0.85rem;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  cursor: pointer;
}

/* --- Main column --- */
.main {
  max-width: var(--container);
  margin: 0 auto;
  padding: 4rem 1.5rem 4rem;
}

/* --- Hero (forest.jpg with brand-green overlay) --- */
.hero {
  position: relative;
  padding: 6rem 1.5rem;
  text-align: center;
  color: #fff;
  background:
    linear-gradient(
      180deg,
      rgba(28, 93, 47, 0.78) 0%,
      rgba(45, 164, 68, 0.62) 100%
    ),
    url("forest.jpg") center/cover no-repeat;
}
.hero-inner {
  max-width: 800px;
  margin: 0 auto;
}
.hero h1 {
  color: #fff;
  font-size: 3rem;
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0 0 1rem;
  text-shadow: 0 2px 16px rgba(0, 0, 0, 0.2);
}
.hero p {
  color: rgba(255, 255, 255, 0.95);
  font-size: 1.2rem;
  line-height: 1.5;
  max-width: 56ch;
  margin: 0 auto;
}

/* --- Pillars section --- */
.pillars-section {
  text-align: center;
  margin-bottom: 4rem;
}
.pillars-section h2 {
  font-size: 2rem;
  margin-bottom: 0.5rem;
}
.pillars-section .accent { color: var(--green-primary); }
.pillars-section .lede {
  font-size: 1.1rem;
  color: var(--ink-muted);
  max-width: 60ch;
  margin: 0.5rem auto 0;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1.5rem;
  margin-top: 3rem;
  justify-items: center;
}
.pillar {
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
  text-decoration: none;
  color: var(--ink);
  width: 100%;
}
.pillar:hover { text-decoration: none; }
.pillar-shape {
  width: 140px;
  height: 140px;
  border-radius: 14px;
  transform: rotate(45deg);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: transform 220ms ease, box-shadow 220ms ease;
  box-shadow: var(--shadow-sm);
}
.pillar:hover .pillar-shape {
  transform: rotate(45deg) translate(-3px, -3px);
  box-shadow: var(--shadow-md);
}
.pillar-icon {
  width: 56px;
  height: 56px;
  color: #fff;
  transform: rotate(-45deg);
}
.pillar-shape.peace     { background: var(--peace); }
.pillar-shape.justice   { background: var(--justice); }
.pillar-shape.democracy { background: var(--democracy); }
.pillar-shape.ecology   { background: var(--ecology); }
.pillar-label {
  margin-top: 1.5rem;
  font-weight: 800;
  font-size: 1.05rem;
  color: var(--green-primary);
  letter-spacing: 0.02em;
}

.pillars-image {
  width: 100%;
  height: auto;
  margin: 2rem auto 0;
  border-radius: var(--r-md);
}

/* --- Buttons --- */
.btn {
  display: inline-block;
  padding: 0.85rem 2.25rem;
  font-family: inherit;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  border-radius: var(--r-md);
  border: 2px solid transparent;
  cursor: pointer;
  text-decoration: none;
  transition: background 120ms ease, color 120ms ease,
              transform 120ms ease, box-shadow 120ms ease;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; }
.btn-primary {
  background: var(--green-dark);
  color: #fff;
  border-color: var(--green-dark);
}
.btn-primary:hover {
  background: var(--green-darker);
  border-color: var(--green-darker);
  color: #fff;
  box-shadow: 0 8px 18px rgba(20, 69, 36, 0.25);
}
.btn-ghost {
  background: transparent;
  color: var(--green-dark);
  border-color: var(--green-dark);
}
.btn-ghost:hover {
  background: var(--green-dark);
  color: #fff;
}

.cta-row {
  display: flex;
  justify-content: center;
  gap: 1.25rem;
  margin: 3.5rem 0 4.5rem;
  flex-wrap: wrap;
}

/* --- Mission (centered editorial paragraph) --- */
.mission {
  max-width: 62ch;
  margin: 1rem auto 5rem;
  padding: 0 1rem;
  text-align: center;
}
.mission-eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-primary);
  margin: 0 0 0.85rem;
}
.mission p:last-of-type {
  font-size: 1.2rem;
  line-height: 1.6;
  color: var(--ink);
  margin: 0;
}
.mission-cta { margin-top: 1.75rem; }

/* --- News section --- */
.news-section { margin: 0 0 4rem; }

.contact-teaser {
  text-align: center;
  max-width: 60ch;
  margin: 1.75rem auto 0;
  font-size: 1.05rem;
  color: var(--ink);
}

.section-heading {
  border-bottom: 2px solid var(--green-primary);
  padding-bottom: 0.75rem;
  margin-bottom: 0.5rem;
}
.section-heading h2 {
  margin: 0;
  font-size: 1.5rem;
}

.news-footer {
  margin-top: 1.75rem;
  text-align: center;
}
.see-all {
  display: inline-block;
  padding: 0.7rem 1.6rem;
  font-weight: 800;
  font-size: 0.92rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  background: var(--green-dark);
  border-radius: var(--r-md);
  transition: background 120ms ease, transform 120ms ease;
}
.see-all:hover {
  background: var(--green-darker);
  color: #fff;
  text-decoration: none;
  transform: translateY(-1px);
}

.news-list {
  list-style: none;
  margin: 0;
  padding: 0;
}
.news-list > li {
  padding: 1.5rem 0;
  border-bottom: 1px solid var(--rule);
}
.news-list > li:last-child { border-bottom: none; }
.news-list h3 {
  margin: 0.25rem 0 0.5rem;
  font-size: 1.3rem;
}
.news-list h3 a {
  color: var(--green-dark);
  text-decoration: none;
}
.news-list h3 a:hover {
  color: var(--green-primary);
  text-decoration: none;
}
.news-list .meta {
  margin: 0;
  font-size: 0.78rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-muted);
  font-weight: 800;
}
.news-list .excerpt {
  margin: 0;
  color: var(--ink-muted);
  max-width: 65ch;
}

/* --- Footer --- */
.site-footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--rule);
  padding: 2.5rem 0;
  margin-top: 4rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.site-footer .container {
  display: flex;
  flex-wrap: wrap;
  justify-content: space-between;
  gap: 1rem;
}
.site-footer a { color: var(--ink); }
.site-footer a:hover { color: var(--green-dark); }

/* --- Reveal on scroll --- */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition: opacity 600ms ease, transform 600ms ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: translateY(0);
}

/* --- Inner-page header (smaller than the home hero) --- */
.page-header {
  text-align: center;
  padding-bottom: 1.75rem;
  margin-bottom: 2.5rem;
  border-bottom: 2px solid var(--green-primary);
}
.page-header .eyebrow {
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--green-primary);
  margin: 0 0 0.6rem;
}
.page-header h1 {
  margin: 0;
  font-size: 2.4rem;
}
.page-header .lede {
  margin: 0.85rem auto 0;
  max-width: 60ch;
  color: var(--ink-muted);
  font-size: 1.1rem;
  line-height: 1.55;
}

/* --- Article body (narrative content) --- */
.article-body {
  max-width: 65ch;
  margin: 0 auto;
  font-size: 1.05rem;
  line-height: 1.75;
  color: var(--ink);
}
.article-body p { margin: 0 0 1.1em; }
.article-body h2 {
  margin: 2.5rem 0 0.75rem;
  font-size: 1.7rem;
}
.article-body blockquote {
  margin: 1.75rem 0;
  padding: 0.4rem 0 0.4rem 1.25rem;
  border-left: 3px solid var(--green-primary);
  color: var(--ink-muted);
  font-style: italic;
}
.article-body ul,
.article-body ol {
  margin: 0 0 1.1em;
  padding-left: 1.5em;
}
.article-body li { margin-bottom: 0.4em; }
.article-cta {
  text-align: center;
  margin: 2.5rem 0 1rem;
}
.post-back-wrap {
  margin-top: 2.5rem;
  padding-top: 1.5rem;
  border-top: 1px solid var(--rule);
  text-align: center;
  font-weight: 700;
}

/* --- Card grid (chapters, etc.) --- */
.grid {
  display: grid;
  gap: 1.5rem;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
}
.card {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 1.5rem;
  transition: transform 180ms ease, box-shadow 180ms ease, border-color 180ms ease;
}
.card:hover {
  transform: translateY(-3px);
  box-shadow: var(--shadow-md);
  border-color: var(--green-soft);
}
.card h3 {
  margin: 0 0 0.5rem;
  font-size: 1.2rem;
  color: var(--green-dark);
}
.card p { margin: 0; color: var(--ink-muted); }

/* --- Chapter card (localparties) --- */
.chapter-card .chapter-meta {
  display: grid;
  gap: 0.3rem;
  margin: 0.5rem 0 0.85rem;
  font-size: 0.92rem;
  color: var(--ink-muted);
}
.chapter-card .chapter-meta strong {
  color: var(--ink);
  font-weight: 700;
  margin-right: 0.3rem;
}

/* --- Ten Key Values (about) --- */
.values-section { margin-top: 4rem; text-align: center; }
.values-section > p {
  max-width: 60ch;
  margin: 0 auto 1rem;
  color: var(--ink-muted);
}
.values {
  list-style: none;
  padding: 0;
  margin: 1.75rem 0 0;
  display: grid;
  gap: 1.1rem;
  grid-template-columns: 1fr;
  text-align: left;
}
.values li {
  padding: 1.1rem 1.25rem;
  background: #fff;
  border: 1px solid var(--rule);
  border-left: 3px solid var(--green-primary);
  border-radius: var(--r-md);
}
.values li strong {
  display: block;
  color: var(--green-dark);
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.25rem;
}
.values li span {
  font-size: 0.92rem;
  color: var(--ink-muted);
  line-height: 1.55;
}

/* --- Calendar embed (calendar.html) --- */
.calendar-frame-wrap {
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-lg);
  padding: 0.5rem;
  box-shadow: var(--shadow-sm);
  overflow: hidden;
}
.calendar-frame-wrap iframe {
  width: 100%;
  height: 700px;
  border: 0;
  border-radius: var(--r-md);
  display: block;
}

/* --- Contact info + form (contact.html) --- */
.contact-info { max-width: 60ch; margin: 0 auto; }
.contact-info dl { margin: 0; }
.contact-info dt {
  font-size: 0.78rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  color: var(--green-primary);
  margin-top: 1.4rem;
}
.contact-info dt:first-child { margin-top: 0; }
.contact-info dd {
  margin: 0.3rem 0 0;
  color: var(--ink-muted);
}

.contact-form {
  display: grid;
  gap: 1rem;
  max-width: 60ch;
  margin: 2.5rem auto 0;
}
.contact-form label {
  display: block;
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--ink);
  margin-bottom: 0.3rem;
}
.contact-form input,
.contact-form textarea {
  width: 100%;
  padding: 0.75rem 0.9rem;
  font-family: inherit;
  font-size: 0.98rem;
  color: var(--ink);
  background: #fff;
  border: 1px solid var(--rule);
  border-radius: var(--r-md);
  transition: border-color 120ms ease, box-shadow 120ms ease;
}
.contact-form input:focus,
.contact-form textarea:focus {
  outline: none;
  border-color: var(--green-primary);
  box-shadow: 0 0 0 3px rgba(45, 164, 68, 0.15);
}
.contact-form textarea { min-height: 140px; resize: vertical; }
.contact-form button { justify-self: start; }

/* --- CTA banner (about, localparties) --- */
.cta-banner {
  margin: 3.5rem 0 0;
  padding: 2rem 2.25rem;
  background: var(--green-soft);
  border-left: 4px solid var(--green-primary);
  border-radius: var(--r-md);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.cta-banner h2 {
  margin: 0 0 0.25rem;
  font-size: 1.4rem;
  color: var(--green-dark);
}
.cta-banner p {
  margin: 0;
  color: var(--ink-muted);
  max-width: 50ch;
}
.cta-banner .actions { display: flex; gap: 0.75rem; flex-wrap: wrap; }

/* --- Inner-page mobile tweaks --- */
@media (max-width: 860px) {
  .page-header h1 { font-size: 1.7rem; }
  .page-header .lede { font-size: 1rem; }
  .article-body { font-size: 1rem; }
  .article-body h2 { font-size: 1.4rem; }
  .cta-banner { padding: 1.5rem; }
  .cta-banner h2 { font-size: 1.25rem; }
}

/* --- Responsive --- */
@media (max-width: 860px) {
  .site-header .container { flex-wrap: wrap; }
  .logo-image { height: 44px; }

  .menu-toggle { display: inline-block; }
  .site-nav { flex: 0 0 auto; }

  /* Full-viewport menu panel below the sticky header */
  .nav-list {
    display: flex;
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    position: fixed;
    top: var(--header-height, 77px);
    left: 0;
    right: 0;
    bottom: 0;
    width: 100%;
    margin: 0;
    padding: 1rem 1.5rem 2rem;
    background: #fff;
    border-top: 1px solid var(--rule);
    overflow-y: auto;
    z-index: 35;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity 200ms ease, visibility 0s linear 200ms;
  }
  .site-nav.is-open .nav-list {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
    transition: opacity 200ms ease, visibility 0s linear 0s;
  }
  .nav-list li { width: 100%; }
  .nav-list a {
    padding: 1.1rem 0.25rem;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--rule);
  }
  .nav-list li:last-child a { border-bottom: 0; }

  .main { padding: 2.5rem 1.25rem 2rem; }
  .pillars { grid-template-columns: repeat(2, 1fr); gap: 2rem 1rem; }
  .mission p:last-child { font-size: 1.05rem; }
  .mission { margin-bottom: 3.5rem; }
  .news-list h3 { font-size: 1.15rem; }

  h1 { font-size: 1.9rem; }
  h2, .pillars-section h2 { font-size: 1.55rem; }

  .hero { padding: 4rem 1.25rem; }
  .hero h1 { font-size: 2rem; }
  .hero p { font-size: 1.05rem; }
}

@media (max-width: 480px) {
  .pillar-shape { width: 110px; height: 110px; border-radius: 12px; }
  .pillar-icon { width: 44px; height: 44px; }
  .pillar-label { font-size: 0.95rem; margin-top: 1.1rem; }
  .cta-row { gap: 0.75rem; margin: 2.5rem 0 3rem; }
  .btn { padding: 0.7rem 1.5rem; font-size: 0.95rem; }
  .header-cta { padding: 0.55rem 1.1rem; font-size: 0.9rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    transition-duration: 0.01ms !important;
  }
  .reveal { opacity: 1; transform: none; }
  html { scroll-behavior: auto; }
}
