/* The four product cards, each with a looping vignette bleeding off the bottom edge. */

.cards {
  display: grid;
  /* minmax(0,…) stops the bleeding artwork from widening its own column. */
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 16px;
}

.card {
  position: relative;
  display: flex;
  flex-direction: column;
  /* Height only: an aspect-ratio here would size width from height and overflow the column. */
  min-height: clamp(400px, 31vw, 470px);
  min-width: 0;
  padding: 22px 24px 0;
  border-radius: 22px;
  overflow: hidden;
  isolation: isolate;
  background: linear-gradient(180deg, #0d1116 0%, #0b1410 44%, #0a3d22 80%, #12924a 100%);
  transition: transform 0.4s cubic-bezier(0.2, 0.7, 0.3, 1);
}

/* The curve card is the one where price falls, so it runs the other way. */
.card[data-card="curve"] {
  background: linear-gradient(180deg, #0d1116 0%, #150f11 44%, #491317 80%, #a82630 100%);
}

.card::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  border-radius: inherit;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.07);
}

.card:hover { transform: translateY(-4px); }

.card__slug {
  align-self: flex-start;
  padding: 5px 11px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
  font: 500 11px/1 var(--mono);
  letter-spacing: 0.02em;
  color: rgba(255, 255, 255, 0.72);
}

.card__title {
  margin: 16px 0 8px;
  font-size: clamp(19px, 1.5vw, 25px);
  font-weight: 500;
  letter-spacing: -0.015em;
}

.card__copy {
  font-size: 13.5px;
  line-height: 1.5;
  color: rgba(255, 255, 255, 0.5);
}

.card__copy em {
  font-style: normal;
  color: rgba(255, 255, 255, 0.82);
}

/* The artwork bleeds to the bottom edge of the card. */
.card__art {
  position: relative;
  z-index: 1;
  flex: 1;
  margin: 0 -24px;
  min-height: 0;
  display: flex;
  flex-direction: column;
  justify-content: flex-end;
}

.card__art > svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* ---- readouts ---- */
.rate {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 8px;
  padding: 0 24px 10px;
  font-size: 12px;
}

.rate__label {
  color: rgba(255, 255, 255, 0.45);
  font-family: var(--mono);
  letter-spacing: -0.01em;
  transition: color 0.3s ease;
}

.rate__label b {
  font-weight: 500;
  color: rgba(255, 255, 255, 0.72);
  font-variant-numeric: tabular-nums;
}

.rate__value {
  font: 500 15px/1 var(--mono);
  color: var(--hood-mint);
  font-variant-numeric: tabular-nums;
  transition: color 0.3s ease;
}

.card[data-card="curve"] .card__art > svg,
.card[data-card="leverage"] .card__art > svg { height: 170px; flex: none; }

/* ---- /markets marquee ---- */
.rail {
  display: flex;
  gap: 10px;
  width: max-content;
  padding: 5px 0;
  will-change: transform;
}

/* The bottom row bleeds past the card edge so the grid feels endless. */
.rail:last-child { margin-bottom: -18px; }

.chip {
  display: grid;
  place-items: center;
  width: 52px;
  height: 52px;
  flex: none;
  border-radius: 50%;
  background: #f5f7fa;
  color: #16202b;
  font: 600 13px/1 var(--sans);
  letter-spacing: 0.01em;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.35);
}

/* The artwork arrives already round on a transparent ground, so the chip is
   just a ring and a shadow around it. */
.chip--token {
  background: transparent;
  box-shadow: none;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.5));
}

.chip--token img {
  width: 100%;
  height: 100%;
  display: block;
  border-radius: 50%;
  /* The token ring, plus a hairline so the darker artwork still reads as a disc. */
  box-shadow: inset 0 0 0 1.5px var(--ring, rgba(255, 255, 255, 0.25)),
              0 0 0 1px rgba(255, 255, 255, 0.16);
}

@media (max-width: 1100px) {
  .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 620px) {
  .cards { grid-template-columns: minmax(0, 1fr); }
}

@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
