/* Dunkles Design als Standard, helles Design bei prefers-color-scheme: light */
:root {
  color-scheme: dark light;
  --bg: #121212;
  --bg-elevated: #1a1a1a;
  --surface: #1c1c1c;
  --surface-hover: #232323;
  --border: #2e2e2e;
  --border-strong: #3d3d3d;
  --text: #ededed;
  --muted: #a0a0a0;
  --faint: #6b6b6b;
  --accent: #3ecf8e;
  --accent-soft: rgba(62, 207, 142, .12);
  --accent-border: rgba(62, 207, 142, .35);
  --glow: rgba(62, 207, 142, .10);
  --radius: 10px;
  --maxw: 68rem;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #fcfcfc;
    --bg-elevated: #ffffff;
    --surface: #ffffff;
    --surface-hover: #f6f6f6;
    --border: #e4e4e4;
    --border-strong: #cfcfcf;
    --text: #171717;
    --muted: #5f5f5f;
    --faint: #8f8f8f;
    --accent: #1f9d6b;
    --accent-soft: rgba(31, 157, 107, .10);
    --accent-border: rgba(31, 157, 107, .35);
    --glow: rgba(31, 157, 107, .08);
  }
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 15px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
a:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; border-radius: 4px; }

.container { width: 100%; max-width: var(--maxw); margin-inline: auto; padding-inline: 1.5rem; }

/* Kopfleiste */
.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  background: color-mix(in srgb, var(--bg) 85%, transparent);
  backdrop-filter: blur(8px);
  border-bottom: 1px solid var(--border);
}
.topbar .container { display: flex; align-items: center; justify-content: space-between; height: 56px; }
.brand { display: inline-flex; align-items: center; gap: .6rem; color: var(--text); font-weight: 600; font-size: 1rem; }
.brand:hover { text-decoration: none; }
.topnav { display: flex; gap: 1.25rem; font-size: .9rem; }
.topnav a { color: var(--muted); }
.topnav a:hover { color: var(--text); text-decoration: none; }

main { flex: 1; }

/* Hero */
.hero {
  position: relative;
  padding-block: 5rem 3.5rem;
  border-bottom: 1px solid var(--border);
  background:
    radial-gradient(60rem 22rem at 50% -8rem, var(--glow), transparent 70%),
    linear-gradient(var(--bg), var(--bg));
}
.eyebrow {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  margin: 0 0 1.25rem;
  padding: .2rem .7rem;
  border: 1px solid var(--border-strong);
  border-radius: 999px;
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--muted);
}
.dot { width: .5rem; height: .5rem; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.hero h1 { margin: 0 0 1rem; font-size: clamp(2.2rem, 6vw, 3.6rem); line-height: 1.08; letter-spacing: -.03em; font-weight: 700; }
.hero h1 span { color: var(--accent); }
.lead { max-width: 34rem; margin: 0; font-size: 1.1rem; color: var(--muted); }
.code { margin: 0 0 .75rem; font-family: var(--mono); font-size: .9rem; color: var(--accent); }
.hero .button { margin-top: 1.75rem; }

/* Abschnitte */
.section { padding-block: 3rem; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 1.25rem; }
.section-head h2 { margin: 0; font-size: 1.1rem; font-weight: 600; letter-spacing: -.01em; }
.section-head .count { font-family: var(--mono); font-size: .8rem; color: var(--faint); }

/* Karten */
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(19rem, 1fr)); }
.card {
  display: flex;
  flex-direction: column;
  gap: .9rem;
  padding: 1.25rem;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  color: var(--text);
  transition: border-color .15s, background-color .15s;
}
.card:hover { border-color: var(--border-strong); background: var(--surface-hover); text-decoration: none; }
.card-top { display: flex; align-items: center; justify-content: space-between; }
.icon {
  display: grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  border: 1px solid var(--accent-border);
  border-radius: 8px;
  background: var(--accent-soft);
  color: var(--accent);
}
.icon svg { width: 1.3rem; height: 1.3rem; }
.tag {
  padding: .1rem .55rem;
  border: 1px solid var(--accent-border);
  border-radius: 999px;
  background: var(--accent-soft);
  font-family: var(--mono);
  font-size: .72rem;
  color: var(--accent);
}
.card h3 { margin: 0; font-size: 1.05rem; font-weight: 600; }
.card p { margin: .2rem 0 0; color: var(--muted); font-size: .92rem; }
.card-foot {
  display: flex;
  justify-content: space-between;
  margin-top: auto;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
  font-family: var(--mono);
  font-size: .78rem;
  color: var(--faint);
}
.card-foot .go { color: var(--accent); }

.button {
  display: inline-block;
  padding: .55rem 1.1rem;
  background: var(--accent);
  border-radius: 8px;
  color: #0b1f16;
  font-weight: 600;
}
.button:hover { text-decoration: none; filter: brightness(1.08); }

/* Rechtstexte */
.prose { max-width: 44rem; padding-block: 3rem 4rem; }
.prose h1 { margin: 0 0 .5rem; font-size: 2rem; letter-spacing: -.02em; }
.prose h2 { margin: 2rem 0 .5rem; font-size: 1.1rem; }
.prose p, .prose li { color: var(--muted); }
.prose ul { padding-left: 1.2rem; }
.prose .meta { font-family: var(--mono); font-size: .8rem; color: var(--faint); }
.prose strong { color: var(--text); }

/* Fuß */
.footer { border-top: 1px solid var(--border); background: var(--bg-elevated); }
.footer .container {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1.5rem;
  align-items: center;
  justify-content: space-between;
  padding-block: 1.5rem;
  font-size: .85rem;
  color: var(--faint);
}
.footer nav { display: flex; gap: 1.25rem; }
.footer a { color: var(--muted); }
.footer a:hover { color: var(--text); text-decoration: none; }

@media (max-width: 30rem) {
  .hero { padding-block: 3rem 2.5rem; }
  .topnav { gap: .9rem; }
}
@media (prefers-reduced-motion: reduce) {
  .card { transition: none; }
}
