/* graph-infrastruktur — style.css */

:root {
  --bg:     #010308;
  --bg-2:   #030810;
  --bg-3:   #050e18;
  --blue:   #0088ff;
  --cyan:   #00ffaa;
  --blue-l: #4ae0ff;
  --text:   #4a7a9a;
  --hi:     #b0d8ff;
  --muted:  rgba(176,216,255,0.4);
  --mono:   'JetBrains Mono', 'Courier New', monospace;
  --serif:  'Cormorant Garamond', Georgia, serif;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { scroll-behavior: smooth; }

body {
  background: var(--bg);
  color: var(--text);
  font-family: var(--mono);
  font-size: 15px;
  line-height: 1.8;
}

/* ── ANIMATIONS ──────────── */

@keyframes blink { 0%,49%{opacity:1} 50%,100%{opacity:0} }

@keyframes pulse-node {
  0%   { r: 6; opacity: 0.7; }
  50%  { r: 9; opacity: 1; }
  100% { r: 6; opacity: 0.7; }
}

@keyframes traverse-dash {
  0%   { stroke-dashoffset: 200; }
  100% { stroke-dashoffset: 0; }
}

@keyframes fadein { from { opacity: 0; } to { opacity: 1; } }

@keyframes grid-scroll {
  0%   { transform: translateY(0); }
  100% { transform: translateY(40px); }
}

@keyframes float-node {
  0%,100% { transform: translateY(0px); }
  50%     { transform: translateY(-6px); }
}

@keyframes glow-pulse {
  0%,100% { filter: drop-shadow(0 0 4px rgba(0,136,255,0.5)); }
  50%     { filter: drop-shadow(0 0 12px rgba(0,136,255,0.9)); }
}

@keyframes scanline-blue {
  0%   { top: -2%; }
  100% { top: 102%; }
}

@keyframes node-appear {
  0%   { opacity: 0; transform: scale(0.5); }
  100% { opacity: 1; transform: scale(1); }
}

/* ── GRID BACKGROUND ──────────── */

.grid-bg {
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  overflow: hidden;
}
.grid-bg::before {
  content: '';
  position: absolute;
  inset: -40px;
  background-image:
    linear-gradient(rgba(0,136,255,0.03) 1px, transparent 1px),
    linear-gradient(90deg, rgba(0,136,255,0.03) 1px, transparent 1px);
  background-size: 40px 40px;
  animation: grid-scroll 8s linear infinite;
}

/* ── HERO ──────────── */

.hero {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 4rem 2rem;
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.scanline {
  position: absolute;
  left: 0; right: 0;
  height: 1px;
  background: linear-gradient(to right, transparent, rgba(0,136,255,0.2), transparent);
  animation: scanline-blue 5s linear infinite;
  pointer-events: none;
}

.hero-badge {
  border: 1px solid rgba(0,136,255,0.4);
  padding: 0.3rem 1rem;
  font-size: 0.62rem;
  letter-spacing: 0.3em;
  text-transform: uppercase;
  color: var(--blue);
  margin-bottom: 2rem;
  animation: fadein 0.6s ease forwards;
}

.graph-canvas {
  margin: 0 auto 2.5rem;
  display: block;
  animation: glow-pulse 3s ease-in-out infinite;
}

.hero-title {
  font-family: var(--mono);
  font-size: clamp(3rem, 10vw, 7rem);
  font-weight: 500;
  line-height: 0.95;
  letter-spacing: -0.04em;
  color: var(--blue);
  text-align: center;
  text-shadow: 0 0 60px rgba(0,136,255,0.4);
  margin-bottom: 1.5rem;
}

.hero-title .accent {
  color: var(--cyan);
}

.hero-def {
  font-family: var(--mono);
  font-size: 0.82rem;
  color: var(--text);
  max-width: 560px;
  text-align: center;
  line-height: 1.8;
}
.hero-def code {
  color: var(--cyan);
  font-size: 0.78rem;
}

/* ── SHARED LAYOUT ──────────── */

.s {
  padding: 5rem 2rem;
  border-top: 1px solid rgba(0,136,255,0.06);
  position: relative;
  z-index: 1;
}
.s-2 { background: var(--bg-2); }
.s-3 { background: var(--bg-3); }

.s-inner {
  max-width: 980px;
  margin: 0 auto;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4rem;
  align-items: start;
}
.s-full { max-width: 980px; margin: 0 auto; }

.sec-label {
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.6;
  margin-bottom: 1.2rem;
}

h2 {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 3.5vw, 2.6rem);
  font-weight: 500;
  line-height: 1.2;
  color: var(--hi);
  margin-bottom: 1.2rem;
}

h3 {
  font-family: var(--mono);
  font-size: 1rem;
  font-weight: 500;
  color: var(--hi);
  margin-bottom: 0.8rem;
}

p { margin-bottom: 1rem; font-size: 0.9rem; line-height: 1.85; }

ul { list-style: none; }
ul li {
  font-size: 0.88rem;
  padding: 0.25rem 0 0.25rem 1.2rem;
  position: relative;
  line-height: 1.5;
}
ul li::before {
  content: '>';
  position: absolute;
  left: 0;
  color: var(--blue);
  opacity: 0.6;
}

.pull {
  font-family: var(--serif);
  font-style: italic;
  font-size: 1.1rem;
  color: var(--cyan);
  border-left: 2px solid rgba(0,255,170,0.2);
  padding-left: 1.2rem;
  margin-top: 1.5rem;
  line-height: 1.55;
  opacity: 0.9;
}

/* ── CYPHER BOX ──────────── */

.cypher-box {
  background: rgba(0,0,0,0.5);
  border: 1px solid rgba(0,136,255,0.15);
  border-radius: 3px;
  padding: 1.4rem;
  font-family: var(--mono);
  font-size: 0.78rem;
  line-height: 1.9;
  margin-bottom: 1rem;
  position: relative;
  overflow: hidden;
}

.cypher-box::before {
  content: '';
  position: absolute;
  top: 0; left: 0; right: 0;
  height: 2px;
  background: linear-gradient(to right, var(--blue), var(--cyan), transparent);
}

.cy-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  color: var(--muted);
  margin-bottom: 0.6rem;
  opacity: 0.7;
}

.cy-kw   { color: var(--blue); }
.cy-node { color: var(--cyan); }
.cy-rel  { color: var(--blue-l); }
.cy-str  { color: rgba(176,216,255,0.55); }
.cy-cmt  { color: rgba(74,122,154,0.6); font-style: italic; }
.cy-num  { color: #ffcc44; }

/* ── SQL vs CYPHER COMPARE ──────────── */

.compare-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: rgba(0,136,255,0.08);
  border-radius: 3px;
  overflow: hidden;
  margin-top: 1.5rem;
}

.compare-col {
  background: var(--bg-2);
  padding: 1.5rem;
}

.compare-col-label {
  font-size: 0.6rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.compare-col.sql .compare-col-label { color: rgba(176,216,255,0.4); }
.compare-col.cypher .compare-col-label { color: var(--cyan); }

/* ── TIMELINE ──────────── */

.timeline {
  position: relative;
  padding-left: 2rem;
  margin-top: 1.5rem;
}

.timeline::before {
  content: '';
  position: absolute;
  left: 0;
  top: 0; bottom: 0;
  width: 1px;
  background: linear-gradient(to bottom, var(--blue), transparent);
}

.tl-item {
  position: relative;
  margin-bottom: 2rem;
}

.tl-item::before {
  content: '';
  position: absolute;
  left: -2.37rem;
  top: 0.4rem;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 8px rgba(0,136,255,0.8);
}

.tl-year {
  font-family: var(--mono);
  font-size: 0.68rem;
  color: var(--blue);
  letter-spacing: 0.1em;
  margin-bottom: 0.3rem;
}

.tl-project {
  font-size: 0.8rem;
  color: var(--hi);
  margin-bottom: 0.4rem;
}

.tl-code {
  font-family: var(--mono);
  font-size: 0.72rem;
  color: var(--text);
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,136,255,0.1);
  border-radius: 2px;
  padding: 0.6rem;
  line-height: 1.7;
  overflow-x: auto;
}

/* ── NODE DIAGRAM ──────────── */

.node-diagram {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
  margin-top: 1rem;
}

.node-row {
  display: flex;
  align-items: center;
  gap: 0.8rem;
  font-size: 0.82rem;
}

.node-pill {
  display: inline-flex;
  align-items: center;
  padding: 0.25rem 0.75rem;
  border-radius: 20px;
  font-family: var(--mono);
  font-size: 0.72rem;
  white-space: nowrap;
}

.node-pill.person  { background: rgba(0,136,255,0.15); border: 1px solid rgba(0,136,255,0.4); color: var(--blue-l); }
.node-pill.device  { background: rgba(0,255,170,0.1);  border: 1px solid rgba(0,255,170,0.35); color: var(--cyan); }
.node-pill.mission { background: rgba(74,224,255,0.1); border: 1px solid rgba(74,224,255,0.3); color: var(--blue-l); }
.node-pill.time    { background: rgba(176,216,255,0.08); border: 1px solid rgba(176,216,255,0.2); color: var(--hi); }
.node-pill.gang    { background: rgba(0,136,255,0.08); border: 1px solid rgba(0,136,255,0.25); color: var(--muted); }

.edge-label {
  font-size: 0.65rem;
  color: var(--muted);
  letter-spacing: 0.05em;
  opacity: 0.7;
}

.edge-arrow {
  color: var(--blue);
  opacity: 0.5;
}

/* ── ANTI-PATTERN CARDS ──────────── */

.ap-card {
  background: rgba(0,0,0,0.4);
  border: 1px solid rgba(0,136,255,0.1);
  border-radius: 3px;
  padding: 1.4rem;
  margin-bottom: 1rem;
}

.ap-card.warn {
  border-color: rgba(255,160,0,0.25);
  background: rgba(255,120,0,0.04);
}

.ap-card.good {
  border-color: rgba(0,255,170,0.2);
  background: rgba(0,255,170,0.04);
}

.ap-card-label {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.ap-card.warn .ap-card-label { color: rgba(255,160,0,0.8); }
.ap-card.good .ap-card-label { color: var(--cyan); }

/* ── DECISION MATRIX ──────────── */

.decision-matrix {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
  margin-top: 1rem;
}

.decision-matrix th {
  font-family: var(--mono);
  font-size: 0.62rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--blue);
  opacity: 0.7;
  padding: 0.6rem 0.8rem;
  border-bottom: 1px solid rgba(0,136,255,0.15);
  text-align: left;
  font-weight: 400;
}

.decision-matrix td {
  padding: 0.7rem 0.8rem;
  border-bottom: 1px solid rgba(0,136,255,0.06);
  vertical-align: top;
  line-height: 1.5;
}

.decision-matrix tr:last-child td { border-bottom: none; }
.decision-matrix tr:hover td { background: rgba(0,136,255,0.04); }

.td-yes { color: var(--cyan); font-weight: 500; }
.td-no  { color: rgba(255,160,0,0.7); }

/* ── KI-RELEVANZ CARDS ──────────── */

.ki-cards {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
  margin-top: 1.5rem;
}

.ki-card {
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,136,255,0.12);
  border-radius: 3px;
  padding: 1.2rem;
  transition: border-color 0.2s;
}

.ki-card:hover {
  border-color: rgba(0,136,255,0.3);
}

.ki-card-icon {
  font-size: 0.65rem;
  letter-spacing: 0.15em;
  color: var(--blue);
  opacity: 0.7;
  margin-bottom: 0.5rem;
}

.ki-card-title {
  font-family: var(--mono);
  font-size: 0.85rem;
  color: var(--hi);
  margin-bottom: 0.4rem;
}

.ki-card p {
  font-size: 0.8rem;
  margin-bottom: 0;
}

/* ── SPEC BOX ──────────── */

.spec-box {
  background: rgba(0,0,0,0.35);
  border: 1px solid rgba(0,136,255,0.12);
  border-radius: 3px;
  padding: 1.4rem;
  font-size: 0.82rem;
  line-height: 2;
}

.spec-row {
  display: flex;
  justify-content: space-between;
  border-bottom: 1px solid rgba(0,136,255,0.06);
  padding: 0.35rem 0;
  gap: 1rem;
}

.spec-row:last-child { border-bottom: none; }
.spec-key { color: var(--text); flex-shrink: 0; }
.spec-val { color: var(--hi); text-align: right; }
.spec-val.cyan { color: var(--cyan); }
.spec-val.blue { color: var(--blue-l); }

/* ── MCP SECTION ──────────── */

.mcp-flow {
  display: flex;
  flex-direction: column;
  gap: 0.5rem;
  margin-top: 1rem;
}

.mcp-step {
  display: flex;
  align-items: flex-start;
  gap: 1rem;
  font-size: 0.82rem;
  padding: 0.8rem 1rem;
  background: rgba(0,0,0,0.3);
  border: 1px solid rgba(0,136,255,0.08);
  border-radius: 2px;
}

.mcp-step-n {
  font-family: var(--mono);
  color: var(--blue);
  font-size: 0.7rem;
  flex-shrink: 0;
  margin-top: 0.05rem;
}

/* ── CLOSE ──────────── */

.s-close {
  min-height: 55vh;
  display: flex;
  align-items: center;
  justify-content: center;
  text-align: center;
  padding: 5rem 2rem;
  background: var(--bg);
  position: relative;
  overflow: hidden;
  z-index: 1;
}

.s-close::before {
  content: '';
  position: absolute;
  inset: 0;
  background: radial-gradient(ellipse at center, rgba(0,136,255,0.05) 0%, transparent 70%);
  pointer-events: none;
}

.close-inner { max-width: 620px; position: relative; z-index: 1; }

.close-text {
  font-family: var(--mono);
  font-size: clamp(1.6rem, 4vw, 3rem);
  font-weight: 500;
  line-height: 1.25;
  color: var(--hi);
  margin-bottom: 1.5rem;
}

.close-text .accent { color: var(--cyan); }

.close-sub {
  font-size: 0.88rem;
  opacity: 0.5;
  margin-bottom: 2rem;
  line-height: 1.8;
}

.close-meta {
  font-size: 0.62rem;
  letter-spacing: 0.2em;
  opacity: 0.18;
}

/* ── INLINE SVG WRAPPER ──────────── */

.inline-graph {
  width: 100%;
  display: block;
  margin: 1.5rem 0;
  border: 1px solid rgba(0,136,255,0.08);
  border-radius: 3px;
  overflow: hidden;
}

/* ── FOOTER ──────────── */

.site-footer {
  padding: 1.5rem 2rem;
  text-align: center;
  font-size: 0.7rem;
  border-top: 1px solid rgba(0,136,255,0.06);
  position: relative;
  z-index: 1;
}

.site-footer a { color: var(--blue); text-decoration: none; opacity: 0.35; }
.site-footer a:hover { opacity: 0.8; }

/* ── RESPONSIVE ──────────── */

@media (max-width: 780px) {
  .s-inner    { grid-template-columns: 1fr; gap: 2rem; }
  .compare-grid { grid-template-columns: 1fr; }
  .ki-cards   { grid-template-columns: 1fr; }
}
