/* ─────────────────────────────────────────────────────────────────────
   samforct.com theme clone.

   Values here were measured off the live Squarespace site rather than
   guessed, so that a visitor crossing from samforct.com to this page
   doesn't register the seam:

     ink   #4F2E6B  nav links, body copy, the CONTACT SAM button
     teal  #126673  the hero band
     lav   #8C7A9F  hero heading on teal; the mobile menu background
     header  white, 172px tall, logo 146px (30px on mobile)
     fonts   Roboto Condensed (nav), Roboto (body), Montserrat (display)

   Squarespace sizes its nav fluidly — 26.6px at a 2560px viewport, i.e.
   ~1.04vw. The clamp()s below reproduce that curve without letting type
   collapse on small phones or run away on a wide desktop.
   ───────────────────────────────────────────────────────────────────── */

:root {
  --ink:        #4F2E6B;
  --ink-soft:   #6b4f85;
  --teal:       #126673;
  --teal-dark:  #0d4b55;
  --lav:        #8C7A9F;
  --paper:      #ffffff;
  --rule:       #e6e0ec;
  --shadow:     0 1px 3px rgba(79, 46, 107, .08), 0 8px 24px rgba(79, 46, 107, .06);

  --wrap:       1200px;
  --header-h:   172px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: Roboto, "Helvetica Neue", Helvetica, Arial, sans-serif;
  font-size: 17px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: inherit; }

.wrap {
  max-width: var(--wrap);
  margin: 0 auto;
  padding: 0 28px;
}

/* ── Header ──────────────────────────────────────────────────────────
   Squarespace lays this out as logo-left / nav-centre / CTA-right, with
   the nav wrapping to a second line when it runs out of room. A grid
   with a centre column reproduces that: the nav stays optically centred
   on the page regardless of how wide the logo and CTA are.            */

.site-header {
  background: var(--paper);
  position: sticky;
  top: 0;
  z-index: 50;
}

.site-header__inner {
  max-width: 2400px;
  margin: 0 auto;
  padding: 13px 40px;
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 24px;
  min-height: var(--header-h);
}

.site-logo { justify-self: start; display: block; }
.site-logo img { height: 146px; width: auto; display: block; }

/* The wordmark is the campaign's own asset; until it's copied into this
   repo the text fallback keeps the header from collapsing. */
.site-logo__text {
  font-family: Montserrat, Roboto, sans-serif;
  font-weight: 700;
  font-size: 22px;
  line-height: 1.15;
  letter-spacing: .01em;
  max-width: 320px;
}

.site-nav {
  justify-self: center;
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 4px 30px;
}

.site-nav a {
  font-family: "Roboto Condensed", "Arial Narrow", Arial, sans-serif;
  font-size: clamp(15px, 1.04vw, 27px);
  font-weight: 400;
  letter-spacing: .01em;
  text-decoration: none;
  padding: 2px 0;
  border-bottom: 1px solid transparent;
  white-space: nowrap;
}

.site-nav a:hover { border-bottom-color: currentColor; }

/* Squarespace marks the current collection with a permanent underline —
   this page stands in for /events, so Events keeps it here. */
.site-nav a[aria-current="page"] { border-bottom-color: currentColor; }

.site-cta {
  justify-self: end;
  font-family: Roboto, sans-serif;
  font-size: clamp(15px, 1.13vw, 29px);
  text-decoration: none;
  white-space: nowrap;
}
.site-cta:hover { text-decoration: underline; }

.nav-toggle { display: none; }

/* ── Hero ────────────────────────────────────────────────────────────
   The live page ends its teal band with a shallow convex curve. An SVG
   sits at the bottom of the band rather than a border-radius, because
   the curve is far wider than it is tall (2560×~40) and a radius can't
   express that ratio.                                                  */

.hero {
  background: var(--teal);
  position: relative;
  padding: 96px 0 132px;
  text-align: center;
}

.hero h1 {
  font-family: Montserrat, Roboto, sans-serif;
  font-weight: 600;
  font-size: clamp(32px, 3.4vw, 58px);
  line-height: 1.2;
  color: var(--lav);
  margin: 0;
}

.hero p {
  color: rgba(255, 255, 255, .82);
  max-width: 620px;
  margin: 18px auto 0;
  font-size: 17px;
}

.hero__curve {
  position: absolute;
  left: 0;
  right: 0;
  bottom: -1px;      /* -1px hides the hairline seam on fractional DPRs */
  width: 100%;
  height: 46px;
  display: block;
}

/* ── Controls: filters + past/future toggle ────────────────────────── */

.controls {
  padding: 40px 0 8px;
}

.toggle {
  display: inline-flex;
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 4px;
  margin-bottom: 26px;
}

.toggle button {
  font: inherit;
  font-size: 15px;
  border: 0;
  background: none;
  color: var(--ink-soft);
  padding: 8px 22px;
  border-radius: 999px;
  cursor: pointer;
}

.toggle button[aria-pressed="true"] {
  background: var(--teal);
  color: #fff;
}

.facet { margin-bottom: 18px; }

.facet__label {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 9px;
}

.chips { display: flex; flex-wrap: wrap; gap: 8px; }

.chip {
  font: inherit;
  font-size: 14px;
  line-height: 1;
  border: 1px solid var(--rule);
  background: #fff;
  color: var(--ink);
  padding: 9px 16px;
  border-radius: 999px;
  cursor: pointer;
}

.chip:hover { border-color: var(--lav); }

.chip[aria-pressed="true"] {
  background: var(--ink);
  border-color: var(--ink);
  color: #fff;
}

.chip__n { opacity: .55; margin-left: 6px; font-variant-numeric: tabular-nums; }
.chip[aria-pressed="true"] .chip__n { opacity: .7; }

.filter-summary {
  font-size: 14px;
  color: var(--ink-soft);
  margin: 6px 0 0;
  min-height: 21px;
}

.filter-summary button {
  font: inherit;
  background: none;
  border: 0;
  color: var(--teal);
  text-decoration: underline;
  cursor: pointer;
  padding: 0 0 0 8px;
}

/* ── Event cards ─────────────────────────────────────────────────────
   The current /events page is a flyer gallery, so the graphic leads the
   card here too — it's the thing supporters already recognise.

   The flyers are the campaign's own artwork and carry real information —
   dates, meeting points, parking — burned into the image. They are also
   every shape: 1000x1000 square, 852x1184 and 1000x1250 portrait. A fixed
   aspect ratio with object-fit:cover cropped all of that away, taking the
   wordmark off one flyer and the parking instructions off another.

   So the media box has no imposed ratio: each card is as tall as its own
   graphic needs, and `align-items: start` stops the grid stretching the
   short ones to match. Rows end ragged, which is the correct trade — the
   artwork is the point, and tidy card bottoms are not.               */

.events {
  list-style: none;
  margin: 26px 0 0;
  padding: 0 0 80px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(340px, 1fr));
  align-items: start;
  gap: 30px;
}

.card {
  border: 1px solid var(--rule);
  border-radius: 10px;
  overflow: hidden;
  background: #fff;
  display: flex;
  flex-direction: column;
  transition: box-shadow .18s ease, transform .18s ease;
}

.card:hover { box-shadow: var(--shadow); transform: translateY(-2px); }

.card__media {
  background: #f3f0f6;
  overflow: hidden;
}

/* height:auto renders the graphic at its true proportions. max-height is a
   guard against an extreme panorama making one card dominate the grid —
   object-fit:contain letterboxes in that case, which still shows the whole
   image rather than cutting into it. */
.card__media img {
  width: 100%;
  height: auto;
  max-height: 560px;
  object-fit: contain;
  display: block;
}

.card__body { padding: 18px 20px 22px; display: flex; flex-direction: column; flex: 1; }

.card__when {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 7px;
}

.card__title {
  font-family: Montserrat, Roboto, sans-serif;
  font-weight: 600;
  font-size: 20px;
  line-height: 1.3;
  margin: 0 0 8px;
}

.card__where { font-size: 15px; color: var(--ink-soft); margin: 0 0 14px; }

.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: auto; padding-top: 12px; }

.tag {
  font-size: 12px;
  line-height: 1;
  padding: 6px 11px;
  border-radius: 999px;
  background: #f3f0f6;
  color: var(--ink-soft);
  white-space: nowrap;
}

.tag--town { background: #e4f0f1; color: var(--teal-dark); }

.empty {
  grid-column: 1 / -1;
  text-align: center;
  padding: 70px 20px;
  color: var(--ink-soft);
}

/* ── Footer ──────────────────────────────────────────────────────────
   The SEEC attribution is reproduced verbatim from samforct.com. A page
   that solicits attendance carries the same disclaimer obligation as the
   site it visually belongs to, so it is not optional decoration.       */

.site-footer {
  background: var(--teal);
  color: rgba(255, 255, 255, .9);
  padding: 54px 0 60px;
  text-align: center;
  font-size: 14px;
}

.site-footer a { color: #fff; }
.site-footer__discl { opacity: .78; margin-top: 16px; font-size: 13px; }

/* ── Mobile ──────────────────────────────────────────────────────────
   Squarespace swaps to a burger at 900px, drops the logo to 30px and
   paints the open menu in lavender. Same here.                        */

@media (max-width: 900px) {
  :root { --header-h: 74px; }

  .site-header__inner {
    grid-template-columns: auto 1fr;
    padding: 12px 20px;
    min-height: var(--header-h);
  }

  .site-logo img { height: 30px; }
  .site-logo__text { font-size: 15px; max-width: 200px; }

  .nav-toggle {
    display: block;
    justify-self: end;
    background: none;
    border: 0;
    padding: 8px;
    cursor: pointer;
    color: var(--ink);
  }

  .site-nav,
  .site-cta {
    display: none;
  }

  .site-header.is-open .site-nav {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 22px;
    grid-column: 1 / -1;
    background: var(--lav);
    margin: 12px -20px -12px;
    padding: 34px 20px 40px;
  }

  .site-header.is-open .site-nav a { color: #fff; font-size: 21px; }

  .site-header.is-open .site-cta {
    display: block;
    justify-self: center;
    grid-column: 1 / -1;
    background: var(--lav);
    color: #fff;
    width: calc(100% + 40px);
    margin: -12px -20px 0;
    padding: 0 20px 38px;
    text-align: center;
    font-size: 21px;
  }

  .hero { padding: 60px 0 84px; }
  .events { grid-template-columns: 1fr; gap: 22px; }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
  .card:hover { transform: none; }
}

/* ── Event detail + RSVP sheet ────────────────────────────────────────
   A native <dialog>, so focus trapping, Esc and page inertness come from
   the platform rather than from JS that has to be maintained.          */

.sheet {
  border: 0;
  border-radius: 12px;
  padding: 0;
  width: min(620px, calc(100vw - 32px));
  max-height: min(88vh, 900px);
  color: var(--ink);
  box-shadow: 0 24px 70px rgba(79, 46, 107, .28);
  /* hidden, not visible: with overflow visible the close button hung
     outside the rounded corner as a detached circle, which read as a
     rendering fault rather than a control. */
  overflow: hidden;
}

.sheet::backdrop { background: rgba(24, 12, 34, .55); }

.sheet__body { overflow-y: auto; max-height: min(88vh, 900px); border-radius: 12px; }

/* Inside the sheet, over the artwork. Translucent white so it stays
   legible on a dark flyer without punching a hole in it. */
.sheet__close {
  position: absolute;
  top: 12px;
  right: 12px;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  border: 0;
  background: rgba(255, 255, 255, .88);
  box-shadow: 0 1px 6px rgba(24, 12, 34, .28);
  color: var(--ink);
  font-size: 20px;
  line-height: 1;
  cursor: pointer;
  z-index: 3;
}

.sheet__close:hover { background: #fff; }

.sheet__media { background: #f3f0f6; }
.sheet__media img { width: 100%; display: block; max-height: 34vh; object-fit: contain; }

.sheet__main { padding: 24px 28px 30px; }

.sheet__when {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 13px;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--teal);
}

.sheet h2 {
  font-family: Montserrat, Roboto, sans-serif;
  font-size: 26px;
  line-height: 1.25;
  margin: 6px 0 4px;
}

.sheet__subtitle { font-size: 16px; color: var(--ink-soft); font-style: italic; margin: 0 0 10px; }
.sheet__where { font-size: 15px; color: var(--ink-soft); margin: 0 0 14px; }
.sheet__desc { font-size: 15.5px; margin: 0 0 20px; }

/* A private address isn't a missing field — it's a promise about what
   happens after you RSVP, so it reads as reassurance, not an error. */
.sheet__private {
  background: #f6f2fa;
  border-left: 3px solid var(--lav);
  padding: 11px 14px;
  font-size: 14px;
  border-radius: 0 6px 6px 0;
  margin: 0 0 20px;
}

.rsvp { border-top: 1px solid var(--rule); padding-top: 22px; }
.rsvp h3 { font-family: Montserrat, Roboto, sans-serif; font-size: 18px; margin: 0 0 4px; }
.rsvp__hint { font-size: 14px; color: var(--ink-soft); margin: 0 0 16px; }

.rsvp__grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.rsvp__grid .full { grid-column: 1 / -1; }

.field label {
  display: block;
  font-size: 13px;
  letter-spacing: .04em;
  text-transform: uppercase;
  color: var(--ink-soft);
  margin-bottom: 5px;
}

.field input,
.field select {
  width: 100%;
  font: inherit;
  font-size: 15px;
  padding: 10px 12px;
  border: 1px solid var(--rule);
  border-radius: 7px;
  background: #fff;
  color: var(--ink);
}

.field input:focus,
.field select:focus { outline: 2px solid var(--teal); outline-offset: 1px; border-color: var(--teal); }

/* Overrides .field label above: consent text is prose, not a field label.
   Uppercasing it made the TCPA disclosure shout and hurt its legibility,
   which is the opposite of what a consent notice is for. */
.field label.check {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  font-size: 14px;
  line-height: 1.45;
  text-transform: none;
  letter-spacing: normal;
  margin-bottom: 0;
  cursor: pointer;
}
.check input { margin-top: 2px; flex: none; width: 17px; height: 17px; accent-color: var(--teal); }
.check span { color: var(--ink-soft); }

.rsvp__submit {
  font: inherit;
  font-size: 16px;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 13px 30px;
  cursor: pointer;
  margin-top: 20px;
}

.rsvp__submit:hover:not(:disabled) { background: var(--teal-dark); }
.rsvp__submit:disabled { opacity: .6; cursor: default; }

.rsvp__err { color: #a8202b; font-size: 14px; margin-top: 12px; min-height: 20px; }

.rsvp__done { text-align: center; padding: 26px 10px; }
.rsvp__done h3 { font-size: 21px; margin: 0 0 8px; }
.rsvp__done p { color: var(--ink-soft); font-size: 15px; margin: 0 auto; max-width: 42ch; }

.card { cursor: pointer; }

@media (max-width: 640px) {
  .rsvp__grid { grid-template-columns: 1fr; }
  .sheet__main { padding: 20px 18px 24px; }
  .sheet__close { top: 6px; right: 6px; }
}

/* ── Standing (ongoing) series ────────────────────────────────────────
   A pinned band above the grid rather than a card in it. Canvassing is
   always open, so it must not compete with dated events for "which
   Saturday" attention, and it must not sink to the bottom of a long list
   once the full autumn schedule is published. */

/* Two-up on wide screens. There are four of these now, and stacked full
   width they filled the viewport on their own — the dated events, which
   are what most visitors came for, started below the fold. */
.standing {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(440px, 1fr));
  gap: 16px;
  margin: 26px 0 0;
  padding: 0;
  list-style: none;
}

.standing__item {
  display: flex;
  gap: 18px;
  align-items: center;
  background: #eef5f6;
  border: 1px solid #cfe3e5;
  border-radius: 10px;
  padding: 18px 20px;
  cursor: pointer;
  transition: border-color .18s ease;
}

.standing__item:hover { border-color: var(--teal); }

.standing__text { flex: 1; min-width: 0; }

.standing__eyebrow {
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-size: 12px;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--teal);
  margin-bottom: 4px;
}

.standing__item h2 {
  font-family: Montserrat, Roboto, sans-serif;
  font-size: 19px;
  margin: 0 0 5px;
}

/* Three lines is enough to say what it is; the sheet carries the rest. */
.standing__item p {
  margin: 0;
  font-size: 14.5px;
  color: var(--ink-soft);
  display: -webkit-box;
  -webkit-line-clamp: 3;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.standing__cta {
  flex: none;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 10px 20px;
  font: inherit;
  font-size: 14px;
  white-space: nowrap;
  cursor: pointer;
}

.standing__cta:hover { background: var(--teal-dark); }

@media (max-width: 640px) {
  .standing__item { flex-direction: column; align-items: stretch; gap: 14px; }
  .standing__cta { width: 100%; }
}


/* ── Sheet: the RSVP is below the fold ────────────────────────────────
   The flyer plus the description push the form out of view, and a modal
   gives no scrollbar hint until you try. A sticky bar states that the
   sign-up exists and takes you to it; it retires once the form is on
   screen, so it never competes with the thing it points at.           */

.sheet__jump {
  position: sticky;
  bottom: 0;
  margin-top: -1px;
  padding: 26px 24px 18px;
  text-align: center;
  /* The fade makes clipped content read as scrollable rather than cut. */
  background: linear-gradient(to bottom, rgba(255, 255, 255, 0), #fff 42%);
  pointer-events: none;
}

.sheet__jump[hidden] { display: none !important; }

.sheet__jump button {
  pointer-events: auto;
  font: inherit;
  font-size: 15px;
  background: var(--teal);
  color: #fff;
  border: 0;
  border-radius: 999px;
  padding: 12px 28px;
  cursor: pointer;
  box-shadow: 0 3px 14px rgba(18, 102, 115, .32);
}

.sheet__jump button:hover { background: var(--teal-dark); }

/* Give the form room to breathe once you arrive at it. */
.rsvp { scroll-margin-top: 12px; }

/* ── Sheet: condensed title bar ───────────────────────────────────────
   Once the flyer and heading scroll away, the form below loses its
   context — you are filling in a name with no reminder of what for. */

.sheet__bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  z-index: 2;
  padding: 13px 56px 13px 24px;
  background: rgba(255, 255, 255, .95);
  backdrop-filter: blur(6px);
  border-bottom: 1px solid var(--rule);
  border-radius: 12px 12px 0 0;
  font-family: Montserrat, Roboto, sans-serif;
  font-weight: 600;
  font-size: 15px;
  line-height: 1.3;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  opacity: 0;
  transform: translateY(-6px);
  pointer-events: none;
  transition: opacity .18s ease, transform .18s ease;
}

.sheet__bar.is-shown { opacity: 1; transform: none; }

.sheet__bar small {
  display: block;
  font-family: "Roboto Condensed", Arial, sans-serif;
  font-weight: 400;
  font-size: 12px;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--teal);
}

/* ── Add to calendar ─────────────────────────────────────────────── */

.sheet__actions { display: flex; flex-wrap: wrap; gap: 10px; margin: 0 0 20px; }

.sheet__actions button,
.sheet__actions a {
  font: inherit;
  font-size: 14px;
  text-decoration: none;
  background: #fff;
  color: var(--ink);
  border: 1px solid var(--rule);
  border-radius: 999px;
  padding: 8px 16px;
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.sheet__actions button:hover,
.sheet__actions a:hover { border-color: var(--teal); color: var(--teal); }

/* ── Lightbox ────────────────────────────────────────────────────── */

.lightbox {
  border: 0;
  background: none;
  padding: 0;
  max-width: 96vw;
  max-height: 94vh;
  overflow: visible;
}

.lightbox::backdrop { background: rgba(18, 10, 26, .88); }

/* Width is set in JS so a small source still enlarges; the maxes here
   are only a guard for the moment before that runs. */
.lightbox img {
  display: block;
  max-width: 96vw;
  max-height: 94vh;
  border-radius: 8px;
}

.lightbox .sheet__close { top: 10px; right: 10px; }

.sheet__media { cursor: zoom-in; }

/* Prefilled fields are still the visitor's to change; a quiet tint says
   "we remembered this" without implying it is locked. */
.field input.is-remembered { background: #faf8fc; }

/* Series artwork belongs on the standing card, where it describes the
   series as a whole. It is deliberately not inherited by dated
   occurrences: these flyers carry their own address and dates in the
   image, so cascading one onto a session held somewhere else contradicts
   the card it sits on. */
.standing__thumb {
  flex: none;
  width: 72px;
  height: 72px;
  border-radius: 8px;
  overflow: hidden;
  background: #dfeced;
}

.standing__thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }

@media (max-width: 640px) {
  .standing__thumb { width: 56px; height: 56px; }
}
