/* ==========================================================================
   home.css — the home page.

   The hero, the story split, the proof points and the bands. Loaded only
   here, because nothing else on the site uses any of it.
   ========================================================================== */

/* -- The hero --------------------------------------------------------------
   Typographic on forest, with or without a photograph. The words never sit
   on the photograph: with one, a phone shows it as a band across the top
   with the words below, and a wide screen gives it the right-hand side,
   fading into the green behind the words. */

.zb-hero {
  position: relative;
  display: grid;
  align-items: center;
  min-height: min(78vh, 40rem);
  background: var(--zb-forest);
  color: var(--zb-cream);
  overflow: hidden;
}

/* A quiet texture so the block is not a flat slab of colour. */
.zb-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background-image:
    radial-gradient(ellipse at 20% 0%, rgb(94 143 78 / 0.28), transparent 60%),
    radial-gradient(ellipse at 90% 90%, rgb(196 100 47 / 0.18), transparent 55%);
  pointer-events: none;
}

.zb-hero__inner { position: relative; padding-block: clamp(3rem, 10vw, 7rem); }

.zb-hero__eyebrow { color: var(--zb-sage); }

.zb-hero__title {
  color: var(--zb-cream);
  margin-bottom: var(--zb-space-3);
  max-width: 14ch;
}

.zb-hero__tagline {
  font-family: var(--zb-font-display);
  font-style: italic;
  font-size: clamp(1.25rem, 1rem + 1.1vw, 1.875rem);
  color: var(--zb-sage);
  max-width: 24ch;
  margin-bottom: var(--zb-space-6);
}

.zb-hero__actions { display: flex; flex-wrap: wrap; gap: var(--zb-space-3); }

/* "Next at the ranch", bottom-left of the hero, with the countdown. */
.zb-hero__next {
  display: inline-flex;
  flex-direction: column;
  gap: 0.15rem;
  margin-top: var(--zb-space-7);
  padding: var(--zb-space-4) var(--zb-space-5);
  background: color-mix(in srgb, var(--zb-forest) 90%, transparent);
  border: 1.5px solid color-mix(in srgb, var(--zb-sage) 45%, transparent);
  border-radius: var(--zb-radius);
  color: var(--zb-cream);
  text-decoration: none;
  max-width: 24rem;
}

.zb-hero__next:hover,
.zb-hero__next:focus-visible {
  color: var(--zb-cream);
  border-color: var(--zb-sage);
  background: var(--zb-pine);
}

.zb-hero__next .zb-eyebrow { color: var(--zb-gold); margin: 0; }
.zb-hero__when { color: var(--zb-sage); font-size: var(--zb-size-small); }

/* -- The hero's photograph -------------------------------------------------
   Only when one has been chosen (.zb-hero--photo, HeroPhoto). Each fade is
   forest into nothing, so the photograph melts into the green the words
   sit on instead of stopping at a hard edge. */

.zb-hero--photo {
  align-content: start;
  min-height: 0;
}

.zb-hero__media {
  position: relative;
  aspect-ratio: 16 / 10;
  max-height: 55vh;
  overflow: hidden;
  background: var(--zb-pine);
}

.zb-hero__media picture { display: block; height: 100%; }

.zb-hero__img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.zb-hero__media::after {
  content: "";
  position: absolute;
  inset: auto 0 0;
  height: 40%;
  background: linear-gradient(to top, var(--zb-forest), transparent);
  pointer-events: none;
}

.zb-hero--photo .zb-hero__inner { padding-block: var(--zb-space-5) clamp(3rem, 10vw, 7rem); }

/* Wide enough to stand side by side. --zb-hero-text is the words' column,
   wide enough that "The Zoiboyz" stays on one line at every size the
   heading takes; the photograph has everything to the right of it, out
   to the edge of the screen. */
@media (min-width: 62em) {
  .zb-hero--photo {
    --zb-hero-text: 30rem;            /* "The Zoiboyz" is 456px at the heading's largest */
    align-content: center;
    min-height: min(78vh, 40rem);
  }

  .zb-hero--photo .zb-hero__inner { padding-block: clamp(3rem, 10vw, 7rem); }
  .zb-hero--photo .zb-hero__inner > * { max-width: var(--zb-hero-text); }

  .zb-hero--photo .zb-hero__media {
    position: absolute;
    inset: 0 0 0 calc(max(0px, (100% - var(--zb-max-width)) / 2) + var(--zb-gutter)
                      + var(--zb-hero-text) + var(--zb-space-6));
    aspect-ratio: auto;
    max-height: none;
  }

  .zb-hero__media::after {
    inset: 0 auto 0 0;
    width: 35%;
    height: auto;
    background: linear-gradient(to right, var(--zb-forest), transparent);
  }
}

/* -- The story and its proof points ---------------------------------------- */

.zb-split { display: grid; gap: var(--zb-space-6); }

@media (min-width: 62em) {
  .zb-split { grid-template-columns: minmax(0, 3fr) minmax(0, 2fr); gap: var(--zb-space-8); align-items: start; }
}

.zb-proof { list-style: none; margin: 0; padding: 0; }

.zb-proof li {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: var(--zb-space-4);
  align-items: baseline;
  padding-block: var(--zb-space-4);
  border-top: 1.5px solid var(--zb-rule);
}

.zb-proof li:last-child { border-bottom: 1.5px solid var(--zb-rule); }

.zb-proof__num {
  font-family: var(--zb-font-display);
  font-size: clamp(1.75rem, 1.4rem + 1.4vw, 2.6rem);
  font-weight: 700;
  line-height: 1;
  color: var(--zb-accent);              /* russet; lifted in dark mode (was 2.9:1) */
  font-variant-numeric: lining-nums;
}

.zb-proof span { color: var(--zb-text-muted); }

/* -- Section headings with links on the right ------------------------------ */

.zb-sectionhead {
  display: flex;
  flex-wrap: wrap;
  align-items: baseline;
  justify-content: space-between;
  gap: var(--zb-space-3) var(--zb-space-5);
  margin-bottom: var(--zb-space-5);
}

.zb-sectionhead h2 { margin: 0; }
.zb-sectionhead__links { display: flex; flex-wrap: wrap; gap: var(--zb-space-4); margin: 0; }

/* -- Cards without a photograph yet ---------------------------------------- */

.zb-card__nophoto {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  background: var(--zb-bg-tint);
  color: var(--zb-meadow);
}

.zb-card--wide { max-width: 44rem; }

/* -- The ZASSC band -------------------------------------------------------- */

.zb-zassc-band {
  background: var(--zb-pine);
  color: var(--zb-cream);
}

.zb-zassc-band .zb-container {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--zb-space-4);
}

.zb-zassc-band p { margin: 0; max-width: 46ch; }

/* -- What is coming up ------------------------------------------------------
   The next events as cards (partials/event-card.php): three across on a wide
   screen, one under another on a phone. White, so they stand off the band.
   The calendar keeps its list. */

.zb-event-cards {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(min(100%, 21rem), 1fr));
  gap: var(--zb-space-4);
}

.zb-event-card {
  position: relative;
  display: flex;
  gap: var(--zb-space-4);
  align-items: flex-start;
  padding: var(--zb-space-4);
  background: var(--zb-surface-raised);
  border: 1px solid var(--zb-rule);
  border-radius: var(--zb-radius);
  box-shadow: var(--zb-shadow-1);
  transition: transform var(--zb-mid) var(--zb-ease), box-shadow var(--zb-mid) var(--zb-ease);
}

/* The whole card is its title's link, so a thumb can land anywhere on it. */
.zb-event-card__title a::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
}

@media (hover: hover) and (prefers-reduced-motion: no-preference) {
  .zb-event-card:hover { transform: translateY(-2px); box-shadow: var(--zb-shadow-2); }
}
.zb-event-card:hover .zb-event-card__title a { text-decoration: underline; }

/* At the ranch: an edge in the red dog's russet. */
.zb-event-card--ranch { border-left: 4px solid var(--zb-russet); }

.zb-event-card--cancelled .zb-event-card__title a { text-decoration: line-through; }
.zb-event-card--cancelled .zb-leaf { opacity: 0.55; }

/* The date, as a leaf from a calendar, in the sport's colour (the class it
   borrows from the sport's chip sets --chip-color). White on each of the
   sports' colours is 5:1 or better. */
.zb-leaf {
  --leaf: var(--chip-color, var(--zb-forest));
  flex: none;
  display: flex;
  flex-direction: column;
  align-items: center;
  width: 5rem;
  overflow: hidden;
  border: 1.5px solid var(--leaf);
  border-radius: var(--zb-radius-sm);
  background: var(--zb-surface);
  line-height: 1.1;
  text-align: center;
}

.zb-leaf__month {
  align-self: stretch;
  padding-block: 0.25rem;
  background: var(--leaf);
  color: #FFFFFF;
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.zb-leaf__day {
  padding-top: 0.375rem;
  font-family: var(--zb-font-display);
  font-size: 1.75rem;
  font-weight: 700;
  color: var(--zb-heading);
  white-space: nowrap;
}
/* Two dates, "21–22", in the room one had. */
.zb-leaf--range .zb-leaf__day { padding-top: 0.5rem; font-size: 1.375rem; }

.zb-leaf__weekday {
  padding-block: 0.125rem 0.375rem;
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--zb-text-muted);
}

/* In the dark the sports' colours are lifted to read on the dark page, so
   the month is written in the page's dark colour on them instead. */
@media (prefers-color-scheme: dark) {
  :root:not([data-bs-theme="light"]) .zb-leaf__month { color: var(--zb-bg); }
}
:root[data-bs-theme="dark"] .zb-leaf__month { color: var(--zb-bg); }

.zb-event-card__main { min-width: 0; }

.zb-event-card__title {
  margin: 0.125rem 0 0.125rem;
  font-size: 1.1875rem;
  line-height: 1.25;
}
.zb-event-card__title a { color: var(--zb-heading); text-decoration: none; }

.zb-event-card__when {
  margin: 0 0 var(--zb-space-2);
  font-size: var(--zb-size-small);
  color: var(--zb-text-muted);
}

.zb-event-card__chips {
  display: flex;
  flex-wrap: wrap;
  gap: 0.375rem;
  margin: 0 0 var(--zb-space-2);
}

.zb-event-card__where {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.25rem var(--zb-space-3);
  margin: 0;
  font-size: var(--zb-size-small);
  color: var(--zb-text-muted);
}
.zb-event-card__where .zb-icon { margin-right: 0.25rem; }
.zb-event-card__where strong { color: var(--zb-accent); }

/* -- The closing call to action -------------------------------------------- */

.zb-cta { text-align: center; }
.zb-cta .zb-lede { margin-inline: auto; margin-bottom: var(--zb-space-5); }
