/* ══════════════════════════════════════════════════
   PHILL CARTER · COUNCIL MEMBER · SEBASTOPOL D3
   Shared Design System
   ══════════════════════════════════════════════════ */

:root {
  --green:       #1E4D2B;
  --green-mid:   #2A6239;
  --green-dark:  #152E1C;
  --green-tint:  #EDF5EF;
  --cream:       #FAF7F2;
  --cream-mid:   #F2EDE4;
  --gold:        #A87028;
  --gold-light:  #FBF0DB;
  --charcoal:    #2A3240;
  --midgray:     #697380;
  --lightgray:   #9EA8B3;
  --border:      #DDD8CE;
  --border-dark: #BDB8B0;
  --white:       #FFFFFF;
  --nav-height:  60px;
}

/* ── RESET ── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
img { max-width: 100%; display: block; }

body {
  font-family: 'Inter', system-ui, sans-serif;
  background: var(--cream);
  color: var(--charcoal);
  overflow-x: hidden;
  line-height: 1.6;
  font-size: 16px;
}

/* ── TYPOGRAPHY ── */
h1, h2, h3, .display {
  font-family: 'Fraunces', Georgia, serif;
  font-weight: 700;
  line-height: 1.12;
}

h1 { font-size: clamp(2.4rem, 5.5vw, 4rem); }
h2 { font-size: clamp(1.8rem, 3.5vw, 2.6rem); }
h3 { font-size: clamp(1.15rem, 2vw, 1.4rem); }

p { line-height: 1.7; }

a { color: var(--green-mid); text-decoration: none; }
a:hover { text-decoration: underline; }

/* ── NAV ── */
.site-nav {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 200;
  background: var(--green-dark);
  height: var(--nav-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(1.5rem, 4vw);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.nav-brand {
  font-family: 'Fraunces', serif;
  color: var(--white);
  font-size: 1rem;
  letter-spacing: 0.01em;
  white-space: nowrap;
  text-decoration: none;
}

.nav-brand span {
  color: var(--gold);
  font-size: 0.78rem;
  display: block;
  font-family: 'Inter', sans-serif;
  font-weight: 400;
  letter-spacing: 0.03em;
  margin-top: -1px;
}

.nav-links {
  display: flex;
  align-items: center;
  gap: 0.25rem;
  list-style: none;
}

.nav-links a {
  color: rgba(255,255,255,0.65);
  font-size: 0.83rem;
  font-weight: 500;
  letter-spacing: 0.025em;
  padding: 0.4rem 0.75rem;
  border-radius: 4px;
  transition: color 0.18s, background 0.18s;
  text-decoration: none;
}

.nav-links a:hover { color: var(--white); background: rgba(255,255,255,0.08); }
.nav-links a.active { color: var(--white); background: rgba(255,255,255,0.12); font-weight: 600; }

/* Hamburger */
.nav-hamburger {
  display: none;
  flex-direction: column;
  gap: 5px;
  background: none;
  border: none;
  cursor: pointer;
  padding: 4px;
}

.nav-hamburger span {
  display: block;
  width: 24px;
  height: 2px;
  background: rgba(255,255,255,0.75);
  border-radius: 2px;
  transition: all 0.25s;
}

.nav-hamburger.open span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-hamburger.open span:nth-child(2) { opacity: 0; }
.nav-hamburger.open span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

.nav-mobile {
  display: none;
  position: fixed;
  top: var(--nav-height);
  left: 0; right: 0;
  background: var(--green-dark);
  border-bottom: 1px solid rgba(255,255,255,0.1);
  z-index: 190;
  flex-direction: column;
  padding: 0.5rem 0 1rem;
}

.nav-mobile.open { display: flex; }

.nav-mobile a {
  color: rgba(255,255,255,0.75);
  font-size: 0.95rem;
  font-weight: 500;
  padding: 0.75rem max(1.5rem, 4vw);
  text-decoration: none;
  transition: background 0.15s, color 0.15s;
}

.nav-mobile a:hover,
.nav-mobile a.active {
  background: rgba(255,255,255,0.08);
  color: var(--white);
}

/* ── PAGE WRAPPER ── */
.page-body { padding-top: var(--nav-height); }

/* ── SECTIONS ── */
section { padding: 5rem max(1.5rem, 5vw); }
.section-alt { background: var(--cream-mid); }
.section-green { background: var(--green); color: var(--white); }
.section-green-tint { background: var(--green-tint); }
.section-gold-tint { background: var(--gold-light); }

.section-label {
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--green-mid);
  margin-bottom: 0.6rem;
}

.section-green .section-label { color: rgba(255,255,255,0.55); }

.section-title {
  font-family: 'Fraunces', serif;
  font-size: clamp(1.9rem, 3.5vw, 2.6rem);
  color: var(--charcoal);
  line-height: 1.15;
  margin-bottom: 1rem;
}

.section-green .section-title { color: var(--white); }

.section-intro {
  font-size: 1.05rem;
  color: var(--midgray);
  max-width: 600px;
  line-height: 1.75;
  font-weight: 400;
  margin-bottom: 3rem;
}

.section-green .section-intro { color: rgba(255,255,255,0.65); }

/* ── CONTAINER ── */
.container { max-width: 1120px; margin: 0 auto; }

/* ── BUTTONS ── */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.9rem;
  font-weight: 600;
  padding: 0.7rem 1.5rem;
  border-radius: 4px;
  border: 2px solid transparent;
  cursor: pointer;
  transition: all 0.2s;
  text-decoration: none;
  letter-spacing: 0.01em;
}

.btn-primary {
  background: var(--green);
  color: var(--white);
  border-color: var(--green);
}

.btn-primary:hover {
  background: var(--green-mid);
  border-color: var(--green-mid);
  text-decoration: none;
}

.btn-outline {
  background: transparent;
  color: var(--green);
  border-color: var(--green);
}

.btn-outline:hover {
  background: var(--green);
  color: var(--white);
  text-decoration: none;
}

.btn-gold {
  background: var(--gold);
  color: var(--white);
  border-color: var(--gold);
}

.btn-gold:hover {
  background: #8C5E22;
  border-color: #8C5E22;
  text-decoration: none;
}

.btn-white {
  background: var(--white);
  color: var(--green);
  border-color: var(--white);
}

.btn-white:hover {
  background: var(--cream);
  border-color: var(--cream);
  text-decoration: none;
}

/* ── FORM ELEMENTS ── */
.form-group { display: flex; flex-direction: column; gap: 0.4rem; }

.form-label {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--charcoal);
  letter-spacing: 0.02em;
}

.form-input {
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  padding: 0.65rem 0.9rem;
  border: 1.5px solid var(--border-dark);
  border-radius: 4px;
  background: var(--white);
  color: var(--charcoal);
  transition: border-color 0.18s;
  outline: none;
}

.form-input:focus { border-color: var(--green-mid); }
.form-input::placeholder { color: var(--lightgray); }

/* ── EMAIL SIGNUP BLOCK ── */
.signup-block {
  background: var(--green);
  border-radius: 8px;
  padding: 2.5rem 2rem;
  max-width: 540px;
}

.signup-block .signup-title {
  font-family: 'Fraunces', serif;
  font-size: 1.4rem;
  color: var(--white);
  margin-bottom: 0.5rem;
}

.signup-block .signup-sub {
  font-size: 0.9rem;
  color: rgba(255,255,255,0.65);
  margin-bottom: 1.5rem;
  line-height: 1.6;
}

.signup-form {
  display: flex;
  flex-direction: column;
  gap: 0.75rem;
}

.signup-form .form-input {
  background: rgba(255,255,255,0.12);
  border-color: rgba(255,255,255,0.25);
  color: var(--white);
}

.signup-form .form-input:focus { border-color: rgba(255,255,255,0.6); }
.signup-form .form-input::placeholder { color: rgba(255,255,255,0.4); }

.signup-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 0.75rem;
}

@media (max-width: 500px) { .signup-row { grid-template-columns: 1fr; } }

.signup-disclaimer {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.4);
  margin-top: 0.25rem;
}

.signup-success {
  display: none;
  background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25);
  border-radius: 4px;
  padding: 1rem;
  color: rgba(255,255,255,0.85);
  font-size: 0.9rem;
  line-height: 1.5;
}

/* ── CARDS ── */
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 1.75rem;
  box-shadow: 0 2px 12px rgba(0,0,0,0.04);
}

.card-green-top { border-top: 3px solid var(--green); }
.card-gold-top  { border-top: 3px solid var(--gold); }
.card-mid-top   { border-top: 3px solid var(--green-mid); }

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

.cards-grid-2 {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1.25rem;
}

@media (max-width: 860px) { .cards-grid-3 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 600px) {
  .cards-grid-3, .cards-grid-2 { grid-template-columns: 1fr; }
}

/* ── TEASER CARD ── */
.teaser-card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 6px;
  padding: 0;
  overflow: hidden;
  box-shadow: 0 2px 16px rgba(0,0,0,0.05);
  transition: transform 0.2s, box-shadow 0.2s;
  text-decoration: none;
  display: flex;
  flex-direction: column;
}

.teaser-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 8px 32px rgba(30,77,43,0.12);
  text-decoration: none;
}

.teaser-card-bar {
  height: 4px;
  background: var(--green);
}

.teaser-card-bar.gold { background: var(--gold); }
.teaser-card-bar.mid  { background: var(--green-mid); }

.teaser-card-body {
  padding: 1.5rem;
  flex: 1;
  display: flex;
  flex-direction: column;
}

.teaser-card-icon {
  width: 44px;
  height: 44px;
  border-radius: 50%;
  background: var(--green-tint);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 1rem;
  color: var(--green);
}

.teaser-card-title {
  font-family: 'Fraunces', serif;
  font-size: 1.2rem;
  color: var(--charcoal);
  margin-bottom: 0.5rem;
}

.teaser-card-desc {
  font-size: 0.9rem;
  color: var(--midgray);
  line-height: 1.65;
  flex: 1;
  margin-bottom: 1.25rem;
}

.teaser-card-link {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--green-mid);
  display: flex;
  align-items: center;
  gap: 0.35rem;
}

/* ── STAT STRIP ── */
.stat-strip {
  background: var(--green-dark);
  padding: 4rem max(1.5rem, 5vw);
}

.stat-strip-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 1px;
  background: rgba(255,255,255,0.06);
}

.stat-item {
  background: rgba(255,255,255,0.03);
  padding: 2rem 1.5rem;
  text-align: center;
  border: 1px solid rgba(255,255,255,0.06);
  position: relative;
  transition: background 0.2s;
}

.stat-item:hover { background: rgba(255,255,255,0.06); }

.stat-item::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 3px;
}

.stat-green::before  { background: var(--green-mid); }
.stat-gold::before   { background: var(--gold); }
.stat-cream::before  { background: var(--cream); }

.stat-number {
  font-family: 'Fraunces', serif;
  font-size: 2.8rem;
  line-height: 1;
  margin-bottom: 0.4rem;
}

.stat-green .stat-number  { color: #6FC18A; }
.stat-gold .stat-number   { color: var(--gold); }
.stat-cream .stat-number  { color: var(--cream); }

.stat-desc {
  font-size: 0.8rem;
  color: rgba(255,255,255,0.5);
  line-height: 1.5;
}

.stat-source {
  font-size: 0.68rem;
  color: rgba(255,255,255,0.25);
  margin-top: 0.4rem;
  font-style: italic;
}

/* ── FOOTER ── */
.site-footer {
  background: var(--green-dark);
  padding: 3rem max(1.5rem, 4vw);
  border-top: 1px solid rgba(255,255,255,0.06);
}

.footer-inner {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 2rem;
}

.footer-brand {
  font-family: 'Fraunces', serif;
  color: var(--white);
  font-size: 1.05rem;
}

.footer-brand span {
  display: block;
  font-family: 'Inter', sans-serif;
  font-size: 0.78rem;
  color: rgba(255,255,255,0.4);
  font-weight: 400;
  margin-top: 0.2rem;
}

.footer-links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.25rem 1.25rem;
  list-style: none;
}

.footer-links a {
  color: rgba(255,255,255,0.4);
  font-size: 0.82rem;
  text-decoration: none;
  transition: color 0.15s;
}

.footer-links a:hover { color: rgba(255,255,255,0.8); }

.footer-meta {
  font-size: 0.75rem;
  color: rgba(255,255,255,0.3);
  line-height: 1.6;
  max-width: 440px;
}

/* ── ANIMATIONS ── */
@keyframes fadeUp {
  from { opacity: 0; transform: translateY(24px); }
  to   { opacity: 1; transform: translateY(0); }
}

.reveal {
  opacity: 0;
  transform: translateY(22px);
  transition: opacity 0.55s ease, transform 0.55s ease;
}

.reveal.visible {
  opacity: 1;
  transform: none;
}

/* ── CHAT INTERFACE ── */
.chat-wrap {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  box-shadow: 0 4px 24px rgba(0,0,0,0.06);
  max-width: 760px;
}

.chat-header {
  background: var(--green);
  padding: 1rem 1.25rem;
  display: flex;
  align-items: center;
  gap: 0.75rem;
}

.chat-header-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: #6FC18A;
}

.chat-header-text {
  color: var(--white);
  font-size: 0.85rem;
  font-weight: 500;
}

.chat-messages {
  min-height: 280px;
  max-height: 480px;
  overflow-y: auto;
  padding: 1.25rem;
  display: flex;
  flex-direction: column;
  gap: 1rem;
}

.chat-msg {
  display: flex;
  gap: 0.75rem;
  max-width: 88%;
}

.chat-msg.user { flex-direction: row-reverse; align-self: flex-end; }

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

.chat-msg.user .chat-avatar {
  background: var(--cream-mid);
  color: var(--charcoal);
}

.chat-bubble {
  background: var(--cream-mid);
  border-radius: 12px 12px 12px 3px;
  padding: 0.75rem 1rem;
  font-size: 0.9rem;
  line-height: 1.6;
  color: var(--charcoal);
}

.chat-msg.user .chat-bubble {
  background: var(--green);
  color: var(--white);
  border-radius: 12px 12px 3px 12px;
}

.chat-bubble p + p { margin-top: 0.5rem; }

.chat-typing {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 0.6rem 0.85rem;
}

.chat-typing span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--midgray);
  animation: typing 1.2s ease infinite;
}

.chat-typing span:nth-child(2) { animation-delay: 0.2s; }
.chat-typing span:nth-child(3) { animation-delay: 0.4s; }

@keyframes typing {
  0%, 80%, 100% { opacity: 0.3; transform: scale(0.8); }
  40%            { opacity: 1;   transform: scale(1); }
}

.chat-chips {
  padding: 0.75rem 1.25rem;
  border-top: 1px solid var(--border);
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.chat-chip {
  background: var(--green-tint);
  border: 1px solid rgba(30,77,43,0.18);
  color: var(--green);
  font-size: 0.8rem;
  font-weight: 500;
  padding: 0.35rem 0.8rem;
  border-radius: 2rem;
  cursor: pointer;
  transition: all 0.18s;
  font-family: 'Inter', sans-serif;
}

.chat-chip:hover {
  background: var(--green);
  color: var(--white);
}

.chat-input-row {
  display: flex;
  gap: 0;
  border-top: 1px solid var(--border);
}

.chat-input {
  flex: 1;
  font-family: 'Inter', sans-serif;
  font-size: 0.92rem;
  padding: 0.85rem 1rem;
  border: none;
  outline: none;
  background: var(--white);
  color: var(--charcoal);
}

.chat-send {
  background: var(--green);
  color: var(--white);
  border: none;
  padding: 0 1.25rem;
  cursor: pointer;
  font-weight: 600;
  font-size: 0.85rem;
  font-family: 'Inter', sans-serif;
  transition: background 0.18s;
  display: flex;
  align-items: center;
  gap: 0.4rem;
}

.chat-send:hover { background: var(--green-mid); }
.chat-send:disabled { opacity: 0.5; cursor: not-allowed; }

/* ── ACCORDION ── */
.accordion { border: 1px solid var(--border); border-radius: 6px; overflow: hidden; }

.accordion-item { border-bottom: 1px solid var(--border); }
.accordion-item:last-child { border-bottom: none; }

.accordion-trigger {
  width: 100%;
  text-align: left;
  background: var(--white);
  border: none;
  padding: 1.1rem 1.25rem;
  font-family: 'Inter', sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  color: var(--charcoal);
  cursor: pointer;
  display: flex;
  justify-content: space-between;
  align-items: center;
  transition: background 0.15s;
}

.accordion-trigger:hover { background: var(--green-tint); }
.accordion-trigger[aria-expanded="true"] { color: var(--green); background: var(--green-tint); }

.accordion-icon {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  transition: transform 0.25s;
  color: var(--midgray);
}

.accordion-trigger[aria-expanded="true"] .accordion-icon { transform: rotate(180deg); }

.accordion-body {
  display: none;
  padding: 0 1.25rem 1.25rem;
  font-size: 0.92rem;
  color: var(--midgray);
  line-height: 1.75;
  background: var(--white);
}

.accordion-body.open { display: block; }

/* ── INLINE LINK STYLE ── */
.link-list {
  list-style: none;
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
}

.link-list li {
  padding-left: 1.1rem;
  position: relative;
  font-size: 0.9rem;
  color: var(--midgray);
  line-height: 1.6;
}

.link-list li::before {
  content: '→';
  position: absolute;
  left: 0;
  color: var(--green-mid);
  font-size: 0.85rem;
}

.link-list a { color: var(--green-mid); text-decoration: underline; }
.link-list a:hover { color: var(--green); }

/* ── HIGHLIGHT BOX ── */
.callout {
  background: var(--green-tint);
  border-left: 3px solid var(--green-mid);
  border-radius: 0 4px 4px 0;
  padding: 1rem 1.25rem;
  font-size: 0.9rem;
  color: var(--charcoal);
  line-height: 1.7;
}

.callout-gold {
  background: var(--gold-light);
  border-left-color: var(--gold);
}

/* ── RESPONSIVE ── */
@media (max-width: 860px) {
  .nav-links { display: none; }
  .nav-hamburger { display: flex; }
  section { padding: 4rem max(1.25rem, 4vw); }
}

@media (max-width: 600px) {
  section { padding: 3rem 1.25rem; }
  h1 { font-size: 2.2rem; }
  h2 { font-size: 1.7rem; }
  .stat-strip-grid { grid-template-columns: 1fr 1fr; }
}
