/* Jason Moccia — Speaking & events (/speaking).
   Loads after styles.css and insights.css, borrowing the insights page rail and
   head. Every value resolves to an existing token: the date is a record, so it
   speaks in Martian Mono; the day numeral is the one place the display face
   carries a figure, so a reader can scan the calendar by number alone. */

.speaking-page .page-head h1 { font-size: clamp(48px, 7.4vw, 124px); }
.speaking-page .page-head .page-lead { max-width: 40ch; }

/* ═══ Sections ══════════════════════════════════════════════════════════ */

.ev-section { padding: var(--sp-section-tight) 0 0; }
.ev-section + .ev-section { padding-top: var(--sp-section); }
/* Heading and its count share a baseline: the count is a fact about the
   heading, so it sits beside it rather than above it. */
.ev-section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  gap: 8px 20px;
  margin: 0 0 28px;
}
.ev-section-head h2 { margin: 0; font-size: var(--fs-display-2); }
.ev-section-head .t-record { color: var(--text-3); font-variant-numeric: tabular-nums; }

.ev-list { margin: 0; padding: 0; list-style: none; }
.ev-empty { display: none; margin: 0; padding: 40px 0; border-top: 1px solid var(--line); color: var(--text-3); }
#upcoming:not(:has(.ev)) .ev-empty { display: block; }

/* ═══ One event ═════════════════════════════════════════════════════════ */

.ev {
  display: grid;
  grid-template-columns: 150px minmax(0, 1fr) minmax(0, 340px);
  gap: 20px 56px;
  padding: 44px 0;
  border-top: 1px solid var(--line);
}

.ev-date {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-self: start;
}
.ev-mon { color: var(--accent-text); }
.ev-day {
  font-family: var(--font-display);
  font-weight: 800;
  font-stretch: 84%;
  font-size: clamp(60px, 5.4vw, 92px);
  line-height: .8;
  letter-spacing: -.03em;
  font-variant-numeric: tabular-nums;
  color: var(--ink);
}
.ev-dow { color: var(--text-3); }

.ev-body { display: flex; flex-direction: column; gap: 16px; min-width: 0; }
.ev-meta {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 14px;
  margin: 0;
  color: var(--text-3);
}
.ev-kind {
  padding: .34em .72em;
  border-radius: 999px;
  background: rgba(123, 138, 255, .14);
  color: var(--accent-text);
}
.ev-next {
  display: none;
  padding: .34em .72em;
  border-radius: 999px;
  background: var(--accent-deep);
  color: #FFFFFF;
}
.ev-title {
  margin: 0;
  max-width: 24ch;
  font-size: clamp(26px, 2.35vw, 40px);
  line-height: .98;
}
.ev-desc {
  margin: 0;
  max-width: var(--measure);
  font-size: var(--fs-body-sm);
  line-height: 1.6;
  color: var(--text-2);
  text-wrap: pretty;
}
/* Right column: the photo when there is one, then the way in. It starts on
   the title's line so a reader's eye runs date → title → action. */
.ev-aside {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 22px;
  min-width: 0;
  padding-top: 38px;
}
.ev-actions { margin: 0; }
.ev-link i { font-style: normal; transition: transform .25s cubic-bezier(.22, .61, .36, 1); }
.ev-link:hover i { transform: translate(3px, -3px); }
.ev-link[href^="/"]:hover i { transform: translateX(5px); }

.ev-media { margin: 0; width: 100%; }
.ev-media img {
  display: block;
  width: 100%;
  height: auto;
  border-radius: 6px;
}

/* Next up — the nearest date takes the indigo-washed surface the homepage
   saves for its closing panel and the insights page for its lead card. */
.ev--next {
  margin: 0 0 22px;
  padding: 44px 42px;
  background: #1A1B22;
  border: 1px solid #33364C;
  border-radius: 8px;
}
.ev--next + .ev { border-top: 0; }
.ev--next .ev-next { display: inline-block; }
.ev--next .ev-day { color: var(--accent-text); }

/* Past dates step back: same grammar, a notch quieter, and the action drops
   from a pill to the record-voice text link the insights cards end on. */
.ev-list--past .ev-day { color: var(--text-2); }
.ev-list--past .ev-mon { color: var(--text-3); }
.ev-list--past .ev-link {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 0;
  border: 0;
  background: none;
  font-family: var(--font-record);
  font-size: var(--fs-record);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: var(--track-record);
  color: var(--text-2);
  text-decoration: underline;
  text-decoration-color: var(--line-strong);
  text-underline-offset: .45em;
}
.ev-list--past .ev-link:hover { color: var(--accent-text); text-decoration-color: currentColor; }

/* ═══ Close ═════════════════════════════════════════════════════════════ */

.ev-close {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px 48px;
  margin: var(--sp-section) 0 var(--sp-section);
  padding: 56px 48px;
  background: #1A1B22;
  border: 1px solid #33364C;
  border-radius: 8px;
}
.ev-close h2 { margin: 0; max-width: 18ch; font-size: var(--fs-display-2); }
.ev-close p { margin: 14px 0 0; max-width: 44ch; color: var(--text-2); font-size: var(--fs-body-sm); }

/* ═══ Narrow ════════════════════════════════════════════════════════════ */

@media (max-width: 900px) {
  .ev { grid-template-columns: 96px minmax(0, 1fr); gap: 18px 24px; padding: 36px 0; }
  .ev-aside { grid-column: 2; padding-top: 0; }
  .ev-media { max-width: 420px; }
  .ev--next { padding: 32px 24px; }
  .ev-close { padding: 40px 28px; }
}
@media (max-width: 560px) {
  .ev { grid-template-columns: minmax(0, 1fr); }
  .ev-aside { grid-column: 1; }
  /* One line on a phone: month, day and weekday read as a dateline. */
  .ev-date { flex-direction: row; align-items: baseline; gap: 12px; }
  .ev-day { font-size: 48px; }
  .ev--next { padding: 28px 20px; }
}
