/*
 * The apex login page, in the marketing site's design language.
 *
 * The rules this file follows are the website's, not invented here (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, codes, chips) in uppercase
 *   - on Kohle, body text is --nebel; --stahl is too dark to pass AA there
 */

: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) —
   copied from the website repo so the two surfaces render identically. */
@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 both steps of the form at once. The step machine keys off the
 * `hidden` property, so this line is what makes it work at all.
 */
[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;
}

/* ----------------------------------------------------------------- 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 {
  background: var(--kohle);
  border: 1px solid var(--linie);
  color: var(--papier);
  padding: 14px 16px;
  width: 100%;
}

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

input: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-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;
}

/* --------------------------------------------------------------- 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);
}

/* ----------------------------------------------------------------- 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);
}

/* ------------------------------------------------------------ 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 {
    padding: 24px;
  }
}
