/* Grundlagen: Reset, Typografie, Seitenlayout */

*,
*::before,
*::after {
  box-sizing: border-box;
}

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  -webkit-tap-highlight-color: transparent;
}

body {
  margin: 0;
  min-height: 100dvh;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-family);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-body);
  line-height: var(--line-height-body);
  -webkit-font-smoothing: antialiased;
  overscroll-behavior-y: none;
}

h1,
h2,
h3,
p {
  margin: 0;
}

/* Überschriften und Begrüßung */
h2 {
  font-size: var(--font-size-heading);
  font-weight: var(--font-weight-heading);
  letter-spacing: var(--letter-spacing-heading);
  line-height: 1.1;
}

/* Titel in Kopfzeile und Karten */
h1,
.card h2,
.dialog h2 {
  font-size: var(--font-size-title);
  font-weight: var(--font-weight-title);
  letter-spacing: -0.02em;
  line-height: 1.2;
}

button {
  font: inherit;
  color: inherit;
  background: none;
  border: 0;
  padding: 0;
  cursor: pointer;
  touch-action: manipulation;
}

a {
  color: inherit;
}

/* hidden muss auch gegen display: flex oder grid gewinnen */
[hidden] {
  display: none !important;
}

:focus-visible {
  outline: 2px solid var(--color-text);
  outline-offset: 2px;
}

/* Hilfsklassen für Typografie */
.number {
  font-size: var(--font-size-number);
  font-weight: var(--font-weight-number);
  font-variant-numeric: tabular-nums;
  letter-spacing: var(--letter-spacing-number);
  line-height: var(--line-height-number);
  /* Ab 40 px optische Größe für Display-Zahlen */
  font-variation-settings: "opsz" 32;
}

.label {
  font-size: var(--font-size-label);
  font-weight: var(--font-weight-label);
  text-transform: uppercase;
  letter-spacing: var(--letter-spacing-label);
  color: var(--color-text-secondary);
}

/* Im oberen Aura-Bereich: Ink mit Deckkraft statt Ink-2 */
.on-aura {
  color: var(--ink-aura);
}

.secondary {
  color: var(--color-text-secondary);
}

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

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