/* ==========================================================================
   GlasseGroup — Stylesheet
   Handgeschrieben, kein Build-Schritt. Aufbau:
   1. Design-Tokens   2. Reset/Basis   3. Layout   4. Header/Footer
   5. Bausteine       6. Seiten-Blöcke 7. Formular  8. Utilities
   Farbdokumentation: docs/farbpalette.md
   ========================================================================== */

/* 1. Design-Tokens ------------------------------------------------------- */

:root {
  /* Flächen — dunkles Schiefer-Blau, Flat-Design ohne Verläufe */
  --bg:            #1b242e;
  --bg-alt:        #202b37;
  --surface:       #26333f;
  --surface-hi:    #2f3e4c;
  --line:          #38495a;
  --line-soft:     #2d3b49;

  /* Text */
  --text:          #eef2f5;
  --text-muted:    #9fb0c0;
  --text-dim:      #8697ab;

  /* Marke + Bereiche */
  --brand:         #16b8a6;
  --brand-dark:    #109a8b;
  --lock:          #16b8a6;
  --guard:         #5aa5e6;
  --labs:          #b088e0;
  --warn:          #e0a92b;

  /* Maße */
  --wrap:          1440px;
  --wrap-narrow:   860px;
  --pad:           clamp(20px, 5vw, 64px);
  --pad-bar:       clamp(16px, 2vw, 34px);
  --radius:        3px;
  --header-h:      68px;

  --font: "Segoe UI", -apple-system, BlinkMacSystemFont, Roboto, "Helvetica Neue", Arial, sans-serif;
}

/* 2. Reset / Basis ------------------------------------------------------- */

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
  -webkit-text-size-adjust: 100%;
}

body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  font-size: 16px;
  overflow-x: hidden;
}

img, svg { max-width: 100%; display: block; }
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
ul { list-style: none; }

h1, h2, h3, h4 { line-height: 1.2; font-weight: 600; letter-spacing: -0.01em; }
h1 { font-size: clamp(2rem, 4.4vw, 3.1rem); font-weight: 300; }
h1 strong { font-weight: 700; }
h2 { font-size: clamp(1.5rem, 2.8vw, 2.1rem); font-weight: 300; }
h2 strong { font-weight: 700; }
h3 { font-size: 1.1rem; }

:focus-visible {
  outline: 2px solid var(--brand);
  outline-offset: 3px;
}

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 100;
  background: var(--brand); color: #04201c; padding: 12px 20px; font-weight: 600;
}
.skip-link:focus { left: 0; }

/* 3. Layout -------------------------------------------------------------- */

.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin: 0 auto;
  padding-left: var(--pad);
  padding-right: var(--pad);
}
.wrap--narrow { max-width: var(--wrap-narrow); }

.band { padding: clamp(52px, 8vw, 96px) 0; }
.band--tight { padding: clamp(36px, 5vw, 60px) 0; }
.band--alt { background: var(--bg-alt); }
.band--line { border-top: 1px solid var(--line-soft); }

.grid { display: grid; gap: 20px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(280px, 1fr)); }
.grid--4 { grid-template-columns: repeat(auto-fit, minmax(230px, 1fr)); }

/* Kopf eines Abschnitts */
.head { max-width: 720px; margin-bottom: clamp(28px, 4vw, 48px); }
.head--center { margin-left: auto; margin-right: auto; text-align: center; }
.head p { color: var(--text-muted); font-size: 1.05rem; margin-top: 12px; }

.eyebrow {
  display: inline-block;
  font-size: 0.72rem;
  font-weight: 700;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--brand);
  margin-bottom: 14px;
}
.eyebrow--guard { color: var(--guard); }
.eyebrow--labs { color: var(--labs); }

/* 4. Header -------------------------------------------------------------- */

/*
  Die Kopfzeile ist bewusst NICHT auf --wrap begrenzt: Sie läuft über die
  volle Fensterbreite, das Logo sitzt bündig am linken Rand, der Aufruf zum
  Kontakt bündig am rechten. Der Abstand zum Rand (--pad-bar) ist kleiner als
  der Inhaltsabstand, damit die Leiste auf breiten Schirmen nicht leer wirkt.
*/

.header {
  position: sticky; top: 0; z-index: 50;
  background: var(--bg);
  border-bottom: 1px solid var(--line-soft);
}

/* Schmale Servicezeile über der Hauptnavigation, erst ab 940 px sichtbar */
.topbar { display: none; }
.topbar__inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 24px;
  height: 34px;
  padding: 0 var(--pad-bar);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg-alt);
  font-size: 0.78rem;
  color: var(--text-dim);
}
.topbar__list { display: flex; align-items: center; gap: 22px; }
.topbar__list li { display: flex; align-items: center; gap: 7px; }
.topbar a { color: var(--text-muted); text-decoration: none; }
.topbar a:hover { color: var(--text); text-decoration: underline; }
.topbar svg {
  width: 13px; height: 13px; flex: none;
  stroke: var(--brand); stroke-width: 1.8; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.topbar__version {
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line-soft);
  border-radius: var(--radius);
  padding: 1px 7px;
}

.header__inner {
  display: flex; align-items: center; gap: clamp(16px, 2vw, 40px);
  height: var(--header-h);
  padding: 0 var(--pad-bar);
}

.logo {
  font-size: 1.2rem; font-weight: 300; letter-spacing: -0.02em;
  color: var(--text); text-decoration: none; white-space: nowrap;
  display: flex; align-items: center; gap: 10px;
  margin-right: auto;          /* schiebt alles Übrige nach rechts */
  flex: none;
}
.logo:hover { text-decoration: none; }
.logo strong { font-weight: 700; }
.logo__mark { width: 24px; height: 24px; flex: none; }

.nav { display: none; align-items: center; gap: clamp(6px, 1.4vw, 22px); }
.nav a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.92rem; white-space: nowrap;
  padding: 22px 2px 20px;
  border-bottom: 2px solid transparent;
}
.nav a:hover { color: var(--text); }
.nav a[aria-current="page"] { color: var(--text); border-bottom-color: var(--brand); }
/* Trennstrich zwischen Produkt- und Unternehmensnavigation */
.nav__sep {
  width: 1px; height: 20px; background: var(--line);
  flex: none;
}

.header .btn { display: none; }

.burger {
  margin-left: auto;
  width: 44px; height: 44px;
  display: grid; place-items: center;
  background: none; border: 1px solid var(--line); border-radius: var(--radius);
  color: var(--text); cursor: pointer;
}
.burger svg { width: 20px; height: 20px; stroke: currentColor; stroke-width: 2; fill: none; }
.burger .ico-x { display: none; }
.burger[aria-expanded="true"] .ico-x { display: block; }
.burger[aria-expanded="true"] .ico-menu { display: none; }

.mobile-nav {
  display: none;
  border-top: 1px solid var(--line-soft);
  background: var(--bg-alt);
  padding: 8px 0 20px;
}
.mobile-nav.open { display: block; }
.mobile-nav a {
  display: block; color: var(--text); text-decoration: none;
  padding: 13px 0; border-bottom: 1px solid var(--line-soft); font-size: 1rem;
}
.mobile-nav a small {
  display: block; color: var(--text-dim); font-size: 0.78rem; margin-top: 2px;
}
.mobile-nav .btn { margin-top: 18px; width: 100%; text-align: center; }
.mobile-nav__meta {
  margin-top: 18px; padding-top: 16px;
  border-top: 1px solid var(--line-soft);
  font-size: 0.85rem; color: var(--text-dim);
}
.mobile-nav__meta a { display: inline; padding: 0; border: none; color: var(--brand); }

/* 5. Bausteine ----------------------------------------------------------- */

.btn {
  display: inline-block;
  background: var(--brand); color: #04211d;
  padding: 13px 26px;
  border: none; border-radius: var(--radius);
  font: inherit; font-size: 0.95rem; font-weight: 700;
  text-decoration: none; cursor: pointer;
  transition: background 0.15s ease;
}
.btn:hover { background: var(--brand-dark); text-decoration: none; }
.btn--ghost {
  background: transparent; color: var(--text);
  border: 1px solid var(--line);
  font-weight: 600;
}
.btn--ghost:hover { background: var(--surface); border-color: var(--text-dim); }
.btn--guard { background: var(--guard); color: #04182b; }
.btn--guard:hover { background: #7fbcee; }
.btn--labs { background: var(--labs); color: #1c0b2b; }
.btn--labs:hover { background: #c3a2e8; }

.btn-row { display: flex; flex-wrap: wrap; gap: 12px; }

.card {
  background: var(--surface);
  border: 1px solid var(--line-soft);
  border-top: 3px solid var(--brand);
  border-radius: var(--radius);
  padding: 26px 24px;
}
.card--guard { border-top-color: var(--guard); }
.card--labs { border-top-color: var(--labs); }
.card--plain { border-top-color: var(--line); }
.card h3 { margin-bottom: 8px; }
.card p { color: var(--text-muted); font-size: 0.95rem; }
.card__link { color: inherit; text-decoration: none; display: block; height: 100%; }
a.card { display: block; text-decoration: none; color: inherit; transition: background 0.15s ease; }
a.card:hover { background: var(--surface-hi); text-decoration: none; }

.ico {
  width: 34px; height: 34px; margin-bottom: 16px;
  stroke: var(--brand); stroke-width: 1.5; fill: none;
  stroke-linecap: round; stroke-linejoin: round;
}
.ico--guard { stroke: var(--guard); }
.ico--labs { stroke: var(--labs); }

/* Aufzählung mit Haken */
.checks li {
  position: relative;
  padding-left: 28px;
  margin-bottom: 12px;
  color: var(--text-muted);
}
.checks li::before {
  content: "";
  position: absolute; left: 0; top: 8px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}
.checks--guard li::before { border-color: var(--guard); }
.checks--labs li::before { border-color: var(--labs); }

/* Kennzahl / Fakten */
.fact { border-left: 3px solid var(--line); padding-left: 18px; }
.fact dt { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.fact dd { font-size: 1.05rem; margin-top: 4px; }

/* 6. Seiten-Blöcke ------------------------------------------------------- */

/* Hero — volle Breite, dezentes Gittermuster im Hintergrund */
.hero {
  background: var(--bg-alt);
  background-image:
    linear-gradient(rgba(56, 73, 90, 0.35) 1px, transparent 1px),
    linear-gradient(90deg, rgba(56, 73, 90, 0.35) 1px, transparent 1px);
  background-size: 56px 56px;
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(56px, 9vw, 112px) 0;
}
.hero__inner { max-width: 900px; }
.hero p.lead {
  font-size: clamp(1.05rem, 1.6vw, 1.25rem);
  color: var(--text-muted);
  margin: 20px 0 32px;
  max-width: 640px;
}

/* Kopfbereich der Unterseiten */
.pagehead {
  background: var(--bg-alt);
  border-bottom: 1px solid var(--line-soft);
  padding: clamp(40px, 6vw, 72px) 0;
}
.pagehead p { color: var(--text-muted); max-width: 620px; margin-top: 14px; font-size: 1.05rem; }

/* Drei Kernbereiche — nebeneinander, volle Breite */
.pillars { display: grid; gap: 1px; background: var(--line-soft); }
.pillar {
  background: var(--bg);
  padding: clamp(28px, 3.5vw, 44px);
  text-decoration: none; color: inherit;
  display: block;
  border-top: 3px solid var(--brand);
  transition: background 0.15s ease;
}
.pillar:hover { background: var(--surface); text-decoration: none; }
.pillar--guard { border-top-color: var(--guard); }
.pillar--labs { border-top-color: var(--labs); }
.pillar h2 { font-size: 1.4rem; font-weight: 700; margin-bottom: 6px; }
.pillar__kicker { font-size: 0.78rem; letter-spacing: 0.12em; text-transform: uppercase; color: var(--text-dim); }
.pillar p { color: var(--text-muted); margin: 12px 0 18px; font-size: 0.97rem; }
.pillar__more { font-weight: 600; font-size: 0.92rem; color: var(--brand); }
.pillar--guard .pillar__more { color: var(--guard); }
.pillar--labs .pillar__more { color: var(--labs); }

/* Nummerierte Schritte */
.steps { counter-reset: step; }
.step { position: relative; padding-top: 52px; }
.step::before {
  counter-increment: step; content: counter(step, decimal-leading-zero);
  position: absolute; top: 0; left: 0;
  font-size: 1.6rem; font-weight: 700; color: var(--brand);
}
.step h3 { margin-bottom: 6px; }
.step p { color: var(--text-muted); font-size: 0.95rem; }

/* Abschluss-Aufruf */
.cta {
  background: var(--surface);
  border: 1px solid var(--line);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: clamp(28px, 4vw, 48px);
  display: flex; flex-wrap: wrap; gap: 24px;
  align-items: center; justify-content: space-between;
}
.cta h2 { font-size: clamp(1.3rem, 2.4vw, 1.8rem); }
.cta p { color: var(--text-muted); margin-top: 8px; max-width: 520px; }

/* Fließtext (Recht, Über uns) */
.prose { max-width: 760px; }
.prose h2 { font-size: 1.35rem; font-weight: 600; margin: 40px 0 12px; }
.prose h3 { margin: 26px 0 8px; }
.prose p, .prose li { color: var(--text-muted); margin-bottom: 12px; }
.prose ul { list-style: disc; padding-left: 22px; }
.prose > :first-child { margin-top: 0; }

/* FAQ — reines HTML, kein JavaScript */
.faq { border-top: 1px solid var(--line-soft); }
.faq details { border-bottom: 1px solid var(--line-soft); }
.faq summary {
  cursor: pointer; padding: 18px 0; font-weight: 600;
  list-style: none; display: flex; justify-content: space-between; gap: 16px;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; color: var(--brand); font-size: 1.3rem; line-height: 1; }
.faq details[open] summary::after { content: "\2212"; }
.faq details p { color: var(--text-muted); padding-bottom: 18px; max-width: 760px; }

/* Sprungmarken innerhalb langer Produktseiten */
.jump {
  border-top: 1px solid var(--line-soft);
  border-bottom: 1px solid var(--line-soft);
  background: var(--bg);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.jump__inner {
  display: flex; align-items: center; gap: 4px;
  padding: 0 var(--pad-bar);
  min-height: 50px;
}
.jump__label {
  font-size: 0.72rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); margin-right: 14px; white-space: nowrap; flex: none;
}
.jump a {
  color: var(--text-muted); text-decoration: none;
  font-size: 0.88rem; white-space: nowrap;
  padding: 14px 14px; border-bottom: 2px solid transparent;
}
.jump a:hover { color: var(--text); border-bottom-color: var(--line); }

/* Tabellen — scrollen auf schmalen Schirmen im eigenen Kasten */
.table-scroll { overflow-x: auto; -webkit-overflow-scrolling: touch; }
table {
  width: 100%; min-width: 520px;
  border-collapse: collapse;
  font-size: 0.94rem;
}
th, td {
  text-align: left; vertical-align: top;
  padding: 14px 16px;
  border-bottom: 1px solid var(--line-soft);
}
thead th {
  font-size: 0.74rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--text-dim); font-weight: 700;
  border-bottom: 1px solid var(--line);
  white-space: nowrap;
}
tbody th { font-weight: 600; color: var(--text); }
td { color: var(--text-muted); }
tbody tr:last-child th, tbody tr:last-child td { border-bottom: none; }
.table-note { color: var(--text-dim); font-size: 0.85rem; margin-top: 12px; }

/* Ja/Nein-Marker in Vergleichstabellen */
.mark { font-weight: 700; }
.mark--yes { color: var(--brand); }
.mark--no  { color: var(--text-dim); }

/* Gegenüberstellung „vorher / nachher" */
.versus { display: grid; gap: 1px; background: var(--line-soft); }
.versus > div { background: var(--bg); padding: clamp(24px, 3vw, 36px); }
.versus h3 { margin-bottom: 16px; }
.versus--before h3 { color: var(--text-dim); }
.versus li {
  position: relative; padding-left: 26px; margin-bottom: 11px;
  color: var(--text-muted); font-size: 0.95rem;
}
.versus--before li::before {
  content: ""; position: absolute; left: 2px; top: 9px;
  width: 11px; height: 11px;
  border-left: 2px solid var(--text-dim); border-top: 2px solid var(--text-dim);
  transform: rotate(-45deg) translate(1px, 1px);
}
.versus--after li::before {
  content: ""; position: absolute; left: 0; top: 8px;
  width: 12px; height: 7px;
  border-left: 2px solid var(--brand); border-bottom: 2px solid var(--brand);
  transform: rotate(-45deg);
}

/* Glossar */
.glossar { display: grid; gap: 1px; background: var(--line-soft); }
.glossar div { background: var(--bg); padding: 22px 24px; }
.glossar dt { font-weight: 700; margin-bottom: 6px; }
.glossar dd { color: var(--text-muted); font-size: 0.94rem; }

/* Hervorgehobener Hinweiskasten im Fließtext */
.callout {
  background: var(--surface);
  border-left: 4px solid var(--brand);
  border-radius: var(--radius);
  padding: 22px 26px;
}
.callout--guard { border-left-color: var(--guard); }
.callout--labs { border-left-color: var(--labs); }
.callout h3 { margin-bottom: 8px; }
.callout p { color: var(--text-muted); }

/* Nummerierter Ablauf als senkrechte Linie */
.timeline { border-left: 2px solid var(--line); padding-left: 28px; counter-reset: tl; }
.timeline > li { position: relative; padding-bottom: 32px; }
.timeline > li:last-child { padding-bottom: 0; }
.timeline > li::before {
  counter-increment: tl; content: counter(tl);
  position: absolute; left: -42px; top: -2px;
  width: 26px; height: 26px; border-radius: 50%;
  background: var(--bg); border: 2px solid var(--brand);
  color: var(--brand); font-size: 0.8rem; font-weight: 700;
  display: grid; place-items: center;
}
.timeline h3 { margin-bottom: 6px; }
.timeline p { color: var(--text-muted); font-size: 0.95rem; }
.timeline--guard { border-left-color: var(--guard); }
.timeline--guard > li::before { border-color: var(--guard); color: var(--guard); }
.timeline--labs { border-left-color: var(--labs); }
.timeline--labs > li::before { border-color: var(--labs); color: var(--labs); }

/* 7. Formular ------------------------------------------------------------ */

.form { display: grid; gap: 18px; max-width: 660px; }
.field label { display: block; font-size: 0.85rem; font-weight: 600; margin-bottom: 6px; }
.field input, .field select, .field textarea {
  width: 100%;
  background: var(--bg-alt);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  color: var(--text);
  font: inherit; font-size: 1rem;
  padding: 12px 14px;
}
.field textarea { min-height: 160px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: none; border-color: var(--brand);
}
.field .err { color: #ec8b7d; font-size: 0.85rem; margin-top: 6px; }
.field--hp { position: absolute; left: -9999px; }

.consent { display: flex; gap: 10px; align-items: flex-start; font-size: 0.9rem; color: var(--text-muted); }
.consent input { width: 18px; height: 18px; flex: none; margin-top: 3px; accent-color: var(--brand); }

.notice {
  border-radius: var(--radius);
  padding: 14px 18px;
  margin-bottom: 24px;
  border: 1px solid var(--line);
  background: var(--surface);
  font-size: 0.95rem;
}
.notice--ok { border-left: 4px solid var(--brand); }
.notice--err { border-left: 4px solid #ec8b7d; }

/* 8. Footer -------------------------------------------------------------- */

.footer {
  background: var(--bg-alt);
  border-top: 1px solid var(--line-soft);
  padding: clamp(40px, 5vw, 64px) 0 28px;
  font-size: 0.92rem;
}
.footer h4 {
  font-size: 0.74rem; letter-spacing: 0.14em; text-transform: uppercase;
  color: var(--text-dim); margin-bottom: 14px; font-weight: 700;
}
.footer a { color: var(--text-muted); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }
.footer li { margin-bottom: 9px; }
.footer address { font-style: normal; color: var(--text-muted); }

.footer__bottom {
  margin-top: 40px; padding-top: 20px;
  border-top: 1px solid var(--line-soft);
  display: flex; flex-wrap: wrap; gap: 10px 20px;
  justify-content: space-between;
  color: var(--text-dim); font-size: 0.85rem;
}
.version {
  font-variant-numeric: tabular-nums;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 2px 8px;
}

/* 9. Utilities ----------------------------------------------------------- */

.muted { color: var(--text-muted); }
.mt-24 { margin-top: 24px; }
.mt-32 { margin-top: 32px; }
.visually-hidden {
  position: absolute; width: 1px; height: 1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap;
}

/* 10. Breakpoints -------------------------------------------------------- */

@media (min-width: 720px) {
  .pillars { grid-template-columns: repeat(3, 1fr); }
  .grid { gap: 24px; }
  .versus { grid-template-columns: 1fr 1fr; }
  .glossar { grid-template-columns: 1fr 1fr; }
}

@media (min-width: 940px) {
  .topbar { display: block; }
  .nav { display: flex; }
  .header .btn { display: inline-block; padding: 10px 20px; flex: none; }
  .burger, .mobile-nav { display: none !important; }
  .footer .grid--4 { grid-template-columns: 1.7fr 1fr 1fr 1.1fr; }
  .glossar { grid-template-columns: repeat(3, 1fr); }
}

/* Sehr breite Schirme: Navigation darf mehr Luft bekommen */
@media (min-width: 1600px) {
  :root { --pad-bar: 44px; }
}

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  * { transition: none !important; }
}

@media print {
  .header, .footer, .cta, .burger { display: none; }
  body { background: #fff; color: #000; }
}
