Back to the library

Moon seal confirm, cascade

Variant: Cascade

The seal confirmation as an offset pass. The upper half, lower half, tick, title and subline each start 60ms after the one before, and each takes 220ms. Use it when the confirmation should read as a sequence: the ring closes, then the mark, then the words. Because the lower half trails the upper by one step, the seam closes a moment late. That small lopsidedness keeps the ring from feeling machine-made.

confirmationsuccesssvgstaggerstroke-draw

The source

A complete HTML document. Paste it into an empty .html file and it plays — no stylesheet, script, font, or image to fetch.

<!doctype html>
<html lang="en">
<head>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Moon seal confirm — cascade</title>
<style>
:root {
  /* Neutrals — fixed, never remixed. */
  --ivory: #faf9f5;
  --paper: #ffffff;
  --oat: #e3dacc;
  --slate: #141413;

  /* Knobs — the remix API. A knob exists iff declared here and used below. */
  --hue: 38.8;
  --lift: 0;
  --chroma: 1;
  --round: 1; /* include ONLY if at least one border-radius is wrapped below */
  --speed: 1;

  /* Accents — derived from the knobs with the family's offsets baked in,
     so one hue roll moves them together. Defaults reproduce the original hex
     (#d97757 / #b85c3e / #788c5d / #b04a3f). */
  --clay: oklch(calc(0.6724 + var(--lift)) calc(0.1308 * var(--chroma)) var(--hue));
  --clay-d: oklch(calc(0.5797 + var(--lift)) calc(0.127 * var(--chroma)) var(--hue));
  --olive: oklch(calc(0.6118 + var(--lift)) calc(0.0713 * var(--chroma)) calc(var(--hue) + 88.3));
  --rust: oklch(calc(0.5408 + var(--lift)) calc(0.1357 * var(--chroma)) calc(var(--hue) - 10.3));

  /* Clock — every duration in the document runs off --t. */
  --cycle: 3.2s; /* the authored master loop */
  --t: calc(var(--cycle) / var(--speed));

  --ease-out: cubic-bezier(0.23, 1, 0.32, 1); /* include only if used */
}

* { box-sizing: border-box; }

body {
  margin: 0;
  min-height: 100vh;
  display: grid;
  place-items: center;
  background: var(--ivory);
  font-family: system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
  color: var(--slate);
}

.card {
  width: min(320px, 88vw);
  display: flex;
  align-items: center;
  gap: clamp(12px, 3.5vw, 16px);
  padding: clamp(14px, 4vw, 20px) clamp(16px, 4.5vw, 22px);
  background: var(--paper);
  border: 1px solid var(--oat);
  border-radius: calc(14px * var(--round));
  box-shadow:
    0 1px 2px color-mix(in oklch, var(--slate) 5%, transparent),
    0 10px 28px -12px color-mix(in oklch, var(--slate) 14%, transparent);
}

.seal {
  flex: none;
  width: clamp(42px, 12vw, 50px);
  height: auto;
  overflow: visible;
}

.seal path {
  fill: none;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.seal .track { stroke: var(--oat); }
.seal .half { stroke: var(--olive); }
.seal .tick { stroke: var(--clay-d); stroke-width: 2.5; }

.upper { --_i: 0; }
.lower { --_i: 1; }
.tick  { --_i: 2; }
.title { --_i: 3; }
.sub   { --_i: 4; }

.seal .half,
.seal .tick {
  stroke-dasharray: 1 1;
  stroke-dashoffset: 1;
  opacity: 0;
  animation: draw var(--t) var(--ease-out) infinite;
  animation-delay: calc(var(--_i) * 60ms / var(--speed));
}

.copy { min-width: 0; }

.title {
  margin: 0;
  font-size: clamp(14px, 3.9vw, 15px);
  font-weight: 600;
  letter-spacing: -0.005em;
}

.sub {
  margin: 3px 0 0;
  font-size: clamp(12px, 3.4vw, 13px);
  color: color-mix(in oklch, var(--slate) 58%, var(--paper));
}

.title,
.sub {
  opacity: 0;
  animation: rise var(--t) var(--ease-out) infinite;
  animation-delay: calc(var(--_i) * 60ms / var(--speed));
}

/* Cascade: each part takes 220ms (6.875% of 3.2s), 60ms behind the last.
   The exit takes 160ms and runs in the same order, so the last part is gone
   at 2.96s, before the loop restarts. */
@keyframes draw {
  0% { stroke-dashoffset: 1; opacity: 0; }
  6.875%, 80% { stroke-dashoffset: 0; opacity: 1; }
  85%, 100% { stroke-dashoffset: 0; opacity: 0; }
}

@keyframes rise {
  0% { opacity: 0; transform: translateY(4px); }
  6.875%, 80% { opacity: 1; transform: none; }
  85%, 100% { opacity: 0; transform: none; }
}

@keyframes glaze {
  0% { opacity: 0.2; }
  6.875%, 80% { opacity: 1; }
  85%, 100% { opacity: 0.2; }
}

@media (max-width: 380px) {
  .card { gap: 12px; padding: 14px 16px; }
}

@media (prefers-reduced-motion: reduce) {
  .seal .half,
  .seal .tick {
    stroke-dashoffset: 0;
    animation: glaze calc(var(--t) * 2) var(--ease-out) infinite;
    animation-delay: calc(var(--_i) * 120ms / var(--speed));
  }
  .title,
  .sub {
    animation: glaze calc(var(--t) * 2) var(--ease-out) infinite;
    animation-delay: calc(var(--_i) * 120ms / var(--speed));
  }
}
</style>
</head>
<body>
  <div class="card" role="status">
    <svg class="seal" viewBox="0 0 64 64" aria-hidden="true">
      <path class="track" d="M6.5 32.5 C 6 17.5, 17 6, 32 6 C 47.5 6.5, 58 18, 57.5 32" />
      <path class="track" d="M6.5 32.5 C 7 47, 18 58, 32 58 C 46 57.5, 57 46.5, 57.5 32" />
      <path class="half upper" pathLength="1" d="M6.5 32.5 C 6 17.5, 17 6, 32 6 C 47.5 6.5, 58 18, 57.5 32" />
      <path class="half lower" pathLength="1" d="M6.5 32.5 C 7 47, 18 58, 32 58 C 46 57.5, 57 46.5, 57.5 32" />
      <path class="tick" pathLength="1" d="M21.5 33.5 L28.5 40 L43 25.5" />
    </svg>
    <div class="copy">
      <p class="title">Changes saved</p>
      <p class="sub">Synced a moment ago</p>
    </div>
  </div>
</body>
</html>

The variant family

Same idea, one axis moved. Compare them side by side before you commit.