/* ============================================================================
   DMA PUBLIC — EVENTS screen CSS (event-specific; NOT shared).
   An Event card ≠ a News/Blog card → its own partial + styles. Style N tokens only.
   ============================================================================ */

/* ---------- FILTER BAR ---------- */
.evt-filterbar { display: flex; justify-content: center; margin-bottom: 32px; }

/* NOTE: the reusable .evt-card* rules moved to public/components.css (the shared layer) because
   _EventCard is reused on the Home page too — page-scoped events.css isn't loaded there. */

/* ---------- EVENT DETAIL ---------- */
.evt-hero { position: relative; color: #fff; min-height: 60vh; display: grid; align-items: flex-end; overflow: hidden; }
.evt-hero__img { position: absolute; inset: 0; background-size: cover; background-position: center; background-image: var(--evt-hero-img); background-color: var(--brand-navy-900); }
.evt-hero__img::after { content: ""; position: absolute; inset: 0;
  background: linear-gradient(0deg, rgba(12,12,52,.94) 12%, rgba(12,12,52,.55) 60%, rgba(12,12,52,.35)); }
.evt-hero__inner { position: relative; z-index: 2; padding: calc(var(--pub-header-h) + 40px) 0 44px; width: 100%; }
.evt-hero__tag { display: inline-block; background: var(--brand-red); color: #fff; font-size: 0.7rem; font-weight: 600;
  letter-spacing: .1em; text-transform: uppercase; padding: 5px 12px; border-radius: 3px; margin-bottom: 16px; }
.evt-hero h1 { font-size: clamp(2rem, 4.4vw, 3.2rem); font-weight: 600; letter-spacing: -0.02em; max-width: 20ch; }
.evt-hero__meta { display: flex; flex-wrap: wrap; gap: 22px; margin-top: 20px; }
.evt-hero__meta div { display: flex; align-items: center; gap: 8px; font-size: 0.95rem; color: #e7e8f5; }
.evt-hero__meta svg { width: 17px; height: 17px; stroke: #ffb3ac; fill: none; stroke-width: 2; }

.evt-lead { font-size: 1.2rem; line-height: 1.6; color: var(--pub-ink); font-weight: 500; margin-bottom: 22px; }
.evt-layout { display: grid; grid-template-columns: 1fr 330px; gap: 40px; padding: 56px 0; align-items: start; }
.evt-content :is(h2, h3) { margin: 26px 0 12px; }
.evt-content p { margin-bottom: 16px; color: var(--pub-ink); }
.evt-content > *:first-child { margin-top: 0; }

/* CSS fallback = simple top-sticky (accounts for the fixed header). When sticky-sidebar.js is
   active it adds .is-js-sticky and OWNS positioning via translateY (smart bottom-follow for a tall
   aside), so we neutralise the CSS stickiness to avoid double-offset. JS clears both on ≤900px. */
.evt-aside { position: sticky; top: calc(var(--pub-header-h, 72px) + 20px); display: flex; flex-direction: column; gap: 18px; }
.evt-aside.is-js-sticky { position: relative; top: 0; will-change: transform; }
/* Upward re-anchor glide (item 2): the JS adds .is-reanchoring only while scrolling UP so the panel's
   top slides back below the header smoothly instead of teleporting; the downward drift has no
   transition (exact per frame). Removed under reduced-motion so it snaps. */
.evt-aside.is-js-sticky.is-reanchoring { transition: transform 220ms ease-out; }
@media (prefers-reduced-motion: reduce) { .evt-aside.is-js-sticky.is-reanchoring { transition: none; } }
.evt-detailcard { border: 1px solid var(--pub-line); border-top: 3px solid var(--brand-navy); border-radius: 6px; padding: 22px; }
.evt-detailcard h3 { font-size: 1.05rem; font-weight: 600; margin-bottom: 14px; }
.evt-detailrow { display: flex; gap: 11px; padding: 10px 0; border-bottom: 1px solid var(--pub-line); font-size: 0.9rem; }
.evt-detailrow:last-of-type { border-bottom: 0; }
.evt-detailrow svg { width: 17px; height: 17px; stroke: var(--brand-navy); fill: none; stroke-width: 2; flex-shrink: 0; margin-top: 2px; }
.evt-detailrow .k { display: block; color: var(--pub-mut); font-size: 0.76rem; text-transform: uppercase; letter-spacing: .05em; }
.evt-detailrow .v { font-weight: 600; }
.evt-register { width: 100%; justify-content: center; margin-top: 4px; }
.evt-register-note { font-size: 0.76rem; color: var(--pub-mut); text-align: center; margin-top: 8px; }

/* speakers */
.evt-speakers { margin-top: 40px; }
.evt-speakers h2 { font-size: 1.4rem; font-weight: 600; margin-bottom: 20px; }
.evt-speakers__grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 22px; }
.evt-speaker { text-align: center; }
.evt-speaker img { width: 96px; height: 96px; border-radius: 50%; object-fit: cover; margin: 0 auto 12px; display: block; }
.evt-speaker__ph { width: 96px; height: 96px; border-radius: 50%; background: var(--pub-soft); display: grid; place-items: center; margin: 0 auto 12px; color: var(--pub-mut); }
.evt-speaker__ph svg { width: 34px; height: 34px; stroke: currentColor; fill: none; stroke-width: 1.6; }
.evt-speaker b { display: block; font-size: 0.98rem; }
.evt-speaker span { display: block; font-size: 0.84rem; color: var(--pub-mut); }

@media (max-width: 900px) {
  .evt-layout { grid-template-columns: 1fr; gap: 28px; }
  .evt-aside { position: static; }
}

/* ============================================================================
   EVENTS CALENDAR (in-house month grid + view toggle + mobile agenda)
   Style N tokens only; motion gated by prefers-reduced-motion.
   ============================================================================ */

/* toolbar holds the view toggle + (list-only) filter pills */
.evt-filterbar { flex-wrap: wrap; gap: 14px; }
.evt-viewtoggle a > svg { width: 15px; height: 15px; vertical-align: -2px; margin-right: 4px; stroke: currentColor; fill: none; stroke-width: 1.9; }

.evt-cal-wrap { margin-top: 4px; }

/* month navigation */
.evt-cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.evt-cal-title { font-size: 1.35rem; font-weight: 600; color: var(--pub-ink); margin: 0; text-align: center; flex: 1; }
.evt-cal-nav__right { display: flex; align-items: center; gap: 8px; }
.evt-cal-nav__btn,
.evt-cal-nav__today {
  display: inline-flex; align-items: center; gap: 4px;
  border: 1px solid var(--pub-line); border-radius: 999px; background: var(--pub-card);
  padding: 7px 14px; font-size: 0.86rem; font-weight: 600; color: var(--pub-accent-ink);
  text-decoration: none; transition: background .18s ease, border-color .18s ease;
}
.evt-cal-nav__btn:hover, .evt-cal-nav__today:hover { background: var(--brand-navy-tint); border-color: var(--pub-accent-ink); }
/* Edge of the event range: the month exists but there is nothing beyond it to visit. */
.evt-cal-nav__btn.is-disabled { opacity: .4; cursor: default; pointer-events: none; }
.evt-cal-nav__btn svg { width: 16px; height: 16px; stroke: currentColor; fill: none; stroke-width: 2; }

/* month grid */
/* Framed, rounded, shadowed container so the calendar reads as one themed card (clips the grid corners). */
.evt-cal-frame {
    border: 1px solid var(--pub-line);
    border-radius: 16px;
    overflow: hidden;
    background: var(--pub-card);
    box-shadow: 0 10px 28px rgba(26, 18, 8, .10);
}
/* V4 (.dma3d) interior: match the theme's saffron hard-offset card shadow. */
.dma3d .evt-cal-frame {
    border-color: color-mix(in srgb,var(--saffron) 22%,transparent);
    box-shadow: 5px 8px 0 color-mix(in srgb,var(--saffron) 12%,transparent), 5px 10px 30px color-mix(in srgb,var(--dark) 10%,transparent);
}
.evt-cal { width: 100%; border-collapse: collapse; table-layout: fixed; }
.evt-cal thead th { padding: 10px 8px; font-size: 0.72rem; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--pub-mut); text-align: left; background: var(--pub-soft); border-bottom: 1px solid var(--pub-line); }
/* V4 (.dma3d): weekday header cells mapped to the brand palette (green/saffron/gold/magenta). */
.dma3d .evt-cal thead th { color: #fff; border-bottom: 0; border-right: 1px solid rgba(255, 255, 255, .22); }
.dma3d .evt-cal thead th:last-child { border-right: 0; }
.dma3d .evt-cal thead th:nth-child(1) { background: var(--green); }
.dma3d .evt-cal thead th:nth-child(2) { background: var(--saffron); }
.dma3d .evt-cal thead th:nth-child(3) { background: var(--gold); color: #4a3410; }
.dma3d .evt-cal thead th:nth-child(4) { background: var(--magenta); }
.dma3d .evt-cal thead th:nth-child(5) { background: var(--green); }
.dma3d .evt-cal thead th:nth-child(6) { background: var(--saffron); }
.dma3d .evt-cal thead th:nth-child(7) { background: var(--gold); color: #4a3410; }
.evt-cal__cell { border: 1px solid var(--pub-line); vertical-align: top; height: 118px; padding: 6px; background: var(--pub-card); }
.evt-cal__cell.is-out { background: var(--pub-soft); }
.evt-cal__cell.is-out .evt-cal__num { color: var(--pub-mut); }
.evt-cal__cell.is-today { box-shadow: inset 0 0 0 2px var(--brand-navy); }
.evt-cal__num { display: inline-block; font-size: 0.82rem; font-weight: 700; color: var(--pub-ink); margin-bottom: 4px; }
.evt-cal__cell.is-today .evt-cal__num { background: var(--brand-navy); color: #fff; border-radius: 999px; min-width: 22px; height: 22px; line-height: 22px; text-align: center; padding: 0 5px; }

.evt-cal__events { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 3px; }
.evt-chip {
  display: block; text-decoration: none; border-radius: 5px; padding: 2px 6px;
  font-size: 0.74rem; line-height: 1.25; background: var(--brand-red-tint); color: var(--pub-red-ink);
  border-left: 3px solid var(--brand-red); overflow: hidden;
  transition: background .15s ease;
}
.evt-chip:hover { background: var(--brand-red); color: #fff; }
.evt-chip--cont { background: var(--brand-navy-tint); color: var(--pub-accent-ink); border-left-color: var(--pub-accent-ink); }
.evt-chip--cont:hover { background: var(--brand-navy); color: #fff; }
.evt-chip__t { font-weight: 700; margin-right: 4px; }
.evt-chip__title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.evt-cal__more { font-size: 0.72rem; color: var(--pub-mut); font-weight: 600; padding: 1px 6px; }

.evt-cal-empty { text-align: center; color: var(--pub-mut); margin-top: 18px; }

/* focus visibility (keyboard) */
.evt-chip:focus-visible, .evt-cal-nav__btn:focus-visible, .evt-cal-nav__today:focus-visible,
.evt-agenda a:focus-visible { outline: 3px solid var(--brand-navy); outline-offset: 2px; }

/* mobile agenda (hidden on desktop) */
.evt-agenda { display: none; }
.evt-agenda__day { display: flex; gap: 14px; padding: 14px 0; border-bottom: 1px solid var(--pub-line); }
.evt-agenda__date { flex: 0 0 44px; text-align: center; }
.evt-agenda__dow { display: block; font-size: 0.68rem; text-transform: uppercase; letter-spacing: .05em; color: var(--pub-mut); }
.evt-agenda__num { display: block; font-size: 1.5rem; font-weight: 600; color: var(--pub-accent-ink); line-height: 1.1; }
.evt-agenda__day.is-today .evt-agenda__num { color: var(--pub-red-ink); }
.evt-agenda__list { list-style: none; margin: 0; padding: 0; flex: 1; display: flex; flex-direction: column; gap: 10px; }
.evt-agenda__list a { text-decoration: none; display: block; }
.evt-agenda__title { display: block; font-weight: 700; color: var(--pub-ink); }
.evt-agenda__meta { display: block; font-size: 0.8rem; color: var(--pub-mut); }

@media (max-width: 640px) {
  .evt-cal { display: none; }        /* 7-col grid unreadable at 375px → agenda instead */
  .evt-agenda { display: block; }
  .evt-cal-title { font-size: 1.15rem; }
  .evt-cal-nav__lbl { display: none; }  /* arrows only on small screens */
}

@media (prefers-reduced-motion: reduce) {
  .evt-cal-nav__btn, .evt-cal-nav__today, .evt-chip { transition: none; }
}


/* ── Typed registration routes on the event page (5 Nov 2026) ─────────────────────────
   One route renders the usual single Register button; several render this list, because
   "Register" alone cannot tell a sponsor from a delegate. */
.v4-reglinks { display: grid; gap: 8px; }
.v4-reglinks__hd { font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase;
  color: var(--muted); }
/* .v4-btn sets its own flex-direction, so this needs the extra class to win. */
.v4-reglinks a.v4-reglinks__item { width: 100%; display: flex; flex-direction: column;
  align-items: center; justify-content: center; gap: 2px; text-align: center; line-height: 1.3;
  padding-top: 9px; padding-bottom: 9px; }
.v4-reglinks__item small { font-weight: 400; font-size: 11.5px; opacity: .85; }
