:root {
  --fondo: #e3a898;
  --fondo-alto: #ebbcae;
  --carta: #f6f1ec;
  --carta-bassa: #efe8e1;
  --inchiostro: #2d2a26;
  --grigio: #8a7f78;
  --linea: rgba(45, 42, 38, 0.12);
  --raggio: 7cqw;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body {
  background: radial-gradient(120% 90% at 50% 0%, var(--fondo-alto) 0%, var(--fondo) 62%);
  background-color: var(--fondo);
  color: var(--inchiostro);
  font-family: 'Archivo Variable', ui-sans-serif, system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow: hidden;
}

.palco {
  position: relative;
  height: 100vh;
  display: grid;
  place-items: center;
  overflow: hidden;
}

/* four cards in a row; on narrow or tall screens a 2 x 2 grid. Sizes are measured on width and height together */
.fila {
  --w: min(21.5vw, 60vh);
  --gap: min(2vw, 3vh);
  display: grid;
  grid-template-columns: repeat(4, var(--w));
  gap: var(--gap);
}
@media (max-aspect-ratio: 5/4) {
  .fila {
    --w: min(43vw, 33.5vh);
    --gap: min(3vw, 2.6vh);
    grid-template-columns: repeat(2, var(--w));
  }
}

.card {
  position: relative;
  width: var(--w);
  aspect-ratio: 100 / 134;
  container-type: inline-size;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

/* the lifted shadow lives on its own layer, so GSAP only fades it */
.card__ombra {
  position: absolute;
  inset: 0;
  border-radius: var(--raggio);
  opacity: 0;
  box-shadow:
    0 1px 1px rgba(80, 30, 20, 0.08),
    0 3cqw 5cqw -1cqw rgba(80, 30, 20, 0.16),
    0 9cqw 14cqw -4cqw rgba(80, 30, 20, 0.22),
    0 20cqw 30cqw -8cqw rgba(80, 30, 20, 0.18);
}

.card__corpo {
  position: absolute;
  inset: 0;
  border-radius: var(--raggio);
  background: linear-gradient(180deg, var(--carta) 0%, var(--carta-bassa) 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    inset 0 0 0 1px rgba(255, 255, 255, 0.35),
    0 1px 2px rgba(80, 30, 20, 0.1),
    0 2cqw 4cqw -2cqw rgba(80, 30, 20, 0.14);
  padding: 6cqw 6.5cqw 6.5cqw;
  display: flex;
  flex-direction: column;
}

/* soft light that follows the pointer */
.card__luce {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  opacity: 0;
  background: radial-gradient(55cqw 55cqw at var(--mx, 50%) var(--my, 30%), rgba(255, 255, 255, 0.75), rgba(255, 255, 255, 0) 70%);
  mix-blend-mode: soft-light;
  z-index: 3;
}

.card__testa {
  display: flex;
  justify-content: space-between;
  align-items: center;
  font-size: 4.6cqw;
  line-height: 1;
  position: relative;
  z-index: 2;
}
.marchio { font-weight: 800; font-stretch: 70%; letter-spacing: 0.08em; text-transform: uppercase; }
.peso {
  font-weight: 560;
  color: var(--grigio);
  padding: 1.4cqw 2.6cqw;
  border-radius: 99px;
  box-shadow: inset 0 0 0 1px var(--linea);
}

.scena {
  position: relative;
  flex: 1;
  margin: 3.5cqw -1cqw 3cqw;
  border-radius: 5cqw;
  background:
    radial-gradient(70% 60% at 50% 42%, color-mix(in srgb, var(--tinta) 100%, #fff 30%) 0%, var(--tinta) 55%, color-mix(in srgb, var(--tinta) 82%, var(--c) 18%) 100%);
  box-shadow: inset 0 0 0 1px rgba(45, 42, 38, 0.05), inset 0 -6cqw 10cqw -6cqw rgba(80, 30, 20, 0.12);
  display: grid;
  place-items: center;
}
.scena__ombra {
  position: absolute;
  left: 50%;
  bottom: 9%;
  width: 46cqw;
  height: 5cqw;
  margin-left: -23cqw;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(60, 20, 10, 0.34), rgba(60, 20, 10, 0));
  filter: blur(0.6cqw);
}
.busta {
  position: relative;
  width: 40cqw;
  aspect-ratio: 120 / 160;
  margin-bottom: 4cqw;
  transform-origin: 50% 96%;
}
.busta svg { display: block; width: 100%; height: 100%; overflow: visible; }

.piede { position: relative; z-index: 2; min-height: 28cqw; padding-right: 32cqw; }
.nome {
  font-size: 9cqw;
  line-height: 0.92;
  font-weight: 820;
  font-stretch: 64%;
  text-transform: uppercase;
  letter-spacing: -0.005em;
  white-space: nowrap;
}
.sotto { margin-top: 1.6cqw; font-size: 4.3cqw; line-height: 1.2; color: var(--grigio); font-weight: 480; }
.prezzo { margin-top: 2.6cqw; font-size: 6.6cqw; font-weight: 700; font-stretch: 90%; line-height: 1; }

.calore {
  display: flex;
  position: static;
  margin-top: 2.4cqw;
  align-items: center;
  gap: 0.9cqw;
  font-size: 3.4cqw;
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--grigio);
}
.calore span { margin-right: 1.2cqw; }
.calore i {
  display: block;
  width: 3.6cqw;
  height: 1.3cqw;
  border-radius: 1cqw;
  background: var(--linea);
  overflow: hidden;
  position: relative;
}
.calore i b { position: absolute; inset: 0; background: var(--c); border-radius: inherit; transform-origin: 0 50%; }

/* the round badge: magnet (x, y) > spring (scale) > ring that spins + fill that grows + arrow that stays */
.bollino {
  position: absolute;
  right: 5cqw;
  bottom: 5cqw;
  width: 29cqw;
  height: 29cqw;
  z-index: 4;
  color: var(--inchiostro);
  border-radius: 50%;
  outline: none;
  -webkit-tap-highlight-color: transparent;
}
.bollino:focus-visible .bollino__molla { box-shadow: 0 0 0 1.2cqw rgba(45, 42, 38, 0.18); }
.bollino__molla { position: absolute; inset: 0; border-radius: 50%; display: block; }
.bollino__pieno {
  position: absolute;
  inset: 0;
  border-radius: 50%;
  background: radial-gradient(80% 80% at 35% 28%, color-mix(in srgb, var(--c) 80%, #fff 20%) 0%, var(--c) 48%, var(--cs) 100%);
  box-shadow: inset 0 0.5cqw 0.8cqw rgba(255, 255, 255, 0.28), 0 1.6cqw 3.4cqw -1cqw color-mix(in srgb, var(--cs) 70%, transparent);
}
.bollino__giro { position: absolute; inset: 0; width: 100%; height: 100%; overflow: visible; }
.bollino__giro text { font-family: 'Archivo Variable', sans-serif; font-size: 11.4px; font-weight: 700; font-stretch: 78%; letter-spacing: 0.12em; fill: currentColor; }
.bollino__giro .anello { fill: none; stroke: currentColor; stroke-width: 1.1; opacity: 0.85; }
.bollino__giro .anello-dentro { fill: none; stroke: currentColor; stroke-width: 0.7; opacity: 0.28; }
.bollino__freccia {
  position: absolute;
  left: 34%;
  top: 34%;
  width: 32%;
  height: 32%;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.puntatore {
  position: absolute;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  z-index: 20;
  pointer-events: none;
  opacity: 0;
  visibility: hidden;
}
.puntatore path { fill: var(--inchiostro); stroke: #fff; stroke-width: 1.4; stroke-linejoin: round; }
