/* The water button: a dark pill on a black page with water inside it. The script draws the water in an SVG, its
   surface moved by a chain of springs, and the words twice: light over the dark, dark over the water. */
:root {
  --page: #000000;          /* the page */
  --pill: #0c0f16;          /* the empty button */
  --line: rgba(255, 255, 255, 0.16);
  --ink: #eaf2ff;           /* the words over the dark */
  --deep: #2f6bff;          /* the water at the bottom */
  --shallow: #5ccbff;       /* the water at the surface */
  --wet-ink: #031326;       /* the words where the water is */
}

* {
  box-sizing: border-box;
}

/* a tap is a click at once: no wait for a double tap */
html {
  touch-action: manipulation;
}

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

body {
  min-height: 100svh;
  background: var(--page);
  color: var(--ink);
  font-family: 'Funnel Display Variable', system-ui, sans-serif;
  -webkit-font-smoothing: antialiased;
}

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

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

.water__btn {
  position: relative;
  display: block;
  width: min(260px, calc(100vw - 48px));
  height: 72px;
  padding: 0;
  border: 0;
  border-radius: 999px;
  background: transparent;
  color: var(--ink);
  font: inherit;
  cursor: pointer;
  -webkit-tap-highlight-color: transparent;
}

.water__art {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

/* the words are drawn in the SVG, twice; this copy is only for screen readers and the Playground */
.water__word {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

.water__pill {
  fill: var(--pill);
  stroke: var(--line);
  stroke-width: 1.5;
}

.water__top {
  stop-color: var(--shallow);
}

.water__bottom {
  stop-color: var(--deep);
}

.water__shine {
  fill: none;
  stroke: rgba(255, 255, 255, 0.55);
  stroke-width: 1.4;
}

.water__dry {
  fill: var(--ink);
}

.water__wet {
  fill: var(--wet-ink);
}

.water__dry,
.water__wet {
  font-size: 19px;
  font-weight: 620;
  letter-spacing: -0.01em;
}

.water__arrow {
  fill: none;
  stroke-width: 2.2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.water__arrow--dry {
  stroke: var(--ink);
}

.water__arrow--wet {
  stroke: var(--wet-ink);
}

.water__btn:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 5px;
}

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