/* Schwarz-Weiß-Design, angelehnt an das Card-Layout des Versuchsprotokoll-Tools */

:root {
  --bg: #ffffff;
  --surface: #ffffff;
  --surface-2: #f5f5f5;
  --line: #d4d4d4;
  --fg: #0a0a0a;
  --muted: #555555;
  --accent: #000000;
  --accent-ink: #ffffff;
  --accent-soft: #ededed;
  --brand: #000000;
  --brand-ink: #ffffff;
  --brand-muted: #c9c9c9;
  --brand-line: #000000;
  --f-disp: "Barlow Semi Condensed", "Arial Narrow", Arial, sans-serif;
  --f-body: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --max-breite: 44rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #000000;
    --surface: #0a0a0a;
    --surface-2: #161616;
    --line: #3a3a3a;
    --fg: #f5f5f5;
    --muted: #a8a8a8;
    --accent: #ffffff;
    --accent-ink: #000000;
    --accent-soft: #1a1a1a;
    --brand: #000000;
    --brand-ink: #ffffff;
    --brand-muted: #bdbdbd;
    --brand-line: #3a3a3a;
    color-scheme: dark;
  }
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  padding: 0;
  font: 15px/1.6 var(--f-body);
  color: var(--fg);
  background: var(--bg);
}

.wrap {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding-inline: 16px;
}

header.top {
  background: var(--brand);
  color: var(--brand-ink);
  border-bottom: 1px solid var(--brand-line);
}

header.top .wrap {
  padding-block: 20px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  flex-wrap: wrap;
}

.btn-cta {
  display: inline-block;
  width: 100%;
  box-sizing: border-box;
  text-align: center;
  background: var(--accent);
  color: var(--accent-ink);
  font: 600 17px/1.2 var(--f-disp);
  letter-spacing: 0.01em;
  text-decoration: none;
  padding: 14px 20px;
  border-radius: 6px;
  border: 1px solid var(--accent);
}

.btn-cta:hover {
  opacity: 0.85;
}

@media (min-width: 30rem) {
  .btn-cta {
    width: auto;
  }
}

.brand-logo {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 0;
  font-weight: normal;
}

.logo-icon {
  height: 40px;
  width: 40px;
  flex: none;
  display: block;
}

.wordmark {
  font-family: "Space Grotesk", sans-serif;
  font-size: 22px;
  letter-spacing: -0.02em;
  line-height: 1;
  color: var(--brand-ink);
}

.wordmark .wm-light {
  font-weight: 400;
}

.wordmark .wm-bold {
  font-weight: 700;
}

.wordmark .wm-mono {
  font-family: "IBM Plex Mono", monospace;
  font-size: 13px;
  font-weight: 500;
  color: var(--brand-muted);
  margin-left: 1px;
}

main {
  padding-block: 32px 48px;
}

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

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 18px 20px 20px;
}

.card h2 {
  font: 600 19px/1.2 var(--f-disp);
  letter-spacing: 0.01em;
  margin: 0 0 0.75rem;
  color: var(--fg);
}

p {
  margin: 0 0 0.75rem;
}

p:last-child {
  margin-bottom: 0;
}

.platzhalter {
  display: inline-block;
  background: var(--accent-soft);
  border-left: 3px solid var(--fg);
  padding: 0.75rem 1rem;
  border-radius: 4px;
}

a {
  color: var(--accent);
}

.site-footer {
  color: var(--muted);
  font-size: 0.85rem;
}

.site-footer .wrap {
  padding-block: 1rem 2rem;
  border-top: 1px solid var(--line);
  margin-top: 8px;
}

@media (max-width: 30rem) {
  header.top .wrap {
    padding-block: 16px;
  }
}

/* Rechtliche Seiten (Impressum, Datenschutzerklärung) */
.legal {
  max-width: var(--max-breite);
  margin: 0 auto;
  padding: 24px 16px 48px;
}

.legal h1 {
  font: 700 clamp(24px, 6vw, 32px) / 1.2 var(--f-disp);
  margin: 0.5rem 0 1rem;
}

.legal h2 {
  font: 600 18px/1.2 var(--f-disp);
  margin: 1.75rem 0 0.5rem;
}

.legal ul {
  padding-left: 1.25rem;
  margin: 0 0 0.75rem;
}

/* ---------- Startseite: Desktop-Ansicht (/) ---------- */
.wrap-breit {
  max-width: 68rem;
}

.top-nav {
  display: flex;
  gap: 24px;
}

.top-nav a {
  color: var(--brand-ink);
  text-decoration: none;
  font: 600 16px/1 var(--f-disp);
  letter-spacing: 0.02em;
  padding-block: 6px;
  border-bottom: 2px solid transparent;
}

.top-nav a:hover {
  border-bottom-color: var(--brand-ink);
}

.ansicht-desktop main {
  display: flex;
  flex-direction: column;
  gap: 24px;
  padding-block: 48px 64px;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 3fr) minmax(0, 2fr);
  gap: 40px;
  align-items: center;
  padding-block: 8px 16px;
}

.eyebrow {
  font: 500 13px/1 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 12px;
}

.hero h2 {
  font: 700 clamp(32px, 4.2vw, 48px) / 1.05 var(--f-disp);
  letter-spacing: -0.01em;
  margin: 0 0 16px;
}

.lead {
  font-size: 18px;
  color: var(--muted);
  max-width: 34rem;
  margin-bottom: 24px;
}

.hero-formel {
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
  padding: 24px 28px;
}

.formel-label {
  font: 500 12px/1 "IBM Plex Mono", monospace;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  margin-bottom: 6px;
}

.formel {
  font: 400 26px/1.3 "Space Grotesk", sans-serif;
  margin-bottom: 18px;
}

.formel:last-child {
  margin-bottom: 0;
}

.prozesse {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.prozess {
  display: flex;
  flex-direction: column;
  gap: 6px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
  transition: border-color 0.15s;
}

.prozess:hover {
  border-color: var(--fg);
}

.prozess-name {
  font: 600 21px/1.2 var(--f-disp);
}

.prozess-text {
  color: var(--muted);
  font-size: 14px;
}

/* Falls die Desktop-Ansicht doch schmal geöffnet wird (Umschalter im Footer) */
@media (max-width: 760px) {
  .hero,
  .prozesse {
    grid-template-columns: minmax(0, 1fr);
  }
  .top-nav {
    gap: 16px;
  }
}

/* ---------- Startseite: Mobil-Ansicht (/m/) ---------- */
.ansicht-mobil header.top .wrap {
  padding-block: 14px;
}

.ansicht-mobil .logo-icon {
  height: 34px;
  width: 34px;
}

.ansicht-mobil .wordmark {
  font-size: 20px;
}

.ansicht-mobil main {
  display: flex;
  flex-direction: column;
  gap: 16px;
  padding-block: 20px 32px;
}

.ansicht-mobil .btn-cta {
  width: 100%;
  min-height: 52px;
  font-size: 19px;
  padding-block: 15px;
}

.ansicht-mobil .site-footer .wrap {
  padding-bottom: calc(2rem + env(safe-area-inset-bottom, 0px));
}

/* Mobil: App-Raster (8 Kacheln) */
.m-titel {
  font: 700 24px/1.1 var(--f-disp);
  margin: 0;
}

.app-raster {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.app-kachel {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-height: 132px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--surface);
  color: var(--fg);
  text-decoration: none;
}

a.app-kachel {
  background: var(--accent);
  color: var(--accent-ink);
  border-color: var(--accent);
}

a.app-kachel:active {
  opacity: 0.85;
}

.app-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 44px;
  height: 44px;
  margin-bottom: auto;
  border-radius: 10px;
  border: 1.5px solid currentColor;
  font: 700 18px/1 "Space Grotesk", sans-serif;
}

.app-icon sub {
  font-size: 11px;
}

.app-name {
  font: 600 18px/1.15 var(--f-disp);
  margin-top: 12px;
  hyphens: manual;
}

.app-status {
  font-size: 12.5px;
  line-height: 1.3;
  opacity: 0.75;
}

.app-leer {
  border-style: dashed;
  color: var(--muted);
}

/* Startseite Desktop: Karte für App 2 (Versuchsprotokoll) */
.app-karte {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 24px 28px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface-2);
}

.app-karte h2 {
  font: 700 26px/1.1 var(--f-disp);
  margin: 0 0 8px;
}

.app-karte p {
  max-width: 40rem;
}

.app-karte .eyebrow {
  margin-bottom: 8px;
}

.btn-cta-hell {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--fg);
  white-space: nowrap;
}

@media (max-width: 760px) {
  .app-karte {
    flex-direction: column;
    align-items: stretch;
  }
}

/* Mobil: zweite App-Kachel (aktiv, hell) */
a.app-kachel.app-zweit {
  background: var(--surface);
  color: var(--fg);
  border-color: var(--fg);
}

.app-zweit .app-icon {
  font-size: 15px;
}
