/* KI Trail · Erwartungen — Kuble Design System v2, dark-first (Night Ink, Kuble Blue, Amber) */
:root {
  color-scheme: dark;
  --blue: #2e5cff;
  --blue-bright: #4e7bff;
  --amber: #f7901f;
  --green: #3dd68c;

  --paper: #05070c;
  --paper-2: #0a0e17;
  --paper-3: #10141f;
  --ink: #f2f4f8;
  --ink-2: #b4bccc;
  --ink-3: #8892a6;
  --rule: #1e2535;
  --rule-strong: #2a3246;
  --elevate: color-mix(in oklab, var(--ink) 4%, transparent);

  --font: "Montserrat", ui-sans-serif, -apple-system, "Segoe UI", system-ui, sans-serif;
  --serif: "Instrument Serif", Georgia, serif;
  --mono: "JetBrains Mono", ui-monospace, "SF Mono", Menlo, monospace;

  --radius-card: 14px;
  --radius-pill: 999px;
  --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
  --shadow: 0 18px 44px rgba(0, 0, 0, 0.45);
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

.bg {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(60rem 36rem at 85% -10%, color-mix(in oklab, var(--blue) 16%, transparent), transparent 70%),
    radial-gradient(40rem 28rem at -10% 30%, color-mix(in oklab, var(--amber) 7%, transparent), transparent 70%),
    linear-gradient(var(--rule) 1px, transparent 1px) 0 0 / 64px 64px,
    linear-gradient(90deg, var(--rule) 1px, transparent 1px) 0 0 / 64px 64px;
  mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 55%, transparent 100%);
  -webkit-mask-image: linear-gradient(to bottom, #000 0%, rgba(0,0,0,.35) 55%, transparent 100%);
  opacity: .9;
}

.wrap { width: min(1180px, 100% - 32px); margin-inline: auto; }
.mono { font-family: var(--mono); }
.muted { color: var(--ink-3); margin: 0; font-size: 14px; }
.narrow { max-width: 34ch; }
strong { color: var(--ink); font-weight: 600; }

h1, h2, h3 { margin: 0; color: var(--ink); letter-spacing: -0.02em; }
h1 { font-size: clamp(40px, 7vw, 88px); line-height: 1.02; font-weight: 700; letter-spacing: -0.035em; }
h2 { font-size: clamp(22px, 2.6vw, 30px); line-height: 1.15; font-weight: 600; }
h3 { font-size: 18px; line-height: 1.3; font-weight: 600; }
em { font-family: var(--serif); font-style: italic; font-weight: 400; letter-spacing: -0.01em; }
.em-blue { color: var(--blue-bright); }
.em-amber { color: var(--amber); }

.eyebrow {
  margin: 0 0 12px;
  font-size: 12px; letter-spacing: .12em; text-transform: uppercase;
  color: var(--ink-3);
}

/* Kopfzeile */
.top {
  position: sticky; top: 0; z-index: 10;
  background: color-mix(in oklab, var(--paper) 78%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--rule);
}
.top__inner { display: flex; align-items: center; justify-content: space-between; height: 64px; gap: 16px; }
.logo { height: 22px; width: auto; fill: var(--ink); display: block; }
.top__meta { display: flex; align-items: center; gap: 16px; font-size: 12px; color: var(--ink-3); }
.pill {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 12px; border-radius: var(--radius-pill);
  border: 1px solid var(--rule-strong); color: var(--ink-2);
}
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); box-shadow: 0 0 0 3px color-mix(in oklab, var(--amber) 25%, transparent); }

main { padding-block: 24px 96px; display: grid; gap: 24px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 112px) 0 clamp(16px, 3vw, 32px); }
.hero .eyebrow { color: var(--blue-bright); }
.lead { max-width: 62ch; margin: 28px 0 0; font-size: clamp(17px, 1.6vw, 20px); color: var(--ink-2); font-weight: 400; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.kpi {
  position: relative; overflow: hidden;
  padding: 22px 22px 20px; border-radius: var(--radius-card);
  background: var(--paper-2); border: 1px solid var(--rule);
}
.kpi::before {
  content: ""; position: absolute; left: 0; top: 0; height: 3px; width: 100%;
  background: var(--accent, var(--ink-3)); opacity: .9;
}
.kpi--blue { --accent: var(--blue); }
.kpi--amber { --accent: var(--amber); }
.kpi--green { --accent: var(--green); }
.kpi__label { margin: 0; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); }
.kpi__value { margin: 10px 0 6px; font-size: clamp(44px, 5vw, 60px); line-height: 1; font-weight: 700; letter-spacing: -0.04em; font-variant-numeric: tabular-nums; }
.kpi__value small { font-size: .42em; font-weight: 500; color: var(--ink-3); margin-left: 4px; letter-spacing: 0; }
.kpi--blue .kpi__value span { color: var(--blue-bright); }
.kpi--amber .kpi__value span { color: var(--amber); }
.kpi--green .kpi__value span { color: var(--green); }
.kpi__note { margin: 0; font-size: 13px; color: var(--ink-2); line-height: 1.45; }

/* Karten */
.grid-2 { display: grid; grid-template-columns: 1.25fr 1fr; gap: 24px; align-items: start; }
.stack { display: grid; gap: 24px; min-width: 0; }
.card {
  background: linear-gradient(180deg, var(--paper-2), color-mix(in oklab, var(--paper-2) 60%, var(--paper)));
  border: 1px solid var(--rule); border-radius: var(--radius-card);
  padding: clamp(20px, 3vw, 32px);
  box-shadow: var(--shadow);
  min-width: 0;
}
.card__head { margin-bottom: 24px; }
.card__head h2 { margin-bottom: 6px; }
.card__head--row { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; }

/* Themen-Balken */
.bars { display: grid; gap: 4px; }
.bar {
  display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 6px 16px; align-items: baseline;
  width: 100%; padding: 10px 12px; margin: 0;
  border: 1px solid transparent; border-radius: 10px;
  background: none; color: inherit; font: inherit; text-align: left; cursor: pointer;
  transition: background 140ms var(--ease), border-color 140ms var(--ease);
}
.bar:hover { background: var(--elevate); }
.bar:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.bar[aria-pressed="true"] { border-color: var(--rule-strong); background: var(--elevate); }
.bar__label { font-weight: 600; font-size: 15px; }
.bar__count { font-family: var(--mono); font-size: 13px; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.bar__count b { color: var(--ink); font-weight: 500; font-size: 15px; }
.bar__track { grid-column: 1 / -1; height: 10px; border-radius: var(--radius-pill); background: var(--paper-3); overflow: hidden; }
.bar__fill {
  display: block; height: 100%; width: 0; border-radius: inherit; background: var(--c);
  transition: width 1.1s var(--ease);
}
.bar__desc { grid-column: 1 / -1; font-size: 13px; color: var(--ink-3); margin: 0; }

/* Lebensbereich */
.split { display: flex; height: 56px; border-radius: 12px; overflow: hidden; gap: 3px; }
.split__seg {
  flex: 0 0 0%; display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 20px; color: var(--paper);
  background: var(--c); transition: flex-basis 1.1s var(--ease);
  min-width: 0;
}
.split__seg--muted { color: var(--ink-2); }
.split-legend { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 10px; }
.split-legend li { display: grid; grid-template-columns: 12px 1fr auto; align-items: center; gap: 12px; font-size: 14px; color: var(--ink-2); }
.split-legend i { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.split-legend span:last-child { font-family: var(--mono); color: var(--ink); font-size: 13px; }
.callout {
  margin: 24px 0 0; padding: 14px 16px; font-size: 14px; color: var(--ink-2);
  border-left: 3px solid var(--amber); background: color-mix(in oklab, var(--amber) 7%, transparent);
  border-radius: 0 10px 10px 0;
}

/* Wunschthemen */
.wishes { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.wish {
  display: inline-flex; align-items: baseline; gap: 8px;
  padding: 6px 13px; border-radius: var(--radius-pill);
  background: color-mix(in oklab, var(--c) calc(var(--s) * 22%), var(--paper));
  border: 1px solid color-mix(in oklab, var(--c) 40%, transparent);
  font-size: calc(13px + var(--s) * 5px); font-weight: calc(400 + var(--s) * 200);
  color: var(--ink);
}
.wish b { font-family: var(--mono); font-weight: 500; font-size: 12px; color: var(--c); }
.singles { margin: 18px 0 0; font-size: 13px; color: var(--ink-2); line-height: 1.7; }
.singles .mono { display: block; font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 4px; }

/* Matrix */
.matrix-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 28px; align-items: start; }
.matrix-scroll { overflow-x: auto; margin-inline: -4px; padding-inline: 4px; }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; min-width: 640px; }
.matrix th, .matrix td { padding: 5px 4px; text-align: center; border-bottom: 1px solid var(--rule); }
.matrix thead th {
  font-family: var(--mono); font-weight: 500; font-size: 11px; letter-spacing: .06em; text-transform: uppercase;
  color: var(--ink-3); vertical-align: bottom;
  writing-mode: vertical-rl; transform: rotate(180deg); text-align: left; height: 104px; padding: 8px 4px;
}
.matrix thead th:first-child { writing-mode: horizontal-tb; transform: none; }
.matrix th:first-child, .matrix td:first-child { text-align: left; }
.matrix tbody tr { transition: background 140ms var(--ease); cursor: default; }
.matrix tbody tr:hover, .matrix tbody tr.is-active { background: var(--elevate); }
.matrix tbody tr:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: -2px; }
.matrix td:first-child { font-family: var(--mono); font-size: 12px; color: var(--ink-2); white-space: nowrap; }
.mdot {
  display: inline-block; width: 13px; height: 13px; border-radius: 50%;
  background: var(--c); box-shadow: 0 0 0 3px color-mix(in oklab, var(--c) 18%, transparent);
  transform: scale(0); transition: transform .5s var(--ease);
}
.in .mdot { transform: scale(1); }
.mempty { display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--rule-strong); }
.mbar { display: inline-block; width: 24px; height: 6px; border-radius: 3px; background: var(--c); }
.mbar--muted { background: var(--rule-strong); }
.mtag {
  display: inline-block; padding: 3px 10px; border-radius: var(--radius-pill);
  font-size: 12px; font-weight: 500; color: var(--c); border: 1px solid color-mix(in oklab, var(--c) 45%, transparent);
  white-space: nowrap;
}
.matrix tfoot td { font-family: var(--mono); font-size: 13px; color: var(--ink); border-bottom: 0; padding-top: 14px; }
.matrix-aside {
  position: sticky; top: 88px;
  padding: 22px; border-radius: 12px; background: var(--paper); border: 1px solid var(--rule);
}
.matrix-aside .eyebrow { color: var(--amber); }
.matrix-quote {
  margin: 0 0 14px; font-family: var(--serif); font-style: italic;
  font-size: clamp(18px, 2vw, 22px); color: var(--ink-2); line-height: 1.35;
}

/* Stimmen + Filter */
.section-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin: 40px 0 20px; }
.filters { display: flex; flex-wrap: wrap; gap: 8px; }
.fbtn {
  font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  padding: 7px 14px; border-radius: var(--radius-pill);
  background: transparent; color: var(--ink-2); border: 1px solid var(--rule-strong);
  transition: all 140ms var(--ease);
}
.fbtn:hover { color: var(--ink); border-color: var(--ink-3); }
.fbtn:focus-visible { outline: 2px solid var(--blue-bright); outline-offset: 2px; }
.fbtn[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.quotes { columns: 3 280px; column-gap: 16px; }
.quote {
  break-inside: avoid; margin: 0 0 16px; padding: 22px;
  border-radius: var(--radius-card); background: var(--paper-2); border: 1px solid var(--rule);
  transition: border-color 140ms var(--ease);
}
.quote:hover { border-color: var(--rule-strong); }
.quote.is-dim { display: none; }
.quote__n { font-family: var(--mono); font-size: 12px; color: var(--ink-3); margin: 0 0 10px; }
.quote blockquote { margin: 0; font-size: 16px; line-height: 1.5; color: var(--ink); font-weight: 400; }
.quote blockquote::before { content: "«"; color: var(--amber); margin-right: 2px; }
.quote blockquote::after { content: "»"; color: var(--amber); margin-left: 2px; }
.quote__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 16px; }

/* Folgerungen */
.todos { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; }
.todo {
  padding: 24px; border-radius: var(--radius-card);
  background: var(--paper-2); border: 1px solid var(--rule);
  display: flex; flex-direction: column; gap: 10px;
}
.todo:first-child { background: color-mix(in oklab, var(--blue) 16%, var(--paper-2)); border-color: color-mix(in oklab, var(--blue) 40%, var(--rule)); }
.todo__n { font-size: 13px; color: var(--amber); }
.todo p { margin: 0; color: var(--ink-2); font-size: 14px; }

/* Nebenbei */
.aside-row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin-top: 8px; }
.note { padding: 22px; border-radius: var(--radius-card); border: 1px dashed var(--rule-strong); }
.note__q { margin: 0 0 6px; font-family: var(--serif); font-style: italic; font-size: 21px; color: var(--ink); line-height: 1.3; }
.note__a { margin: 0; font-size: 14px; color: var(--ink-3); }

/* Fusszeile */
.foot { border-top: 1px solid var(--rule); padding: 24px 0 40px; }
.foot__inner { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--ink-3); }

/* Einblenden */
.reveal { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.reveal.in { opacity: 1; transform: none; }

@media (max-width: 980px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .grid-2 { grid-template-columns: 1fr; }
  .todos { grid-template-columns: repeat(2, 1fr); }
  .matrix-layout { grid-template-columns: 1fr; }
  .matrix-aside { position: static; }
  .aside-row { grid-template-columns: 1fr; }
}
@media (max-width: 560px) {
  .kpis, .todos { grid-template-columns: 1fr; }
  .hide-sm { display: none; }
  .kpi__value { font-size: 48px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
  .reveal { opacity: 1; transform: none; }
  .mdot { transform: scale(1); }
}
