/* Page styles for templates/events.html and event.html (docs/systems/events.md).
   Loaded after css/pages/petition.css, which supplies the dark hero, the form
   panel (.petition-form-panel, .field-*), .petition-hero-label, .share-btn and
   the share block. An event is its FLYER: the page shows the picture and the
   RSVP form; the details appear after the RSVP. */

/* ── /events: the flyer wall ───────────────────────────────────────────── */
/* The dark hero band (same bones as the petitions index; its stylesheet is
   NOT loaded here, so the rules live in this file — 2026-10-23 fix). */
.events-hero {
  background: var(--navy-dark);
  padding: 140px 0 48px;
  position: relative;
  overflow: hidden;
}
.events-hero::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse 80% 60% at 60% 40%, rgba(192,57,43,0.14) 0%, transparent 70%);
  pointer-events: none;
}
.events-hero .container { position: relative; }
.events-hero h1 {
  font-family: var(--font-sans);
  font-size: clamp(32px, 4.5vw, 52px);
  font-weight: 800;
  line-height: 1.08;
  letter-spacing: -0.025em;
  color: var(--white);
  margin: 0;
}
.events-wall { background: var(--cream); padding: 56px 0 96px; }
.events-grid {
  list-style: none; padding: 0; margin: 0;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 32px;
}
.events-card { position: relative; }
.events-card-link {
  display: block; position: relative;
  border-radius: var(--radius-lg);
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 4px 32px rgba(0,0,0,0.10);
  transition: transform .15s, box-shadow .15s;
}
.events-card-link:hover, .events-card-link:focus-visible { transform: translateY(-3px); box-shadow: 0 12px 40px rgba(0,0,0,0.16); }
.events-card-link:focus-visible { outline: 3px solid var(--red); outline-offset: 3px; }
.events-card-flyer { display: block; width: 100%; height: auto; }
.events-card-btn {
  position: absolute; left: 50%; bottom: 20px; transform: translateX(-50%);
  box-shadow: 0 8px 24px rgba(0,0,0,0.3);
  white-space: nowrap;
}
.events-card-cancelled .events-card-flyer { filter: grayscale(1) brightness(0.8); }
.events-empty { text-align: center; padding: 24px 0 8px; }
.events-empty h2 { font-family: var(--font-sans); font-size: 26px; font-weight: 800; margin-bottom: 12px; }
.events-empty p { margin-bottom: 20px; }
.events-card-ribbon {
  position: absolute; top: 18px; left: -40px; transform: rotate(-30deg);
  background: var(--red); color: var(--white);
  font: 800 12px/1 var(--font-sans); letter-spacing: 0.14em; text-transform: uppercase;
  padding: 10px 60px;
}
@media (max-width: 720px) {
  .events-hero { padding: 110px 0 36px; }
  .events-wall { padding: 36px 0 72px; }
  .events-grid { gap: 24px; }
}

/* ── /events/<slug>: flyer + RSVP panel ────────────────────────────────── */
.event-hero .container { align-items: start; }
.event-flyer-wrap { position: relative; }
.event-flyer {
  display: block; width: 100%; height: auto;
  border-radius: var(--radius-lg);
  box-shadow: 0 24px 80px rgba(0,0,0,0.35);
  background: var(--white);
}
.event-flyer-links { font-size: 14px; color: rgba(255,255,255,0.75); margin: 18px 0 0; }
.event-flyer-links a { color: var(--white); text-decoration: underline; text-underline-offset: 3px; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0;
}

/* The form panel: a select looks like the inputs; the opt-in sits under the fields. */
.petition-form-panel select.field-input { appearance: auto; }
.petition-form-panel textarea.field-input { resize: vertical; min-height: 56px; }
.event-optin .check-label { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; line-height: 1.5; color: var(--gray-600); cursor: pointer; }
.event-optin input { margin-top: 3px; flex: none; }

/* After the RSVP: the details. */
.event-success-icon {
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--navy); color: var(--white);
  display: flex; align-items: center; justify-content: center;
  margin: 0 0 18px;
}
.event-facts { margin: 22px 0 0; display: grid; gap: 14px; }
.event-fact dt {
  font-size: 11px; font-weight: 800; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 4px;
}
.event-fact dd { margin: 0; font-size: 15px; line-height: 1.55; color: var(--gray-900); }
.event-fact dd a { color: var(--navy); text-decoration: underline; text-underline-offset: 3px; }
.event-calendar { display: flex; flex-wrap: wrap; gap: 8px; margin: 22px 0 0; }
#rsvp-done .petition-share { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--gray-200); }
#rsvp-full h2 { margin-bottom: 10px; }
