/* Hero: a full-bleed artist impression with the title on it, like the
   brochure cover. Optional pill tags and a dark fact bar at the bottom. */

@layer components {
  .hero {
    position: relative;
    display: grid;
    grid-template-rows: 1fr auto;
    min-height: min(100svh, 56rem);
    color: var(--theme-color-on-dark);
    background: var(--theme-color-dark);
    isolation: isolate;
  }

  .hero__media {
    position: absolute;
    inset: 0;
    z-index: -1;
  }

  .hero__media img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    object-position: var(--theme-hero-focus, 50% 50%);
  }

  .hero__media::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(
      to top,
      color-mix(in oklab, var(--theme-color-dark) 85%, transparent) 0%,
      color-mix(in oklab, var(--theme-color-dark) 35%, transparent) 38%,
      transparent 62%
    );
  }

  .hero__body {
    align-self: end;
    padding-block: calc(var(--theme-header-height) + var(--theme-space-lg)) var(--theme-space-md);
  }

  .hero__place {
    margin-bottom: var(--theme-space-2xs);
    font-size: var(--theme-text-xs);
    font-weight: var(--theme-weight-bold);
    letter-spacing: 0.14em;
  }

  .hero__title {
    max-width: 16ch;
    font-size: var(--theme-text-3xl);
    font-weight: var(--theme-weight-bold);
    letter-spacing: -0.02em;
  }

  .hero__lead {
    max-width: 34rem;
    margin-top: var(--theme-space-xs);
    font-size: var(--theme-text-lg);
    font-weight: var(--theme-weight-medium);
    line-height: var(--theme-leading-snug);
  }

  .hero__tags {
    display: flex;
    flex-wrap: wrap;
    gap: var(--theme-space-2xs);
    margin-top: var(--theme-space-sm);
  }

  .hero__actions {
    margin-top: var(--theme-space-sm);
  }

  .hero__bar {
    background: var(--theme-color-dark);
  }

  .hero__bar-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    justify-content: space-between;
    gap: var(--theme-space-xs) var(--theme-space-md);
    padding-block: var(--theme-space-sm);
  }

  .hero__count {
    display: flex;
    align-items: end;
    gap: var(--theme-space-xs);
    line-height: 1.1;
  }

  .hero__count strong {
    font-size: var(--theme-text-2xl);
    font-weight: var(--theme-weight-semibold);
    line-height: 0.9;
  }

  .hero__count span {
    font-size: var(--theme-text-sm);
  }

  .hero__facts {
    display: grid;
    gap: var(--theme-space-3xs);
    font-size: var(--theme-text-sm);
    text-align: end;
  }

  .hero__price {
    font-size: var(--theme-text-lg);
  }

  .hero__price strong {
    font-weight: var(--theme-weight-bold);
    color: var(--theme-color-accent);
  }

  @media (width <= 40rem) {
    .hero__facts {
      text-align: start;
    }
  }
}
