/* ==========================================================================
   Meta Church VR: events.html extras
   Loaded AFTER styles.css, on events.html only. Tokens only: no raw colours,
   no new font sizes. Everything here is prefixed .ev- (or scoped to
   .page-hero--events) so it cannot leak into another page.
   ========================================================================== */

/* ---------- 1. Hero: copy on the left, the bulletin countdown card on the right ----------
   The card is the shared .countdown component. Here it hangs off the bottom of the
   page hero and overlaps the schedule section, as it does on the homepage. */
.page-hero--events {
  --ph-fade: clamp(8rem, 30vw, 12rem);     /* a little more photo above the copy on phones */
  z-index: var(--z-raised);                /* lets the card overlap the next section */
}
.ev-hero { display: grid; gap: var(--sp-6); }
.ev-hero__copy { min-width: 0; }
.ev-hero .countdown {
  width: 100%;
  max-width: 30rem;
  justify-self: start;
  margin-bottom: -5rem;
  animation: rise var(--dur-4) var(--ease) .3s both;     /* keyframes live in styles.css; reduced motion is handled there */
}

@media (min-width: 56.25em) {
  /* styles.css caps every direct child of the hero container at 38rem: lift that for the grid, keep it for the copy */
  .page-hero__body > .container > .ev-hero { max-width: none; }
  .ev-hero {
    grid-template-columns: minmax(0, 1fr) minmax(19rem, 22rem);
    align-items: end;
    gap: clamp(2rem, 5vw, 4rem);
  }
  .ev-hero__copy > * { max-width: 38rem; }
  .ev-hero .countdown {
    justify-self: stretch;
    margin-bottom: -7rem;
    padding: 1.75rem 1.75rem 1.5rem;
  }
}

/* ---------- 2. The full week ---------- */
.ev-week { padding-top: calc(var(--section-pad) + 3.5rem); }     /* room for the hero card that overlaps this section */
.ev-week__grid { display: grid; gap: clamp(2.5rem, 5vw, 5rem); }
.ev-week__intro, .ev-week__list { min-width: 0; }
.ev-week__intro .lede { margin-top: 1.4rem; }
.ev-week__find { margin-top: var(--sp-6); }
.ev-week__find .small { margin-top: .9rem; max-width: 32em; }
.ev-inline-link {
  font-weight: 700;
  color: var(--link);
  text-decoration-thickness: 2px;
  text-underline-offset: .22em;
  text-decoration-color: var(--link-line);
  white-space: nowrap;
}
.ev-inline-link:hover { text-decoration-color: var(--link-hover-line); }

.ev-jump { margin-top: var(--sp-6); }
.ev-jump ul { display: flex; flex-wrap: wrap; gap: .6rem; margin: 0; }

@media (min-width: 62em) {
  .ev-week__grid { grid-template-columns: minmax(0, 5fr) minmax(0, 7fr); align-items: start; }
  .ev-week__intro { position: sticky; top: calc(var(--header-h) + 2rem); }
}
@media (min-width: 62em) and (max-height: 46em) {
  .ev-week__intro { position: static; }                /* un-stick when the column cannot fit the viewport */
}

/* ---------- 3. Sunday lead feature: wide photo, then two editorial columns ---------- */
.ev-lead__photo img { object-position: var(--focus-pos, 50% 50%); box-shadow: var(--shadow-lift); }
@media (min-width: 48em) {
  .ev-lead__photo img { aspect-ratio: 21 / 9; }
}
.ev-lead__grid { display: grid; gap: clamp(2rem, 4vw, 4rem); margin-top: clamp(2rem, 4vw, 3.5rem); }
.ev-lead__text, .ev-lead__side { min-width: 0; }
.ev-lead__text .lede { margin-top: 1.5rem; }
.ev-lead__body { margin-top: 1rem; max-width: 38em; color: var(--fg-soft); }
.ev-side__title { margin-bottom: 1rem; }
.ev-facts { margin-top: 1.5rem; }
@media (min-width: 62em) {
  .ev-lead__grid { grid-template-columns: minmax(0, 6fr) minmax(0, 5fr); align-items: start; }
}

/* ---------- 4. "When" tickets: one per gathering, live-aware via [data-event] ---------- */
.ev-when { display: grid; gap: .75rem; margin: 0; }
.split__text > .ev-when, .split__text > .ev-host, .split__text > .ev-mini { margin-top: 1.75rem; }
.split__text > .ev-host + .lede { margin-top: 1.25rem; }
.ev-when__item {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  column-gap: .9rem;
  align-items: start;
  padding: 1rem 1.15rem;
  border: 1.5px solid var(--rule);
  border-radius: var(--r-md);
  background: var(--ev-when-bg, var(--paper));
  transition: border-color var(--dur-2) var(--ease);
}
.section--ember .ev-when__item, .section--evergreen .ev-when__item { --ev-when-bg: var(--tint); border-color: var(--rule-strong); }
.ev-when__item.is-next, .ev-when__item.is-live { border-color: var(--accent-2); }
.ev-when__icon {
  display: grid; place-items: center;
  width: 2.5rem; height: 2.5rem;
  border-radius: 50%;
  background: var(--tint);
  color: var(--accent);
}
.ev-when__body { min-width: 0; }
.ev-when__time {
  display: flex; flex-wrap: wrap; align-items: center;
  gap: .35rem .7rem;
  min-height: 2.5rem;
  font-family: var(--font-serif);
  font-size: var(--fs-600);
  line-height: 1.2;
  letter-spacing: -.01em;
  color: var(--fg);
}
.ev-when__note, .ev-when__local { font-size: var(--fs-300); line-height: 1.5; color: var(--fg-soft); }
.ev-when__local { margin-top: .15rem; }
/* on the warm dark band the badge switches to gold so it stays an autumn accent */
.section--ember .ev-when .week__badge,
.section--ember [data-event].is-live .week__badge { background: var(--gold); color: var(--gold-ink); }

/* ---------- 5. Host line ---------- */
.ev-host { display: flex; align-items: center; gap: .85rem; }
.ev-host__photo {
  flex: none;
  width: 3.25rem; height: 3.25rem;
  border-radius: 50%;
  overflow: hidden;
  background: var(--sand);
  box-shadow: 0 0 0 2px var(--accent-2);
}
.ev-host__photo img { width: 100%; height: 100%; object-fit: cover; object-position: 52% 30%; }
.ev-host .mono { width: 3.25rem; height: 3.25rem; }
.ev-host__text { display: grid; line-height: 1.3; }
.ev-host__label { font-size: var(--fs-100); font-weight: 700; letter-spacing: .12em; text-transform: uppercase; color: var(--fg-soft); }
.ev-host__text strong { font-family: var(--font-serif); font-weight: 400; font-size: var(--fs-500); color: var(--fg); }

/* ---------- 6. Mini cross-link (Bible Island) ---------- */
.ev-mini {
  display: grid;
  gap: 1rem 1.25rem;
  padding: 1rem;
  border-radius: var(--r-md);
  background: var(--cream);
  box-shadow: var(--shadow-soft);
}
.ev-mini__img {
  width: 100%;
  height: auto;
  aspect-ratio: 16 / 9;
  object-fit: cover;
  object-position: var(--focus-pos, 50% 50%);
  border-radius: calc(var(--r-md) - .35rem);
}
.ev-mini__text { min-width: 0; }
.ev-mini__text h3 { font-size: var(--fs-500); line-height: 1.25; }
.ev-mini__text p { margin-top: .4rem; font-size: var(--fs-300); line-height: 1.55; color: var(--fg-soft); }
.ev-mini__text .text-link { margin-top: .25rem; }
@media (min-width: 30em) {
  .ev-mini { grid-template-columns: 9.5rem minmax(0, 1fr); align-items: center; }
  .ev-mini__img { aspect-ratio: 1 / 1; }
}

/* ---------- 7. Friday + Thursday tweaks ---------- */
.ev-friday {
  /* ember band with a faint firelight wash in the corner nearest the campfire photo.
     color-mix keeps this on the --gold token; browsers without it simply show the plain ember band. */
  background-image: radial-gradient(48rem 26rem at 0% 100%, color-mix(in srgb, var(--gold) 12%, transparent), transparent 62%);
}
.ev-thursday .split__media { width: 100%; max-width: 27rem; justify-self: center; }

.ev-when__note { margin: .35rem 0 0; font-size: var(--fs-200); color: var(--ink-soft); }
