/* Menzelwerk — Onepager */

:root {
  --bg-0: #060910;
  --bg-1: #0a0f1c;
  --surface: rgba(255, 255, 255, 0.035);
  --surface-strong: rgba(255, 255, 255, 0.06);
  --border: rgba(255, 255, 255, 0.09);
  --text: #eef2f8;
  --text-muted: #8b93a8;
  --text-dim: #545d72;

  --violet: #8b6bff;
  --violet-soft: #6d4fe0;
  --ember: #ff7a59;
  --teal: #35e0c8;
  --lilac: #c893ff;

  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;

  --center-size: clamp(200px, 27vw, 296px);
  --sat-size: clamp(118px, 15vw, 164px);
}

* { box-sizing: border-box; }

html, body {
  height: 100%;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg-0);
  color: var(--text);
  font-family: var(--font);
  display: flex;
  flex-direction: column;
  overflow-x: hidden;
  position: relative;
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  background:
    radial-gradient(ellipse 60% 50% at 50% 38%, rgba(139, 107, 255, 0.16), transparent 60%),
    radial-gradient(ellipse 45% 40% at 18% 78%, rgba(53, 224, 200, 0.08), transparent 60%),
    radial-gradient(ellipse 45% 40% at 82% 78%, rgba(200, 147, 255, 0.08), transparent 60%),
    var(--bg-0);
  z-index: -2;
}

#field {
  position: fixed;
  inset: 0;
  z-index: -1;
  width: 100%;
  height: 100%;
  opacity: 0.55;
}

/* ---------- Network ---------- */

.network {
  position: relative;
  width: min(88vw, 780px);
  aspect-ratio: 1 / 1;
  margin: clamp(28px, 6vh, 64px) auto clamp(16px, 4vh, 32px);
  flex: 0 1 auto;
}

.links {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  overflow: visible;
}

.bolt-path {
  fill: none;
  stroke-width: 0.55;
  stroke-linecap: round;
  stroke-linejoin: round;
  filter: url(#glow);
  opacity: 0.75;
  transition: opacity 0.18s ease-out;
}

.bolt-spark {
  fill: #f4f2ff;
  filter: url(#glow);
  opacity: 0.9;
}

.node {
  position: absolute;
  left: calc(var(--x) * 1%);
  top: calc(var(--y) * 1%);
  transform: translate(-50%, -50%);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  text-align: center;
  gap: 6px;
  text-decoration: none;
  color: var(--text);
  border-radius: 50%;
  background: linear-gradient(160deg, var(--surface-strong), var(--surface));
  border: 1px solid var(--border);
  backdrop-filter: blur(6px);
  transition: transform 0.35s cubic-bezier(.2, .8, .2, 1), box-shadow 0.35s ease, border-color 0.35s ease;
}

.node--center {
  width: var(--center-size);
  height: var(--center-size);
  z-index: 3;
  gap: 4px;
  padding: 12px;
  box-shadow: 0 0 60px -12px rgba(139, 107, 255, 0.55), inset 0 0 40px rgba(139, 107, 255, 0.08);
  animation: float-center 11s ease-in-out infinite;
}

.node__logo {
  width: clamp(60px, 10.4vw, 84px);
  height: auto;
  opacity: 0.92;
  filter: drop-shadow(0 0 10px rgba(139, 107, 255, 0.55));
}

@keyframes float-center {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  22%  { transform: translate(-50%, -50%) translate(5px, -8px) scale(1.02); }
  48%  { transform: translate(-50%, -50%) translate(-4px, -13px) scale(1.03); }
  74%  { transform: translate(-50%, -50%) translate(-7px, -2px) scale(1.012); }
  100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
}

.node__ring {
  position: absolute;
  inset: -1px;
  border-radius: 50%;
  border: 1px solid rgba(139, 107, 255, 0.35);
  animation: ring-pulse 3.4s ease-out infinite;
  pointer-events: none;
}

@keyframes ring-pulse {
  0%   { transform: scale(0.94); opacity: 0.6; }
  70%  { transform: scale(1.16); opacity: 0; }
  100% { transform: scale(1.16); opacity: 0; }
}

.node--satellite {
  width: var(--sat-size);
  height: var(--sat-size);
  z-index: 2;
  padding: 14px;
  cursor: pointer;
}

.node--satellite:nth-of-type(1) { animation: float-a 8.5s ease-in-out infinite; animation-delay: 0.4s; }
.node--satellite:nth-of-type(2) { animation: float-b 9.5s ease-in-out infinite; animation-delay: 1.1s; }
.node--satellite:nth-of-type(3) { animation: float-c 7.8s ease-in-out infinite; animation-delay: 1.8s; }

@keyframes float-a {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  30%  { transform: translate(-50%, -50%) translate(-9px, 6px) scale(1.02); }
  62%  { transform: translate(-50%, -50%) translate(7px, 11px) scale(0.985); }
  100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
}

@keyframes float-b {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  35%  { transform: translate(-50%, -50%) translate(8px, -9px) scale(1.015); }
  68%  { transform: translate(-50%, -50%) translate(-6px, 7px) scale(0.99); }
  100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
}

@keyframes float-c {
  0%   { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
  28%  { transform: translate(-50%, -50%) translate(-7px, -10px) scale(1.02); }
  64%  { transform: translate(-50%, -50%) translate(9px, 4px) scale(0.99); }
  100% { transform: translate(-50%, -50%) translate(0, 0) scale(1); }
}

.node--ember { box-shadow: 0 0 34px -10px rgba(255, 122, 89, 0.35); }
.node--teal  { box-shadow: 0 0 34px -10px rgba(53, 224, 200, 0.35); }
.node--lilac { box-shadow: 0 0 34px -10px rgba(200, 147, 255, 0.35); }

.node--ember .node__icon { color: var(--ember); }
.node--teal  .node__icon { color: var(--teal); }
.node--lilac .node__icon { color: var(--lilac); }

.node__icon {
  width: 26px;
  height: 26px;
  display: grid;
  place-items: center;
}
.node__icon svg { width: 100%; height: 100%; }

.node__name {
  display: block;
  font-size: clamp(11px, 1.1vw, 13.5px);
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--text);
}

.node--center .node__name {
  font-size: clamp(19px, 2.4vw, 26px);
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.node__tag {
  display: block;
  font-size: clamp(9.5px, 0.9vw, 11px);
  color: var(--text-muted);
  line-height: 1.35;
  max-width: 92%;
  margin: 0 auto;
}

.node--center .node__tag {
  font-size: clamp(9.5px, 0.85vw, 11px);
  margin-top: 2px;
  max-width: 84%;
  line-height: 1.4;
}

.node--satellite:hover,
.node--satellite:focus-visible {
  animation-play-state: paused;
  transform: translate(-50%, -50%) scale(1.08);
  border-color: rgba(255, 255, 255, 0.22);
}

.node--satellite:hover .node__name,
.node--satellite:focus-visible .node__name {
  color: #fff;
}

.node--ember:hover, .node--ember:focus-visible { box-shadow: 0 0 50px -6px rgba(255, 122, 89, 0.55); }
.node--teal:hover,  .node--teal:focus-visible  { box-shadow: 0 0 50px -6px rgba(53, 224, 200, 0.55); }
.node--lilac:hover, .node--lilac:focus-visible { box-shadow: 0 0 50px -6px rgba(200, 147, 255, 0.55); }

.node:focus-visible {
  outline: 2px solid rgba(255, 255, 255, 0.65);
  outline-offset: 4px;
}

/* ---------- Footer ---------- */

.site-footer {
  flex: 0 0 auto;
  text-align: center;
  padding: 20px 16px 28px;
  font-size: 12.5px;
  color: var(--text-dim);
}

.site-footer a {
  color: var(--text-muted);
  text-decoration: none;
  border-bottom: 1px solid rgba(139, 147, 168, 0.35);
  transition: color 0.2s ease, border-color 0.2s ease;
}

.site-footer a:hover,
.site-footer a:focus-visible {
  color: var(--text);
  border-color: var(--text-muted);
}

/* ---------- Mobile: stacked layout ---------- */

@media (max-width: 640px) {
  .network {
    width: 100%;
    max-width: 420px;
    aspect-ratio: auto;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 34px;
    padding: 8px 20px 0;
  }

  .links { display: none; }

  .node {
    position: static;
    animation: float-sm 7s ease-in-out infinite;
  }

  .node--center { animation-name: float-sm; }
  .node--satellite:nth-of-type(1) { animation-name: float-sm; animation-delay: 0.3s; }
  .node--satellite:nth-of-type(2) { animation-name: float-sm; animation-delay: 0.9s; }
  .node--satellite:nth-of-type(3) { animation-name: float-sm; animation-delay: 1.5s; }

  @keyframes float-sm {
    0%, 100% { transform: translateY(0) scale(1); }
    50%      { transform: translateY(-7px) scale(1.015); }
  }

  .node--satellite {
    width: 100%;
    max-width: 280px;
    height: auto;
    aspect-ratio: 1 / 1;
  }

  .node--satellite::before {
    content: "";
    position: absolute;
    top: -34px;
    left: 50%;
    width: 1px;
    height: 34px;
    background: linear-gradient(to bottom, transparent, rgba(139, 107, 255, 0.6));
    animation: connector-flicker 2.4s ease-in-out infinite;
  }

  @keyframes connector-flicker {
    0%, 100% { opacity: 0.45; }
    50%      { opacity: 1; }
  }

  .node--satellite:hover,
  .node--satellite:focus-visible {
    animation-play-state: paused;
    transform: scale(1.04);
  }
}

/* ---------- Reduced motion ---------- */

@media (prefers-reduced-motion: reduce) {
  .node, .node__ring, .node--satellite::before {
    animation: none !important;
  }
  .node { transition: box-shadow 0.2s ease; }
  .bolt-spark { display: none; }
}
