:root {
  --fondo: #ffffff;
  --inchiostro: #17161a;
  --crema: #f5f0e8;
  --ocra: #e3ac78;
  --carta: #fbf9f4;
  --matita: #6f6a64;
  --grigio: #8b8780;
  --sh: min(156px, 34vh); /* the height of the print */
  --sw: calc(var(--sh) * 0.8);
}

*, *::before, *::after { box-sizing: border-box; }

html, body {
  margin: 0;
  height: 100%;
  background: var(--fondo);
  color: var(--inchiostro);
  font-family: "Mona Sans Variable", system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

.stage {
  position: relative;
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 16px;
  overflow: hidden;
}

/* the frame keeps room above the pill for the print that feeds out */
.frame {
  position: relative;
  display: grid;
  justify-items: center;
  align-content: end;
  width: min(330px, 92vw);
  height: calc(var(--sh) + 148px);
  padding-bottom: 44px;
}

/* ---- the print: cut along the pill's top edge, so it comes out of the pill like out of a printer ---- */
.feed {
  position: absolute;
  z-index: 1;
  left: 50%;
  bottom: 103px; /* the pill's top edge: padding-bottom 44 + pill 60, one pixel inside */
  width: calc(var(--sw) + 120px);
  height: calc(var(--sh) + 40px);
  margin-left: calc((var(--sw) + 120px) / -2);
  clip-path: inset(-80px -80px 0 -80px);
  pointer-events: none;
}
.lift {
  position: absolute;
  left: 50%;
  bottom: 0;
  width: var(--sw);
  height: var(--sh);
  margin-left: calc(var(--sw) / -2);
}
.sheet {
  position: absolute;
  inset: 0;
  display: grid;
  grid-template-rows: 1fr auto;
  padding: 7.5% 7.5% 0;
  border-radius: 2px;
  background:
    radial-gradient(120% 70% at 20% 0%, rgba(255, 255, 255, 0.9), transparent 60%),
    linear-gradient(180deg, #fdfcf8, var(--carta) 55%, #f3efe6);
  box-shadow:
    inset 0 0 0 1px rgba(90, 70, 40, 0.09),
    inset 0 1px 0 #fff,
    0 1px 1px rgba(23, 22, 26, 0.07),
    0 6px 12px -6px rgba(23, 22, 26, 0.16),
    0 24px 34px -20px rgba(60, 36, 20, 0.32);
  transform-origin: 50% 100%;
}
.sheet__img {
  position: relative;
  overflow: hidden;
  border-radius: 1px;
  box-shadow: inset 0 0 0 0.5px rgba(60, 36, 20, 0.2);
}
.sheet__img svg { display: block; width: 100%; height: 100%; }
/* the fresh ink: a gloss that dries off once the print is out */
.sheet__wet {
  position: absolute;
  inset: 0;
  opacity: 0;
  background: linear-gradient(115deg, transparent 20%, rgba(255, 255, 255, 0.32) 42%, transparent 58%),
              linear-gradient(180deg, rgba(255, 255, 255, 0) 60%, rgba(255, 248, 236, 0.22));
  mix-blend-mode: screen;
}
.sheet__foot {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: calc(var(--sh) * 0.17);
  font-size: calc(var(--sh) * 0.043);
  color: var(--matita);
}
.sheet__sign {
  position: absolute;
  right: 2%;
  top: 50%;
  width: 40%;
  height: auto;
  transform: translateY(-55%);
  overflow: visible;
}
.sheet__sign path {
  fill: none;
  stroke: #57524c;
  stroke-width: 0.9;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.sheet__ed {
  font-weight: 520;
  font-style: italic;
  letter-spacing: 0.02em;
  opacity: 0;
}

/* ---- the pill: the button for GSAP (scale), the layers inside for CSS ---- */
.c {
  position: relative;
  z-index: 2;
  display: inline-flex;
  align-items: center;
  gap: 10px;
  height: 60px;
  padding: 0 26px 0 20px;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--crema);
  font: inherit;
  font-size: 16px;
  font-weight: 580;
  font-variation-settings: "wdth" 100;
  letter-spacing: -0.005em;
  cursor: pointer;
  isolation: isolate;
  max-width: 92vw;
  -webkit-tap-highlight-color: transparent;
}
.c:focus-visible { outline: 2px solid var(--ocra); outline-offset: 4px; }

.c__skin, .c__glow, .c__sheen {
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
}
.c__skin {
  z-index: -4;
  background: linear-gradient(180deg, #27252b 0%, var(--inchiostro) 56%, #0e0d10 100%);
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.13),
    inset 0 -1px 0 rgba(0, 0, 0, 0.5),
    0 1px 1px rgba(23, 22, 26, 0.16),
    0 6px 14px -6px rgba(23, 22, 26, 0.3),
    0 22px 40px -22px rgba(23, 22, 26, 0.55);
}
.c__glow {
  z-index: -3;
  overflow: hidden;
  opacity: 0;
  background: radial-gradient(120px 80px at var(--gx, 50%) var(--gy, 50%), rgba(255, 228, 196, 0.16), transparent 70%);
}
.c__sheen {
  z-index: -2;
  overflow: hidden;
  opacity: 0;
  background: linear-gradient(100deg, transparent 30%, rgba(255, 236, 210, 0.24) 48%, transparent 64%);
  background-size: 260% 100%;
  background-position: 120% 0;
}

/* the slot along the top edge, and the print head of light that runs in it */
.c__slot {
  position: absolute;
  z-index: -1;
  left: 50%;
  top: 0;
  width: calc(var(--sw) + 12px);
  height: 3px;
  margin-left: calc((var(--sw) + 12px) / -2);
  border-radius: 0 0 3px 3px;
  background: linear-gradient(180deg, #050506, #1c1b20);
  box-shadow: 0 1px 0 rgba(255, 255, 255, 0.08);
  pointer-events: none;
}
.c__head {
  position: absolute;
  left: 0;
  top: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, #ffd9ad, transparent);
  box-shadow: 0 0 6px 1px rgba(255, 196, 140, 0.55);
  opacity: 0;
}

.c__icon {
  position: relative;
  flex: none;
  width: 22px;
  height: 22px;
}
.c__icon svg {
  position: absolute;
  inset: 0;
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.5;
  stroke-linecap: round;
  stroke-linejoin: round;
  overflow: visible;
}
.i__fill { fill: var(--ocra); stroke: none; opacity: 0.9; }
.i__dune { stroke-width: 1.2; }
.i__line { opacity: 0.45; }
.i__check { opacity: 0; color: var(--ocra); }
.i__check circle { stroke-opacity: 0.4; }

.c__labels {
  position: relative;
  display: block;
  height: 22px;
  overflow: hidden;
}
.c__label {
  position: absolute;
  left: 0;
  top: 0;
  display: inline-flex;
  align-items: center;
  width: max-content;
  height: 22px;
  line-height: 22px;
  white-space: nowrap;
  opacity: 0;
}
.c__label[data-l="idle"] { opacity: 1; }
.c__sep { margin: 0 0.42em; opacity: 0.45; }
.c__price { color: var(--ocra); font-weight: 640; }

.note {
  position: absolute;
  left: 0;
  right: 0;
  bottom: 8px;
  height: 18px;
  margin: 0;
  font-size: 13px;
  font-weight: 460;
  color: var(--grigio);
}
.note__t {
  position: absolute;
  left: 0;
  right: 0;
  text-align: center;
  white-space: nowrap;
}
.note__t[data-note="done"] { opacity: 0; }

@media (max-width: 400px) {
  .c { height: 56px; font-size: 15px; padding: 0 22px 0 18px; gap: 9px; }
  .feed { bottom: 99px; }
  .note { font-size: 12px; }
}
