/* ---------- fonts (self-hosted, SIL OFL, see fonts/LICENSES.txt) ---------- */

@font-face {
  font-family: "Archivo";
  src: url("fonts/archivo.woff2") format("woff2");
  font-weight: 100 900;
  font-stretch: 62% 125%;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: "JetBrains Mono";
  src: url("fonts/jetbrains-mono.woff2") format("woff2");
  font-weight: 100 800;
  font-style: normal;
  font-display: swap;
}

/* ---------- tokens ---------- */

:root {
  --bg: #0d0c11;
  --text: #f1eff6;
  --soft: #c9c5d4;
  --muted: #a29eb0;
  --faint: #8d899a;
  --line: #2b2834;
  --line-strong: #6c6779;
  --lilac: #d4bcf7;
  --lilac-hover: #e2d2fb;
  --lilac-press: #c5a9f1;
  --field: #f4f2f8;
  --field-text: #14121a;
  --field-hint: #6e6a7b;
  --error: #ffb3a1;
  --error-on-field: #b3261e;
  --sans: "Archivo", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --gutter: clamp(20px, 4.5vw, 64px);
  color-scheme: dark;
}

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

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

body {
  margin: 0;
  min-height: 100vh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--sans);
  font-size: 1rem;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

::selection { background: var(--lilac); color: var(--bg); }

a {
  color: var(--lilac);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}
a:hover { color: var(--lilac-hover); }
:focus-visible { outline: 2px solid var(--lilac); outline-offset: 3px; }

.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;
}

/* ---------- background ---------- */

#ascii-bg {
  position: fixed;
  inset: 0;
  width: 100%;
  height: 100%;
  z-index: 0;
  pointer-events: none;
  opacity: 0;
  transition: opacity 0.8s ease;
}
#ascii-bg.is-ready { opacity: 1; }

/* ---------- frame ---------- */

.page {
  position: relative;
  z-index: 1;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
  min-height: 100svh;
  max-width: 1360px;
  margin: 0 auto;
  padding: 0 var(--gutter);
}

.topbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding-top: clamp(20px, 3.6vh, 36px);
}

.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 1.375rem;
  font-weight: 650;
  letter-spacing: -0.015em;
  line-height: 1;
  text-decoration: none;
}
.logo:hover { color: var(--text); }
.logo-mark { flex: none; width: 16px; height: 24px; color: var(--lilac); }

.lang {
  display: flex;
  gap: 2px;
  font-size: 0.8125rem;
  font-weight: 600;
  letter-spacing: 0.04em;
}
.lang a {
  padding: 6px 7px 4px;
  border-bottom: 2px solid transparent;
  color: var(--faint);
  line-height: 1.2;
  text-decoration: none;
}
.lang a:hover { color: var(--text); }
.lang a[aria-current="true"] { color: var(--text); border-bottom-color: var(--lilac); }

/* ---------- hero ---------- */

.hero {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: clamp(32px, 5vh, 72px) 0 clamp(32px, 5vh, 80px);
  text-align: center;
}

.headline {
  margin: 0;
  /* The longest line ("endgültig lösen.") is about 6.4em wide; keep it on one line. */
  font-size: clamp(2.5rem, min((100vw - 2 * var(--gutter)) / 6.6, 13.5vh), 7rem);
  font-weight: 700;
  font-stretch: 86%;
  line-height: 0.94;
  letter-spacing: -0.022em;
}
.headline span { display: block; width: fit-content; margin: 0 auto; }

.question {
  max-width: 30em;
  margin: clamp(20px, 3.4vh, 32px) auto 0;
  font-size: clamp(1.2rem, 1.1rem + 0.6vw, 1.625rem);
  font-weight: 500;
  line-height: 1.28;
  letter-spacing: -0.008em;
  text-wrap: balance;
}

.lead {
  max-width: 34em;
  margin: 14px auto 0;
  color: var(--soft);
  font-size: clamp(1rem, 0.95rem + 0.25vw, 1.125rem);
  line-height: 1.6;
  text-wrap: pretty;
}

/* ---------- waitlist ---------- */

.signup {
  width: 100%;
  max-width: 440px;
  margin: clamp(24px, 4.2vh, 40px) auto 0;
  scroll-margin-top: 96px;
}

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

.field {
  display: block;
  width: 100%;
  height: 54px;
  margin: 0;
  padding: 0 16px;
  border: 0;
  border-radius: 0;
  background: var(--field);
  color: var(--field-text);
  font: inherit;
  font-size: 1rem;
  -webkit-appearance: none;
  appearance: none;
}
.field::placeholder { color: var(--field-hint); opacity: 1; }
.field[aria-invalid="true"] { box-shadow: inset 0 0 0 2px var(--error-on-field); }
.field:-webkit-autofill {
  -webkit-box-shadow: inset 0 0 0 100px var(--field);
  -webkit-text-fill-color: var(--field-text);
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 0;
  font: inherit;
  font-weight: 600;
  line-height: 1.2;
  text-decoration: none;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}

.btn-primary {
  width: 100%;
  height: 54px;
  margin-top: 8px;
  padding: 0 24px;
  border: 0;
  background: var(--lilac);
  color: var(--bg);
  font-size: 1rem;
}
.btn-primary:hover { background: var(--lilac-hover); }
.btn-primary:active { background: var(--lilac-press); }
.btn-primary[disabled] { opacity: 0.75; cursor: progress; }

.btn-outline {
  height: 44px;
  padding: 0 18px;
  border: 1px solid var(--line-strong);
  background: transparent;
  color: var(--text);
  font-size: 0.9375rem;
  font-weight: 500;
}
.btn-outline:hover { border-color: var(--lilac); color: var(--lilac); }

.consent {
  display: flex;
  justify-content: center;
  align-items: flex-start;
  gap: 10px;
  margin-top: 14px;
  color: var(--soft);
  font-size: 0.875rem;
  line-height: 1.45;
  cursor: pointer;
}
.consent input {
  -webkit-appearance: none;
  appearance: none;
  flex: none;
  display: grid;
  place-content: center;
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  border: 1.5px solid var(--muted);
  border-radius: 0;
  background: transparent;
  cursor: pointer;
  transition: background-color 0.12s ease, border-color 0.12s ease;
}
.consent input::after {
  content: "";
  width: 10px;
  height: 10px;
  background: var(--bg);
  clip-path: polygon(14% 44%, 0 65%, 50% 100%, 100% 16%, 80% 0%, 43% 62%);
  transform: scale(0);
  transition: transform 0.12s ease;
}
.consent input:hover { border-color: var(--text); }
.consent input:checked { background: var(--lilac); border-color: var(--lilac); }
.consent input:checked::after { transform: scale(1); }
.consent input[aria-invalid="true"] { border-color: var(--error); }
.consent a { color: var(--text); text-decoration-color: var(--lilac); }
.consent a:hover { color: var(--lilac); }

.form-msg {
  margin: 12px 0 0;
  font-size: 0.9375rem;
  line-height: 1.45;
}
.form-msg:empty { display: none; }
.form-msg.is-ok { color: var(--lilac); }
.form-msg.is-error { color: var(--error); }

.contact {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 10px 16px;
  margin: clamp(24px, 4vh, 40px) 0 0;
  color: var(--muted);
  font-size: 0.9375rem;
}

/* ---------- footer ---------- */

.footer {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  align-items: center;
  gap: 12px 24px;
  padding: 22px 0 26px;
  border-top: 1px solid var(--line);
  color: var(--faint);
  font-size: 0.8125rem;
}
.footer-links { display: flex; gap: 24px; }
.footer a { color: var(--faint); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }

/* ---------- legal + 404 ---------- */

.legal {
  flex: 1 0 auto;
  width: 100%;
  max-width: 46rem;
  margin: 0 auto;
  padding: clamp(40px, 9vh, 96px) 0 72px;
  color: var(--soft);
  line-height: 1.65;
  overflow-wrap: anywhere;
}
.legal h1 {
  margin: 0 0 32px;
  color: var(--text);
  font-size: clamp(2.5rem, 7vw, 4.25rem);
  font-weight: 700;
  font-stretch: 86%;
  line-height: 0.98;
  letter-spacing: -0.022em;
}
.legal h2 {
  margin: 40px 0 10px;
  color: var(--text);
  font-size: 1.125rem;
  font-weight: 650;
  line-height: 1.3;
}
.legal p { margin: 0 0 12px; }
:lang(de) .legal p { -webkit-hyphens: auto; hyphens: auto; }
.legal code { font-family: var(--mono); font-size: 0.875em; color: var(--text); }
.legal-note { color: var(--muted); }
.legal-stand { margin-top: 40px !important; color: var(--faint); font-size: 0.875rem; }

.not-found {
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  width: 100%;
  max-width: 780px;
  margin: 0 auto;
  padding: 48px 0 96px;
  text-align: center;
}
.not-found .headline { font-size: clamp(2.75rem, 8vw, 5.5rem); }
.not-found .lead { margin-top: 20px; }
.not-found .btn { margin-top: 32px; }

/* ---------- small screens ---------- */

@media (max-width: 720px) {
  .hero {
    justify-content: flex-start;
    padding-top: clamp(112px, 24vh, 220px);
    padding-top: clamp(112px, 24svh, 220px);
  }
  .contact { flex-direction: column; }
  .footer { flex-direction: column-reverse; gap: 10px; }
}

@media (max-width: 380px) {
  .logo { font-size: 1.25rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}
