/* The Mach 1 receipt scope (November 22, 2026). Shared by /get-started and /start/next.
   A control-tower scope (Tower) comes alive: range rings, a tick ring and a sweep in the horizon colours; the
   three bars of the mark arrive at speed along the logo's lean and settle at its centre; a pressure wave rolls
   out (Mach 1); a check lands on the scope. Afterwards only the sweep, a slow wave and the glow keep moving.

   It plays when its form is accepted (.m1-capture.is-sent, set by assets/capture.mjs) or, on a page that is
   itself the receipt, as the page opens (.gs-play). The markup is one block, identical wherever it is used:
   scripts/scope-markup.mjs. Everything holds still, in its final state, under prefers-reduced-motion. */

/* Headlines arrive line by line from behind their own baseline, as headlines do across the site. */
.gs-line { display: block; padding-bottom: 0.08em; margin-bottom: -0.08em; overflow: hidden; }
.gs-line > span { display: block; }

.gs-scope {
  --gs-lean: 16deg; /* the logo's lean, as on the rest of the site */
  --gs-hairline: color-mix(in srgb, var(--fg) 9%, transparent);
  --gs-hairline-2: color-mix(in srgb, var(--fg) 16%, transparent);
  --gs-horizon: linear-gradient(100deg, var(--horizon-1), var(--horizon-2) 55%, var(--horizon-3));
  position: relative;
  width: 260px;
  height: 260px;
}
.gs-scope-svg { position: absolute; inset: 0; display: block; width: 100%; height: 100%; overflow: visible; }
.gs-scope-glow { position: absolute; inset: 18%; border-radius: 50%; background: radial-gradient(circle, var(--horizon-2), transparent 68%); opacity: 0.2; filter: blur(22px); }
.gs-scope-sweep {
  position: absolute;
  inset: 6.2%;
  border-radius: 50%;
  background: conic-gradient(from 90deg, transparent 0deg 232deg,
    color-mix(in srgb, var(--horizon-1) 14%, transparent) 298deg,
    color-mix(in srgb, var(--horizon-2) 30%, transparent) 344deg,
    color-mix(in srgb, var(--horizon-3) 58%, transparent) 359.5deg, transparent 360deg);
}
.gs-scope-grid circle { fill: none; stroke: var(--gs-hairline); stroke-width: 1; }
.gs-scope-grid .is-outer { stroke: var(--gs-hairline-2); }
.gs-scope-grid .is-ticks { stroke: color-mix(in srgb, var(--fg) 28%, transparent); stroke-width: 5; stroke-dasharray: 1 14.84; transform-box: fill-box; transform-origin: center; }
.gs-scope-grid path { fill: none; stroke: var(--gs-hairline-2); stroke-width: 1; }
.gs-ripple { fill: none; stroke: var(--horizon-2); stroke-width: 1.5; opacity: 0; transform-box: fill-box; transform-origin: center; }
.gs-logo-bar { fill: var(--fg); transform-box: fill-box; transform-origin: right center; }
.gs-ok { transform-box: fill-box; transform-origin: center; }
.gs-ok-disc { fill: var(--ok); stroke: var(--bg); stroke-width: 3; }
.gs-ok-check { fill: none; stroke: var(--bg); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1; stroke-dashoffset: 0; }
/* Speed lines: hatching at the logo's lean, in the horizon colours, crossing once behind the scope. */
.gs-streaks {
  position: absolute;
  top: 50%;
  left: 50%;
  width: min(940px, 100vw);
  height: 190px;
  translate: -50% -50%;
  background: var(--gs-horizon);
  opacity: 0;
  -webkit-mask: repeating-linear-gradient(calc(90deg + var(--gs-lean)), #000 0 1.5px, transparent 1.5px 17px), radial-gradient(50% 50% at 50% 50%, #000 12%, transparent 100%);
  -webkit-mask-composite: source-in;
  mask: repeating-linear-gradient(calc(90deg + var(--gs-lean)), #000 0 1.5px, transparent 1.5px 17px), radial-gradient(50% 50% at 50% 50%, #000 12%, transparent 100%);
  mask-composite: intersect;
  pointer-events: none;
}

/* In order: speed lines cross; the scope opens and its tick ring turns into place; the bars arrive and settle;
   the pressure wave rolls out; the check lands; the sweep starts turning. */
@media (prefers-reduced-motion: no-preference) {
  :is(.m1-capture.is-sent, .gs-play) .gs-streaks { animation: gs-streak 980ms var(--ease-out) both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-scope-grid circle:not(.is-ticks),
  :is(.m1-capture.is-sent, .gs-play) .gs-scope-grid path { animation: gs-fade 700ms var(--ease) 60ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-scope-grid .is-ticks { animation: gs-ticks 1100ms var(--ease-out) both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-scope-glow { animation: gs-pop 900ms var(--ease-out) 200ms both, gs-breathe 5.2s ease-in-out 1200ms infinite; }
  :is(.m1-capture.is-sent, .gs-play) .gs-logo-bar-1 { animation: gs-arrive 620ms var(--ease-out) 140ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-logo-bar-2 { animation: gs-arrive 620ms var(--ease-out) 220ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-logo-bar-3 { animation: gs-arrive 620ms var(--ease-out) 300ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-ripple-1 { animation: gs-wave 1500ms var(--ease-out) 700ms forwards, gs-wave-idle 6.4s var(--ease-out) 3.6s infinite; }
  :is(.m1-capture.is-sent, .gs-play) .gs-ripple-2 { animation: gs-wave 1500ms var(--ease-out) 880ms forwards; }
  :is(.m1-capture.is-sent, .gs-play) .gs-ok { animation: gs-pop 560ms var(--ease-spring) 820ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-ok-check { animation: gs-draw 360ms var(--ease-out) 1060ms both; }
  :is(.m1-capture.is-sent, .gs-play) .gs-scope-sweep { animation: gs-fade 900ms var(--ease) 760ms both, gs-spin 5.4s linear 760ms infinite; }
}

@keyframes gs-line { from { transform: translateY(108%); } }
@keyframes gs-rise { from { opacity: 0; translate: 0 14px; } }
@keyframes gs-fade { from { opacity: 0; } }
@keyframes gs-pop { from { opacity: 0; scale: 0.4; } }
@keyframes gs-draw { from { stroke-dashoffset: 1; } }
@keyframes gs-spin { to { rotate: 360deg; } }
@keyframes gs-breathe { 50% { opacity: 0.34; scale: 1.14; } }
@keyframes gs-ticks { from { opacity: 0; rotate: -70deg; scale: 0.86; } }
/* A bar arrives stretched along its path in the horizon colour, as if still at speed, then takes its own shape. */
@keyframes gs-arrive {
  from { opacity: 0; fill: var(--horizon-2); translate: -420px 0; scale: 2.6 1; }
  45% { opacity: 0.9; fill: var(--horizon-2); }
  80% { fill: var(--fg); translate: 7px 0; scale: 0.95 1; }
}
@keyframes gs-streak {
  from { opacity: 0; translate: -68% -50%; }
  30% { opacity: 0.5; }
  to { opacity: 0; translate: -32% -50%; }
}
@keyframes gs-wave {
  from { opacity: 0.8; scale: 1; }
  to { opacity: 0; scale: 2.5; }
}
@keyframes gs-wave-idle {
  0% { opacity: 0.45; scale: 1; }
  28%, 100% { opacity: 0; scale: 2.3; }
}
