:root {
  color-scheme: light dark;
  font-family:
    "Inter",
    ui-sans-serif,
    system-ui,
    -apple-system,
    "Segoe UI",
    Roboto,
    "Helvetica Neue",
    Arial,
    sans-serif;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11";
}

html {
  scroll-behavior: smooth;
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

.skip-link {
  position: absolute;
  top: -40px;
  left: 1rem;
  z-index: 100;
  padding: 0.5rem 1rem;
  border-radius: 0.5rem;
  background: var(--color-base-100, #fff);
  color: var(--color-primary, #2563eb);
  font-weight: 600;
  box-shadow: 0 4px 12px rgb(0 0 0 / 0.12);
  transition: top 0.2s ease;
}

.skip-link:focus {
  top: 1rem;
}

.bg-grid {
  background-image:
    linear-gradient(to right, var(--color-base-300, #e5e7eb) 1px, transparent 1px),
    linear-gradient(to bottom, var(--color-base-300, #e5e7eb) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: radial-gradient(
    ellipse 60% 60% at 50% 0%,
    black 40%,
    transparent 80%
  );
  -webkit-mask-image: radial-gradient(
    ellipse 60% 60% at 50% 0%,
    black 40%,
    transparent 80%
  );
}

/* Legal prose (Impressum, Datenschutz) */
.legal {
  line-height: 1.75;
  color: oklch(var(--bc) / 0.85);
}
.legal h3 {
  margin-top: 2rem;
  margin-bottom: 0.75rem;
  font-size: 1.125rem;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--color-base-content, inherit);
}
.legal h3:first-child {
  margin-top: 0;
}
.legal p {
  margin-bottom: 1rem;
  font-size: 0.95rem;
}
.legal ul {
  margin: 0 0 1rem 1.25rem;
  list-style: disc;
  font-size: 0.95rem;
}
.legal ul li {
  margin-bottom: 0.375rem;
}
.legal a {
  color: var(--color-primary, #2563eb);
  text-decoration: underline;
  text-underline-offset: 2px;
}
.legal a:hover {
  text-decoration: none;
}
.legal strong {
  font-weight: 600;
}
/* Kontakt-Grafik (Spamschutz) klein und scharf halten: das PNG ist hoch
   aufgeloest, wird hier aber auf eine kompakte Breite heruntergerechnet. */
.legal img {
  max-width: 16rem;
  height: auto;
}

/* Sanftes Einblenden der Sektionen beim Scrollen */
.reveal {
  opacity: 0;
  transform: translateY(12px);
  transition:
    opacity 0.6s ease,
    transform 0.6s ease;
}
.reveal.is-visible {
  opacity: 1;
  transform: none;
}
@media (prefers-reduced-motion: reduce) {
  .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
}

img {
  max-width: 100%;
  height: auto;
}

/* Fixed Footer */
.site-footer {
  position: fixed;
  inset: auto 0 0 0;
  z-index: 30;
  min-height: 48px;
  padding-bottom: env(safe-area-inset-bottom, 0);
}

body.has-fixed-footer {
  padding-bottom: calc(56px + env(safe-area-inset-bottom, 0));
}

@media (max-width: 480px) {
  body.has-fixed-footer {
    padding-bottom: calc(72px + env(safe-area-inset-bottom, 0));
  }
}

/* Tab-Labels besser lesbar machen */
.tabs-border .tab {
  font-weight: 600;
  padding-inline: 1.25rem;
}

/* Zoomable Screenshots */
img[src*="assets/screenshots/"] {
  cursor: zoom-in;
  transition: transform 0.25s ease, box-shadow 0.25s ease;
}
img[src*="assets/screenshots/"]:hover {
  transform: translateY(-2px);
}

/* Lightbox */
.lightbox-box {
  border-radius: 1rem;
}
#lightbox #lightbox-img {
  cursor: zoom-out;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  img[src*="assets/screenshots/"] {
    transition: none;
  }
  img[src*="assets/screenshots/"]:hover {
    transform: none;
  }
}
