/* ============================================================
   AUTOMATION EINES INSTAGRAM-KANALS — ibetmax.com · KI & AI Hub
   Wissenskarte zum abgeschlossenen Projekt @taeglich.gewinnen
   Akzentfarbe: Mint (#3ECFB2) — die Kanalfarbe
   ============================================================ */

/* ── TOKENS ──────────────────────────────────────────────── */
:root {
  --bg:          #07080b;
  --bg-alt:      rgba(255,255,255,.015);
  --panel:       rgba(255,255,255,.04);
  --panel-h:     rgba(255,255,255,.06);
  --mint:        #3ECFB2;
  --mint-dim:    rgba(62,207,178,.55);
  --mint-faint:  rgba(62,207,178,.07);
  --amber:       #f4b740;
  --amber-faint: rgba(244,183,64,.07);
  --violet:      #8b7cf8;
  --violet-faint:rgba(139,124,248,.07);
  --cyan:        #38bdf8;
  --red:         #ef4444;
  --red-faint:   rgba(239,68,68,.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-m:    rgba(62,207,178,.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(--mint); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; height: auto; }
p { color: var(--text-dim); overflow-wrap: break-word; }
h1, h2, h3, h4 { overflow-wrap: break-word; }

.skip-link {
  position: absolute; left: -9999px; top: 0; z-index: 200;
  background: var(--mint); color: #04211c; 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; }
section.alt { background: var(--bg-alt); }

/* ── 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(62,207,178,.3) transparent;
}
.toc-bar__inner::-webkit-scrollbar { height: 5px; }
.toc-bar__inner::-webkit-scrollbar-thumb { background: rgba(62,207,178,.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(--mint); border-color: var(--border-m);
  background: var(--mint-faint); text-decoration: none;
}
.toc-link b { color: var(--mint); font-weight: 800; }

/* ── HERO ─────────────────────────────────────────────────── */
.hero {
  position: relative; overflow: hidden;
  padding: 88px 0 66px;
  background: linear-gradient(165deg, var(--bg) 55%, #04211c 100%);
}
.hero__grid {
  position: absolute; inset: 0; pointer-events: none;
  background-image:
    linear-gradient(rgba(62,207,178,.05) 1px, transparent 1px),
    linear-gradient(90deg, rgba(62,207,178,.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(62,207,178,.10) 0%, rgba(18,197,188,.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(--mint); background: var(--mint-faint);
  border: 1px solid var(--border-m); border-radius: 100px;
  padding: 6px 16px 6px 12px; margin-bottom: 22px;
}
.hero__kicker img { width: 18px; height: 18px; object-fit: contain; flex-shrink: 0; }
.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(--mint); font-style: normal; }
.hero__sub {
  font-size: clamp(15px, 2vw, 18px); color: var(--text);
  max-width: 720px; margin: 0 auto 16px; line-height: 1.5; font-weight: 600;
}
.hero__intro {
  font-size: 15px; color: var(--text-dim); max-width: 730px;
  margin: 0 auto 28px; line-height: 1.75;
}
.hero__status {
  display: inline-flex; align-items: center; gap: 10px; flex-wrap: wrap;
  justify-content: center;
  font-size: 13px; font-weight: 700; letter-spacing: .02em;
  color: var(--amber); background: var(--amber-faint);
  border: 1px solid rgba(244,183,64,.24);
  border-radius: 100px; padding: 9px 20px; margin-bottom: 30px; 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(--mint); color: #04211c; border-color: var(--mint);
  box-shadow: 0 4px 20px rgba(62,207,178,.22);
}
.btn--primary:hover {
  background: #58ddc2; box-shadow: 0 6px 28px rgba(62,207,178,.36);
  transform: translateY(-1px); text-decoration: none; color: #04211c;
}
.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(--mint-faint); border: 1px solid var(--border-m);
  font-size: 13px; font-weight: 900; color: var(--mint); 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(--mint); font-style: normal; }
.sec-sub { font-size: 15px; color: var(--text-dim); line-height: 1.6; max-width: 700px; }

.prose { font-size: 15px; color: var(--text-dim); line-height: 1.78; max-width: 760px; }
.prose + .prose { margin-top: 16px; }
.prose strong { color: var(--text); font-weight: 700; }
.prose em { color: var(--mint); font-style: normal; font-weight: 600; }

h3.sub-head {
  font-size: 17px; font-weight: 800; color: var(--text);
  margin: 34px 0 12px; letter-spacing: .01em;
}

/* ── GRIDS ───────────────────────────────────────────────── */
.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)); }
.grid--4 { grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); }

/* ── CARDS ───────────────────────────────────────────────── */
.card {
  background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
  padding: 22px; position: relative; overflow: hidden;
  transition: border-color .2s, box-shadow .2s, transform .2s;
}
.card::before {
  content: ''; position: absolute; top: 0; left: 0; right: 0; height: 2px;
  background: linear-gradient(90deg, var(--mint), transparent);
  opacity: 0; transition: opacity .2s;
}
.card:hover { border-color: var(--border-m); transform: translateY(-2px); box-shadow: 0 8px 28px rgba(62,207,178,.1); }
.card:hover::before { opacity: 1; }
.card--warn { border-color: rgba(244,183,64,.2); background: rgba(244,183,64,.03); }
.card--warn::before { background: linear-gradient(90deg, var(--amber), transparent); }
.card--warn:hover { border-color: rgba(244,183,64,.4); }
.card__icon { font-size: 26px; 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(--mint); font-weight: 600; margin-bottom: 8px; }
.card__desc { font-size: 13.5px; color: var(--text-dim); line-height: 1.65; }

/* ── KENNZAHLEN-KACHELN ──────────────────────────────────── */
.stat {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px;
}
.stat__num {
  font-size: clamp(28px, 4vw, 38px); font-weight: 900; line-height: 1;
  color: var(--mint); letter-spacing: -.01em; margin-bottom: 8px;
}
.stat__label {
  font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 6px;
}
.stat__note { font-size: 13px; color: var(--text-dim); line-height: 1.55; }

/* ── ABLAUF-SCHRITTE ─────────────────────────────────────── */
.steps { display: grid; gap: 14px; }
.step {
  display: flex; gap: 18px; align-items: flex-start;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px 22px;
  border-left: 3px solid var(--mint);
  transition: border-color .2s, background .2s;
}
.step:hover { background: var(--panel-h); }
.step--human { border-left-color: var(--amber); }
.step__id {
  flex-shrink: 0; width: 42px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12px; font-weight: 700; letter-spacing: .1em;
  color: var(--mint); padding-top: 3px;
}
.step--human .step__id { color: var(--amber); }
.step__body { min-width: 0; }
.step__title { font-size: 16px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.step__desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; }
.step__who {
  display: inline-block; margin-top: 10px;
  font-size: 10px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  border-radius: 100px; padding: 3px 10px;
  color: var(--mint); background: var(--mint-faint); border: 1px solid var(--border-m);
}
.step--human .step__who { color: var(--amber); background: var(--amber-faint); border-color: rgba(244,183,64,.28); }

/* ── GALERIE ─────────────────────────────────────────────── */
.matrix-figure { margin: 0; }
.matrix-figure img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
figcaption {
  font-size: 12.5px; color: var(--text-faint); line-height: 1.6;
  margin-top: 12px; text-align: center;
}

.example {
  display: grid; grid-template-columns: 260px 1fr; gap: 22px;
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 20px; align-items: start;
}
.example + .example { margin-top: 18px; }
.example img { width: 100%; border-radius: 10px; border: 1px solid var(--border); }
.example__meta {
  font-family: 'Courier New', Courier, monospace;
  font-size: 11px; letter-spacing: .08em; text-transform: uppercase;
  color: var(--mint); margin-bottom: 8px;
}
.example__title { font-size: 17px; font-weight: 800; color: var(--text); margin-bottom: 10px; line-height: 1.25; }
.example__note { font-size: 13.5px; color: var(--text-dim); line-height: 1.7; margin-bottom: 14px; }
.caption-box {
  background: rgba(0,0,0,.35); border: 1px solid var(--border);
  border-radius: 10px; padding: 14px 16px;
  font-family: 'Courier New', Courier, monospace;
  font-size: 12.5px; line-height: 1.75; color: var(--text-dim);
  white-space: pre-wrap; word-break: break-word;
  max-height: 260px; overflow-y: auto;
  scrollbar-width: thin; scrollbar-color: rgba(62,207,178,.3) transparent;
}
.caption-box::-webkit-scrollbar { width: 6px; }
.caption-box::-webkit-scrollbar-thumb { background: rgba(62,207,178,.3); border-radius: 100px; }
.caption-box__label {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--text-faint); margin-bottom: 8px; font-family: inherit;
}

/* ── DIAGRAMM ────────────────────────────────────────────── */
.chart-card {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 24px;
}
.chart-card svg { width: 100%; height: auto; display: block; }
.chart-legend {
  display: flex; flex-wrap: wrap; gap: 16px; margin-top: 18px;
  font-size: 12.5px; color: var(--text-dim);
}
.chart-legend span { display: inline-flex; align-items: center; gap: 7px; }
.chart-legend i {
  width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex-shrink: 0;
}

/* ── FOTO ────────────────────────────────────────────────── */
.photo-row {
  display: grid; grid-template-columns: 300px 1fr; gap: 26px; align-items: center;
}
.photo-row--rev { grid-template-columns: 1fr 300px; }
.photo-row img { width: 100%; border-radius: var(--radius); border: 1px solid var(--border); }
.photo-wide img { width: auto; max-width: 100%; margin: 0 auto; border-radius: var(--radius); border: 1px solid var(--border); }

/* ── TABELLE ─────────────────────────────────────────────── */
.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(62,207,178,.08); }
.dtable th {
  padding: 12px 16px; text-align: left; white-space: nowrap;
  font-size: 11px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase;
  color: var(--mint); 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.55; }
.dtable td:first-child { color: var(--text); font-weight: 700; }

/* ── BOXEN ───────────────────────────────────────────────── */
.warn-box {
  display: flex; gap: 14px; align-items: flex-start; padding: 18px 22px;
  background: rgba(244,183,64,.06); border: 1px solid rgba(244,183,64,.2);
  border-radius: var(--radius); font-size: 14px; color: var(--text-dim); line-height: 1.7;
}
.warn-box--red { background: var(--red-faint); border-color: rgba(239,68,68,.22); }
.warn-box__icon { font-size: 22px; flex-shrink: 0; margin-top: 1px; }
.warn-box strong { color: var(--text); }

.callout {
  margin-top: 24px; padding: 18px 22px;
  background: var(--mint-faint); border-left: 3px solid var(--mint);
  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); }

.lesson {
  display: flex; gap: 16px; align-items: flex-start;
  padding: 18px 20px; background: var(--panel);
  border: 1px solid var(--border); border-radius: var(--radius);
}
.lesson + .lesson { margin-top: 14px; }
.lesson__no {
  flex-shrink: 0; font-family: 'Courier New', Courier, monospace;
  font-size: 13px; font-weight: 800; color: var(--amber);
  border: 1px solid rgba(244,183,64,.28); background: var(--amber-faint);
  border-radius: 8px; padding: 4px 10px; line-height: 1.2;
}
.lesson__title { font-size: 15.5px; font-weight: 800; color: var(--text); margin-bottom: 5px; }
.lesson__desc { font-size: 14px; color: var(--text-dim); line-height: 1.7; }

/* ── AGENTEN ─────────────────────────────────────────────── */
.agents { display: grid; gap: 14px; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); }
.agent {
  background: var(--panel); border: 1px solid var(--border);
  border-radius: var(--radius); padding: 18px 20px;
  border-top: 2px solid var(--violet);
}
.agent__role {
  font-size: 10px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase;
  color: var(--violet); margin-bottom: 7px;
}
.agent__name { font-size: 15px; font-weight: 800; color: var(--text); margin-bottom: 6px; }
.agent__desc { font-size: 13px; color: var(--text-dim); line-height: 1.65; }

/* ── ABSCHLUSS ───────────────────────────────────────────── */
.closing {
  text-align: center; padding: 40px 26px;
  background: linear-gradient(165deg, rgba(62,207,178,.05), rgba(0,0,0,.25));
  border: 1px solid var(--border-m); border-radius: var(--radius);
}
.closing__title { font-size: clamp(20px, 3vw, 28px); font-weight: 900; color: var(--text); margin-bottom: 14px; }
.closing__text { font-size: 15px; color: var(--text-dim); line-height: 1.75; max-width: 640px; margin: 0 auto 24px; }
.closing__logos {
  display: flex; align-items: center; justify-content: center; gap: 26px; flex-wrap: wrap;
  margin-top: 26px; padding-top: 24px; border-top: 1px solid var(--border);
}
.closing__logos img { height: 76px; width: auto; opacity: .92; }
.closing__logos img + img { height: 68px; }

/* ── 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(--mint); border-color: var(--border-m);
  background: var(--mint-faint); text-decoration: none;
}

/* ── RESPONSIVE ──────────────────────────────────────────── */
@media (max-width: 780px) {
  .example { grid-template-columns: 1fr; }
  .example img { max-width: 320px; }
  .photo-row, .photo-row--rev { grid-template-columns: 1fr; }
  .photo-row--rev img { order: -1; }
}
@media (max-width: 600px) {
  .grid--2, .grid--3, .grid--4 { grid-template-columns: 1fr; }
  .sec-header { flex-direction: column; gap: 10px; }
  .step { flex-direction: column; gap: 10px; }
  .closing__logos img { height: 58px; }
  .closing__logos img + img { height: 52px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}
