/**
 * Hero Banner — only rules that Tailwind utilities cannot express:
 * - Arbitrary aspect-ratios on the media panel
 * - Logical-property positioning of the rate card (inset-block-end, inset-inline-end)
 * - Arbitrary px padding on the rate card
 * - Arbitrary font-size on the "corner" rate title (27px)
 * - Arbitrary dot size (5×5px)
 * - Descendant selector (.hero-banner__description a)
 * - Compound selector (.hero-banner--has-image .hero-banner__inner min-block-size)
 * - Mobile button override (child selector inside media query)
 * - Eyebrow colour/line-height per breakpoint (the shared atom's tones don't
 *   cover this exact mobile/desktop pair)
 * - The "edge" rate card alignment's full pill design (border, background,
 *   arbitrary padding/gap) and its own title/blurb type (20px/24px,
 *   13px/18px), both off-grid
 * Everything else lives as Tailwind utilities in hero-banner.twig.
 */

/* Colour comes from the eyebrow tone (#2E5B70) at every breakpoint. */
.hero-banner .eyebrow {
  letter-spacing: 2px;
  line-height: 16px;
}

.hero-banner__media {
  aspect-ratio: 353 / 220;
}

/* Card-art variant (credit card pages): image_style crops to 250:148 at every
   breakpoint; the panel is capped at 504px and centred (also when stacked
   on mobile). */
.hero-banner--card-art .hero-banner__media {
  aspect-ratio: 250 / 148;
  justify-self: center;
  margin-inline: auto;
  inline-size: 100%;
  max-inline-size: 504px;
}

/* Rate title — 27px is off-grid; no Tailwind utility exists for this size. */
.hero-banner__rate-title {
  font-size: 27px;
}

/* "Edge" alignment (Figma 6216:3712) fully replaces the "corner" alignment's
   Tailwind-utility look (px-7.5/py-4.75, rounded-card, gap-3, items-end,
   bg-bg, shadow-card) with this pill card — plain, unlayered CSS always
   wins over those layered utilities regardless of source order, so no
   Twig changes are needed to drop the old utilities. --stat-rule-gap has
   no matching token in this theme yet; using Figma's own 12px fallback. */
.hero-banner__rate--edge {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 22px;
  border: 2px solid var(--color-border-card);
  border-radius: 999px;
  background: var(--color-neutral-0);
  box-shadow: none;
}

/* Edge variant's own title/blurb type — 20px/24px and 13px/18px are both
   off-grid (no matching size/line-height token pair); align-self resets
   the corner variant's self-end so both sit centered in the pill
   (parent's align-items: center above), not baseline-anchored to the
   bottom. */
.hero-banner__rate--edge .hero-banner__rate-title {
  line-height: 24px;
  color: var(--ink-primary);
  font-family: var(--font-heading);
  font-size: 20px;
  font-weight: var(--weight-bold);
  align-self: auto;
}

.hero-banner__rate--edge .hero-banner__rate-blurb {
  line-height: 18px;
  color: var(--ink-46626d);
  font-family: var(--font-body);
  font-size: 13px;
  font-weight: var(--weight-regular);
}

@media (min-width: 64rem) {
  .hero-banner__media {
    aspect-ratio: 608 / 520;
  }

  /* Fixed media_width (Figma 6216:3675/6216:3708): 520×420, a different
     ratio from the equal-split layout's 608×520 image. */
  .hero-banner--media-fixed .hero-banner__media {
    aspect-ratio: 520 / 420;
  }

  .hero-banner--has-image .hero-banner__inner {
    min-block-size: var(--hero-height);
  }

  .hero-banner .eyebrow {
    line-height: 15px;
  }
}

/* Rate card as a mobile tag (rate_hide_mobile off, Figma 6989:23376): a white
   pill 10px from the image's bottom-left, "Title · blurb" at 12/16. */
@media (max-width: 47.999rem) {
  .hero-banner__rate.hero-banner__rate--mobile {
    inset-block-end: 10px;
    inset-inline: 10px auto;
    flex-wrap: nowrap;
    align-items: center;
    gap: 4px;
    max-inline-size: calc(100% - 20px);
    padding: 8px 14px;
    border: 0;
    border-radius: 6px;
    background: var(--color-neutral-0);
    box-shadow: none;
  }

  .hero-banner__rate--mobile .hero-banner__rate-title,
  .hero-banner__rate--mobile .hero-banner__rate-blurb {
    white-space: normal;
    line-height: 16px;
    font-family: var(--font-body);
    font-size: 12px;
    align-self: auto;
  }

  .hero-banner__rate--mobile .hero-banner__rate-title {
    color: var(--ink-primary);
    font-weight: var(--weight-bold);
  }

  .hero-banner__rate--mobile .hero-banner__rate-blurb {
    color: var(--ink-46626d);
    font-weight: var(--weight-regular);
  }

  .hero-banner__rate--mobile .hero-banner__rate-dot {
    display: none;
  }

  .hero-banner__rate--mobile
    .hero-banner__rate-title
    + .hero-banner__rate-meta
    .hero-banner__rate-blurb::before {
    content: '· ';
  }
}
