/* ==========================================================================
   LAG Arbeit Schleswig-Holstein – statische Website
   Design-Tokens zuerst: Farben, Typografie und Abstände lassen sich über
   wenige Variablen steuern (z. B. wenn das neue Logo andere Farben bringt).
   ========================================================================== */

/* ---------- Schrift: Open Sans, selbst gehostet (latin, DSGVO) ---------- */
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("fonts/open-sans-latin-400-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("fonts/open-sans-latin-600-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Open Sans";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("fonts/open-sans-latin-700-normal.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

/* ---------- Design-Tokens ---------- */
:root {
  /* Farben */
  --color-bg: #ffffff;
  --color-text: #000000;
  --color-text-muted: #3d3d3d;          /* 10,9:1 auf Weiß */
  --color-surface: #f6f6f6;             /* sehr dezenter grauer Kasten */
  --color-border: #dcdcdc;

  --color-accent: #ff6111;              /* Orange: nur Flächen, Buttons (mit schwarzer Schrift), Markierungen. Auf Weiß nur 3,0:1 */
  --color-accent-hover: #e5540a;
  --color-accent-text: #b83f00;         /* Orange für normalgroßen Text, 5,6:1 auf Weiß */
  --color-primary: #0066df;             /* Blau: Links und Fokus, 5,3:1 auf Weiß, 4,9:1 auf Grau */
  --color-primary-dark: #004aa3;        /* Link-Hover */
  --color-focus: var(--color-primary);

  /* Typografie */
  --font-heading: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --font-body: "Open Sans", system-ui, -apple-system, "Segoe UI", Arial, sans-serif;
  --line-height-base: 1.6;

  /* Fluide Schriftgrößen (Utopia-Formel: 320–1240 px, 16→18 px, Skala 1,2→1,25) */
  --step--1: clamp(0.8333rem, 0.8101rem + 0.1159vw, 0.9rem);
  --step-0: clamp(1rem, 0.9565rem + 0.2174vw, 1.125rem);
  --step-1: clamp(1.2rem, 1.1283rem + 0.3587vw, 1.4062rem);
  --step-2: clamp(1.44rem, 1.3295rem + 0.5527vw, 1.7578rem);
  --step-3: clamp(1.728rem, 1.5648rem + 0.8161vw, 2.1973rem);
  --step-4: clamp(2.0736rem, 1.8395rem + 1.1704vw, 2.7466rem);

  /* Abstand */
  --rhythm: 1rem;
  --space-section: clamp(2.5rem, 1.9rem + 3vw, 4.5rem);
  --gutter: clamp(1rem, 0.5rem + 2.5vw, 2rem);
  --content-width: 68rem;
  --radius: 4px;
}

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

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

body {
  margin: 0;
  background: var(--color-bg);
  color: var(--color-text);
  font-family: var(--font-body);
  font-size: var(--step-0);
  line-height: var(--line-height-base);
}

img { max-width: 100%; height: auto; }

h1, h2, h3 {
  margin: 0 0 calc(var(--rhythm) * 0.75);
  font-family: var(--font-heading);
  font-weight: 700;
  line-height: 1.2;
}
h1 { font-size: var(--step-3); }
h2 { font-size: var(--step-2); }
h3 { font-size: var(--step-1); }

p, ul, ol { margin: 0 0 var(--rhythm); }

a {
  color: var(--color-primary);
  text-decoration: underline;
  text-decoration-thickness: 0.08em;
  text-underline-offset: 0.15em;
}
a:hover {
  color: var(--color-primary-dark);
  text-decoration-thickness: 0.14em;
}

:focus-visible {
  outline: 3px solid var(--color-focus);
  outline-offset: 3px;
}
main:focus { outline: none; }

.container {
  width: min(100% - 2 * var(--gutter), var(--content-width));
  margin-inline: auto;
}

.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;
}

/* ---------- Skip-Link ---------- */
.skip-link {
  position: absolute;
  top: -5rem;
  left: var(--gutter);
  z-index: 100;
  padding: 0.75rem 1rem;
  background: #000;
  color: #fff;
  font-weight: 600;
  border-radius: 0 0 var(--radius) var(--radius);
}
.skip-link:hover { color: #fff; }
.skip-link:focus { top: 0; }

/* ---------- Header und Navigation ---------- */
.site-header { border-bottom: 1px solid var(--color-border); }

.site-header__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--rhythm) calc(var(--rhythm) * 2);
  padding-block: var(--rhythm);
}

.brand {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  color: var(--color-text);
  text-decoration: none;
}
.brand:hover { color: var(--color-text); }
.brand:hover .brand__name { text-decoration: underline; }
.brand__text { display: flex; flex-direction: column; }
.brand__name { font-size: 1.25rem; font-weight: 700; line-height: 1.2; }
.brand__claim { font-size: 0.875rem; color: var(--color-text-muted); }

.nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 0.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0 0.875rem;
  border-bottom: 3px solid transparent;
  color: var(--color-text);
  font-size: 1rem;
  font-weight: 600;
  text-decoration: none;
}
.nav__link:hover { border-bottom-color: var(--color-primary); color: var(--color-text); }
.nav__link[aria-current="page"] { border-bottom-color: var(--color-accent); }

/* ---------- Inhalt ---------- */
.section { padding-block: calc(var(--space-section) * 0.6); }
.section--first { padding-top: var(--space-section); }

.prose { max-width: 68ch; }
.prose h2 { margin-top: calc(var(--rhythm) * 2); font-size: var(--step-1); }
.prose h3 { margin-top: calc(var(--rhythm) * 1.5); font-size: var(--step-0); }

.intro__lead { max-width: 60ch; font-size: var(--step-1); line-height: 1.5; }
.intro__text { max-width: 68ch; }

/* Teaser: 3 × 1/3, per Modifier auch 2/3 + 1/3 */
.teasers {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: calc(var(--rhythm) * 1.5);
}
.teasers--2-1 { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }

.teaser {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  padding: calc(var(--rhythm) * 1.5);
  background: var(--color-surface);
  border-radius: var(--radius);
}
.teaser__title { font-size: var(--step-1); }
.teaser__text { flex-grow: 1; }

.button {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
  padding: 0.5rem 1.25rem;
  border-radius: var(--radius);
  background: var(--color-accent);
  color: var(--color-text);
  font-weight: 700;
  text-decoration: none;
  transition: background-color 0.2s ease;
}
.button:hover { background: var(--color-accent-hover); color: var(--color-text); }

/* Aktuelles */
.aktuelles {
  min-height: 9rem;                      /* verhindert Layout-Sprung beim Nachladen */
  padding: calc(var(--rhythm) * 1.5);
  background: var(--color-surface);
  border-radius: var(--radius);
}
.aktuelles__liste { margin: 0; padding-left: 1.25rem; }
.aktuelles__liste li { margin-bottom: 0.5rem; }
.aktuelles__liste li::marker { color: var(--color-accent); }
.aktuelles__datum { margin-right: 0.5em; font-weight: 700; }

/* Hinweisbox (Platzhalter, Fehlermeldungen) */
.hinweis {
  margin: 0 0 calc(var(--rhythm) * 1.5);
  padding: var(--rhythm) calc(var(--rhythm) * 1.25);
  background: var(--color-surface);
  border-left: 4px solid var(--color-accent);
}
.hinweis > :last-child { margin-bottom: 0; }
.hinweis ul { margin-top: 0.5rem; padding-left: 1.25rem; }

/* ---------- Footer ---------- */
.site-footer {
  margin-top: var(--space-section);
  padding-block: calc(var(--rhythm) * 1.5);
  border-top: 1px solid var(--color-border);
  font-size: 0.9375rem;
}
.site-footer__inner {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem calc(var(--rhythm) * 2);
}
.site-footer__copy { margin: 0; }
.footer-nav__list {
  display: flex;
  flex-wrap: wrap;
  gap: 0 1.25rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.footer-nav__link {
  display: inline-flex;
  align-items: center;
  min-height: 44px;
}
.footer-nav__link[aria-current="page"] { font-weight: 700; }

/* ---------- Scroll-Reveal (dezent, nur mit JS aktiv) ---------- */
.js .reveal {
  opacity: 0;
  transform: translateY(28px);
  transition: opacity 0.7s ease, transform 0.7s ease;
}
.js .reveal.visible { opacity: 1; transform: translateY(0); }
.reveal-delay-1 { transition-delay: 0.1s; }
.reveal-delay-2 { transition-delay: 0.2s; }

/* ---------- Responsive ---------- */
@media (max-width: 52rem) {
  .teasers,
  .teasers--2-1 { grid-template-columns: minmax(0, 1fr); }
}

/* ---------- Reduzierte Bewegung: sofort Endzustand ---------- */
@media (prefers-reduced-motion: reduce) {
  .js .reveal {
    opacity: 1;
    transform: none;
    transition: none;
  }
  .button { transition: none; }
  html { scroll-behavior: auto; }
}
