/* dreaMake.dev — Design-System S3Flow (Affinity-Stil) als CSS.
   Farben und Maße stammen aus dem Dokument `design-system` (DRE-5).
   Nur lokale Dateien: keine @import, keine CDN-Schriften, kein JavaScript. */

:root {
  color-scheme: light dark;
  /* Dunkle App-Palette mit kontraststärkeren Web-Rahmen. */
  --base-900: #121416;
  --base-800: #1a1d20;
  --base-700: #212529;
  --base-600: #2a2f34;
  --base-500: #343a40;
  --line-900: #858e97;
  --line-700: #858e97;
  /* Web-Erweiterung: eine Stufe heller als text_100, aus derselben Grau-Familie.
     Nur für Text auf dem gedrückten Akzent, wo text_100 nur 4,1:1 erreicht. */
  --text-000: #f8f9fa;
  --text-100: #e9ecef;
  --text-300: #adb5bd;
  --text-500: #6c757d;
  --accent-500: #3d8bfd;
  --accent-600: #2f6fd0;
  --accent-200: #8bb9ff;
  --select-bg: #2b4a78;
  --warning: #d9a227;
  --danger: #e05252;
  --success: #3fb950;
  --placeholder-bg: rgba(217, 162, 39, 0.12);
  --primary-text: #121416;
  --primary-hover: #8bb9ff;
  --primary-active-text: #f8f9fa;

  /* Abstände — 4er-Raster. xxxl/4xl/5xl sind Web-Erweiterungen
     für Seitensektionen; die App braucht sie nicht. */
  --sp-xs: 2px;
  --sp-sm: 4px;
  --sp-md: 8px;
  --sp-lg: 12px;
  --sp-xl: 16px;
  --sp-xxl: 24px;
  --sp-3xl: 32px;
  --sp-4xl: 48px;
  --sp-5xl: 64px;

  /* Schrift — ausschließlich lokal installierte Familien, Fallback System-Sans */
  --font-ui: Inter, "Segoe UI", "SF Pro Text", "Noto Sans", system-ui, sans-serif;
  --font-mono: "JetBrains Mono", Consolas, Menlo, monospace;

  /* Radien und Maße */
  --r-control: 2px;
  --r-panel: 4px;
  --border: 1px;

  --page-max: 1080px;
}

/* System preference applies before first paint, including with JavaScript disabled.
   Web borders are stronger than the app tokens to reach 3:1 on all surfaces. */
@media (prefers-color-scheme: light) {
  :root {
    --base-900: #f3f4f6;
    --base-800: #f7f8f9;
    --base-700: #ffffff;
    --base-600: #e6e9ec;
    --base-500: #dce1e6;
    --line-900: #737c85;
    --line-700: #737c85;
    --text-100: #1b1f23;
    --text-300: #4a5258;
    --text-500: #68707a;
    --accent-500: #1f66d1;
    --accent-600: #1a5bbf;
    --accent-200: #1a5bbf;
    --select-bg: #dce8fa;
    --warning: #805900;
    --danger: #b52a32;
    --success: #236d32;
    --placeholder-bg: #fff1cc;
    --primary-text: #ffffff;
    --primary-hover: #1a5bbf;
    --primary-active-text: #ffffff;
  }
}

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  /* Das Design-System setzt 13px für die Desktop-App. Im Browser ist das
     für Fließtext zu klein, deshalb 15px Grundgröße bei gleicher Dichte. */
  font-size: 15px;
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  margin: 0;
  background: var(--base-900);
  color: var(--text-100);
  font-family: var(--font-ui);
  font-size: 1rem;
  line-height: 1.6;
  -webkit-text-size-adjust: 100%;
}

/* ── Fokus: 1px Akzentrahmen, kein Glow ─────────────────────────────── */

:focus-visible {
  outline: var(--border) solid var(--accent-500);
  outline-offset: 2px;
}

.skip-link {
  position: absolute;
  left: var(--sp-md);
  top: var(--sp-md);
  z-index: 10;
  padding: var(--sp-md) var(--sp-lg);
  background: var(--base-600);
  border: var(--border) solid var(--accent-500);
  border-radius: var(--r-control);
  color: var(--text-100);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: translateY(0);
}

/* ── Typografie ─────────────────────────────────────────────────────── */

h1,
h2,
h3 {
  margin: 0;
  font-weight: 600;
  line-height: 1.25;
  letter-spacing: -0.01em;
}

h1 {
  font-size: 2.1rem;
}

h2 {
  font-size: 1.35rem;
}

h3 {
  font-size: 1.05rem;
}

p,
ul,
ol,
dl {
  margin: 0;
}

a {
  color: var(--accent-200);
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 2px;
}

a:hover {
  color: var(--text-100);
}

code,
.mono,
kbd {
  font-family: var(--font-mono);
  font-size: 0.88em;
}

code {
  padding: 0 var(--sp-sm);
  background: var(--base-700);
  border: var(--border) solid var(--line-700);
  border-radius: var(--r-control);
  color: var(--text-100);
}

kbd {
  padding: 0 var(--sp-sm);
  background: var(--base-600);
  border: var(--border) solid var(--line-700);
  border-radius: var(--r-control);
}

.lead {
  font-size: 1.2rem;
  color: var(--text-300);
  max-width: 62ch;
}

.muted {
  color: var(--text-300);
}

.small {
  font-size: 0.8rem;
  color: var(--text-300);
}

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-300);
}

/* ── Rahmen der Seite ───────────────────────────────────────────────── */

.wrap {
  width: 100%;
  max-width: var(--page-max);
  margin: 0 auto;
  padding: 0 var(--sp-xxl);
}

/* ── Kopfzeile ──────────────────────────────────────────────────────── */

.topbar {
  background: var(--base-800);
  border-bottom: var(--border) solid var(--line-900);
}

.topbar__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-xl);
  min-height: 52px;
  padding-top: var(--sp-md);
  padding-bottom: var(--sp-md);
}

.wordmark {
  font-family: var(--font-mono);
  font-size: 1rem;
  font-weight: 600;
  color: var(--text-100);
  text-decoration: none;
  white-space: nowrap;
}

.wordmark:hover {
  color: var(--text-100);
}

.wordmark b {
  font-weight: 600;
  color: var(--accent-200);
}

.nav {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-xs);
  margin-right: auto;
}

.nav a {
  display: block;
  padding: var(--sp-sm) var(--sp-md);
  border: var(--border) solid transparent;
  border-radius: var(--r-control);
  color: var(--text-300);
  font-size: 0.9rem;
  text-decoration: none;
}

.nav a:hover {
  background: var(--base-500);
  color: var(--text-100);
}

.nav a[aria-current="page"] {
  background: var(--select-bg);
  color: var(--text-100);
}

.lang {
  display: flex;
  align-items: center;
  gap: var(--sp-md);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  color: var(--text-300);
}

.lang a {
  color: var(--accent-200);
  text-decoration: none;
}

.lang a:hover {
  text-decoration: underline;
}

.lang [aria-current="true"] {
  color: var(--text-100);
}

/* ── Hauptbereich ───────────────────────────────────────────────────── */

main {
  display: block;
  padding: var(--sp-5xl) 0 var(--sp-4xl);
}

.stack > * + * {
  margin-top: var(--sp-xl);
}

section + section {
  margin-top: var(--sp-5xl);
}

.section__head {
  display: flex;
  align-items: baseline;
  gap: var(--sp-lg);
  padding-bottom: var(--sp-md);
  margin-bottom: var(--sp-xxl);
  border-bottom: var(--border) solid var(--line-700);
}

.rule {
  width: 48px;
  height: 2px;
  margin: var(--sp-xxl) 0;
  background: var(--accent-500);
  border: 0;
}

/* ── Panels, Karten, Raster ─────────────────────────────────────────── */

.panel {
  padding: var(--sp-xxl);
  background: var(--base-800);
  border: var(--border) solid var(--line-700);
  border-radius: var(--r-panel);
}

.panel--quiet {
  background: var(--base-700);
}

.grid {
  display: grid;
  gap: var(--sp-xl);
}

.grid--2 {
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
}

.grid--3 {
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.card {
  display: flex;
  flex-direction: column;
  gap: var(--sp-md);
  padding: var(--sp-xl);
  background: var(--base-800);
  border: var(--border) solid var(--line-700);
  border-radius: var(--r-panel);
}

.card h3 {
  color: var(--text-100);
}

.card p {
  color: var(--text-300);
  font-size: 0.95rem;
}

.card__num {
  font-family: var(--font-mono);
  font-size: 0.75rem;
  color: var(--accent-200);
}

/* ── Listen ─────────────────────────────────────────────────────────── */

.list {
  list-style: none;
  padding: 0;
  border-top: var(--border) solid var(--line-700);
}

.list > li {
  padding: var(--sp-lg) 0;
  border-bottom: var(--border) solid var(--line-700);
}

.list > li > strong {
  display: block;
  color: var(--text-100);
}

.list > li > span {
  color: var(--text-300);
  font-size: 0.95rem;
}

.bullets {
  padding-left: 1.1rem;
  color: var(--text-300);
}

.bullets > li + li {
  margin-top: var(--sp-sm);
}

/* ── Buttons ────────────────────────────────────────────────────────── */

.btnrow {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-md);
}

.btn {
  display: inline-block;
  padding: var(--sp-md) var(--sp-xl);
  background: var(--base-600);
  /* Rand in text_500 statt line_700: die Buttonfläche hebt sich nur mit 1,4:1
     von der Seite ab, der Rand muss die Schaltfläche also erkennbar machen.
     text_500 erreicht 3,9:1 auf base_900 und 3,6:1 auf base_800 (WCAG 1.4.11). */
  border: var(--border) solid var(--text-500);
  border-radius: var(--r-control);
  color: var(--text-100);
  font-size: 0.95rem;
  text-decoration: none;
}

.btn:hover {
  background: var(--base-500);
  color: var(--text-100);
}

.btn:active {
  background: var(--base-600);
}

.btn--primary {
  background: var(--accent-500);
  border-color: var(--accent-500);
  color: var(--primary-text);
  font-weight: 600;
}

.btn--primary:hover {
  background: var(--primary-hover);
  border-color: var(--primary-hover);
  color: var(--primary-text);
}

.btn--primary:active {
  background: var(--accent-600);
  border-color: var(--accent-600);
  color: var(--primary-active-text);
}

/* ── Statusetiketten (Rolle wie im Qt-Theme) ────────────────────────── */

.tag {
  display: inline-block;
  padding: 0 var(--sp-md);
  background: var(--base-700);
  border: var(--border) solid var(--line-700);
  border-radius: var(--r-control);
  color: var(--text-300);
  font-family: var(--font-mono);
  font-size: 0.75rem;
  line-height: 20px;
  white-space: nowrap;
}

.tag--warning {
  border-color: var(--warning);
  color: var(--warning);
}

.tag--success {
  border-color: var(--success);
  color: var(--success);
}

/* ── Platzhalter: müssen im Layout sofort auffallen ─────────────────── */

.ph {
  padding: 0 var(--sp-sm);
  background: var(--placeholder-bg);
  border: var(--border) dashed var(--warning);
  border-radius: var(--r-control);
  color: var(--warning);
  font-family: var(--font-mono);
  font-size: 0.85em;
}

.notice {
  padding: var(--sp-xl);
  background: var(--base-700);
  border: var(--border) solid var(--line-700);
  border-left: 3px solid var(--warning);
  border-radius: var(--r-control);
  color: var(--text-300);
  font-size: 0.95rem;
}

.notice strong {
  color: var(--text-100);
}

/* ── Hilfsklassen (statt Inline-Styles) ─────────────────────────────── */

.mt-xl {
  margin-top: var(--sp-xl);
}

.mt-xxl {
  margin-top: var(--sp-xxl);
}

/* ── Rechtstexte ────────────────────────────────────────────────────── */

.legal {
  max-width: 72ch;
}

.legal h2 {
  margin-top: var(--sp-4xl);
  padding-bottom: var(--sp-md);
  border-bottom: var(--border) solid var(--line-700);
  font-size: 1.15rem;
}

.legal h3 {
  margin-top: var(--sp-xxl);
  font-size: 1rem;
}

.legal p,
.legal ul {
  margin-top: var(--sp-lg);
  color: var(--text-300);
}

.legal ul {
  padding-left: 1.1rem;
}

.legal li + li {
  margin-top: var(--sp-sm);
}

.legal dl {
  margin-top: var(--sp-lg);
}

.legal dt {
  margin-top: var(--sp-lg);
  color: var(--text-100);
  font-size: 0.85rem;
}

.legal dd {
  margin: var(--sp-xs) 0 0;
  color: var(--text-300);
}

/* ── Fußzeile ───────────────────────────────────────────────────────── */

.footer {
  background: var(--base-800);
  border-top: var(--border) solid var(--line-900);
}

.footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--sp-lg) var(--sp-xl);
  padding-top: var(--sp-xl);
  padding-bottom: var(--sp-xl);
  font-size: 0.85rem;
  color: var(--text-300);
}

.footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: var(--sp-lg);
  margin-left: auto;
  list-style: none;
  padding: 0;
}

.footer a {
  color: var(--accent-200);
}

@media (max-width: 720px) {
  .wrap {
    padding: 0 var(--sp-xl);
  }

  h1 {
    font-size: 1.7rem;
  }

  main {
    padding-top: var(--sp-4xl);
  }

  section + section {
    margin-top: var(--sp-4xl);
  }

  .nav {
    order: 3;
    width: 100%;
    margin-right: 0;
  }

  .lang {
    margin-left: auto;
  }

  .footer__links {
    margin-left: 0;
  }
}

/* Website-Komposition: gleiche Tokens, stärkere Hierarchie und lokale Bilder. */
:root { --page-max: 1248px; }
.topbar { background: var(--base-900); border-bottom-color: var(--line-700); }
.topbar__inner { min-height: 80px; gap: 32px; }
.wordmark { font-size: 1.15rem; letter-spacing: -.04em; }
.nav { margin-left: auto; margin-right: 0; }
.nav a { padding: 10px 12px; }
.nav a[aria-current="page"] { background: transparent; border-bottom: 2px solid var(--accent-500); }
h1 { font-size: clamp(2.2rem, 4.3vw, 4rem); line-height: 1.08; letter-spacing: -.045em; max-width: 22ch; text-wrap: balance; }
h2 { font-size: clamp(1.4rem, 2.5vw, 2rem); letter-spacing: -.03em; }
h3 { font-size: 1.3rem; letter-spacing: -.025em; }
main { padding-top: 64px; padding-bottom: 80px; }
.hero { display: grid; grid-template-columns: 1.12fr 1fr; align-items: center; gap: 40px; }
.hero__copy { padding: 24px 0; }
.hero__copy > * + * { margin-top: 24px; }
.hero .eyebrow { color: var(--accent-200); }
.hero .lead { font-size: 1.12rem; max-width: 48ch; }
.hero .btnrow { margin-top: 32px; }
.hero__visual { margin: 0; min-width: 0; border: 1px solid var(--line-700); background: var(--base-900); }
.visual__label, .hero__visual figcaption { padding: 12px 16px; color: var(--text-300); font: .75rem var(--font-mono); }
.visual__label { display: flex; justify-content: space-between; border-bottom: 1px solid var(--line-700); }
.hero__visual img { width: 100%; height: auto; display: block; }
.hero__visual figcaption { border-top: 1px solid var(--line-700); }
.home .rule { width: 100%; height: 1px; background: var(--line-700); margin: 64px 0 40px; }
.section__head { padding-bottom: 16px; justify-content: space-between; flex-wrap: wrap; }
.card { padding: 24px; gap: 16px; }
.home .grid--2 { grid-template-columns: 1.5fr 1fr; }
.product-art { display: block; width: calc(100% + 48px); max-width: none; height: auto; margin: -24px -24px 8px; border-bottom: 1px solid var(--line-700); }
.product-card h3 { display: flex; justify-content: space-between; }
.product-card h3 span { color: var(--accent-200); }
.home .grid--2 > .card + .card { justify-content: flex-end; background: transparent; }
.home .list { display: grid; grid-template-columns: 1fr 1fr; border-top: 0; gap: 0 40px; counter-reset: principles; }
.home .list > li { padding: 24px 0; border-top: 1px solid var(--line-700); border-bottom: 0; }
.home .list > li::before { counter-increment: principles; content: "0" counter(principles); display: block; font: .75rem var(--font-mono); color: var(--accent-200); margin-bottom: 16px; }
.home .list strong { font-size: 1.15rem; margin-bottom: 8px; }
.btn { min-height: 44px; padding: 10px 20px; }
.mission-art { margin: 40px 0 64px; border: 1px solid var(--line-700); background: var(--base-900); }
.mission-art img { display: block; width: 100%; height: 240px; object-fit: contain; }
.footer { border-top-color: var(--line-700); background: var(--base-900); }
.footer__inner { min-height: 96px; }
@media (max-width: 900px) {
  .hero { grid-template-columns: 1fr; gap: 32px; }
  .hero h1 { max-width: 20ch; }
  .hero__visual { max-width: 640px; width: 100%; }
  .hero__visual img { max-height: 420px; object-fit: contain; }
  .topbar__inner { gap: 16px; }
}
@media (max-width: 720px) {
  .nav { margin-left: 0; }
  .nav a { padding: 10px 8px; }
  main { padding-top: 32px; }
  .hero__copy { padding: 0; }
  .home .grid--2, .home .list { grid-template-columns: 1fr; }
  .home .rule { margin: 40px 0 32px; }
  .section__head { gap: 8px; }
  .mission-art { margin: 32px 0 48px; }
}

/* Long headings and legal placeholders must also fit a 320px viewport. */
.hero__copy { min-width: 0; }
h1, .legal { overflow-wrap: anywhere; }
