/* =========================================================
   STORM — YOUTH CHAMPIONSHIPS (SYC)
   -----------------------------------------------------------
   Loads on top of base-web-style.css + storm-programs.css.

   Base does most of it: .spi-section-padded/.spi-container for
   the shell, .spi-subnav for the jump nav, .spi-grid-3/-2 for
   the tiles and charities, .ui-card.has-action for every tile,
   .spi-card-product (+ .program-person) for the champions,
   .spi-scroll.is-aligned for their carousel, .spi-tag(.accent)
   for the status badges, .spi-stat-num/.spi-stat-caption for
   the charity totals and .spi-body-width for the calendar
   column. The hero comes from storm-programs.css.

   Events and champions still come from the SAME syc-data.js on
   the CDN that the legacy page used — untouched.

   What is left is the calendar row, which nothing in base does.
   ========================================================= */

/* ---------------------------------------------------------
   1. HERO
--------------------------------------------------------- */
/* The crest sits in the middle of the artwork and the banner holds
   nothing else, so it is a short band at every width. Height comes
   from base's .spi-banner knobs — all three, because base reads a
   different one above 1024, from 601-1024 and at 600 and below. */
.syc-hero {
  --spi-banner-h: 300px;
  --spi-banner-h-tablet: 300px;
  --spi-banner-h-mobile: 300px;
}

/* The intro carries the page title, so it does not also need a full
   section's worth of space above it. */
.syc-intro {
  padding-top: 48px;
}

/* ---------------------------------------------------------
   2. CTA ROWS
--------------------------------------------------------- */
.syc-cta-row {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 8px;
  margin-top: 24px;
}

/* ---------------------------------------------------------
   3. EVENT CARD (.syc-event) + TILE (.syc-tile)
   One card for both the three tiles and the calendar: date,
   name (+ Next Event in the calendar), venue, status, buttons. A
   tile is that same card led by its label (Next / Upcoming /
   Future Event) and venue photograph. Base caps a card image
   at 160px for a product cut-out; this one is the tile's artwork.
--------------------------------------------------------- */
/* `height: auto` is load-bearing: the script gives the img a 400px
   height attribute, which otherwise stands as its CSS height and
   overrides the aspect-ratio — the photos rendered 263x400 on a phone
   and 363x400 on desktop instead of 3:2. */
.syc-tile img {
  width: 100%;
  height: auto;
  aspect-ratio: 3 / 2;
  object-fit: cover;
  border-radius: var(--spi-radius-sm);
  background: var(--spi-gray-200);
  margin: 8px 0 16px;
}

/* `p.` is load-bearing: the store wraps every CMS page in .std, and
   its `.std p { margin: 1em 0 }` outranks a bare class — the date and
   venue were sitting 13px apart on the live site instead of 8 and 6. */
p.syc-event-date {
  margin: 0 0 8px;
}

p.syc-event-venue {
  margin: 6px 0 0;
}

/* In a .has-action card the tag is a flex item and would otherwise
   stretch into a full-width bar. */
.syc-event-status {
  align-self: flex-start;
  margin-top: 12px;
}

/* Base's has-action drops the buttons to the card's foot with an auto
   margin; the padding keeps them off the copy in the tallest card. */
.syc-event-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  padding-top: 16px;
}

/* ---------------------------------------------------------
   4. EVENT CALENDAR (.syc-calendar)
   Upcoming and Results are base .spi-toggle pills acting as a
   tablist; each panel is the season's events as a base
   .spi-grid-3 of .ui-cards. What is left here is the inside of
   a card — date, name, venue, status — and the season heading.
--------------------------------------------------------- */
.syc-calendar-tabs {
  margin-bottom: 8px;
}

.syc-calendar-panel:focus-visible {
  outline: 2px solid var(--spi-accent);
  outline-offset: 4px;
}

.syc-season {
  margin: 40px 0 16px;
}

.syc-season:first-of-type {
  margin-top: 24px;
}

.syc-calendar {
  list-style: none;
  padding: 0;
  margin: 0;
}

/* A calendar card holds four short lines and a button row inside a
   third of the container — base's 28px suits a paragraph, not this.
   Always a column, not only when .has-action makes it one: in block
   flow the tile label's margin collapsed into the photo's, so a tile
   without buttons sat its label 12px above the photo and one with
   buttons 20px. */
.syc-event {
  display: flex;
  flex-direction: column;
  padding: 20px;
}

/* An h3 on a tile, an h4 in the calendar — the line-height is set
   because the store theme gives h4 1.25em and h3 nothing. */
.syc-event-name {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 10px;
  margin: 0;
  font-family: var(--spi-font-display);
  font-size: 16px;
  font-weight: 700;
  line-height: 1.25;
  text-transform: uppercase;
  letter-spacing: 0.02em;
}

/* A smaller pill for a calendar row — a full-size .btn is sized for
   a section CTA and three of them would dominate the row.
   The !important is load-bearing, the same way it is in base: above
   1024px the store theme forces `.btn { padding: 16px 32px !important }`,
   which turned these into 128x54 pills on the live site. At 1024px and
   below base's own !important small-screen size (6px 14px / 10px)
   already applies and is smaller still, so this only claims desktop. */
.syc-btn-sm {
  margin: 0;
}

@media (min-width: 1025px) {
  .btn.syc-btn-sm {
    padding: 8px 16px !important;
    font-size: 12px !important;
  }
}

/* The next event leads the Upcoming tab visually. */
.syc-event.is-next-up {
  border-color: var(--spi-accent);
  box-shadow: 0 0 0 1px var(--spi-accent);
}

.syc-next-tag {
  letter-spacing: 0.06em;
}

/* ---------------------------------------------------------
   5. CHARITY TILE
   Base .ui-card.has-action + .spi-stat-num/.spi-stat-caption.
   Only the logo size and the rhythm around the figure are set.

   The legacy markup wrapped each tile in an <a> that also
   contained a <div class="btn default"> — a div dressed as a
   button, inside a link, so the "button" was not focusable and
   the whole tile was one giant link. It is now a normal card
   with one real <a class="btn"> at the end, which is what base
   .has-action is for.
--------------------------------------------------------- */
.syc-charities img {
  max-width: 220px;
  margin-bottom: 20px;
}

.syc-charities .spi-stat-num {
  font-size: 32px;
}

.syc-charities .spi-h3 {
  margin: 16px 0 8px;
}

.syc-charities .spi-body {
  margin: 0 0 20px;
}

/* ---------------------------------------------------------
   6. SUPPORTERS
   .spi-split gives the two columns and the stack below 768px.
   The logo wall is its own grid because it is a wall of logos,
   not a row of cards — base's grids are card grids with a 24px
   gutter and a card surface behind each cell.
--------------------------------------------------------- */
/* Top-aligned only while the two sit side by side. Below 769px base
   stacks the split and resets it to stretch; this rule loads later and
   was overriding that, squeezing the logo wall to a single 140px column
   — eleven logos one under another, 1,147px tall at 768. */
@media (min-width: 769px) {
  .syc-supporters {
    align-items: flex-start;
  }
}

.syc-sponsor-grid {
  flex: 1 1 58%;
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: 12px;
}

.syc-sponsor-grid a {
  display: block;
  overflow: hidden;
  border-radius: var(--spi-radius-sm);
}

.syc-sponsor-grid img {
  display: block;
  width: 100%;
  height: auto;
  transition: transform 0.2s ease-in-out;
}

.syc-sponsor-grid a:hover img {
  transform: scale(1.06);
}

.syc-sponsor-grid a:focus-visible {
  outline: 2px solid var(--spi-accent);
  outline-offset: 2px;
}

.syc-scorer {
  flex: 1 1 42%;
}

.syc-scorer img {
  max-width: 260px;
}

.syc-scorer .spi-h3 {
  margin-bottom: 20px;
}

@media (prefers-reduced-motion: reduce) {
  .syc-sponsor-grid img,
  .syc-sponsor-grid a:hover img {
    transition: none;
    transform: none;
  }
}

/* ---------------------------------------------------------
   7. CHAMPIONS (.syc-champions) + CHAMPION CARD
   The row is base's .spi-scroll, which is what a phone gets: the
   swipe, the snap and the full-bleed breakout. Above 600px there
   are only six champions, so it is turned back into a plain row —
   all six across on a desktop, two rows of three on a tablet,
   the same steps as base's .spi-cols-6. The vertical padding is
   the scroller's, kept so the spacing around the row is unchanged.

   A champion is not a link — see the note in syc.html — so the
   hover lift from .program-person is switched back off.
--------------------------------------------------------- */
@media (min-width: 601px) {
  .syc-champions.spi-scroll {
    flex-wrap: wrap;
    overflow-x: visible;
    margin-left: 0;
    margin-right: 0;
    padding-left: 0;
    padding-right: 0;
  }

  .syc-champions.spi-scroll > * {
    flex: 1 1 calc((100% - 5 * var(--spi-gap)) / 6);
  }
}

@media (min-width: 601px) and (max-width: 1024px) {
  .syc-champions.spi-scroll > * {
    flex-basis: calc((100% - 2 * var(--spi-gap)) / 3);
  }
}

.program-person.is-static {
  cursor: default;
}

.program-person.is-static:hover {
  transform: none;
  border-color: var(--spi-border);
}

.program-person.is-static .spi-card-product-body span {
  display: block;
}
