/* Flavours that swap as you scroll, with the spinning bag and the ground that changes colour.
   Colours in :root (the Playground palette): the ground of each flavour, its bag and the ink on top. */
:root {
  --kimchi: #d32929;
  --chicken: #8b231a;
  --buffalo: #f45016;
  --lemon: #efc415;
  --sacco-kimchi: #2d2a26;
  --sacco-chicken: #e3a898;
  --sacco-buffalo: #8b231a;
  --sacco-lemon: #d32929;
  --carta: #eae6e3;
  --scuro: #2d2a26;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html { background: var(--kimchi); }
body {
  background: var(--kimchi);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
.defs { position: absolute; width: 0; height: 0; overflow: hidden; }

.corsa { position: relative; height: 460vh; }
.palco {
  --bg: var(--kimchi);
  --ink: var(--carta);
  --sh: min(48vh, 66vw);
  --sw: calc(var(--sh) * 0.714);
  --base: 19%;
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  overflow: hidden;
  background: var(--bg);
  color: var(--ink);
  isolation: isolate;
}

/* soft studio light behind the bag, and a darker floor */
.luce {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(ellipse 46% 42% at 50% 52%, rgba(255, 255, 255, 0.2), rgba(255, 255, 255, 0) 70%),
    linear-gradient(to bottom, rgba(0, 0, 0, 0) 62%, rgba(0, 0, 0, 0.12));
  pointer-events: none;
}

/* the giant word, behind the bag */
.parole {
  position: absolute;
  left: 0;
  right: 0;
  top: 41%;
  display: grid;
  justify-items: center;
  transform: translateY(-50%);
  pointer-events: none;
}
.parola {
  grid-area: 1 / 1;
  font-family: 'Archivo Variable', 'Archivo', Impact, sans-serif;
  font-stretch: 62%;
  font-weight: 900;
  font-size: min(26vw, 34vh);
  line-height: 0.8;
  letter-spacing: -0.012em;
  text-transform: uppercase;
  white-space: nowrap;
  color: var(--w, var(--carta));
}
.cm { display: inline-block; overflow: hidden; line-height: 1; margin: -0.1em 0; vertical-align: top; }
.c, .ci { display: inline-block; line-height: 1; }

/* the bags */
.sacchi {
  position: absolute;
  left: 50%;
  bottom: var(--base);
  width: var(--sw);
  height: var(--sh);
  margin-left: calc(var(--sw) / -2);
}
.sacco { position: absolute; inset: 0; }
.sacco__in { width: 100%; height: 100%; transform-origin: 50% 96%; }
.sacco svg {
  display: block;
  width: 100%;
  height: 100%;
  overflow: visible;
  filter: drop-shadow(0 3px 4px rgba(0, 0, 0, 0.16)) drop-shadow(0 16px 22px rgba(0, 0, 0, 0.18));
}
.sacco text { font-family: 'Archivo Variable', 'Archivo', Impact, sans-serif; font-stretch: 70%; font-weight: 900; }
.sacco .fine { font-family: 'Mona Sans Variable', 'Mona Sans', sans-serif; font-stretch: 100%; font-weight: 600; letter-spacing: 0.08em; }

.ombra {
  position: absolute;
  left: 50%;
  bottom: calc(var(--base) + var(--sh) * 0.035 - var(--sw) * 0.05);
  width: calc(var(--sw) * 1.04);
  height: calc(var(--sw) * 0.1);
  margin-left: calc(var(--sw) * -0.52);
  opacity: 0.42;
  pointer-events: none;
}
.ombra__in {
  width: 100%;
  height: 100%;
  border-radius: 50%;
  background: radial-gradient(closest-side, rgba(12, 12, 12, 1), rgba(12, 12, 12, 0.5) 55%, rgba(12, 12, 12, 0));
  filter: blur(3px);
}

/* header: the mark and the flavour names */
.testa {
  position: absolute;
  top: clamp(12px, 3vh, 28px);
  left: clamp(14px, 3vw, 40px);
  right: clamp(14px, 3vw, 40px);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  z-index: 3;
}
.marca {
  display: flex;
  align-items: center;
  gap: 0.35em;
  font-stretch: 112%;
  font-weight: 800;
  font-size: clamp(13px, min(2.3vh, 4vw), 18px);
  letter-spacing: -0.01em;
}
.marca svg { width: 1em; height: 1em; fill: currentColor; }
.gusti {
  position: relative;
  display: flex;
  padding: 3px;
  border-radius: 999px;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--ink) 22%, transparent);
}
.gusti__pillola {
  position: absolute;
  top: 3px;
  bottom: 3px;
  left: 0;
  width: 0;
  border-radius: 999px;
  background: var(--ink);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.25) inset, 0 2px 6px rgba(0, 0, 0, 0.16);
}
.gusto {
  position: relative;
  appearance: none;
  border: 0;
  background: none;
  color: inherit;
  font: inherit;
  font-stretch: 100%;
  font-weight: 600;
  font-size: clamp(9px, min(1.6vh, 2.5vw), 12px);
  letter-spacing: 0.05em;
  text-transform: uppercase;
  padding: 0.55em clamp(5px, 1.3vw, 13px) 0.5em;
  border-radius: 999px;
  cursor: pointer;
  opacity: 0.62;
}
.gusto span { display: block; }
.gusto[aria-current='true'] { opacity: 1; color: var(--bg); transition: color 0.25s; }

/* the strips with the flavour name, top left */
.strisce {
  position: absolute;
  top: calc(clamp(12px, 3vh, 28px) + clamp(34px, 7vh, 64px));
  left: clamp(14px, 3vw, 40px);
  display: grid;
  z-index: 2;
}
.gruppo { grid-area: 1 / 1; display: flex; flex-direction: column; align-items: flex-start; gap: 4px; }
.striscia { display: block; transform-origin: 0% 50%; }
.striscia__in {
  display: block;
  transform-origin: 0% 50%;
  font-family: 'Archivo Variable', 'Archivo', Impact, sans-serif;
  font-stretch: 72%;
  font-weight: 800;
  text-transform: uppercase;
  font-size: clamp(13px, 3.3vh, 30px);
  line-height: 1;
  padding: 0.2em 0.45em 0.14em;
  border-radius: 3px;
  background: var(--carta);
  color: var(--scuro);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.5) inset, 0 6px 14px -6px rgba(0, 0, 0, 0.35);
}
.striscia + .striscia .striscia__in { background: var(--scuro); color: var(--carta); }

/* bottom: description and the round button */
.piede {
  position: absolute;
  left: clamp(14px, 3vw, 40px);
  right: clamp(14px, 3vw, 40px);
  bottom: clamp(14px, 3.5vh, 32px);
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 16px;
  z-index: 2;
}
.descrizioni { display: grid; }
.descr { grid-area: 1 / 1; font-size: clamp(10.5px, 1.85vh, 16px); line-height: 1.38; font-weight: 500; font-stretch: 100%; }
.riga { display: block; overflow: hidden; }
.riga__t { display: block; white-space: nowrap; }
.bottoni { display: grid; flex: none; }
.bottone {
  grid-area: 1 / 1;
  width: clamp(54px, 12vh, 104px);
  height: clamp(54px, 12vh, 104px);
}
.bottone__in { width: 100%; height: 100%; }
.bottone__faccia {
  display: grid;
  place-items: center;
  align-content: center;
  gap: 0.25em;
  width: 100%;
  height: 100%;
  border-radius: 50%;
  border: 1.5px solid var(--ink);
  color: var(--ink);
  background: transparent;
  font: inherit;
  font-stretch: 100%;
  font-weight: 700;
  font-size: clamp(8px, 1.35vh, 11px);
  letter-spacing: 0.08em;
  line-height: 1.1;
  text-transform: uppercase;
  text-align: center;
  cursor: pointer;
  transform: rotate(15deg);
  transition: transform 0.6s cubic-bezier(0.68, -0.55, 0.27, 1.55), background-color 0.3s, color 0.3s;
}
.bottone__faccia svg { width: 1.6em; height: 1.6em; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.bottone__faccia:active { transform: rotate(15deg) scale(0.94); }
@media (hover: hover) {
  .bottone__faccia:hover { transform: rotate(375deg); background: var(--ink); color: var(--bg); }
  .gusto:hover { opacity: 1; }
}

/* fine grain on the colour */
.grana {
  position: absolute;
  inset: 0;
  pointer-events: none;
  z-index: 5;
  opacity: var(--grana, 0.1);
  mix-blend-mode: overlay;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='180' height='180'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='2' stitchTiles='stitch'/><feColorMatrix values='0 0 0 0 0  0 0 0 0 0  0 0 0 0 0  0 0 0 1.2 0'/></filter><rect width='100%' height='100%' filter='url(%23n)'/></svg>");
}

@media (max-width: 520px) {
  .palco { --base: 21%; }
}
