/* ==========================================================================
   SchadenzentrumNRW — Basis-Stylesheet
   Tokens, Reset, Typografie, Header, Footer, Buttons, Cards, Prose.
   Seitenspezifisches gehört in home.css / kontakt.css / legal.css.
   ========================================================================== */

/* --- Schriften (selbst gehostet, keine Requests an Dritte) --------------- */

@font-face {
  font-family: 'Archivo';
  font-style: normal;
  font-weight: 600 800;
  font-display: swap;
  src: url('/assets/fonts/archivo-variable.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-400.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-500.woff2') format('woff2');
}

@font-face {
  font-family: 'IBM Plex Sans';
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url('/assets/fonts/ibm-plex-sans-600.woff2') format('woff2');
}

/* --- Tokens -------------------------------------------------------------- */

:root {
  /* Flächen */
  --ink: #0B0F14;
  --bg: #F4F6F8;
  --surface: #FFFFFF;
  --surface-2: #F7F9FB;
  --surface-3: #FAFBFC;

  /* Text */
  --text: #0B0F14;
  --text-2: #3C4652;
  --text-3: #5A6472;
  --text-4: #6B7683;
  --text-mono: #8B95A1;
  --on-ink: #FFFFFF;
  --on-ink-2: #B8C4D0;
  --on-ink-3: #8E9CAB;
  --on-ink-link: #C3CDD8;

  /* Akzent */
  --blue: #0E6FD6;
  --blue-dark: #0A55A6;
  --blue-light: #2E9BF0;
  --blue-pale: #E7F1FC;
  --blue-on-dark: #BEDCFA;

  /* Linien */
  --line: #DDE3E9;
  --line-2: #E3E8ED;
  --line-3: #E9EDF1;
  --line-dashed: #C8D1DA;

  /* Typo */
  --font-display: 'Archivo', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-body: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, 'SF Mono', Consolas, monospace;

  /* Maße */
  --container: 1180px;
  --prose: 820px;
  --gutter: 20px;
  --radius-sm: 4px;
  --radius: 6px;
  --radius-lg: 8px;
  --radius-pill: 999px;
}

@media (min-width: 720px) {
  :root { --gutter: 24px; }
}

/* --- Reset --------------------------------------------------------------- */

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

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

@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *,
  *::before,
  *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

body {
  margin: 0;
  background: var(--surface);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

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

h1, h2, h3, h4 {
  font-family: var(--font-display);
  letter-spacing: -0.015em;
  line-height: 1.15;
  margin: 0;
  text-wrap: balance;
}

p { margin: 0; text-wrap: pretty; }

a {
  color: var(--blue);
  text-decoration: none;
}

a:hover { color: var(--blue-dark); }

button { font: inherit; }

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

/* --- Fokus & Skip-Link --------------------------------------------------- */

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

.skip {
  position: absolute;
  left: -9999px;
  top: 0;
  z-index: 100;
  background: var(--blue);
  color: #fff;
  font-weight: 600;
  padding: 12px 20px;
  border-radius: 0 0 var(--radius-sm) 0;
}

.skip:focus {
  left: 0;
  color: #fff;
}

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

/* --- Layout -------------------------------------------------------------- */

.container {
  width: 100%;
  max-width: var(--container);
  margin: 0 auto;
  padding-left: var(--gutter);
  padding-right: var(--gutter);
}

.container--prose { max-width: var(--prose); }

.section { padding: 56px 0; }

@media (min-width: 720px) {
  .section { padding: 72px 0; }
}

.section--ink {
  background: var(--ink);
  color: var(--on-ink);
}

.section--tint { background: var(--bg); }

/* --- Header -------------------------------------------------------------- */

.site-header {
  background: var(--surface);
  border-bottom: 1px solid var(--line-2);
  position: sticky;
  top: 0;
  z-index: 40;
}

.site-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding-top: 10px;
  padding-bottom: 10px;
}

.site-header__logo {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.site-header__logo img {
  height: 40px;
  width: auto;
}

@media (min-width: 720px) {
  .site-header__logo img { height: 44px; }
}

.site-nav {
  display: none;
  align-items: center;
  gap: 24px;
}

.site-nav a {
  font-size: 15px;
  font-weight: 500;
  color: var(--text-3);
}

.site-nav a:hover,
.site-nav a[aria-current] { color: var(--ink); }

.site-nav a[aria-current] { font-weight: 600; }

@media (min-width: 900px) {
  .site-nav { display: flex; }
}

.site-header__cta {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--blue);
  color: #fff;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 15px;
  padding: 11px 18px;
  border-radius: var(--radius-sm);
  white-space: nowrap;
}

.site-header__cta:hover {
  background: var(--blue-dark);
  color: #fff;
}

/* --- Footer -------------------------------------------------------------- */

.site-footer {
  background: var(--ink);
  color: var(--on-ink-3);
  font-size: 14px;
}

.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  gap: 20px 24px;
  align-items: center;
  justify-content: space-between;
  padding-top: 40px;
  padding-bottom: 40px;
}

.site-footer a { color: var(--on-ink-link); }

.site-footer a:hover { color: #fff; }

.site-footer__links {
  display: flex;
  flex-wrap: wrap;
  gap: 16px 24px;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  font-family: var(--font-display);
  font-weight: 700;
  font-size: 16px;
  line-height: 1.2;
  padding: 15px 26px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  cursor: pointer;
  text-align: center;
  transition: background-color 0.15s, color 0.15s, border-color 0.15s;
}

.btn--primary {
  background: var(--blue);
  color: #fff;
}

.btn--primary:hover {
  background: var(--blue-dark);
  color: #fff;
}

.btn--ghost {
  background: var(--surface);
  color: var(--text-2);
  border-color: var(--line);
}

.btn--ghost:hover {
  border-color: var(--ink);
  color: var(--ink);
}

.btn--on-ink {
  background: rgba(255, 255, 255, 0.14);
  border-color: rgba(255, 255, 255, 0.5);
  color: #fff;
  font-weight: 600;
  font-family: var(--font-body);
}

.btn--on-ink:hover {
  background: #fff;
  color: var(--blue);
}

.btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
}

/* --- Chips (Auswahl-Buttons) --------------------------------------------- */

.chip {
  padding: 11px 20px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--line);
  background: var(--surface);
  color: #2A3441;
  font-size: 15px;
  font-weight: 500;
  cursor: pointer;
  transition: background-color 0.15s, border-color 0.15s, color 0.15s;
}

.chip:hover { border-color: var(--blue); }

.chip[aria-pressed="true"],
.chip--on {
  background: var(--blue);
  border-color: var(--blue);
  color: #fff;
}

.chip-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

/* --- Cards --------------------------------------------------------------- */

.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius-lg);
  padding: 28px;
}

.card--tint { background: var(--surface-2); }

.card--ink {
  background: var(--ink);
  color: var(--on-ink);
  border-color: var(--ink);
}

.card--note {
  border: 1px dashed var(--line-dashed);
  border-radius: var(--radius);
  background: var(--surface-3);
  padding: 22px 24px;
}

/* --- Text-Bausteine ------------------------------------------------------ */

.eyebrow {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--blue);
  margin: 0 0 16px;
}

.section--ink .eyebrow,
.card--ink .eyebrow { color: var(--blue-light); }

.hero__title {
  font-weight: 800;
  font-size: clamp(34px, 7vw, 52px);
  line-height: 1.06;
  letter-spacing: -0.02em;
}

.hero__lead {
  font-size: 17px;
  line-height: 1.6;
  color: var(--on-ink-2);
  max-width: 56ch;
  margin-top: 18px;
}

@media (min-width: 720px) {
  .hero__lead { font-size: 18px; }
}

.mono-note {
  font-family: var(--font-mono);
  font-size: 12px;
  letter-spacing: 0.06em;
  color: var(--text-mono);
}

/* --- Prose (Rechtstexte, Fließtext) -------------------------------------- */

.prose {
  font-size: 16px;
  line-height: 1.75;
  color: var(--text-2);
}

@media (min-width: 720px) {
  .prose { font-size: 17px; }
}

.prose > * + * { margin-top: 18px; }

.prose h2 {
  font-size: 22px;
  margin-top: 40px;
  color: var(--text);
}

.prose h3 {
  font-size: 18px;
  margin-top: 28px;
  color: var(--text);
}

.prose ul,
.prose ol {
  margin: 0;
  padding-left: 22px;
}

.prose li + li { margin-top: 8px; }

.prose table {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

.prose th,
.prose td {
  text-align: left;
  vertical-align: top;
  padding: 10px 12px;
  border-bottom: 1px solid var(--line-3);
}

.prose th {
  font-family: var(--font-display);
  font-weight: 700;
  color: var(--text);
}

.table-wrap {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}

/* --- Utilities ----------------------------------------------------------- */

.stack { display: grid; }
.stack--8 { gap: 8px; }
.stack--12 { gap: 12px; }
.stack--16 { gap: 16px; }
.stack--24 { gap: 24px; }
.stack--40 { gap: 40px; }

.grid { display: grid; gap: 20px; }

@media (min-width: 720px) {
  .grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (min-width: 1024px) {
  .grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}

.tel-link {
  font-family: var(--font-display);
  font-weight: 800;
  font-size: 26px;
  letter-spacing: -0.01em;
  color: inherit;
}

.tel-link:hover { color: inherit; text-decoration: underline; }
