/* smartline Starter — Basis: Reset, Typografie, Links, Fokus, Formulare */

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

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

@media (prefers-reduced-motion: no-preference) {
  html {
    scroll-behavior: smooth;
  }
}

body {
  margin: 0;
  background: var(--color-background);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--font-size-base);
  line-height: var(--line-height-base);
  hyphens: auto;
  overflow-wrap: break-word;
}

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

/* Überschriften */
h1, h2, h3, h4 {
  margin: 0 0 var(--space-s);
  font-family: var(--font-heading);
  font-weight: 600;
  line-height: 1.2;
  color: var(--color-text);
  hyphens: manual;
  text-wrap: balance;
}

h1 { font-size: var(--font-size-h1); }
h2 { font-size: var(--font-size-h2); }
h3 { font-size: var(--font-size-h3); }
h4 { font-size: 1.125rem; }

p, ul, ol, dl, table, figure, blockquote {
  margin: 0 0 var(--space-s);
}

ul, ol {
  padding-left: 1.25em;
}

li + li {
  margin-top: 0.25em;
}

strong { font-weight: 600; }

/* Links */
a {
  color: var(--color-primary);
  text-decoration-thickness: 1px;
  text-underline-offset: 0.2em;
}

a:hover {
  text-decoration-thickness: 2px;
}

/* Fokus — sichtbar für Tastaturnutzung, unsichtbar bei Mausklick */
:focus {
  outline: none;
}

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

/* Hilfsklassen */
.invisible,
.visually-hidden {
  position: absolute !important;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.skip-link {
  position: absolute;
  top: var(--space-xs);
  left: var(--space-xs);
  z-index: 100;
  padding: var(--space-xs) var(--space-s);
  background: var(--color-primary);
  color: var(--color-primary-contrast);
  border-radius: var(--radius-button);
  transform: translateY(-200%);
}

.skip-link:focus {
  transform: none;
}

/* Tabellen */
table {
  width: 100%;
  border-collapse: collapse;
}

th, td {
  padding: var(--space-xs) var(--space-s) var(--space-xs) 0;
  border-bottom: 1px solid var(--color-border);
  text-align: left;
  vertical-align: top;
}

/* Formulare (Contao-Formulargenerator) */
label {
  display: block;
  margin-bottom: 0.25rem;
  font-weight: 600;
}

input:not([type="checkbox"], [type="radio"], [type="submit"]),
select,
textarea {
  width: 100%;
  padding: 0.65rem 0.75rem;
  border: 1px solid var(--color-border);
  border-radius: var(--radius-button);
  background: #fff;
  color: inherit;
  font: inherit;
}

textarea {
  min-height: 9rem;
  resize: vertical;
}

.widget {
  margin-bottom: var(--space-s);
}

.widget-checkbox label,
.widget-radio label {
  display: inline;
  font-weight: 400;
}

button,
[type="submit"] {
  font: inherit;
  cursor: pointer;
}

.error {
  color: #a4262c;
}
