/* ==========================================================================
   Startseite Redesign – industrie-4-0.org
   Referenz-Stylesheet zum Entwurf (design/startseite-entwurf.html)
   Alle Klassen tragen das Präfix "sb-", damit nichts mit dem Theme kollidiert.
   ========================================================================== */

/* ---------- 1. Design-Tokens ---------- */
:root {
  --sb-ink: #0F1A1C;          /* dunkler Grund, Haupttextfarbe */
  --sb-ink-2: #162427;        /* Karten auf dunklem Grund */
  --sb-ink-line: #2B3D40;     /* Linien auf dunklem Grund */
  --sb-ink-track: #22353A;    /* Balken-Hintergrund in der Laufzeit-Grafik */
  --sb-paper: #F4F6F5;        /* heller Seitengrund */
  --sb-white: #FFFFFF;        /* Karten / weiße Abschnitte */
  --sb-line: #D5DCDA;         /* Linien auf hellem Grund */
  --sb-mute: #4A5A5C;         /* Fließtext gedämpft auf hell (Kontrast > 4.5:1) */
  --sb-dim: #A9B8B8;          /* Labels auf dunkel */
  --sb-soft: #D7E0DF;         /* Fließtext auf dunkel */
  --sb-accent: #FF6B2C;       /* einzige Akzentfarbe – nie als Textfarbe auf hell */
  --sb-ok: #3DDC84;           /* Status-Punkt "aktiv" */
  --sb-placeholder: #E7ECEA;

  --sb-font-display: Archivo, 'IBM Plex Sans', sans-serif;
  --sb-font-body: 'IBM Plex Sans', system-ui, sans-serif;
  --sb-font-mono: 'IBM Plex Mono', ui-monospace, monospace;

  --sb-radius: 20px;
  --sb-radius-lg: 24px;
  --sb-radius-xl: 28px;
  --sb-wrap: 1200px;
  --sb-gutter: 24px;
  --sb-section: 112px;        /* vertikaler Abstand heller Abschnitte */
  --sb-section-band: 104px;   /* vertikaler Abstand farbiger Bänder */
}

/* ---------- 2. Basis ---------- */
.sb-page {
  margin: 0;
  font-family: var(--sb-font-body);
  font-size: 17px;
  line-height: 1.6;
  color: var(--sb-ink);
  background: var(--sb-paper);
  -webkit-font-smoothing: antialiased;
}
.sb-page *, .sb-page *::before, .sb-page *::after { box-sizing: border-box; }
.sb-page h1, .sb-page h2, .sb-page h3, .sb-page h4 { font-family: var(--sb-font-display); margin: 0; }
.sb-page p { margin: 0; }
.sb-page a { color: inherit; }
.sb-page a:hover { opacity: .8; }
.sb-page :focus-visible { outline: 2px solid var(--sb-accent); outline-offset: 3px; }
.sb-page strong { color: var(--sb-ink); font-weight: 600; }

.sb-wrap { max-width: var(--sb-wrap); margin: 0 auto; padding-left: var(--sb-gutter); padding-right: var(--sb-gutter); }
.sb-stack { display: flex; flex-direction: column; gap: 48px; }

.sb-section { padding-top: var(--sb-section); padding-bottom: var(--sb-section); }
.sb-band { padding-top: var(--sb-section-band); padding-bottom: var(--sb-section-band); }
.sb-band--white { background: var(--sb-white); border-top: 1px solid var(--sb-line); border-bottom: 1px solid var(--sb-line); }
.sb-band--dark { background: var(--sb-ink); color: var(--sb-white); }

/* ---------- 3. Typografie ---------- */
.sb-mono { font-family: var(--sb-font-mono); }
.sb-eyebrow {
  display: flex; align-items: center; gap: 10px;
  font-family: var(--sb-font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--sb-mute);
}
.sb-eyebrow::before { content: ""; width: 10px; height: 10px; background: var(--sb-accent); flex: none; }
.sb-eyebrow--plain::before { display: none; }
.sb-eyebrow--live::before { width: 8px; height: 8px; border-radius: 50%; background: var(--sb-ok); }
.sb-band--dark .sb-eyebrow, .sb-dark .sb-eyebrow { color: var(--sb-dim); }

.sb-h1 { font-size: clamp(44px, 7vw, 92px); font-weight: 800; line-height: .98; letter-spacing: -0.035em; }
.sb-h2 { font-size: clamp(32px, 4.2vw, 54px); font-weight: 700; line-height: 1.04; letter-spacing: -0.025em; }
.sb-h2--md { font-size: clamp(30px, 3.8vw, 48px); line-height: 1.07; }
.sb-h2--sm { font-size: clamp(26px, 3.2vw, 40px); line-height: 1.08; letter-spacing: -0.02em; }
.sb-h3 { font-size: 22px; font-weight: 700; line-height: 1.2; letter-spacing: -0.01em; }
.sb-lead { color: var(--sb-mute); }
.sb-band--dark .sb-lead { color: var(--sb-soft); }
.sb-text { font-size: 16px; color: var(--sb-mute); }
.sb-text--sm { font-size: 15px; }
.sb-accent-text { color: var(--sb-accent); } /* nur auf dunklem Grund verwenden */
.sb-ulink { font-weight: 600; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--sb-accent); }

/* Abschnittskopf: Titel links, Einleitung rechts, bricht auf Mobil um */
.sb-head { display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: flex-end; }
.sb-head__title { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sb-head__lead { flex: 1 1 380px; min-width: 0; }
.sb-stack > .sb-head__title { flex: none; } /* allein stehender Titel ohne Einleitung */

/* ---------- 4. Buttons ---------- */
.sb-btn {
  min-height: 48px; display: inline-flex; align-items: center; gap: 10px; padding: 0 24px;
  border-radius: 999px; border: 1px solid transparent; font-weight: 600; text-decoration: none; white-space: nowrap;
}
.sb-btn--lg { min-height: 52px; padding: 0 26px; }
.sb-btn--accent { background: var(--sb-accent); color: var(--sb-ink) !important; }
.sb-btn--dark { background: var(--sb-ink); color: var(--sb-white) !important; }
.sb-btn--outline { border-color: var(--sb-ink); }
.sb-btn--outline-light { border-color: var(--sb-white); }
.sb-btn--text { padding: 0 12px; text-decoration: underline; text-underline-offset: 5px; text-decoration-color: var(--sb-accent); font-weight: 500; }
.sb-btn svg { flex: none; }
.sb-btn-row { display: flex; flex-wrap: wrap; gap: 12px; }
.sb-self-start { align-self: flex-start; }

/* ---------- 5. Raster & Karten ---------- */
.sb-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(var(--sb-min, 260px), 1fr)); gap: 20px; }
.sb-grid--200 { --sb-min: 200px; gap: 16px; }
.sb-grid--240 { --sb-min: 240px; gap: 32px; }
.sb-grid--250 { --sb-min: 250px; }
.sb-grid--280 { --sb-min: 280px; }
.sb-grid--300 { --sb-min: 300px; }

.sb-card { border-radius: var(--sb-radius); padding: 28px; display: flex; flex-direction: column; gap: 12px; text-decoration: none; }
.sb-card--paper { background: var(--sb-paper); }
.sb-card--white { background: var(--sb-white); border: 1px solid var(--sb-line); }
.sb-card--ink { background: var(--sb-ink); color: var(--sb-white); }
.sb-card--ink2 { background: var(--sb-ink-2); border: 1px solid var(--sb-ink-line); color: var(--sb-white); }
.sb-page a.sb-card--ink, .sb-page a.sb-card--ink2 { color: var(--sb-white); } /* Karten, die selbst Links sind */
.sb-card--ink .sb-text, .sb-card--ink2 .sb-text { color: var(--sb-soft); }
.sb-card__num { font-family: var(--sb-font-mono); font-size: 13px; color: var(--sb-mute); }
.sb-card--ink .sb-card__num, .sb-card--ink2 .sb-card__num { color: var(--sb-dim); }
.sb-card__grow { flex-grow: 1; }
.sb-card__cta { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--sb-accent); }
.sb-card__row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.sb-card__row .sb-card__num { white-space: nowrap; }

.sb-placeholder {
  background: var(--sb-placeholder); border: 1px dashed #8B9A99; border-radius: 14px;
  display: flex; align-items: center; justify-content: center; text-align: center; padding: 16px;
  font-family: var(--sb-font-mono); font-size: 14px; color: var(--sb-mute);
}
.sb-media { width: 100%; height: 100%; object-fit: cover; border-radius: inherit; display: block; }

/* ---------- 6. Header / Navigation ---------- */
.sb-dark { background: var(--sb-ink); color: var(--sb-white); }
.sb-header { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px 32px; padding-top: 20px; padding-bottom: 20px; }
.sb-logo { font-family: var(--sb-font-display); font-weight: 800; font-size: 22px; letter-spacing: -0.02em; text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sb-logo span { color: var(--sb-accent); }
.sb-logo--lg { font-size: 26px; }
.sb-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 24px; font-size: 15px; }
.sb-nav a { text-decoration: none; min-height: 44px; display: inline-flex; align-items: center; }
.sb-nav__cta { padding: 0 18px; border: 1px solid var(--sb-white); border-radius: 999px; font-weight: 500; }

/* ---------- 7. Hero ---------- */
.sb-hero { display: flex; flex-wrap: wrap; gap: 56px; align-items: center; padding-top: 72px; padding-bottom: 88px; }
.sb-hero__copy { flex: 1 1 520px; min-width: 0; display: flex; flex-direction: column; gap: 28px; }
.sb-hero__kicker { font-family: var(--sb-font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-dim); }
.sb-hero__lead { font-size: 19px; color: var(--sb-soft); max-width: 560px; }

.sb-runtime { flex: 1 1 420px; min-width: 0; background: var(--sb-ink-2); border: 1px solid var(--sb-ink-line); border-radius: var(--sb-radius); padding: 28px; display: flex; flex-direction: column; gap: 18px; }
.sb-runtime__head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; font-family: var(--sb-font-mono); font-size: 13px; }
.sb-runtime__title { letter-spacing: .08em; text-transform: uppercase; color: var(--sb-dim); }
.sb-runtime__status { display: inline-flex; align-items: center; gap: 8px; }
.sb-runtime__status::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--sb-ok); }
.sb-runtime__rows { display: flex; flex-direction: column; gap: 14px; list-style: none; margin: 0; padding: 0; }
.sb-runtime__row { display: flex; flex-direction: column; gap: 6px; }
.sb-runtime__label { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.sb-runtime__label span:last-child { font-family: var(--sb-font-mono); color: var(--sb-dim); white-space: nowrap; }
.sb-runtime__track { height: 10px; background: var(--sb-ink-track); border-radius: 999px; }
/* --start = (Startjahr - 2009) / 17 * 100 %  (Achse 2009 … 2026) */
.sb-runtime__bar { height: 10px; margin-left: var(--start, 0%); background: var(--sb-white); border-radius: 999px; }
.sb-runtime__bar--first { background: var(--sb-accent); }
.sb-runtime__axis { display: flex; justify-content: space-between; font-family: var(--sb-font-mono); font-size: 12px; color: var(--sb-dim); border-top: 1px solid var(--sb-ink-line); padding-top: 10px; }
.sb-runtime__note { font-size: 14px; color: var(--sb-dim); }

.sb-stats { border-top: 1px solid var(--sb-ink-line); }
.sb-stats__grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); gap: 28px; padding-top: 36px; padding-bottom: 36px; }
.sb-stat { display: flex; align-items: baseline; gap: 16px; }
.sb-stat__num { font-family: var(--sb-font-display); font-weight: 800; font-size: 48px; letter-spacing: -0.03em; line-height: 1; white-space: nowrap; }
.sb-stat__label { color: var(--sb-soft); font-size: 16px; }

/* ---------- 8. KI-Register-Teaser ---------- */
.sb-feature { background: var(--sb-white); border: 1px solid var(--sb-line); border-radius: var(--sb-radius-lg); padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 40px; align-items: center; }
.sb-feature__copy { flex: 1 1 380px; min-width: 0; display: flex; flex-direction: column; gap: 18px; align-items: flex-start; }
.sb-feature__media { flex: 1 1 420px; min-width: 0; aspect-ratio: 16/9; }
.sb-tag { font-family: var(--sb-font-mono); font-size: 13px; letter-spacing: .08em; text-transform: uppercase; background: var(--sb-ink); color: var(--sb-white); padding: 4px 12px; border-radius: 999px; }

/* ---------- 9. Zweispalter (Ausgangslage, FAQ, Über mich) ---------- */
.sb-split { display: flex; flex-wrap: wrap; gap: 48px; }
.sb-split__a { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sb-split__b { flex: 1 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.sb-split__b--wide { flex: 2 1 480px; gap: 22px; }
.sb-split--center { align-items: center; gap: 56px; }
.sb-quote { font-family: var(--sb-font-display); font-weight: 600; font-size: 22px; line-height: 1.3; padding: 20px 24px; background: var(--sb-white); border: 1px solid var(--sb-line); border-radius: 16px; }
.sb-statement { font-family: var(--sb-font-display); font-weight: 600; font-size: 24px; line-height: 1.25; }
.sb-portrait { flex: 1 1 320px; min-width: 0; max-width: 440px; aspect-ratio: 4/5; border-radius: var(--sb-radius-lg); }
.sb-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; border-top: 1px solid var(--sb-line); padding-top: 22px; }
.sb-facts__num { font-family: var(--sb-font-display); font-weight: 800; font-size: 30px; letter-spacing: -0.02em; }

/* ---------- 10. Referenzliste ---------- */
.sb-reflist { display: flex; flex-direction: column; border-top: 1px solid var(--sb-ink); border-bottom: 1px solid var(--sb-ink); }
.sb-ref { display: flex; flex-wrap: wrap; gap: 8px 32px; padding: 26px 0; border-top: 1px solid var(--sb-line); }
.sb-ref:first-child { border-top: 0; }
.sb-ref__since { flex: 0 0 130px; font-family: var(--sb-font-mono); font-size: 14px; color: var(--sb-mute); padding-top: 5px; }
.sb-ref__name { flex: 1 1 240px; min-width: 0; }
.sb-ref__place { font-size: 15px; color: var(--sb-mute); }
.sb-ref__desc { flex: 2 1 380px; min-width: 0; font-size: 16px; color: var(--sb-mute); }

.sb-callout { background: var(--sb-ink); color: var(--sb-white); border-radius: var(--sb-radius-lg); padding: clamp(24px, 4vw, 44px); display: flex; flex-wrap: wrap; gap: 24px 48px; align-items: center; justify-content: space-between; }
.sb-callout__copy { flex: 1 1 480px; min-width: 0; display: flex; flex-direction: column; gap: 12px; }
.sb-callout__copy p { font-size: 16px; color: var(--sb-soft); }
.sb-callout h3 { font-size: clamp(24px, 3vw, 34px); font-weight: 700; line-height: 1.12; letter-spacing: -0.02em; }

/* ---------- 11. Chips, Prinzipien, Panel ---------- */
.sb-chips { display: flex; flex-wrap: wrap; gap: 10px; list-style: none; margin: 0; padding: 0; }
.sb-chips li { padding: 9px 18px; border: 1px solid var(--sb-ink); border-radius: 999px; font-size: 15px; font-weight: 500; }

.sb-principle { border-top: 3px solid var(--sb-ink); padding-top: 18px; display: flex; flex-direction: column; gap: 10px; }
.sb-principle__num { font-family: var(--sb-font-display); font-weight: 800; font-size: 44px; letter-spacing: -0.03em; line-height: 1; }
.sb-principle h3 { font-size: 20px; font-weight: 700; }

.sb-panel { background: var(--sb-paper); border-radius: var(--sb-radius-lg); padding: clamp(24px, 4vw, 48px); display: flex; flex-wrap: wrap; gap: 24px 48px; }
.sb-panel__a { flex: 1 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }
.sb-panel__b { flex: 2 1 440px; min-width: 0; display: flex; flex-direction: column; gap: 16px; }

.sb-between { display: flex; flex-wrap: wrap; gap: 20px 40px; align-items: center; justify-content: space-between; }
.sb-between > p { flex: 1 1 420px; min-width: 0; }

/* ---------- 12. Open-Source-Repos ---------- */
.sb-repo__name { font-family: var(--sb-font-mono) !important; font-size: 19px; font-weight: 500; }
.sb-repo__name a { text-decoration: none; }
.sb-repo__name span { color: var(--sb-dim); }
.sb-repo__meta { display: flex; flex-wrap: wrap; gap: 6px 14px; font-family: var(--sb-font-mono); font-size: 12px; color: var(--sb-dim); list-style: none; margin: 0; padding: 0; }
.sb-repo__links { display: flex; flex-wrap: wrap; gap: 4px 20px; font-size: 15px; font-weight: 600; }
.sb-repo__links a { min-height: 44px; display: inline-flex; align-items: center; }
.sb-repo__links a:first-child { color: var(--sb-accent); text-decoration: none; }
.sb-repo__links a + a { text-underline-offset: 4px; }

/* ---------- 13. Ablauf ---------- */
.sb-steps { list-style: none; margin: 0; padding: 0; }
.sb-step { padding: 24px; gap: 10px; }
.sb-step__num { width: 40px; height: 40px; border-radius: 50%; background: var(--sb-ink); color: var(--sb-white); display: flex; align-items: center; justify-content: center; font-family: var(--sb-font-mono); font-size: 14px; }
.sb-step h3 { font-size: 19px; font-weight: 700; }
.sb-price { display: flex; flex-wrap: wrap; gap: 12px 32px; padding: 24px 28px; background: var(--sb-white); border: 1px solid var(--sb-ink); border-radius: var(--sb-radius); align-items: baseline; }
.sb-price__q { font-family: var(--sb-font-display); font-weight: 700; font-size: 22px; }
.sb-price p { flex: 1 1 480px; min-width: 0; color: var(--sb-mute); }

/* ---------- 14. Blog ---------- */
.sb-posts { display: grid; grid-template-columns: repeat(auto-fit, minmax(300px, 1fr)); gap: 0 40px; }
.sb-post { text-decoration: none; border-top: 1px solid var(--sb-ink); padding: 22px 0 30px; display: flex; flex-direction: column; gap: 10px; }
.sb-post__meta { display: flex; justify-content: space-between; gap: 12px; font-family: var(--sb-font-mono); font-size: 12px; letter-spacing: .06em; text-transform: uppercase; color: var(--sb-mute); }
.sb-post h3 { font-size: 20px; font-weight: 700; line-height: 1.25; letter-spacing: -0.01em; }

/* ---------- 15. FAQ ---------- */
.sb-faq { flex: 2 1 520px; min-width: 0; border-top: 1px solid var(--sb-ink); border-bottom: 1px solid var(--sb-ink); }
.sb-faq details { border-top: 1px solid var(--sb-line); padding: 6px 0; }
.sb-faq details:first-child { border-top: 0; }
.sb-faq summary { min-height: 52px; display: flex; align-items: center; justify-content: space-between; gap: 16px; cursor: pointer; list-style: none; font-family: var(--sb-font-display); font-weight: 600; font-size: 19px; }
.sb-faq summary::-webkit-details-marker { display: none; }
.sb-faq summary::after { content: "+"; font-family: var(--sb-font-mono); font-weight: 400; font-size: 22px; flex: none; }
.sb-faq details[open] summary::after { content: "–"; }
.sb-faq p { color: var(--sb-mute); padding: 0 0 18px; font-size: 16px; max-width: 680px; }

/* ---------- 16. Kontakt ---------- */
.sb-contact-wrap { padding: 0 var(--sb-gutter) 24px; }
.sb-contact { max-width: var(--sb-wrap); margin: 0 auto; background: var(--sb-accent); color: var(--sb-ink); border-radius: var(--sb-radius-xl); padding: clamp(32px, 6vw, 80px); display: flex; flex-direction: column; gap: 28px; }
.sb-contact .sb-eyebrow { color: var(--sb-ink); }
.sb-contact h2 { font-size: clamp(40px, 6vw, 84px); font-weight: 800; line-height: .98; letter-spacing: -0.035em; }
.sb-contact p { font-size: 19px; max-width: 720px; }
.sb-contact .sb-btn--outline { border-width: 1.5px; }
.sb-contact__facts { display: flex; flex-wrap: wrap; gap: 8px 28px; font-family: var(--sb-font-mono); font-size: 14px; border-top: 1px solid var(--sb-ink); padding-top: 20px; list-style: none; margin: 0; padding-left: 0; }

/* ---------- 17. Footer ---------- */
.sb-footer { background: var(--sb-ink); color: var(--sb-white); margin-top: 72px; }
.sb-footer__inner { padding-top: 72px; padding-bottom: 32px; display: flex; flex-direction: column; gap: 48px; }
.sb-footer__cols { display: flex; flex-wrap: wrap; gap: 40px 64px; }
.sb-footer__about { flex: 2 1 340px; min-width: 0; display: flex; flex-direction: column; gap: 16px; align-items: flex-start; }
.sb-footer__about p { font-size: 15px; color: var(--sb-dim); max-width: 420px; }
.sb-footer__about > a:last-child { font-size: 15px; min-height: 44px; display: inline-flex; align-items: center; text-underline-offset: 5px; text-decoration-color: var(--sb-accent); }
.sb-footer__col { flex: 1 1 200px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.sb-footer__col h4 { font-family: var(--sb-font-mono); font-weight: 500; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; color: var(--sb-dim); padding-bottom: 8px; }
.sb-footer__col a { font-size: 15px; text-decoration: none; padding: 6px 0; }
.sb-footer__legal { border-top: 1px solid var(--sb-ink-line); padding-top: 20px; font-family: var(--sb-font-mono); font-size: 13px; color: var(--sb-dim); }

/* ---------- 18. Kleine Bildschirme ---------- */
@media (max-width: 640px) {
  :root { --sb-section: 72px; --sb-section-band: 72px; }
  .sb-hero { padding-top: 40px; padding-bottom: 56px; gap: 40px; }
  .sb-stack { gap: 36px; }
  .sb-ref__since { flex-basis: 100%; padding-top: 0; }
  .sb-btn { white-space: normal; }
}
