/* Museum-RAG – gemeinsame Gestaltung nach Vorbild Enterprise AI Lab (Variante A: hell, ruhig, illustrativ).
   Farbschema inspiriert vom historischen Wappen und Museumsgebäude:
   Wappenrot (Primär), Laden-/Blattgrün (Sekundär / In Betrieb), Goldgelb (Akzent), Kalkweiss (Hintergrund).
   Keine externen Schriften oder Skripte (Datenschutz). */
:root {
  /* Wappenrot (Primärakzent: Logo, Hauptbuttons, Fokus, Governance) */
  --red-900: #7a1218;
  --red-800: #9e1b22;
  --red-600: #c42830;
  --red-400: #de646a;
  --red-200: #f2c6c8;
  --red-100: #fae8e9;
  --red-50:  #fdf5f5;

  /* Laden- & Blattgrün (Sekundärakzent: aktive Systembausteine, Säulen, Status «in Betrieb») */
  --green-900: #12422f;
  --green-800: #1b5e43;
  --green-600: #287a58;
  --green-400: #52a380;
  --green-200: #c2e5d5;
  --green-100: #e6f4ed;
  --green-50:  #f2f9f5;

  /* Wappengold / Gelb (Warmer Akzent: Hinweise, Highlights) */
  --gold-700: #9a670c;
  --gold-500: #d99b26;
  --gold-200: #f5dda4;
  --gold-100: #fcf1d4;
  --gold-50:  #fefaf0;

  /* Neutral (Kalkweiss / Sandstein / Schiefer) */
  --bg: #f8f7f4;
  --surface: #ffffff;
  --fg: #22252a;
  --muted: #5a626a;
  --border: #e4e2dc;

  /* Rollen */
  --accent: var(--red-800);
  --accent-soft: var(--red-100);
  --shadow: 0 1px 2px rgba(34, 37, 42, .05), 0 6px 20px rgba(34, 37, 42, .05);
  --shadow-hover: 0 2px 4px rgba(158, 27, 34, .06), 0 10px 28px rgba(158, 27, 34, .10);
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--fg);
  font: 17px/1.6 system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}
a { color: var(--accent); text-underline-offset: 2px; }
a:hover { text-decoration-thickness: 2px; }
img { max-width: 100%; height: auto; }
.wrap { max-width: 1160px; margin: 0 auto; padding: 0 16px; }
@media (min-width: 760px) { .wrap { padding: 0 32px; } }

/* ---------- Kopfzeile ---------- */
header.top { border-bottom: 1px solid var(--border); background: var(--surface); position: relative; }
header.top .wrap { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 72px; }
.brand {
  font-weight: 700; font-size: 21px; letter-spacing: -.015em; color: var(--fg); text-decoration: none;
  display: flex; align-items: center; gap: 10px; position: relative; align-self: stretch; white-space: nowrap;
}
.brand img { width: 36px; height: 36px; display: block; }
.brand .wm-ai { color: var(--red-800); }
/* kurzer farbiger Akzentstrich unter dem Logo, auf der Trennlinie */
.brand::after {
  content: ""; position: absolute; left: 0; bottom: -1px; width: 52px; height: 2px;
  background: linear-gradient(90deg, var(--red-800) 0%, var(--red-800) 65%, var(--gold-500) 100%);
}
nav.top-nav { display: flex; gap: 26px; align-items: center; font-size: 15.5px; }
nav.top-nav a { color: var(--fg); text-decoration: none; transition: color .2s ease; }
nav.top-nav a:hover, nav.top-nav a[aria-current="page"] { color: var(--red-800); }
.lang {
  border: 1px solid var(--border); border-radius: 999px; padding: 4px 14px; background: var(--surface);
  transition: border-color .2s ease;
}
.lang:hover { border-color: var(--red-600); }

/* ---------- Einstieg (Hero) ---------- */
.hero { padding: 64px 0 48px; }
.hero-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 24px; align-items: center; }
.hero-text { position: relative; z-index: 1; }
.eyebrow { color: var(--red-800); font-weight: 700; font-size: 14px; letter-spacing: .12em; text-transform: uppercase; margin: 0 0 16px; }
h1 { font-size: clamp(32px, 4.6vw, 54px); line-height: 1.08; letter-spacing: -.025em; margin: 0 0 22px; font-weight: 800; max-width: 16ch; }
.lead { font-size: clamp(17px, 1.6vw, 19px); color: #3d454b; max-width: 54ch; margin: 0 0 30px; }
.hero-art { margin: 0 -24px 0 -40px; position: relative; }
.hero-art img {
  display: block; width: 100%; height: auto;
  /* weicher Übergang in den hellen Hintergrund an allen vier Rändern */
  -webkit-mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 90%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 12%, #000 84%, transparent 100%);
  -webkit-mask-composite: source-in;
          mask-image: linear-gradient(to right, transparent 0, #000 16%, #000 90%, transparent 100%),
                      linear-gradient(to bottom, transparent 0, #000 12%, #000 84%, transparent 100%);
          mask-composite: intersect;
}
.actions { display: flex; flex-wrap: wrap; gap: 12px; }
.btn {
  display: inline-flex; align-items: center; gap: 9px; padding: 12px 18px; border-radius: 10px;
  font-weight: 600; font-size: 15.5px; white-space: nowrap; text-decoration: none; border: 1px solid var(--border);
  background: var(--surface); color: var(--fg); box-shadow: var(--shadow);
  transition: transform .2s ease, box-shadow .2s ease, background-color .2s ease;
}
.btn svg { width: 20px; height: 20px; flex: none; }
.btn.primary { background: var(--red-800); border-color: var(--red-800); color: #fff; }
.btn.primary:hover { background: var(--red-900); }
.btn:hover { text-decoration: none; transform: translateY(-1px); box-shadow: var(--shadow-hover); }
.btn .in { color: var(--red-800); }

/* Hinweis-Kasten mit warmem Goldgelb-Akzent */
.notice {
  margin: 20px 0 0; padding: 14px 18px; border-radius: 12px; font-size: 15px;
  background: var(--gold-50); border: 1px solid var(--gold-200); border-left: 3px solid var(--gold-500);
}

/* Vier Säulen unter dem Einstieg */
.pillars { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; margin-top: 52px; }
.pillar { border-left: 2px solid var(--green-600); padding: 2px 0 2px 18px; }
.pillar svg { width: 26px; height: 26px; color: var(--red-800); display: block; margin-bottom: 10px; }
.pillar strong { display: block; font-size: 17px; letter-spacing: -.005em; }
.pillar span { color: var(--muted); font-size: 15px; }

/* ---------- Abschnitte ---------- */
section { padding: 48px 0; }
section + section { border-top: 1px solid var(--border); }
h2 { font-size: clamp(24px, 3vw, 32px); letter-spacing: -.015em; margin: 0 0 8px; }
.section-lead { color: var(--muted); margin: 0 0 26px; max-width: 64ch; }
h3 { font-size: 18px; margin: 0 0 6px; }

.grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; }
.grid.two { grid-template-columns: repeat(2, 1fr); }
.card {
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px;
  padding: 22px; box-shadow: var(--shadow); transition: box-shadow .25s ease, border-color .25s ease;
}
.card:hover { box-shadow: var(--shadow-hover); border-color: var(--red-200); }
.card p { margin: 0; color: var(--muted); font-size: 16px; }
.tag {
  display: inline-block; font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase;
  color: var(--green-800); background: var(--green-100); border-radius: 999px; padding: 3px 10px; margin-bottom: 10px;
}

.principles { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; counter-reset: p; }
.principles li {
  counter-increment: p; display: grid; grid-template-columns: 38px 1fr; gap: 16px;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 18px 20px;
}
.principles li::before {
  content: counter(p); width: 38px; height: 38px; border-radius: 50%;
  background: var(--red-100); color: var(--red-800); font-weight: 700; display: grid; place-items: center;
}
.principles p { margin: 0; color: var(--muted); font-size: 16px; }
.small { font-size: 14px; color: var(--muted); }

/* ---------- Architekturbild (HTML statt Grafik: passt sich jeder Breite an) ---------- */
.arch { display: grid; grid-template-columns: 1fr 240px; gap: 16px; }
.arch-stack { display: grid; gap: 10px; }
.layer {
  display: grid; grid-template-columns: 170px 1fr; gap: 16px; align-items: center;
  background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px 18px;
}
.layer.gov { border: 2px solid var(--red-800); background: linear-gradient(0deg, var(--red-50), var(--surface)); }
.layer-name { font-weight: 700; font-size: 15px; line-height: 1.3; }
.layer-name small { display: block; font-weight: 500; color: var(--muted); font-size: 13px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  font-size: 14px; padding: 5px 11px; border-radius: 8px; border: 1px solid var(--green-400);
  color: var(--fg); background: var(--green-50); white-space: nowrap;
}
.chip.plan { border: 1px dashed #9aa29f; background: transparent; color: var(--muted); }
.chip.gov { border-color: var(--red-800); background: var(--red-800); color: #fff; }
.arrow { text-align: center; color: var(--green-600); font-size: 13px; line-height: 1; }
.arch-side { display: grid; gap: 10px; align-content: start; }
.side-box { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 14px; }
.side-box.hitl { border: 2px solid var(--red-800); }
.side-box h3 { font-size: 15px; margin: 0 0 8px; }
.side-box .chips { gap: 6px; }
.side-box .chip { font-size: 13px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin-top: 14px; font-size: 14px; color: var(--muted); align-items: center; }
.legend .chip { font-size: 12px; }

/* sehr sanftes Aufleuchten einzelner Knoten der Kontrollschicht */
@media (prefers-reduced-motion: no-preference) {
  .layer.gov .chip.gov { animation: node-glow 9s ease-in-out infinite; }
  .layer.gov .chip.gov:nth-child(2) { animation-delay: 1.8s; }
  .layer.gov .chip.gov:nth-child(3) { animation-delay: 3.6s; }
  .layer.gov .chip.gov:nth-child(4) { animation-delay: 5.4s; }
  @keyframes node-glow {
    0%, 82%, 100% { box-shadow: 0 0 0 0 rgba(217, 155, 38, 0); }
    90% { box-shadow: 0 0 0 4px rgba(217, 155, 38, .32); }
  }
}

/* ---------- Roadmap ---------- */
.roadmap { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.phase { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; padding: 20px; }
.phase.now { border: 2px solid var(--green-800); }
.phase h3 { margin-bottom: 2px; }
.phase .when { font-size: 13px; color: var(--muted); margin-bottom: 12px; }
.phase ul { margin: 0; padding-left: 18px; color: var(--muted); font-size: 15px; }
.phase li { margin: 6px 0; }
.phase li::marker { color: var(--red-600); }
.phase.now li::marker { color: var(--green-600); }
.phase li strong { color: var(--fg); font-weight: 600; }

/* ---------- Stack ---------- */
.stack { display: grid; grid-template-columns: repeat(2, 1fr); gap: 18px; }
.stack dl { margin: 0; }
.stack dt { font-weight: 600; margin-top: 12px; }
.stack dt:first-child { margin-top: 0; }
.stack dd { margin: 2px 0 0; color: var(--muted); font-size: 15px; }

/* ---------- Textseiten (Datenschutz) ---------- */
.prose { padding: 48px 0 24px; max-width: 72ch; }
.prose h1 { max-width: none; font-size: clamp(28px, 4vw, 40px); }
.prose h2 { font-size: 21px; margin-top: 36px; }
.prose ul { padding-left: 22px; }
.prose li { margin: 6px 0; }
.prose li::marker { color: var(--red-600); }
.prose code { font-size: .92em; background: var(--gold-100); padding: 1px 6px; border-radius: 6px; overflow-wrap: anywhere; }

/* ---------- Fusszeile ---------- */
footer.bottom { border-top: 1px solid var(--border); margin-top: 24px; padding: 28px 0 40px; font-size: 15px; color: var(--muted); background: var(--surface); }
footer.bottom .wrap { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 12px 24px; }
footer.bottom nav { display: flex; flex-wrap: wrap; gap: 8px 18px; }
footer.bottom a { color: var(--muted); }
footer.bottom a:hover { color: var(--red-800); }

/* ---------- Bewegung nur, wenn erwünscht ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

/* Desktop: Button-Reihe bleibt einzeilig und darf in den (weich auslaufenden) Bildbereich ragen */
@media (min-width: 961px) {
  .actions { flex-wrap: nowrap; width: max-content; }
}

/* ---------- Tablet und Smartphone ---------- */
@media (max-width: 960px) {
  .hero-grid { grid-template-columns: 1fr; gap: 8px; }
  .hero-art { order: 2; max-width: 720px; margin: 0 auto; width: 100%; }
  h1 { max-width: 18ch; }
  .arch { grid-template-columns: 1fr; }
  .roadmap { grid-template-columns: repeat(2, 1fr); }
  .pillars { grid-template-columns: repeat(2, 1fr); row-gap: 26px; }
}
@media (max-width: 760px) {
  .grid, .grid.two { grid-template-columns: 1fr; }
  .hero { padding: 40px 0 32px; }
  nav.top-nav { gap: 14px; font-size: 15px; }
  nav.top-nav .hide-sm { display: none; }
  .brand { font-size: 16px; gap: 8px; }
  nav.top-nav { gap: 12px; font-size: 14px; }
  .lang { padding: 3px 10px; }
  .brand img { width: 28px; height: 28px; }
  .brand::after { width: 40px; }
  .pillars { margin-top: 36px; }
}
@media (max-width: 380px) {
  .brand { font-size: 15px; }
  .brand img { width: 24px; height: 24px; }
}
@media (max-width: 560px) {
  .layer { grid-template-columns: 1fr; gap: 8px; }
  .roadmap, .stack, .pillars { grid-template-columns: 1fr; }
  .chip { white-space: normal; }
  .btn { width: 100%; justify-content: center; }
}
