/* Basiseinstellungen: Typografie, Fokusringe, Seitenrhythmus, Reduktion. */

:root {
  --shadow-soft: 0 10px 30px rgba(29, 39, 51, 0.08);
  --shadow-raised: 0 14px 34px rgba(29, 39, 51, 0.14);
}

html {
  scroll-behavior: smooth;
  scroll-padding-top: 5rem;
}

body {
  font-family: var(--font-body);
  font-size: 1rem;
  line-height: 1.65;
}

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  color: var(--color-ink-900);
}

h1 {
  font-size: clamp(2rem, 1.1rem + 3.4vw, 3.4rem);
  line-height: 1.08;
  font-weight: 800;
}

h2 {
  font-size: clamp(1.5rem, 1rem + 1.8vw, 2.25rem);
  line-height: 1.15;
  font-weight: 600;
}

h3 {
  font-size: clamp(1.125rem, 0.95rem + 0.6vw, 1.375rem);
  line-height: 1.3;
  font-weight: 600;
}

p {
  max-width: 68ch;
}

::selection {
  background: color-mix(in oklch, var(--color-primary-600) 35%, white);
}

:focus-visible {
  outline: 3px solid color-mix(in oklch, var(--color-primary-600) 70%, black);
  outline-offset: 2px;
  border-radius: 2px;
}

.skip-link {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--color-accent-800);
  color: #fff;
  padding: 0.6rem 1rem;
  border-radius: var(--radius-btn);
}

.skip-link:focus {
  left: 0.75rem;
  top: 0.75rem;
}

main {
  display: block;
  min-height: 60vh;
}

main:focus {
  outline: none;
}

.prose-lead {
  font-size: clamp(1.0625rem, 1rem + 0.35vw, 1.2rem);
  color: var(--color-ink-700);
}

.section-muted {
  background: var(--color-primary-50);
}

/* ---------- Scroll-Reveal: nativ scroll-getrieben, JS nur als Fallback ---------- */
.reveal {
  opacity: 0;
  transform: translateY(18px);
}

.reveal.revealed {
  opacity: 1;
  transform: translateY(0);
  transition: opacity 500ms cubic-bezier(0, 0, 0.2, 1),
    transform 500ms cubic-bezier(0, 0, 0.2, 1);
}

@supports (animation-timeline: view()) {
  @keyframes reveal-in {
    from { opacity: 0; transform: translateY(18px); }
    to { opacity: 1; transform: translateY(0); }
  }
  .reveal {
    animation: reveal-in linear both;
    animation-timeline: view();
    animation-range: entry 0% entry 35%;
  }
}

.reveal-stagger > .reveal:nth-child(2) { transition-delay: 90ms; }
.reveal-stagger > .reveal:nth-child(3) { transition-delay: 180ms; }
.reveal-stagger > .reveal:nth-child(4) { transition-delay: 270ms; }
.reveal-stagger > .reveal:nth-child(5) { transition-delay: 360ms; }
.reveal-stagger > .reveal:nth-child(6) { transition-delay: 450ms; }

/* Sanfte Seitenübergänge, wo der Browser sie unterstützt */
@media (prefers-reduced-motion: no-preference) {
  @view-transition { navigation: auto; }
}

/* Druckansicht für längere Inhaltsseiten */
@media print {
  .site-header, .site-footer, .skip-link, .cta-banner, form, .no-print {
    display: none !important;
  }
  body {
    background: #fff !important;
    color: #000 !important;
  }
  a {
    color: #000 !important;
    text-decoration: underline;
  }
}

@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
    scroll-behavior: auto !important;
  }
  .btn:hover {
    transform: none;
  }
  .service-card:hover {
    transform: none;
  }
  .reveal {
    opacity: 1 !important;
    transform: none !important;
    animation: none !important;
    transition: none !important;
  }
}

.no-motion *,
.no-motion *::before,
.no-motion *::after {
  transition-duration: 0.01ms !important;
  animation-duration: 0.01ms !important;
  animation-iteration-count: 1 !important;
}
