/* The recipe with the ingredients falling into the bowl on scroll. Colours in :root (the Playground palette). */
:root {
  --fondo: #f5f0e7;
  --inchiostro: #1d1a16;
  --secondario: #7c756b;
  --spento: #b8b0a3;
  --riga: rgba(29, 26, 22, 0.1);
  --accento: #d23a1f;
  --spunta: #2f6e2a;
}

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

.corsa { position: relative; height: 420vh; }
.palco {
  position: sticky;
  top: 0;
  height: 100vh;
  height: 100lvh;
  max-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: clamp(20px, 5vw, 72px);
  padding: clamp(12px, 3vh, 40px) clamp(14px, 4vw, 56px);
  overflow: hidden;
  /* a faint linen weave on the table */
  background:
    repeating-linear-gradient(0deg, rgba(120, 100, 70, 0.025) 0 1px, transparent 1px 3px),
    repeating-linear-gradient(90deg, rgba(120, 100, 70, 0.02) 0 1px, transparent 1px 3px),
    var(--fondo);
}

.tavolo {
  width: min(78vh, 46vw);
  aspect-ratio: 1;
  flex: none;
}
.scena { display: block; width: 100%; height: 100%; overflow: visible; }

.ricetta { width: min(340px, 38vw); flex: none; }
.blog {
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--secondario);
  font-weight: 560;
  margin-bottom: 10px;
}
.titolo {
  font-size: clamp(22px, 3.4vh, 34px);
  line-height: 1.08;
  font-weight: 640;
  font-stretch: 88%;
  letter-spacing: -0.01em;
  margin-bottom: 10px;
}
.dati { display: flex; gap: 14px; font-size: 13px; color: var(--secondario); margin-bottom: clamp(14px, 3vh, 26px); }
.dati span + span { padding-left: 14px; border-left: 1px solid var(--riga); }

.lista { list-style: none; border-top: 1px solid var(--riga); }
.voce {
  display: grid;
  grid-template-columns: 20px 1fr auto;
  align-items: center;
  gap: 10px;
  padding: clamp(7px, 1.35vh, 11px) 0;
  border-bottom: 1px solid var(--riga);
  font-size: 14px;
  position: relative;
}
.voce__nome { transition: none; }
.voce__dose { color: var(--secondario); font-size: 13px; }
.voce__casella { width: 18px; height: 18px; display: block; overflow: visible; }
.voce__casella circle { fill: none; stroke: var(--spento); stroke-width: 1.2; }
.voce__casella .pieno { fill: var(--spunta); stroke: none; transform-box: fill-box; transform-origin: center; }
.voce__casella .segno { fill: none; stroke: #fff; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.voce__luce {
  position: absolute;
  inset: 0 -8px;
  background: rgba(210, 58, 31, 0.06);
  border-radius: 6px;
  opacity: 0;
  pointer-events: none;
}

.stato { margin-top: clamp(12px, 2.4vh, 20px); height: 20px; overflow: hidden; font-size: 13px; color: var(--secondario); }
.stato__testo { display: inline-block; }

.fine { padding: 28px 16px 36px; text-align: center; font-size: 12px; color: var(--secondario); }

/* portrait: the bowl on top, under it the title and the ingredient that is falling now */
@media (max-aspect-ratio: 1/1) {
  .palco { flex-direction: column; gap: clamp(8px, 2vh, 18px); }
  .tavolo { width: min(56vh, 88vw); }
  .ricetta { width: min(440px, 92vw); text-align: center; }
  .blog { margin-bottom: 4px; font-size: 10px; }
  .titolo { font-size: clamp(16px, 3.6vh, 26px); margin-bottom: 4px; }
  .dati { justify-content: center; margin-bottom: 0; font-size: 12px; }
  .lista { display: none; }
  .stato { margin-top: 6px; color: var(--inchiostro); font-weight: 560; }
}
@media (max-aspect-ratio: 1/1) and (max-height: 520px) {
  .tavolo { width: min(60vh, 88vw); }
  .dati, .blog { display: none; }
}
