/* S+B Basis-Styles — Reset + Grundlayout. Nutzt ausschließlich Tokens aus tokens.css. */

/* --- Reset (kompakt) --- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; }
body { -webkit-font-smoothing: antialiased; }
img, picture, svg, video { display: block; max-width: 100%; }
input, button, textarea, select { font: inherit; color: inherit; }
a { color: var(--color-brand); text-decoration-thickness: 0.08em; text-underline-offset: 0.15em; }
a:hover { color: var(--color-brand-hover); }

/* --- Basis --- */
body {
  font-family: var(--font-sans);
  font-size: var(--text-base);
  line-height: var(--leading-normal);
  color: var(--color-text);
  background: var(--color-bg);
}

h1, h2, h3 { line-height: var(--leading-tight); font-weight: var(--weight-bold); }
h1 { font-size: var(--text-2xl); }
h2 { font-size: var(--text-xl); }
h3 { font-size: var(--text-lg); }
p  { color: var(--color-text); }
small, .text-muted { color: var(--color-text-muted); font-size: var(--text-sm); }

/* --- Layout-Hilfen --- */
.container {
  width: 100%;
  max-width: var(--container-max);
  margin-inline: auto;
  padding-inline: var(--space-4);
}

.stack > * + * { margin-top: var(--space-4); }

.grid {
  display: grid;
  gap: var(--space-6);
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr));
}

/* --- Header / Footer --- */
.site-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-4);
  padding: var(--space-4) 0;
  border-bottom: 1px solid var(--color-border);
}
.site-header .logo { height: 2rem; width: auto; color: var(--color-brand); }
.site-footer {
  margin-top: var(--space-12);
  padding: var(--space-6) 0;
  border-top: 1px solid var(--color-border);
  color: var(--color-text-muted);
  font-size: var(--text-sm);
}

/* --- Komponenten --- */
.card {
  background: var(--color-surface);
  border: 1px solid var(--color-border);
  border-radius: var(--radius-md);
  padding: var(--space-6);
  box-shadow: var(--shadow-sm);
}

.button {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  padding: var(--space-2) var(--space-4);
  background: var(--color-brand);
  color: #fff;
  border: none;
  border-radius: var(--radius-sm);
  font-weight: var(--weight-bold);
  cursor: pointer;
  text-decoration: none;
}
.button:hover { background: var(--color-brand-hover); color: #fff; }
.button:focus-visible { outline: 3px solid var(--color-accent); outline-offset: 2px; }

/* --- Accessibility --- */
:where(a, button, input, select, textarea):focus-visible {
  outline: 3px solid var(--color-accent);
  outline-offset: 2px;
}
.visually-hidden {
  position: absolute; width: 1px; height: 1px;
  padding: 0; margin: -1px; overflow: hidden;
  clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; transition-duration: 0.01ms !important; }
}
