/* Roboto lokal eingebunden (Ordner fonts/) – keine Verbindung zu Google */
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 400; font-display: swap; src: url('fonts/roboto-400.woff2') format('woff2'); }
@font-face { font-family: 'Roboto'; font-style: normal; font-weight: 700; font-display: swap; src: url('fonts/roboto-700.woff2') format('woff2'); }

:root {
  --bg: #0d1020;
  --bg-2: #141833;
  --card: rgba(255,255,255,0.045);
  --card-hover: rgba(255,255,255,0.09);
  --border: rgba(255,255,255,0.09);
  --text: #e9ebf5;
  --muted: #9aa0bd;
  --accent: #f9f871;
  --accent-2: #7c83ff;
  --radius: 16px;
}
* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: 'Roboto', -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 500px at 10% -10%, rgba(124,131,255,0.22), transparent 60%),
    radial-gradient(700px 400px at 100% 0%, rgba(249,248,113,0.10), transparent 60%),
    var(--bg);
  min-height: 100vh;
  line-height: 1.45;
}
.wrap { max-width: 1100px; margin: 0 auto; padding: 24px 20px 64px; }

/* Kopfzeile */
header {
  display: flex; flex-wrap: wrap; gap: 16px;
  align-items: flex-end; justify-content: space-between;
  padding: 24px 0 32px;
}
.brand h1 { margin: 0; font-size: clamp(1.7rem, 4vw, 2.4rem); letter-spacing: -0.02em; }
.brand h1 span { color: var(--accent); }
.brand p { margin: 6px 0 0; color: var(--muted); }
.clock {
  text-align: right; padding: 10px 16px;
  background: var(--card); border: 1px solid var(--border); border-radius: 12px;
}
.clock .time { font-size: 1.5rem; font-weight: 700; color: var(--accent); font-variant-numeric: tabular-nums; }
.clock .date { font-size: 0.85rem; color: var(--muted); }

/* Suche */
.search {
  width: 100%; padding: 14px 18px; margin-bottom: 28px;
  font: inherit; color: var(--text);
  background: var(--bg-2); border: 1px solid var(--border); border-radius: 12px; outline: none;
}
.search:focus { border-color: var(--accent-2); box-shadow: 0 0 0 3px rgba(124,131,255,0.25); }

/* Abschnitte */
section { margin-bottom: 40px; }
.section-title {
  display: flex; align-items: center; gap: 10px;
  font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.12em;
  color: var(--muted); margin: 0 0 14px;
}
.section-title::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.group { margin-bottom: 26px; }
h2 { font-size: 1.35rem; margin: 0 0 18px; }
h2 small { color: var(--muted); font-weight: 400; font-size: 0.9rem; margin-left: 8px; }

/* Projekt-Karten */
.grid { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(215px, 1fr)); }
.card {
  display: flex; align-items: center; gap: 12px;
  padding: 16px; text-decoration: none; color: var(--text);
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius);
  transition: transform .2s ease, background .2s ease, border-color .2s ease;
}
.card:hover, .card:focus-visible { transform: translateY(-3px); background: var(--card-hover); border-color: rgba(249,248,113,0.45); outline: none; }
.card .icon {
  flex: 0 0 42px; height: 42px; display: grid; place-items: center;
  font-size: 1.35rem; border-radius: 12px; background: rgba(255,255,255,0.07);
}
.card .name { font-weight: 700; }
.card > span:last-child { min-width: 0; overflow-wrap: break-word; hyphens: auto; -webkit-hyphens: auto; }
.card .sub { display: block; font-size: 0.72rem; color: var(--muted); margin-top: 2px; }

.hidden { display: none !important; }
.empty { color: var(--muted); font-style: italic; margin: 0; }

/* Footer / Impressum */
footer {
  margin-top: 20px; padding-top: 20px; border-top: 1px solid var(--border);
  display: flex; flex-wrap: wrap; gap: 20px; justify-content: space-between;
  font-size: 0.8rem; color: var(--muted);
}
footer p { margin: 2px 0; }
footer a { color: var(--accent); text-decoration: none; }
footer a:hover { text-decoration: underline; }

/* Rechtstexte (datenschutz.html) */
.legal { max-width: 800px; }
.legal .back-link {
  display: inline-block; margin: 24px 0 8px; padding: 10px 18px;
  color: var(--accent); font-weight: 700; text-decoration: none;
  background: var(--card); border: 1px solid var(--border); border-radius: 10px;
  transition: background .2s, border-color .2s;
}
.legal .back-link:hover { background: var(--card-hover); border-color: rgba(249,248,113,0.45); }
.legal h1 { color: var(--accent); font-size: clamp(1.7rem, 4vw, 2.2rem); letter-spacing: -0.02em; margin: 24px 0 16px; }
.legal h2 { color: var(--accent); font-size: 1.1rem; margin: 0 0 10px; }
.legal p, .legal li { color: #cfd2e6; line-height: 1.7; }
.legal ul { padding-left: 20px; }
.legal a { color: var(--accent); text-decoration: none; }
.legal a:hover { text-decoration: underline; }
.legal hr { border: 0; border-top: 1px solid var(--border); margin: 28px 0; }

@media (max-width: 560px) {
  header { align-items: flex-start; }
  .clock { text-align: left; }
  /* auto-fit: eine einzelne Karte nutzt die volle Breite, ab zwei Karten zweispaltig */
  .grid { grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 10px; }
  .card { padding: 12px; gap: 10px; font-size: 0.92rem; }
  .card .icon { flex-basis: 34px; height: 34px; font-size: 1.1rem; border-radius: 10px; }
}
@media (prefers-reduced-motion: reduce) { .card { transition: none; } }
