:root {
  --start: #c9d0cc;          /* the colour the page opens with (Harbour Fog) */
  --scuro: #1d1c1a;          /* ink on light paint */
  --chiaro: #f7f4ee;         /* ink on dark paint */
  --font: "Mona Sans Variable", "Mona Sans", system-ui, sans-serif;
}

* { box-sizing: border-box; margin: 0; padding: 0; }
html, body { height: 100%; }
body { font-family: var(--font); background: var(--start); overflow: hidden; -webkit-font-smoothing: antialiased; }

.pagina {
  position: relative; height: 100vh; height: 100lvh; max-height: 100vh; overflow: hidden;
  background: var(--start);
  display: grid; grid-template-rows: auto 1fr auto;
  padding: clamp(14px, 3vh, 30px) clamp(16px, 4vw, 56px);
}
.piena { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; z-index: 0; overflow: visible; }

[data-tinta] { --ink: var(--scuro); --carta: var(--start); position: relative; z-index: 1; color: var(--ink); }

/* ---- header ---- */
.testa { display: flex; justify-content: space-between; align-items: baseline; gap: 1rem; font-size: clamp(11px, .6vw + 6px, 14px); }
.marchio { font-weight: 640; letter-spacing: -.01em; font-stretch: 112%; }
.marchio span { font-weight: 420; opacity: .62; }
.voci { display: flex; gap: 1.6em; }
.voci a { color: inherit; text-decoration: none; opacity: .62; transition: opacity .3s; }
@media (hover: hover) { .voci a:hover { opacity: 1; } }

/* ---- the colour ---- */
.colore { align-self: center; min-width: 0; }
[data-rullo] { display: block; overflow: hidden; position: relative; padding-bottom: .08em; margin-bottom: -.08em; }
[data-rullo] .riga { display: block; white-space: nowrap; }
[data-rullo] .riga + .riga { position: absolute; left: 0; top: 0; }
.sopra { font-size: clamp(10px, .55vw + 6px, 13px); letter-spacing: .04em; text-transform: uppercase; opacity: .7; margin-bottom: clamp(6px, 1.4vh, 14px); }
.nome {
  font-size: min(10.5vw, 15vh); line-height: .96; font-weight: 560; letter-spacing: -.035em;
  font-stretch: 118%; font-variation-settings: "wdth" 118;
}
.codice { font-size: clamp(11px, .6vw + 6px, 14px); margin-top: clamp(8px, 1.6vh, 16px); font-variant-numeric: tabular-nums; letter-spacing: .02em; opacity: .78; }
.nota { font-size: clamp(12px, .7vw + 7px, 17px); line-height: 1.4; margin-top: clamp(8px, 1.6vh, 16px); max-width: 26em; opacity: .9; }
.nota .riga { white-space: normal; }

/* the elastic pill of the site, in the colour of the ink */
.pillola {
  position: relative; display: inline-flex; align-items: center; gap: .9em;
  margin-top: clamp(12px, 2.6vh, 26px); padding: .9em 1.5em; border: 0; border-radius: 999px; cursor: pointer;
  font: inherit; font-size: clamp(12px, .55vw + 8px, 15px); font-weight: 560; color: var(--carta); background: none;
  font-stretch: 100%; transition: font-stretch .5s cubic-bezier(.3,1.6,.5,1);
}
.pillola__fondo { position: absolute; inset: 0; border-radius: inherit; background: var(--ink); z-index: -1; }
.pillola__testo, .pillola__prezzo { position: relative; }
.pillola__prezzo { font-weight: 420; opacity: .72; font-variant-numeric: tabular-nums; }
@media (hover: hover) { .pillola:hover { font-stretch: 112%; } }
.pillola:focus-visible { outline: 1px solid var(--ink); outline-offset: 4px; }

/* ---- the swatches ---- */
.campioni { display: flex; gap: clamp(8px, 1.6vw, 22px); align-items: flex-end; flex-wrap: nowrap; }
.campione {
  flex: 0 1 clamp(44px, 9vw, 112px); min-width: 0; border: 0; background: none; cursor: pointer; text-align: left;
  font: inherit; color: inherit; padding: 0;
}
.campione__chip {
  display: block; aspect-ratio: 4 / 3; width: 100%; border-radius: 6px; background: var(--c);
  box-shadow: inset 0 0 0 1px rgba(0, 0, 0, .08), 0 0 0 0 rgba(0, 0, 0, 0);
  transform-origin: 50% 100%;
}
.campione__nome {
  display: block; margin-top: 7px; font-size: clamp(9px, .45vw + 6px, 12px); white-space: nowrap; overflow: hidden;
  text-overflow: ellipsis; opacity: .62; transition: opacity .3s;
}
.campione[aria-checked="true"] .campione__nome { opacity: 1; }
.campione__segno { display: block; height: 1px; margin-top: 5px; background: var(--ink); transform-origin: 0 50%; }
@media (hover: hover) { .campione:hover .campione__nome { opacity: 1; } }
.campione:focus-visible { outline: none; }
.campione:focus-visible .campione__chip { outline: 1px solid var(--ink); outline-offset: 3px; }

@media (max-width: 640px) {
  .voci { display: none; }
  .campione__nome { font-size: 9px; white-space: normal; line-height: 1.15; min-height: 2.3em; text-overflow: clip; }
  .nota { max-width: 22em; }
}
@media (max-height: 460px) {
  .nota { display: none; }
}
