@charset "UTF-8";
@layer pages {
  /* Phones: the hero starts as close to the header as every other page's title. */
  /* The subtitle and buttons are left out (the maintainer's choice): the slogan and the featured event are enough there. */
  /* The hero starts as far below the header as every other page's title (a tight band's top). */
  .home-hero { padding-block-start: var(--space-6); }
  @media (max-width: 40rem) {
    .home-hero { padding-block: var(--space-5) var(--space-4); }
    .hero__more { display: none; }
    /* With an event below, a short call to it takes the slogan's place on screen; the slogan stays the page's heading
       for search engines and screen readers. */
    .hero__head:has(.hero-callout) h1 {
      position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap;
    }
    .hero__head .hero-callout { display: block; }
  }
  /* Looks like the slogan (an h1): display font, bold, tight. */
  .hero-callout { display: none; font-family: var(--font-display); font-weight: 700; letter-spacing: var(--tracking-tight); max-inline-size: none; text-wrap: balance; }
  /* Home page. */

  /* Hero: text on the left, a blob-shaped picture on the right with the next event floating over its lower left. */
  .hero { display: grid; gap: var(--space-5); align-items: center; }
  .hero > .stack > * { margin-block: 0; }
  .hero > .stack { gap: var(--space-5); }
  .hero__visual { position: relative; padding: var(--space-4); display: grid; align-items: end; }
  .hero__blob { position: absolute; inset: 0; background: var(--color-band); border-radius: var(--shape-blob); }
  .hero__image { position: relative; display: block; inline-size: 100%; block-size: clamp(16rem, 38vw, 27.5rem); object-fit: cover; border-radius: var(--shape-blob-image); box-shadow: var(--shadow-float); }
  .hero__visual .next-up { position: absolute; inset-inline-start: calc(var(--space-3) * -1); inset-block-end: var(--space-2); max-inline-size: min(23.75rem, 100%); }
  .hero__visual--plain { padding: 0; }
  /* A featured event's picture: whole, with the event page's corners, no blob; the card still floats over its corner. */
  .hero__visual--event { padding: 0 0 var(--space-6); justify-items: center; }
  .hero__event { display: block; max-inline-size: 100%; border-radius: var(--radius-lg); }
  .hero__visual--event .hero__image { inline-size: auto; max-inline-size: 100%; block-size: auto; max-block-size: 30rem; object-fit: contain; border-radius: var(--radius-lg); }
  .hero__visual--plain .next-up { position: static; max-inline-size: none; }
  @media (max-width: 55.99rem) {
    .hero__visual .next-up { inset-inline-start: var(--space-2); }
  }
  @media (min-width: 56rem) {
    /* The text (slogan, then what AMA is and the buttons) centred on the left, the picture on the right. */
    .hero {
      grid-template-columns: 1.1fr 1fr; grid-template-rows: auto auto; gap: var(--space-5) var(--space-7);
      grid-template-areas: "head visual" "more visual";
    }
    /* The two text parts meet in the middle of the picture's height, so together they sit centred beside it. */
    .hero__head { grid-area: head; align-self: end; }
    .hero__more { grid-area: more; align-self: start; }
    .hero__visual { grid-area: visual; }
  }

  .next-up { display: flex; align-items: center; gap: var(--space-4); padding: var(--space-3) var(--space-4) var(--space-3) var(--space-3); background: var(--color-surface); color: var(--color-ink); border-radius: var(--radius-card); box-shadow: var(--shadow-raised); text-decoration: none; transition: transform var(--duration) var(--ease), box-shadow var(--duration) var(--ease); }
  .next-up:hover { box-shadow: var(--shadow-float); }
  @media (prefers-reduced-motion: no-preference) { .next-up:hover { transform: translateY(-2px); } }
  .next-up:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; }
  .next-up__date { flex: none; display: grid; place-content: center; justify-items: center; inline-size: 3.5rem; block-size: 3.75rem; border-radius: var(--radius-md); background: var(--color-primary); color: var(--color-on-primary); line-height: 1; }
  .next-up__date > :first-child { font-size: 0.6875rem; font-weight: 700; letter-spacing: 0.1em; text-transform: uppercase; }
  .next-up__date > :last-child { font: 700 1.5rem/1 var(--font-display); }
  .next-up__body { display: grid; gap: 0.2rem; min-inline-size: 0; }
  .next-up__body .eyebrow { margin: 0; }
  .next-up__title { font: 700 1.0625rem/1.2 var(--font-display); }
  .next-up__meta { font-size: var(--text-sm); color: var(--color-ink-soft); }

  /* A row of event cards that scrolls sideways and snaps; reachable and scrollable by keyboard. */
  .snap-row {
    list-style: none; margin: 0; padding: 0 0 var(--space-3); display: flex; gap: var(--space-4); max-inline-size: none;
    overflow-x: auto; scroll-snap-type: x proximity; overscroll-behavior-x: contain;
  }
  .snap-row > li { flex: 0 0 min(80%, 17rem); scroll-snap-align: start; display: grid; }
  .snap-row:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 2px; }

  /* Sponsor spotlight: a translucent card on the dark band, then a strip of every sponsor's name. */
  .spotlight { display: grid; gap: var(--space-5); align-items: center; padding: var(--space-5); background: color-mix(in srgb, var(--color-on-ink) 8%, transparent); border: 1px solid color-mix(in srgb, var(--color-on-ink) 16%, transparent); border-radius: var(--radius-card); color: var(--color-on-ink); }
  .spotlight .stack > * { margin-block: 0; }
  .spotlight .eyebrow { color: var(--color-sun); opacity: 1; }
  .spotlight h3 { font-size: var(--text-xl); line-height: 1.1; }
  .spotlight p { opacity: 0.9; }
  .spotlight__logo { max-inline-size: 14rem; max-block-size: 7rem; object-fit: contain; }
  .spotlight__link { font-weight: 700; color: inherit; }
  @media (min-width: 48rem) { .spotlight { grid-template-columns: 1fr auto; padding: var(--space-6); } .spotlight__logo + .stack { grid-column: auto; } }
  .name-strip { list-style: none; margin: 0; padding: var(--space-5) 0; max-inline-size: none; display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-2) var(--space-6); border-block: 1px solid color-mix(in srgb, var(--color-on-ink) 12%, transparent); font: 700 var(--text-lg) var(--font-display); color: color-mix(in srgb, var(--color-on-ink) 80%, transparent); }
  .name-strip li + li::before { content: "✦"; margin-inline-end: var(--space-6); color: var(--color-sun); }
  @media (max-width: 47.99rem) { .name-strip { gap: var(--space-2) var(--space-5); } .name-strip li + li::before { display: none; } }

  /* Round arrow buttons next to "All events". They are shown by the script once the row can scroll. */
  .section-head__tools { display: flex; align-items: center; gap: var(--space-2); }
  .section-head__tools a { margin-inline-end: var(--space-2); font-weight: 700; text-decoration: none; }
  .snap-row { scroll-behavior: auto; }
  @media (prefers-reduced-motion: no-preference) { .snap-row { scroll-behavior: smooth; } }

  /* The numbers band is the primary colour, with the figures larger and the labels a little softer. */
  .band--cta .stat__value { font-size: var(--text-3xl); }
  .band--cta .stat__label { color: inherit; opacity: 0.9; }

  /* Sponsor names: a still strip, or a slow scrolling one (two copies, the second hidden from screen readers). */
  .name-marquee { border-block: 1px solid color-mix(in srgb, var(--color-on-ink) 12%, transparent); overflow: hidden; }
  .name-marquee .name-strip { border-block: 0; }
  .band--ink .button--secondary { color: inherit; border-color: color-mix(in srgb, var(--color-on-ink) 40%, transparent); }
  .band--ink .button--secondary:hover { color: var(--color-band-ink); background: var(--color-on-ink); }
  [data-marquee-toggle] { justify-self: start; }
  .name-marquee--scroll .name-marquee__track { display: flex; inline-size: max-content; }
  .name-marquee--scroll .name-strip { flex-wrap: nowrap; flex: none; white-space: nowrap; padding-inline: var(--space-3); }
  .name-marquee--scroll .name-strip + .name-strip { display: none; }
  .name-marquee--scroll .name-strip li:first-child::before { content: "✦"; margin-inline-end: var(--space-6); color: var(--color-sun); }
  @media (prefers-reduced-motion: no-preference) {
    .name-marquee--scroll .name-strip + .name-strip { display: flex; }
    .name-marquee--scroll .name-marquee__track { animation: names-scroll 48s linear infinite; }
    .name-marquee--scroll:hover .name-marquee__track, .name-marquee--scroll:focus-within .name-marquee__track, .name-marquee--scroll[data-paused] .name-marquee__track { animation-play-state: paused; }
  }
  @keyframes names-scroll { to { transform: translateX(-50%); } }
  /* Still strip: the names wrap as before, and the separators between them stay. */
  @media (prefers-reduced-motion: reduce) {
    .name-marquee--scroll .name-marquee__track { inline-size: auto; }
    .name-marquee--scroll .name-strip { flex-wrap: wrap; white-space: normal; }
    .name-marquee--scroll .name-strip li:first-child::before { content: none; }
  }
}
