/* Winter WonderJam theme overrides — all colors and spacing come from Web Awesome tokens */

html,
body {
  min-height: 100%;
  padding: 0;
  margin: 0;
}

/* Header nav on desktop, drawer on mobile (see Web Awesome <wa-page> docs) */
wa-page[view='mobile'] .header-nav {
  display: none;
}
wa-page[view='desktop']::part(navigation) {
  display: none;
}

/* Until <wa-page> loads and sets its view attribute, the rules above can't
   apply, so phones briefly showed the desktop links and the drawer's links as
   a plain list. These cover that moment using the same 768px breakpoint
   (wa-page's default mobile-breakpoint). */
wa-page:not([view]) > [slot='navigation'] {
  display: none;
}

@media (max-width: 767.98px) {
  wa-page:not([view]) .header-nav {
    display: none;
  }
}

@media (min-width: 768px) {
  wa-page:not([view]) .wa-mobile-only {
    display: none;
  }
}

main {
  padding: 0;
}

/* Sleeker buttons. The Awesome theme gives every button a hard 4px block
   shadow, 2px borders, tall padding and a "punch-in" on click; this keeps
   the theme's rounded shape and bold Quicksand label but trims the bulk.
   (Unlayered, so it wins over the theme's @layer rules.) */
wa-button {
  --wa-form-control-padding-block: 0.75em;
  --wa-form-control-padding-inline: 1.25em;
  --wa-form-control-height: round(
    calc(2 * var(--wa-form-control-padding-block) + 1em * var(--wa-form-control-value-line-height)),
    1px
  );
  --wa-form-control-border-width: 1px;
  --wa-transition-fast: 120ms;
  --wa-transition-normal: 150ms;
  --wa-button-transform-hover: translateY(-1px);
  --wa-button-transform-active: translateY(0);
}

wa-button::part(base) {
  margin: 0;
  box-shadow: none;
  transition-property: background-color, border-color, color, box-shadow, transform;
  transition-duration: var(--wa-transition-normal);
}

wa-button:not([appearance='plain'], [appearance='outlined'])::part(base) {
  box-shadow: 0 1px 2px rgb(0 0 0 / 0.12);
}

wa-button:not([appearance='plain'], [disabled]):hover::part(base) {
  box-shadow: 0 3px 8px rgb(0 0 0 / 0.16);
}

wa-button:not([disabled]):active::part(base) {
  box-shadow: none;
}

@media (prefers-reduced-motion: reduce) {
  wa-button {
    --wa-button-transform-hover: none;
  }
}

.section {
  padding: var(--wa-space-3xl) var(--wa-space-xl);
}

.container {
  max-width: 72rem;
  margin-inline: auto;
}

.prose {
  max-width: 65ch;
}

/* Header */
.site-header {
  padding: var(--wa-space-m) var(--wa-space-xl);
  border-bottom: var(--wa-border-width-s) solid var(--wa-color-surface-border);
  background-color: var(--wa-color-surface-default);
}

.brand {
  font-weight: var(--wa-font-weight-bold);
  font-size: var(--wa-font-size-l);
  color: var(--wa-color-text-normal);
  text-decoration: none;
}

.brand picture {
  display: block;
}

.brand-logo {
  display: block;
  width: auto;
  height: 2.75rem;
}

/* The logo's navy lettering needs a light backdrop in dark mode */
.wa-dark .brand-logo {
  padding: var(--wa-space-3xs) var(--wa-space-xs);
  border-radius: var(--wa-border-radius-m);
  background-color: #fff;
}

/* Icons live in /assets/img/ (also used for the snow background) */
.brand-mark img {
  width: 1.4em;
  height: 1.4em;
}

.header-nav a,
[slot='navigation'] a {
  color: var(--wa-color-text-normal);
  text-decoration: none;
  font-weight: var(--wa-font-weight-semibold);
}

.header-nav a[aria-current='page'],
[slot='navigation'] a[aria-current='page'] {
  color: var(--wa-color-brand-on-quiet);
  text-decoration: underline;
  text-decoration-color: var(--wa-color-brand-fill-loud);
  text-decoration-thickness: var(--wa-border-width-m);
  text-underline-offset: var(--wa-space-2xs);
}

/* Hero */
.hero {
  --drift-height: clamp(3rem, 8vw, 6rem);
  position: relative;
  /* Winter sky: deeper blue fading down into the brand cyan */
  background: linear-gradient(
    to bottom,
    var(--wa-color-blue-50),
    var(--wa-color-brand-fill-loud) 75%
  );
  color: var(--wa-color-brand-on-loud);
  text-align: center;
  padding-block: var(--wa-space-4xl) calc(var(--wa-space-l) + var(--drift-height));
}

.wa-dark .hero {
  background: linear-gradient(
    to bottom,
    var(--wa-color-blue-20),
    var(--wa-color-brand-fill-loud) 75%
  );
}

/* Snowdrifts along the bottom edge, filled with the page background so the
   hero melts into the next section in both light and dark mode */
.hero::before,
.hero::after {
  content: '';
  position: absolute;
  inset-inline: 0;
  bottom: -1px;
  height: var(--drift-height);
  background-color: var(--wa-color-surface-default);
  mask-position: bottom;
  mask-size: 100% 100%;
  mask-repeat: no-repeat;
  z-index: 0;
  pointer-events: none;
}

/* Back drift: softer and taller */
.hero::before {
  opacity: 0.45;
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'><path d='M0 58C150 20 290 28 430 52S700 92 880 62 1180 14 1320 40 1420 38 1440 36V120H0Z'/></svg>");
}

/* Front drift */
.hero::after {
  mask-image: url("data:image/svg+xml,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 1440 120' preserveAspectRatio='none'><path d='M0 84C120 60 250 58 380 78S620 112 800 90 1090 52 1250 74 1400 96 1440 88V120H0Z'/></svg>");
}

.hero picture {
  display: block;
  width: 100%;
}

.hero-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--wa-border-radius-l);
  box-shadow: var(--wa-shadow-l);
}

.hero h1 {
  font-size: var(--wa-font-size-4xl);
  margin: 0;
  color: inherit;
}

.hero .tagline {
  font-size: var(--wa-font-size-l);
  margin: 0;
}

.hero .when-where {
  font-size: var(--wa-font-size-xl);
  font-weight: var(--wa-font-weight-semibold);
}

/* Solid white secondary button on the blue hero */
.hero wa-button.on-band::part(button) {
  background-color: #fff;
  border-color: #fff;
  color: var(--wa-color-blue-30);
}

.hero wa-button.on-band::part(button):hover {
  background-color: var(--wa-color-blue-95);
  border-color: var(--wa-color-blue-95);
}

.band-quiet {
  background-color: var(--wa-color-surface-lowered);
}

.page-title {
  margin: 0;
}

/* Keep day headings clear of the sticky header when linked to (e.g. /schedule/#sun) */
.schedule-day {
  scroll-margin-top: var(--wa-space-4xl);
}

/* Each game on the schedule links to its own page */
.game-link {
  display: block;
  color: inherit;
  text-decoration: none;
  border-radius: var(--wa-border-radius-l);
}

.game-link wa-card {
  transition: border-color var(--wa-transition-fast), translate var(--wa-transition-fast);
}

.game-link:hover wa-card {
  border-color: var(--wa-color-brand-border-loud);
  translate: 0 -2px;
}

.game-link:hover .game-title {
  text-decoration: underline;
  text-underline-offset: var(--wa-space-2xs);
}

/* Game pages */
.back-link,
.game-pager a {
  color: var(--wa-color-brand-on-quiet);
  font-weight: var(--wa-font-weight-semibold);
  text-decoration: none;
}

.back-link:hover,
.game-pager a:hover {
  text-decoration: underline;
}

.game-division {
  align-self: flex-start;
}

.video-embed {
  aspect-ratio: 16 / 9;
  border-radius: var(--wa-border-radius-l);
  overflow: hidden;
  box-shadow: var(--wa-shadow-m);
  background-color: black;
}

.video-embed iframe {
  display: block;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Charity partner flyer at the bottom of the home page */
.home-charity-link {
  display: block;
  width: 100%;
  max-width: 24rem;
  border-radius: var(--wa-border-radius-l);
  transition: transform 150ms ease, box-shadow 150ms ease;
}

.home-charity-link:hover {
  transform: translateY(-2px);
}

.home-charity-link:focus-visible {
  outline: var(--wa-focus-ring);
  outline-offset: var(--wa-focus-ring-offset);
}

.home-charity-link picture {
  display: block;
}

.home-charity-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--wa-border-radius-l);
  box-shadow: var(--wa-shadow-m);
}

@media (prefers-reduced-motion: reduce) {
  .home-charity-link {
    transition: none;
  }

  .home-charity-link:hover {
    transform: none;
  }
}

/* Admission prices (home + info pages) */
.admission-price {
  font-size: var(--wa-font-size-3xl);
  font-weight: var(--wa-font-weight-bold);
  line-height: 1;
  font-variant-numeric: tabular-nums;
}

.admission {
  scroll-margin-top: var(--wa-space-4xl);
}

.admission ul {
  margin: 0;
  padding-inline-start: var(--wa-space-l);
}

/* Sponsors page */
.sponsor-level wa-icon {
  color: var(--wa-color-brand-on-quiet);
}

.sponsor-level-gold wa-icon {
  color: var(--wa-color-yellow-70);
}

.sponsor-level-silver wa-icon {
  color: var(--wa-color-gray-60);
}

.sponsor-level-bronze wa-icon {
  color: var(--wa-color-orange-50);
}

.sponsor-level-charity wa-icon {
  color: var(--wa-color-red-60);
}

/* Sponsor and charity cards: image on the left of the text on wide screens,
   stacked above it on phones. --media-width sets the image column; keep the
   `sizes` passed to {% image %} in sponsors.njk in step with it. */
.sponsor-media {
  --media-width: 12rem;
  display: grid;
  gap: var(--wa-space-l);
  align-items: start;
}

.sponsor-media.charity-partner-body {
  --media-width: 22rem;
}

@media (min-width: 48rem) {
  .sponsor-media {
    grid-template-columns: var(--media-width) 1fr;
  }
}

.sponsor-media picture {
  display: block;
  max-width: var(--media-width);
}

.sponsor-media-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--wa-border-radius-m);
}

.sponsor-apply {
  scroll-margin-top: var(--wa-space-4xl);
}

.sponsor-form-grid {
  --min-column-size: 16rem;
}

/* Optional header image on game pages; capped width so tall flyers
   don't take over the page */
.game-header picture {
  display: block;
  max-width: 36rem;
  margin-inline: auto;
}

.game-header-image {
  display: block;
  width: 100%;
  height: auto;
  border-radius: var(--wa-border-radius-l);
  box-shadow: var(--wa-shadow-l);
}

.game-time {
  min-width: 6ch;
  font-weight: var(--wa-font-weight-bold);
  font-variant-numeric: tabular-nums;
}

/* Snowdrifts rising into the footer, with the tagline sitting on the front
   drift's crest (from the original Winter Wonder Jam site). The drifts are
   tinted to match the footer background so the page settles into it. */
.footer-tagline {
  padding: var(--wa-space-xl) 0 0;
  overflow-x: clip;
}

.footer-tagline svg {
  display: block;
  width: 100%;
  height: auto;
  aspect-ratio: 800 / 160;
  max-height: 160px;
  overflow: visible;
  margin-bottom: -1px; /* no hairline seam against the footer */
}

/* Snow in shadow: brand-tinted so the banks stand out from the page in
   both light and dark mode */
.footer-tagline .drift-front {
  fill: var(--wa-color-brand-fill-quiet);
}

.footer-tagline .drift-back {
  fill: var(--wa-color-brand-fill-normal);
  opacity: 0.7;
}

.footer-tagline .tagline-curve {
  fill: none;
}

.footer-tagline text {
  fill: var(--wa-color-brand-on-quiet);
  font-family: var(--wa-font-family-heading);
  font-size: 28px;
  font-weight: var(--wa-font-weight-bold);
}

/* <wa-page> pads and flexes the footer slot; the drifts need the full width */
.site-footer {
  display: block;
  padding: 0;
}

.footer-content {
  background-color: var(--wa-color-brand-fill-quiet);
  padding-block: var(--wa-space-xl);
}

.footer-address {
  font-style: normal;
  text-align: end;
  color: var(--wa-color-text-quiet);
}

/* Falling snow (see /assets/js/snow.js).
   Layering: section backgrounds < snow (z 1) < content and footer (z 2) < sticky header (z 5) */
.snow {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 1;
  pointer-events: none;
}

main .container {
  position: relative;
  z-index: 2;
}

/* The whole footer sits above the snow, so flakes fall behind the snowbanks */
.site-footer {
  position: relative;
  z-index: 2;
}

/* Volunteer page */
.volunteer-heading wa-icon,
.volunteer-icon {
  color: var(--wa-color-brand-on-quiet);
}

.volunteer-grid {
  --min-column-size: 14rem;
}

/* Hotels page */
.hotel-grid {
  --min-column-size: 18rem;
}
