/* The home page: the Next event hero, the Upcoming events and merch rows, the Membership pitch, Links, and the restyled rich text,
   email signup, contact form and slideshow. Builds on ui.css (tokens, buttons, pills, rows, cards).
   Mobile first; wider layouts from 750px and 990px.

   Sections: 1 page and spacing . 2 Next event hero . 3 horizontal rows . 4 membership pitch and links . 5 rich text, signup and contact form .
             6 slideshow */

/* ---------- 1. Page and spacing ---------- */
.hm { padding-bottom: 8px; }
.hm-section { margin: 0; padding: 32px 0 0; }
.hm-section--hero { padding-top: 0; }
.hm-section--last { padding-bottom: 40px; }
.hm-wrap { max-width: 130rem; margin: 0 auto; padding: 0 var(--ui-gutter); }
.hm-wrap--narrow { max-width: 72rem; }
.hm-head { margin: 0 0 12px; }
@media screen and (min-width: 750px) {
  .hm-section { padding-top: 48px; }
  .hm-wrap { padding: 0 32px; }
}

/* ---------- 2. Next event hero ---------- */
.hm-hero { max-width: 130rem; margin: 0 auto; }
.hm-hero__poster { position: relative; display: block; width: 100%; aspect-ratio: 4 / 5; max-height: 56vh; overflow: hidden; background: var(--ui-surface); }
.hm-hero__poster--empty { aspect-ratio: 16 / 9; }
.hm-hero__poster img { display: block; width: 100%; height: 100%; object-fit: cover; }
.hm-hero__poster::after { content: ""; position: absolute; inset: auto 0 0 0; height: 45%; background: linear-gradient(to bottom, rgba(0, 0, 0, 0), var(--ui-ink)); pointer-events: none; }
.hm-hero__body { position: relative; margin-top: -48px; padding: 0 var(--ui-gutter); }
.hm-eyebrow { margin: 0 0 6px; font-family: var(--ui-font-mono); font-size: 1.2rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; color: var(--ui-signal); }
.hm-hero__title { margin: 0 0 10px; font-size: 2.8rem; line-height: 1.15; overflow-wrap: anywhere; }
.hm-hero__title a { display: inline-block; padding: 6px 0; color: inherit; text-decoration: none; }   /* 44px to tap */
.hm-hero__title a:hover { text-decoration: underline; text-underline-offset: 5px; }
.hm-hero__when, .hm-hero__doors, .hm-hero__venue { margin: 0; font-family: var(--ui-font-mono); line-height: 1.4; }
.hm-hero__when { font-size: 1.7rem; font-weight: 700; color: var(--ui-signal); }
.hm-hero__doors { font-size: 1.4rem; font-weight: 600; color: var(--ui-signal); }
.hm-hero__venue { margin-top: 6px; font-size: 1.5rem; font-weight: 600; color: var(--ui-text); overflow-wrap: anywhere; }
.hm-hero__pills { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0 0; }
.hm-hero__btn { display: flex; width: 100%; margin-top: 18px; }
@media screen and (min-width: 990px) {
  .hm-hero { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: center; padding: 32px 32px 0; }
  .hm-hero__poster { aspect-ratio: 4 / 5; max-height: 72vh; border-radius: var(--ui-radius); }
  .hm-hero__poster::after { display: none; }
  .hm-hero__body { margin: 0; padding: 0; }
  .hm-hero__title { font-size: 4.2rem; }
  .hm-hero__when { font-size: 2rem; }
  .hm-hero__doors { font-size: 1.6rem; }
  .hm-hero__venue { font-size: 1.7rem; }
  .hm-hero__btn { display: inline-flex; width: auto; min-width: 280px; margin-top: 26px; }
}

/* the fallback when there is no upcoming event: the brand, in one block */
.hm-brand { max-width: 56rem; margin: 0 auto; padding: 56px var(--ui-gutter) 24px; text-align: center; }
.hm-brand__logo { display: block; width: 120px; height: 120px; margin: 0 auto 8px; object-fit: contain; }
.hm-brand__name { margin: 0; font-family: var(--ui-font-mono); font-weight: 700; font-size: 2.4rem; line-height: 1.2; }
.hm-brand__text { margin: 12px auto 0; max-width: 46ch; color: var(--ui-muted); font-size: 1.6rem; }
.hm-brand__actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 24px; }
.hm-brand__actions .ui-btn { flex: 1 1 140px; max-width: 220px; }

/* ---------- 3. Horizontal rows (events and merch) ---------- */
.hm-scroll {
  display: flex; gap: 12px; margin: 0; padding: 2px var(--ui-gutter) 8px; list-style: none;
  overflow-x: auto; scroll-snap-type: x proximity; scroll-padding-left: var(--ui-gutter); scrollbar-width: none; -webkit-overflow-scrolling: touch;
}
.hm-scroll::-webkit-scrollbar { display: none; }
.hm-scroll__item { flex: none; width: 64vw; max-width: 260px; min-width: 0; scroll-snap-align: start; }
.hm-scroll--products .hm-scroll__item { width: 44vw; max-width: 220px; }
@media screen and (min-width: 750px) {
  .hm-scroll { gap: 16px; padding-left: max(32px, calc((100% - 130rem) / 2 + 32px)); padding-right: 32px; scroll-padding-left: max(32px, calc((100% - 130rem) / 2 + 32px)); }
}
/* Desktop: the rows stop scrolling and sit in the same centred column as their headings, as grids of full rows only, so nothing runs
   past the "View all" / "See all" link. Merch shows up to two full rows of 4 (a part-filled last row is left to "View all");
   events show one row of 4. */
@media screen and (min-width: 990px) {
  .hm-scroll {
    display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px 16px;
    max-width: 130rem; margin: 0 auto; padding: 2px 32px 8px; overflow: visible; scroll-snap-type: none;
  }
  .hm-scroll__item, .hm-scroll--products .hm-scroll__item { width: auto; max-width: none; }
  .hm-scroll:not(.hm-scroll--products) > .hm-scroll__item:nth-child(n+5),
  .hm-scroll--products > .hm-scroll__item:nth-child(n+9),
  .hm-scroll--products > .hm-scroll__item:nth-child(4n+5):nth-last-child(-n+3),
  .hm-scroll--products > .hm-scroll__item:nth-child(4n+5):nth-last-child(-n+3) ~ .hm-scroll__item { display: none; }
}

.hm-ev { display: block; color: var(--ui-text); text-decoration: none; -webkit-tap-highlight-color: transparent; }
.hm-ev__media { position: relative; display: block; aspect-ratio: 4 / 5; overflow: hidden; border-radius: var(--ui-radius-sm); background: var(--ui-surface); }
.hm-ev__media img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; display: block; }
.hm-ev__date {
  position: absolute; top: 8px; left: 8px; display: flex; flex-direction: column; align-items: center; min-width: 46px; padding: 5px 8px 4px;
  background: rgba(0, 0, 0, 0.82); border-radius: 8px; font-family: var(--ui-font-mono); line-height: 1.1;
}
.hm-ev__day { font-size: 1.9rem; font-weight: 700; }
.hm-ev__month { margin-top: 2px; font-size: 1.1rem; font-weight: 700; letter-spacing: 0.06em; text-transform: uppercase; color: var(--ui-signal); }
.hm-ev__title {
  display: -webkit-box; -webkit-box-orient: vertical; -webkit-line-clamp: 2; overflow: hidden; margin-top: 10px;
  font-family: var(--ui-font-mono); font-weight: 700; font-size: 1.5rem; line-height: 1.3; overflow-wrap: anywhere;
}
.hm-ev:hover .hm-ev__title { text-decoration: underline; text-underline-offset: 4px; }
.hm-ev__venue { display: block; margin-top: 2px; font-size: 1.4rem; color: var(--ui-muted); overflow-wrap: anywhere; }
.hm-ev__price { display: block; margin-top: 4px; font-family: var(--ui-font-mono); font-weight: 600; font-size: 1.4rem; }
.hm-ev__pills { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; }
.hm-ev:focus-visible { outline: 2px solid var(--ui-signal); outline-offset: 4px; border-radius: var(--ui-radius-sm); }

/* ---------- 4. Membership pitch and links ---------- */
.hm-pitch { padding: 22px 20px; }
.hm-pitch__title { margin: 0 0 6px; font-size: 2.2rem; line-height: 1.2; }
.hm-pitch__text { margin: 0; max-width: 52ch; color: var(--ui-muted); font-size: 1.6rem; }
.hm-pitch__btn { margin-top: 16px; }
@media screen and (min-width: 750px) { .hm-pitch { display: grid; grid-template-columns: 1fr auto; column-gap: 32px; align-items: center; padding: 28px 32px; }
  .hm-pitch__title, .hm-pitch__text { grid-column: 1; } .hm-pitch__btn { grid-column: 2; grid-row: 1 / span 2; margin: 0; } }
@media screen and (max-width: 749px) { .hm-pitch__btn { display: flex; width: 100%; } }
.hm-links .ui-row__title { font-size: 1.7rem; }

/* ---------- 5. Rich text, email signup and contact form ---------- */
.hm-rich__title, .hm-form__title, .hm-news__title { margin: 0 0 12px; font-size: 2.4rem; line-height: 1.2; overflow-wrap: anywhere; }
.hm-rich__text { color: rgba(242, 242, 242, 0.88); font-size: 1.6rem; overflow-wrap: anywhere; }
.hm-rich__text p { margin: 0 0 1em; }
.hm-rich__text a { color: var(--ui-text); }
.hm-rich__btn { margin-top: 8px; }
.hm-news { padding: 22px 20px; }
.hm-news__title { font-size: 2.2rem; }
.hm-news__text { margin: 0 0 14px; color: var(--ui-muted); font-size: 1.5rem; }
.hm-news__text p { margin: 0; }
.hm-news__row { display: flex; gap: 8px; }
.hm-news__row .ui-input { flex: 1; min-width: 0; }
.hm-news__row .ui-btn { flex: none; padding: 0 18px; }
.hm-news__form .ui-error, .hm-news__form .ui-notice { margin: 10px 0 0; }
.hm-form .ui-notice { margin-bottom: 16px; }
.hm-form__area { min-height: 140px; resize: vertical; }
.hm-form .ui-btn { margin-top: 4px; }

/* ---------- 6. Slideshow (Dawn's script, drawn in the kit's look) ---------- */
.hm .slideshow.banner { background: var(--ui-ink); }
.hm .slideshow__text.banner__box { background: transparent; box-shadow: none; padding-left: var(--ui-gutter); padding-right: var(--ui-gutter); }
.hm .banner__heading { font-family: var(--ui-font-mono); }
.hm .slideshow__controls { background: var(--ui-ink); border-top: 1px solid var(--ui-line); color: var(--ui-text); }
.hm .slideshow__controls .slider-button { color: var(--ui-text); }
.hm .slider-counter { font-family: var(--ui-font-mono); color: var(--ui-muted); }
.hm .slideshow .banner__buttons .ui-btn { margin-top: 12px; }
