/* The blender button: a raspberry pill on a white page, with a cream enamel blender standing in its round left end.
   The blender is an inline SVG (its colours come from here); the pill, the words and the timer are CSS. */
:root {
  --page: #ffffff;          /* the page */
  --pill: #d23a6c;          /* the raspberry of the pill */
  --pill-deep: #8e1f47;     /* the raspberry in its shadow */
  --cream: #fff3ea;         /* the words */
  --mango: #ffbd4a;         /* the timer that fills the pill while it blends, and the note */
  --enamel: #f6e7cf;        /* the enamel of the motor base */
  --enamel-light: #fff8ec;  /* the enamel where the light falls */
  --enamel-deep: #cdb48f;   /* the enamel in its shadow */
  --enamel-ink: #6b5440;    /* the ticks around the dial */
  --chrome: #d5dde2;        /* the chrome of the band, the dial and the blade */
  --chrome-light: #f8fbfc;  /* the chrome where the light falls */
  --chrome-dark: #86939b;   /* the chrome in its shadow */
  --handle: #2f2530;        /* the handle of the jar */
  --milk: #f7f1e6;          /* the milk at the bottom of the jar */
  --smoothie: #e56a92;      /* the smoothie once it is blended */
  --froth: #fbd3df;         /* the froth on top of the smoothie */
  --berry: #e3324d;         /* the strawberries and the cap of the lid */
  --berry-flesh: #ff8a95;   /* the inside of a strawberry */
  --berry-deep: #9c1631;    /* the hand of the dial */
  --leaf: #4f9a3a;          /* the strawberry leaves */
  --banana: #fff0b3;        /* the banana slices */
  --banana-skin: #f2d36b;   /* the rim of a banana slice */
  --banana-core: #fbe39a;   /* the middle of a banana slice */
  --banana-seed: #8a6a3a;   /* the little seeds of the banana */
  --kiwi: #8cc63f;          /* the kiwi slices */
  --kiwi-light: #d9efa8;    /* the pale ring of a kiwi slice */
  --kiwi-core: #f3f8dc;     /* the heart of a kiwi slice */
  --kiwi-skin: #7a5a34;     /* the brown skin of the kiwi */
  --blueberry: #3b3f8f;     /* the blueberries */
  --focus: #2f2530;         /* the ring of the keyboard's focus */
}

* {
  box-sizing: border-box;
}

html {
  touch-action: manipulation;
}

html,
body {
  margin: 0;
  overflow-x: clip;
}

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--handle);
  font-family: 'Mona Sans Variable', 'Mona Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

.stage {
  min-height: 100svh;
  display: grid;
  place-items: center;
  padding: 40px 16px;
}

/* the whole thing: the blender stands at the left, its feet on the line of the pill's foot */
.bl {
  position: relative;
  width: 318px;
  max-width: calc(100vw - 32px);
  height: 172px;
}

/* the blender sits over the left end of the pill; it takes no pointer, the click goes to the button under it */
.bl__art {
  position: absolute;
  left: 0;
  bottom: 0;
  z-index: 3;
  display: block;
  overflow: visible;
  pointer-events: none;
}

.bl__brand {
  font: 780 4.8px/1 'Mona Sans Variable', system-ui, sans-serif;
  font-stretch: 125%;
  letter-spacing: 0.3em;
  fill: var(--enamel-ink);
}

.bl__label {
  font: 760 4.4px/1 'Mona Sans Variable', system-ui, sans-serif;
  font-stretch: 112%;
  letter-spacing: 0.08em;
  fill: var(--pill-deep);
}

.bl__label-small {
  font: 600 3px/1 'Mona Sans Variable', system-ui, sans-serif;
  letter-spacing: 0.06em;
  fill: var(--enamel-ink);
}

/* ---------------------------------------------------------------- the pill */
.bl__btn {
  position: absolute;
  left: 62px;
  right: 0;
  bottom: 0;
  z-index: 2;
  display: block;
  height: 60px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: none;
  color: var(--cream);
  font: inherit;
  cursor: pointer;
  isolation: isolate;
  -webkit-tap-highlight-color: transparent;
  -webkit-touch-callout: none;
  touch-action: manipulation;
  user-select: none;
  -webkit-user-select: none;
}

.bl__btn[aria-disabled='true'] {
  cursor: progress;
}

.bl__fill {
  position: absolute;
  inset: 0;
  z-index: -1;
  overflow: hidden;
  border-radius: inherit;
  background:
    radial-gradient(70% 150% at 40% 0%, rgba(255, 255, 255, 0.2), transparent 60%),
    linear-gradient(180deg, var(--pill), var(--pill-deep));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.26),
    inset 0 -2px 0 rgba(0, 0, 0, 0.22),
    0 1px 2px rgba(142, 31, 71, 0.25),
    0 14px 28px -14px rgba(142, 31, 71, 0.75);
}

/* the timer: a band of mango that grows from the left while the fruit is blended */
.bl__timer {
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, rgba(255, 189, 74, 0), rgba(255, 189, 74, 0.3) 70%, rgba(255, 222, 150, 0.5));
  border-right: 2px solid rgba(255, 226, 160, 0.75);
  transform: scaleX(0);
  transform-origin: 0 50%;
}

.bl__btn:focus-visible {
  outline: 2.5px solid var(--focus);
  outline-offset: 5px;
}

html[data-using='pointer'] .bl__btn:focus-visible {
  outline: none;
}

/* ---------------------------------------------------------------- the words */
.bl__faces {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 52px;
  right: 18px;
  pointer-events: none;
}

.bl__face {
  position: absolute;
  top: 0;
  bottom: 0;
  left: 0;
  display: flex;
  align-items: center;
  gap: 8px;
  white-space: nowrap;
}

/* at rest the small words sit under the big ones, so both fit in the pill */
.bl__face[data-face='rest'] {
  flex-direction: column;
  align-items: flex-start;
  justify-content: center;
  gap: 4px;
}

.bl__face--busy,
.bl__face--done {
  opacity: 0;
  visibility: hidden;
}

.bl__word {
  display: inline-block;
  padding-bottom: 1px;
  font-size: 16px;
  font-weight: 640;
  font-stretch: 100%;
  letter-spacing: -0.006em;
  line-height: 1;
  transition: font-stretch 0.6s cubic-bezier(0.34, 1.9, 0.45, 1);
}

.bl__note {
  padding-bottom: 1px;
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
  line-height: 1;
  color: var(--mango);
}

@media (hover: hover) {
  .bl__btn:hover .bl__word {
    font-stretch: 110%;
  }
}

.bl__btn:focus-visible .bl__word {
  font-stretch: 110%;
}

/* while it blends a mango sheen runs through the word */
.bl__shine {
  padding-bottom: 1px;
  font-size: 16px;
  font-weight: 640;
  line-height: 1;
  background: linear-gradient(100deg, var(--cream) 30%, var(--mango) 50%, var(--cream) 70%) 0 0 / 220% 100%;
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

.bl__done {
  padding-bottom: 1px;
  font-size: 16px;
  font-weight: 700;
  font-stretch: 106%;
  line-height: 1;
}

.bl__tick {
  flex: none;
  color: var(--mango);
}

@media (max-width: 360px) {
  .bl__word,
  .bl__shine,
  .bl__done {
    font-size: 15px;
  }
}
