/* Sustainable Streets Norwalk — design tokens ported from the handoff README */

:root {
  --teal-deep: #004244;
  --teal-hover: #00302f;
  --teal-hover-light: #0d5e60;
  --teal-accent: #4D96A1;
  --green: #8DC63F;
  --green-hover: #a3d666;
  --green-text: #073618;
  --text-body: #3C5654;
  --text-strong: #16302E;
  --text-muted: #5B7371;
  --text-faint: #8A9A98;
  --bg-page: #FBFBF9;
  --bg-section: #F1F4EC;
  --bg-chip: #EEF6E2;
  --border: #E7E9E2;
  --border-alt: #E2E7DA;
  --white: #FFFFFF;
  --shadow-card-hover: 0 20px 40px -24px rgba(0, 66, 68, 0.3);
  --shadow-hero: 0 24px 60px -20px rgba(0, 66, 68, 0.35);
  --radius-card: 16px;
  --radius-pill: 9px;
  --max-wide: 1360px;
  --max-narrow: 1100px;
}

* { box-sizing: border-box; }

html { overflow-x: hidden; }

body {
  margin: 0;
  background: var(--bg-page);
  color: var(--text-strong);
  font-family: 'Avenir Next', Avenir, 'Helvetica Neue', Helvetica, Arial, sans-serif;
  font-weight: 400;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
}

a { color: var(--teal-accent); text-decoration: none; }
a:hover { color: var(--teal-hover); }
::selection { background: var(--green); color: var(--teal-hover); }

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

button { font-family: inherit; }

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(12px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--white);
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 40px;
  gap: 24px;
  flex-wrap: wrap;
}

.site-header__logo { height: 48px; width: auto; object-fit: contain; }

.site-nav { display: flex; align-items: center; gap: 0; flex-wrap: wrap; }

.site-nav__link {
  background: none;
  border: none;
  font: inherit;
  cursor: pointer;
  padding: 8px 10px;
  border-radius: 8px;
  font-size: 14px;
  font-weight: 600;
  color: var(--text-muted);
}
.site-nav__link:hover { background: var(--bg-section); color: var(--text-muted); }
.site-nav__link.is-active { color: var(--teal-deep); }
.site-nav__link.is-active:hover { color: var(--teal-deep); }

.btn-subscribe {
  margin-left: 8px;
  background: var(--teal-deep);
  color: var(--white) !important;
  transition: background 0.15s ease, box-shadow 0.15s ease;
  padding: 11px 20px;
  border-radius: 8px;
  font-size: 15px;
  font-weight: 700;
  display: inline-block;
}
.btn-subscribe:hover { background: var(--teal-hover-light); color: var(--white) !important; box-shadow: 0 6px 16px -4px rgba(0, 66, 68, 0.45); }

/* ---------- Buttons ---------- */

.btn {
  font: inherit;
  font-weight: 700;
  font-size: 16px;
  padding: 15px 26px;
  border-radius: var(--radius-pill);
  cursor: pointer;
  display: inline-block;
  border: none;
  transition: background 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}

.btn--green { background: var(--green); color: var(--green-text) !important; }
.btn--green:hover { background: var(--green-hover); color: var(--green-text) !important; box-shadow: 0 6px 16px -4px rgba(141, 198, 63, 0.5); }

.btn--dark { background: var(--teal-deep); color: var(--white) !important; }
.btn--dark:hover { background: var(--teal-hover-light); color: var(--white) !important; box-shadow: 0 6px 16px -4px rgba(0, 66, 68, 0.45); }

.btn--outline {
  background: none;
  color: var(--teal-deep) !important;
  border: 2px solid var(--teal-deep);
  font-size: 16px;
  padding: 13px 24px;
}
.btn--outline:hover { background: var(--bg-section); }

.btn--small { font-size: 15px; padding: 13px 22px; }

/* ---------- Layout helpers ---------- */

.section { padding: 88px 64px; }
.section--narrow-pad { padding: 72px 64px 100px; }
.section--tight { padding: 96px 64px; }
.wrap { max-width: var(--max-wide); margin: 0 auto; }
.wrap--narrow { max-width: var(--max-narrow); margin: 0 auto; }
.wrap--contact { max-width: 900px; margin: 0 auto; }

main.page {
  max-width: var(--max-narrow);
  margin: 0 auto;
  padding: 72px 64px 100px;
  min-height: calc(100vh - 72px);
  box-sizing: border-box;
  width: 100%;
}
main.page--contact { max-width: 900px; }
main.page--wide { max-width: var(--max-wide); }

.eyebrow {
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: var(--teal-accent);
  margin-bottom: 12px;
}

h1.page-title { font-size: 42px; font-weight: 800; color: var(--teal-deep); margin: 0 0 18px; }
h2.section-title { font-size: 32px; font-weight: 800; color: var(--teal-deep); margin: 0 0 16px; }
.lead { font-size: 18px; line-height: 1.6; color: var(--text-body); max-width: 620px; margin: 0 0 44px; }

/* ---------- Hero ---------- */

.hero {
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  align-items: center;
  gap: 56px;
  padding: 50px 64px;
  max-width: var(--max-wide);
  margin: 0 auto;
}
.hero__content { animation: fadeUp 0.6s ease both; }
.hero__title { font-size: 50px; line-height: 1.08; font-weight: 800; color: var(--teal-deep); margin: 0 0 22px; }
.hero__body { font-size: 24px; line-height: 1.6; color: var(--text-body); max-width: 520px; margin: 0 0 34px; }
.hero__ctas { display: flex; gap: 14px; flex-wrap: wrap; }
.hero__image {
  width: 100%;
  height: 473px;
  object-fit: cover;
  border-radius: 20px;
  box-shadow: var(--shadow-hero);
  margin-top: 48px;
}

/* ---------- Stats strip ---------- */

.stats-strip { background: var(--teal-deep); padding: 25px 64px; }
.stats { max-width: 1200px; margin: 0 auto; display: grid; grid-template-columns: repeat(4, 1fr); gap: 32px; text-align: center; }
.stats__value { font-size: 34px; font-weight: 800; color: var(--green); }
.stats__label { font-size: 14px; color: #BFDAD8; margin-top: 6px; }

/* ---------- Calendar preview (home) ---------- */

.calendar-preview { background: var(--bg-section); padding: 88px 64px; }
.calendar-preview__grid { max-width: var(--max-wide); margin: 0 auto; display: grid; grid-template-columns: 0.9fr 1.1fr; gap: 56px; align-items: start; }
.upcoming-events { display: flex; flex-direction: column; gap: 12px; }
.upcoming-event { background: var(--white); border-radius: 12px; padding: 18px 22px; display: flex; align-items: center; gap: 20px; border: 1px solid var(--border-alt); }
.upcoming-event__date { text-align: center; min-width: 62px; }
.upcoming-event__month { font-size: 12px; font-weight: 800; color: var(--green); text-transform: uppercase; }
.upcoming-event__day { font-size: 26px; font-weight: 800; color: var(--teal-deep); line-height: 1; }
.upcoming-event__divider { width: 1px; align-self: stretch; background: var(--border); }
.upcoming-event__title { font-size: 16px; font-weight: 700; color: var(--text-strong); margin-bottom: 3px; }
.upcoming-event__detail { font-size: 14px; color: var(--text-muted); }
.upcoming-events__empty { background: var(--white); border-radius: 12px; padding: 22px; border: 1px solid var(--border-alt); color: var(--text-muted); font-size: 15px; }

/* ---------- Cards grid (feature cards / project cards) ---------- */

.cards-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 28px; }
.card {
  background: var(--white);
  border: 1px solid var(--border);
  border-radius: var(--radius-card);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  text-decoration: none;
  color: inherit;
}
.card:hover { box-shadow: var(--shadow-card-hover); border-color: var(--green); }
.card__image { width: 100%; height: 180px; object-fit: cover; background: var(--bg-section); }
.card__image--placeholder { display: flex; align-items: center; justify-content: center; color: var(--text-faint); font-size: 13px; text-align: center; padding: 12px; }
.card__body { padding: 26px 26px 30px; }
.card__eyebrow { font-size: 12px; font-weight: 800; letter-spacing: 0.6px; text-transform: uppercase; color: var(--teal-accent); margin-bottom: 8px; }
.card__title { font-size: 21px; font-weight: 800; color: var(--teal-deep); margin: 0 0 10px; }
.card__desc { font-size: 15px; line-height: 1.55; color: var(--text-muted); margin: 0 0 16px; }
.card__link { font-size: 14px; font-weight: 700; color: var(--teal-accent); }

/* ---------- Social icons ---------- */

.social-row { display: flex; justify-content: center; gap: 14px; flex-wrap: wrap; }
.social-row--left { justify-content: flex-start; }
.social-icon {
  display: flex; align-items: center; justify-content: center;
  background: var(--white); border: 1px solid var(--border); border-radius: 999px;
}
.social-icon:hover { border-color: var(--green); background: var(--bg-section); }

/* ---------- Footer ---------- */

.site-footer { margin-top: auto; background: var(--bg-section); border-top: 1px solid var(--border-alt); padding: 48px 64px 34px; }
.site-footer__inner { max-width: var(--max-wide); margin: 0 auto; display: flex; justify-content: space-between; align-items: flex-start; gap: 32px; flex-wrap: wrap; }
.site-footer__brand { display: flex; align-items: center; gap: 10px; }
.site-footer__logo { height: 58px; width: 58px; object-fit: contain; }
.site-footer__text { font-size: 14px; color: var(--text-muted); line-height: 1.5; }
.site-footer__copyright { max-width: var(--max-wide); margin: 24px auto 0; font-size: 13px; color: var(--text-faint); }

/* ---------- About ---------- */

.about-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 56px; align-items: center; margin-top: 40px; }
.about-grid p { font-size: 18px; line-height: 1.65; color: var(--text-body); margin: 0; }
.about-grid img { width: 100%; height: 300px; object-fit: cover; border-radius: 16px; }

/* ---------- Projects ---------- */

.project-block { display: grid; grid-template-columns: 0.85fr 1.15fr; gap: 48px; align-items: center; padding: 44px 0; border-top: 1px solid var(--border); }
.project-block:first-of-type { border-top: none; }
.project-block img { width: 100%; height: 260px; object-fit: cover; border-radius: 16px; }
.project-block__title { font-size: 26px; font-weight: 800; color: var(--teal-deep); margin: 0 0 14px; }
.project-block__body { font-size: 16px; line-height: 1.65; color: var(--text-body); margin: 0 0 18px; }
.project-block__link { font-weight: 700; font-size: 15px; color: var(--teal-accent); }

.project-detail__image { width: 100%; max-height: 420px; object-fit: cover; border-radius: 16px; margin: 32px 0; }
.project-detail__body { font-size: 18px; line-height: 1.65; color: var(--text-body); }
.project-detail__link { display: inline-block; margin-top: 24px; font-weight: 700; font-size: 15px; color: var(--teal-accent); }

/* ---------- Events (getinvolved) ---------- */

.events-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 64px; }
.event-card { background: var(--bg-section); border-radius: 16px; padding: 28px; }
.event-card__header { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.event-card__title { font-size: 18px; font-weight: 800; color: var(--teal-deep); margin: 0; }
.event-card__desc { font-size: 15px; line-height: 1.55; color: var(--text-body); margin: 0; }
.event-pill {
  display: flex; align-items: center; gap: 6px;
  background: var(--white); border: 1px solid var(--border-alt); border-radius: 999px;
  padding: 6px 12px; font-size: 13px; font-weight: 700; color: var(--teal-deep);
  white-space: nowrap; text-decoration: none;
}
.event-pill:hover { border-color: var(--green); background: var(--bg-chip); color: var(--teal-deep); }

.cta-banner { background: var(--teal-deep); border-radius: 20px; padding: 48px; display: grid; grid-template-columns: 1fr auto; align-items: center; gap: 32px; }
.cta-banner__title { font-size: 26px; font-weight: 800; color: var(--white); margin: 0 0 10px; }
.cta-banner__text { font-size: 15px; color: #BFDAD8; margin: 0; }

/* ---------- Calendar page ---------- */

.calendar-toolbar { display: flex; align-items: center; justify-content: space-between; margin-bottom: 32px; flex-wrap: wrap; gap: 16px; }
.calendar-toolbar__nav { display: flex; gap: 10px; }
.calendar-toolbar__btn { background: var(--white); border: 1px solid var(--border-alt); color: var(--teal-deep); font-weight: 700; font-size: 15px; padding: 10px 18px; border-radius: 9px; cursor: pointer; font-family: inherit; }
.calendar-toolbar__btn:hover { border-color: var(--green); }

.calendar-grid { border: 1px solid var(--border-alt); border-radius: 14px; background: var(--white); display: grid; grid-template-columns: repeat(7, 1fr); }
.calendar-grid > div:not(:nth-child(7n+1)) { box-shadow: -1px 0 0 var(--border); }
.calendar-weekday { padding: 12px; text-align: center; font-size: 12px; font-weight: 800; color: var(--teal-accent); text-transform: uppercase; letter-spacing: 0.4px; background: var(--bg-section); }
.calendar-weekday:first-child { border-radius: 14px 0 0 0; }
.calendar-weekday:last-child { border-radius: 0 14px 0 0; }
.calendar-day { min-height: 108px; padding: 10px; border-top: 1px solid var(--border); }
.calendar-day__num { font-size: 13px; font-weight: 700; margin-bottom: 6px; }
.calendar-empty { text-align: center; color: var(--text-muted); font-size: 15px; margin-top: 24px; }

.event-chip-wrap { position: relative; }
.event-chip {
  background: var(--bg-chip); color: var(--teal-deep); font-size: 11px; font-weight: 700;
  padding: 3px 6px; border-radius: 5px; margin-bottom: 4px; overflow: hidden;
  text-overflow: ellipsis; white-space: nowrap; cursor: default;
}
.event-chip:hover { background: var(--green); color: var(--white); }
.event-chip.is-highlighted { background: var(--green); color: var(--green-text); box-shadow: 0 0 0 2px var(--teal-deep); }

.event-preview {
  position: absolute; top: calc(100% + 6px); z-index: 1000; width: 240px;
  background: var(--white); border: 1px solid var(--border-alt); border-top: 3px solid var(--green);
  border-radius: 10px; box-shadow: 0 16px 32px -12px rgba(0, 66, 68, 0.35); padding: 14px 16px;
  pointer-events: none; opacity: 0; visibility: hidden; transform: translateY(4px);
  transition: opacity 0.12s ease, transform 0.12s ease;
}
.event-chip-wrap:hover .event-preview { opacity: 1; visibility: visible; transform: translateY(0); }
.event-preview--left { left: 0; }
.event-preview--right { right: 0; }
.event-preview__title { font-size: 14px; font-weight: 800; color: var(--teal-deep); margin-bottom: 4px; }
.event-preview__time { font-size: 12px; font-weight: 700; color: var(--green); margin-bottom: 6px; }
.event-preview__location { font-size: 12px; color: var(--text-muted); margin-bottom: 6px; }
.event-preview__summary { font-size: 12px; color: var(--text-body); line-height: 1.5; white-space: pre-line; }

/* ---------- Contact ---------- */

.contact-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 24px; margin-bottom: 48px; align-items: stretch; }
.contact-card { background: var(--bg-section); border-radius: 16px; padding: 28px; display: flex; flex-direction: column; }
.contact-card h3 { font-size: 16px; font-weight: 800; color: var(--teal-deep); margin: 0 0 8px; }
.contact-card__email { font-size: 16px; font-weight: 700; }
.contact-card__cta { margin-top: auto; padding-top: 16px; }

/* ---------- Responsive ---------- */

@media (max-width: 900px) {
  .hero, .about-grid, .calendar-preview__grid, .project-block, .contact-grid, .cta-banner { grid-template-columns: 1fr; }
  .cards-grid, .events-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  main.page, .section, .section--narrow-pad, .section--tight { padding-left: 24px; padding-right: 24px; }
  .site-header { padding: 14px 20px; }
}
