/* Hero card (Uiverse rare-bat, recoloured through its three variables only) and the donate card.
   Both sit on the page, so both are flat with a hairline: no shadow (DECISIONS 32). */

.hero-card {
  --color-1: var(--surface-2);
  --color-2: var(--glow-2);
  --color-3: var(--glow-1);
  --card-title: clamp(var(--fs-24), 9cqi, var(--fs-32));
  position: relative;
  isolation: isolate;
  overflow: hidden;
  width: clamp(240px, 100%, 360px);
  aspect-ratio: 1;
  container-type: inline-size;
  border-radius: var(--r-panel);
  background: var(--color-3);
  color: var(--text);
  animation: fade-in var(--d-enter) var(--ease-state) backwards;
}

.hero-card::after {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  box-shadow: var(--hairline);
  pointer-events: none;
  transition: box-shadow var(--d-hover) var(--ease-state);
}

.hero-card--cherry {
  --color-1: var(--surface);
  --color-2: var(--accent);
  --color-3: var(--glow-1);
}

.hero-card--rose {
  --color-1: var(--glow-1);
  --color-2: var(--accent-ink);
  --color-3: var(--surface-2);
}

/* The face is 110% and shifted so the displaced edges never show. Never animated: the filter
   would repaint every frame. */
.hero-card__face {
  position: absolute;
  inset: 0;
  z-index: -1;
  width: 110%;
  height: 110%;
  translate: -5% -5%;
  filter: url("#card-grain");
  background: radial-gradient(
    circle at 50% 100%,
    var(--color-1) 20%,
    var(--color-2) 40% 50%,
    var(--color-3) 55%
  ) no-repeat center / auto;
}

.hero-card__title {
  position: absolute;
  top: 10%;
  left: 10%;
  right: 10%;
  font-size: var(--card-title);
  font-weight: 650;
  line-height: 1.05;
  letter-spacing: -.04em;
  background: linear-gradient(135deg, var(--accent-ink), var(--text));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
  transition: transform .5s cubic-bezier(.25, 1, .5, 1);
}

/* The caption sits under the title on the outer tone. On the bright band it failed 4.5:1. */
.hero-card__desc {
  position: absolute;
  top: calc(10% + 2.1 * var(--card-title) + var(--s-3));
  left: 10%;
  right: 10%;
  font-size: var(--fs-15);
  font-weight: 400;
  line-height: 1.5;
  letter-spacing: .02em;
  color: var(--text);
  transition: transform .5s cubic-bezier(.25, 1, .5, 1);
}

.hero-card:hover .hero-card__title,
.hero-card.is-hover .hero-card__title,
.hero-card:focus-visible .hero-card__title {
  transform: translateY(-2px);
}

.hero-card:hover .hero-card__desc,
.hero-card.is-hover .hero-card__desc,
.hero-card:focus-visible .hero-card__desc {
  transform: translateY(-2px);
}

.hero-card:hover::after,
.hero-card.is-hover::after {
  box-shadow: inset 0 0 0 1px var(--line-strong);
}

/* Donate card. Burgundy is allowed here (docs/02), as soft glows behind the title. */
.donate {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: var(--s-4);
  max-width: 480px;
  padding: var(--s-6);
  border-radius: var(--r-panel);
  background: var(--surface);
  box-shadow: var(--hairline);
}

.donate::before,
.donate::after {
  content: "";
  position: absolute;
  z-index: -1;
  border-radius: 50%;
  pointer-events: none;
}

.donate::before {
  top: -48px;
  right: 8px;
  width: 160px;
  height: 96px;
  background: var(--wine);
  filter: blur(28px);
  opacity: .7;
  animation: fade-in var(--d-hero) var(--ease-enter) backwards;
}

.donate::after {
  top: -48px;
  right: -24px;
  width: 96px;
  height: 96px;
  background: var(--glow-2);
  filter: blur(8px);
  opacity: .8;
}

.donate__title {
  font-size: var(--fs-24);
}

.donate__address {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  display: flex;
  align-items: center;
  gap: var(--s-3);
  min-height: var(--control-h);
  padding: var(--s-2) var(--s-2) var(--s-2) var(--s-4);
  border-radius: var(--r-control);
  background: var(--surface-2);
  box-shadow: var(--hairline);
}

.donate__address::before {
  content: "";
  position: absolute;
  z-index: -1;
  top: 50%;
  right: 24px;
  width: 48px;
  height: 48px;
  translate: 0 -50%;
  border-radius: 50%;
  background: var(--accent-lo);
  filter: blur(16px);
  opacity: .35;
}

.donate__address .mono {
  flex: 1;
  min-width: 0;
  overflow-wrap: anywhere;
}

.donate__note {
  font-size: var(--fs-14);
  color: var(--text-2);
}

@media (prefers-reduced-motion: reduce) {
  .hero-card:hover .hero-card__title,
  .hero-card.is-hover .hero-card__title,
  .hero-card:focus-visible .hero-card__title,
  .hero-card:hover .hero-card__desc,
  .hero-card.is-hover .hero-card__desc,
  .hero-card:focus-visible .hero-card__desc {
    transform: none;
  }
}
