/* ==========================================================================
   Graskind – Grundlagen: Reset, Typografie, Papierflächen, CI-Balken
   ========================================================================== */

*, *::before, *::after { box-sizing: border-box; }
html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
}
body {
  margin: 0;
  min-height: 100vh;
  font-family: var(--font);
  font-size: var(--fs-body);
  line-height: 1.6;
  color: var(--ink);
  background-color: var(--paper);
  background-image: var(--tex-grain), var(--tex-fibers);
  background-size: 128px, 512px;
  font-kerning: normal;
  font-variant-ligatures: common-ligatures contextual;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}
img, svg, video, canvas { display: block; max-width: 100%; }
img { height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--gk-green-deep); text-decoration-thickness: .08em; text-underline-offset: .18em; }
a:hover { color: var(--gk-green); }
h1, h2, h3, h4 { margin: 0; line-height: 1.05; font-weight: 800; letter-spacing: -.025em; text-wrap: balance; }
p { margin: 0 0 1em; text-wrap: pretty; }
ul, ol { padding-left: 1.2em; }
address { font-style: normal; }
dialog { color: inherit; }
main:focus { outline: none; }
[hidden] { display: none !important; }

:focus-visible { outline: none; box-shadow: var(--focus); border-radius: 4px; }
.on-dark :focus-visible, :focus-visible.on-dark { box-shadow: 0 0 0 3px var(--night), 0 0 0 6px var(--gk-yellow); }

.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: fixed; left: 12px; top: 12px; z-index: 1000;
  padding: .75rem 1.1rem; border-radius: var(--radius);
  background: var(--gk-green-deep); color: #fff; font-weight: 700; text-decoration: none;
  transform: translateY(calc(-100% - 90px)); transition: transform .2s var(--ease-out);
}
.skip-link + .skip-link { top: 64px; transform: translateY(calc(-100% - 150px)); }
.skip-link:focus { transform: none; color: #fff; }

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

/* ---------- Typografie-Bausteine ---------- */
.display { font-size: var(--fs-display); line-height: .94; letter-spacing: -.035em; }
.h2 { font-size: var(--fs-h2); line-height: .98; letter-spacing: -.03em; }
.h3 { font-size: var(--fs-h3); line-height: 1.12; letter-spacing: -.015em; }
.lead { font-size: var(--fs-lead); line-height: 1.5; color: var(--ink-soft); max-width: 36ch; }
.kicker {
  display: inline-flex; align-items: center; gap: .6em;
  margin: 0 0 1.1rem; font-size: var(--fs-label); font-weight: 700;
  letter-spacing: .14em; text-transform: uppercase; color: var(--gk-green-deep);
}
.kicker__num {
  display: inline-grid; place-items: center; min-width: 2.2em; height: 2.2em; padding: 0 .4em;
  border-radius: 99px; background: var(--gk-green); color: #fff; letter-spacing: .02em;
  font-variant-numeric: tabular-nums;
}
.muted { color: var(--ink-mute); }
.small { font-size: var(--fs-small); }
.tnum { font-variant-numeric: tabular-nums; }

/* ---------- CI-Balken: farbige Fläche hinter kurzen Aussagen ---------- */
.bar {
  --bar-bg: var(--gk-green);
  --bar-fg: #fff;
  color: var(--bar-fg);
  background-image: linear-gradient(var(--bar-bg), var(--bar-bg));
  background-repeat: no-repeat;
  background-position: 0 0;
  background-size: 100% 100%;
  padding: .04em .2em .1em;
  margin-inline: -.04em;
  -webkit-box-decoration-break: clone;
  box-decoration-break: clone;
}
.bar--light { --bar-bg: var(--gk-green-light); --bar-fg: var(--gk-green-ink); }
.bar--yellow { --bar-bg: var(--gk-yellow); --bar-fg: var(--ink); }
.bar--paper { --bar-bg: var(--paper-white); --bar-fg: var(--gk-green-ink); }
.bar--ink { --bar-bg: var(--ink); --bar-fg: var(--paper-white); }
/* Einblenden, sobald sichtbar (nur mit JS + Bewegung) */
.motion-ok .bar[data-reveal] {
  transition: background-size 1s var(--ease-out), color .4s ease .45s;
}
.motion-ok .bar[data-reveal]:not(.is-in) { background-size: 0% 100%; color: inherit; }

/* ---------- Papierflächen ---------- */
.paper {
  background-color: var(--paper);
  background-image: var(--tex-grain), var(--tex-fibers);
  background-size: 128px, 512px;
}
.paper-sheet {
  background-color: var(--paper-white);
  background-image: var(--tex-grain), var(--tex-fibers);
  background-size: 128px, 512px;
  box-shadow: var(--shadow-2);
}

/* Gerissene Papierkante oben an Kapiteln */
.deckle {
  position: absolute; left: 0; right: 0; top: 0; height: 28px;
  transform: translateY(-27px); color: var(--edge-color, var(--paper));
  pointer-events: none; z-index: 2;
  filter: drop-shadow(0 -6px 6px rgba(40, 28, 6, .10));
}
.deckle svg { width: 100%; height: 100%; }

/* ---------- Reduzierte Bewegung ---------- */
/* Ohne JS gilt die Systemeinstellung; mit JS entscheidet allein der Schalter „3D-Effekte“ (Standard: an – Entscheidung des Auftraggebers vom 02.10.2026). */
@media (prefers-reduced-motion: reduce) {
  html:not(.js) *, html:not(.js) *::before, html:not(.js) *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
.reduce-motion *, .reduce-motion *::before, .reduce-motion *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
html.motion-ok { scroll-behavior: smooth; }
