:root {
  --paper: #FAF7EE;
  --sun: #FFD230;
  --ink: #000;
  --leaf: #3D6B2C;
  --leaf-deep: #264A18;
  --glass: rgba(255, 252, 243, 0.36);
  --glass-hover: rgba(255, 252, 243, 0.5);
  --glass-edge: rgba(255, 255, 255, 0.8);
  --pad: clamp(1.25rem, 6vw, 6rem);
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }

html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

body {
  background: var(--paper);
  color: var(--ink);
  font-family: "Montserrat", ui-sans-serif, system-ui, sans-serif;
  font-size: 1.125rem;
  line-height: 1.6;
  font-feature-settings: "kern";
  overflow-x: hidden;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

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

[hidden] { display: none !important; }

/* ---------- the sunflower ---------- */

.sun {
  position: fixed;
  z-index: 0;
  pointer-events: none;
  aspect-ratio: 1;
}
.sun[data-corner="tl"] { width: min(98vmin, 1120px); left: -22vmin; top: -14vmin; }
.sun[data-corner="tr"] { width: min(86vmin, 980px); right: -28vmin; top: -21vmin; }

.sun-lean, .sun-bloom, .sun-pulse, .sun img {
  width: 100%;
  height: 100%;
  transform-origin: 50% 50%;
}
.sun img { display: block; }
.sun-lean { will-change: transform; }

.sun-bloom { animation: bloom 1.8s var(--ease) both; }
.sun-pulse { animation: pulse 7s ease-in-out 1.8s infinite; }

@keyframes bloom {
  from { transform: scale(0.55) rotate(-40deg); opacity: 0; }
  to   { transform: scale(1) rotate(0deg); opacity: 1; }
}
@keyframes pulse {
  0%, 100% { transform: scale(1); }
  50%      { transform: scale(1.035); }
}

main, footer { position: relative; z-index: 1; }

/* ---------- home hero ---------- */

.hero {
  min-height: 100svh;
  padding: clamp(7rem, 27vh, 15rem) var(--pad) clamp(3rem, 8vh, 5rem);
}
.hero .cards { margin-top: clamp(2.75rem, 8vh, 5rem); }

/* ---------- type ---------- */

.wordmark {
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(2.5rem, 7.6vw, 8.75rem);
  line-height: 0.9;
  letter-spacing: -0.035em;
}

.lede {
  text-wrap: pretty;
  margin-top: 1.4rem;
  font-size: clamp(1.05rem, 1.45vw, 1.3rem);
  line-height: 1.5;
  max-width: 34rem;
}

h2 {
  font-size: clamp(1.4rem, 2vw, 1.75rem);
  font-weight: 700;
  line-height: 1.2;
  letter-spacing: -0.01em;
}

p + p { margin-top: 1em; }

.textlink {
  display: inline-block;
  margin-top: 1.5rem;
  font-weight: 600;
  color: var(--leaf);
  text-decoration: none;
  background: linear-gradient(currentColor, currentColor) 0 100% / 100% 2px no-repeat;
  padding-bottom: 3px;
  transition: color 0.25s, background-size 0.4s var(--ease);
}
.textlink:hover { color: var(--leaf-deep); background-size: 100% 4px; }

.tbd {
  background: rgba(61, 107, 44, 0.13);
  color: var(--leaf-deep);
  border-radius: 0.3em;
  padding: 0 0.3em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}

:focus-visible { outline: 3px solid var(--leaf); outline-offset: 4px; border-radius: 6px; }

/* ---------- glass cards ---------- */

.cards {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr;
  gap: clamp(0.75rem, 1.4vw, 1.25rem);
  max-width: 1140px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  min-height: 15.5rem;
  padding: 1.7rem 1.7rem 1.5rem;
  border-radius: 30px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 22px 40px -30px rgba(38, 74, 24, 0.32);
  color: inherit;
  text-decoration: none;
  text-align: left;
  font: inherit;
  cursor: pointer;
  isolation: isolate;
  transition:
    transform 0.55s var(--ease),
    background-color 0.35s,
    box-shadow 0.55s var(--ease);
}

/* soft light that follows the pointer across the glass */
.card::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  border-radius: inherit;
  background: radial-gradient(360px circle at var(--x, 50%) var(--y, 50%), rgba(255, 255, 255, 0.7), transparent 60%);
  opacity: 0;
  transition: opacity 0.35s;
  pointer-events: none;
}

.card:hover { transform: translateY(-5px); background: var(--glass-hover); box-shadow: inset 0 1px 0 rgba(255,255,255,.9), 0 30px 50px -30px rgba(38, 74, 24, 0.4); }
.card:hover::before { opacity: 1; }
.card:active { transform: translateY(-2px) scale(0.99); transition-duration: 0.15s; }
.card:focus-visible { border-radius: 30px; }

.card h2 { font-size: 1.2rem; font-weight: 700; }
.card--lead h2 { font-size: clamp(1.35rem, 1.9vw, 1.65rem); }
.card p { font-size: 1rem; line-height: 1.55; }

.card .go {
  margin-top: auto;
  padding-top: 0.6rem;
  align-self: flex-start;
  font-size: 0.98rem;
  font-weight: 600;
  color: var(--leaf);
  background: linear-gradient(currentColor, currentColor) 0 100% / 0 2px no-repeat;
  padding-bottom: 3px;
  transition: background-size 0.45s var(--ease), color 0.25s;
}
.card:hover .go, .card:focus-visible .go { background-size: 100% 2px; color: var(--leaf-deep); }

@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))) {
  .card { background: rgba(255, 252, 243, 0.86); }
}

/* ---------- sections ---------- */

.section {
  padding: clamp(6rem, 20vh, 12rem) var(--pad) 0 max(var(--pad), 42vw);
}
.section > * { max-width: 35rem; }
.section h2 { margin-bottom: 1rem; }

.statement {
  text-wrap: balance;
  font-size: clamp(1.45rem, 2.4vw, 2.1rem);
  font-weight: 500;
  line-height: 1.32;
  letter-spacing: -0.012em;
}
.section > .statement { max-width: 40rem; }

/* ---------- footer ---------- */

.foot {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1.5rem 2.5rem;
  flex-wrap: wrap;
  padding: clamp(6rem, 20vh, 12rem) var(--pad) 2.5rem;
  font-size: 0.95rem;
}
.foot-logo {
  flex: none;
  width: clamp(240px, 30vw, 420px);
  height: auto;
  margin: 0 calc(-0.5 * var(--pad)) -1rem auto;
}
.foot-text { padding-bottom: 0.4rem; }
.foot-sig { font-style: italic; margin-bottom: 0.5rem; }
.foot-links { display: flex; gap: 1.75rem; flex-wrap: wrap; }
.foot-links a { text-decoration: none; font-weight: 500; color: var(--leaf); }
.foot-links a:hover { color: var(--leaf-deep); text-decoration: underline; text-underline-offset: 4px; }

/* ---------- page-load moment ---------- */

/* "backwards" (not "both") so hover transforms still work once it's done */
.rise, .hero .card { animation: rise 1.1s var(--ease) backwards; }
.rise-2 { animation-delay: 0.35s; }
.hero .card:nth-child(1) { animation-delay: 0.55s; }
.hero .card:nth-child(2) { animation-delay: 0.67s; }
.hero .card:nth-child(3) { animation-delay: 0.79s; }
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}

/* ---------- small screens ---------- */

@media (max-width: 900px) {
  .section { padding-left: var(--pad); }
  .cards { grid-template-columns: 1fr 1fr; }
  .card--lead { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .cards { grid-template-columns: 1fr; }
  .card { min-height: 0; }
  .hero .wordmark { font-size: 15.5vw; }
  .topbar-mark { font-size: 0.92rem; }
  .topbar-join { padding: 0.45rem 0.9rem; font-size: 0.9rem; }
  .foot-logo { width: 78vw; }
  .foot-links { gap: 0.4rem 1.5rem; }
  .sun[data-corner="tl"] { width: 118vw; left: -38vw; top: -10vw; }
  .sun[data-corner="tr"] { width: 106vw; right: -46vw; top: -24vw; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  .sun-bloom, .sun-pulse, .rise, .hero .card { animation: none; }
  .card, .card::before, .card .go, .textlink { transition: none; }
  .card:hover { transform: none; }
}

/* ---------- bikeway page ---------- */

.topbar {
  position: relative;
  z-index: 2;
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 1rem;
  padding: 1.6rem var(--pad);
}
.topbar-mark {
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: -0.02em;
  font-size: 1.05rem;
  text-decoration: none;
  white-space: nowrap;
}
.topbar-join {
  font-weight: 600;
  font-size: 0.98rem;
  color: var(--leaf);
  text-decoration: none;
  padding: 0.55rem 1.1rem;
  border-radius: 999px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(16px) saturate(1.5);
  backdrop-filter: blur(16px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  white-space: nowrap;
  transition: background-color 0.3s, color 0.25s;
}
.topbar-join:hover { background: var(--glass-hover); color: var(--leaf-deep); }

.page-hero {
  padding: clamp(4rem, 16vh, 9rem) var(--pad) 0;
}
.page-hero .wordmark { font-size: clamp(2.4rem, 6.6vw, 7.25rem); max-width: 11ch; }
.page-hero .lede { max-width: 36rem; }

.article {
  padding: clamp(4rem, 12vh, 8rem) var(--pad) 0;
  max-width: calc(40rem + 2 * var(--pad));
}
.article > * + * { margin-top: clamp(3.5rem, 9vh, 6rem); }
.article h2 { margin-bottom: 1rem; }

.figure-slot { margin-left: 0; margin-right: 0; }
.figure-frame {
  display: grid;
  place-items: center;
  aspect-ratio: 16 / 9;
  padding: 1.5rem;
  border-radius: 30px;
  border: 1.5px dashed rgba(61, 107, 44, 0.45);
  background: rgba(255, 252, 243, 0.5);
  text-align: center;
}
.figure-slot figcaption { margin-top: 0.8rem; font-size: 0.95rem; font-style: italic; }

.timeline {
  list-style: none;
  padding: 0;
  margin-top: 2.25rem;
  border-left: 2px solid rgba(61, 107, 44, 0.3);
}
.timeline li {
  position: relative;
  padding: 0 0 1.5rem 1.6rem;
}
.timeline li:last-child { padding-bottom: 0; }
.timeline li::before {
  content: "";
  position: absolute;
  left: -7px;
  top: 0.55em;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--paper);
  border: 2px solid var(--leaf);
}
.timeline li.key::before { background: var(--sun); border-color: var(--ink); }
.timeline .year {
  display: block;
  font-weight: 700;
  color: var(--leaf);
  font-variant-numeric: tabular-nums;
}
.timeline .year.tbd { width: fit-content; margin-bottom: 0.15rem; }



/* ---------- wide blocks between article text (galleries, action cards) ---------- */

.wide {
  padding: clamp(3.5rem, 9vh, 6rem) var(--pad) 0;
  max-width: calc(1140px + 2 * var(--pad));
}
.wide > h2 { margin-bottom: 0.4rem; }
.wide > p { max-width: 40rem; }

.page-hero .wordmark--long { font-size: clamp(2.2rem, 5vw, 5.6rem); max-width: none; }

/* ---------- buttons ---------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.95rem 1.7rem;
  border-radius: 999px;
  background: var(--sun);
  color: var(--ink);
  font-weight: 700;
  font-size: 1.05rem;
  text-decoration: none;
  box-shadow: inset 0 -2px 0 rgba(0, 0, 0, 0.12), 0 16px 30px -20px rgba(130, 95, 0, 0.7);
  transition: transform 0.4s var(--ease), box-shadow 0.4s var(--ease), background-color 0.25s;
}
.btn:hover { transform: translateY(-2px); background: #FFC81A; box-shadow: inset 0 -2px 0 rgba(0,0,0,.12), 0 22px 36px -20px rgba(130, 95, 0, 0.75); }
.btn:active { transform: scale(0.98); transition-duration: 0.15s; }

/* ---------- the ask ---------- */

.asks { list-style: none; padding: 0; margin-top: 1.4rem; display: grid; gap: 1rem; }
.asks li {
  position: relative;
  padding-left: 2.4rem;
  font-size: clamp(1.1rem, 1.5vw, 1.25rem);
  font-weight: 600;
  line-height: 1.4;
}
.asks li::before {
  content: "";
  position: absolute;
  left: 0;
  top: -0.05em;
  width: 1.6rem;
  height: 1.6rem;
  background: url("brand/sunflower.svg") center / contain no-repeat;
}
.asks li:nth-child(2)::before { transform: rotate(38deg); }
.asks li:nth-child(3)::before { transform: rotate(-24deg); }

/* ---------- petition ---------- */

.petition {
  padding: clamp(1.75rem, 4vw, 2.6rem);
  border-radius: 34px;
  background: var(--glass);
  -webkit-backdrop-filter: blur(22px) saturate(1.5);
  backdrop-filter: blur(22px) saturate(1.5);
  border: 1px solid var(--glass-edge);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8), 0 22px 40px -32px rgba(38, 74, 24, 0.4);
}
.petition h2 { margin-bottom: 0.6rem; }
.petition .btn { margin-top: 1.5rem; }
.tally { margin-bottom: 1.5rem; }
.tally-num {
  display: block;
  font-weight: 800;
  font-size: clamp(3rem, 7vw, 4.75rem);
  line-height: 0.95;
  letter-spacing: -0.03em;
  font-variant-numeric: tabular-nums;
}
.tally-label { display: block; margin-top: 0.4rem; font-weight: 500; }
.tally-bar { margin-top: 1rem; }
.tally-bar .track { height: 12px; border-radius: 99px; background: rgba(61, 107, 44, 0.15); overflow: hidden; }
.tally-bar .fill { display: block; height: 100%; width: var(--pct, 0%); background: var(--leaf); border-radius: inherit; transition: width 1.4s var(--ease); }
.tally-goal { display: block; margin-top: 0.4rem; font-size: 0.9rem; color: var(--leaf-deep); }
.card-tally { font-size: 0.95rem; font-weight: 700; color: var(--leaf-deep); }

/* ---------- traffic comparison ---------- */

.traffic { margin: 1.75rem 0 0; }
.traffic-row { display: grid; grid-template-columns: 7.5rem 1fr; align-items: center; gap: 0.9rem; }
.traffic-row + .traffic-row { margin-top: 0.6rem; }
.traffic-dir { font-weight: 600; font-size: 0.95rem; }
.traffic-track { display: flex; align-items: center; gap: 0.7rem; }
.traffic-bar {
  display: block;
  width: calc(var(--w) * 0.78);
  height: 2.6rem;
  border-radius: 14px;
  background: var(--ink);
}
.traffic-num { font-weight: 700; font-variant-numeric: tabular-nums; }
.traffic-bar--light { background: var(--leaf); opacity: 0.35; }
.traffic figcaption { margin-top: 0.85rem; font-size: 0.95rem; font-style: italic; }

/* ---------- street layout diagram ---------- */

.plan svg { display: block; width: 100%; height: auto; }
.plan text { font-family: inherit; font-size: 14px; font-weight: 600; fill: var(--ink); }
.plan .dir { font-size: 12px; font-weight: 500; fill: var(--leaf-deep); }
.plan figcaption { margin-top: 0.8rem; font-size: 0.95rem; font-style: italic; }

/* ---------- photo galleries ---------- */

.gallery {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  grid-auto-rows: clamp(8rem, 15vw, 12.5rem);
  gap: clamp(0.5rem, 1vw, 0.85rem);
  margin-top: 1.6rem;
}
.shot {
  position: relative;
  display: block;
  grid-column: span 2;
  border-radius: 22px;
  overflow: hidden;
  background: rgba(61, 107, 44, 0.08);
}
.shot--wide { grid-column: span 4; }
.shot--tall { grid-row: span 2; }
.shot img, .shot video, .shot iframe {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
  border: 0;
  transition: transform 0.9s var(--ease);
}
a.shot:hover img { transform: scale(1.04); }
a.shot:focus-visible { border-radius: 22px; }
.shot--empty {
  display: grid;
  place-items: center;
  padding: 1rem;
  text-align: center;
  font-size: 0.9rem;
  border: 1.5px dashed rgba(61, 107, 44, 0.4);
  background: rgba(255, 252, 243, 0.5);
}
.gallery-cap { margin-top: 0.8rem; font-size: 0.95rem; font-style: italic; }

.lightbox {
  width: 100vw;
  height: 100vh;
  max-width: 100vw;
  max-height: 100vh;
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}
.lightbox[open] { display: grid; place-items: center; }
.lightbox::backdrop { background: rgba(18, 22, 12, 0.88); }
.lightbox figure { margin: 0; max-width: min(92vw, 1400px); }
.lightbox img { display: block; max-width: 100%; max-height: 84vh; margin: 0 auto; border-radius: 16px; }
.lightbox figcaption { margin-top: 0.8rem; text-align: center; color: var(--paper); font-size: 0.95rem; }
.lb-btn {
  position: fixed;
  width: 3rem;
  height: 3rem;
  border-radius: 50%;
  border: 1px solid rgba(255, 255, 255, 0.3);
  background: rgba(255, 252, 243, 0.14);
  color: var(--paper);
  font: 400 1.9rem/1 system-ui, sans-serif;
  cursor: pointer;
}
.lb-btn:hover { background: rgba(255, 252, 243, 0.26); }
.lb-prev { left: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-next { right: 1.25rem; top: 50%; transform: translateY(-50%); }
.lb-close { right: 1.25rem; top: 1.25rem; }

/* ---------- action cards (bikeway + block party) ---------- */

.cards--actions { grid-template-columns: repeat(3, 1fr); margin-top: 1.8rem; }
.cards--actions .card--lead { grid-column: span 2; }

@media (max-width: 900px) {
  .cards--actions { grid-template-columns: 1fr 1fr; }
  .cards--actions .card--lead { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(4, 1fr); }
  .shot--wide { grid-column: span 4; }
}
@media (max-width: 640px) {
  .cards--actions { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 9rem; }
  .shot, .shot--wide { grid-column: span 2; }
  .shot--tall { grid-row: span 2; grid-column: span 1; }
  .traffic-row { grid-template-columns: 6.2rem 1fr; }
}

a.inline { color: var(--leaf); font-weight: 600; text-decoration-thickness: 2px; text-underline-offset: 3px; }
a.inline:hover { color: var(--leaf-deep); }
