:root {
  --fondo: #e8e5de;          /* the page around the shop */
  --carta: #faf9f6;          /* the shop window */
  --inchiostro: #16191a;     /* the words and the drawn icons */
  --tenue: #737a76;          /* the small words */
  --filo: rgba(22, 25, 26, 0.09); /* the thin lines */
  --bosco: #2c5a44;          /* the forest green of the counts and the seam of light */
  --raggio: 18px;            /* the corner of the tiles */
  --sans: 'Mona Sans Variable', 'Mona Sans', system-ui, sans-serif;
}

* {
  box-sizing: border-box;
  margin: 0;
  padding: 0;
}

html,
body {
  height: 100%;
}

body {
  overflow: hidden;
  background:
    radial-gradient(120% 80% at 50% 0%, #f1efea 0%, rgba(241, 239, 234, 0) 60%),
    var(--fondo);
  color: var(--inchiostro);
  font-family: var(--sans);
  -webkit-font-smoothing: antialiased;
}

/* a fine grain over the stage */
body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  opacity: 0.35;
  mix-blend-mode: multiply;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='g'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 0.5 0 0 0 0 0.49 0 0 0 0 0.46 0 0 0 0.09 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23g)'/%3E%3C/svg%3E");
}

.simboli {
  position: absolute;
  width: 0;
  height: 0;
  overflow: hidden;
}

.palco {
  position: relative;
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  cursor: pointer;
  text-align: left;
  -webkit-tap-highlight-color: transparent;
}

.app {
  position: relative;
  display: flex;
  flex-direction: column;
  width: min(620px, 92vw);
  height: min(540px, 90vh);
  padding: clamp(12px, 3vh, 22px) clamp(12px, 3.4vw, 22px);
  border-radius: 24px;
  background: linear-gradient(180deg, #fdfdfb 0%, var(--carta) 45%, #f6f5f1 100%);
  box-shadow:
    0 0 0 1px rgba(22, 25, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.9),
    0 1px 2px rgba(22, 25, 26, 0.05),
    0 8px 18px -6px rgba(22, 25, 26, 0.12),
    0 30px 60px -22px rgba(22, 25, 26, 0.28);
  visibility: hidden;
}

/* ---------- the header of the shop ---------- */
.testa {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex: none;
}

.marchio {
  display: flex;
  align-items: center;
  gap: 7px;
  font-size: 14px;
  font-weight: 640;
  font-stretch: 108%;
  letter-spacing: -0.01em;
}

.marchio svg {
  width: 18px;
  height: 18px;
  fill: var(--bosco);
}

.voci {
  display: flex;
  align-items: center;
  gap: 4px;
  font-size: 12.5px;
  color: var(--tenue);
}

.voce {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 9px;
  border-radius: 99px;
}

.voce.is-on {
  color: var(--inchiostro);
  background: rgba(22, 25, 26, 0.05);
}

.voce svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.corpo {
  position: relative;
  flex: 1;
  margin-top: clamp(8px, 2.4vh, 18px);
}

.vista {
  position: absolute;
  inset: 0;
  display: flex;
  flex-direction: column;
}

.titolo {
  font-size: clamp(19px, 4.6vh, 30px);
  line-height: 1.05;
  font-weight: 620;
  font-stretch: 104%;
  letter-spacing: -0.025em;
}

.sotto {
  margin-top: 5px;
  font-size: clamp(11.5px, 2.1vh, 13.5px);
  color: var(--tenue);
}

.griglia {
  flex: 1;
  display: grid;
  grid-template-columns: 1fr 1fr;
  grid-template-rows: 1fr 1fr;
  gap: clamp(8px, 1.8vh, 12px);
  margin-top: clamp(10px, 2.6vh, 18px);
}

/* ---------- a category tile and the skin that flies with it ---------- */
.tessera {
  position: relative;
  display: block;
  width: 100%;
  height: 100%;
}

.tessera__corpo,
.pelle {
  position: absolute;
  inset: 0;
  border-radius: var(--raggio);
  background:
    radial-gradient(120% 90% at var(--mx, 70%) var(--my, 0%), rgba(255, 255, 255, 0.55) 0%, rgba(255, 255, 255, 0) 55%),
    var(--tinta);
  box-shadow:
    inset 0 0 0 1px rgba(22, 25, 26, 0.05),
    inset 0 1px 0 rgba(255, 255, 255, 0.75),
    0 1px 2px rgba(22, 25, 26, 0.05),
    0 10px 22px -14px rgba(22, 25, 26, 0.3);
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), box-shadow 0.45s ease;
}

.glifo {
  position: absolute;
  right: 12%;
  top: 12%;
  width: clamp(30px, 10vh, 62px);
  height: clamp(30px, 10vh, 62px);
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tessera__testo {
  position: absolute;
  left: clamp(11px, 2.6vh, 16px);
  bottom: clamp(10px, 2.4vh, 15px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.tessera__nome {
  font-size: clamp(14px, 3.1vh, 19px);
  font-weight: 600;
  font-stretch: 100%;
  letter-spacing: -0.015em;
  transition: font-stretch 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.tessera__conto {
  font-size: clamp(10.5px, 1.9vh, 12px);
  color: var(--tenue);
}

.tessera__freccia,
.pezzo__freccia {
  position: absolute;
  right: clamp(9px, 2.2vh, 13px);
  bottom: clamp(9px, 2.2vh, 13px);
  width: 24px;
  height: 24px;
  padding: 5px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.6);
  box-shadow: inset 0 0 0 1px rgba(22, 25, 26, 0.06);
  fill: none;
  stroke: var(--inchiostro);
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

@media (hover: hover) {
  .tessera:hover .tessera__corpo {
    transform: translateY(-2px);
    box-shadow:
      inset 0 0 0 1px rgba(22, 25, 26, 0.06),
      inset 0 1px 0 rgba(255, 255, 255, 0.8),
      0 2px 4px rgba(22, 25, 26, 0.06),
      0 18px 30px -14px rgba(22, 25, 26, 0.36);
  }
  .tessera:hover .glifo {
    transform: translateY(-2px) rotate(-4deg);
  }
  .tessera:hover .tessera__nome {
    font-stretch: 112%;
  }
  .tessera:hover .tessera__freccia {
    transform: translateX(2px);
    background-color: #fff;
  }
}

/* the same states for the fake pointer of the demo */
.tessera.e-sopra .tessera__corpo {
  transform: translateY(-2px);
  box-shadow:
    inset 0 0 0 1px rgba(22, 25, 26, 0.06),
    inset 0 1px 0 rgba(255, 255, 255, 0.8),
    0 2px 4px rgba(22, 25, 26, 0.06),
    0 18px 30px -14px rgba(22, 25, 26, 0.36);
}

.tessera.e-sopra .glifo {
  transform: translateY(-2px) rotate(-4deg);
}

.tessera.e-sopra .tessera__nome {
  font-stretch: 112%;
}

.tessera.e-sopra .tessera__freccia {
  transform: translateX(2px);
  background-color: #fff;
}

.tessera.e-premuta .tessera__corpo,
.tessera:active .tessera__corpo {
  transform: translateY(0) scale(0.985);
  transition-duration: 0.12s;
}

/* ---------- the subcategory page ---------- */
.vista--sub {
  visibility: hidden;
}

.sub__riga {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.indietro {
  display: block;
  margin-left: -6px;
}

.indietro__dentro {
  display: flex;
  align-items: center;
  gap: 4px;
  padding: 5px 10px 5px 6px;
  border-radius: 99px;
  font-size: 12.5px;
  font-weight: 540;
  transition: background-color 0.3s ease, transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.indietro svg {
  width: 15px;
  height: 15px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@media (hover: hover) {
  .indietro:hover .indietro__dentro {
    background-color: rgba(22, 25, 26, 0.05);
  }
  .indietro:hover svg {
    transform: translateX(-2px);
  }
}

.indietro.e-sopra .indietro__dentro {
  background-color: rgba(22, 25, 26, 0.05);
}

.indietro.e-sopra svg {
  transform: translateX(-2px);
}

.indietro.e-premuta .indietro__dentro {
  transform: scale(0.96);
}

.briciole {
  display: flex;
  align-items: center;
  gap: 3px;
  font-size: 11.5px;
  color: var(--tenue);
}

.briciole svg {
  width: 12px;
  height: 12px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.6;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.briciole span {
  color: var(--bosco);
  font-weight: 560;
}

.sub__titolo {
  display: flex;
  align-items: baseline;
  gap: 10px;
  margin-top: clamp(6px, 1.8vh, 12px);
}

.fessura {
  overflow: hidden;
  padding-bottom: 0.08em;
}

.sub__conto {
  font-size: clamp(11.5px, 2.1vh, 13px);
  color: var(--tenue);
}

.sub__conto span {
  color: var(--bosco);
  font-weight: 600;
}

.filtri {
  display: flex;
  gap: 6px;
  margin-top: clamp(7px, 1.8vh, 12px);
}

.filtro {
  padding: 4px 10px;
  border-radius: 99px;
  font-size: 11.5px;
  color: var(--inchiostro);
  background: rgba(255, 255, 255, 0.7);
  box-shadow: inset 0 0 0 1px var(--filo), 0 1px 1px rgba(22, 25, 26, 0.03);
}

.sub__area {
  flex: 1;
  margin-top: clamp(10px, 2.4vh, 16px);
}

/* ---------- the four pieces the tile splits into ---------- */
.pezzi {
  position: absolute;
  inset: 0;
  pointer-events: none;
}

.pezzo {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
  border-radius: var(--raggio);
  --l: 1;
}

.pezzi.e-aperti .pezzo {
  pointer-events: auto;
}

.pezzo__corpo {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  overflow: hidden;
  background:
    radial-gradient(130% 100% at 85% 0%, rgba(255, 255, 255, calc(var(--l) * 0.5)) 0%, rgba(255, 255, 255, 0) 55%),
    var(--tinta, #e4e4e0);
  box-shadow:
    inset 0 0 0 1px rgba(22, 25, 26, calc(var(--l) * 0.05)),
    inset 0 1px 0 rgba(255, 255, 255, calc(var(--l) * 0.75)),
    0 1px 2px rgba(22, 25, 26, calc(var(--l) * 0.05)),
    0 10px 22px -14px rgba(22, 25, 26, calc(var(--l) * 0.3));
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pezzo .glifo {
  left: clamp(10px, 2.4vh, 15px);
  right: auto;
  top: clamp(9px, 2.2vh, 14px);
  width: clamp(24px, 7.4vh, 44px);
  height: clamp(24px, 7.4vh, 44px);
}

.pezzo__testo {
  position: absolute;
  left: clamp(10px, 2.4vh, 15px);
  right: 8px;
  bottom: clamp(9px, 2.2vh, 13px);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.pezzo__nome {
  font-size: clamp(12.5px, 2.6vh, 16px);
  font-weight: 600;
  letter-spacing: -0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: font-stretch 0.5s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.pezzo__dati {
  display: flex;
  gap: 8px;
  font-size: clamp(10px, 1.8vh, 11.5px);
  color: var(--tenue);
  white-space: nowrap;
}

.pezzo__conto {
  color: var(--bosco);
  font-weight: 600;
}

.pezzo__prezzo {
  padding-left: 8px;
  box-shadow: inset 1px 0 0 rgba(22, 25, 26, 0.14);
}

@media (hover: hover) {
  .pezzi.e-aperti .pezzo:hover .pezzo__corpo {
    transform: translateY(-2px);
  }
  .pezzi.e-aperti .pezzo:hover .glifo {
    transform: translateY(-1px) rotate(-5deg);
  }
  .pezzi.e-aperti .pezzo:hover .pezzo__nome {
    font-stretch: 110%;
  }
  .pezzi.e-aperti .pezzo:hover .pezzo__freccia {
    transform: translateX(2px);
    background-color: #fff;
  }
}

.pezzi.e-aperti .pezzo.e-sopra .pezzo__corpo {
  transform: translateY(-2px);
}

.pezzi.e-aperti .pezzo.e-sopra .glifo {
  transform: translateY(-1px) rotate(-5deg);
}

.pezzi.e-aperti .pezzo.e-sopra .pezzo__nome {
  font-stretch: 110%;
}

.pezzi.e-aperti .pezzo.e-sopra .pezzo__freccia {
  transform: translateX(2px);
  background-color: #fff;
}

.pezzo__freccia {
  top: clamp(9px, 2.2vh, 13px);
  bottom: auto;
}

.pelle .glifo,
.pezzo__freccia {
  transition: none;
}

.pezzi.e-aperti .pezzo__freccia {
  transition: transform 0.45s cubic-bezier(0.34, 1.56, 0.64, 1), background-color 0.3s ease;
}

.pelle {
  left: 0;
  top: 0;
  right: auto;
  bottom: auto;
  visibility: hidden;
  transition: none;
}

/* the seam of light that runs across the tile just before it splits */
.cucitura {
  position: absolute;
  left: 0;
  top: 0;
  visibility: hidden;
}

.cucitura__riga {
  position: absolute;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0) 0%, #fff 30%, #fff 70%, rgba(255, 255, 255, 0) 100%);
  box-shadow: 0 0 10px 1px rgba(255, 255, 255, 0.9), 0 0 22px 2px rgba(44, 90, 68, 0.25);
}

.cucitura__riga--o {
  left: 0;
  right: 0;
  top: 50%;
  height: 1.5px;
  margin-top: -0.75px;
}

.cucitura__riga--v {
  top: 0;
  bottom: 0;
  left: 50%;
  width: 1.5px;
  margin-left: -0.75px;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0) 0%, #fff 30%, #fff 70%, rgba(255, 255, 255, 0) 100%);
}

/* ---------- the fake pointer of the demo ---------- */
.puntatore {
  position: absolute;
  z-index: 9;
  left: 0;
  top: 0;
  width: 22px;
  height: 22px;
  margin: -3px 0 0 -5px;
  pointer-events: none;
  visibility: hidden;
  opacity: 0;
  filter: drop-shadow(0 2px 3px rgba(0, 0, 0, 0.25));
}

.puntatore svg {
  width: 100%;
  height: 100%;
  fill: var(--inchiostro);
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linejoin: round;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* small windows: fewer words, the same movement */
@media (max-width: 420px) {
  .voce--nascosta {
    display: none;
  }
  .briciole {
    display: none;
  }
  .tessera__freccia,
  .pezzo__freccia {
    width: 22px;
    height: 22px;
  }
}

@media (max-height: 470px) {
  .sotto {
    display: none;
  }
  .filtri {
    display: none;
  }
}
