/* ═══════════════════════════════════════════════════════════════
   ALBSTEIN — Register Hell (W1)
   nach CD-Referenzblatt ALB-CD-REF v1.0 · 07/2026
   Helvetica spricht, Plex Mono beziffert, eine Signalfarbe, ein Moment.
   ═══════════════════════════════════════════════════════════════ */

/* ─── Schriften · selbst gehostet, kein CDN (DSGVO) ─── */
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-Regular.woff2') format('woff2');
  font-weight: 400;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-Medium.woff2') format('woff2');
  font-weight: 500;
  font-style: normal;
  font-display: swap;
}
@font-face {
  font-family: 'IBM Plex Mono';
  src: url('/fonts/IBMPlexMono-SemiBold.woff2') format('woff2');
  font-weight: 600;
  font-style: normal;
  font-display: swap;
}

/* ─── Register ─── */
:root {
  --paper:        #ECEAE4;
  --panel:        #E4E1D9;
  --panel-raised: #F3F1EC;
  --ink:          #1A1917;
  --ink-2:        #57544D;
  --ink-3:        #8F8C83;
  --line:         #CFCBC0;
  --line-2:       #DCD9D0;
  --signal:       #1F9E57;
  --signal-ground: rgba(31, 158, 87, .14);
  --error:        #B23A2E;

  --sans: 'Helvetica Neue', Helvetica, Arial, sans-serif;
  --mono: 'IBM Plex Mono', ui-monospace, 'SF Mono', Menlo, Consolas, monospace;

  --unit:    8px;
  --measure: 1180px;
  --radius:  2px;
  --hairline: .5pt;

  --ease:  cubic-bezier(.2, 0, 0, 1);
  --dur-1: .28s;
  --dur-2: .6s;
}

/* ─── Grundzustand ─── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

html {
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

body {
  font-family: var(--sans);
  font-weight: 400;
  font-size: 16px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--paper);
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
}

::selection { background: var(--ink); color: var(--paper); }

a { color: inherit; text-decoration: none; }

:focus-visible {
  outline: 2px solid var(--ink);
  outline-offset: 2px;
  border-radius: var(--radius);
}

img, svg { display: block; }

/* ─── Typografische Register ─── */
.display {
  font-weight: 700;
  font-size: clamp(34px, 6vw, 48px);
  letter-spacing: -.01em;
  line-height: 1.12;
  color: var(--ink);
}

.legend {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
}

.data {
  font-family: var(--mono);
  font-weight: 400;
  font-size: 14px;
}

/* ─── Kopfzeile ─── */
.topbar { padding: 0 calc(var(--unit) * 4); }

.topbar-inner {
  max-width: var(--measure);
  margin: 0 auto;
  height: calc(var(--unit) * 9);
  display: flex;
  align-items: center;
  justify-content: space-between;
  border-bottom: var(--hairline) solid var(--line);
}

.wordmark {
  font-family: var(--sans);
  font-weight: 700;
  letter-spacing: .34em;
  margin-right: -.34em;
  text-transform: uppercase;
  color: var(--ink);
}

.topbar .wordmark { font-size: 14px; }

.lang { display: flex; align-items: center; gap: calc(var(--unit) * 2); }

.lang a {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink-2);
  transition: color var(--dur-1) var(--ease);
}

.lang a:hover { color: var(--ink); }
.lang a[aria-current="page"] {
  color: var(--ink);
  text-decoration: underline;
  text-underline-offset: 3px;
  text-decoration-thickness: from-font;
}

/* ─── Bühne ─── */
.stage-wrap {
  flex: 1;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: calc(var(--unit) * 12) calc(var(--unit) * 4) calc(var(--unit) * 8);
}

.stage {
  width: 100%;
  max-width: 640px;
  display: flex;
  flex-direction: column;
  align-items: center;
  text-align: center;
}

/* Sequence — das Zeichen. Monochrom, funktional gerendert.
   Geometrie exakt aus der Visitenkarten-Reinzeichnung (28 Zeilen, Haarlinien). */
.mark { width: 140px; margin-bottom: calc(var(--unit) * 5); color: var(--ink); }

.mark .sq {
  opacity: 0;
  animation: sq-in var(--dur-2) var(--ease) forwards;
  animation-delay: calc(var(--i) * 20ms);
}

@keyframes sq-in { to { opacity: 1; } }

.brand h1 {
  font-size: clamp(30px, 5vw, 40px);
  font-weight: 700;
  letter-spacing: .34em;
  margin-right: -.34em;
  text-transform: uppercase;
  line-height: 1;
}

.brand-sub {
  margin-top: var(--unit);
  color: var(--ink-2);
}

/* Zustandszeile — die Kontrollleuchte leuchtet erst zur Öffnung. */
.status {
  margin-top: calc(var(--unit) * 6);
  color: var(--ink-2);
}

.status .dot { color: var(--ink); }

/* Signal — eine Farbe, ein Moment: die bestätigte Vormerkung. */
.status .dot-signal { color: var(--signal); }

/* Der eine Satz */
.stage .display { margin-top: calc(var(--unit) * 3); }

/* Enthüllung — Inhalt tritt ein. Einmal. */
.reveal {
  opacity: 0;
  transform: translateY(8px);
  animation: reveal var(--dur-2) var(--ease) forwards;
}

@keyframes reveal {
  to { opacity: 1; transform: translateY(0); }
}

/* ─── Vormerkung ─── */
.register {
  width: 100%;
  max-width: 480px;
  margin-top: calc(var(--unit) * 6);
  padding: calc(var(--unit) * 4);
  background: var(--panel-raised);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
  text-align: left;
  transition: background-color var(--dur-2) var(--ease);
}

.register.is-success { background: var(--signal-ground); }

.register .legend { color: var(--ink-2); }

.field {
  display: flex;
  gap: var(--unit);
  margin-top: calc(var(--unit) * 2);
}

.field input[type="email"] {
  flex: 1;
  min-width: 0;
  height: calc(var(--unit) * 6);
  padding: 0 calc(var(--unit) * 2);
  background: var(--paper);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  transition: border-color var(--dur-1) var(--ease);
}

.field input[type="email"]::placeholder { color: var(--ink-2); }
.field input[type="email"]:focus { border-color: var(--ink); }

.taster {
  height: calc(var(--unit) * 6);
  padding: 0 calc(var(--unit) * 3);
  background: var(--ink);
  color: var(--paper);
  border: none;
  border-radius: var(--radius);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  cursor: pointer;
  transition: transform var(--dur-1) var(--ease), opacity var(--dur-1) var(--ease);
}

.taster:active { transform: translateY(1px); }
.taster:disabled { opacity: .5; cursor: default; }

.promise {
  margin-top: calc(var(--unit) * 2);
  font-family: var(--mono);
  font-weight: 600;
  font-size: 10px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
}

.note {
  margin-top: var(--unit);
  font-size: 12px;
  line-height: 1.5;
  color: var(--ink-2);
}

.note a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: from-font;
}

/* Formular-Zustände */
.form-status { margin-top: calc(var(--unit) * 2); }
.form-status:empty { margin-top: 0; }
.form-status:focus { outline: none; }

.form-status .confirm {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 12px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--ink);
}

/* Signal — eine Farbe, ein Moment. Sonst nirgends. */
.form-status .confirm .dot { color: var(--signal); }

.form-status .confirm-sub {
  margin-top: var(--unit);
  font-size: 13px;
  color: var(--ink-2);
}

.form-status .fail {
  font-family: var(--mono);
  font-weight: 600;
  font-size: 11px;
  letter-spacing: .22em;
  text-transform: uppercase;
  color: var(--error);
}

/* Honeypot — für Menschen unsichtbar */
.hp {
  position: absolute;
  left: -9999px;
  width: 1px;
  height: 1px;
  overflow: hidden;
}

/* ─── Kontakt ─── */
.contact {
  margin-top: calc(var(--unit) * 6);
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: var(--unit);
}

.contact .legend { color: var(--ink-2); }

.contact a {
  font-family: var(--mono);
  font-size: 14px;
  color: var(--ink);
  transition: color var(--dur-1) var(--ease);
}

.contact a:hover { color: var(--ink-2); }

/* ─── Fusszeile ─── */
.site-footer {
  padding: calc(var(--unit) * 4);
  border-top: var(--hairline) solid var(--line);
}

.footer-inner {
  max-width: var(--measure);
  margin: 0 auto;
  display: flex;
  flex-wrap: wrap;
  gap: var(--unit) calc(var(--unit) * 4);
  align-items: baseline;
  justify-content: space-between;
  font-size: 12px;
  color: var(--ink-2);
}

.footer-links { display: flex; gap: calc(var(--unit) * 3); }

.footer-links a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: from-font;
}

.footer-copy { color: var(--ink-3); }

/* ─── Dokument-Seiten (Impressum, Datenschutz, 404) ─── */
.doc {
  width: 100%;
  max-width: 720px;
  margin: 0 auto;
  padding: calc(var(--unit) * 8) calc(var(--unit) * 4) calc(var(--unit) * 12);
  flex: 1;
}

.doc .overline { color: var(--ink-3); }

.doc h1 {
  margin-top: var(--unit);
  font-size: clamp(28px, 4vw, 34px);
  font-weight: 700;
  letter-spacing: -.01em;
}

.doc h2 {
  margin: calc(var(--unit) * 5) 0 calc(var(--unit) * 1.5);
  font-size: 18px;
  font-weight: 700;
  letter-spacing: 0;
}

.doc p, .doc li { max-width: 68ch; }

.doc p + p { margin-top: calc(var(--unit) * 1.5); }

.doc ul { padding-left: 1.2em; }
.doc li + li { margin-top: calc(var(--unit) * .5); }

.doc a {
  text-decoration: underline;
  text-underline-offset: 2px;
  text-decoration-thickness: from-font;
}

.data-block {
  margin: calc(var(--unit) * 3) 0;
  padding: calc(var(--unit) * 3);
  background: var(--panel);
  border: var(--hairline) solid var(--line);
  border-radius: var(--radius);
  font-family: var(--mono);
  font-size: 14px;
  line-height: 1.7;
}

.doc .stand {
  margin-top: calc(var(--unit) * 6);
  font-family: var(--mono);
  font-size: 12px;
  color: var(--ink-3);
}

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

/* ─── Klein ─── */
@media (max-width: 768px) {
  .topbar { padding: 0 calc(var(--unit) * 3); }
  .stage-wrap { padding: calc(var(--unit) * 8) calc(var(--unit) * 3) calc(var(--unit) * 6); }
  .mark { width: 112px; }
  .doc { padding: calc(var(--unit) * 6) calc(var(--unit) * 3) calc(var(--unit) * 8); }
  .site-footer { padding: calc(var(--unit) * 3); }
  .footer-inner { flex-direction: column; }
}

@media (max-width: 480px) {
  .field { flex-direction: column; }
  .taster { width: 100%; }
}

/* ─── Ruhe ─── */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-delay: 0ms !important;
    transition-duration: .01ms !important;
  }
  .mark .sq, .reveal { opacity: 1; transform: none; }
}

/* ─── Druck — Register Hell, das Blatt ist der Beweis ─── */
@media print {
  body { background: #fff; }
  .lang, .register { display: none; }
}
