/* The coming-soon front: one screen, one job (join the waitlist).
 * Built from the Pen Design System v0.3.0 that both sites use: pen-tokens.css is its tokens.css unchanged, the
 * site's brand.css sets the six --brand-* tokens, and the rules below are the Pen component recipes this page
 * needs (base, type, button, input, input-group, error, spinner; components.css and motion.css), plus the page
 * layout. Every value is a token; nothing here names a raw colour, size, radius or duration.
 * Inter (self-hosted, latin; SIL OFL, see inter-OFL.txt) is the font for devices without SF Pro. */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-display: swap;
  font-weight: 100 900;
  src: url("/_front/inter-latin-wght-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329,
    U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Base (Pen components.css, pen.base) ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font: 400 var(--t-body)/var(--lh-body) var(--font-sans);
  font-optical-sizing: auto;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; text-rendering: optimizeLegibility;
  overflow-x: clip;
}
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
button, input { font: inherit; color: inherit; }
:focus-visible { outline: 2px solid var(--brand-ring); outline-offset: 2px; }
::selection { background: var(--brand-soft); color: var(--ink); }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }

/* ---------- Type: three levels (title, body, small) ---------- */
.display { font: var(--w-display) var(--t-display)/var(--lh-display) var(--font-sans); letter-spacing: var(--tr-display); margin: 0; text-wrap: balance; max-width: var(--measure-title); }
.display em { font-style: normal; color: var(--brand-text); white-space: nowrap; }
.lead { font-size: var(--t-lead); line-height: var(--lh-lead); letter-spacing: var(--tr-lead); color: var(--ink-2); margin: 0; max-width: var(--measure-lead); text-wrap: pretty; }
.small { font-size: var(--t-small); line-height: var(--lh-small); color: var(--ink-3); margin: 0; }

/* ---------- Button ---------- */
.btn {
  --h: var(--control-h); position: relative; display: inline-flex; align-items: center; justify-content: center; gap: var(--s-2);
  height: var(--h); min-width: var(--h); padding: 0 var(--s-4); border: 0; border-radius: var(--r-sm);
  font: 560 var(--t-small)/1 var(--font-sans); letter-spacing: -0.006em; white-space: nowrap; cursor: pointer; user-select: none; -webkit-tap-highlight-color: transparent;
  background: var(--surface); color: var(--ink); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color var(--dur-1) var(--ease-fade), color var(--dur-1) var(--ease-fade), transform var(--dur-1) var(--ease-move);
}
.btn-primary { background: var(--brand); color: var(--brand-ink); box-shadow: var(--sh-btn); }
.btn-primary:hover { background: var(--brand-hover); }
.btn:active:not([disabled]):not([data-loading]) { transform: scale(.98); }
.btn[disabled] { cursor: not-allowed; }
.btn .btn-label { display: inline-flex; align-items: center; gap: var(--s-2); transition: opacity var(--dur-1) var(--ease-fade); }
.btn .icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; transition: transform var(--dur-1) var(--ease-fade); }
.btn:hover .icon { transform: translateX(2px); }
.btn .spinner { position: absolute; inset: 0; margin: auto; opacity: 0; transition: opacity var(--dur-1) var(--ease-fade); }
.btn[data-loading] { cursor: progress; }
.btn[data-loading] .btn-label { opacity: 0; }
.btn[data-loading] .spinner { opacity: 1; }
.spinner { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: pen-spin .7s linear infinite; }
@keyframes pen-spin { to { transform: rotate(360deg); } }

/* ---------- Input and input group (the hero's email field) ---------- */
.input {
  height: var(--control-h); width: 100%; padding: 0 var(--s-3); border: 0; border-radius: var(--r-sm); background: var(--field); color: var(--ink);
  box-shadow: inset 0 0 0 1px var(--line-2); font-size: var(--t-body); outline: none;
}
.input::placeholder { color: var(--ink-3); }
.input-group {
  display: flex; align-items: center; gap: var(--s-2); height: 48px; padding: 0 var(--s-1) 0 var(--s-4);
  border-radius: var(--r-md); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: box-shadow var(--dur-1) var(--ease-fade);
}
.input-group:hover { box-shadow: inset 0 0 0 1px color-mix(in oklab, var(--ink) 28%, transparent); }
.input-group:focus-within { box-shadow: inset 0 0 0 1px var(--brand-ring), 0 0 0 1px var(--brand-ring); }
.input-group[data-invalid] { box-shadow: inset 0 0 0 1px var(--bad); }
.input-group[data-invalid]:focus-within { box-shadow: inset 0 0 0 1px var(--bad), 0 0 0 1px var(--bad); }
.input-group .input { box-shadow: none; padding: 0; background: transparent; height: 100%; min-height: 44px; flex: 1 1 auto; min-width: 0; }
.input-group .input:focus-visible { outline: none; }
.input-group .btn { --h: 40px; flex: none; border-radius: var(--r-sm); }
.hp-field { position: absolute; left: -10000px; width: 1px; height: 1px; opacity: 0; }

.error { font-size: var(--t-small); line-height: var(--lh-small); color: var(--bad); margin: 0; display: flex; gap: 6px; align-items: center; animation: pen-in-down var(--dur-2) var(--ease-fade); }
.error .icon, .done .icon { width: 16px; height: 16px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; }
.done {
  display: flex; align-items: center; justify-content: center; gap: var(--s-3); width: 100%; margin: 0;
  padding: var(--s-3) var(--s-4); border-radius: var(--r-md); background: var(--ok-soft); color: var(--ink);
  font-size: var(--t-body); line-height: var(--lh-small); animation: pen-in-down var(--dur-2) var(--ease-fade);
}
.done .icon { color: var(--ok); }
@keyframes pen-in-down { from { opacity: 0; transform: translateY(-4px); } }

/* ---------- Page ---------- */
.front { min-height: 100vh; min-height: 100svh; display: grid; grid-template-rows: auto 1fr auto; }
.wrap { width: 100%; max-width: calc(var(--container) + 2 * var(--gutter)); margin-inline: auto; padding-inline: var(--gutter); }
.top { display: flex; align-items: center; justify-content: space-between; gap: var(--s-4); min-height: var(--nav-h); padding-block: var(--s-2); }
.lockup { display: inline-flex; align-items: center; gap: 10px; min-height: 44px; font: 650 17px/1 var(--font-sans); letter-spacing: -0.014em; color: var(--ink); }
.lockup svg { width: 26px; height: 26px; border-radius: var(--r-sm); flex: none; }
.quiet { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); margin-right: calc(-1 * var(--s-2)); border-radius: var(--r-sm); font-size: var(--t-small); color: var(--ink-3); transition: color var(--dur-1) var(--ease-fade); }
.quiet:hover { color: var(--ink); }

.hero { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding-block: var(--s-16) var(--s-20); }
.hero .lead { margin-top: var(--s-5); text-wrap: balance; }
.hero .small { text-wrap: balance; }
.signup { width: 100%; max-width: 480px; margin-top: var(--s-8); display: grid; gap: var(--s-3); justify-items: center; }
.signup form { width: 100%; }
.signup .error { justify-content: center; }

.foot { padding-block: var(--s-6) var(--s-8); }
.foot .small { display: flex; flex-wrap: wrap; justify-content: center; align-items: center; column-gap: var(--s-1); text-align: center; }
.foot a { display: inline-flex; align-items: center; min-height: 44px; padding-inline: var(--s-2); color: var(--ink-3); border-radius: var(--r-sm); transition: color var(--dur-1) var(--ease-fade); }
.foot a:hover { color: var(--ink); }

/* Arrival: the hero rises 8 px and fades in once. */
.hero > * { animation: front-in var(--dur-4) var(--ease-move) both; }
.hero > :nth-child(2) { animation-delay: 60ms; }
.hero > :nth-child(3) { animation-delay: 120ms; }
@keyframes front-in { from { opacity: 0; transform: translateY(8px); } }

/* Phones: the field and the button stack, both 44 px and full width. */
@media (max-width: 479px) {
  .hero { padding-block: var(--s-10) var(--s-16); }
  .input-group { flex-direction: column; align-items: stretch; height: auto; padding: 0; gap: var(--s-2); background: transparent; box-shadow: none; }
  .input-group:hover, .input-group:focus-within { box-shadow: none; }
  .input-group .input { height: 44px; padding: 0 var(--s-3); background: var(--field); box-shadow: inset 0 0 0 1px var(--line-2); border-radius: var(--r-sm); }
  .input-group .input:focus-visible { box-shadow: inset 0 0 0 1px var(--brand-ring), 0 0 0 1px var(--brand-ring); }
  .input-group[data-invalid] { box-shadow: none; }
  .input-group[data-invalid] .input { box-shadow: inset 0 0 0 1px var(--bad); }
  .input-group .btn { --h: 44px; width: 100%; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 1ms !important; animation-delay: 0ms !important; animation-iteration-count: 1 !important; transition-duration: 1ms !important; }
  .hero > * { transform: none; }
  .btn:active:not([disabled]) { transform: none; }
}
