/* ==========================================================================
   NOC Grove · Basis: Reset, Typografie, Layout-Primitive, Komponenten
   ========================================================================== */

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: calc(var(--header-h) + 1rem);
}

body {
  margin: 0;
  background: var(--c-white);
  color: var(--c-text);
  font-family: var(--f-sans);
  font-size: var(--t-body);
  font-variation-settings: 'wdth' var(--wd-text);
  line-height: var(--lh-body);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: clip;
}

h1, h2, h3, h4, h5, h6 { margin: 0; text-wrap: balance; font-weight: 700; }
p, ul, ol, dl, figure, table, blockquote { margin: 0; }
p { text-wrap: pretty; }
img, svg, video, canvas { display: block; max-width: 100%; height: auto; }
button, input, select, textarea { font: inherit; color: inherit; }
ul[class], ol[class] { list-style: none; padding: 0; }
:where(a) { color: var(--link); }

/* Deutsche Komposita sauber umbrechen */
:lang(de) p, :lang(de) li, :lang(de) dd { hyphens: auto; }

/* --- Fokus --------------------------------------------------------------- */
:focus-visible {
  outline: var(--focus);
  outline-offset: var(--focus-off);
  border-radius: var(--r-1);
}
:where(a, button, input, select, textarea, summary, [tabindex]):focus:not(:focus-visible) {
  outline: none;
}

.skip {
  position: absolute;
  left: var(--s-4);
  top: -100%;
  z-index: 200;
  padding: var(--s-3) var(--s-5);
  background: var(--c-orange);
  color: var(--c-ink);
  font-weight: 700;
  text-decoration: none;
  transition: top var(--d-fast) var(--e-out);
}
.skip:focus { top: var(--s-4); }

.vh {
  position: absolute !important;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip-path: inset(50%);
  white-space: nowrap;
}

/* ==========================================================================
   Layout-Primitive
   ========================================================================== */

.sec {
  background: var(--bg);
  color: var(--fg);
  padding-block: var(--s-sec);
  position: relative;
}
.sec--tight { padding-block: calc(var(--s-sec) * .6); }

/* Full-Bleed: laeuft randlos ueber die volle Viewportbreite, ohne Body-Scroll */
.bleed {
  width: 100vw;
  margin-inline: calc(50% - 50vw);
}

.wrap    { width: min(100% - 2 * var(--s-gut), var(--w-content)); margin-inline: auto; }
.wrap--wide   { width: min(100% - 2 * var(--s-gut), var(--w-wide)); margin-inline: auto; }
.wrap--narrow { width: min(100% - 2 * var(--s-gut), var(--w-narrow)); margin-inline: auto; }
.prose   { max-width: var(--w-prose); }

.stack-2 > * + * { margin-block-start: var(--s-2); }
.stack-3 > * + * { margin-block-start: var(--s-3); }
.stack-4 > * + * { margin-block-start: var(--s-4); }
.stack-5 > * + * { margin-block-start: var(--s-5); }
.stack-6 > * + * { margin-block-start: var(--s-6); }
.stack-7 > * + * { margin-block-start: var(--s-7); }

.cluster { display: flex; flex-wrap: wrap; gap: var(--s-4); align-items: center; }
.cluster--tight { gap: var(--s-2); }

/* ==========================================================================
   Typografie-Klassen
   ========================================================================== */

.t-display {
  font-size: var(--t-display);
  line-height: var(--lh-display);
  font-weight: 800;
  font-variation-settings: 'wdth' var(--wd-display);
  letter-spacing: -0.025em;
}
.h1 { font-size: var(--t-h1); line-height: var(--lh-h1); font-weight: 800;
      font-variation-settings: 'wdth' 112; letter-spacing: -0.02em; }
.h2 { font-size: var(--t-h2); line-height: var(--lh-h2); font-weight: 700;
      font-variation-settings: 'wdth' 108; letter-spacing: -0.015em; }
.h3 { font-size: var(--t-h3); line-height: var(--lh-h3); font-weight: 700; }
.h4 { font-size: var(--t-h4); line-height: 1.35; font-weight: 600; }
.lead { font-size: var(--t-lead); line-height: 1.5; color: var(--fg-muted); }
.small { font-size: var(--t-small); }
.muted { color: var(--fg-muted); }

/* Bemaszungs-Label: Mono, Versalien, technischer Duktus (Signature E3) */
.dim {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  font-weight: 500;
  letter-spacing: .12em;
  text-transform: uppercase;
  color: var(--fg-label);
  display: flex;
  align-items: center;
  gap: var(--s-3);
}
.dim::after {
  content: '';
  flex: 1 1 auto;
  height: 1px;
  background: currentColor;
  opacity: .35;
}
.dim--plain::after { display: none; }
.dim__no { color: var(--mark); }

.mono { font-family: var(--f-mono); font-variant-numeric: tabular-nums; }

/* Text-Links im Fliesstext */
.prose a, .rte a {
  color: var(--link);
  text-decoration: underline;
  text-underline-offset: .18em;
  text-decoration-thickness: 1px;
  transition: color var(--d-fast) var(--e-out);
}
.prose a:hover, .rte a:hover { color: var(--link-hover); text-decoration-thickness: 2px; }

.rte > * + * { margin-block-start: var(--s-4); }
.rte h2 { font-size: var(--t-h2); line-height: var(--lh-h2); font-variation-settings: 'wdth' 108;
          letter-spacing: -0.015em; margin-block-start: var(--s-8); }
.rte h3 { font-size: var(--t-h3); line-height: var(--lh-h3); margin-block-start: var(--s-6); }
.rte h2:first-child, .rte h3:first-child { margin-block-start: 0; }
.rte ul, .rte ol { padding-inline-start: var(--s-5); }
.rte li + li { margin-block-start: var(--s-2); }
.rte ul { list-style: none; padding-inline-start: 0; }
.rte ul > li { position: relative; padding-inline-start: var(--s-5); }
.rte ul > li::before {
  content: '';
  position: absolute;
  inset-inline-start: 0;
  inset-block-start: .68em;
  width: 8px; height: 1px;
  background: var(--mark);
}
.rte strong { font-weight: 700; }

/* ==========================================================================
   Grove-Raster (Signature E1) · abgeleitet aus dem Fadenkreuz im Logo
   ========================================================================== */

.grid-mark { position: relative; isolation: isolate; }
.grid-mark::before {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image:
    linear-gradient(to right, currentColor 1px, transparent 1px),
    linear-gradient(to bottom, currentColor 1px, transparent 1px);
  background-size: 96px 96px;
  color: var(--rule);
  opacity: .28;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}
/* Registermarken an den Kreuzungspunkten: das Fadenkreuz aus dem Grove-Logo */
.grid-mark--reg::after {
  content: '';
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='288' height='288'%3E%3Cpath d='M144 137.5v13M137.5 144h13' stroke='%23EC7204' stroke-width='1.25' fill='none'/%3E%3C/svg%3E");
  background-size: 288px 288px;
  background-position: 0 0;
  background-repeat: repeat;
  opacity: .85;
  mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
  -webkit-mask-image: linear-gradient(to bottom, transparent, #000 12%, #000 88%, transparent);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  padding: .78em 1.35em;
  border: 1px solid transparent;
  border-radius: var(--r-2);
  font-weight: 700;
  font-size: var(--t-small);
  line-height: 1.2;
  letter-spacing: .01em;
  text-decoration: none;
  cursor: pointer;
  transition: background-color var(--d-fast) var(--e-out),
              border-color var(--d-fast) var(--e-out),
              color var(--d-fast) var(--e-out);
}
.btn__ico { flex: none; width: 1em; height: 1em; fill: none; stroke: currentColor; stroke-width: 2; }

/* Primaer: dunkle Schrift auf Orange (6,9:1). Weisz auf Orange waere nicht konform. */
.btn--primary { background: var(--c-orange); color: var(--c-ink); }
.btn--primary:hover { background: var(--c-orange-600); color: var(--c-white); }

.btn--secondary { background: transparent; color: var(--link); border-color: currentColor; }
.btn--secondary:hover { background: var(--c-blue); color: var(--c-white); border-color: var(--c-blue); }
.t-ink .btn--secondary:hover, .t-blue .btn--secondary:hover {
  background: var(--c-white); color: var(--c-ink); border-color: var(--c-white);
}

.btn--ghost { background: transparent; color: var(--fg); border-color: var(--rule); }
.btn--ghost:hover { border-color: var(--fg); }

/* Support: bewusst neutral, nie orange (Verwechslungsschutz, MARKETING.md 8.3) */
.btn--support {
  background: transparent;
  color: var(--fg);
  border-color: var(--rule);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: var(--t-label);
  letter-spacing: .1em;
  text-transform: uppercase;
  padding: .7em 1.1em;
}
.btn--support:hover { border-color: var(--fg); background: var(--c-slate-100); }
.t-ink .btn--support:hover, .t-blue .btn--support:hover { background: rgba(255,255,255,.08); }

.btn--lg { padding: .95em 1.7em; font-size: var(--t-body); }
.btn--block { display: flex; width: 100%; justify-content: center; }

/* Telefon-Link im Header */
.tel {
  display: inline-flex;
  align-items: center;
  gap: var(--s-2);
  font-family: var(--f-mono);
  font-weight: 500;
  font-size: var(--t-small);
  color: var(--fg);
  text-decoration: none;
  white-space: nowrap;
}
.tel:hover { color: var(--c-blue); }
.tel svg { width: 1.05em; height: 1.05em; flex: none; }

/* ==========================================================================
   Karten
   ========================================================================== */

.card {
  background: var(--c-white);
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
  padding: var(--s-5);
  position: relative;
  transition: border-color var(--d-fast) var(--e-out), box-shadow var(--d-fast) var(--e-out);
}
.card:hover { border-color: var(--c-slate-400); box-shadow: var(--sh-1); }
.t-ink .card, .t-blue .card { background: var(--c-ink-800); border-color: var(--rule); }
.t-sand .card { background: rgba(255, 255, 255, .55); }

/* Ganze Karte klickbar, ohne Container-onclick */
.card__link::after { content: ''; position: absolute; inset: 0; }
.card__link { text-decoration: none; color: inherit; }
.card:has(.card__link:hover) { border-color: var(--c-blue); }
.card:has(.card__link:focus-visible) { outline: var(--focus); outline-offset: var(--focus-off); }

/* ==========================================================================
   Tabellen (GEO-5: echte Tabellen, maschinenlesbar)
   ========================================================================== */

.tablewrap {
  overflow-x: auto;
  border: 1px solid var(--rule);
  border-radius: var(--r-2);
}
.tablewrap:focus-visible { outline: var(--focus); outline-offset: var(--focus-off); }

table.data {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--t-small);
  font-variant-numeric: tabular-nums;
  background: var(--c-white);
}
table.data caption {
  text-align: left;
  padding: var(--s-4) var(--s-4) var(--s-3);
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-slate-400);
  background: var(--c-white);
  border-bottom: 1px solid var(--rule);
}
table.data th, table.data td {
  padding: var(--s-3) var(--s-4);
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--c-slate-100);
}
table.data thead th {
  background: var(--c-blue-50);
  font-weight: 700;
  border-bottom: 1px solid var(--c-blue-100);
  white-space: nowrap;
}
table.data tbody th { font-weight: 600; }
table.data tbody tr:last-child th, table.data tbody tr:last-child td { border-bottom: 0; }
table.data tbody tr:nth-child(even) th,
table.data tbody tr:nth-child(even) td { background: #FAFBFC; }
table.data .yes { color: var(--c-ok); font-weight: 700; }
table.data .no  { color: var(--c-slate-400); }
table.data .ask { color: var(--c-warn); font-style: italic; }

/* ==========================================================================
   Hinweisblock (offene Angaben ehrlich kennzeichnen)
   ========================================================================== */

.note {
  border-inline-start: 3px solid var(--c-warn);
  background: #FDF8EF;
  padding: var(--s-4) var(--s-5);
  font-size: var(--t-small);
}
.note__t {
  font-family: var(--f-mono);
  font-size: var(--t-label);
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--c-warn);
  display: block;
  margin-block-end: var(--s-2);
}
.t-ink .note, .t-blue .note { background: rgba(255, 255, 255, .06); }
.t-ink .note__t, .t-blue .note__t { color: var(--c-orange-200); }

/* Quick-Answer (GEO-1) */
.qa {
  border: 1px solid var(--rule);
  border-inline-start: 3px solid var(--c-orange);
  background: var(--c-blue-50);
  padding: var(--s-5) var(--s-6);
  max-width: var(--w-prose);
}
.qa p { font-size: var(--t-lead); line-height: 1.55; }
.t-ink .qa, .t-blue .qa { background: rgba(255, 255, 255, .05); }

/* Quick-Answer ohne Kasten.
   Die Klasse .qa bleibt bewusst stehen: sie ist der Marker fuer die
   Definitionsantwort und wird von tools/qa.py geprueft. Nur die Optik faellt
   weg, wo der Kasten neben einer wirkenden Grafik zu schwer waere. */
.qa--plain {
  border: 0;
  background: none;
  padding: 0;
}
.t-ink .qa--plain, .t-blue .qa--plain { background: none; }

/* ==========================================================================
   Bewegung: Reveal (nur transform/opacity)
   ========================================================================== */

.rv { opacity: 0; transform: translate3d(0, 18px, 0); }
.js .rv { transition: opacity var(--d-slow) var(--e-out), transform var(--d-slow) var(--e-out); }
.rv.is-in { opacity: 1; transform: none; }
html:not(.js) .rv { opacity: 1; transform: none; }

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

/* ==========================================================================
   Druck
   ========================================================================== */

@media print {
  .site-header, .site-footer, .skip, .rail__nav, .marquee, .cta-band { display: none !important; }
  body { font-size: 11pt; }
  .sec { padding-block: 1rem; }
  a[href^="http"]::after { content: ' (' attr(href) ')'; font-size: 9pt; }
}

/* ==========================================================================
   Hilfsklassen
   Ersetzen die frueheren style-Attribute, damit die Content-Security-Policy
   ohne 'unsafe-inline' auskommt. Bei einem Kunden, der seine eigene
   Technik-Hygiene als Argument fuehrt, ist das kein Detail.
   ========================================================================== */

.mw-46 { max-width: 46rem; }
.mw-48 { max-width: 48rem; }
.mw-52 { max-width: 52rem; }
.mw-54 { max-width: 54rem; }
.mw-34ch { max-width: 34ch; }
.mw-44ch { max-width: 44ch; }

.mt-4 { margin-block-start: var(--s-4); }
.mt-5 { margin-block-start: var(--s-5); }
.mt-6 { margin-block-start: var(--s-6); }
.mb-6 { margin-block-end: var(--s-6); }
.mb-3 { margin-block-end: var(--s-3); }

.plain { text-decoration: none; }
.bare  { border: 0; padding: 0; }
.nowrap-static { position: static; }

.hr {
  border: 0;
  border-top: 1px solid var(--rule);
  margin-block: var(--s-8);
}

.figures--2 { grid-template-columns: repeat(2, 1fr); }
@media (max-width: 639px) { .figures--2 { grid-template-columns: 1fr; } }

.t-display--article { --t-display: clamp(2.1rem, 1.1rem + 3.4vw, 4.1rem); }

.no { color: var(--fg-muted); }
.addr { font-style: normal; line-height: 1.7; }

blockquote.pull {
  border-inline-start: 3px solid var(--c-orange);
  padding-inline-start: var(--s-5);
  font-size: var(--t-lead);
  line-height: 1.5;
}

.spec dt.mono-acc { color: var(--c-orange); }
.gf-no { color: var(--c-orange); margin-inline-end: var(--s-3); }
.hint-warn { color: var(--c-warn); }

.partners__level { display: block; color: var(--c-orange); }
.partners__alt {
  border-top: 1px dashed var(--rule);
  padding-block-start: var(--s-3);
}

.site-footer .muted-inv { color: #AFBDC7; }
.site-footer .strong-inv { color: #fff; }
.figures .lab-inv { color: var(--fg-label); }

.spec__t a { text-decoration: none; }
.spec__t a:hover { text-decoration: underline; }
