/* ============================================================
   KI-SICHERHEIT & INFRASTRUKTUR — ibetmax.com · KI & AI Hub
   Vom Eingabefeld bis zum KI-Modell: Angriffsflächen,
   Datenflüsse und Sicherheitswerkzeuge.
   Akzentfarbe: Rot/Crimson  (#ef4444)
   ============================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:          #07080b;
  --bg-alt:      rgba(255,255,255,.015);
  --panel:       rgba(255,255,255,.04);
  --panel-h:     rgba(255,255,255,.06);
  --red:         #ef4444;
  --red-dim:     rgba(239,68,68,.55);
  --red-faint:   rgba(239,68,68,.07);
  --amber:       #f5c842;
  --amber-faint: rgba(245,200,66,.07);
  --cyan:        #38bdf8;
  --cyan-faint:  rgba(56,189,248,.07);
  --green:       #4ade80;
  --green-faint: rgba(74,222,128,.07);
  --text:        rgba(255,255,255,.92);
  --text-dim:    rgba(255,255,255,.56);
  --text-faint:  rgba(255,255,255,.32);
  --border:      rgba(255,255,255,.08);
  --border-r:    rgba(239,68,68,.22);
  --radius:      14px;
  --maxw:        1040px;
}

/* ── RESET ───────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: 'Inter', ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial,
               "Noto Sans", "Helvetica Neue", sans-serif;
  font-size: 16px;
  line-height: 1.6;
  min-height: 100vh;
  overflow-x: hidden;
  -webkit-text-size-adjust: 100%;
}
a { color: var(--red); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
p { color: var(--text-dim); overflow-wrap: break-word; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

/* Skip-Link */
.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--red); color: #fff; font-weight: 800;
  padding: 10px 16px; border-radius: 0 0 8px 0; font-size: 13px;
}
.skip-link:focus { left: 0; text-decoration: none; }

/* ── LAYOUT ──────────────────────────────────────────────── */
.wrap { max-width: var(--maxw); margin: 0 auto; padding: 0 24px; }
section { padding: 72px 0; }

/* ── STICKY TOC ──────────────────────────────────────────── */
.toc-bar {
  position: sticky; top: 51px; z-index: 90;
  backdrop-filter: saturate(1.3) blur(14px);
  -webkit-backdrop-filter: saturate(1.3) blur(14px);
  background: rgba(8,8,14,.86);
  border-bottom: 1px solid var(--border);
}
.toc-bar__inner {
  display: flex; gap: 6px; align-items: center;
  max-width: var(--maxw); margin: 0 auto; padding: 9px 24px;
  overflow-x: auto; -webkit-overflow-scrolling: touch;
  scrollbar-width: thin; scrollbar-color: rgba(239,68,68,.3) transparent;
}
.toc-bar__inner::-webkit-scrollbar { height: 5px; }
.toc-bar__inner::-webkit-scrollbar-thumb { background: rgba(239,68,68,.3); border-radius: 100px; }
.toc-link {
  flex-shrink: 0; white-space: nowrap;
  font-size: 11px; font-weight: 700; letter-spacing: .06em;
  color: var(--text-dim); text-decoration: none;
  border: 1px solid var(--border); border-radius: 100px;
  padding: 5px 13px; transition: color .2s, border-color .2s, background .2s;
}
.toc-link:hover {
  color: var(--red); border-color: var(--border-r);
  background: var(--red-faint); text-decoration: none;
}
.toc-link b { color: var(--red); font-weight: 800; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 72px;
  background: linear-gradient(165deg, var(--bg) 55%, #130a0a 100%);
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(239,68,68,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(239,68,68,.05) 1px, transparent 1px);
  background-size: 60px 60px;
  -webkit-mask-image: radial-gradient(ellipse 80% 65% at 50% 40%, black, transparent);
  mask-image: radial-gradient(ellipse 80% 65% at 50% 40%, black, transparent);
}
.hero__glow {
  position: absolute; pointer-events: none;
  width: 720px; height: 720px; top: 50%; left: 50%;
  transform: translate(-50%, -55%);
  background: radial-gradient(circle,
    rgba(239,68,68,.09) 0%, rgba(185,28,28,.04) 40%, transparent 70%);
}
.hero__content { position: relative; text-align: center; }
.hero__kicker {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); background: var(--red-faint);
  border: 1px solid var(--border-r); border-radius: 100px;
  padding: 6px 16px; margin-bottom: 22px;
}
.hero__title {
  font-size: clamp(24px, 4.8vw, 48px); font-weight: 900; line-height: 1.1;
  letter-spacing: .01em; margin-bottom: 18px;
}
.hero__title em { color: var(--red); font-style: normal; }
.hero__sub {
  font-size: clamp(15px, 2vw, 18px); color: var(--text);
  max-width: 700px; margin: 0 auto 16px; line-height: 1.5; font-weight: 600;
}
.hero__intro {
  font-size: 15px; color: var(--text-dim); max-width: 720px;
  margin: 0 auto 28px; line-height: 1.75;
}
.hero__claim {
  display: inline-block; max-width: 660px;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--amber); background: var(--amber-faint);
  border: 1px solid rgba(245,200,66,.24);
  border-radius: 100px; padding: 9px 20px; margin-bottom: 32px; line-height: 1.4;
}
.hero__cta { display: flex; justify-content: center; gap: 12px; flex-wrap: wrap; }

/* ── BUTTONS ─────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; gap: 8px;
  font-size: 14px; font-weight: 700; letter-spacing: .04em;
  border-radius: 100px; padding: 11px 22px;
  text-decoration: none; transition: all .2s; border: 1px solid transparent;
  cursor: pointer;
}
.btn--primary {
  background: var(--red); color: #fff; border-color: var(--red);
  box-shadow: 0 4px 20px rgba(239,68,68,.25);
}
.btn--primary:hover {
  background: rgba(239,68,68,.85); box-shadow: 0 6px 28px rgba(239,68,68,.4);
  transform: translateY(-1px); text-decoration: none; color: #fff;
}
.btn--ghost {
  background: transparent; color: var(--text-dim); border-color: var(--border);
}
.btn--ghost:hover {
  background: rgba(255,255,255,.05); color: var(--text);
  border-color: rgba(255,255,255,.2); text-decoration: none;
}

/* ── SECTION HEADERS ─────────────────────────────────────── */
.sec-header {
  display: flex; align-items: flex-start; gap: 18px;
  margin-bottom: 40px;
}
.sec-num {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 36px; height: 36px; border-radius: 50%;
  background: var(--red-faint); border: 1px solid var(--border-r);
  font-size: 13px; font-weight: 900; color: var(--red); line-height: 1;
  flex-shrink: 0; margin-top: 2px;
}
.sec-title {
  font-size: clamp(22px, 3.6vw, 34px); font-weight: 900;
  line-height: 1.12; letter-spacing: .01em; margin-bottom: 8px; color: var(--text);
}
.sec-title em { color: var(--red); font-style: normal; }
.sec-sub { font-size: 15px; color: var(--text-dim); line-height: 1.6; max-width: 680px; }

/* ── GRID LAYOUTS ────────────────────────────────────────── */
.grid { display: grid; gap: 18px; }
.grid--2 { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px;
  transition: border-color .2s, box-shadow .2s, transform .2s;
  position: relative; overflow: hidden;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--red), transparent);
  opacity: 0; transition: opacity .2s;
}
.card:hover { border-color: var(--border-r); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(239,68,68,.1); }
.card:hover::before { opacity: 1; }
.card--warn { border-color: rgba(245,200,66,.2); background: rgba(245,200,66,.03); }
.card--warn::before { background: linear-gradient(90deg, var(--amber), transparent); }
.card--warn:hover { border-color: rgba(245,200,66,.4); }

.card__icon { font-size: 28px; margin-bottom: 12px; line-height: 1; }
.card__term {
  font-size: 16px; font-weight: 800; color: var(--text);
  margin-bottom: 4px; line-height: 1.2;
}
.card__sub { font-size: 12px; color: var(--red); font-weight: 600; margin-bottom: 8px; }
.card__desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }
.card__tags { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.card__tag {
  font-size: 10px; font-weight: 700; letter-spacing: .06em; text-transform: uppercase;
  color: var(--text-faint); background: rgba(255,255,255,.03);
  border: 1px solid var(--border); border-radius: 100px; padding: 3px 10px;
}

/* ── CONCEPT BLOCKS ──────────────────────────────────────── */
.concept {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 22px;
  border-left: 3px solid var(--red);
  transition: border-color .2s;
}
.concept:hover { border-color: var(--border-r); }
.concept__label {
  font-size: 10px; font-weight: 800; letter-spacing: .14em; text-transform: uppercase;
  color: var(--red); margin-bottom: 8px;
}
.concept__term {
  font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.2;
}
.concept__desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* ── FLOW / TAINT DIAGRAM ────────────────────────────────── */
.flow {
  display: flex; gap: 0; align-items: stretch; flex-wrap: nowrap;
  border: 1px solid var(--border); border-radius: var(--radius);
  overflow: hidden;
}
.flow__step {
  flex: 1; padding: 20px 18px;
  position: relative;
  border-right: 1px solid var(--border);
  background: var(--panel);
  transition: background .2s;
}
.flow__step:last-child { border-right: none; }
.flow__step:hover { background: var(--panel-h); }
.flow__step::after {
  content: '›'; position: absolute;
  right: -1px; top: 50%; transform: translateY(-50%);
  font-size: 20px; color: var(--red-dim); z-index: 1;
  background: var(--panel); padding: 0 4px;
}
.flow__step:last-child::after { display: none; }

.flow__step--source  { border-top: 3px solid var(--red); }
.flow__step--sanitizer { border-top: 3px solid var(--amber); }
.flow__step--sink    { border-top: 3px solid var(--green); }

.flow__num {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px;
}
.flow__step--source .flow__num   { color: var(--red); }
.flow__step--sanitizer .flow__num { color: var(--amber); }
.flow__step--sink .flow__num     { color: var(--green); }

.flow__name { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.flow__desc { font-size: 13px; color: var(--text-dim); line-height: 1.6; }

/* ── TABLE ───────────────────────────────────────────────── */
.dtable-wrap { overflow-x: auto; border-radius: var(--radius); border: 1px solid var(--border); }
.dtable {
  width: 100%; border-collapse: collapse; font-size: 14px;
}
.dtable thead tr { background: rgba(239,68,68,.08); }
.dtable th {
  padding: 12px 16px; text-align: left;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--red); border-bottom: 1px solid var(--border);
}
.dtable tbody tr { border-bottom: 1px solid var(--border); transition: background .15s; }
.dtable tbody tr:last-child { border-bottom: none; }
.dtable tbody tr:hover { background: rgba(255,255,255,.03); }
.dtable td { padding: 14px 16px; color: var(--text-dim); vertical-align: top; line-height: 1.5; }
.dtable td:first-child { color: var(--text); font-weight: 700; }

/* ── BADGES (table) ──────────────────────────────────────── */
.badge {
  display: inline-block; font-size: 10px; font-weight: 800;
  letter-spacing: .08em; text-transform: uppercase;
  border-radius: 100px; padding: 3px 10px;
}
.badge--green { color: var(--green); background: var(--green-faint); border: 1px solid rgba(74,222,128,.25); }
.badge--amber { color: var(--amber); background: var(--amber-faint); border: 1px solid rgba(245,200,66,.25); }

/* ── WARN BOX ────────────────────────────────────────────── */
.warn-box {
  display: flex; gap: 14px; align-items: flex-start;
  padding: 18px 22px;
  background: rgba(245,200,66,.06); border: 1px solid rgba(245,200,66,.2);
  border-radius: var(--radius); font-size: 14px; color: var(--text-dim); line-height: 1.7;
}
.warn-box__icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }

/* ── CALLOUT ─────────────────────────────────────────────── */
.callout {
  margin-top: 24px; padding: 18px 22px;
  background: var(--red-faint); border-left: 3px solid var(--red);
  border-radius: 0 var(--radius) var(--radius) 0;
  font-size: 14.5px; color: var(--text-dim); line-height: 1.7;
}
.callout strong { color: var(--text); }

/* ── FOOTER NAV ──────────────────────────────────────────── */
.footer-nav {
  border-top: 1px solid var(--border); padding: 28px 0;
}
.footer-nav .wrap {
  display: flex; flex-wrap: wrap; gap: 18px; justify-content: center;
}
.footer-nav a {
  font-size: 14px; font-weight: 600; color: var(--text-dim);
  padding: 8px 16px; border: 1px solid var(--border); border-radius: 100px;
  transition: all .2s; text-decoration: none;
}
.footer-nav a:hover {
  color: var(--red); border-color: var(--border-r);
  background: var(--red-faint); text-decoration: none;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 700px) {
  .flow { flex-direction: column; }
  .flow__step { border-right: none; border-bottom: 1px solid var(--border); }
  .flow__step:last-child { border-bottom: none; }
  .flow__step::after { content: '↓'; right: auto; top: auto; bottom: -1px; left: 50%; transform: translateX(-50%); }
  .flow__step:last-child::after { display: none; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  .sec-header { flex-direction: column; gap: 10px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
