/* ==========================================================================
   urb-front.css — front page only: flagship hero, tagline, events scroller,
   news band, about split, partners. Owner: the design reviewer. 2026-08-16.
   ========================================================================== */

/* ---- hero -------------------------------------------------------------------
   MOVED OUT in v0.6.1. The whole .urb-hero block now lives in
   urb-components.css. Reason (measured, not guessed): page.php, single.php and
   single-urb_event.php all call urb_page_hero_bg() and emit .urb-hero__bg with
   a real featured-image URL — but this sheet only loads on the front page, so
   on every one of those pages the span rendered display:inline at 0×0 and the
   photo never appeared. Hero is a COMPONENT, not a front-page ornament.
   ---------------------------------------------------------------------------- */

/* ---- tagline band ---------------------------------------------------------- */
.urb-tagline { padding: 72px 0; }
.urb-tagline__text {
  font-size: clamp(20px, 2.8vw, 30px);
  font-weight: 700;
  line-height: 1.35;
  max-width: 30ch;
  margin: 0;
}

/* ---- featured events — the purple scroller band ---------------------------- */
/* FULL-BLEED (Arnas, 2026-08-16): the scroller escapes the wrap and runs
   edge to edge; the first card still aligns with the wrap's content edge.
   100vw minus scrollbar is clipped by html{overflow-x:clip} (urb-fixes). */
.urb-events .urb-scroller {
  margin-top: 6px;
  margin-left: calc(50% - 50vw);
  margin-right: calc(50% - 50vw);
  /* the safe-area inset joins the max() so the first card never slides under
     the notch once viewport-fit=cover is on (v0.7.7) */
  padding-left: max(28px, env(safe-area-inset-left), calc(50vw - var(--urb-wrap) / 2 + 28px));
  padding-right: max(28px, env(safe-area-inset-right), calc(50vw - var(--urb-wrap) / 2 + 28px));
  /* snap positions ignore container padding — scroll-padding re-aligns the
     first card to the wrap edge (measured: without it, snap eats the inset) */
  scroll-padding-left: max(28px, env(safe-area-inset-left), calc(50vw - var(--urb-wrap) / 2 + 28px));
  scroll-padding-right: max(28px, env(safe-area-inset-right), calc(50vw - var(--urb-wrap) / 2 + 28px));
  grid-auto-columns: min(420px, 84vw); /* bigger cards */
  /* on the purple band the scrollbar has to be white-ink, or it reads as a
     black bar the OS drew across the composition (Arnas, 2026-08-16) */
  scrollbar-color: rgba(255, 255, 255, .55) rgba(255, 255, 255, .16);
}
.urb-events .urb-scroller::-webkit-scrollbar-track { background: rgba(255, 255, 255, .16); }
.urb-events .urb-scroller::-webkit-scrollbar-thumb { background: rgba(255, 255, 255, .55); }
.urb-events .urb-scroller::-webkit-scrollbar-thumb:hover { background: rgba(255, 255, 255, .8); }
/* v0.6.1: these all carry body.theme--urb now — the component layer's own
   inset rules gained the prefix (scar #1), so a bare (0,2,0) here would lose
   to a (0,2,1) there and the front cards would silently drop to the 20px
   inset. Keep the prefix on anything that sets margin/colour on a/h3/p. */
.urb-events .urb-card { background: #fff; color: var(--urb-ink); }
body.theme--urb .urb-events .urb-card__title { font-size: 21px; margin: 10px 24px 10px; }
body.theme--urb .urb-events .urb-card > .urb-meta { padding: 22px 24px 0; font-size: 12.5px; }
body.theme--urb .urb-events .urb-card__excerpt { font-size: 15px; margin: 0 24px 20px; }

/* the tag stamps and the ghost CTA are CARD-level treatments
   (urb-components.css); the front band only widens their inset to match the
   bigger cards. Event cards no longer emit .urb-arrow-link at all as of
   v0.6.2 — the rule below is kept for any card in this band that still does. */
body.theme--urb .urb-events .urb-card__tags { padding: 22px 24px 0; }
body.theme--urb .urb-events .urb-card__cta,
body.theme--urb .urb-events .urb-card .urb-arrow-link { margin: auto 24px 24px; }

/* ---- news band ------------------------------------------------------------- */
/* auto-FIT, not auto-fill: with only two posts published the tracks stretch
   and the band reads full, instead of two narrow cards marooned beside empty
   columns. The 360px floor still caps the row at three on a 1264px wrap. */
.urb-news__grid {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 360px), 1fr));
  gap: 26px;
}

/* ---- about split ----------------------------------------------------------- */
.urb-about .urb-whisper { color: var(--urb-grey); }

/* ---- partners --------------------------------------------------------------
   MOVED OUT in v0.6.9 → urb-components.css. Same reasoning as the hero move in
   v0.6.1: a partners strip is a component, and the moment it appears on any
   page other than the front (an /apie/ page, a sponsor page) this sheet is not
   loaded and the grid renders as unstyled images. Fixed before it bit. */

/* ---- responsive ------------------------------------------------------------ */
@media (max-width: 640px) {
  .urb-band { padding: var(--urb-s-section-m) 0; }
  .urb-tagline { padding: 48px 0; }
  .urb-hero__content { padding-top: 60px; padding-bottom: 60px; }
  /* match the wrap's 20px phone padding */
  .urb-events .urb-scroller {
    padding-left: max(20px, env(safe-area-inset-left));
    padding-right: max(20px, env(safe-area-inset-right));
    scroll-padding-left: max(20px, env(safe-area-inset-left));
    scroll-padding-right: max(20px, env(safe-area-inset-right));
  }
}
