/* ==========================================================================
   Events, 2026 v2 design (preview: /events/?inner=v2).
   Markup: template-parts/v2/events.php. Builds on assets/css/v2/base.css.
   Hero, Intro, Upcoming rows (picture and text swap sides row by row),
   Previously, and the page's two popups ("I want to come", the poster).
   ========================================================================== */

/* --- Hero: a little taller than the shared one ------------------------------ */
.v2-events__hero { height: 64vh; min-height: 520px; }
.v2-events__hero .v2-hero__eyebrow { font-size: 11.5px; }

/* --- Intro ------------------------------------------------------------------ */
.v2-events__intro { max-width: 900px; margin: 0 auto; padding: clamp(70px, 9vw, 110px) var(--v2-pad) clamp(40px, 5vw, 60px); text-align: center; }
.v2-events__lede { font-family: var(--serif); font-size: clamp(20px, 1.9vw, 24px); line-height: 1.7; color: #43464A; margin: 0 0 26px; }
.v2-events__note { font-weight: 300; font-size: 14px; line-height: 1.6; color: var(--grey); }
.v2-events .v2-events__note a, .v2-events .v2-events__empty a { color: inherit; text-decoration: underline; text-underline-offset: 3px; text-decoration-color: rgba(35, 40, 46, .4); }
.v2-events .v2-events__note a:hover, .v2-events .v2-events__empty a:hover { color: var(--ink); text-decoration-color: currentColor; }

/* --- Upcoming --------------------------------------------------------------- */
.v2-events__group { padding-bottom: clamp(70px, 8vw, 100px); }
.v2-events__head { display: flex; align-items: baseline; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.v2-events__heading { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(32px, 3.2vw, 44px); line-height: 1.1; color: var(--ink); margin: 0; }

.v2-events__row {
  display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 420px), 1fr));
  gap: clamp(30px, 5vw, 80px); align-items: center;
  padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid rgba(35, 40, 46, .14);
}
.v2-events__pic { order: 1; aspect-ratio: 4 / 3; overflow: hidden; background: #D9D5CC; }
.v2-events__pic img { width: 100%; height: 100%; max-width: none; object-fit: cover; transition: transform 1.4s ease; }
.v2-events__row:hover .v2-events__pic img { transform: scale(1.04); }
.v2-events__main { order: 2; display: grid; grid-template-columns: auto 1fr; gap: clamp(22px, 3vw, 40px); align-items: start; min-width: 0; }
.v2-events__row--flip .v2-events__pic { order: 2; }
.v2-events__row--flip .v2-events__main { order: 1; }

.v2-events__date { min-width: 72px; padding-right: clamp(18px, 2.5vw, 32px); border-right: 1px solid rgba(35, 40, 46, .18); text-align: center; }
.v2-events__date time { display: block; }
.v2-events__day { display: block; font-family: var(--serif); font-size: 58px; line-height: .9; color: var(--ink); }
.v2-events__month, .v2-events__year { display: block; font-size: 11px; letter-spacing: 2.5px; text-transform: uppercase; }
.v2-events__month { color: var(--ink); margin-top: 8px; }
.v2-events__year { color: var(--grey); margin-top: 4px; }

.v2-events__text { min-width: 0; }
.v2-events__meta { margin-bottom: 14px; line-height: 1.6; }
.v2-events__title { font-family: var(--serif); font-weight: 400; font-size: clamp(28px, 2.6vw, 38px); line-height: 1.1; color: var(--ink); margin: 0 0 16px; }
.v2-events__body { font-weight: 300; font-size: 15.5px; line-height: 1.85; color: var(--body); margin: 0 0 24px; }
.v2-events__empty { font-weight: 300; font-size: 16.5px; line-height: 1.85; color: var(--body); padding: clamp(40px, 5vw, 64px) 0; border-top: 1px solid rgba(35, 40, 46, .14); max-width: 720px; }

.v2-events__actions { display: flex; gap: 12px; align-items: stretch; max-width: 520px; }
.v2-events__btn, .v2 a.v2-events__btn {
  flex: 1 1 0; min-width: 0; display: block; text-align: center; white-space: nowrap; cursor: pointer; text-decoration: none;
  font-family: var(--sans); font-weight: 500; font-size: 11px; line-height: 1.3; letter-spacing: 2.5px; text-transform: uppercase;
  padding: 15px 18px; border: 1px solid var(--ink); border-radius: 0; background: transparent; color: var(--ink);
  transition: background-color .2s ease, color .2s ease, border-color .2s ease;
}
.v2 a.v2-events__btn:hover, .v2 a.v2-events__btn:focus-visible { background: var(--ink); color: var(--paper); }
.v2 a.v2-events__btn--fill { background: var(--ink); color: var(--paper); }
.v2 a.v2-events__btn--fill:hover, .v2 a.v2-events__btn--fill:focus-visible { background: var(--ink-soft); border-color: var(--ink-soft); color: var(--paper); }
.v2 a.v2-events__btn--small { display: inline-block; flex: none; padding: 12px 18px; }

/* --- Previously: the same fixtures, quieter and without pictures ------------ */
.v2-events__group--past .v2-events__heading { font-size: clamp(26px, 2.4vw, 32px); color: var(--grey); }
.v2-events__past {
  display: grid; grid-template-columns: 150px 1fr; gap: clamp(20px, 3vw, 40px); align-items: baseline;
  padding: 28px 0; border-top: 1px solid rgba(35, 40, 46, .14);
}
.v2-events__past-title { font-family: var(--serif); font-weight: 400; font-size: clamp(22px, 2vw, 26px); line-height: 1.2; color: var(--ink-soft); margin: 0 0 8px; }
.v2-events__past .v2-events__meta { margin-bottom: 10px; }
.v2-events__past .v2-events__body { font-size: 14.5px; margin: 0; max-width: 720px; color: var(--grey); }
.v2-events__past .v2-events__btn { margin-top: 16px; }

/* --- Popups ------------------------------------------------------------------
   Both are the site's own <dialog class="rmodal"> (register.css), restyled.
   The two-class selectors out-rank .rmodal and its phone rule (a full-screen
   sheet below 920px), which these two do not want. */

.rmodal.v2-events-attend {
  width: min(560px, calc(100vw - 48px)); max-width: none; height: fit-content; max-height: calc(100vh - 48px); margin: auto;
  border: 0; border-radius: 0; background: #F4F1E9; color: #23282E; overflow: auto;
}
.rmodal.v2-events-attend::backdrop { background: rgba(24, 27, 30, .6); }
.v2-events-attend__inner { position: relative; padding: clamp(34px, 4vw, 48px) clamp(26px, 4vw, 44px); font-family: var(--sans); }
.v2-events-attend__close {
  position: absolute; top: 10px; right: 14px; background: none; border: 0; padding: 6px; cursor: pointer;
  font-size: 24px; line-height: 1; color: #23282E;
}
.v2-events-attend__close:hover { color: #6B6E72; }
.v2-events-attend .v2-eyebrow { margin-bottom: 9px; }
.v2-events-attend__title { font-family: var(--serif); font-style: italic; font-weight: 400; font-size: clamp(32px, 3.4vw, 40px); line-height: 1.05; color: #23282E; margin: 0 0 12px; }
.v2-events-attend__intro { font-weight: 300; font-size: 14.5px; line-height: 1.75; color: #55585C; margin: 0 0 28px; }
.v2-events-attend__choices { display: grid; gap: 12px; }
.v2 a.v2-events-attend__choice {
  display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 22px 24px;
  border: 1px solid #23282E; color: #23282E; text-decoration: none; transition: background-color .2s ease;
}
.v2 a.v2-events-attend__choice:hover, .v2 a.v2-events-attend__choice:focus-visible { background: #E9E6DF; }
.v2-events-attend__choice strong { display: block; font-weight: 500; font-size: 11.5px; letter-spacing: 2.5px; text-transform: uppercase; margin-bottom: 6px; }
.v2-events-attend__choice em { display: block; font-style: normal; font-weight: 300; font-size: 13.5px; line-height: 1.5; color: #55585C; }
.v2-events-attend__choice .v2-chev { width: 9px; height: 9px; flex: 0 0 auto; margin-right: 4px; }
.v2 a.v2-events-attend__choice--fill { background: #23282E; color: #F4F1E9; }
.v2 a.v2-events-attend__choice--fill:hover, .v2 a.v2-events-attend__choice--fill:focus-visible { background: #4A4F55; border-color: #4A4F55; }
.v2-events-attend__choice--fill em { color: rgba(244, 241, 233, .75); }

/* The poster: no panel, just the picture on a dark ground with two buttons under it. */
.rmodal.v2-events-poster {
  width: fit-content; max-width: min(92vw, 760px); height: fit-content; max-height: none; margin: auto;
  border: 0; border-radius: 0; background: transparent; color: #F4F1E9; overflow: visible; box-shadow: none;
}
.rmodal.v2-events-poster::backdrop { background: rgba(24, 27, 30, .82); }
.v2-events-poster__inner { position: relative; display: flex; flex-direction: column; align-items: center; }
.v2-events-poster__img { display: block; max-width: 100%; max-height: calc(100vh - 140px); object-fit: contain; background: #D9D5CC; box-shadow: 0 20px 60px rgba(0, 0, 0, .4); }
.v2-events-poster__close {
  position: absolute; top: -14px; right: -14px; z-index: 2; width: 40px; height: 40px; border-radius: 50%;
  display: flex; align-items: center; justify-content: center; padding: 0 0 2px; border: 0; cursor: pointer;
  background: #F4F1E9; color: #23282E; font-size: 22px; line-height: 1;
}
.v2-events-poster__close:hover { background: #D9D5CC; }
.v2-events-poster__actions { display: flex; gap: 12px; margin-top: 18px; }
.v2 .v2-events-poster__actions a.v2-events__btn { flex: none; padding: 14px 24px; }
.v2 a.v2-events__btn--paper { background: #F4F1E9; border-color: #F4F1E9; color: #23282E; }
.v2 a.v2-events__btn--paper:hover, .v2 a.v2-events__btn--paper:focus-visible { background: #D9D5CC; border-color: #D9D5CC; color: #23282E; }
.v2 a.v2-events__btn--light { border-color: #F4F1E9; color: #F4F1E9; }
.v2 a.v2-events__btn--light:hover, .v2 a.v2-events__btn--light:focus-visible { background: #F4F1E9; color: #23282E; }
.v2-events-attend__close:focus-visible, .v2-events-poster__close:focus-visible { outline: 1px solid currentColor; outline-offset: 2px; }
.v2-events-poster__close:focus-visible { outline-color: #F4F1E9; }

/* --- Narrow screens --------------------------------------------------------- */
@media (max-width: 900px) {
  .v2-events__hero { height: 56vh; min-height: 440px; }
  /* One column: the picture always comes first. */
  .v2-events__row { grid-template-columns: 1fr; gap: 26px; }
  .v2-events__row--flip .v2-events__pic { order: 1; }
  .v2-events__row--flip .v2-events__main { order: 2; }
  .v2-events__row:hover .v2-events__pic img { transform: none; }
}
@media (max-width: 560px) {
  .v2-events__main { gap: 18px; }
  .v2-events__date { min-width: 58px; padding-right: 16px; }
  .v2-events__day { font-size: 46px; }
  .v2-events__actions { flex-direction: column; max-width: none; }
  .v2-events__btn, .v2 a.v2-events__btn { white-space: normal; }
  .v2-events__past { grid-template-columns: 1fr; gap: 8px; }
  .rmodal.v2-events-attend { width: calc(100vw - 32px); max-height: calc(100vh - 32px); }
  .v2-events-poster__close { top: -10px; right: -6px; }
  .v2-events-poster__actions { flex-wrap: wrap; justify-content: center; }
  .v2 .v2-events-poster__actions a.v2-events__btn { padding: 14px 18px; }
}
