/* ==========================================================
   David Venditti - gemeinsames Design (ohne Framework)
   dunkel, technisch; hell per prefers-color-scheme
   ========================================================== */

:root {
  color-scheme: dark light;
  --bg: #0a0f1f;
  --bg2: #101a36;
  --surface: rgba(255, 255, 255, 0.045);
  --surface-strong: rgba(255, 255, 255, 0.08);
  --line: rgba(255, 255, 255, 0.13);
  --line-strong: rgba(255, 255, 255, 0.28);
  --text: #e8edf8;
  --muted: #9fb0cf;
  --accent: #4cc9f0;
  --accent2: #8fd14f;
  --warn: #ffb454;
  --on-accent: #04101c;
  --glow: 0 0 28px rgba(76, 201, 240, 0.35);
  --header-bg: rgba(10, 15, 31, 0.82);
  --footer-h: 52px;
  --font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
}

@media (prefers-color-scheme: light) {
  :root {
    --bg: #f5f7fb;
    --bg2: #e6ecf7;
    --surface: #ffffff;
    --surface-strong: #eef2fa;
    --line: rgba(10, 15, 31, 0.14);
    --line-strong: rgba(10, 15, 31, 0.32);
    --text: #0a0f1f;
    --muted: #46547a;
    --accent: #0044aa;
    --accent2: #3f8a10;
    --warn: #b36b00;
    --on-accent: #ffffff;
    --glow: 0 6px 24px rgba(0, 68, 170, 0.25);
    --header-bg: rgba(245, 247, 251, 0.85);
  }
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
html.snap { scroll-snap-type: y proximity; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 400 1.0625rem/1.65 var(--font);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  padding-bottom: var(--footer-h);
}
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
img, video, svg { max-width: 100%; }
p { margin: 0 0 1em; }
ul { padding-left: 1.2em; }
hr { border: 0; border-top: 1px solid var(--line); margin: 2.4em 0; }
small { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

h1, h2, h3, h4 { line-height: 1.12; letter-spacing: -0.02em; margin: 0 0 0.5em; }
h1 { font-size: clamp(2.3rem, 5.4vw, 4.4rem); font-weight: 800; }
h2 { font-size: clamp(1.8rem, 3.8vw, 3rem); font-weight: 750; }
h3 { font-size: 1.25rem; font-weight: 700; }
.grad {
  background: linear-gradient(90deg, var(--accent), var(--accent2));
  -webkit-background-clip: text;
  background-clip: text;
  color: transparent;
}
.eyebrow {
  font-size: 0.85rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--accent); font-weight: 650; margin-bottom: 1.2em;
}
.lead { font-size: clamp(1.1rem, 1.7vw, 1.4rem); color: var(--muted); max-width: 46ch; }
.text-center { text-align: center; }

.wrap { max-width: 1120px; margin: 0 auto; padding: 0 24px; width: 100%; }
.wrap.narrow { max-width: 860px; }

/* ---------- Header ---------- */
.site-header {
  position: fixed; inset: 0 0 auto 0; z-index: 50;
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px 24px;
  transition: background 0.3s, backdrop-filter 0.3s, border-color 0.3s;
  border-bottom: 1px solid transparent;
}
.site-header.scrolled, body.nav-open .site-header {
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom-color: var(--line);
}
.brand { display: flex; align-items: center; gap: 12px; line-height: 1.15; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand-logo { height: 44px; width: auto; background: #fff; border-radius: 10px; padding: 3px 8px; box-shadow: 0 2px 10px rgba(0, 0, 0, 0.25); flex: none; }
.brand-text { display: flex; flex-direction: column; }
.brand-name { font-weight: 800; font-size: 1.2rem; letter-spacing: -0.01em; }
.brand-name::after { content: "."; color: var(--accent); }
.brand-sub { font-size: 0.72rem; color: var(--muted); letter-spacing: 0.04em; }
.site-nav { display: flex; gap: 6px; }
.site-nav a {
  color: var(--muted); padding: 8px 14px; border-radius: 999px; font-weight: 550; font-size: 0.98rem;
  transition: color 0.2s, background 0.2s;
}
.site-nav a:hover { color: var(--text); background: var(--surface-strong); text-decoration: none; }
.site-nav a[aria-current="page"] { color: var(--text); background: var(--surface-strong); box-shadow: inset 0 0 0 1px var(--line); }
.nav-toggle { display: none; background: none; border: 1px solid var(--line); border-radius: 10px; width: 44px; height: 40px; cursor: pointer; padding: 0; }
.nav-toggle span { display: block; width: 20px; height: 2px; background: var(--text); margin: 4px auto; transition: transform 0.25s, opacity 0.25s; }
body.nav-open .nav-toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.nav-open .nav-toggle span:nth-child(2) { opacity: 0; }
body.nav-open .nav-toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

@media (max-width: 820px) {
  .brand-logo { height: 38px; }
  .nav-toggle { display: block; }
  .site-nav {
    position: absolute; top: 100%; left: 0; right: 0; flex-direction: column; gap: 0; padding: 8px 16px 16px;
    background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
    border-bottom: 1px solid var(--line);
    display: none;
  }
  body.nav-open .site-nav { display: flex; }
  .site-nav a { padding: 14px 12px; border-radius: 10px; }
  .brand-sub { display: none; }
}

/* ---------- Footer ---------- */
.site-footer {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 45; height: var(--footer-h);
  display: flex; align-items: center; color: var(--muted); font-size: 0.88rem;
  background: var(--header-bg); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
}
.site-footer .wrap { display: flex; flex-wrap: nowrap; align-items: center; justify-content: space-between; gap: 12px 24px; }
.site-footer .links { display: flex; align-items: center; gap: 16px; flex: none; }
.site-footer img { height: 22px; width: auto; background: #fff; border-radius: 5px; padding: 2px; vertical-align: middle; }
@media (max-width: 560px) { .hide-s { display: none; } .site-footer .links { gap: 12px; } }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 0.5em; padding: 0.8em 1.5em; border-radius: 999px;
  border: 1px solid var(--line-strong); color: var(--text); background: var(--surface);
  font-weight: 650; font-size: 1rem; cursor: pointer; margin: 0 8px 10px 0;
  transition: transform 0.2s, box-shadow 0.2s, background 0.2s;
}
.btn:hover { transform: translateY(-2px); text-decoration: none; box-shadow: var(--glow); background: var(--surface-strong); }
.btn-primary { background: linear-gradient(90deg, var(--accent), var(--accent2)); color: var(--on-accent); border-color: transparent; }
.btn-primary:hover { background: linear-gradient(90deg, var(--accent), var(--accent2)); filter: brightness(1.08); }

/* ---------- Content-Seiten (Bootstrap-kompatible Klassen) ---------- */
.container { max-width: 1120px; margin: 0 auto; padding: 128px 24px 72px; }
.page-header { border: 0; margin: 0 0 1.2em; }
.page-header h1 small { display: block; font-size: 0.45em; font-weight: 500; margin-top: 0.6em; }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 24px; }
.col-md-3 { grid-column: span 3; } .col-md-4 { grid-column: span 4; } .col-md-6 { grid-column: span 6; } .col-md-12 { grid-column: span 12; }
@media (max-width: 820px) { .row > * { grid-column: span 12 !important; } }
.table { width: 100%; border-collapse: collapse; }
.table td, .table th { padding: 10px 12px; border-top: 1px solid var(--line); vertical-align: top; text-align: left; }
.table-responsive { overflow-x: auto; }
.embed-responsive { position: relative; display: block; width: 100%; overflow: hidden; border-radius: 16px; border: 1px solid var(--line); background: #000; }
.embed-responsive::before { content: ""; display: block; padding-top: 56.25%; }
.embed-responsive-item, .embed-responsive video { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }
.hero-video { margin: 30px auto 10px; max-width: 900px; box-shadow: 0 20px 60px rgba(0, 0, 0, 0.35); }
.film h2 { max-width: 900px; margin: 56px auto 0; font-size: clamp(1.3rem, 2.4vw, 1.9rem); }
.film .hero-video { margin-top: 18px; }
.legal h2 { margin: 1.8em 0 0.5em; font-size: clamp(1.2rem, 2vw, 1.5rem); }

/* Akkordeon (panel/collapse) */
.panel-group { margin: 0; }
.panel { border: 1px solid var(--line); border-radius: 14px; background: var(--surface); margin: 0 0 12px; overflow: hidden; transition: border-color 0.2s, background 0.2s; }
.panel:hover { border-color: var(--line-strong); }
.panel-heading { padding: 0; }
.panel-title { margin: 0; font-size: 1.1rem; }
.panel-title a { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 16px 20px; color: var(--text); font-weight: 650; }
.panel-title a:hover { text-decoration: none; }
.panel-title a::after { content: "+"; font-size: 1.5rem; line-height: 1; color: var(--accent); transition: transform 0.25s; flex: none; }
.panel-title a[aria-expanded="true"]::after { content: "\2013"; }
.panel-collapse.collapse { display: none; }
.panel-collapse.collapse.in { display: block; animation: fade-in 0.35s ease; }
.panel-body { padding: 2px 20px 18px; color: var(--muted); }
.panel-body p { margin: 0 0 0.8em; }
.panel-body u { text-decoration: none; color: var(--text); font-weight: 600; }
@keyframes fade-in { from { opacity: 0; transform: translateY(-6px); } to { opacity: 1; transform: none; } }

/* Karussell (empfehlungen) */
.carousel { position: relative; overflow: hidden; border-radius: 18px; border: 1px solid var(--line); background: var(--surface); min-height: 380px; }
.carousel-inner { position: relative; min-height: 380px; }
.carousel .item { position: absolute; inset: 0; opacity: 0; transition: opacity 0.9s ease; pointer-events: none; }
.carousel .item.active { position: relative; opacity: 1; pointer-events: auto; }
.carousel .item img { display: block; }
.carousel-caption { position: absolute; left: 6%; right: 6%; top: 2rem; }
.carousel-caption-text { text-align: left; }
.carousel-caption-text h1, .carousel-caption-text h2 { font-size: clamp(1.4rem, 3vw, 2.2rem); }
.carousel-caption-text h3, .carousel-caption-text ul li { font-size: 1.1rem; color: var(--accent); }
.carousel-caption-text p { font-style: italic; color: var(--accent2); }
.carousel-indicators { position: absolute; bottom: 14px; left: 0; right: 0; display: flex; justify-content: center; gap: 8px; list-style: none; padding: 0; margin: 0; }
.carousel-indicators li { width: 10px; height: 10px; border-radius: 50%; background: var(--line-strong); cursor: pointer; }
.carousel-indicators li.active { background: var(--accent); }
.carousel-control { position: absolute; top: 0; bottom: 0; width: 3rem; display: flex; align-items: center; justify-content: center; color: var(--text); font-size: 2rem; }
.carousel-control.left { left: 0; } .carousel-control.right { right: 0; }
.carousel-control .glyphicon { display: none; }
.carousel-control.left::before { content: "\2039"; } .carousel-control.right::before { content: "\203A"; }
.carousel-control:hover { text-decoration: none; background: var(--surface-strong); }

/* ---------- Startseite ---------- */
.screen {
  position: relative; min-height: calc(100vh - var(--footer-h)); min-height: calc(100svh - var(--footer-h)); scroll-snap-align: start;
  display: flex; align-items: center; padding: 104px 0 72px; overflow: hidden;
  border-bottom: 1px solid var(--line);
}
.screen > .wrap { position: relative; z-index: 2; }
.screen:nth-of-type(even) { background: linear-gradient(180deg, var(--bg2), var(--bg)); }
.layer { position: absolute; inset: 0; pointer-events: none; z-index: 0; }
[data-parallax] { transform: translate3d(0, var(--py, 0px), 0); will-change: transform; }
.blob { position: absolute; border-radius: 50%; filter: blur(70px); opacity: 0.45; }
.blob.b1 { width: 46vw; height: 46vw; left: -12vw; top: -14vw; background: radial-gradient(circle, var(--accent), transparent 68%); }
.blob.b2 { width: 40vw; height: 40vw; right: -10vw; bottom: -12vw; background: radial-gradient(circle, var(--accent2), transparent 68%); opacity: 0.32; }
.grid-bg {
  position: absolute; inset: -20% 0; opacity: 0.5;
  background-image: linear-gradient(var(--line) 1px, transparent 1px), linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 64px 64px;
  -webkit-mask-image: radial-gradient(ellipse at 60% 40%, #000 10%, transparent 70%);
  mask-image: radial-gradient(ellipse at 60% 40%, #000 10%, transparent 70%);
}
.bignum {
  position: absolute; right: 4vw; top: 8vh; font-size: clamp(8rem, 24vw, 22rem); font-weight: 900; line-height: 1;
  color: transparent; -webkit-text-stroke: 2px var(--line); letter-spacing: -0.04em; user-select: none; z-index: 1;
}

.hero .graph { z-index: 1; display: flex; align-items: center; justify-content: flex-end; }
.hero .graph svg { width: min(54vw, 860px); height: auto; overflow: visible; margin-right: 1vw; opacity: 0.95; }
.hero-copy h1 { font-size: clamp(2rem, 3.5vw, 3.3rem); max-width: 560px; text-wrap: balance; }
.hero-copy .lead, .hero-copy p { max-width: 560px; }
.hero-copy .lead { margin-bottom: 1.6em; }
.graph-caption {
  position: absolute; left: 24px; bottom: 28px; z-index: 3; margin: 0; font-size: 0.9rem; color: var(--muted);
  padding-left: 14px; border-left: 2px solid var(--accent); min-height: 1.4em; transition: opacity 0.4s;
}
.scroll-hint {
  position: absolute; right: 28px; bottom: 24px; z-index: 3; width: 44px; height: 44px; border-radius: 50%;
  border: 1px solid var(--line-strong); display: grid; place-items: center; color: var(--text); animation: bob 2.2s ease-in-out infinite;
}
.scroll-hint:hover { text-decoration: none; background: var(--surface-strong); }
@keyframes bob { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(7px); } }

/* Graph (SVG) */
.edge { stroke: var(--line-strong); stroke-width: 1.6; fill: none; transition: stroke 0.35s, stroke-width 0.35s, filter 0.35s; }
.edge.hit { stroke: var(--warn); stroke-width: 3; filter: drop-shadow(0 0 6px var(--warn)); }
.node circle { fill: var(--bg2); stroke: var(--accent); stroke-width: 2.2; transition: fill 0.35s, stroke 0.35s, r 0.35s, filter 0.35s; }
.node[data-type="req"] circle, .node[data-type="dec"] circle { stroke: var(--accent2); }
.node[data-type="test"] circle, .node[data-type="gate"] circle, .node[data-type="doc"] circle { stroke: var(--muted); }
.node text { fill: var(--muted); font-size: 17px; font-weight: 550; text-anchor: middle; transition: fill 0.35s; }
.node.hit circle { stroke: var(--warn); fill: var(--warn); r: 12px; filter: drop-shadow(0 0 10px var(--warn)); }
.node.hit text { fill: var(--text); }

/* Aussage-/Ansatz-/Angebots-/Herleitungs-Abschnitte */
.statement h2 { max-width: 18ch; }
.statement p { max-width: 58ch; color: var(--muted); font-size: 1.15rem; }
.statement p.strong { color: var(--text); font-weight: 650; }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; margin: 1.6em 0; }
.card {
  position: relative; padding: 26px 24px; border: 1px solid var(--line); border-radius: 18px; background: var(--surface);
  -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); transition: transform 0.3s, border-color 0.3s, box-shadow 0.3s;
}
.card:hover { transform: translateY(-6px); border-color: var(--accent); box-shadow: var(--glow); }
.card .step { color: var(--accent); font-weight: 800; font-size: 0.9rem; letter-spacing: 0.14em; }
.card h3 { margin: 0.3em 0 0.5em; font-size: 1.4rem; }
.card p { color: var(--muted); margin: 0; }
.card .badge { display: inline-block; margin-bottom: 0.8em; padding: 2px 12px; border: 1px solid var(--line-strong); border-radius: 999px; font-size: 0.82rem; color: var(--accent2); font-weight: 650; }
@media (max-width: 900px) { .cards { grid-template-columns: 1fr; } .screen { padding-top: 96px; } }
@media (max-width: 1100px) {
  .hero .graph svg { width: 130vw; margin-right: -12vw; opacity: 0.3; }
  .hero-copy h1, .hero-copy .lead, .hero-copy p { max-width: none; }
  .hero-copy h1 { font-size: clamp(2rem, 7vw, 3.2rem); }
}

.cycle { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 1em 0 0.4em; counter-reset: c; }
.cycle li {
  counter-increment: c; padding: 7px 14px; border: 1px solid var(--line); border-radius: 999px; font-size: 0.92rem; color: var(--muted);
  animation: pulse 8.4s infinite; animation-delay: calc(var(--i) * 1.2s);
}
.cycle li::before { content: counter(c); color: var(--accent); font-weight: 800; margin-right: 8px; }
@keyframes pulse { 0%, 12%, 100% { color: var(--muted); border-color: var(--line); box-shadow: none; } 5% { color: var(--text); border-color: var(--accent); box-shadow: var(--glow); } }
.zange h3 { margin-top: 1.2em; }
.zange p { color: var(--muted); max-width: 70ch; }

.timeline { list-style: none; margin: 1.4em 0 0; padding: 0 0 0 28px; position: relative; max-width: 900px; }
.timeline::before { content: ""; position: absolute; left: 6px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--accent), var(--accent2)); transform-origin: top; transform: scaleY(0); transition: transform 1.6s ease; }
.timeline.in::before { transform: scaleY(1); }
.timeline li { position: relative; display: grid; grid-template-columns: 9.5em 1fr; gap: 6px 20px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li::before { content: ""; position: absolute; left: -28px; top: 20px; width: 14px; height: 14px; border-radius: 50%; background: var(--bg); border: 2px solid var(--accent); }
.timeline .when { font-weight: 800; color: var(--accent); white-space: nowrap; }
.timeline .what { color: var(--muted); }
.timeline .what strong { color: var(--text); }
@media (max-width: 640px) { .timeline li { grid-template-columns: 1fr; } }

.contact { text-align: center; }
.contact h2 { margin-left: auto; margin-right: auto; max-width: 16ch; }
.contact p { color: var(--muted); margin-left: auto; margin-right: auto; max-width: 52ch; }
.contact .meta { font-size: 0.95rem; margin-top: 1.4em; }

/* Reveal */
.js .reveal { opacity: 0; transform: translateY(26px); transition: opacity 0.9s ease, transform 0.9s ease; transition-delay: var(--d, 0s); }
.js .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { animation: none !important; transition: none !important; }
  .js .reveal { opacity: 1; transform: none; }
  [data-parallax] { transform: none; }
  .timeline::before { transform: none; }
}

/* Feinschliff */
.timeline { margin-bottom: 32px; }
.statement h2 { max-width: 22ch; }

/* Porträt (about) */
.portrait { display: block; width: 100%; max-width: 360px; height: auto; margin: 0 auto; border-radius: 14px; border: 1px solid var(--line); box-shadow: 0 10px 40px rgba(0, 0, 0, 0.3); }

.container .container { padding: 0; max-width: none; margin: 0; }
