/* Sprocket coming-soon page. Hand-written, no build step.
   The glow in the corner uses the five hues sampled from the app icon
   (the app's Aurora palette): cool light up top, warm light lower down,
   peach always the faintest. It moves by transform only, so the browser
   composites it without repainting, and it holds still under Reduce
   Motion. */

:root {
  color-scheme: dark light;
  --bg: #0a0a0d;
  --bg-rgb: 10, 10, 13;
  --ink: #f5f4f2;
  --ink-2: rgba(245, 244, 242, .7);
  --ink-3: rgba(245, 244, 242, .5);
  --line: rgba(255, 255, 255, .13);
  --line-focus: rgba(255, 255, 255, .3);
  --field: rgba(255, 255, 255, .055);
  --field-focus: rgba(255, 255, 255, .085);
  --field-shadow: 0 18px 50px rgba(0, 0, 0, .35), inset 0 1px 0 rgba(255, 255, 255, .07);
  --btn: #f5f4f2;
  --btn-ink: #0a0a0d;
  --error: #ff9aa8;
  --aura-opacity: .92;
  --aura-blend: screen;
  --grain-opacity: .07;
  --cyan: 87, 199, 240;
  --blue: 69, 120, 245;
  --violet: 143, 92, 240;
  --magenta: 237, 92, 181;
  --peach: 250, 158, 112;
  --ease-out: cubic-bezier(.22, 1, .36, 1);
  --ease-drift: cubic-bezier(.45, 0, .55, 1);
  --font: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #faf8f5;
    --bg-rgb: 250, 248, 245;
    --ink: #141418;
    --ink-2: rgba(20, 20, 24, .68);
    --ink-3: rgba(20, 20, 24, .5);
    --line: rgba(20, 20, 40, .12);
    --line-focus: rgba(20, 20, 40, .3);
    --field: rgba(255, 255, 255, .6);
    --field-focus: rgba(255, 255, 255, .82);
    --field-shadow: 0 18px 50px rgba(60, 40, 110, .12), inset 0 1px 0 rgba(255, 255, 255, .9);
    --btn: #141418;
    --btn-ink: #faf8f5;
    --error: #c42847;
    --aura-opacity: .62;
    --aura-blend: multiply;
    --grain-opacity: .05;
  }
}

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

html {
  background: var(--bg);
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100svh;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font);
  font-size: 17px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

.sr {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

/* The glow. One large square whose centre sits up and to the right of the
   page, so its light pours in from the top right corner: the corner itself
   is at 62.5% across and 37.5% down the square. Each colour is a soft
   radial pool with a long, even falloff, so the pools blend like light. */

.aura {
  position: fixed;
  top: -45vmax;
  right: -45vmax;
  width: 120vmax;
  height: 120vmax;
  pointer-events: none;
  z-index: 0;
  opacity: var(--aura-opacity);
  animation: aura-in 2.4s var(--ease-out) both;
}

.aura-drift {
  position: absolute;
  inset: 0;
  transform-origin: 62.5% 37.5%;
  animation: aura-turn 48s var(--ease-drift) infinite alternate;
}

.blob {
  position: absolute;
  border-radius: 50%;
  mix-blend-mode: var(--aura-blend);
  will-change: transform, opacity;
  animation-timing-function: var(--ease-drift);
  animation-iteration-count: infinite;
  animation-direction: alternate;
}

.blob-cyan {
  width: 40%; height: 32%;
  left: 40%; top: 16%;
  background: radial-gradient(closest-side, rgba(var(--cyan), 1), rgba(var(--cyan), .62) 35%, rgba(var(--cyan), .2) 70%, rgba(var(--cyan), 0));
  animation-name: drift-a;
  animation-duration: 23s;
}

.blob-blue {
  width: 42%; height: 36%;
  left: 31%; top: 24%;
  background: radial-gradient(closest-side, rgba(var(--blue), 1), rgba(var(--blue), .6) 35%, rgba(var(--blue), .18) 70%, rgba(var(--blue), 0));
  animation-name: drift-b;
  animation-duration: 29s;
}

.blob-violet {
  width: 42%; height: 34%;
  left: 23%; top: 34%;
  background: radial-gradient(closest-side, rgba(var(--violet), 1), rgba(var(--violet), .6) 35%, rgba(var(--violet), .18) 70%, rgba(var(--violet), 0));
  animation-name: drift-c;
  animation-duration: 31s;
}

.blob-magenta {
  width: 36%; height: 30%;
  left: 35%; top: 40%;
  background: radial-gradient(closest-side, rgba(var(--magenta), .95), rgba(var(--magenta), .56) 35%, rgba(var(--magenta), .16) 70%, rgba(var(--magenta), 0));
  animation-name: drift-d;
  animation-duration: 19s;
}

.blob-peach {
  width: 28%; height: 24%;
  left: 47%; top: 46%;
  background: radial-gradient(closest-side, rgba(var(--peach), .7), rgba(var(--peach), .4) 35%, rgba(var(--peach), .1) 70%, rgba(var(--peach), 0));
  animation-name: drift-e;
  animation-duration: 37s;
}

@keyframes aura-in {
  from { opacity: 0; transform: scale(.94); }
}

@keyframes aura-turn {
  from { transform: rotate(-5deg) scale(1); }
  to { transform: rotate(6deg) scale(1.06); }
}

@keyframes drift-a {
  from { transform: translate(0, 0) rotate(0deg) scale(1); opacity: .9; }
  to { transform: translate(-10%, 14%) rotate(24deg) scale(1.12); opacity: 1; }
}

@keyframes drift-b {
  from { transform: translate(0, 0) rotate(0deg) scale(1.04); opacity: 1; }
  to { transform: translate(14%, -10%) rotate(-22deg) scale(.94); opacity: .85; }
}

@keyframes drift-c {
  from { transform: translate(0, 0) rotate(12deg) scale(.96); opacity: .85; }
  to { transform: translate(16%, 12%) rotate(-16deg) scale(1.1); opacity: 1; }
}

@keyframes drift-d {
  from { transform: translate(0, 0) rotate(0deg) scale(1); opacity: 1; }
  to { transform: translate(-16%, -14%) rotate(30deg) scale(1.14); opacity: .8; }
}

@keyframes drift-e {
  from { transform: translate(0, 0) scale(1); opacity: .7; }
  to { transform: translate(-14%, 10%) scale(1.18); opacity: 1; }
}

/* Film grain over everything, very faint, so the glow never bands. */

.grain {
  position: fixed;
  inset: 0;
  z-index: 1;
  pointer-events: none;
  opacity: var(--grain-opacity);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='2' stitchTiles='stitch'/%3E%3CfeColorMatrix values='0 0 0 0 .5 0 0 0 0 .5 0 0 0 0 .5 0 0 0 1 0'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 160px 160px;
}

/* The page. */

.page {
  position: relative;
  z-index: 2;
  min-height: 100vh;
  min-height: 100svh;
  display: grid;
  grid-template-rows: auto 1fr auto;
  padding:
    max(28px, env(safe-area-inset-top))
    max(clamp(20px, 6vw, 96px), env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(clamp(20px, 6vw, 96px), env(safe-area-inset-left));
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-size: 19px;
  font-weight: 600;
  letter-spacing: -.01em;
}

.brand img {
  display: block;
  width: 40px;
  height: 40px;
  filter: drop-shadow(0 6px 18px rgba(115, 102, 242, .35));
}

.pitch {
  align-self: center;
  max-width: 50rem;
  padding: 56px 0 64px;
}

h1 {
  margin: 0;
  font-size: clamp(52px, 7.4vw, 108px);
  line-height: .98;
  font-weight: 650;
  letter-spacing: -.045em;
}

/* The full stop takes the mark's light. */
h1 .dot {
  background: linear-gradient(135deg, rgb(var(--cyan)), rgb(var(--violet)) 55%, rgb(var(--magenta)));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}

@media (prefers-contrast: more) {
  h1 .dot { background: none; color: inherit; }
}

.lede {
  margin: 24px 0 40px;
  max-width: 31rem;
  font-size: clamp(17px, 1.45vw, 20px);
  line-height: 1.55;
  color: var(--ink-2);
  text-wrap: pretty;
}

/* The sign-up: one glass pill holding the field and its button. */

.signup { max-width: 31rem; margin: 0; }

.field {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 6px;
  border-radius: 999px;
  background: var(--field);
  border: 1px solid var(--line);
  box-shadow: var(--field-shadow);
  -webkit-backdrop-filter: blur(24px) saturate(160%);
  backdrop-filter: blur(24px) saturate(160%);
  transition: border-color .2s ease, background-color .2s ease;
}

.field:focus-within {
  border-color: var(--line-focus);
  background: var(--field-focus);
}

.field:has(input:focus-visible) {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.signup.error .field { border-color: var(--error); }

.field input {
  flex: 1;
  min-width: 0;
  height: 48px;
  padding: 0 8px 0 18px;
  border: 0;
  outline: none;
  background: transparent;
  color: var(--ink);
  font: inherit;
  font-size: 17px;
}

.field input::placeholder { color: var(--ink-3); opacity: 1; }

.field button {
  position: relative;
  flex: none;
  height: 48px;
  padding: 0 24px;
  border: 0;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font: inherit;
  font-size: 16px;
  font-weight: 600;
  letter-spacing: -.005em;
  white-space: nowrap;
  cursor: pointer;
  transition: transform .16s var(--ease-out), opacity .2s ease;
}

.field button:hover { opacity: .9; }
.field button:active { transform: scale(.97); }

.field button:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 3px;
}

.field button .spinner {
  position: absolute;
  inset: 0;
  margin: auto;
  width: 18px;
  height: 18px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-right-color: transparent;
  opacity: 0;
}

.signup[aria-busy="true"] .label { opacity: 0; }
.signup[aria-busy="true"] .spinner { opacity: 1; animation: spin .8s linear infinite; }
.signup[aria-busy="true"] button { cursor: progress; }

@keyframes spin { to { transform: rotate(360deg); } }

.trap {
  position: absolute;
  left: -10000px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

.status {
  margin: 0;
  padding: 0 25px;
  font-size: 14px;
  color: var(--error);
}

.status:not(:empty) {
  margin-top: 14px;
  animation: rise-in .35s var(--ease-out) both;
}

.fine {
  margin: 14px 0 0;
  padding: 0 25px;
  font-size: 14px;
  color: var(--ink-3);
}

.status:not(:empty) + .fine { margin-top: 6px; }

/* After signing up. */

.done { max-width: 31rem; outline: none; }
.done h2 {
  margin: 18px 0 6px;
  font-size: clamp(26px, 2.6vw, 32px);
  line-height: 1.15;
  font-weight: 650;
  letter-spacing: -.025em;
}
.done p { margin: 0; color: var(--ink-2); font-size: 17px; }

.done-mark {
  display: block;
  width: 48px;
  height: 48px;
  color: var(--ink);
}

.done.in { animation: rise-in .7s var(--ease-out) both; }
.done.in .tick {
  stroke-dasharray: 30;
  stroke-dashoffset: 30;
  animation: draw .5s .2s var(--ease-out) forwards;
}

.signup.out {
  animation: fade-out .22s ease both;
}

@keyframes draw { to { stroke-dashoffset: 0; } }
@keyframes fade-out { to { opacity: 0; transform: translateY(-6px); } }

.foot {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 8px 20px;
  font-size: 13px;
  color: var(--ink-3);
}

.foot a {
  color: inherit;
  text-decoration: none;
  border-radius: 4px;
  transition: color .2s ease;
}

.foot a:hover { color: var(--ink); text-decoration: underline; text-underline-offset: 3px; }
.foot a:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Arrival: each part rises a little, one after another. */

.rise { animation: rise-in .9s var(--ease-out) both; }
.r0 { animation-delay: .1s; }
.r1 { animation-delay: .2s; }
.r2 { animation-delay: .3s; }
.r3 { animation-delay: .4s; }
.r4 { animation-delay: .55s; }

@keyframes rise-in {
  from { opacity: 0; transform: translateY(14px); }
}

/* A simple page (thanks, not found) uses the same frame. */

.pitch .back {
  display: inline-flex;
  align-items: center;
  height: 48px;
  margin-top: 32px;
  padding: 0 24px;
  border-radius: 999px;
  background: var(--btn);
  color: var(--btn-ink);
  font-size: 16px;
  font-weight: 600;
  text-decoration: none;
  transition: transform .16s var(--ease-out), opacity .2s ease;
}
.pitch .back:hover { opacity: .9; }
.pitch .back:active { transform: scale(.97); }
.pitch .back:focus-visible { outline: 2px solid var(--ink); outline-offset: 3px; }

/* Phones: the glow sits behind the top of the page, and the field and its
   button stack once there isn't room for both on one line. */

/* Phones. Safari on iOS 26 fills the status bar with one flat colour taken
   from the page's background, and draws no page under it, so a glow that
   reaches the top edge looks sliced off there. On a phone the glow sits a
   little lower and fades into the page colour before the top edge, so the
   status bar and the page read as one dark field. The fade is a fixed layer
   with no background colour of its own, so Safari still takes the page's. */
.veil { display: none; }

@media (max-width: 640px), (max-height: 500px) and (pointer: coarse) {
  .veil {
    display: block;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 150px;
    z-index: 0;
    pointer-events: none;
    background: linear-gradient(to bottom,
      rgba(var(--bg-rgb), 1) 0%,
      rgba(var(--bg-rgb), .92) 14%,
      rgba(var(--bg-rgb), .72) 32%,
      rgba(var(--bg-rgb), .44) 52%,
      rgba(var(--bg-rgb), .18) 74%,
      rgba(var(--bg-rgb), 0) 100%);
  }
}

@media (max-width: 640px) {
  .aura {
    top: calc(-48.75vmax + 56px);
    right: -48.75vmax;
    width: 130vmax;
    height: 130vmax;
  }
  .pitch { padding: 40px 0 48px; }
  .lede { margin: 20px 0 32px; }
}

@media (max-width: 400px) {
  .field input { padding-left: 14px; }
  .field button { padding: 0 18px; }
  .status, .fine { padding: 0 21px; }
}

@media (max-width: 340px) {
  .field {
    flex-direction: column;
    align-items: stretch;
    border-radius: 26px;
  }
  .field input { padding: 0 14px; }
  .field button { width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  .aura { animation: fade-in 1s ease both; }
  .aura-drift, .blob { animation: none; }
  .rise, .done.in, .status:not(:empty) { animation: fade-in .4s ease both; }
  .r0, .r1, .r2, .r3, .r4 { animation-delay: 0s; }
  .done.in .tick { animation: none; stroke-dashoffset: 0; }
  .signup.out { animation: none; }
  .field button { transition: opacity .2s ease; }
  .field button:active { transform: none; }
}

@keyframes fade-in { from { opacity: 0; } }

@media (prefers-reduced-transparency: reduce) {
  .field {
    -webkit-backdrop-filter: none;
    backdrop-filter: none;
    background: var(--bg);
  }
}

@media (prefers-contrast: more) {
  :root { --ink-2: var(--ink); --ink-3: var(--ink); --line: var(--ink); }
}
