/**
 * BASE — Reset, Element-Defaults, Typografie-Basis
 * Konsumiert ausschließlich Semantic- und Theme-Tokens.
 */

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

* {
  margin: 0;
}

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: smooth;
}

/* Kein Smooth-Scroll erzwingen, wenn der Nutzer Motion reduziert */
@media (prefers-reduced-motion: reduce) {
  html {
    scroll-behavior: auto;
  }
}

body {
  background-color: var(--background-primary);
  color: var(--text-primary);
  font-family: var(--brand-font-body);
  font-size: var(--font-size-body);
  font-weight: var(--font-weight-regular);
  line-height: var(--line-height-body-computed);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}

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

input,
button,
textarea,
select {
  font: inherit;
  color: inherit;
}

button {
  background: none;
  border: none;
  cursor: pointer;
}

a {
  color: inherit;
  text-decoration: none;
}

ul,
ol {
  list-style: none;
  padding: 0;
}

p,
h1,
h2,
h3,
h4,
h5,
h6 {
  overflow-wrap: break-word;
}

/* ==========================================================================
   TYPOGRAFIE-SKALA
   ========================================================================== */

h1,
h2,
h3,
h4,
h5,
h6,
.u-title {
  font-family: var(--brand-font-title);
  font-weight: var(--font-weight-bold);
  letter-spacing: var(--brand-title-letter-spacing);
  text-transform: var(--brand-title-transform);
  text-wrap: balance;
}

h1 {
  font-size: var(--font-size-h1);
  line-height: var(--line-height-h1-computed);
}

h2 {
  font-size: var(--font-size-h2);
  line-height: var(--line-height-h2-computed);
}

h3 {
  font-size: var(--font-size-h3);
  line-height: var(--line-height-h3-computed);
}

h4 {
  font-size: var(--font-size-h4);
  line-height: var(--line-height-h4-computed);
}

h5 {
  font-size: var(--font-size-h5);
  line-height: var(--line-height-h5-computed);
}

/* ==========================================================================
   FOKUS — sichtbar und tokenbasiert
   ========================================================================== */

:focus-visible {
  outline: var(--focus-ring-width) solid var(--focus-ring-color);
  outline-offset: var(--focus-ring-offset);
}

::selection {
  background-color: var(--theme-selection-bg);
  color: var(--theme-selection-text);
}

/* ==========================================================================
   SCROLLBAR
   ========================================================================== */

@supports (scrollbar-color: auto) {
  html {
    scrollbar-color: var(--brand-secondary-300) var(--background-primary);
  }
}
