/* ============================================================
   BnB InfoSec GmbH – Stylesheet
   Design: dunkel & technisch (Serverraum / Terminal)
   Keine externen Fonts, kein Tracking, keine Cookies.
   ============================================================ */

/* ---------- Design-Tokens ---------- */
:root {
  --bg: #0a0e14;
  --bg-alt: #0d1320;
  --surface: #111827;
  --surface-2: #151d2e;
  --border: #1f2a3d;
  --border-hover: #2e3f5c;

  --text: #e2e8f0;
  --text-muted: #94a3b8;
  --text-faint: #64748b;

  --accent: #00e676;
  --accent-soft: rgba(0, 230, 118, 0.12);
  --accent-glow: rgba(0, 230, 118, 0.35);
  --accent-2: #00b34a;

  --green: #22c55e;
  --led-green: #22c55e;
  --led-cyan: #00e676;

  --font-sans: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-mono: ui-monospace, "SFMono-Regular", "Cascadia Mono", Menlo, Consolas, "Liberation Mono", monospace;

  --radius: 10px;
  --radius-lg: 16px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --transition: 160ms ease;

  --container: 1120px;
  --header-h: 72px;
}

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

html {
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 16px);
}

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.65;
  -webkit-font-smoothing: antialiased;
}

img, svg { display: block; max-width: 100%; }

a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

ul { padding: 0; }

/* ---------- Helpers ---------- */
.container { max-width: var(--container); margin-inline: auto; padding-inline: 24px; }
.mono { font-family: var(--font-mono); }
.accent { color: var(--accent); }
.visually-hidden {
  position: absolute !important;
  width: 1px; height: 1px;
  margin: -1px; padding: 0;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: -100px;
  left: 16px;
  z-index: 200;
  padding: 10px 18px;
  background: var(--accent);
  color: #001a0d;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:focus { top: 0; text-decoration: none; }

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

/* Status-LEDs (Server-Optik) */
.led {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 50%;
  margin-right: 10px;
  vertical-align: baseline;
}
.led-green {
  background: var(--led-green);
  box-shadow: 0 0 8px rgba(34, 197, 94, 0.8);
}
.led-cyan {
  background: var(--led-cyan);
  box-shadow: 0 0 8px rgba(0, 230, 118, 0.8);
}

/* ---------- Buttons ---------- */
.btn {
  display: inline-block;
  padding: 12px 26px;
  border-radius: var(--radius);
  font-weight: 600;
  font-size: 0.98rem;
  letter-spacing: 0.02em;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all var(--transition);
}
.btn:hover { text-decoration: none; }

.btn-primary {
  background: linear-gradient(135deg, var(--accent) 0%, var(--accent-2) 100%);
  color: #001a0d;
  box-shadow: 0 4px 24px var(--accent-glow);
}
.btn-primary:hover {
  transform: translateY(-2px);
  box-shadow: 0 8px 32px var(--accent-glow);
}

.btn-outline {
  background: transparent;
  color: var(--accent);
  border-color: var(--border-hover);
}
.btn-outline:hover {
  background: var(--accent-soft);
  border-color: var(--accent);
}

/* ---------- Header ---------- */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  z-index: 100;
  height: var(--header-h);
  background: rgba(10, 14, 20, 0.85);
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}

.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  height: var(--header-h);
}

.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text);
  font-weight: 700;
  font-size: 1.1rem;
  white-space: nowrap;
}
.brand:hover { text-decoration: none; color: var(--accent); }
.brand-logo { filter: drop-shadow(0 0 6px rgba(0, 230, 118, 0.3)); }
.brand-text small {
  display: block;
  font-size: 0.62rem;
  font-weight: 500;
  letter-spacing: 0.22em;
  text-transform: uppercase;
  color: var(--text-faint);
}

.site-nav {
  display: flex;
  align-items: center;
  gap: 28px;
}
.site-nav ul {
  display: flex;
  align-items: center;
  gap: 26px;
  list-style: none;
}
.site-nav a:not(.btn) {
  color: var(--text-muted);
  font-size: 0.95rem;
  font-weight: 500;
  transition: color var(--transition);
}
.site-nav a:not(.btn):hover { color: var(--accent); text-decoration: none; }
.btn-nav { padding: 9px 20px; font-size: 0.88rem; }

/* Hamburger */
.nav-toggle {
  display: none;
  flex-direction: column;
  justify-content: center;
  gap: 5px;
  width: 44px; height: 44px;
  padding: 10px;
  background: transparent;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  cursor: pointer;
}
.nav-toggle-bar {
  display: block;
  width: 100%;
  height: 2px;
  background: var(--text);
  border-radius: 2px;
  transition: transform var(--transition), opacity var(--transition);
}
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] .nav-toggle-bar:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Hero ---------- */
.hero {
  position: relative;
  padding: calc(var(--header-h) + 90px) 0 100px;
  overflow: hidden;
}

/* feines Terminal-Raster im Hintergrund */
.hero-grid {
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(0, 230, 118, 0.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0, 230, 118, 0.05) 1px, transparent 1px);
  background-size: 44px 44px;
  mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 50% 30%, #000 30%, transparent 75%);
  pointer-events: none;
}

.hero-kicker {
  display: inline-flex;
  align-items: center;
  padding: 7px 14px;
  margin-bottom: 28px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.hero-kicker .mono { color: var(--green); }

.hero h1 {
  max-width: 15ch;
  margin-bottom: 20px;
  font-size: clamp(2.2rem, 5.2vw, 3.6rem);
  line-height: 1.12;
  letter-spacing: -0.02em;
  font-weight: 800;
}

.hero-claim {
  margin-bottom: 14px;
  font-size: clamp(1.05rem, 2vw, 1.3rem);
  font-weight: 600;
  color: var(--accent);
}

.hero-sub {
  max-width: 62ch;
  margin-bottom: 36px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 14px;
  margin-bottom: 56px;
}

.hero-facts {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  list-style: none;
}
.hero-facts li {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 9px 18px;
  font-size: 0.9rem;
  font-weight: 500;
  color: var(--text-muted);
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 999px;
}
.hero-fact-icon { color: var(--accent); }

/* ---------- Sections ---------- */
.section { padding: 96px 0; }
.section-alt { background: var(--bg-alt); border-block: 1px solid var(--border); }

.section-kicker {
  margin-bottom: 12px;
  font-size: 0.85rem;
  color: var(--accent);
  letter-spacing: 0.06em;
}

.section h2 {
  margin-bottom: 16px;
  font-size: clamp(1.7rem, 3.4vw, 2.4rem);
  line-height: 1.2;
  letter-spacing: -0.015em;
  font-weight: 750;
}

.section-intro {
  max-width: 64ch;
  margin-bottom: 52px;
  font-size: 1.05rem;
  color: var(--text-muted);
}

/* ---------- Cards ---------- */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.card {
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.card:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.card-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 58px; height: 58px;
  margin-bottom: 20px;
  color: var(--accent);
  background: var(--accent-soft);
  border: 1px solid rgba(0, 230, 118, 0.25);
  border-radius: 14px;
}

.card h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 700;
}

.card-quiet p { color: var(--text-muted); }
.card-quiet .mono { margin-right: 8px; font-size: 0.95em; }

.check-list {
  list-style: none;
  display: grid;
  gap: 10px;
}
.check-list li {
  position: relative;
  padding-left: 26px;
  color: var(--text-muted);
  font-size: 0.95rem;
}
.check-list li::before {
  content: "▸";
  position: absolute;
  left: 6px;
  color: var(--accent);
}

/* ---------- Services ---------- */
.service-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 24px;
}

.service {
  padding: 28px 26px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-left: 3px solid var(--accent);
  border-radius: var(--radius);
  transition: transform var(--transition), border-color var(--transition);
}
.service:hover {
  transform: translateY(-3px);
  border-left-color: var(--accent-2);
}
.service h3 {
  display: flex;
  align-items: center;
  margin-bottom: 16px;
  font-size: 1.05rem;
  font-weight: 700;
}

/* ---------- Open-Source-Werkzeugkasten ---------- */
.oss-stack {
  margin-top: 44px;
  padding: 30px 32px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.oss-stack-title {
  margin-bottom: 20px;
  font-weight: 600;
  color: var(--text);
}

.oss-chip-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.oss-chip {
  display: inline-flex;
  align-items: center;
  padding: 10px 18px;
  font-family: var(--font-mono);
  font-size: 0.9rem;
  color: var(--text);
  background: var(--bg);
  border: 1px solid var(--border-hover);
  border-radius: 8px;
  transition: border-color var(--transition), box-shadow var(--transition), transform var(--transition);
}
.oss-chip:hover {
  border-color: var(--accent);
  box-shadow: 0 0 18px var(--accent-glow);
  transform: translateY(-2px);
}
.oss-chip-prompt {
  margin-right: 9px;
  color: var(--green);
  font-weight: 700;
}

/* ---------- KI-Highlight (lokale KI-Systeme) ---------- */
/* Gleiches Erscheinungsbild wie die Karten der Sektionen (card-quiet) */
.ai-spotlight {
  display: grid;
  grid-template-columns: 1.1fr 0.9fr;
  align-items: center;
  gap: 44px;
  margin: 56px 0;
  padding: 30px 28px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  transition: border-color var(--transition), transform var(--transition), box-shadow var(--transition);
}
.ai-spotlight:hover {
  border-color: var(--border-hover);
  transform: translateY(-4px);
  box-shadow: var(--shadow);
}

.ai-spotlight h3 {
  margin-bottom: 14px;
  font-size: 1.15rem;
  font-weight: 700;
}

.ai-spotlight-text > p {
  margin-bottom: 18px;
  color: var(--text-muted);
}
.ai-spotlight-text strong { color: var(--text); }
.ai-spotlight .check-list { margin-bottom: 0; }

/* Terminal-Fenster (rein dekorativ, aria-hidden) */
.terminal-window {
  background: #05070a;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  box-shadow: 0 16px 48px rgba(0, 0, 0, 0.6), 0 0 30px rgba(0, 230, 118, 0.08);
  overflow: hidden;
}

.terminal-bar {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 11px 14px;
  background: #0d1117;
  border-bottom: 1px solid var(--border);
}
.terminal-dot {
  width: 11px; height: 11px;
  border-radius: 50%;
  background: var(--border-hover);
}
.terminal-dot:nth-child(1) { background: #ff5f57; }
.terminal-dot:nth-child(2) { background: #febc2e; }
.terminal-dot:nth-child(3) { background: var(--green); }
.terminal-title {
  margin-left: auto;
  font-size: 0.72rem;
  color: var(--text-faint);
}

.terminal-body {
  padding: 20px 18px;
  font-size: 0.82rem;
  line-height: 1.75;
  color: var(--text);
}
.terminal-body p { margin-bottom: 4px; }
.terminal-body .prompt { color: var(--accent); font-weight: 700; margin-right: 8px; }
.terminal-body .dim { color: var(--text-faint); }

.terminal-body .ai-answer {
  color: var(--accent);
}
.cursor {
  display: inline-block;
  width: 8px; height: 15px;
  margin-left: 4px;
  background: var(--accent);
  vertical-align: text-bottom;
  animation: blink 1.1s step-end infinite;
}
@keyframes blink { 50% { opacity: 0; } }

@media (max-width: 900px) {
  .ai-spotlight {
    grid-template-columns: 1fr;
    gap: 28px;
    padding: 26px 22px;
  }
}

/* ---------- Team ---------- */
.team-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 320px));
  justify-content: center;
  gap: 40px;
}

.team-member {
  text-align: center;
}
.team-member img {
  width: 200px;
  height: 200px;
  margin: 0 auto 22px;
  object-fit: cover;
  border-radius: 50%;
  border: 3px solid var(--border-hover);
  box-shadow: 0 0 0 6px var(--bg-alt), 0 0 34px var(--accent-glow);
  transition: border-color var(--transition);
}
.team-member img:hover { border-color: var(--accent); }
.team-member h3 { font-size: 1.2rem; font-weight: 700; }
.team-member .role {
  margin-top: 4px;
  font-size: 0.9rem;
  color: var(--accent);
}

/* ---------- Kontakt ---------- */
.contact-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
  gap: 24px;
  margin-bottom: 56px;
}

.contact-card {
  padding: 26px 24px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.contact-card h3 {
  display: flex;
  align-items: center;
  margin-bottom: 14px;
  font-size: 1rem;
  font-weight: 700;
  color: var(--accent);
}
.contact-card address {
  font-style: normal;
  color: var(--text-muted);
  line-height: 1.6;
}
.contact-card p { color: var(--text-muted); font-size: 0.92rem; }
.contact-link {
  display: inline-block;
  font-size: 1rem;
  color: var(--text);
}
.contact-link:hover { color: var(--accent); }
.contact-hours { margin-top: 6px; }

.cta-band {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 28px;
  padding: 40px 44px;
  background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface) 100%);
  border: 1px solid var(--border-hover);
  border-radius: var(--radius-lg);
}
.cta-band h3 {
  margin-bottom: 8px;
  font-size: 1.35rem;
  font-weight: 750;
}
.cta-band p { max-width: 52ch; color: var(--text-muted); }

/* ---------- Footer ---------- */
.site-footer {
  padding: 44px 0;
  background: var(--bg-alt);
  border-top: 1px solid var(--border);
}
.footer-inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}
.footer-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.footer-name { font-weight: 700; }
.footer-tag { font-size: 0.82rem; color: var(--text-faint); }

.footer-nav ul {
  display: flex;
  gap: 22px;
  list-style: none;
}
.footer-nav a { color: var(--text-muted); font-size: 0.92rem; }
.footer-nav a:hover { color: var(--accent); }

.footer-copy {
  width: 100%;
  margin-top: 26px;
  padding-top: 22px;
  font-size: 0.82rem;
  color: var(--text-faint);
  border-top: 1px solid var(--border);
  text-align: center;
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .nav-toggle { display: flex; }

  .site-nav {
    position: fixed;
    top: var(--header-h);
    left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 0;
    padding: 12px 24px 24px;
    background: rgba(10, 14, 20, 0.97);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--border);
    transform: translateY(-8px);
    opacity: 0;
    visibility: hidden;
    transition: transform var(--transition), opacity var(--transition), visibility var(--transition);
  }
  .site-nav.open {
    transform: translateY(0);
    opacity: 1;
    visibility: visible;
  }

  .site-nav ul {
    flex-direction: column;
    align-items: stretch;
    gap: 0;
  }
  .site-nav ul a:not(.btn) {
    display: block;
    padding: 15px 4px;
    font-size: 1.05rem;
    border-bottom: 1px solid var(--border);
  }
  .btn-nav { margin-top: 18px; text-align: center; }

  .hero { padding-top: calc(var(--header-h) + 56px); }
  .section { padding: 72px 0; }
  .cta-band { padding: 30px 26px; }
}

@media (max-width: 560px) {
  .container { padding-inline: 18px; }
  .hero h1 { font-size: 2rem; }

  /* Status-Bubble kompakt: nur noch LED + 'operational' */
  .hero-kicker {
    padding: 6px 12px;
    margin-bottom: 20px;
    font-size: 0.78rem;
    white-space: nowrap;
  }
  .kicker-extra { display: none; }

  .hero-actions .btn { flex: 1 1 100%; text-align: center; }
  .card-grid, .service-grid, .contact-grid { grid-template-columns: 1fr; }
}

/* ---------- Fehlerseiten ---------- */
.error-page {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 80px 24px;
  text-align: center;
}

.error-code {
  font-size: clamp(5rem, 18vw, 9rem);
  font-weight: 800;
  line-height: 1;
  color: var(--accent);
  text-shadow: 0 0 40px var(--accent-glow);
}
.error-code em {
  font-style: normal;
  color: var(--text-faint);
}

.error-page h1 {
  font-size: clamp(1.5rem, 4vw, 2.2rem);
  font-weight: 750;
}

.error-msg {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.error-page p {
  max-width: 52ch;
  color: var(--text-muted);
}

.error-page .btn {
  margin-top: 18px;
}

/* ---------- Reduced Motion ---------- */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ---------- Legal-Seiten (Impressum/Datenschutz) ---------- */
.legal {
  max-width: 820px;
  margin-inline: auto;
  padding: calc(var(--header-h) + 60px) 24px 80px;
}
.legal h1 {
  margin-bottom: 36px;
  font-size: clamp(1.8rem, 4vw, 2.4rem);
  letter-spacing: -0.015em;
}
.legal h2 {
  margin: 40px 0 14px;
  font-size: 1.25rem;
  font-weight: 700;
  color: var(--accent);
}
.legal h3 {
  margin: 28px 0 10px;
  font-size: 1.05rem;
  font-weight: 700;
}
.legal p { margin-bottom: 14px; color: var(--text-muted); }
.legal ul, .legal ol { margin: 0 0 18px; padding-left: 24px; color: var(--text-muted); }
.legal li { margin-bottom: 8px; }
.legal address {
  font-style: normal;
  margin-bottom: 20px;
  color: var(--text);
  line-height: 1.7;
}
.legal a { color: var(--accent); }
.legal strong { color: var(--text); }
.legal-back {
  display: inline-block;
  margin-top: 44px;
  padding: 10px 22px;
  border: 1px solid var(--border-hover);
  border-radius: var(--radius);
  color: var(--text-muted);
  font-weight: 500;
  transition: all var(--transition);
}
.legal-back:hover {
  color: var(--accent);
  border-color: var(--accent);
  text-decoration: none;
  background: var(--accent-soft);
}