/* Tree Top GmbH – Stylesheet. Keine externen Ressourcen, keine Inline-Styles (CSP-tauglich). */

@font-face { font-family: "Open Sans"; src: url("/assets/fonts/opensans.woff2") format("woff2"); font-weight: 300 800; font-display: swap; }
@font-face { font-family: "Roboto"; src: url("/assets/fonts/roboto.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }

/* Farben der Original-Website tree-top.eu */
:root {
  --tanne: #292d33;      /* dunkle Abschnitte (Original: palette-5-dark-3) */
  --header: #000;        /* Kopfzeile */
  --footer: #333;        /* Fußzeile */
  --papier: #f2f2f2;     /* Hellgrau */
  --weiss: #fff;
  --tinte: #111;
  --leise: #686868;
  --blau: #478ac9;       /* Akzentblau des Originals (Flächen, Buttons) */
  --blau-text: #2c6aa3;  /* dasselbe Blau, dunkler: Textlinks auf hellem Grund (Kontrast ≥ 4,5:1) */
  --blau-hell: #8fbfec;  /* Textlinks auf dunklem Grund */
  --signal: #db545a;     /* Rot-Akzent des Originals */
  --linie: #d6d6d6;
  --fokus: #478ac9;
  --fehler: #b3261e;
  --schrift: "Open Sans", system-ui, -apple-system, "Segoe UI", sans-serif;
  --kopf: "Roboto", "Open Sans", system-ui, sans-serif;
  --breite: 72rem;
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; }
@media (prefers-reduced-motion: reduce) { html { scroll-behavior: auto; } }
[id] { scroll-margin-top: 5.5rem; }

body {
  margin: 0;
  font-family: var(--schrift);
  font-size: 1.0625rem;
  line-height: 1.6;
  color: var(--tinte);
  background: var(--papier);
}

:focus-visible { outline: 3px solid var(--fokus); outline-offset: 3px; }
a { color: var(--blau-text); text-underline-offset: 0.2em; }
a:hover { color: var(--tanne); }
img, svg { max-width: 100%; height: auto; }
p { margin: 0 0 1rem; max-width: 68ch; }
ul, ol, dl { margin: 0; }

h1, h2, h3, h4, h5 { margin: 0 0 0.6rem; text-wrap: balance; font-family: var(--kopf); font-weight: 700; }
h1 { font-weight: 700; font-size: clamp(2.1rem, 5vw, 3.25rem); line-height: 1.12; margin-bottom: 1.25rem; }
h2 { font-size: clamp(1.7rem, 3.2vw, 2.25rem); line-height: 1.2; margin-bottom: 1rem; }
h3 { font-weight: 700; font-size: 1.35rem; line-height: 1.2; }
h4 { font-weight: 700; font-size: 1.15rem; line-height: 1.25; }
h5 { font-size: 0.95rem; font-weight: 700; margin: 1rem 0 0.3rem; }

.wrap { width: min(var(--breite), 100% - 2.5rem); margin-inline: auto; }
.narrow > * { max-width: 46rem; }
.muted { color: var(--leise); }
.skip { position: absolute; left: -999px; top: 0; z-index: 50; background: var(--signal); color: #000; padding: 0.6rem 1rem; }
.skip:focus { left: 0; }
.todo { background: #ffe08a; color: #3b2a00; padding: 0.05rem 0.3rem; }

/* Kopfzeile */
.site-header { position: sticky; top: 0; z-index: 20; background: var(--header); color: var(--papier); border-bottom: 1px solid #222; }
.bar { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.5rem; min-height: 5.25rem; }
.brand { display: flex; align-items: center; gap: 0.6rem; color: var(--papier); text-decoration: none; }
.brand-logo { height: 4.5rem; width: auto; display: block; margin-block: 0.4rem; }
.brand-name small { display: block; white-space: nowrap; font-weight: 500; font-size: 0.68rem; letter-spacing: 0.12em; text-transform: uppercase; color: #bcc1c8; }
.foot-logo { height: 5rem; width: auto; display: block; margin-bottom: 0.75rem; }
.brand-name { font-weight: 800; font-size: 1.7rem; letter-spacing: 0.01em; }
.phone { margin-left: auto; font-weight: 650; color: var(--papier); text-decoration: none; white-space: nowrap; }
.phone:hover { text-decoration: underline; }
.nav ul { display: flex; flex-wrap: wrap; gap: 0.25rem 1.25rem; list-style: none; padding: 0; }
.nav a { color: var(--papier); text-decoration: none; font-weight: 550; }
.nav a:hover, .nav a[aria-current="page"] { text-decoration: underline; text-decoration-thickness: 2px; }
.nav-toggle { display: none; font: inherit; font-weight: 650; background: transparent; color: var(--papier); border: 2px solid var(--papier); border-radius: 3px; padding: 0.35rem 0.8rem; cursor: pointer; }
@media (max-width: 859px) {
  .bar { gap: 0.5rem 0.9rem; }
  .brand-name { font-size: 1.4rem; }
  .brand-logo { height: 3.6rem; }
  .phone { order: 2; font-size: 0.95rem; }
  .nav-toggle { order: 3; padding: 0.3rem 0.65rem; }
  .js .nav-toggle { display: inline-flex; }
  .js .nav { display: none; flex-basis: 100%; order: 5; padding-bottom: 0.75rem; }
  .js .nav.is-open { display: block; }
  .nav ul { flex-direction: column; }
  .nav a { display: block; padding: 0.35rem 0; }
}
@media (min-width: 860px) { .nav { order: 0; } }

/* Schaltflächen */
.btn { display: inline-block; padding: 0.75rem 1.2rem; background: var(--blau); color: #fff; border: 2px solid var(--blau); border-radius: 3px; font: inherit; font-weight: 700; line-height: 1.2; text-decoration: none; cursor: pointer; }
.btn:hover { background: var(--tanne); border-color: var(--tanne); color: #fff; }
.btn--ghost { background: transparent; color: var(--blau-text); border-color: var(--blau); }
.btn--ghost:hover { background: var(--blau); border-color: var(--blau); color: #fff; }
.btn--light { background: var(--papier); border-color: var(--papier); color: var(--tanne); }
.btn--light:hover { background: var(--signal); border-color: var(--signal); color: #111; }
.btn--outline { background: transparent; border-color: #8d96a3; color: var(--papier); }
.btn--outline:hover { background: transparent; border-color: var(--papier); color: var(--papier); }
.dark .btn--light { color: var(--tanne); }
.dark .btn--outline, .dark .btn--outline:hover { color: var(--papier); }
.btn.is-pending { opacity: 0.55; cursor: not-allowed; }
.btn.is-pending:hover { background: var(--blau); border-color: var(--blau); }

/* Hero mit Revierplan */
.dark { background: var(--tanne); color: var(--papier); --fokus: var(--signal); }
.dark a { color: var(--blau-hell); }
.hero { padding-block: clamp(2.5rem, 7vw, 5.5rem); }
.hero-grid { display: grid; gap: 2.5rem; align-items: center; }
@media (min-width: 900px) { .hero-grid { grid-template-columns: 1.05fr 0.95fr; } }
.lead { font-size: 1.3rem; line-height: 1.5; color: #dde0e4; }
.hero-actions { display: flex; flex-wrap: wrap; gap: 0.75rem; margin-top: 1.5rem; }
.plan { margin: 0; }
.plan figcaption { margin-top: 0.5rem; color: #bcc1c8; font-size: 0.9rem; }
.plan .grid { fill: none; stroke: #fff; stroke-opacity: 0.07; stroke-width: 1; }
.plan .obj { fill: none; stroke: #8d96a3; stroke-opacity: 0.6; stroke-width: 1.5; stroke-dasharray: 2 4; }
.plan .route { fill: none; stroke: var(--blau-hell); stroke-width: 3; stroke-linecap: round; stroke-dasharray: 100; }
.stops a { cursor: pointer; }
.stops circle { fill: var(--signal); stroke: var(--tanne); stroke-width: 3; }
.stops text { fill: var(--papier); font-family: inherit; font-size: 15px; font-weight: 600; paint-order: stroke; stroke: var(--tanne); stroke-width: 5px; stroke-linejoin: round; }
.stops a:hover circle, .stops a:focus-visible circle { stroke: #fff; stroke-width: 4; }
.stops a:focus-visible { outline: none; }
@media (prefers-reduced-motion: no-preference) {
  .js .route { stroke-dashoffset: 100; animation: zeichnen 2.8s 0.3s cubic-bezier(0.5, 0, 0.2, 1) forwards; }
  .js .stops a { opacity: 0; animation: erscheinen 0.4s forwards; }
  .js .stops a:nth-child(1) { animation-delay: 0.3s; }
  .js .stops a:nth-child(2) { animation-delay: 0.95s; }
  .js .stops a:nth-child(3) { animation-delay: 1.55s; }
  .js .stops a:nth-child(4) { animation-delay: 2.1s; }
  .js .stops a:nth-child(5) { animation-delay: 2.7s; }
}
@keyframes zeichnen { to { stroke-dashoffset: 0; } }
@keyframes erscheinen { to { opacity: 1; } }

/* Abschnitte */
.sec { padding-block: clamp(3.5rem, 8vw, 6rem); }
.sec--white { background: var(--weiss); }
.sec-head { display: grid; gap: 0.5rem 3rem; margin-bottom: 2.5rem; }
@media (min-width: 900px) {
  .sec-head { grid-template-columns: 1fr 1fr; align-items: start; }
  .sec-head h2 { grid-column: 1; grid-row: 1 / span 3; }
  .sec-head p { grid-column: 2; }
}

.ledger { list-style: none; padding: 0; margin-bottom: 3.5rem; border-bottom: 1px solid var(--linie); }
.ledger > li { display: grid; gap: 0.75rem 3rem; padding: 1.75rem 0; border-top: 1px solid var(--linie); }
@media (min-width: 900px) { .ledger > li { grid-template-columns: minmax(0, 1fr) minmax(0, 2fr); } }
.ledger h3 { font-size: 1.7rem; }
.tags { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; }
.tags li { padding: 0.15rem 0.55rem; background: var(--weiss); border: 1px solid var(--linie); border-radius: 2px; font-size: 0.92rem; }

.split { display: grid; gap: 2.5rem 4rem; margin-bottom: 3rem; }
.wrap.split { margin-bottom: 0; }
@media (min-width: 900px) { .split { grid-template-columns: 1fr 1fr; align-items: start; } }

.pairs div, .facts div { display: grid; grid-template-columns: minmax(7.5rem, 11rem) 1fr; gap: 1rem; padding: 0.55rem 0; border-top: 1px solid var(--linie); }
.pairs dt, .facts dt { font-weight: 650; }
.pairs dd, .facts dd { margin: 0; }
.pairs { margin-bottom: 1.25rem; }

.process { margin-top: 1rem; }
.process ol { list-style: none; padding: 0; display: grid; gap: 1.5rem; margin-bottom: 1.5rem; counter-reset: schritt; }
@media (min-width: 900px) { .process ol { grid-template-columns: repeat(3, 1fr); } }
.process li { counter-increment: schritt; padding-top: 0.75rem; border-top: 3px solid var(--tanne); }
.process li::before { content: counter(schritt); display: block; font-weight: 800; font-size: 2rem; line-height: 1.1; color: var(--blau); }

.plain, .leitbild { padding-left: 1.15rem; }
.plain li, .leitbild li { margin-bottom: 0.35rem; }
.leitbild li { margin-bottom: 0.6rem; }
.trio { display: grid; gap: 2rem; margin-bottom: 2rem; }
@media (min-width: 900px) { .trio { grid-template-columns: repeat(3, 1fr); } }

/* Lehrgänge */
.group-title { margin-top: 3rem; padding-bottom: 0.5rem; border-bottom: 3px solid var(--tanne); }
.course { display: grid; gap: 1.25rem 3rem; padding: 2rem 0; border-bottom: 1px solid var(--linie); }
@media (min-width: 900px) { .course { grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr); } }
.price { margin-bottom: 0.75rem; }
.price strong { font-weight: 800; font-size: 1.9rem; }
.price span { color: var(--leise); font-size: 0.9rem; }
.facts { margin-bottom: 1rem; }
.course details { margin-bottom: 1rem; }
.course summary { cursor: pointer; font-weight: 650; color: var(--blau-text); padding: 0.4rem 0; }
.course details ul { padding-left: 1.15rem; margin-bottom: 0.5rem; }
.note { border-left: 3px solid var(--signal); padding-left: 0.75rem; }
.dates { list-style: none; display: flex; flex-wrap: wrap; gap: 0.4rem; padding: 0; }
.dates li { padding: 0.15rem 0.55rem; background: var(--papier); border: 1px solid var(--linie); border-radius: 2px; font-variant-numeric: tabular-nums; }
.dates span { color: var(--leise); font-size: 0.85em; }
.callout { margin-top: 3rem; padding: 1.5rem; background: var(--papier); border-left: 4px solid var(--blau); }

/* Formular */
.form { max-width: 34rem; }
.field { margin-bottom: 1.1rem; }
label { display: block; font-weight: 650; margin-bottom: 0.3rem; }
input[type="text"], input[type="email"], select, textarea { width: 100%; padding: 0.7rem 0.8rem; font: inherit; color: var(--tinte); background: #fff; border: 1.5px solid #7d8d88; border-radius: 3px; }
textarea { resize: vertical; }
[aria-invalid="true"] { border-color: var(--fehler); }
.field--check { display: grid; grid-template-columns: auto 1fr; gap: 0 0.6rem; }
.field--check input { width: 1.2rem; height: 1.2rem; margin-top: 0.3rem; }
.field--check label { font-weight: 400; margin: 0; }
.field--check .err { grid-column: 2; }
.err { color: var(--fehler); font-weight: 600; margin: 0.3rem 0 0; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.form-status { font-weight: 650; }
.form-status.is-ok { color: #1b6b3a; }
.form-status.is-error { color: var(--fehler); }

/* Textseiten */
.page { padding-block: 3rem 5rem; }
.prose h1 { font-size: clamp(2rem, 4vw, 3rem); }
.prose h2 { font-size: 1.6rem; margin-top: 2.25rem; }
.prose ul { padding-left: 1.15rem; margin-bottom: 1rem; }
.prose .lead-dark { font-size: 1.15rem; color: var(--leise); }
.faq details { border-top: 1px solid var(--linie); padding: 0.8rem 0; }
.faq summary { cursor: pointer; font-weight: 650; }
.faq details p { margin: 0.6rem 0 0; }
.faq-cta { margin-top: 2.5rem; }

/* Fußzeile */
.site-footer { background: var(--footer); color: #dde0e4; padding-top: 3rem; font-size: 0.98rem; }
.site-footer a { color: var(--papier); }
.site-footer a:hover { color: var(--signal); }
.foot { display: grid; gap: 2rem; }
@media (min-width: 760px) { .foot { grid-template-columns: repeat(3, 1fr); } }
.foot-title { font-weight: 700; color: #fff; margin-bottom: 0.5rem; }
.foot ul { list-style: none; padding: 0; }
.foot li { margin-bottom: 0.3rem; }
.foot address { font-style: normal; }
.muted-on-dark { color: #a9aeb6; font-size: 0.9rem; margin-top: 1rem; }
.legal-line { margin-top: 2rem; padding-block: 1.5rem; border-top: 1px solid #4d4d4d; color: #a9aeb6; font-size: 0.9rem; }

.vh { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.preview-bar { margin: 0; padding: 0.4rem 1rem; background: var(--signal); color: #000; font-weight: 650; text-align: center; }

/* Zusätze der Bausteine */
.sec-actions { margin-top: 1.5rem; }
.hero-grid--single { grid-template-columns: 1fr !important; }
.hero-img { width: 100%; border-radius: 3px; }
.hero-img--logo { max-width: 22rem; margin-inline: auto; display: block; }
.gallery { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(16rem, 1fr)); }
.shot { margin: 0; }
.shot img { width: 100%; border-radius: 3px; display: block; }
.shot figcaption { color: var(--leise); font-size: 0.9rem; margin-top: 0.35rem; }
@media (min-width: 900px) { .split--rev > :first-child { order: 2; } }
.job .tags { margin-bottom: 1rem; }

/* Obere Leiste wie im Original: Grau #4d4d4d, weiße Schrift */
.topbar { background: #4d4d4d; color: #fff; font-size: 0.95rem; }
.topbar .wrap { display: flex; justify-content: space-between; gap: 1rem; align-items: center; min-height: 2.5rem; }
.topbar a { color: #fff; text-decoration: none; font-weight: 600; }
.topbar a:hover { text-decoration: underline; }
@media (max-width: 40rem) { .topbar-loc { display: none; } .topbar .wrap { justify-content: center; } }
