/* =============================================
   Open Vermont — Design System
   ============================================= */

@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Lora:ital,wght@0,400;0,600;0,700;1,400;1,600&display=swap');

/* --- Variables --- */
:root {
  --green-dark:   #1a4d2e;
  --green-mid:    #2d7a4f;
  --green-light:  #4caf78;
  --green-pale:   #e8f5ee;
  --gold:         #c8962e;
  --navy:         #1c2b3a;
  --slate:        #4a5568;
  --border:       #e2e8f0;
  --bg:           #ffffff;
  --bg-warm:      #fafaf8;
  --white:        #ffffff;

  --font-sans: 'Inter', system-ui, -apple-system, sans-serif;
  --font-serif: 'Lora', Georgia, serif;

  --radius-sm: 4px;
  --radius-md: 8px;
  --radius-lg: 14px;
  --shadow-sm: 0 1px 3px rgba(0,0,0,.06);
  --shadow-md: 0 4px 12px rgba(0,0,0,.08);

  --max-w: 820px;
  --nav-h: 64px;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  font-size: 17px;
  line-height: 1.7;
  color: var(--navy);
  background: var(--bg);
}

a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; font-weight: 700; }
img { max-width: 100%; display: block; }

/* =============================================
   Navigation
   ============================================= */

nav {
  position: sticky;
  top: 0;
  z-index: 100;
  background: var(--green-dark);
  height: var(--nav-h);
  display: flex;
  align-items: center;
  padding: 0 32px;
  gap: 4px;
  box-shadow: 0 2px 8px rgba(0,0,0,.20);
}

nav .brand {
  font-family: var(--font-serif);
  font-size: 20px;
  font-weight: 600;
  color: var(--white);
  margin-right: 28px;
  letter-spacing: .02em;
  flex-shrink: 0;
}
nav .brand:hover { text-decoration: none; opacity: .9; }

nav .nav-links {
  display: flex;
  align-items: center;
  gap: 2px;
  flex: 1;
}

nav .nav-links a {
  color: rgba(255,255,255,.80);
  font-size: 14px;
  font-weight: 500;
  padding: 6px 12px;
  border-radius: var(--radius-sm);
  letter-spacing: .01em;
  transition: background .15s, color .15s;
}
nav .nav-links a:hover,
nav .nav-links a.active {
  background: rgba(255,255,255,.12);
  color: var(--white);
  text-decoration: none;
}

/* =============================================
   Hero
   ============================================= */

.hero {
  position: relative;
  height: 520px;
  background-size: cover;
  background-position: center;
  display: flex;
  align-items: flex-end;
  justify-content: flex-start;
}

.hero::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(to top, rgba(10,30,20,.80) 0%, rgba(10,30,20,.30) 60%, transparent 100%);
}

.hero-content {
  position: relative;
  z-index: 1;
  color: var(--white);
  padding: 48px 48px;
  max-width: 660px;
}

.hero-content h1 {
  font-family: var(--font-serif);
  font-size: clamp(2.4rem, 5vw, 3.8rem);
  font-weight: 700;
  letter-spacing: -.01em;
  line-height: 1.1;
  margin-bottom: 16px;
  text-shadow: 0 2px 12px rgba(0,0,0,.3);
}

.hero-content p {
  font-size: 1.1rem;
  line-height: 1.65;
  opacity: .92;
  max-width: 500px;
  margin-bottom: 32px;
  text-shadow: 0 1px 4px rgba(0,0,0,.3);
}

/* =============================================
   Buttons
   ============================================= */

.btn {
  display: inline-block;
  padding: 11px 26px;
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  cursor: pointer;
  transition: background .15s, color .15s, opacity .15s;
  text-align: center;
}
.btn:hover { text-decoration: none; opacity: .88; }

.btn-primary {
  background: var(--green-mid);
  color: var(--white);
}
.btn-primary:hover { background: var(--green-dark); opacity: 1; }

.btn-outline {
  background: transparent;
  color: var(--green-mid);
  border: 1.5px solid var(--green-mid);
}
.btn-outline:hover { background: var(--green-pale); opacity: 1; }

/* Legacy alias */
.submit-btn {
  display: inline-block;
  padding: 11px 26px;
  background: var(--green-mid);
  color: var(--white);
  border-radius: var(--radius-sm);
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: background .15s;
}
.submit-btn:hover { background: var(--green-dark); text-decoration: none; }

/* =============================================
   Page Shell
   ============================================= */

.page-header {
  background: var(--green-dark);
  color: var(--white);
  padding: 64px 32px 56px;
}
.page-header h1 {
  font-family: var(--font-serif);
  font-size: clamp(2rem, 4vw, 3rem);
  font-weight: 700;
  max-width: var(--max-w);
  margin: 0 auto;
  line-height: 1.15;
}
.page-header p {
  max-width: var(--max-w);
  margin: 12px auto 0;
  opacity: .75;
  font-size: 1rem;
  line-height: 1.6;
}

.container {
  max-width: var(--max-w);
  margin: 0 auto;
  padding: 56px 24px;
}

/* =============================================
   Editorial / Body Text
   ============================================= */

.intro-text {
  font-size: 1.1rem;
  color: var(--slate);
  line-height: 1.85;
}
.intro-text p + p { margin-top: 22px; }
.intro-text strong { color: var(--navy); font-weight: 600; }

/* Large mission statement — homepage use */
.mission-statement {
  font-family: var(--font-serif);
  font-size: clamp(1.6rem, 3.5vw, 2.4rem);
  font-weight: 400;
  font-style: italic;
  color: var(--green-dark);
  line-height: 1.45;
  max-width: 700px;
  margin: 0 auto;
  text-align: center;
}

/* Pull quote */
.pullquote {
  border-left: 3px solid var(--green-mid);
  padding: 8px 0 8px 24px;
  font-family: var(--font-serif);
  font-size: 1.2rem;
  font-style: italic;
  color: var(--slate);
  line-height: 1.6;
  margin: 32px 0;
}

/* Section separator — asterisk style */
.section-sep {
  text-align: center;
  color: var(--green-mid);
  letter-spacing: .5em;
  font-size: .9rem;
  margin: 48px auto;
  opacity: .5;
}

/* =============================================
   Pillars
   ============================================= */

.pillars-section {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 64px 24px;
}
.pillars-section h2 {
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 400;
  font-style: italic;
  color: var(--slate);
  letter-spacing: .05em;
  text-transform: uppercase;
  font-size: .8rem;
  margin-bottom: 40px;
}

.pillars {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1px;
  background: var(--border);
  max-width: var(--max-w);
  margin: 0 auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
}

.pillar {
  background: var(--white);
  padding: 32px 28px;
  text-align: center;
  font-family: var(--font-serif);
  font-size: 1.15rem;
  font-weight: 600;
  color: var(--green-dark);
  line-height: 1.4;
}

/* =============================================
   Opportunity Cards
   ============================================= */

.problem {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 28px;
  margin-bottom: 20px;
  transition: border-color .15s;
}
.problem:hover { border-color: var(--green-mid); }

.problem h2 {
  font-size: 1.15rem;
  font-weight: 700;
  color: var(--navy);
  margin-bottom: 10px;
  font-family: var(--font-serif);
}

.problem p {
  color: var(--slate);
  font-size: .95rem;
  margin-bottom: 6px;
  line-height: 1.65;
}

.problem .meta-label {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--green-mid);
  margin-top: 14px;
  margin-bottom: 4px;
}

.vote-bar-wrap {
  background: var(--green-pale);
  border-radius: 999px;
  overflow: hidden;
  margin-top: 16px;
  height: 22px;
}

.vote-bar {
  height: 100%;
  background: var(--green-mid);
  display: flex;
  align-items: center;
  justify-content: flex-end;
  padding-right: 10px;
  color: var(--white);
  font-size: .75rem;
  font-weight: 700;
  min-width: 44px;
  border-radius: 999px;
}

.vote-link {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--green-mid);
  font-weight: 600;
  font-size: .88rem;
  margin-top: 14px;
  padding: 6px 14px;
  border: 1.5px solid var(--green-mid);
  border-radius: var(--radius-sm);
  transition: background .15s, color .15s;
}
.vote-link:hover {
  background: var(--green-mid);
  color: var(--white);
  text-decoration: none;
}

.card-actions {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-top: 14px;
  flex-wrap: wrap;
}

.comment-link {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  color: var(--slate);
  font-size: .88rem;
  font-weight: 500;
  padding: 6px 12px;
  border: 1.5px solid var(--border);
  border-radius: var(--radius-sm);
  transition: border-color .15s, color .15s;
}
.comment-link:hover {
  border-color: var(--slate);
  color: var(--navy);
  text-decoration: none;
}

/* =============================================
   Events
   ============================================= */

.event {
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
  display: flex;
  gap: 24px;
  align-items: flex-start;
}
.event:first-of-type { border-top: 1px solid var(--border); }

.event-date-badge {
  flex-shrink: 0;
  width: 52px;
  text-align: center;
  background: var(--green-dark);
  color: var(--white);
  border-radius: var(--radius-sm);
  padding: 8px 4px;
}
.event-date-badge .month {
  font-size: .6rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  opacity: .8;
}
.event-date-badge .day {
  font-size: 1.5rem;
  font-weight: 700;
  line-height: 1.1;
}

.event-body h3 {
  font-size: 1.05rem;
  font-weight: 700;
  font-family: var(--font-serif);
  color: var(--navy);
  margin-bottom: 5px;
}
.event-body p {
  font-size: .9rem;
  color: var(--slate);
  margin-bottom: 3px;
  line-height: 1.5;
}

/* =============================================
   Resources
   ============================================= */

.resource-section { margin-bottom: 52px; }

.resource-section h2 {
  font-family: var(--font-serif);
  font-size: 1.4rem;
  font-weight: 700;
  color: var(--green-dark);
  padding-bottom: 10px;
  border-bottom: 2px solid var(--green-pale);
  margin-bottom: 20px;
}
.resource-section h3 {
  font-size: .8rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate);
  margin: 28px 0 12px;
}

/* Card grid */
.resource-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 14px;
  margin-bottom: 8px;
}

/* Individual resource card */
.resource-card {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 18px 20px;
  background: var(--white);
  display: flex;
  flex-direction: column;
  transition: border-color .15s;
}
.resource-card:hover { border-color: var(--green-mid); }

.resource-card-name {
  font-family: var(--font-serif);
  font-size: 1rem;
  font-weight: 700;
  color: var(--navy);
  margin: 8px 0 6px;
  line-height: 1.3;
}

.resource-card-desc {
  font-size: .86rem;
  color: var(--slate);
  line-height: 1.6;
  flex: 1;
  margin-bottom: 14px;
}

.resource-card-meta {
  border-top: 1px solid var(--border);
  padding-top: 12px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.resource-meta-row {
  font-size: .82rem;
  color: var(--slate);
  display: grid;
  grid-template-columns: 60px 1fr;
  gap: 6px;
  line-height: 1.4;
}
.resource-meta-row .meta-label {
  font-weight: 600;
  color: var(--navy);
  font-size: .75rem;
  text-transform: uppercase;
  letter-spacing: .04em;
  padding-top: 1px;
}
.resource-meta-row a { color: var(--green-mid); }

/* Type badges */
.resource-badge {
  display: inline-block;
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  padding: 2px 8px;
  border-radius: 999px;
}
.resource-badge--library    { background: #e8eef5; color: #1c3a5c; }
.resource-badge--makerspace { background: var(--green-pale); color: var(--green-dark); }
.resource-badge--hackerspace{ background: #fff3e0; color: #8a4500; }
.resource-badge--fablab     { background: #f3e8ff; color: #5b21b6; }
.resource-badge--stem       { background: #fef3c7; color: #92400e; }

/* Filter bar */
.resource-filters {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-bottom: 24px;
}
.resource-filters .filter-label {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate);
  margin-right: 4px;
}
.filter-btn {
  padding: 6px 16px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .83rem;
  font-weight: 600;
  color: var(--slate);
  background: var(--white);
  cursor: pointer;
  transition: border-color .15s, background .15s, color .15s;
  font-family: var(--font-sans);
  line-height: 1;
}
.filter-btn:hover {
  border-color: var(--green-mid);
  color: var(--green-mid);
}
.filter-btn.active {
  background: var(--green-dark);
  border-color: var(--green-dark);
  color: var(--white);
}
.resource-search-wrap {
  margin-left: auto;
  position: relative;
}
.resource-search {
  padding: 7px 14px 7px 36px;
  border: 1.5px solid var(--border);
  border-radius: 999px;
  font-size: .88rem;
  font-family: var(--font-sans);
  color: var(--navy);
  outline: none;
  width: 220px;
  transition: border-color .15s;
  background: var(--white);
}
.resource-search:focus { border-color: var(--green-mid); }
.resource-search::placeholder { color: #a0aec0; }
.resource-search-icon {
  position: absolute;
  left: 12px;
  top: 50%;
  transform: translateY(-50%);
  color: #a0aec0;
  pointer-events: none;
  font-size: .9rem;
}
.filter-count {
  font-size: .78rem;
  color: var(--slate);
  margin-left: 4px;
}
.resource-card.hidden  { display: none; }
.resource-also.hidden  { display: none; }
.resource-section.hidden { display: none; }

/* Compact "additional" list — for small entries without full cards */
.resource-also {
  margin-top: 16px;
  padding: 14px 16px;
  background: var(--bg-warm);
  border-radius: var(--radius-sm);
  border: 1px solid var(--border);
}
.resource-also p {
  font-size: .75rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .08em;
  color: var(--slate);
  margin-bottom: 8px;
}
.resource-also ul {
  list-style: none;
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
}
.resource-also ul li {
  font-size: .83rem;
  color: var(--navy);
}

/* Legacy list style (Open Source Topics) */
.resource-links {
  list-style: none;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
  gap: 8px;
}
.resource-links li a {
  display: block;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  font-size: .88rem;
  color: var(--green-mid);
  font-weight: 500;
  transition: border-color .15s, background .15s;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.resource-links li a:hover {
  border-color: var(--green-mid);
  background: var(--green-pale);
  text-decoration: none;
}

/* County jump nav */
.county-nav {
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  padding: 20px 24px;
  margin-bottom: 48px;
  background: var(--bg-warm);
}
.county-nav p {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .1em;
  color: var(--slate);
  margin-bottom: 12px;
}
.county-nav-links {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}
.county-nav-links a {
  font-size: .82rem;
  color: var(--green-mid);
  padding: 4px 10px;
  border: 1px solid var(--border);
  border-radius: 999px;
  transition: border-color .15s, background .15s;
}
.county-nav-links a:hover {
  border-color: var(--green-mid);
  background: var(--green-pale);
  text-decoration: none;
}

/* =============================================
   Discussions
   ============================================= */

.discussion-thread {
  border-bottom: 1px solid var(--border);
  padding: 28px 0;
}
.discussion-thread:first-of-type { border-top: 1px solid var(--border); }
.discussion-thread h3 {
  font-family: var(--font-serif);
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--green-dark);
  margin-bottom: 18px;
}

.message {
  display: flex;
  gap: 14px;
  margin-bottom: 16px;
}
.message:last-child { margin-bottom: 0; }

.avatar {
  flex-shrink: 0;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--green-mid);
  color: var(--white);
  font-size: .7rem;
  font-weight: 700;
  display: flex;
  align-items: center;
  justify-content: center;
}

.message-body { flex: 1; }
.message-body .author {
  font-weight: 600;
  color: var(--navy);
  font-size: .82rem;
  margin-bottom: 4px;
}
.message-body p {
  color: var(--slate);
  font-size: .92rem;
  line-height: 1.6;
}

/* =============================================
   Contact
   ============================================= */

.contact-card {
  max-width: 560px;
  margin: 0 auto;
  text-align: center;
}
.contact-card h2 {
  font-family: var(--font-serif);
  font-size: 1.6rem;
  color: var(--green-dark);
  margin-bottom: 14px;
}
.contact-card p { color: var(--slate); margin-bottom: 22px; line-height: 1.7; }

/* =============================================
   Footer
   ============================================= */

footer {
  background: var(--navy);
  color: rgba(255,255,255,.55);
  text-align: center;
  padding: 40px 24px;
  font-size: .85rem;
  margin-top: 80px;
}
footer a { color: rgba(255,255,255,.70); }
footer a:hover { color: var(--white); }
footer .footer-brand {
  font-family: var(--font-serif);
  font-size: 1.1rem;
  font-style: italic;
  color: var(--white);
  display: block;
  margin-bottom: 8px;
}

/* =============================================
   Utility
   ============================================= */

.section-title {
  font-family: var(--font-serif);
  font-size: 1.8rem;
  color: var(--navy);
  margin-bottom: 8px;
}
.section-subtitle {
  color: var(--slate);
  font-size: .95rem;
  margin-bottom: 32px;
  line-height: 1.6;
}
.divider { border: none; border-top: 1px solid var(--border); margin: 48px 0; }

.tag {
  display: inline-block;
  background: var(--green-pale);
  color: var(--green-dark);
  border-radius: 999px;
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 10px;
  margin-right: 6px;
  margin-bottom: 6px;
}

.notice {
  background: var(--bg-warm);
  border: 1px solid var(--border);
  border-left: 3px solid var(--green-mid);
  border-radius: var(--radius-sm);
  padding: 14px 18px;
  font-size: .88rem;
  color: var(--slate);
  line-height: 1.65;
  margin-bottom: 32px;
}
.notice strong { color: var(--green-dark); }

/* =============================================
   Code of Conduct
   ============================================= */

.conduct-section {
  background: var(--bg-warm);
  border-top: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  padding: 72px 24px;
}

.conduct-inner {
  max-width: var(--max-w);
  margin: 0 auto;
}

.conduct-eyebrow {
  font-size: .72rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .12em;
  color: var(--green-mid);
  margin-bottom: 10px;
}

.conduct-heading {
  font-family: var(--font-serif);
  font-size: clamp(1.8rem, 3.5vw, 2.6rem);
  color: var(--navy);
  font-weight: 700;
  margin-bottom: 16px;
  line-height: 1.15;
}

.conduct-intro {
  font-size: 1.05rem;
  color: var(--slate);
  line-height: 1.75;
  max-width: 640px;
  margin-bottom: 48px;
}

.conduct-grid {
  display: grid;
  grid-template-columns: repeat(2, 1fr);
  gap: 0;
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  overflow: hidden;
  margin-bottom: 36px;
}

.conduct-item {
  padding: 28px 32px;
  border-right: 1px solid var(--border);
  border-bottom: 1px solid var(--border);
  background: var(--white);
}
.conduct-item:nth-child(2n) { border-right: none; }
.conduct-item:nth-last-child(-n+2) { border-bottom: none; }

.conduct-label {
  font-weight: 700;
  font-size: .9rem;
  color: var(--green-dark);
  margin-bottom: 8px;
  font-family: var(--font-serif);
}

.conduct-item p {
  font-size: .9rem;
  color: var(--slate);
  line-height: 1.7;
}
.conduct-item a { color: var(--green-mid); }

.conduct-footer-note {
  font-size: .82rem;
  color: var(--slate);
  opacity: .75;
  line-height: 1.65;
  border-top: 1px solid var(--border);
  padding-top: 20px;
}
.conduct-footer-note a { color: var(--green-mid); }

/* =============================================
   Responsive
   ============================================= */

@media (max-width: 720px) {
  .pillars { grid-template-columns: 1fr; }
  .hero { height: 380px; }
  .hero-content { padding: 32px 24px; }
  .hero-content h1 { font-size: 2rem; }
  .container { padding: 40px 20px; }
  nav { padding: 0 16px; }
  nav .nav-links a { padding: 6px 8px; font-size: 13px; }
  .event { gap: 16px; }
  .resource-links { grid-template-columns: 1fr; }
  .resource-grid  { grid-template-columns: 1fr; }
  .page-header { padding: 48px 20px 40px; }
  .contact-two-col { grid-template-columns: 1fr; }
  .conduct-grid { grid-template-columns: 1fr; }
  .conduct-item { border-right: none !important; }
  .conduct-item:nth-last-child(-n+2) { border-bottom: 1px solid var(--border); }
  .conduct-item:last-child { border-bottom: none; }
}
