/* styles.css */
:root {
  --bg: #0b1220;
  --fg: #0a0a0a;
  --text: #0f172a;
  --muted: #475569;
  --brand: #0ea5e9;
  --brand-600: #0284c7;
  --surface: #ffffff;
  --border: color-mix(in oklab, var(--text) 12%, transparent);
  color-scheme: light dark;
}
@media (prefers-color-scheme: dark) {
  :root { --surface:#0b1220; --text:#e5e7eb; --muted:#94a3b8; --fg:#e5e7eb; }
}
* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font-family: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, "Noto Sans", "Apple Color Emoji","Segoe UI Emoji";
  line-height: 1.6;
  background: var(--surface);
  color: var(--text);
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
.small { font-size: .9rem; color: var(--muted); }
.container { max-width: 72ch; margin-inline: auto; padding: 1.25rem; }
.row { display: flex; align-items: center; justify-content: space-between; gap: 1rem; }
.header { position: sticky; top: 0; backdrop-filter: blur(6px); background: color-mix(in oklab, var(--surface) 92%, transparent); border-bottom: 1px solid color-mix(in oklab, var(--text) 12%, transparent); }
.brand { color: var(--brand); font-weight: 700; letter-spacing: .2px; }
.nav { display: flex; gap: 1rem; list-style: none; margin: 0; padding: 0; }
.hero { padding-block: clamp(3rem, 8vw, 6rem); }
.hero h1 { font-size: clamp(2rem, 4vw, 3rem); line-height: 1.1; margin: 0; }
.hero p { margin: .75rem 0 1.5rem; color: var(--muted); }
.grid { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.card { border: 1px solid color-mix(in oklab, var(--text) 12%, transparent); border-radius: 12px; padding: 1rem; background: color-mix(in oklab, var(--surface) 98%, transparent); }
.footer { margin-top: 4rem; border-top: 1px solid color-mix(in oklab, var(--text) 12%, transparent); background: color-mix(in oklab, var(--surface) 94%, transparent); }
.btn { background: var(--brand); color: white; border: 0; padding: .6rem 1rem; border-radius: .75rem; cursor: pointer; font-weight: 600; }
.btn:hover { background: var(--brand-600); }
.skip { position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }
.skip:focus { position:static; width:auto; height:auto; margin: .5rem; padding:.5rem .75rem; background: var(--brand); color: #fff; border-radius: .5rem; }
:focus-visible { outline: 2px solid var(--brand); outline-offset: 3px; }
img { max-width: 100%; height: auto; }

/* Brand-Block */
.brand { display: inline-flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--brand); }
.brand-fallback { display: none; }

/* Wenn das Bild defekt ist, Logo ausblenden und Text zeigen */
.brand.is-broken .brand-fallback { display: inline; }
.brand.is-broken picture { display: none; }

/* FAQ: Layout & Typo */
.faq { margin-block: 4rem; }
.faq h2 { font-size: 1.875rem; line-height: 1.2; margin-bottom: 1rem; }

/* Steuerung */
.faq-controls { display: flex; gap: .5rem; margin-bottom: 1rem; }
.btn { appearance: none; border: 0; border-radius: .5rem; padding: .5rem .75rem; font-weight: 600; cursor: pointer; }
.btn-outline { border: 1px solid var(--border, #dde1e6); background: transparent; color: inherit; }
.btn-outline:hover { background: #f6f8fa; }
.btn-outline:focus-visible { outline: 2px solid var(--brand, #0ea5e9); outline-offset: 2px; }

/* FAQ Items */
.faq-list { display: grid; gap: .75rem; }
.faq-item {
  border: 1px solid var(--border, #dde1e6);
  border-radius: .75rem;
  background: #f7f9fc;
  background: color-mix(in oklab, var(--surface) 96%, black);
  box-shadow: 0 1px 0 rgba(0,0,0,.02);
  overflow: clip; /* verhindert Overflow beim Animieren */
}

/* Kopfzeile */
.faq-summary {
  list-style: none; /* native Marker ausblenden */
  padding: 1rem 3rem 1rem 1rem;
  display: block;
  position: relative;
  font-weight: 600;
  cursor: pointer;
}
.faq-summary::-webkit-details-marker { display: none; }

/* Icon (Chevron) rechts */
.faq-summary::after {
  content: "";
  position: absolute;
  right: 1rem; top: 50%; translate: 0 -50%;
  width: .75rem; height: .75rem;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  rotate: -45deg; transition: transform .2s ease, rotate .2s ease;
}
.faq-item[open] .faq-summary::after { rotate: 135deg; }

/* Panel (animierbar) */
.faq-panel {
  padding: 0 1rem 1rem;
  max-height: 0;
  overflow: clip;
  transition: max-height .25s ease;
}

/* Fokus & Hover */
.faq-summary:hover { 
  background: #f1f6fd;
  background: color-mix(in oklab, var(--surface) 92%, black);
}
.faq-summary:focus-visible {
  outline: 2px solid var(--brand, #0ea5e9);
  outline-offset: 2px;
}

/* Bevorzugt: keine Bewegung */
@media (prefers-reduced-motion: reduce) {
  .faq-panel { transition: none; }
  .faq-summary::after { transition: none; }
}

/* Dark‑Mode-Feinschliff für die gleichen Effekte */
@media (prefers-color-scheme: dark) {
  .faq-item {
    background: #0d1526; /* Fallback nahe an #0b1220 */
    background: color-mix(in oklab, var(--surface) 96%, white);
    box-shadow: none; /* in Dark meist weglassen */
  }
  .faq-summary:hover {
    background: #0f1a30; /* Fallback */
    background: color-mix(in oklab, var(--surface) 92%, white);
  }
}


/* Map-Layout */
.map-shell { display: grid; gap: .75rem; }
.map-static { margin: 0; }
.map-static img,
.map-canvas {
  width: 100%;
  aspect-ratio: 3 / 2;
  border-radius: .75rem;
  object-fit: cover;
  background: color-mix(in oklab, var(--surface, #f6f8fb) 96%, black);
  border: 1px solid color-mix(in oklab, var(--text, #0f172a) 10%, transparent);
}
.map-controls {
  display: flex; gap: .75rem; align-items: center; justify-content: space-between;
  margin-top: .5rem;
}
.map-canvas { height: clamp(280px, 50vh, 460px); overflow: clip; }
.btn.btn-outline {
  appearance: none; cursor: pointer; user-select: none;
  padding: .6rem .9rem; border-radius: .6rem; font-weight: 600;
  background: transparent;
  border: 1px solid color-mix(in oklab, var(--text, #0f172a) 15%, transparent);
}
.btn.btn-outline:hover {
  background: color-mix(in oklab, var(--surface, #f6f8fb) 92%, black);
}
.no-js { margin: 0; font-size: .9rem; }
.osm-attrib {
  font-size: .8rem; color: color-mix(in oklab, var(--text,#0f172a) 70%, transparent);
  margin: 0;
}

/* Dark-Mode Feinschliff */
@media (prefers-color-scheme: dark) {
  .map-static img, .map-canvas {
    background: color-mix(in oklab, var(--surface, #0b1220) 96%, white);
    border-color: color-mix(in oklab, var(--text, #e5e7eb) 15%, transparent);
  }
}
