/* =========================================================================
   Startseite + Login/Registrierung
   ========================================================================= */

/* ---------- Kachel-Menü oben rechts ---------- */
.cells {
  display: flex; align-items: stretch; height: 72px; background: #fff;
  border-bottom: 1px solid #e6e2dc; box-shadow: 0 1px 2px rgba(45, 43, 42, 0.04);
}
.cell, .cells button.cell {
  position: relative; display: flex; align-items: center; justify-content: center;
  padding: 0 34px; margin: 0; border: 0; border-left: 1px solid #e6e2dc; background: transparent;
  color: var(--ink); font-family: var(--mono); font-size: 15px; font-weight: 500; letter-spacing: 0.06em;
  text-transform: uppercase; text-decoration: none; cursor: pointer; white-space: nowrap;
  transition: background-color 0.15s;
}
.cell:hover { background: #faf8f5; }
.cell::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 4px; background: var(--signal);
  transform: scaleX(0); transform-origin: left; transition: transform 0.28s cubic-bezier(0.2, 0.7, 0.2, 1);
}
.cell:hover::after, .cell:focus-visible::after, .cell.is-active::after { transform: scaleX(1); }
/* immer nur ein Strich: zeigt man auf eine andere Kachel, wandert er dorthin */
.cells:hover .cell.is-active:not(:hover)::after { transform: scaleX(0); }
.cell:focus-visible { outline: none; background: #f3f0eb; }
.cell-form { display: flex; margin: 0; }
.cell-lang { gap: 4px; padding: 0 22px; color: #b3ada6; }
.cell-lang:hover { background: transparent; }
.cell-lang button {
  border: 0; background: none; padding: 4px 3px; cursor: pointer;
  font: inherit; color: #a39d96; letter-spacing: 0.06em;
}
.cell-lang button:hover { color: var(--ink); }
.cell-lang button[aria-current="true"] { color: var(--ink); }
.cell-lang::after { display: none; }

/* ---------- Startseite ---------- */
.pub { background: var(--paper); color: var(--ink); font-size: 16px; letter-spacing: 0; color-scheme: light; }

.pub-header { position: absolute; inset: 0 0 auto 0; z-index: 20; display: flex; justify-content: space-between; align-items: stretch; padding-left: 48px; }
.pub-header .logo { color: var(--ink); }

.hero {
  position: relative; overflow: hidden; display: flex; align-items: flex-end;
  min-height: max(660px, 100vh); padding: 140px 48px 72px;
  background: var(--paper);
  color: var(--ink);
}
.glyphs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; color: var(--ink); }
.hero-content { position: relative; z-index: 2; max-width: 980px; }
.hero-pill {
  display: inline-flex; align-items: center; gap: 12px; margin-bottom: 30px; padding: 7px 16px;
  border-radius: 4px; background: rgba(45, 43, 42, 0.07); color: var(--ink);
  font-family: var(--mono); font-size: 19px; text-decoration: none; transition: background-color 0.2s;
}
.hero-pill:hover { background: rgba(45, 43, 42, 0.12); }
.hero h1 {
  margin: 0 0 30px; font-family: var(--serif); font-weight: 480; color: var(--ink);
  font-size: clamp(58px, 9.4vw, 140px); line-height: 0.94; letter-spacing: -0.035em;
}
.hero-lead { max-width: 39em; margin: 0; font-size: 19px; line-height: 1.5; color: #5a5650; }

.pub-main { background: linear-gradient(180deg, var(--paper) 0%, var(--paper) 52%, #e9eff0 80%, var(--sky) 100%); }
.pub-section { max-width: 1340px; margin: 0 auto; padding: 128px 48px; }
.pub-section + .pub-section { padding-top: 24px; }
.pub-h2 { margin: 0 0 20px; font-family: var(--serif); font-weight: 480; font-size: clamp(40px, 5vw, 64px); line-height: 1.04; letter-spacing: -0.025em; color: var(--ink); }
.pub-sub { max-width: 34em; margin: 0; font-family: var(--mono); font-size: 15px; line-height: 1.65; color: var(--ink-muted); }
.center { text-align: center; margin-left: auto; margin-right: auto; }

/* Schritte */
.step-cards { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-top: 64px; }
.step-card { overflow: hidden; border-radius: 6px; background: rgba(255, 255, 255, 0.55); box-shadow: 0 1px 2px rgba(45, 43, 42, 0.05); }
.step-visual {
  position: relative; height: 200px; overflow: hidden;
  background: linear-gradient(180deg, #f2eee7 0%, #ebe9e2 40%, #d6e8f1 100%);
}
.step-visual::before { opacity: 0.5; mix-blend-mode: multiply; }
.step-num { position: absolute; left: 18px; bottom: -14px; font-family: var(--serif); font-size: 120px; font-weight: 400; line-height: 1; letter-spacing: -0.04em; color: rgba(45, 43, 42, 0.13); }
.step-body { padding: 22px 22px 28px; }
.step-body h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 30px; font-weight: 480; letter-spacing: -0.025em; line-height: 1.1; }
.step-body p { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.6; color: var(--ink-muted); }

/* Rechte-Tabelle */
.rights { margin-top: 56px; }
.rights-head, .rights-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: center; gap: 16px; padding: 0 16px; }
.rights-head { padding-bottom: 14px; border-bottom: 1px solid rgba(45, 43, 42, 0.09); font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }
.rights-row { min-height: 76px; border-bottom: 1px solid rgba(45, 43, 42, 0.09); }
.rights-name { display: flex; align-items: center; gap: 14px; }
.rights-icon { flex: none; display: grid; place-items: center; width: 38px; height: 38px; border-radius: 50%; color: #fff; }
.rights-icon svg { width: 18px; height: 18px; }
.rights-name strong { display: block; font-family: var(--mono); font-size: 15px; font-weight: 500; color: var(--ink); }
.rights-name small { display: block; font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.state { padding: 8px 14px; border-radius: 4px; font-family: var(--mono); font-size: 13px; font-weight: 500; }
.state-on { background: #e3ede6; color: #2e312a; }
.state-off { background: #e3eaff; color: #1f4fd6; }
.state-ip { background: rgba(45, 43, 42, 0.06); color: var(--ink); }

/* Sicherheit */
.split { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 72px; align-items: start; }
.split-sticky { position: sticky; top: 48px; }
.facts { border-top: 1px solid rgba(45, 43, 42, 0.12); }
.fact { display: grid; grid-template-columns: 72px minmax(0, 1fr); padding: 34px 0; border-bottom: 1px solid rgba(45, 43, 42, 0.12); }
.fact-idx { padding-top: 12px; font-family: var(--mono); font-size: 13px; color: var(--ink-muted); }
.fact h3 { margin: 0 0 10px; font-family: var(--serif); font-size: 36px; font-weight: 480; letter-spacing: -0.025em; line-height: 1.1; }
.fact p { margin: 0; font-family: var(--mono); font-size: 14px; line-height: 1.65; color: var(--ink-muted); }

/* Footer */
.pub-footer {
  position: relative; overflow: hidden; margin: 0 12px 12px; padding: 48px 48px 36px; min-height: 600px;
  border-radius: 8px; color: var(--ink); background: #fff;
  border: 1px solid rgba(45, 43, 42, 0.07); box-shadow: 0 1px 2px rgba(45, 43, 42, 0.04);
}
.footer-top { position: relative; z-index: 2; display: flex; justify-content: space-between; align-items: center; gap: 24px; padding-bottom: 34px; border-bottom: 1px solid rgba(45, 43, 42, 0.1); }
.footer-top h2 { margin: 0; font-family: var(--serif); font-size: clamp(30px, 3.4vw, 44px); font-weight: 480; letter-spacing: -0.025em; }
.btn-ink {
  display: inline-flex; align-items: center; gap: 10px; height: 44px; padding: 0 18px; border-radius: 4px;
  background: #1c1816; color: #fff; font-family: var(--mono); font-size: 15px; font-weight: 500;
  text-decoration: none; transition: background-color 0.2s;
}
.btn-ink:hover { background: #3a3532; }
.footer-cols { position: relative; z-index: 2; display: grid; grid-template-columns: 120px repeat(2, minmax(0, 170px)) minmax(0, 360px); gap: 40px; margin-top: 40px; }
.footer-cols h4 { margin: 0 0 16px; font-family: var(--mono); font-size: 14px; font-weight: 500; }
.footer-cols a, .footer-cols p { display: block; margin: 0 0 10px; font-family: var(--mono); font-size: 13px; line-height: 1.6; color: var(--ink-muted); text-decoration: none; }
.footer-cols a:hover { color: var(--ink); }
.footer-word {
  position: absolute; left: 32px; bottom: -0.2em; z-index: 1; pointer-events: none; white-space: nowrap;
  font-family: var(--serif); font-size: clamp(120px, 21vw, 330px); font-weight: 480; letter-spacing: -0.05em; line-height: 1;
  color: rgba(45, 43, 42, 0.045);
}
.footer-bottom { position: absolute; left: 48px; right: 48px; bottom: 26px; z-index: 2; display: flex; justify-content: space-between; gap: 16px; font-family: var(--mono); font-size: 12px; color: rgba(45, 43, 42, 0.5); }

/* ---------- Login / Registrierung: Karte mit dünnem Rahmen mittig auf heller Fläche ---------- */
.auth-page {
  position: relative; isolation: isolate; min-height: 100vh; min-height: 100dvh; overflow: hidden;
  color: var(--ink); background: var(--paper);
}
.auth-page .glyphs { z-index: -1; }
.auth-top {
  position: absolute; top: 0; left: 0; right: 0; z-index: 2;
  display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 26px 32px;
  font-family: var(--mono); font-size: 13px; font-weight: 500; letter-spacing: 0.06em; text-transform: uppercase;
}
.auth-back { color: var(--ink-muted); text-decoration: none; transition: color 0.15s; }
.auth-back:hover { color: var(--ink); }
.auth-lang { display: flex; align-items: center; gap: 6px; margin: 0; color: #c4beb7; }
.auth-lang button {
  padding: 4px 2px; border: 0; background: none; cursor: pointer;
  font: inherit; letter-spacing: inherit; color: #a39d96; transition: color 0.15s;
}
.auth-lang button:hover, .auth-lang button[aria-current="true"] { color: var(--ink); }
.auth-main { display: grid; place-items: center; min-height: 100vh; min-height: 100dvh; padding: 96px 20px 64px; }

.auth-card {
  width: min(100%, 490px); padding: 48px 44px 40px;
  color: var(--ink); background: rgba(255, 255, 255, 0.72); border: 1px solid var(--frame);
}
.auth-logo { display: flex; justify-content: center; color: var(--ink); }
.auth-logo .wordmark { font-size: 32px; }
.auth-tagline {
  margin: 18px 0 34px; text-align: center; text-wrap: balance;
  font-family: var(--mono); font-size: 13px; letter-spacing: 0.02em; color: var(--ink-muted);
}

.auth-card .field { margin-bottom: 14px; }
.auth-card .field:not(.field-check) > label { /* nur für Screenreader, sichtbar ist der Platzhalter */
  position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap;
}
.auth-card input:not([type="checkbox"]) {
  height: 56px; padding: 0 18px; border: 1px solid var(--frame-strong); border-radius: 0;
  background: rgba(255, 255, 255, 0.6); color: var(--ink); caret-color: var(--signal);
  font-family: var(--mono); font-size: 15px; letter-spacing: 0.02em;
}
.auth-card input::placeholder { color: #8f8981; }
.auth-card input:not([type="checkbox"]):hover { border-color: rgba(45, 43, 42, 0.5); }
.auth-card input:not([type="checkbox"]):focus { border-color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.auth-card input:-webkit-autofill { -webkit-text-fill-color: var(--ink); -webkit-box-shadow: 0 0 0 100px #fdfcfa inset; }
.auth-card .help { font-family: var(--mono); font-size: 12px; color: var(--ink-muted); }
.auth-card .error { font-family: var(--mono); color: #b42318; }
.auth-card .has-error input:not([type="checkbox"]) { border-color: #d92d20; }
.auth-card .field-check { margin: 22px 0 20px; }
.auth-card .field-check > label { color: var(--ink-muted); font-size: 13px; }
.auth-card .field-check input { accent-color: var(--signal); }
.auth-card .form-error, .auth-card .alert {
  border-radius: 0; font-family: var(--mono); font-size: 13px; line-height: 1.5; padding: 12px 16px; margin-bottom: 18px;
}
.auth-card .form-error { background: #fdf0ee; border: 1px solid rgba(180, 35, 24, 0.3); color: #b42318; }
.auth-card .alert { background: rgba(255, 255, 255, 0.6); border: 1px solid var(--frame); color: var(--ink); }

/* Knöpfe mit kleinem Dreieck in der Ecke */
.btn-corner {
  position: relative; display: flex; align-items: center; justify-content: center; width: 100%; height: 56px;
  border: 1px solid transparent; border-radius: 0; cursor: pointer; text-decoration: none;
  font-family: var(--mono); font-size: 16px; font-weight: 500; letter-spacing: 0.02em;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}
.btn-corner::after {
  content: ""; position: absolute; right: 5px; bottom: 5px;
  border-left: 7px solid transparent; border-bottom: 7px solid currentColor; opacity: 0.75;
}
.btn-signal { margin-top: 6px; background: var(--signal); color: #fff; }
.btn-signal:hover { background: #255ef0; }
.btn-line { margin-top: 12px; background: transparent; border-color: var(--frame-strong); color: var(--ink); }
.btn-line::after { opacity: 0.35; }
.btn-line:hover { border-color: rgba(45, 43, 42, 0.55); background: rgba(45, 43, 42, 0.03); }
.btn-corner:focus-visible { outline: 2px solid var(--signal); outline-offset: 3px; }
.auth-note { margin: 18px 0 0; font-family: var(--mono); font-size: 13px; line-height: 1.5; color: var(--ink-muted); }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 1100px) {
  .step-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .footer-cols { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 860px) {
  .pub-header { padding-left: 20px; }
  .hero { padding: 120px 20px 48px; min-height: max(600px, 92vh); }
  .hero-pill { font-size: 15px; }
  .hero-lead { font-size: 17px; }
  .pub-section { padding: 88px 20px; }
  .split { grid-template-columns: 1fr; gap: 32px; }
  .split-sticky { position: static; }
  .fact { grid-template-columns: 48px minmax(0, 1fr); padding: 26px 0; }
  .fact h3 { font-size: 28px; }
  .pub-footer { margin: 0 8px 8px; padding: 36px 20px 120px; min-height: 0; }
  .footer-top { flex-direction: column; align-items: flex-start; }
  .footer-bottom { position: relative; left: auto; right: auto; bottom: auto; margin-top: 40px; flex-direction: column; gap: 4px; }
  .auth-top { padding: 20px 20px; font-size: 12px; }
  .auth-main { padding: 80px 16px 40px; }
  .auth-card { padding: 36px 22px 28px; }
  .auth-logo .wordmark { font-size: 27px; }
}
@media (max-width: 560px) {
  .cells { height: 60px; }
  .cell, .cells button.cell { padding: 0 14px; font-size: 12px; letter-spacing: 0.04em; }
  .cell-lang { padding: 0 12px; }
  .pub-header .wordmark { font-size: 22px; }
  .pub-header .wm-rest { display: none; }
  .step-cards { grid-template-columns: 1fr; }
  .step-visual { height: 140px; }
  .step-num { font-size: 96px; }
  .rights-head, .rights-row { padding: 0 4px; }
  .rights-name small { display: none; }
  .footer-cols { grid-template-columns: 1fr; gap: 24px; }
}
@media (prefers-reduced-motion: reduce) {
  .cell::after { transition: none; }
}
