/* Review cards that climb in tilted, and the last one turns over into the page. Colours in :root (the Playground palette). */
:root {
  --fondo: #e3a898;
  --chiaro: #eae6e3;
  --scuro: #2d2a26;
  --limone: #efc415;
  --kimchi: #d32929;
  --miele: #8b231a;
  --accento: #f45016;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--fondo); }
body {
  background: var(--fondo);
  color: var(--scuro);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.corsa { position: relative; height: 500vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, rgba(255, 255, 255, 0.16), transparent 60%),
    radial-gradient(90% 70% at 50% 110%, rgba(139, 35, 26, 0.16), transparent 70%),
    var(--fondo);
}

/* the paper grain, an SVG noise as a background */
.grana {
  position: absolute;
  inset: 0;
  pointer-events: none;
  opacity: 0.22;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 .5  0 0 0 0 .45  0 0 0 0 .4  0 0 0 .55 0'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}

.testa {
  position: absolute;
  left: 0;
  right: 0;
  top: clamp(14px, 6vh, 72px);
  text-align: center;
  padding: 0 16px;
}
.occhiello {
  display: inline-block;
  font-size: clamp(10px, min(1.3vw, 2.2vh), 13px);
  font-weight: 600;
  font-stretch: 110%;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--scuro);
  opacity: 0.72;
}
.titolo {
  margin-top: clamp(2px, 0.8vh, 10px);
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  font-stretch: 62%;
  font-weight: 860;
  font-size: clamp(34px, min(12vw, 13vh), 150px);
  line-height: 0.86;
  letter-spacing: -0.005em;
  text-transform: uppercase;
  color: var(--chiaro);
  text-shadow: 0 1px 0 rgba(255, 255, 255, 0.25), 0 18px 40px rgba(139, 35, 26, 0.18);
}

/* the deck: three cards, centred a little under the middle; JS gives them their size and centres them */
.mazzo { position: absolute; inset: 0; }
.carta {
  position: absolute;
  left: 50%;
  top: 58%;
  width: 260px;
  height: 325px;
  --raggio: 18px;
}
.carta__ombra {
  position: absolute;
  inset: 0;
  border-radius: var(--raggio);
  box-shadow:
    0 1px 1px rgba(60, 20, 10, 0.08),
    0 4px 8px rgba(60, 20, 10, 0.08),
    0 14px 24px -6px rgba(60, 20, 10, 0.16),
    0 34px 60px -16px rgba(60, 20, 10, 0.32);
}
.carta__scena { position: absolute; inset: 0; perspective: 2000px; }
.carta__dentro { position: absolute; inset: 0; transform-style: preserve-3d; }

.faccia {
  position: absolute;
  inset: 0;
  border-radius: var(--raggio);
  overflow: hidden;
  -webkit-backface-visibility: hidden;
  backface-visibility: hidden;
  container-type: size;
}
/* the edge that catches the light, the stitched line, the grain of the card */
.fronte {
  color: var(--chiaro);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.38), inset 0 -1px 0 rgba(0, 0, 0, 0.16), inset 0 0 0 1px rgba(255, 255, 255, 0.12);
}
.fronte::before {
  content: '';
  position: absolute;
  inset: 8px;
  border-radius: calc(var(--raggio) - 6px);
  border: 1px dashed rgba(255, 255, 255, 0.28);
  pointer-events: none;
}
.fronte::after {
  content: '';
  position: absolute;
  inset: 0;
  opacity: 0.3;
  mix-blend-mode: soft-light;
  pointer-events: none;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='140' height='140'><filter id='g'><feTurbulence type='fractalNoise' baseFrequency='1.1' numOctaves='2' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23g)'/></svg>");
}
.carta--limone .fronte {
  color: var(--scuro);
  background: radial-gradient(130% 90% at 20% 0%, #ffe066, transparent 60%), linear-gradient(160deg, var(--limone), #d9a90c);
}
.carta--limone .fronte::before { border-color: rgba(45, 42, 38, 0.2); }
.carta--kimchi .fronte {
  background: radial-gradient(130% 90% at 20% 0%, #ef4a40, transparent 60%), linear-gradient(160deg, var(--kimchi), #a81c1c);
}
.carta--miele .fronte {
  background: radial-gradient(130% 90% at 20% 0%, #ad3626, transparent 60%), linear-gradient(160deg, var(--miele), #5f160f);
}

/* the front, laid out at the card's resting size so it never reflows while the card grows */
.fronte__in {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 260px;
  height: 325px;
  padding: 11cqmin 10cqmin 10cqmin;
  display: flex;
  flex-direction: column;
  container-type: inline-size;
}
.fronte__testa { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.stelle { display: inline-flex; gap: 1.4cqw; }
.stelle svg { width: 6.2cqw; height: 6.2cqw; fill: currentColor; }
.gusto {
  font-size: max(9px, 4.3cqw);
  font-weight: 600;
  font-stretch: 105%;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  padding: 0.45em 0.8em;
  border-radius: 999px;
  border: 1px solid currentColor;
  opacity: 0.8;
  white-space: nowrap;
}
.virgolette { width: 12cqw; height: 9.6cqw; margin-top: 9cqw; fill: currentColor; opacity: 0.32; }
.frase {
  margin-top: 4cqw;
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  font-stretch: 62%;
  font-weight: 820;
  font-size: 12.4cqw;
  line-height: 0.94;
  text-transform: uppercase;
  letter-spacing: -0.003em;
  text-wrap: balance;
}
.firma { margin-top: auto; display: flex; align-items: center; gap: 3cqw; font-size: max(9px, 4.6cqw); }
.iniziali {
  flex: none;
  display: grid;
  place-items: center;
  width: 2.5em;
  height: 2.5em;
  border-radius: 50%;
  font-weight: 700;
  font-size: 0.86em;
  letter-spacing: 0.02em;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.3);
}
.carta--limone .iniziali { background: rgba(45, 42, 38, 0.1); box-shadow: inset 0 0 0 1px rgba(45, 42, 38, 0.2); }
.chi { display: flex; flex-direction: column; line-height: 1.2; min-width: 0; }
.chi b { font-weight: 650; }
.chi span { opacity: 0.72; font-size: 0.9em; white-space: nowrap; }
.verificato { margin-left: auto; display: inline-flex; align-items: center; gap: 0.3em; font-size: 0.82em; font-weight: 600; opacity: 0.8; }
.verificato svg { width: 1.2em; height: 1.2em; }

/* the light that passes over a face, and the shade of a face turning away */
.luce, .buio { position: absolute; inset: 0; pointer-events: none; }
.luce {
  mix-blend-mode: soft-light;
  background: linear-gradient(105deg, transparent 38%, rgba(255, 255, 255, 0.95) 50%, transparent 62%) no-repeat;
  background-size: 260% 100%;
  background-position: 130% 0;
}
.buio { background: linear-gradient(90deg, rgba(30, 10, 6, 0.55), rgba(30, 10, 6, 0.25)); opacity: 0; }

/* the back: the press room, already turned by 180 degrees */
.retro { transform: rotateY(180deg); background: var(--chiaro); color: var(--scuro); }
.pannello {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 1440px;
  height: 900px;
  background:
    radial-gradient(90% 60% at 100% 0%, rgba(244, 80, 22, 0.08), transparent 60%),
    var(--chiaro);
  container-type: size;
  display: flex;
  flex-direction: column;
  padding: clamp(14px, 4cqh, 44px) clamp(16px, 5cqw, 72px);
}
.pannello .grana { opacity: 0.16; }
.pan__barra {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-size: clamp(10px, min(1.1cqw, 2.4cqh), 14px);
  font-weight: 600;
  letter-spacing: 0.1em;
  text-transform: uppercase;
}
.marchio { display: inline-flex; align-items: center; gap: 0.5em; font-stretch: 112%; letter-spacing: 0.06em; }
.marchio svg { width: 1.2em; height: 1.2em; fill: var(--kimchi); }
.pan__voci { display: inline-flex; gap: clamp(10px, 2.4cqw, 34px); opacity: 0.6; }
.pan__voci .e-qui { opacity: 1; color: var(--kimchi); }
.pan__voci span:first-child { display: none; }
@container (min-width: 520px) { .pan__voci span:first-child { display: inline; } }

.pan__corpo { position: relative; margin-top: auto; }
.pan__citazione {
  position: relative;
  margin-top: auto;
  align-self: flex-end;
  max-width: 34em;
  text-align: right;
  font-size: clamp(15px, min(4.6cqw, 3.6cqh), 30px);
  font-weight: 480;
  font-stretch: 96%;
  line-height: 1.12;
  letter-spacing: -0.015em;
}
.pan__fonte { margin-top: 0.7em; font-size: clamp(9px, 0.48em, 15px); font-weight: 600; letter-spacing: 0.14em; text-transform: uppercase; color: var(--kimchi); }
@container (max-height: 520px) { .pan__citazione { display: none; } }
.pan__occhiello {
  font-size: clamp(10px, min(1.2cqw, 2.6cqh), 15px);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--kimchi);
}
.pan__titolo {
  margin-top: 0.1em;
  font-family: 'Archivo Variable', 'Archivo', system-ui, sans-serif;
  font-stretch: 62%;
  font-weight: 870;
  font-size: min(17cqw, 23cqh);
  line-height: 0.84;
  text-transform: uppercase;
  letter-spacing: -0.008em;
}
.maschera { display: block; overflow: hidden; padding-bottom: 0.06em; margin-bottom: -0.06em; }
.maschera > span { display: block; }

.elenco { list-style: none; margin-top: clamp(10px, 4cqh, 48px); }
.articolo {
  position: relative;
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-areas: 'testata freccia' 'titolo freccia';
  column-gap: 14px;
  align-items: center;
  padding: clamp(7px, 2.1cqh, 22px) 0;
  cursor: pointer;
}
@container (min-width: 620px) {
  .articolo { grid-template-columns: minmax(150px, 0.8fr) 3fr auto auto; grid-template-areas: 'testata titolo data freccia'; column-gap: clamp(14px, 3cqw, 48px); }
}
.filo { position: absolute; left: 0; right: 0; top: 0; height: 1px; background: rgba(45, 42, 38, 0.22); transform-origin: 0 50%; }
.filo--giu { top: auto; bottom: 0; }
.a-testata { grid-area: testata; font-size: clamp(9px, min(1.1cqw, 2.4cqh), 14px); font-weight: 600; letter-spacing: 0.1em; text-transform: uppercase; opacity: 0.62; }
.a-titolo {
  grid-area: titolo;
  font-size: clamp(13px, min(2.4cqw, 4.4cqh), 34px);
  font-weight: 560;
  font-stretch: 92%;
  line-height: 1.1;
  letter-spacing: -0.015em;
}
.a-data { grid-area: data; display: none; font-size: clamp(10px, 1.1cqw, 14px); opacity: 0.6; white-space: nowrap; }
@container (min-width: 620px) { .a-data { display: block; } }
.a-freccia { grid-area: freccia; }
.a-freccia svg {
  display: block;
  width: clamp(26px, min(3.2cqw, 6cqh), 44px);
  height: clamp(26px, min(3.2cqw, 6cqh), 44px);
  padding: 22%;
  border-radius: 50%;
  color: var(--scuro);
  box-shadow: inset 0 0 0 1px rgba(45, 42, 38, 0.25);
  transition: background-color 0.35s cubic-bezier(.2, .8, .2, 1), color 0.35s cubic-bezier(.2, .8, .2, 1), transform 0.45s cubic-bezier(.3, 1.6, .5, 1);
}
.a-titolo { transition: transform 0.5s cubic-bezier(.3, 1.5, .5, 1); }
@media (hover: hover) {
  .articolo:hover .a-freccia svg { background-color: var(--kimchi); color: var(--chiaro); box-shadow: none; transform: rotate(45deg); }
  .articolo:hover .a-titolo { transform: translateX(6px); }
}
