/* BeerenKlima 2.0 — Reset + Base Typography */

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

html {
  -webkit-text-size-adjust: 100%;
  text-rendering: optimizeLegibility;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  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;
    scroll-behavior: auto !important;
  }
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--font-body);
  font-size: var(--step-0);
  font-weight: 400;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

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

a {
  color: var(--primary);
  text-decoration-color: oklch(from var(--primary) l c h / 0.35);
  text-underline-offset: 0.18em;
  text-decoration-thickness: 1px;
  transition: color var(--dur-fast) var(--ease-out),
              text-decoration-color var(--dur-fast) var(--ease-out);
}
a:hover { color: var(--accent); text-decoration-color: var(--accent); }

h1, h2, h3, h4 {
  font-family: var(--font-display);
  font-weight: 400;
  letter-spacing: -0.018em;
  line-height: 1.08;
  margin: 0;
  color: var(--ink);
  text-wrap: balance;
}

h1 { font-size: var(--step-5); }
h2 { font-size: var(--step-4); line-height: 1.1; }
h3 { font-size: var(--step-2); line-height: 1.2; letter-spacing: -0.012em; }
h4 { font-size: var(--step-1); line-height: 1.3; letter-spacing: -0.006em; }

p {
  margin: 0;
  text-wrap: pretty;
  max-width: var(--reading);
}

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

button {
  font: inherit;
  cursor: pointer;
  background: none;
  border: 0;
  color: inherit;
  padding: 0;
}

::selection { background: var(--accent); color: var(--ink-invert); }

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

/* Skip link */
.skip-link {
  position: absolute;
  top: -100px;
  left: var(--space-4);
  background: var(--ink);
  color: var(--ink-invert);
  padding: var(--space-3) var(--space-4);
  border-radius: var(--radius-sm);
  text-decoration: none;
  z-index: var(--z-modal);
  font-weight: 500;
  transition: top var(--dur-fast) var(--ease-out);
}
.skip-link:focus { top: var(--space-4); color: var(--ink-invert); }

/* Container */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 1rem + 1.6vw, 2rem);
}
.container--narrow { max-width: var(--container-narrow); }

/* Section padding */
.section { padding-block: var(--space-9); }
.section--lg { padding-block: var(--space-10); }

/* Tonal section backgrounds */
.section--paper { background: var(--surface); }
.section--panel { background: var(--surface-2); }
.section--deep  { background: var(--surface-deep); color: var(--ink-invert); }
.section--deep h1, .section--deep h2, .section--deep h3, .section--deep h4 { color: var(--ink-invert); }
.section--deep p { color: var(--muted-invert); }
.section--deep a { color: var(--ink-invert); text-decoration-color: var(--accent); }
.section--deep a:hover { color: var(--accent-soft); }

/* Lead */
.lead {
  font-family: var(--font-display);
  font-weight: 300;
  font-style: italic;
  font-size: var(--step-1);
  line-height: 1.45;
  color: var(--ink-soft);
  max-width: 56ch;
}
.section--deep .lead { color: var(--muted-invert); }

/* Eyebrow — used sparingly, NOT on every section. Only on Aktuelles "Aktuell" tag. */
.tag {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
  font-family: var(--font-body);
  font-weight: 600;
  font-size: var(--step--1);
  letter-spacing: 0.04em;
  color: var(--accent);
  text-transform: uppercase;
}
.tag::before {
  content: '';
  width: 6px; height: 6px;
  background: var(--accent);
  border-radius: 999px;
  flex: none;
}

/* Section header */
.section-head { display: grid; gap: var(--space-5); margin-block-end: var(--space-8); }
.section-head h2 { max-width: 22ch; }
.section-head .lead { max-width: 60ch; }

@media (min-width: 880px) {
  .section-head--split {
    grid-template-columns: 1.1fr 1fr;
    gap: var(--space-8);
    align-items: end;
  }
  .section-head--split .lead { margin-block-start: 0; }
}

/* Utility */
.tabular { font-variant-numeric: tabular-nums; }
.flow > * + * { margin-block-start: var(--space-5); }
.flow-tight > * + * { margin-block-start: var(--space-3); }
