/* Cover: the shop's banner at the top of its event list — its picture or
   accent, the name large over a shade, and a few numbers in frosted tiles */
.cover {
  border-radius: var(--radius-xl);
  box-shadow: var(--shadow-card);
  color: white;
  display: flex;
  flex-direction: column;
  isolation: isolate;
  justify-content: flex-end;
  min-block-size: min(26rem, 60dvh);
  overflow: hidden;
  position: relative;

  &::after {
    background: linear-gradient(to top, oklch(0 0 0 / 0.62), oklch(0 0 0 / 0.1) 55%, transparent);
    content: "";
    inset: 0;
    position: absolute;
    z-index: -1;
  }
}

.cover__image {
  block-size: 100%;
  inline-size: 100%;
  inset: 0;
  object-fit: cover;
  position: absolute;
  z-index: -2;
}

.cover__content {
  align-items: flex-end;
  display: flex;
  flex-wrap: wrap;
  gap: var(--space-m);
  justify-content: space-between;
  padding: var(--space-m-l);
}

.cover__title {
  font-family: var(--font-display);
  font-size: calc(var(--step-6) * 1.5);
  font-size-adjust: var(--font-display-adjust);
  font-weight: var(--font-display-weight);
  letter-spacing: var(--font-display-tracking);
  line-height: var(--leading-flat);
  overflow-wrap: anywhere;
}

.cover__tagline {
  font-size: var(--step-1);
  font-weight: var(--weight-medium);
  opacity: 0.85;
}

.cover__stat {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: oklch(1 0 0 / 0.14);
  border-radius: var(--radius-m);
  display: flex;
  flex-direction: column;
  gap: var(--space-3xs);
  min-inline-size: 6rem;
  padding: var(--space-xs) var(--space-s);
}

.cover__stat-value {
  font-size: var(--step-2);
  font-variant-numeric: tabular-nums;
  font-weight: var(--weight-bold);
  line-height: var(--leading-flat);
}

.cover__stat-label {
  font-size: var(--step--1);
  opacity: 0.85;
}

/* ── The style's home hero (data-look-home-hero) ──────────────────────────
   cover        the picture behind the name (above)
   split        the name on a card beside the picture
   typographic  the name alone, set very large on the page
   minimal      the name and tagline, quietly, on the page
   Without a cover picture, split keeps the accent behind the name. */
[data-look-home-hero="split"] .cover:has(.cover__image) {
  background: var(--color-surface-1);
  color: var(--color-text);
  display: grid;
  grid-template-areas: "image" "content";

  &::after {
    content: none;
  }

  .cover__image {
    aspect-ratio: 16 / 10;
    block-size: auto;
    grid-area: image;
    position: static;
  }

  .cover__content {
    align-items: flex-start;
    flex-direction: column;
    grid-area: content;
    justify-content: center;
  }

  .cover__title {
    font-size: var(--step-6);
  }

  .cover__tagline {
    color: var(--color-muted);
    opacity: 1;
  }

  .cover__stat {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--color-surface-2);
  }

  @media (min-width: 48em) {
    grid-template-areas: "content image";
    grid-template-columns: minmax(0, 1fr) minmax(0, 1.15fr);

    .cover__image {
      aspect-ratio: auto;
      block-size: 100%;
    }
  }
}

[data-look-home-hero="typographic"],
[data-look-home-hero="minimal"] {
  .cover {
    background: none;
    box-shadow: none;
    color: var(--color-text);
    min-block-size: 0;
    overflow: visible;

    &::after {
      content: none;
    }
  }

  .cover__image {
    display: none;
  }

  .cover__content {
    padding-inline: 0;
  }

  .cover__tagline {
    color: var(--color-muted);
    opacity: 1;
  }

  .cover__stat {
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    background: var(--color-surface-1);
    box-shadow: var(--shadow-card);
  }
}

/* The name as the page's poster: as large as the longest word allows */
[data-look-home-hero="typographic"] {
  .cover {
    container-type: inline-size;
    padding-block: var(--space-l-xl) var(--space-s);
  }

  .cover__content {
    align-items: flex-start;
    flex-direction: column;
    gap: var(--space-s-m);
  }

  .cover__title {
    font-size: clamp(var(--step-6), 14cqi, calc(var(--step-6) * 2.4));
    line-height: 0.92;
  }

  .cover__tagline {
    color: var(--color-accent-text);
    font-size: var(--step-2);
  }
}

[data-look-home-hero="minimal"] {
  .cover {
    padding-block: var(--space-m) 0;
  }

  .cover__title {
    font-size: var(--step-5);
  }
}

/* ── The style's pictures (data-look-images) ──────────────────────────────
   mono turns the cover black and white; duotone lays it over the accent,
   in the heroes that show the picture */
[data-look-images="mono"] .cover__image {
  filter: grayscale(1) contrast(1.06);
}

[data-look-images="duotone"]:is([data-look-home-hero="cover"], [data-look-home-hero="split"]) .cover:has(.cover__image) {
  background-color: var(--color-accent-fill);

  .cover__image {
    filter: grayscale(1) contrast(1.1);
    mix-blend-mode: luminosity;
  }
}
