/* ============================================================
   BASE — Reset, Typo-Grundlage, Layout-Utilities, Buttons, Formulare
   Nutzt ausschliesslich Tokens aus tokens.css.
   ============================================================ */

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

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

body {
  font-family: var(--font);
  color: var(--text);
  background: var(--bg);
  font-size: var(--fs-body);
  line-height: var(--lh-body);
  font-weight: var(--fw-regular);
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

img, svg, video { display: block; max-width: 100% }
img { height: auto }
a { color: inherit; text-decoration: none }
button { font: inherit; color: inherit; background: none; border: 0; cursor: pointer }
ul, ol { list-style: none }
table { border-collapse: collapse; width: 100% }
address { font-style: normal }

/* Icon-Sprite: liegt im Dokument, nimmt aber keinen Platz ein */
.sprite { position: absolute; width: 0; height: 0; overflow: hidden }

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

body.no-scroll { overflow: hidden }

/* ---------- Layout-Utilities ---------- */
.wrap {
  width: 100%;
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.wrap--narrow { max-width: var(--wrap-narrow) }

.section { padding: var(--section-py) 0; background: var(--bg); color: var(--text) }
.section--compact { padding: var(--section-py-compact) 0 }
.section--muted { background: var(--bg-muted) }
.section--invert { background: var(--bg) }

/* Grünfläche mit fast vollständig überdecktem Anlagenfoto – die Textur ist
   nur unterbewusst wahrnehmbar und trägt den Markenton der Referenz. */
.section--shot {
  background: var(--green);
}

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

.skip {
  position: absolute; left: var(--gutter); top: -100px; z-index: 500;
  background: var(--yellow); color: var(--green-900);
  padding: 14px 22px; font-weight: var(--fw-bold);
  transition: top var(--t);
}
.skip:focus { top: 14px }

/* ---------- Typo-Skala ---------- */
h1, h2, h3, h4 { line-height: var(--lh-head); letter-spacing: var(--ls-head); font-weight: var(--fw-black) }

.h1 { font-size: var(--fs-h1); line-height: 1.12; letter-spacing: var(--ls-tight); text-wrap: balance }
.h-display { font-size: var(--fs-display); line-height: var(--lh-tight); letter-spacing: var(--ls-display) }
.h2 { font-size: var(--fs-h2); letter-spacing: var(--ls-head); text-wrap: balance }
.h3 { font-size: var(--fs-h3); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); line-height: var(--lh-snug) }
.h4 { font-size: var(--fs-h4); font-weight: var(--fw-bold); letter-spacing: var(--ls-tight); line-height: var(--lh-snug) }

/* Signature Move: Versal-Label mit vorangestellter gelber Linie.
   Steht auf jeder Seite mindestens einmal. */
.eyebrow {
  font-size: var(--fs-label);
  font-weight: var(--fw-bold);
  letter-spacing: var(--ls-label);
  text-transform: uppercase;
  color: var(--green-600);
  display: flex;
  align-items: center;
  gap: var(--space-3);
}
.eyebrow::before {
  content: "";
  width: var(--rule-w);
  height: var(--rule-h);
  background: var(--yellow);
  flex: none;
}
.section--invert .eyebrow,
.section--shot .eyebrow,
.on-dark .eyebrow { color: var(--yellow) }

.lead { font-size: var(--fs-lead); color: var(--text-muted); line-height: var(--lh-loose); max-width: var(--measure-wide) }
.sub  { font-size: var(--fs-sub); line-height: var(--lh-body); color: var(--text-muted); max-width: var(--measure) }
.small { font-size: var(--fs-small); color: var(--text-muted) }
.note { font-size: var(--fs-xs); color: var(--text-muted); line-height: 1.55 }

.stack > * + * { margin-top: var(--space-5) }
.stack-sm > * + * { margin-top: var(--space-3) }

/* Sektionskopf: Eyebrow + H2 + Lead, zentriert oder linksbündig */
/* Kopf bekommt garantiert Abstand nach unten, damit der folgende Block
   (Akkordeon/FAQ, Rechner, Region, Karten) NIE an der Überschrift klebt –
   unabhängig davon, ob eine .spaced-Klasse gesetzt wurde (Kollisions-Schutz). */
.head { max-width: var(--measure-wide); margin-bottom: var(--space-7) }
.head .h2 { margin-top: var(--space-5) }
.head .lead { margin-top: var(--space-5) }
.head--center { margin-inline: auto; text-align: center }
.head--center .eyebrow { justify-content: center }
.head--center .lead { margin-inline: auto }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 10px;
  padding: 17px 30px;
  border-radius: var(--r-sm);
  font-weight: var(--fw-bold);
  font-size: var(--fs-md);
  letter-spacing: var(--ls-flat);
  text-align: center;
  transition: background var(--t), color var(--t), border-color var(--t), transform var(--t), box-shadow var(--t);
}
.btn svg { flex: none; transition: transform var(--t) }
.btn:hover svg { transform: translateX(4px) }
.btn:active { transform: translateY(1px) }

.btn--primary { background: var(--yellow); color: var(--green-900) }
.btn--primary:hover { background: var(--yellow-600) }

.btn--solid { background: var(--green); color: var(--white) }
.btn--solid:hover { background: var(--green-700) }

.btn--outline { background: transparent; color: var(--green); border: var(--bw-strong) solid rgb(var(--rgb-green) / .3) }
.btn--outline:hover { background: var(--green); color: var(--white); border-color: var(--green) }

.btn--ghost { background: transparent; color: var(--white); border: var(--bw-strong) solid rgb(var(--rgb-white) / .55) }
.btn--ghost:hover { background: var(--white); color: var(--green-900); border-color: var(--white) }

.btn--sm { padding: 13px 22px; font-size: var(--fs-sm)}
.btn--block { width: 100% }

.cta-row { display: flex; flex-wrap: wrap; gap: var(--space-3); margin-top: var(--space-7) }

/* Textlink mit Pfeil */
.arrowlink {
  display: inline-flex; align-items: center; gap: 9px;
  font-weight: var(--fw-bold); color: var(--green);
  border-bottom: var(--bw-strong) solid rgb(var(--rgb-green) / .25);
  padding-bottom: 3px;
  transition: color var(--t), border-color var(--t);
}
.arrowlink svg { width: 17px; height: 17px; flex: none; transition: transform var(--t) }
.arrowlink:hover { border-color: var(--yellow) }
.arrowlink:hover svg { transform: translateX(4px) }
.on-dark .arrowlink, .section--invert .arrowlink, .section--shot .arrowlink {
  color: var(--yellow); border-color: rgb(var(--rgb-yellow) / .35);
}

/* ---------- Listen ---------- */
.perks { display: grid; gap: var(--space-3) }
.perks li { display: flex; align-items: center; gap: var(--space-3); font-size: var(--fs-md); font-weight: var(--fw-semi) }
.perks svg { width: 22px; height: 22px; flex: none; color: var(--yellow) }

.checks { display: grid; grid-template-columns: 1fr 1fr; gap: 14px 26px }
.checks li { display: flex; gap: var(--space-3); font-size: var(--fs-sm); font-weight: var(--fw-semi); line-height: 1.45 }
.checks svg { width: 21px; height: 21px; flex: none; color: var(--green-600); margin-top: 1px }
.checks--single { grid-template-columns: 1fr }
.on-dark .checks svg, .section--invert .checks svg, .section--shot .checks svg { color: var(--yellow) }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 7px }
.field > label { font-size: var(--fs-small); font-weight: var(--fw-bold); letter-spacing: var(--ls-flat) }
.field__hint { font-size: var(--fs-xs); color: var(--text-muted) }

.input, .select, .textarea {
  width: 100%;
  font: inherit;
  font-size: var(--fs-md);
  color: var(--text);
  background: var(--white);
  border: var(--bw) solid var(--border-strong);
  border-radius: var(--r-sm);
  padding: 15px 16px;
  transition: border-color var(--t), box-shadow var(--t);
}
.input:hover, .select:hover, .textarea:hover { border-color: var(--green-600) }
.input:focus, .select:focus, .textarea:focus {
  outline: none; border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green);
}
.textarea { min-height: 132px; resize: vertical; line-height: var(--lh-body) }
.select { appearance: none; padding-right: 44px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--ink-60) 50%), linear-gradient(135deg, var(--ink-60) 50%, transparent 50%);
  background-position: calc(100% - 22px) 50%, calc(100% - 16px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
}

/* Auswahlkacheln statt Radio-Buttons – grössere Trefferfläche, klarer Zustand */
/* grid-auto-rows: 1fr + Kachel füllt ihre Zelle → alle Auswahlfelder eines
   Formulars sind gleich groß, egal wie lang das Label ist. */
.choices { display: grid; gap: 10px; grid-auto-rows: 1fr }
.choices--2 { grid-template-columns: 1fr 1fr }
.choices--3 { grid-template-columns: repeat(3, 1fr) }
.choice { position: relative; display: flex }
.choice input { position: absolute; inset: 0; opacity: 0; cursor: pointer }
.choice > span { flex: 1 }
.choice--block { display: block }
.choice span {
  display: flex; align-items: center; gap: 10px;
  padding: 15px 16px;
  border: var(--bw) solid var(--border-strong);
  font-weight: var(--fw-semi); font-size: var(--fs-sm);
  transition: border-color var(--t), background var(--t), color var(--t);
}
.choice input:hover + span { border-color: var(--green-600) }
.choice input:checked + span { border-color: var(--green); background: var(--green-100); color: var(--green) }
.choice input:focus-visible + span { outline: 3px solid var(--focus); outline-offset: 3px }

.consent { display: flex; gap: 12px; align-items: flex-start; font-size: var(--fs-xs); line-height: 1.55; color: var(--text-muted) }
.consent input { width: 20px; height: 20px; flex: none; margin-top: 2px; accent-color: var(--green) }
.consent a { color: var(--green); font-weight: var(--fw-bold); text-decoration: underline }

/* ---------- Bild-Platzhalter ---------- */
.ph { display: block; width: 100%; height: 100%; object-fit: cover; background: var(--green-100) }
.media { position: relative; overflow: hidden; background: var(--green-900) }
.media > img, .media > .ph { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover }
.media--hero { aspect-ratio: var(--ratio-hero) }
.media--wide { aspect-ratio: var(--ratio-wide) }
.media--content { aspect-ratio: var(--ratio-content) }
.media--card { aspect-ratio: var(--ratio-card) }
.media--portrait { aspect-ratio: var(--ratio-portrait) }
.media--square { aspect-ratio: var(--ratio-square) }

/* Bildunterschrift auf dunklem Verlauf */
.media__caption {
  position: absolute; left: var(--space-5); right: var(--space-5); bottom: var(--space-4); z-index: 2;
  display: flex; align-items: center; gap: 11px;
  color: var(--white); font-weight: var(--fw-bold); font-size: var(--fs-sm); letter-spacing: var(--ls-flat);
}
.media--caption::after {
  content: ""; position: absolute; inset: 0;
  background: linear-gradient(to top, rgb(var(--rgb-green-900) / .72), transparent 48%);
}
.dot { width: 9px; height: 9px; border-radius: var(--r-round); background: var(--yellow); flex: none }

/* ---------- Bewegung ---------- */
.fade-up { opacity: 0; transform: translateY(22px); animation: fadeUp .6s var(--ease) forwards }
.d1 { animation-delay: .05s } .d2 { animation-delay: .14s } .d3 { animation-delay: .23s }
.d4 { animation-delay: .32s } .d5 { animation-delay: .41s } .d6 { animation-delay: .5s } .d7 { animation-delay: .58s }
@keyframes fadeUp { to { opacity: 1; transform: none } }

/* Abstand nach einem Block. Stand bis 24.09.2026 nur in _extra-a.css, das
   ausschliesslich die Ortsseiten laden - auf allen anderen Seiten war die
   Klasse wirkungslos und der Abstand fehlte. */
.spaced--sm { margin-top: var(--space-6) }

.reveal { opacity: 0; transform: translateY(28px); transition: opacity .6s var(--ease), transform .6s var(--ease) }
.reveal.in { opacity: 1; transform: none }
.reveal.r1 { transition-delay: .08s } .reveal.r2 { transition-delay: .16s } .reveal.r3 { transition-delay: .24s }

@media (max-width: 720px) {
  .checks { grid-template-columns: 1fr }
  .choices--2, .choices--3 { grid-template-columns: 1fr }
  .cta-row { flex-direction: column; align-items: stretch }
  .cta-row .btn { width: 100% }
}

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