/*
 * The apex signup page, in the marketing site's design language.
 *
 * Same rules, same source as the login page's stylesheet next door (see the
 * website repo's docs/superpowers/specs/2026-08-12-stockstock-website-design.md
 * §3/§12 and its src/styles/tokens.css):
 *   - colours ONLY as tokens; hex values exist in :root and nowhere else
 *   - Stapler-Orange is an ACCENT, never a surface. Roughly 70 Kohle /
 *     25 Papier-ink / 5 Orange
 *   - sharp corners everywhere. No radius, no gradients, no glow, no shadows
 *   - Schibsted Grotesk 900 for headlines, JetBrains Mono for everything
 *     machine-shaped (labels, step numbers, codes) in uppercase
 *   - on Kohle, body text is --nebel; --stahl is too dark to pass AA there
 *
 * TOKEN BLOCK: copied VERBATIM from public/styles.css (the login page), which
 * copied it from the website repo. Source: website src/styles/tokens.css.
 * DEVIATIONS: none. Until there is a shared token package (there is not — see
 * the workspace CLAUDE.md §4), copying and naming the source is the rule; a
 * deviation would have to be justified here, at the head of the copy.
 *
 * THE ONE THING THIS PAGE HAS THAT THE LOGIN PAGE DOES NOT is a third-party
 * iframe it cannot style: Stripe's Payment Element. Its inside is parametrized
 * from signup.js's `appearance.variables`, which is why three hex values live
 * in that file — the only sanctioned hex outside a :root block in this repo.
 */

:root {
  --kohle: #141414;
  --kohle-2: #1d1d1b;
  --papier: #f4f4f1;
  --orange: #e8641f;
  --orange-dunkel: #d5560f;
  --stahl: #6b6b66;
  --nebel: #9a9a94;
  --linie: #2a2a2a;
  --sans: 'Schibsted Grotesk', 'Helvetica Neue', Arial, sans-serif;
  --mono: 'JetBrains Mono', ui-monospace, Menlo, monospace;
}

/* Variable Fonts, selbst gehostet (latin-Subset, eine woff2 je Familie) — the
   SHARED files at the assets root, the same two the login page loads. Not
   copied into this directory: one typeface, one cache entry. */
@font-face {
  font-family: 'Schibsted Grotesk';
  font-style: normal;
  font-weight: 400 900;
  font-display: swap;
  src: url('/fonts/schibsted.woff2') format('woff2');
}
@font-face {
  font-family: 'JetBrains Mono';
  font-style: normal;
  font-weight: 100 800;
  font-display: swap;
  src: url('/fonts/jetbrains.woff2') format('woff2');
}

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

html {
  -webkit-text-size-adjust: 100%;
}

body {
  background: var(--kohle);
  color: var(--papier);
  font-family: var(--sans);
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}

button,
input {
  font: inherit;
  color: inherit;
}

/*
 * `hidden` must beat the layout rules below. `.card form` sets display:flex,
 * and a bare attribute selector loses to a class selector on specificity —
 * which showed every step of the form at once on the login page. Four steps
 * here instead of two, so the same rule matters four times over. Pinned by
 * test/loginProxy.workers.test.ts.
 */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--orange);
  outline-offset: 3px;
}

/* ---------------------------------------------------------------- layout */

.page {
  min-height: 100svh;
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 64px 48px;
}

.wrap {
  width: 100%;
  max-width: 1080px;
  display: grid;
  grid-template-columns: 1.05fr 1fr;
  gap: 72px;
  align-items: center;
}

/* ------------------------------------------------------------- wordmark */

.mark-col {
  display: flex;
  flex-direction: column;
  gap: 28px;
  align-items: flex-start;
}

.home {
  text-decoration: none;
  color: var(--papier);
  display: inline-flex;
}

/* The website's stacked wordmark: each line is justified edge to edge inside
   a fixed 3.35em box, so STACK sits exactly above STOCK. The order is never
   swapped, and the accent letters are the A and the O. */
.wordmark {
  display: flex;
  flex-direction: column;
  width: 3.35em;
  font-family: var(--sans);
  font-weight: 900;
  font-size: clamp(56px, 11vw, 116px);
  line-height: 0.9;
  letter-spacing: -0.01em;
}

.row {
  display: flex;
  justify-content: space-between;
}

.accent {
  color: var(--orange);
}

.claim {
  font-size: 18px;
  line-height: 1.6;
  color: var(--nebel);
  max-width: 30ch;
  text-wrap: pretty;
}

.mono-line {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.22em;
  color: var(--stahl);
}

/* ----------------------------------------------------------------- copy */

.card-col {
  display: flex;
  flex-direction: column;
  gap: 16px;
}

.eyebrow {
  font-family: var(--mono);
  font-size: 13px;
  line-height: 1.3;
  letter-spacing: 0.3em;
  color: var(--orange);
}

h1 {
  font-size: 40px;
  font-weight: 900;
  line-height: 1.1;
  letter-spacing: -0.02em;
}

.sub {
  font-size: 16px;
  line-height: 1.6;
  color: var(--nebel);
  max-width: 42ch;
  text-wrap: pretty;
}

/* ----------------------------------------------------------------- rail */

/*
 * Four steps, drawn as a row of lines rather than as a bar that fills. A
 * filling bar implies progress the user has not made yet; a line per step
 * states exactly where they are. The step numbers are tabular so the row's
 * width does not change between 01 and 04.
 */
.rail {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 8px;
  list-style: none;
  padding: 0;
  margin-top: 12px;
}

.rail-step {
  display: flex;
  flex-direction: column;
  gap: 4px;
  border-top: 2px solid var(--linie);
  padding-top: 8px;
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--stahl);
}

.rail-num {
  font-variant-numeric: tabular-nums;
}

.rail-step[data-state='done'] {
  border-top-color: var(--stahl);
  color: var(--nebel);
}

.rail-step[data-state='current'] {
  border-top-color: var(--orange);
  color: var(--papier);
}

/* ----------------------------------------------------------------- card */

.card {
  margin-top: 12px;
  background: var(--kohle-2);
  border: 1px solid var(--linie);
  padding: 32px;
  display: flex;
  flex-direction: column;
}

.card form {
  display: flex;
  flex-direction: column;
  gap: 14px;
}

/* Mono uppercase caption above a field — the website's `.label` idiom.
   Uppercase is allowed here precisely because it is a Mono label; the BUTTON
   below stays mixed case, per the copy doc's rule 6. */
.label {
  font-family: var(--mono);
  font-size: 12px;
  line-height: 1.3;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--nebel);
}

input[type='text'],
input[type='email'] {
  background: var(--kohle);
  border: 1px solid var(--linie);
  color: var(--papier);
  padding: 14px 16px;
  width: 100%;
}

input::placeholder {
  color: var(--stahl);
}

input[type='text']:hover,
input[type='email']:hover {
  border-color: var(--stahl);
}

/* The code is machine data, so it is set in Mono and spaced like a readout. */
#code {
  font-family: var(--mono);
  font-variant-numeric: tabular-nums;
  font-size: 22px;
  letter-spacing: 0.4em;
  text-align: center;
  padding: 16px;
}

input[aria-invalid='true'] {
  border-color: var(--orange);
}

.turnstile:not(:empty) {
  margin-top: 2px;
  min-height: 65px;
}

.sent-to {
  font-size: 14px;
  line-height: 1.5;
  color: var(--nebel);
}

.sent-to span {
  font-family: var(--mono);
  color: var(--papier);
  word-break: break-all;
}

/* -------------------------------------------------------- payment step */

/*
 * Stripe's iframe. We own the box, not the contents: the height is reserved so
 * the card does not jump when the element finishes loading, and the inside is
 * parametrized from signup.js's appearance variables.
 */
.payment-element {
  min-height: 200px;
}

/* Nothing mounted, nothing reserved. Stripe inserts its container the moment
   mount() runs, so this only ever matches on the one path where the Element
   never arrives — the 3DS redirect return, which restores the payment step
   from a document that has no Element in it. A 200px void that will never fill
   is a promise the page cannot keep. */
.payment-element:empty {
  min-height: 0;
}

/* The trial sentence. Set apart by a line, not by a colour: it is the one
   claim on this page a customer is entitled to hold us to. */
.honest {
  border-left: 2px solid var(--orange);
  padding-left: 14px;
  font-size: 14px;
  line-height: 1.55;
  font-variant-numeric: tabular-nums;
  color: var(--papier);
}

.check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  font-size: 14px;
  line-height: 1.5;
  color: var(--nebel);
  cursor: pointer;
}

/* accent-color paints the native checkbox in the brand accent without
   rebuilding it — no custom SVG, no pseudo-element, keyboard behaviour and
   the required-attribute semantics intact. */
.check input[type='checkbox'] {
  accent-color: var(--orange);
  width: 18px;
  height: 18px;
  margin-top: 1px;
  flex: none;
}

.check a {
  color: var(--papier);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.check a:hover {
  color: var(--orange);
}

/* --------------------------------------------------------------- button */

/* CTA-Hover „Schub" (website global.css): the 8px square — the favicon motif,
   the missing A/O — expands to fill the button while the label flips colour.
   --to-kohle is the orange-filled variant. */
.btn {
  position: relative;
  overflow: hidden;
  isolation: isolate;
  margin-top: 6px;
  background: var(--orange);
  color: var(--kohle);
  border: none;
  font-family: var(--sans);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.25;
  padding: 16px 24px;
  text-align: center;
  cursor: pointer;
}

.push-btn .dot {
  position: absolute;
  z-index: 1;
  left: 10px;
  top: 50%;
  width: 8px;
  height: 8px;
  margin-top: -4px;
  transition: transform 0.42s cubic-bezier(0.4, 0, 0.2, 1);
}

.push-btn:hover:not(:disabled) .dot,
.push-btn:focus-visible:not(:disabled) .dot {
  transform: scale(90);
}

.push-btn .lbl {
  position: relative;
  z-index: 2;
  transition: color 0.3s ease;
}

.push-btn--to-kohle .dot {
  background: var(--kohle);
}

.push-btn--to-kohle:hover:not(:disabled) .lbl,
.push-btn--to-kohle:focus-visible:not(:disabled) .lbl {
  color: var(--orange);
}

.btn:disabled {
  background: var(--linie);
  color: var(--stahl);
  cursor: progress;
}

.linkish {
  background: none;
  border: none;
  padding: 0;
  margin-top: 4px;
  align-self: flex-start;
  font-size: 14px;
  color: var(--nebel);
  text-decoration: underline;
  text-underline-offset: 3px;
  cursor: pointer;
}

.linkish:hover {
  color: var(--orange);
}

/* --------------------------------------------------------------- status */

/*
 * Honest states. The chip idiom comes from the website's draft banner: the
 * accent is carried by the BORDER, the text stays legible, and nothing
 * pulses, glows or animates. An empty status renders nothing at all rather
 * than reserving a box that says something is wrong when nothing is.
 */
.status:empty {
  display: none;
}

.status {
  margin-top: 20px;
  font-size: 14px;
  line-height: 1.55;
  border-left: 2px solid var(--stahl);
  padding-left: 14px;
  color: var(--nebel);
}

.status[data-tone='working'] {
  border-left-color: var(--nebel);
}

.status[data-tone='ok'] {
  border-left-color: var(--orange);
  color: var(--papier);
}

.status[data-tone='error'] {
  border-left-color: var(--orange);
  color: var(--papier);
}

.hint {
  margin-top: 10px;
  padding-left: 16px;
  font-size: 14px;
}

.hint a {
  color: var(--papier);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.hint a:hover {
  color: var(--orange);
}

/* -------------------------------------------------------- not available */

/* The pre-launch state. Same card frame as the flow it replaces, so the page
   still looks finished rather than broken. */
.notice {
  margin-top: 12px;
  background: var(--kohle-2);
  border: 1px solid var(--linie);
  border-left: 2px solid var(--orange);
  padding: 32px;
  display: flex;
  flex-direction: column;
  gap: 12px;
  font-size: 16px;
  line-height: 1.6;
  color: var(--papier);
}

.notice a {
  color: var(--nebel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.notice a:hover {
  color: var(--orange);
}

/* ----------------------------------------------------------------- foot */

.foot {
  margin-top: 20px;
  font-size: 14px;
  color: var(--stahl);
}

.foot a {
  color: var(--nebel);
  text-decoration: underline;
  text-underline-offset: 3px;
}

.foot a:hover {
  color: var(--orange);
}

/* The legal row and the social row: both are Mono because both are labels,
   both sit at the weakest text colour on Kohle, and neither competes with the
   form above them. `a` without an href renders as plain text — which is what
   the legal row is until signup.js fills the URLs in. */
.legal-links,
.social {
  font-family: var(--mono);
  font-size: 11px;
  line-height: 1.6;
  letter-spacing: 0.12em;
  color: var(--stahl);
}

.legal-links {
  margin-top: 8px;
}

.social {
  margin-top: 4px;
}

.legal-links a,
.social a {
  color: var(--nebel);
  text-decoration: none;
}

.legal-links a:hover,
.social a:hover {
  color: var(--orange);
  text-decoration: underline;
  text-underline-offset: 3px;
}

/* ------------------------------------------------------------ responsive */

/* 860px is the website's one breakpoint. */
@media (max-width: 860px) {
  .page {
    padding: 48px 24px;
    align-items: flex-start;
  }
  .wrap {
    display: flex;
    flex-direction: column;
    gap: 40px;
  }
  .wordmark {
    font-size: clamp(52px, 20vw, 88px);
  }
  .claim {
    display: none;
  }
  h1 {
    font-size: 32px;
  }
  .card,
  .notice {
    padding: 24px;
  }
  /* Four mono labels do not fit across a phone; the numbers alone still say
     where the flow is, and the current step keeps its name. */
  .rail-step .rail-name {
    display: none;
  }
  .rail-step[data-state='current'] .rail-name {
    display: block;
  }
}
