:root {
  --color-bg: #0d1b2e;
  --color-bg-elevated: #132840;
  --color-grid: rgba(93, 156, 199, 0.07);
  --color-grid-strong: rgba(93, 156, 199, 0.14);
  --color-line: #3a6ea5;
  --color-text: #eef1f5;
  --color-text-muted: #8fa3bd;
  --color-accent: #ffb020;
  --color-accent-soft: rgba(255, 176, 32, 0.14);

  --font-display: 'Space Grotesk', sans-serif;
  --font-body: 'Inter', sans-serif;
  --font-mono: 'IBM Plex Mono', monospace;

  --bar-height: 64px;
}

* {
  box-sizing: border-box;
}

html {
  height: 100%;
}

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

/* ---------- Hintergrund-Raster ---------- */

.grid-bg {
  position: fixed;
  inset: 0;
  z-index: 0;
  pointer-events: none;
  background-image:
    linear-gradient(var(--color-grid) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid) 1px, transparent 1px),
    linear-gradient(var(--color-grid-strong) 1px, transparent 1px),
    linear-gradient(90deg, var(--color-grid-strong) 1px, transparent 1px);
  background-size: 40px 40px, 40px 40px, 200px 200px, 200px 200px;
  opacity: 0;
  animation: gridFadeIn 1.2s ease forwards;
  animation-delay: 0.1s;
}

@keyframes gridFadeIn {
  to { opacity: 1; }
}

/* ---------- Topbar ---------- */

.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  z-index: 20;
  height: var(--bar-height);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 24px;
  background: rgba(13, 27, 46, 0.72);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-bottom: 1px solid rgba(93, 156, 199, 0.16);
}

.topbar-brand {
  display: flex;
  align-items: baseline;
  gap: 10px;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: 16px;
  letter-spacing: -0.01em;
  color: var(--color-text);
  text-decoration: none;
}

.status-label {
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--color-text-muted);
}

.topbar-nav {
  position: relative;
}

.menu-toggle {
  width: 36px;
  height: 36px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: transparent;
  border: 1px solid rgba(93, 156, 199, 0.3);
  border-radius: 2px;
  color: var(--color-text);
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease;
}

.menu-toggle:hover {
  border-color: var(--color-line);
  background: rgba(93, 156, 199, 0.08);
}

.menu-toggle:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 2px;
}

.menu-toggle .icon {
  font-family: var(--font-mono);
  font-size: 18px;
  line-height: 1;
  transition: transform 0.25s ease;
}

.menu-toggle[aria-expanded="true"] .icon {
  transform: rotate(45deg);
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  white-space: nowrap;
  border: 0;
}

.menu-panel {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  min-width: 200px;
  background: var(--color-bg-elevated);
  border: 1px solid rgba(93, 156, 199, 0.25);
  border-radius: 2px;
  padding: 6px;
  box-shadow: 0 16px 32px rgba(0, 0, 0, 0.35);
  transform-origin: top right;
  transform: scale(0.96) translateY(-6px);
  opacity: 0;
  pointer-events: none;
  transition: opacity 0.18s ease, transform 0.18s ease;
}

.menu-panel.is-open {
  opacity: 1;
  transform: scale(1) translateY(0);
  pointer-events: auto;
}

.menu-panel ul {
  list-style: none;
  margin: 0;
  padding: 0;
}

.menu-panel li + li {
  border-top: 1px solid rgba(93, 156, 199, 0.12);
}

.menu-panel a {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 10px 12px;
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--color-text);
  text-decoration: none;
  border-radius: 2px;
  transition: background 0.15s ease, color 0.15s ease;
}

.menu-panel a .tag {
  font-size: 10px;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
}

.menu-panel a:hover,
.menu-panel a:focus-visible {
  background: var(--color-accent-soft);
  color: var(--color-accent);
  outline: none;
}

/* ---------- Hero ---------- */

.hero {
  position: relative;
  z-index: 1;
  flex: 1 0 auto;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: calc(var(--bar-height) + 50px) 24px 60px;
  text-align: center;
  gap: 28px;
}

.cube-wrap {
  width: 88px;
  height: 88px;
}

.cube {
  width: 100%;
  height: 100%;
}

.cube-path {
  stroke: var(--color-line);
  stroke-width: 1.5;
  stroke-linejoin: round;
  stroke-linecap: round;
  fill: none;
  stroke-dasharray: 520;
  stroke-dashoffset: 520;
  animation: draw 1.4s ease forwards;
  animation-delay: 0.2s;
}

@keyframes draw {
  to { stroke-dashoffset: 0; }
}

.wordmark {
  position: relative;
  margin: 0;
  font-family: var(--font-display);
  font-weight: 600;
  font-size: clamp(44px, 9vw, 88px);
  letter-spacing: -0.02em;
  line-height: 1;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.7s ease forwards;
  animation-delay: 0.9s;
}

.underline {
  position: absolute;
  left: 50%;
  bottom: -14px;
  transform: translateX(-50%);
  width: 0;
  height: 3px;
  background: var(--color-accent);
  animation: underlineDraw 0.7s ease forwards;
  animation-delay: 1.5s;
}

@keyframes underlineDraw {
  to { width: 64px; }
}

.tagline {
  margin: 0;
  font-family: var(--font-mono);
  text-transform: uppercase;
  letter-spacing: 0.16em;
  font-size: 13px;
  color: var(--color-text-muted);
  opacity: 0;
  animation: fadeUp 0.6s ease forwards;
  animation-delay: 1.7s;
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(16px); }
  to { opacity: 1; transform: translateY(0); }
}

/* ---------- Tafeln (geplante Bereiche) ---------- */

.plates {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 20px;
  max-width: 900px;
  width: 100%;
  margin-top: 36px;
}

.plate {
  position: relative;
  background: var(--color-bg-elevated);
  border: 1px solid rgba(93, 156, 199, 0.18);
  border-radius: 2px;
  padding: 26px 22px;
  text-align: left;
  opacity: 0;
  transform: translateY(16px);
  animation: fadeUp 0.6s ease forwards;
  transition: border-color 0.25s ease, transform 0.25s ease;
}

.plate:hover {
  border-color: var(--color-line);
  transform: translateY(-2px);
}

.plate:nth-child(1) { animation-delay: 1.9s; }
.plate:nth-child(2) { animation-delay: 2.05s; }
.plate:nth-child(3) { animation-delay: 2.2s; }

.plate-ref {
  display: block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--color-text-muted);
  margin-bottom: 14px;
}

.plate h2 {
  font-family: var(--font-display);
  font-size: 20px;
  font-weight: 600;
  margin: 0 0 10px;
}

.status-chip {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 10px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--color-accent);
  background: var(--color-accent-soft);
  padding: 3px 8px;
  border-radius: 20px;
  margin-bottom: 12px;
}

.plate p {
  margin: 0;
  font-size: 14px;
  line-height: 1.5;
  color: var(--color-text-muted);
}

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

.site-footer {
  position: relative;
  z-index: 1;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 12px;
  padding: 20px 32px;
  font-family: var(--font-mono);
  font-size: 11px;
  letter-spacing: 0.05em;
  color: var(--color-text-muted);
  border-top: 1px solid rgba(93, 156, 199, 0.14);
}

.contact-link {
  color: var(--color-text-muted);
  text-decoration: none;
  border-bottom: 1px solid transparent;
  transition: color 0.2s ease, border-color 0.2s ease;
}

.contact-link:hover {
  color: var(--color-accent);
  border-color: var(--color-accent);
}

.contact-link:focus-visible {
  outline: 2px solid var(--color-accent);
  outline-offset: 3px;
  border-radius: 2px;
}

/* ---------- Responsive ---------- */

@media (max-width: 720px) {
  .plates {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 600px) {
  .site-footer {
    justify-content: center;
    text-align: center;
  }
}

/* ---------- Bewegung reduzieren ---------- */

@media (prefers-reduced-motion: reduce) {
  .grid-bg,
  .cube-path,
  .wordmark,
  .tagline,
  .plate {
    animation: none !important;
    opacity: 1 !important;
    transform: none !important;
    stroke-dashoffset: 0 !important;
  }

  .underline {
    animation: none !important;
    width: 64px !important;
  }

  .plate:hover {
    transform: none;
  }

  .menu-panel {
    transition: opacity 0.01s linear;
  }
}
