@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;700&display=swap');

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

:root {
  --bg:         #080808;
  --text:       #e0e0e0;
  --muted:      #888;
  --menu-bg:    #1c1c1c;
  --menu-w:     25%;
  --header-h:   80px;
  --ease:       0.45s cubic-bezier(0.4, 0, 0.2, 1);
  color-scheme: dark;
}

html, body {
  height: 100%;
}

body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Helvetica Neue', sans-serif;
  background: var(--bg);
  color: var(--text);
  -webkit-font-smoothing: antialiased;
  animation: pageFadeIn 0.5s ease both;
}

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

/* ── Static main page — no scroll ─────────────────────── */
body.static { overflow: hidden; }

/* ── Header ───────────────────────────────────────────── */
header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 40px;
  /* Header muss über Menü (200) und Overlay (100) liegen */
  z-index: 300;
  background: rgba(8, 8, 8, 0.92);
  border-bottom: 1px solid rgba(255, 255, 255, 0.04);
}

.logo-link {
  color: var(--text);
  text-decoration: none;
  line-height: 0;
  flex-shrink: 0;
}

.logo {
  height: 48px;
  width: auto;
  filter: invert(1);
}

/* ── Hamburger ─────────────────────────────────────────── */
.menu-button {
  background: none;
  border: none;
  cursor: pointer;
  padding: 12px 13px;
  display: flex;
  flex-direction: column;
  gap: 6px;
  width: 52px;
  position: relative;
  z-index: 1;   /* Header (300) ist bereits über Menü — kein hoher z-index nötig */
  flex-shrink: 0;
  transition: border-color 0.2s;
}

.menu-button:hover span {
  background: rgba(255, 255, 255, 0.7);
}

.menu-button span {
  display: block;
  width: 100%;
  height: 2px;
  background: #ffffff;
  transition: transform var(--ease), opacity var(--ease);
  transform-origin: center center;
  border-radius: 1px;
}

/* Span-Zentren: 1px, 9px, 17px → Abstand zur Mitte (9px): 8px */
.menu-button.active span:nth-child(1) {
  transform: translateY(8px) rotate(45deg);
}
.menu-button.active span:nth-child(2) {
  opacity: 0;
  transform: scaleX(0);
}
.menu-button.active span:nth-child(3) {
  transform: translateY(-8px) rotate(-45deg);
}

/* ── Overlay backdrop ─────────────────────────────────── */
.overlay-bg {
  position: fixed;
  inset: 0;
  background: rgba(0, 0, 0, 0.55);
  z-index: 100;
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--ease);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
}
.overlay-bg.open {
  opacity: 1;
  pointer-events: all;
}

/* ── Slide-in Menu ────────────────────────────────────── */
.menu {
  position: fixed;
  top: 0;
  right: calc(-1 * var(--menu-w) - 1px);
  width: var(--menu-w);
  height: 100vh;
  background: var(--menu-bg);
  border-left: 1px solid rgba(255, 255, 255, 0.06);
  z-index: 200;
  transition: right var(--ease);
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 40px 48px;
}
.menu.open { right: 0; }

body.no-transition .menu {
  transition: none !important;
}

.menu ul { list-style: none; }

.menu ul li + li {
  border-top: 1px solid rgba(255, 255, 255, 0.06);
}

.menu ul li a {
  display: block;
  padding: 22px 0;
  color: var(--text);
  text-decoration: none;
  font-size: 1.05rem;
  font-weight: 300;
  letter-spacing: 0.05em;
  transition: color 0.2s, padding-left 0.2s;
}
.menu ul li a:hover {
  color: #fff;
  padding-left: 10px;
}

/* Impressum link — visually distinct */
.menu ul li:last-child a {
  font-size: 0.78rem;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
  padding-top: 28px;
}
.menu ul li:last-child a:hover { color: var(--text); }

/* ── Main page ────────────────────────────────────────── */
body.static main {
  height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: var(--header-h) 120px;
}

body.static main h1 {
  font-size: clamp(1.9rem, 3.6vw, 3.8rem);
  font-weight: 700;
  line-height: 1.15;
  letter-spacing: -0.03em;
  text-align: center;
  max-width: 1000px;
  overflow-wrap: break-word;
  animation: headlineIn 0.9s cubic-bezier(0.16, 1, 0.3, 1) 0.25s both;
}

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

/* ── Sub-pages ────────────────────────────────────────── */
body.subpage main {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 100px;
  padding-left: 80px;
  padding-right: 80px;
  max-width: 1280px;
  margin: 0 auto;
}

.page-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 48px;
}

.front-image {
  width: 100%;
  aspect-ratio: 16 / 9;
  background: #0f0f0f;
  border: 1px solid rgba(255, 255, 255, 0.07);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 56px;
  position: relative;
  overflow: hidden;
}

/* Subtle grid inside image placeholder */
.front-image::before {
  content: '';
  position: absolute;
  inset: 0;
  background-image:
    linear-gradient(rgba(255,255,255,0.025) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,0.025) 1px, transparent 1px);
  background-size: 48px 48px;
}

.front-image span {
  position: relative;
  z-index: 1;
}

.text-content {
  columns: 2;
  column-gap: 56px;
}

.text-content p {
  font-size: 0.92rem;
  line-height: 1.9;
  color: var(--muted);
  margin-bottom: 20px;
  break-inside: avoid;
}

.text-content p.lead {
  font-size: 1.1rem;
  line-height: 1.75;
  color: rgba(224, 224, 224, 0.85);
  column-span: all;
  margin-bottom: 36px;
  font-weight: 300;
}

/* ── Impressum ────────────────────────────────────────── */
body.impressum main {
  padding-top: calc(var(--header-h) + 60px);
  padding-bottom: 100px;
  padding-left: 80px;
  padding-right: 80px;
  max-width: 760px;
}

body.impressum .page-label {
  font-size: 0.7rem;
  letter-spacing: 0.18em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 60px;
}

.imp-block {
  margin-bottom: 44px;
}

.imp-block h2 {
  font-size: 0.68rem;
  font-weight: 400;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  margin-bottom: 14px;
}

.imp-block p {
  font-size: 0.93rem;
  line-height: 1.85;
  color: rgba(224, 224, 224, 0.6);
}

.imp-block a {
  color: var(--text);
  text-underline-offset: 3px;
}

/* ── Footer ───────────────────────────────────────────── */
footer {
  text-align: center;
  font-size: 0.7rem;
  letter-spacing: 0.1em;
  color: var(--muted);
  padding: 48px 0 32px;
}

/* Hauptseite: fixed, da kein Scroll */
body.static footer {
  position: fixed;
  bottom: 24px;
  left: 0;
  right: 0;
  padding: 0;
  z-index: 50;
}

/* ── Responsive ───────────────────────────────────────── */
@media (max-width: 900px) {
  :root { --menu-w: 60%; }

  .responsive {
  width: 100%;
  height: auto;
}

  body.static main {
    padding-left: 40px;
    padding-right: 40px;
  }

  body.subpage main,
  body.impressum main {
    padding-left: 40px;
    padding-right: 40px;
  }

  .text-content { columns: 1; }
}

@media (max-width: 600px) {
  :root { --menu-w: 85%; }

  header { padding: 0 20px; }

  .logo { height: 36px; }

  .menu { padding: 40px 24px; }

  body.static main {
    padding-left: 24px;
    padding-right: 24px;
  }

  body.static main h1 {
    font-size: clamp(1.5rem, 7vw, 2.2rem);
  }

  body.subpage main,
  body.impressum main {
    padding-top: calc(var(--header-h) + 32px);
    padding-left: 24px;
    padding-right: 24px;
    padding-bottom: 60px;
  }
}
