@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 300 800;
  font-style: normal;
  font-display: swap;
}

@font-face {
  font-family: 'Inter';
  src: url('fonts/Inter-Italic-VariableFont_opsz,wght.ttf') format('truetype');
  font-weight: 300 800;
  font-style: italic;
  font-display: swap;
}

:root {
  --bg: #0b0b0b;
  --fg: #f4f4f5;
  --muted: #c9c9ce;
  --card: #141418;
  --header-h: 64px;
  --header-bg: rgba(10,10,12,.55);

  --radius: 12px;
  --dur-fast: .18s;
  --dur: .28s;
  --easing: cubic-bezier(.2,.7,.2,1);

  --gallery-card-min: 280px;
  --gallery-card-max: 360px;

  --beta-w-desktop: 160px;
  --beta-w-mobile: 110px;
  --beta-gap: -20px;
}

* { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Inter", system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  color: var(--fg);
  background: var(--bg);
  line-height: 1.6;
  display: flex;
  flex-direction: column;
  min-height: 100vh;
}

main { flex: 1; }

body.home { overflow: hidden; }
body.home main { flex: none; }

.container { width: min(1200px, 92vw); margin: 0 auto; }

/* Header */
.site-header {
  position: fixed;
  top: 0; left: 0; right: 0;
  height: var(--header-h);
  background: var(--header-bg);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(255,255,255,.1);
  z-index: 1000;
}

.nav-wrap {
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding-right: 0;
}

.has-beta-badge .nav-wrap {
  padding-right: calc(var(--beta-w-desktop) + var(--beta-gap));
}

.brand {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  background: transparent;
  border-radius: 12px;
  text-decoration: none;
  transition: transform var(--dur-fast) var(--easing);
}

.brand img {
  max-width: 100%;
  max-height: 100%;
  object-fit: contain;
  display: block;
}

.brand:hover { transform: translateY(-1px); }

/* Navigation */
.nav { list-style: none; display: flex; gap: 1rem; flex-wrap: nowrap; white-space: nowrap; }

.nav a {
  position: relative;
  color: var(--fg);
  text-decoration: none;
  padding: .5rem .8rem;
  border-radius: 8px;
  transition: color var(--dur-fast) var(--easing), transform var(--dur-fast) var(--easing);
  will-change: transform;
}

.nav a::after {
  content: "";
  position: absolute;
  left: .6rem; right: .6rem;
  bottom: 6px;
  height: 2px;
  background: currentColor;
  transform: scaleX(0);
  transform-origin: right;
  transition: transform var(--dur) var(--easing);
}

.nav a:hover,
.nav a.active { transform: translateY(-2px); color: #fff; }

.nav a:hover::after,
.nav a.active::after { transform: scaleX(1); transform-origin: left; }

.nav a:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }

/* Hamburger Button */
.nav-toggle {
  display: none;
  margin-left: auto;
  background: none;
  border: 0;
  cursor: pointer;
  color: var(--fg);
}

.nav-toggle svg { display: none; }
.nav-toggle .icon-menu { display: block; }
.nav-toggle.is-open .icon-menu { display: none; }
.nav-toggle.is-open .icon-close { display: block; }

/* Hero */
.hero {
  height: 100vh;
  display: grid;
  place-items: center;
  position: relative;
  text-align: center;
  overflow: hidden;
}

.hero__bg {
  position: absolute;
  inset: 0;
  background: url("pics/landing.webp") center/cover no-repeat;
  z-index: -2;
  transform: scale(1.02);
}

.hero__overlay {
  position: absolute;
  inset: 0;
  background:
    radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.12) 0%, rgba(0,0,0,.28) 60%, rgba(0,0,0,.40) 100%),
    linear-gradient(to bottom, rgba(0,0,0,.20), rgba(0,0,0,.35));
  z-index: -1;
}

.hero__title {
  font-size: clamp(2.5rem, 6vw, 5rem);
  font-weight: 800;
  text-shadow: 0 10px 30px rgba(0,0,0,.5);
}

.hero__subtitle {
  font-size: 1.2rem;
  color: var(--muted);
}

/* Seite */
.page {
  padding-top: calc(var(--header-h) + 2rem);
  padding-bottom: 4rem;
}

.page-title {
  font-size: 2rem;
  margin-bottom: 1rem;
}

.page-intro {
  color: var(--muted);
  margin-bottom: 1rem;
}

/* Galerie Übersicht */
.gallery {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(var(--gallery-card-min), 1fr));
  justify-content: center;
}

.card {
  background: var(--card);
  border-radius: var(--radius);
  overflow: hidden;
  text-decoration: none;
  color: inherit;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 24px rgba(0,0,0,.22);
  transition: transform var(--dur) var(--easing), box-shadow var(--dur) var(--easing), border-color var(--dur-fast) var(--easing);
  max-width: var(--gallery-card-max);
  justify-self: center;
}

.card:hover {
  transform: translateY(-4px) scale(1.02);
  box-shadow: 0 16px 44px rgba(0,0,0,.35);
  border-color: rgba(255,255,255,.14);
}

.card img {
  width: 100%;
  aspect-ratio: 1/1;
  object-fit: cover;
  display: block;
  transform: scale(1);
  transition: transform var(--dur) var(--easing), filter var(--dur-fast) var(--easing);
}

.card:hover img {
  transform: scale(1.06);
  filter: saturate(1.05) contrast(1.05);
}

.album-meta {
  padding: .8rem;
  display: flex;
  justify-content: space-between;
  align-items: baseline;
}

.album-meta h3 {
  font-size: 1rem;
  margin: 0;
}

.album-meta span {
  color: var(--muted);
  font-size: .9rem;
}

/* Album-Grid */
.album-grid {
  display: grid;
  gap: 1rem;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
}

.album-tile {
  position: relative;
  display: block;
  border-radius: var(--radius);
  overflow: hidden;
}

.album-tile img {
  width: 100%;
  border-radius: var(--radius);
  display: block;
  aspect-ratio: 4/3;
  object-fit: cover;
  transition: transform var(--dur) var(--easing), filter var(--dur-fast) var(--easing), box-shadow var(--dur) var(--easing);
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: 0 8px 22px rgba(0,0,0,.22);
}

.album-tile:hover img {
  transform: scale(1.04);
  filter: saturate(1.05) contrast(1.05);
  box-shadow: 0 18px 46px rgba(0,0,0,.40);
}

/* Lightbox */
.lightbox {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(0,0,0,.86);
  z-index: 2000;
  padding: 5vh 4vw;
  opacity: 0;
  visibility: hidden;
  pointer-events: none;
  transition: opacity .22s ease;
  cursor: zoom-out;
}

.lightbox.open {
  opacity: 1;
  visibility: visible;
  pointer-events: auto;
}

.lb-stage {
  touch-action: pan-y;
  position: relative;
  width: min(90vw, 1200px);
  height: 85vh;
  max-height: 85svh;
  overflow: hidden;
  border-radius: var(--radius);
  box-shadow: 0 20px 60px rgba(0,0,0,.6);
  background: #000;
  cursor: default;
}

.lb-img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: contain;
  transform: translateX(100%);
  transition: transform .36s ease;
  will-change: transform;
  user-select: none;
  -webkit-user-drag: none;
  pointer-events: none;
}

.lb-a {
  transform: translateX(0);
}

.lb-b {
  transform: translateX(100%);
}

.lb-close,
.prev,
.next {
  position: fixed;
  z-index: 2100;
  color: #fff;
  text-decoration: none;
  background: rgba(255,255,255,.15);
  border: 1px solid rgba(255,255,255,.15);
  backdrop-filter: blur(6px);
  padding: .25rem .7rem;
  border-radius: 10px;
  cursor: pointer;
  font: inherit;
  line-height: 1;
  transition: background .2s ease, transform .2s ease;
}

.lb-close:hover,
.prev:hover,
.next:hover {
  background: rgba(255,255,255,.24);
}

.lb-close {
  top: 16px;
  right: 20px;
  font-size: 2rem;
}

.prev,
.next {
  top: 50%;
  transform: translateY(-50%);
  font-size: 2.2rem;
}

.prev {
  left: 20px;
}

.next {
  right: 20px;
}

/* Footer */
.site-footer {
  border-top: 1px solid rgba(255,255,255,.1);
  background: #0f0f12;
  text-align: center;
  padding: 1rem;
  color: var(--muted);
}

body.home .site-footer {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: var(--header-bg);
  backdrop-filter: blur(10px);
}

/* Weniger Bewegung
@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
} */

/* Mobile Optimierungen */
@media (max-width: 600px) {
  :root { --header-h: 56px; }

  .nav-wrap { padding-inline: 4px; }
  .brand { width: 36px; height: 36px; }
  .nav {
    gap: .25rem;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    padding-bottom: 2px;
  }
  .nav a { padding: .45rem .6rem; }

  .hero__overlay {
    background:
      radial-gradient(60% 50% at 50% 45%, rgba(0,0,0,.18) 0%, rgba(0,0,0,.38) 60%, rgba(0,0,0,.5) 100%),
      linear-gradient(to bottom, rgba(0,0,0,.30), rgba(0,0,0,.50));
  }

  .hero__title { font-size: clamp(2rem, 9vw, 3rem); }
  .hero__subtitle { font-size: .95rem; }

  .album-meta { padding: .65rem; }
  .album-meta h3 { font-size: .95rem; }
  .album-meta span { font-size: .85rem; }

  .album-grid {
    grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
    gap: .75rem;
  }

  .album-tile img { aspect-ratio: 4/3; }

  .lb-close {
    top: calc(16px + env(safe-area-inset-top));
    right: calc(20px + env(safe-area-inset-right));
    font-size: 2.2rem;
  }

  .prev {
    left: calc(12px + env(safe-area-inset-left));
    font-size: 2.4rem;
  }

  .next {
    right: calc(12px + env(safe-area-inset-right));
    font-size: 2.4rem;
  }

  .lb-stage {
    width: 100vw;
    height: 78vh;
    border-radius: 0;
  }

  .page { padding-bottom: 3rem; }
  main h2 { margin-top: 2rem; }
}

/* Mobile Nav (bis 768px) */
@media (max-width: 768px) {
  .nav-toggle {
    display: inline-flex;
    align-items: center;
    justify-content: center;
  }

  .nav {
    position: fixed;
    top: var(--header-h);
    left: 0;
    right: 0;
    display: none;
    flex-direction: column;
    background: rgba(10,10,12,.95);
    backdrop-filter: blur(8px);
    border-bottom: 1px solid rgba(255,255,255,.1);
    padding: .5rem 1rem 1rem;
    z-index: 1200;
  }

  .nav li { list-style: none; }

  .nav a {
    display: block;
    padding: .8rem .6rem;
    border-radius: 10px;
    margin: .1rem 0;
  }

  .nav.is-open { display: block; }
  body.menu-open { overflow: hidden; }

  .has-beta-badge .nav-wrap {
    padding-right: calc(var(--beta-w-mobile) + var(--beta-gap));
  }
}

/* Scrollbars Nav verstecken */
.nav::-webkit-scrollbar { display: none; }
.nav { scrollbar-width: none; }

/* Impressum-Links */
body.impressum .page a {
  color: #8C67CA;
  text-decoration: underline;
  transition: color 0.25s ease;
}

body.impressum .page a:hover,
body.impressum .page a:focus {
  color: #d65b8c;
}

/* Donate Anpassungen */
.donate-btn img {
  max-width: 140px;
  height: auto;
  /* margin-top: 0.25rem; */
}

/* ===========================
   BETA Badge (im Header)
   =========================== */
.beta-badge-img {
  position: absolute;
  top: 0;
  right: 0;
  width: var(--beta-w-desktop);
  height: auto;
  z-index: 3000;
  pointer-events: none;
  opacity: .85;
}

@media (max-width: 600px) {
  .beta-badge-img { width: 140px; }
}

@media (max-width: 768px) {
  .beta-badge-img { width: var(--beta-w-mobile); }
}