:root {
  --bg: #ffffff;
  --fg: #0a0a0a;
  --muted: #6e6e73;
  --border: rgba(0,0,0,0.08);
  --surface: rgba(255,255,255,0.6);
  --surface-dark: rgba(15,15,15,0.5);
  --link: #0071e3;
  --radius: 14px;
  --hero-image: url('assets/hero.jpg');
}

html {
  color-scheme: light;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
}

* { box-sizing: border-box; }

html, body {
  margin: 0; padding: 0; height: 100%;
  color: var(--fg); background: var(--bg);
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Segoe UI", Roboto, Helvetica, Arial, "Apple Color Emoji", "Segoe UI Emoji", "Segoe UI Symbol", sans-serif;
  line-height: 1.5;
}

a { color: var(--link); text-decoration: none; }
a:hover { text-decoration: underline; }

img, svg { display: block; max-width: 100%; }

.container { width: min(1100px, 92vw); margin: 0 auto; padding: 0 24px; }

/* --- Hero-Startseite --- */
.hero {
  position: relative;
  min-height: 100vh; /* Fallback */
  background-image: var(--hero-image);
  background-size: cover;
  background-position: center;
  background-repeat: no-repeat;
}
@supports (height: 100svh) {
  .hero { min-height: 100svh; }
}
.hero::after {
  content: ""; position: absolute; inset: 0;
  background: radial-gradient(120% 80% at 50% 20%, rgba(0,0,0,0.0) 0%, rgba(0,0,0,0.22) 100%);
  pointer-events: none;
}

/* Brand-Badge oben links (Startseite) */
.brand-badge {
  position: absolute;
  top: calc(16px + env(safe-area-inset-top));
  left: calc(16px + env(safe-area-inset-left));
  z-index: 2;
  display: inline-flex; align-items: center;
  padding: 10px 14px;
  border-radius: 999px;
  border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px);
  backdrop-filter: blur(10px);
  color: #111;
  font-weight: 600;
  letter-spacing: -0.01em;
}
.hero .brand-badge {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  background: var(--surface-dark);
}

/* Button-Leiste unten (Startseite) */
.corner-nav {
  position: absolute;
  bottom: calc(16px + env(safe-area-inset-bottom));
  left: 50%;
  transform: translateX(-50%);
  display: flex;
  justify-content: center;
  gap: 12px;
  width: min(560px, 92vw);
  z-index: 2;
  flex-wrap: wrap;
}

.pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 12px 16px; min-height: 44px;
  border-radius: 999px; border: 1px solid var(--border);
  background: var(--surface);
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  color: #111; font-weight: 500; letter-spacing: -0.01em;
  transition: transform 0.2s ease, border-color 0.2s ease, background-color 0.2s ease, box-shadow 0.2s ease;
  -webkit-tap-highlight-color: rgba(0,0,0,0.1);
  line-height: 1;
}
@media (hover: hover) and (pointer: fine) {
  .pill:hover { transform: translateY(-1px); border-color: rgba(0,0,0,0.18); text-decoration: none; }
}
.pill:active { transform: translateY(0); }
.pill:focus-visible {
  outline: none;
  box-shadow: 0 0 0 3px rgba(0,113,227,0.35);
}
.pill svg { opacity: 0.65; }
.pill--ghost { background: transparent; color: var(--fg); border-color: var(--border); }
.pill--full { width: 100%; }
.hero .corner-nav .pill {
  color: #fff;
  border-color: rgba(255,255,255,0.28);
  background: var(--surface-dark);
}

/* Für Screenreader-Only Links (Skip-Links etc.) */
.visually-hidden {
  position: absolute !important;
  height: 1px; width: 1px; margin: -1px; padding: 0; border: 0;
  clip: rect(0 0 0 0); clip-path: inset(50%);
  overflow: hidden; white-space: nowrap;
}

/* --- Inhaltsseiten (Top-Bar optimiert) --- */
.header {
  position: sticky; top: 0; z-index: 20;
  -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px);
  background: color-mix(in srgb, var(--bg) 82%, transparent);
  border-bottom: 1px solid var(--border);
}
.header__inner {
  min-height: 56px;
  display: flex; align-items: center; justify-content: space-between;
  gap: 16px;
}
.brand {
  display: inline-flex; align-items: center;
  height: 36px;
  font-weight: 600; letter-spacing: -0.02em; color: var(--fg);
  white-space: nowrap;
}

/* Rechts oben: Chip-Leiste */
.top-nav {
  display: flex; align-items: center; gap: 10px;
}

/* Spezielles Styling der Buttons in der Top-Bar */
.header .pill {
  padding: 9px 14px; min-height: 36px;
  border-radius: 999px;
  background: transparent;
  border-color: var(--border);
  color: var(--fg);
}
.header .pill:hover {
  background: rgba(0,0,0,0.03);
}
.header .pill:active {
  background: rgba(0,0,0,0.05);
}

/* Footer */
.footer {
  border-top: 1px solid var(--border);
  padding: 24px 0 48px;
  color: var(--muted);
  font-size: 14px;
}

/* Accessibility / Motion */
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}

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

/* Startseite: Buttons kompakter auf kleineren Screens */
@media (max-width: 640px) {
  .corner-nav { gap: 8px; }
  .corner-nav .pill { flex: 1 1 calc(33.333% - 8px); font-size: 15px; }
}

/* Top-Bar: Scrollbare Chip-Leiste auf sehr kleinen Geräten */
@media (max-width: 560px) {
  .header__inner { min-height: 56px; }
  .top-nav {
    gap: 8px;
    overflow-x: auto; overflow-y: hidden;
    -webkit-overflow-scrolling: touch;
    padding-block: 8px;
    margin-right: calc(env(safe-area-inset-right));
    scrollbar-width: none;
  }
  .top-nav::-webkit-scrollbar { display: none; }
  .top-nav .pill { flex: 0 0 auto; }
  .brand { font-size: 15.5px; }
}

/* Inhaltsabstände mobil */
@media (max-width: 480px) {
  .pill { padding: 12px 14px; font-size: 15px; }
  .main { padding-block: 32px; }
}