.transformations:has(+ .glow-format) { z-index: 1; }

.transformations:has(+ .glow-format)::before {
  position: absolute;
  z-index: -1;
  right: 0;
  bottom: -3cqw;
  width: 31cqw;
  aspect-ratio: 258 / 217;
  background: url("./glow-up-journey-velvet.webp")
    right 86.67% / calc(960 / 258 * 100%) auto no-repeat;
  -webkit-mask-image: radial-gradient(ellipse at 94% 60%, #000 15%, transparent 70%);
  mask-image: radial-gradient(ellipse at 94% 60%, #000 15%, transparent 70%);
  mix-blend-mode: lighten;
  opacity: .48;
  pointer-events: none;
  content: "";
}

.transformations:has(+ .glow-format)::after {
  position: absolute;
  z-index: -1;
  inset: auto 0 -28.27cqw;
  aspect-ratio: 764 / 295;
  background: url("./glow-up-card-assets/rendered/format-transition.png") center / 100% 100% no-repeat;
  pointer-events: none;
  content: "";
}

.glow-format {
  position: relative;
  isolation: isolate;
  overflow: hidden;
  padding-top: 24.6cqw;
  background:
    linear-gradient(var(--format-seam) 7cqw, #4a060b 13cqw, #fae7da 22cqw, transparent 31cqw),
    radial-gradient(ellipse at 50% 70%, #f6d5bd85, transparent 48%),
    radial-gradient(ellipse at 50% 42%, #fff0e4 14%, #fbe7d9 61%, #f0d2c2);
  color: #350b08;
  text-align: center;
}

/* The offsets select decorative regions from the supplied 1199 × 1312 artwork. */
.format-art {
  aspect-ratio: var(--art-w) / var(--art-h);
  background-image: url("./glow-up-card-assets/format-reference.png");
  background-repeat: no-repeat;
  background-size: calc(1199 / var(--art-w) * 100%) auto;
  background-position:
    calc(var(--art-x) / (1199 - var(--art-w)) * 100%)
    calc(var(--art-y) / (1312 - var(--art-h)) * 100%);
}

.format-satin-left,
.format-satin-right {
  position: absolute;
  z-index: -2;
  top: 21.5cqw;
  width: 25%;
  pointer-events: none;
}

.format-satin-left {
  --art-x: 0;
  --art-y: 0;
  --art-w: 264;
  --art-h: 273;
  left: 0;
  -webkit-mask-image: radial-gradient(ellipse at top left, #000 26%, transparent 72%);
  mask-image: radial-gradient(ellipse at top left, #000 26%, transparent 72%);
}

.format-satin-right {
  --art-x: 952;
  --art-y: 0;
  --art-w: 247;
  --art-h: 246;
  right: 0;
  -webkit-mask-image: radial-gradient(ellipse at top right, #000 28%, transparent 72%);
  mask-image: radial-gradient(ellipse at top right, #000 28%, transparent 72%);
}

.format-star {
  --art-x: 371;
  --art-y: 17;
  --art-w: 449;
  --art-h: 56;
  width: 37.5%;
  margin: 0 auto 1cqw;
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 72%, transparent);
  mask-image: radial-gradient(ellipse closest-side, #000 72%, transparent);
  mix-blend-mode: darken;
}

.format-header h2 {
  margin: 0;
  color: #58090b;
  font: 400 clamp(22px, 7.07cqw, 35px)/.98 Georgia, "Times New Roman", serif;
  text-transform: uppercase;
}

.format-header h2 span {
  display: block;
  font-size: 1.21em;
}

.format-ribbon {
  --art-x: 80;
  --art-y: 251;
  --art-w: 1018;
  --art-h: 153;
  width: 88%;
  margin: -1cqw auto 0;
  -webkit-clip-path: polygon(
    0 100%, 0 75%, 7% 29%, 12% 17%, 30% 18%, 51% 25%, 86% 17%, 95% 22%, 100% 0,
    100% 31%, 96% 69%, 92% 87%, 86% 94%, 54% 91%, 22% 96%, 5% 80%
  );
  clip-path: polygon(
    0 100%, 0 75%, 7% 29%, 12% 17%, 30% 18%, 51% 25%, 86% 17%, 95% 22%, 100% 0,
    100% 31%, 96% 69%, 92% 87%, 86% 94%, 54% 91%, 22% 96%, 5% 80%
  );
  -webkit-mask-image: linear-gradient(transparent, #000 9%, #000 92%, transparent);
  mask-image: linear-gradient(transparent, #000 9%, #000 92%, transparent);
}

.format-diagram { position: relative; }

.format-clock {
  position: absolute;
  top: 49%;
  left: 50%;
  width: 56%;
  aspect-ratio: 640 / 596;
  transform: translate(-50%, -50%);
  background: url("./glow-up-card-assets/rendered/format-clock.png") center / 100% 100% no-repeat;
}

.format-details {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 37% minmax(0, 1fr);
  grid-auto-rows: minmax(17cqw, auto);
  align-items: center;
  row-gap: 2cqw;
  margin: 0;
  padding: 1.5cqw 3.7% 0;
  list-style: none;
}

.format-details li {
  position: relative;
  display: grid;
  justify-items: center;
  row-gap: .26em;
  font: 500 clamp(10.5px, 2.67cqw, 13px)/1.16 var(--body);
}

.format-details li:nth-child(odd) { grid-column: 1; }
.format-details li:nth-child(even) { grid-column: 3; }

.format-details li strong {
  max-width: 13ch;
  font: 800 clamp(11px, 2.97cqw, 15px)/1.07 var(--body);
}

.format-details li:last-child strong { max-width: none; }

.format-icon {
  display: block;
  width: clamp(24px, 7.4cqw, 36px);
  margin-inline: auto;
  -webkit-mask-image: radial-gradient(ellipse closest-side, #000 80%, transparent);
  mask-image: radial-gradient(ellipse closest-side, #000 80%, transparent);
  mix-blend-mode: darken;
}

.format-icon-workout { --art-x: 170; --art-y: 414; --art-w: 101; --art-h: 58; }
.format-icon-face { --art-x: 942; --art-y: 398; --art-w: 78; --art-h: 75; }
.format-icon-support { --art-x: 139; --art-y: 610; --art-w: 82; --art-h: 69; }
.format-icon-recipes { --art-x: 976; --art-y: 609; --art-w: 83; --art-h: 71; }
.format-icon-chat { --art-x: 175; --art-y: 834; --art-w: 105; --art-h: 66; }
.format-icon-app { --art-x: 929; --art-y: 813; --art-w: 69; --art-h: 88; width: clamp(18px, 4.5cqw, 25px); }

.format-outro {
  position: relative;
  margin: 3.8cqw 2% 0;
  color: #58090b;
  font: italic 600 clamp(21px, 6.25cqw, 32px)/1.03 var(--display);
}

.format-outro p { margin: 0; }

.format-outro p + p {
  margin-top: .13em;
  color: #74442e;
  font-size: .67em;
}
