/* ============================================================
   Xyvera / Aivi — White-Box Research Lab
   Design: dark tech-alien, cyan cyber accents
   ============================================================ */

:root {
  --bg:            #05080d;
  --bg-2:          #080d15;
  --bg-panel:      #0b121d;
  --bg-panel-2:    #0e1622;
  --line:          #14202e;
  --line-glow:     #1c3242;

  --text:          #c6d4e1;
  --text-dim:      #7d8fa1;
  --text-faint:    #4a5a6a;
  --heading:       #eaf4ff;

  --cyan:          #22e0e6;
  --cyan-soft:     #5ff0f4;
  --cyan-deep:     #0aa7ad;
  --cyan-glow:     rgba(34, 224, 230, 0.55);
  --violet:        #7a5cff;

  --maxw:          1120px;
  --radius:        14px;
  --ease:          cubic-bezier(0.22, 1, 0.36, 1);

  --font-sans:     "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-mono:     "JetBrains Mono", "SF Mono", ui-monospace, Menlo, Consolas, monospace;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

html { scroll-behavior: smooth; }

body {
  font-family: var(--font-sans);
  background: var(--bg);
  color: var(--text);
  line-height: 1.7;
  font-size: 17px;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  position: relative;
}

/* --- Ambient background: grid + synaptic glow --- */
body::before {
  content: "";
  position: fixed;
  inset: 0;
  background-image:
    linear-gradient(var(--line) 1px, transparent 1px),
    linear-gradient(90deg, var(--line) 1px, transparent 1px);
  background-size: 46px 46px;
  opacity: 0.35;
  mask-image: radial-gradient(circle at 50% 0%, #000 0%, transparent 75%);
  z-index: -2;
  pointer-events: none;
}
body::after {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(600px 400px at 15% -5%, rgba(34,224,230,0.12), transparent 60%),
    radial-gradient(700px 500px at 90% 10%, rgba(122,92,255,0.10), transparent 65%);
  z-index: -1;
  pointer-events: none;
}

/* --- Layout helpers --- */
.wrap { width: 100%; max-width: var(--maxw); margin: 0 auto; padding: 0 26px; }

section { padding: 92px 0; position: relative; }
section.tight { padding: 64px 0; }

a { color: var(--cyan); text-decoration: none; transition: color .2s var(--ease); }
a:hover { color: var(--cyan-soft); }

/* --- Typography --- */
h1, h2, h3 { color: var(--heading); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
h1 { font-size: clamp(2.4rem, 6vw, 4.3rem); }
h2 { font-size: clamp(1.7rem, 3.6vw, 2.6rem); margin-bottom: 22px; }
h3 { font-size: 1.22rem; margin-bottom: 10px; }
p  { margin-bottom: 16px; max-width: 68ch; }
.lead { font-size: 1.18rem; color: var(--text); }

.eyebrow {
  font-family: var(--font-mono);
  font-size: 0.74rem;
  letter-spacing: 0.32em;
  text-transform: uppercase;
  color: var(--cyan);
  display: inline-flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 20px;
}
.eyebrow::before {
  content: "";
  width: 26px; height: 1px;
  background: linear-gradient(90deg, var(--cyan), transparent);
}

.mono { font-family: var(--font-mono); }
.dim  { color: var(--text-dim); }

/* ============================================================
   NAVIGATION
   ============================================================ */
header.nav {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(5, 8, 13, 0.72);
  backdrop-filter: blur(14px) saturate(140%);
  border-bottom: 1px solid var(--line);
}
.nav-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 82px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 12px;
  font-weight: 600;
  font-size: 1.15rem;
  color: var(--heading);
  letter-spacing: 0.01em;
}
.brand:hover { color: var(--heading); }
.brand img.logo { height: 52px; width: auto; display: block; filter: drop-shadow(0 0 12px rgba(34,224,230,0.4)) brightness(1.15) contrast(1.08); }
.foot-brand .mark img { display: block; filter: drop-shadow(0 0 8px var(--cyan-glow)); }
.brand .mark {
  width: 30px; height: 30px;
  display: grid;
  place-items: center;
  color: var(--cyan);
  filter: drop-shadow(0 0 6px var(--cyan-glow));
}
.brand small {
  font-family: var(--font-mono);
  font-size: 0.6rem;
  letter-spacing: 0.28em;
  color: var(--text-faint);
  text-transform: uppercase;
  display: block;
  margin-top: 1px;
}

.nav-links { display: flex; align-items: center; gap: 6px; list-style: none; }
.nav-links a {
  color: var(--text-dim);
  font-size: 0.95rem;
  padding: 9px 15px;
  border-radius: 8px;
  position: relative;
  transition: color .2s var(--ease), background .2s var(--ease);
}
.nav-links a:hover { color: var(--heading); background: rgba(34,224,230,0.06); }
.nav-links a.active { color: var(--cyan); }
.nav-links a.active::after {
  content: "";
  position: absolute;
  left: 15px; right: 15px; bottom: 2px;
  height: 1px;
  background: var(--cyan);
  box-shadow: 0 0 8px var(--cyan-glow);
}

.nav-toggle {
  display: none;
  background: none;
  border: 1px solid var(--line-glow);
  border-radius: 8px;
  color: var(--text);
  width: 42px; height: 38px;
  cursor: pointer;
  align-items: center;
  justify-content: center;
}

/* ============================================================
   BUTTONS
   ============================================================ */
.btn {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  font-size: 0.96rem;
  font-weight: 500;
  padding: 13px 24px;
  border-radius: 10px;
  border: 1px solid transparent;
  cursor: pointer;
  transition: all .22s var(--ease);
  font-family: var(--font-sans);
}
.btn-primary {
  background: linear-gradient(135deg, var(--cyan), var(--cyan-deep));
  color: #02121a;
  font-weight: 600;
  box-shadow: 0 0 0 1px rgba(34,224,230,0.4), 0 8px 30px -8px var(--cyan-glow);
}
.btn-primary:hover {
  color: #02121a;
  transform: translateY(-2px);
  box-shadow: 0 0 0 1px var(--cyan-soft), 0 12px 40px -8px var(--cyan-glow);
}
.btn-ghost {
  background: rgba(255,255,255,0.02);
  border-color: var(--line-glow);
  color: var(--text);
}
.btn-ghost:hover { border-color: var(--cyan); color: var(--cyan-soft); background: rgba(34,224,230,0.05); }

/* ============================================================
   HERO
   ============================================================ */
.hero { padding: 120px 0 96px; position: relative; overflow: hidden; }
.hero-grid {
  display: grid;
  grid-template-columns: 1.15fr 0.85fr;
  gap: 56px;
  align-items: center;
}
.hero h1 { margin-bottom: 24px; }
.hero h1 .accent {
  background: linear-gradient(120deg, var(--cyan-soft), var(--cyan) 40%, var(--violet));
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.hero .sub {
  font-size: 1.22rem;
  color: var(--text-dim);
  max-width: 54ch;
  margin-bottom: 34px;
}
.hero .sub strong { color: var(--text); font-weight: 500; }
.hero-cta { display: flex; gap: 14px; flex-wrap: wrap; }

/* Synaptic visual */
.hero-visual { position: relative; aspect-ratio: 1; }
.hero-visual svg { width: 100%; height: 100%; overflow: visible; }
.node-dot { fill: var(--cyan); }
.node-pulse { fill: var(--cyan); opacity: 0.0; }
.edge { stroke: var(--line-glow); stroke-width: 1; }
.edge.live { stroke: var(--cyan); }

/* ============================================================
   NOTICE / build banner
   ============================================================ */
.notice {
  border: 1px solid var(--line-glow);
  border-left: 2px solid var(--cyan);
  background: linear-gradient(90deg, rgba(34,224,230,0.05), transparent 60%);
  border-radius: 12px;
  padding: 22px 26px;
  display: flex;
  gap: 18px;
  align-items: flex-start;
}
.notice .ico { color: var(--cyan); flex-shrink: 0; margin-top: 2px; filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.notice p { margin: 0; color: var(--text-dim); }
.notice p strong { color: var(--text); }

/* ============================================================
   CARDS / GRID
   ============================================================ */
.grid-3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 22px; }
.grid-2 { display: grid; grid-template-columns: repeat(2, 1fr); gap: 22px; }

.card {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 30px 28px;
  position: relative;
  transition: border-color .25s var(--ease), transform .25s var(--ease);
  overflow: hidden;
}
.card::before {
  content: "";
  position: absolute; inset: 0 auto auto 0;
  width: 100%; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0; transition: opacity .3s var(--ease);
}
.card:hover { border-color: var(--line-glow); transform: translateY(-3px); }
.card:hover::before { opacity: 0.6; }
.card .num {
  font-family: var(--font-mono);
  font-size: 0.72rem;
  color: var(--cyan-deep);
  letter-spacing: 0.2em;
  margin-bottom: 14px;
}
.card .ico { color: var(--cyan); margin-bottom: 16px; display: block; filter: drop-shadow(0 0 5px var(--cyan-glow)); }
.card h3 { color: var(--heading); }
.card p { color: var(--text-dim); font-size: 0.98rem; margin: 0; }

/* Split content section */
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 60px; align-items: start; }
.split.narrow { grid-template-columns: 0.9fr 1.1fr; }

/* Quote / statement block */
.statement {
  border-left: 2px solid var(--cyan);
  padding: 6px 0 6px 28px;
  font-size: 1.32rem;
  line-height: 1.5;
  color: var(--heading);
  font-weight: 300;
  max-width: 70ch;
}
.statement em { color: var(--cyan-soft); font-style: normal; }

/* Terminal / triple demo */
.terminal {
  background: #060a11;
  border: 1px solid var(--line-glow);
  border-radius: 12px;
  font-family: var(--font-mono);
  font-size: 0.86rem;
  overflow: hidden;
  box-shadow: 0 24px 60px -30px rgba(0,0,0,0.9);
}
.terminal .bar {
  display: flex; align-items: center; gap: 8px;
  padding: 12px 16px;
  border-bottom: 1px solid var(--line);
  background: var(--bg-panel);
}

/* Screenshot figure */
.shot {
  border: 1px solid var(--line-glow);
  border-radius: 14px;
  overflow: hidden;
  background: var(--bg-panel);
  box-shadow: 0 34px 80px -44px rgba(0,0,0,0.95);
  position: relative;
  margin: 0;
}
.shot::before {
  content: "";
  position: absolute; top: 0; left: 0; right: 0; height: 1px;
  background: linear-gradient(90deg, transparent, var(--cyan), transparent);
  opacity: 0.5; z-index: 2;
}
.shot img { display: block; width: 100%; height: auto; }
.shot figcaption {
  padding: 14px 22px;
  font-family: var(--font-mono);
  font-size: 0.82rem;
  letter-spacing: 0.02em;
  color: var(--text-dim);
  border-top: 1px solid var(--line);
  display: flex; gap: 10px; align-items: baseline;
}
.shot figcaption b { color: var(--cyan); font-weight: 500; }
.shot figcaption .tag {
  font-size: 0.66rem; letter-spacing: 0.18em; text-transform: uppercase;
  color: var(--cyan-deep); flex-shrink: 0;
}
.terminal .bar span { width: 11px; height: 11px; border-radius: 50%; background: var(--line-glow); }
.terminal .bar span:first-child { background: #2b4a52; }
.terminal .bar .title { width: auto; height: auto; border-radius: 0; background: none; margin-left: 8px; color: var(--text-faint); font-size: 0.75rem; letter-spacing: 0.1em; }
.terminal .body { padding: 20px 22px; line-height: 1.9; color: var(--text-dim); }
.terminal .cmt { color: var(--text-faint); }
.terminal .s { color: var(--cyan-soft); }
.terminal .p { color: var(--violet); }
.terminal .o { color: var(--text); }
.terminal .arrow { color: var(--cyan); }

/* Definition list rows */
.rows { border-top: 1px solid var(--line); margin-top: 8px; }
.rows .row {
  display: grid;
  grid-template-columns: 200px 1fr;
  gap: 30px;
  padding: 26px 0;
  border-bottom: 1px solid var(--line);
}
.rows .row h3 { margin: 0; font-size: 1.12rem; color: var(--cyan-soft); }
.rows .row .k { display: flex; flex-direction: column; gap: 6px; }
.rows .row .k::before { content: ""; width: 28px; height: 1px; background: linear-gradient(90deg, var(--cyan), transparent); margin-bottom: 10px; box-shadow: 0 0 6px var(--cyan-glow); }
.rows .row .k .tag { display: none; }
.rows .row p { margin: 0; color: var(--text-dim); }

/* Section header block */
.sec-head { max-width: 62ch; margin-bottom: 48px; }
.sec-head p { color: var(--text-dim); font-size: 1.08rem; }

/* Page hero (subpages) */
.page-hero { padding: 88px 0 40px; border-bottom: 1px solid var(--line); position: relative; }
.page-hero h1 { font-size: clamp(2rem, 4.5vw, 3.2rem); margin-bottom: 18px; }
.page-hero .lead { color: var(--text-dim); }
.crumbs { font-family: var(--font-mono); font-size: 0.76rem; letter-spacing: 0.12em; color: var(--text-faint); margin-bottom: 22px; text-transform: uppercase; }
.crumbs a { color: var(--text-faint); }
.crumbs a:hover { color: var(--cyan); }

/* Prose blocks */
.prose h2 { margin-top: 8px; }
.prose h3 { margin-top: 34px; color: var(--cyan-soft); }
.prose p { color: var(--text-dim); }
.prose .callout {
  background: var(--bg-panel);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 22px 26px;
  margin: 26px 0;
  color: var(--text);
}
.prose .callout .tag { font-family: var(--font-mono); font-size: 0.68rem; letter-spacing: 0.2em; color: var(--cyan); text-transform: uppercase; display: block; margin-bottom: 8px; }

/* Contact block */
.contact-card {
  background: linear-gradient(180deg, var(--bg-panel), var(--bg-panel-2));
  border: 1px solid var(--line-glow);
  border-radius: var(--radius);
  padding: 40px;
  text-align: center;
}
.contact-card .mail {
  font-family: var(--font-mono);
  font-size: clamp(1.1rem, 3vw, 1.6rem);
  color: var(--cyan);
  display: inline-block;
  margin: 14px 0 20px;
  padding: 10px 20px;
  border: 1px solid var(--line-glow);
  border-radius: 10px;
  background: rgba(34,224,230,0.04);
}
.contact-card .mail:hover { border-color: var(--cyan); box-shadow: 0 0 24px -6px var(--cyan-glow); }

/* CTA band */
.cta-band {
  border: 1px solid var(--line-glow);
  border-radius: 18px;
  background:
    radial-gradient(500px 300px at 80% 120%, rgba(34,224,230,0.10), transparent),
    linear-gradient(180deg, var(--bg-panel), var(--bg-2));
  padding: 60px;
  text-align: center;
}

/* ============================================================
   FOOTER
   ============================================================ */
footer.site {
  border-top: 1px solid var(--line);
  padding: 56px 0 40px;
  margin-top: 40px;
  background: linear-gradient(180deg, transparent, rgba(34,224,230,0.02));
}
.foot-grid { display: grid; grid-template-columns: 1.6fr 1fr 1fr; gap: 40px; margin-bottom: 44px; }
.foot-brand .mark { color: var(--cyan); margin-bottom: 14px; display: inline-block; filter: drop-shadow(0 0 6px var(--cyan-glow)); }
.foot-brand p { color: var(--text-dim); font-size: 0.95rem; max-width: 38ch; }
.foot-brand .tagline { font-family: var(--font-mono); font-size: 0.78rem; color: var(--text-faint); letter-spacing: 0.08em; margin-top: 8px; }
.foot-col h4 { font-size: 0.74rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-faint); margin-bottom: 16px; font-family: var(--font-mono); font-weight: 500; }
.foot-col ul { list-style: none; display: flex; flex-direction: column; gap: 10px; }
.foot-col a { color: var(--text-dim); font-size: 0.95rem; }
.foot-col a:hover { color: var(--cyan); }
.foot-bottom {
  display: flex; justify-content: space-between; align-items: center;
  padding-top: 26px; border-top: 1px solid var(--line);
  font-size: 0.86rem; color: var(--text-faint); flex-wrap: wrap; gap: 12px;
}
.foot-bottom a { color: var(--text-faint); }
.foot-bottom a:hover { color: var(--cyan); }
.foot-bottom .legal { display: flex; gap: 22px; }

/* ============================================================
   REVEAL ANIMATION
   ============================================================ */
/* Inhalte sind standardmäßig sichtbar. Die Animation greift nur, wenn das JS
   die Klasse "reveal-ready" setzt — so kann die Seite ohne/mit fehlerhaftem JS nie leer sein. */
html.reveal-ready .reveal { opacity: 0; transform: translateY(22px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
html.reveal-ready .reveal.in { opacity: 1; transform: none; }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; scroll-behavior: auto; }
  .reveal { opacity: 1; transform: none; }
}

/* ============================================================
   RESPONSIVE
   ============================================================ */
@media (max-width: 900px) {
  .hero-grid { grid-template-columns: 1fr; gap: 40px; }
  .hero-visual { max-width: 380px; margin: 0 auto; }
  .split, .split.narrow { grid-template-columns: 1fr; gap: 34px; }
  .grid-3 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr 1fr; }
  .foot-brand { grid-column: 1 / -1; }

  .nav-toggle { display: flex; }
  .nav-links {
    position: fixed;
    top: 82px; left: 0; right: 0;
    flex-direction: column;
    align-items: stretch;
    gap: 2px;
    background: rgba(6,10,17,0.97);
    backdrop-filter: blur(16px);
    border-bottom: 1px solid var(--line-glow);
    padding: 14px 20px 22px;
    transform: translateY(-140%);
    transition: transform .35s var(--ease);
    z-index: 40;
  }
  .nav-links.open { transform: translateY(0); }
  .nav-links a { padding: 13px 14px; font-size: 1rem; }
}

@media (max-width: 560px) {
  section { padding: 66px 0; }
  .grid-2 { grid-template-columns: 1fr; }
  .foot-grid { grid-template-columns: 1fr; }
  .cta-band, .contact-card { padding: 34px 24px; }
  .rows .row { grid-template-columns: 1fr; gap: 10px; }
  .brand small { display: none; }
}
