/* VerdantGrounds Technikhilfe Detmold: Stylesheet */

@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-400-normal.woff2") format("woff2");
}
@font-face {
  font-family: "Atkinson Hyperlegible Next";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("/assets/fonts/atkinson-hyperlegible-next-latin-700-normal.woff2") format("woff2");
}

:root {
  color-scheme: light dark;
  --paper: #f5f8f4;
  --surface: #ffffff;
  --ink: #15231b;
  --muted: #45564b;
  --line: #d3ddd5;
  --tint: #e3eee6;
  --green: #1f5a3d;
  --green-ink: #1f5a3d;
  --btn-bg: #1f5a3d;
  --btn-bg-hover: #153f2a;
  --btn-ink: #ffffff;
  --focus: #b4530b;
  --font: "Atkinson Hyperlegible Next", "Atkinson Hyperlegible", Verdana, "Segoe UI", system-ui, sans-serif;
  --radius: 0.9rem;
  --wrap: 72rem;
}

@media (prefers-color-scheme: dark) {
  :root {
    --paper: #0f1712;
    --surface: #17221b;
    --ink: #e8efe9;
    --muted: #a8b8ad;
    --line: #2b3b31;
    --tint: #1b2b21;
    --green: #2f7a53;
    --green-ink: #8fd0aa;
    --btn-bg: #2f7a53;
    --btn-bg-hover: #3a8d62;
    --btn-ink: #ffffff;
    --focus: #f0a35e;
  }
}

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

html {
  -webkit-text-size-adjust: 100%;
  text-size-adjust: 100%;
  scroll-behavior: smooth;
  scroll-padding-top: 1rem;
}

body {
  margin: 0;
  background: var(--paper);
  color: var(--ink);
  font-family: var(--font);
  font-size: 1.1875rem;
  line-height: 1.6;
  font-kerning: normal;
  hyphens: manual;
}

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

a { color: var(--green-ink); text-underline-offset: 0.18em; }
a:hover { text-decoration-thickness: 2px; }

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

h1, h2, h3 { line-height: 1.15; margin: 0; font-weight: 700; letter-spacing: -0.01em; }
h1 { font-size: clamp(2.5rem, 7vw, 4.4rem); }
h2 { font-size: clamp(1.75rem, 3.6vw, 2.5rem); }
h3 { font-size: 1.3rem; line-height: 1.3; }
p { margin: 0; }

.wrap {
  max-width: var(--wrap);
  margin-inline: auto;
  padding-inline: clamp(1.25rem, 4vw, 2.5rem);
}

.measure { max-width: 40rem; }
.stack > * + * { margin-top: 1rem; }
.muted { color: var(--muted); }

.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 {
  position: absolute; left: 1rem; top: -4rem;
  background: var(--btn-bg); color: var(--btn-ink);
  padding: 0.75rem 1rem; border-radius: 0.5rem; z-index: 50;
}
.skip:focus { top: 1rem; }

/* Kopfzeile */
.site-header { background: var(--surface); border-bottom: 1px solid var(--line); }
.site-header .wrap {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  grid-template-areas: "brand nav call";
  align-items: center;
  gap: 0.75rem 2rem;
  padding-block: 0.85rem;
}
.brand { grid-area: brand; }
.site-nav { grid-area: nav; justify-self: end; }
.header-call { grid-area: call; }
.site-nav a[aria-current="page"] { font-weight: 700; text-decoration: underline; text-decoration-thickness: 2px; text-underline-offset: 0.35em; }
.brand { min-width: 0; display: flex; flex-direction: column; text-decoration: none; color: var(--ink); line-height: 1.2; }
.brand strong { font-size: 1.3rem; color: var(--green-ink); }
.brand span { font-size: 0.95rem; color: var(--muted); }
.site-nav { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem 1.25rem; }
.site-nav a:not(.btn) { color: var(--ink); text-decoration: none; font-size: 1.05rem; }
.site-nav a:not(.btn):hover { text-decoration: underline; }

/* Schaltflächen */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.6rem;
  min-height: 3.25rem; padding: 0.6rem 1.4rem;
  border-radius: 0.75rem; border: 2px solid transparent;
  font: inherit; font-weight: 700; font-size: 1.1rem; line-height: 1.2;
  text-decoration: none; cursor: pointer;
}
.btn svg { width: 1.3em; height: 1.3em; flex: none; }
.btn-primary { background: var(--btn-bg); color: var(--btn-ink); }
.btn-primary:hover { background: var(--btn-bg-hover); text-decoration: none; }
.btn-secondary { background: transparent; color: var(--green-ink); border-color: currentColor; }
.btn-secondary:hover { background: var(--tint); text-decoration: none; }
.btn-small { min-height: 2.75rem; font-size: 1rem; padding: 0.4rem 1rem; }

/* Einstieg */
.hero { padding-block: clamp(3rem, 8vw, 6rem) clamp(3rem, 7vw, 5rem); }
.hero .wrap {
  display: grid;
  grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr);
  gap: clamp(2.5rem, 6vw, 5rem);
  align-items: center;
}
.hero-text > * + * { margin-top: 1.4rem; }
.lead { font-size: clamp(1.2rem, 2vw, 1.4rem); color: var(--muted); max-width: 36rem; }
.actions { display: flex; flex-wrap: wrap; gap: 0.85rem; }
.reach { font-size: 1.05rem; color: var(--muted); }

/* Das Gespräch: die typischen Sätze am Telefon */
.talk { display: flex; flex-direction: column; gap: 0.8rem; margin: 0; padding: 0; list-style: none; }
.bubble {
  max-width: 21rem;
  padding: 0.85rem 1.2rem;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 1.3rem 1.3rem 1.3rem 0.3rem;
  font-size: 1.15rem;
}
.talk li:nth-child(2) { margin-left: 1.5rem; }
.talk li:nth-child(3) { margin-left: 0.6rem; }
.bubble-me {
  align-self: flex-end;
  margin-top: 0.6rem;
  background: var(--btn-bg);
  color: var(--btn-ink);
  border-color: transparent;
  border-radius: 1.3rem 1.3rem 0.3rem 1.3rem;
  font-weight: 700;
  font-size: 1.3rem;
}
.bubble-me small { display: block; font-weight: 400; font-size: 0.9rem; opacity: 0.9; margin-top: 0.15rem; }

@media (prefers-reduced-motion: no-preference) {
  .talk li { animation: arrive 420ms ease-out both; }
  .talk li:nth-child(1) { animation-delay: 150ms; }
  .talk li:nth-child(2) { animation-delay: 550ms; }
  .talk li:nth-child(3) { animation-delay: 950ms; }
  .talk li:nth-child(4) { animation-delay: 1500ms; }
}
@keyframes arrive {
  from { opacity: 0; transform: translateY(0.6rem); }
  to { opacity: 1; transform: none; }
}

/* Abschnitte */
.section { padding-block: clamp(3.5rem, 8vw, 6rem); }
.section-tint { background: var(--tint); }
.section-head { margin-bottom: clamp(1.75rem, 4vw, 2.75rem); }
.section-head > * + * { margin-top: 0.75rem; }

/* Ablauf */
.steps {
  list-style: none; margin: 0; padding: 0;
  display: grid; grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(1.5rem, 4vw, 3rem);
  counter-reset: step;
}
.steps li { counter-increment: step; }
.steps li::before {
  content: counter(step);
  display: inline-flex; align-items: center; justify-content: center;
  width: 2.75rem; height: 2.75rem; border-radius: 50%;
  background: var(--btn-bg); color: var(--btn-ink);
  font-weight: 700; font-size: 1.25rem; margin-bottom: 0.9rem;
}
.steps h3 { margin-bottom: 0.4rem; }
.steps p { color: var(--muted); }

/* Preise */
.prices { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: clamp(1.25rem, 3vw, 2rem); align-items: start; }
.price { padding: clamp(1.5rem, 3vw, 2.25rem); border-radius: var(--radius); }
.price-main { background: var(--surface); border: 2px solid var(--green); }
.price-alt { border: 1px solid var(--line); }
.price h3 { font-size: 1.2rem; color: var(--muted); }
.amount { font-size: clamp(2.2rem, 5vw, 3rem); font-weight: 700; line-height: 1.1; margin-top: 0.5rem; }
.amount span { font-size: 1.1rem; font-weight: 400; color: var(--muted); }
.price .tax { font-size: 1rem; color: var(--muted); margin-top: 0.2rem; }
.ticks { list-style: none; padding: 0; margin: 1.25rem 0 0; }
.ticks li { position: relative; padding-left: 1.8rem; margin-top: 0.45rem; }
.ticks li::before {
  content: ""; position: absolute; left: 0.15rem; top: 0.45em;
  width: 0.95rem; height: 0.55rem;
  border-left: 3px solid var(--green-ink); border-bottom: 3px solid var(--green-ink);
  transform: rotate(-45deg);
}
.example { margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--line); font-size: 1.05rem; }
.discount { margin-top: clamp(1.25rem, 3vw, 2rem); font-size: 1.1rem; }

/* Person */
.person { display: grid; grid-template-columns: minmax(0, 20rem) minmax(0, 1fr); gap: clamp(2rem, 5vw, 4rem); align-items: center; }
.person img { width: 100%; border-radius: var(--radius); background: var(--tint); }
.note { margin-top: 1.5rem; padding: 1.1rem 1.25rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); font-size: 1.05rem; }

/* Unternehmen */
.biz { display: flex; flex-wrap: wrap; align-items: end; justify-content: space-between; gap: 1.5rem 3rem; }
.biz .measure > * + * { margin-top: 0.9rem; }

/* Fragen */
.faq { max-width: 46rem; border-top: 1px solid var(--line); }
.faq details { border-bottom: 1px solid var(--line); }
.faq summary {
  cursor: pointer; list-style: none;
  display: flex; justify-content: space-between; align-items: center; gap: 1rem;
  padding: 1.15rem 0; font-weight: 700; font-size: 1.2rem;
}
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after {
  content: ""; flex: none; width: 0.7rem; height: 0.7rem;
  border-right: 3px solid var(--green-ink); border-bottom: 3px solid var(--green-ink);
  transform: rotate(45deg); margin-right: 0.3rem;
}
.faq details[open] summary::after { transform: rotate(-135deg); }
.faq details > div { padding: 0 0 1.25rem; color: var(--muted); max-width: 40rem; }

/* Kontakt */
.contact { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: clamp(2rem, 5vw, 4rem); align-items: start; }
.contact-direct > * + * { margin-top: 1rem; }
.phone-big { display: inline-block; font-size: clamp(1.9rem, 4.5vw, 2.6rem); font-weight: 700; color: var(--green-ink); text-decoration: none; line-height: 1.15; }
.phone-big:hover { text-decoration: underline; }

.form { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(1.25rem, 3.5vw, 2.25rem); }
.form > * + * { margin-top: 1.5rem; }
fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
legend, .label { display: block; font-weight: 700; margin-bottom: 0.6rem; padding: 0; }
.label small, legend small { font-weight: 400; color: var(--muted); }
.choices { display: flex; flex-wrap: wrap; gap: 0.6rem; }
.choice {
  display: inline-flex; align-items: center; gap: 0.55rem;
  min-height: 3rem; padding: 0.45rem 1rem;
  border: 2px solid var(--line); border-radius: 0.7rem;
  cursor: pointer; font-size: 1.05rem; line-height: 1.25;
}
.choice input { accent-color: var(--green); width: 1.15rem; height: 1.15rem; margin: 0; flex: none; }
.choice:has(input:checked) { border-color: var(--green); background: var(--tint); }
.choice:has(input:focus-visible) { outline: 3px solid var(--focus); outline-offset: 2px; }
.row { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.25rem; }
input[type="text"], input[type="tel"], input[type="email"], select, textarea {
  width: 100%; min-height: 3.1rem;
  padding: 0.6rem 0.85rem;
  font: inherit; font-size: 1.1rem; color: var(--ink);
  background: var(--paper); border: 2px solid var(--line); border-radius: 0.6rem;
}
textarea { min-height: 7.5rem; resize: vertical; }
input:focus-visible, select:focus-visible, textarea:focus-visible { border-color: var(--green); }
.hp { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }
.privacy { font-size: 0.98rem; color: var(--muted); }
.status { font-weight: 700; padding: 0.9rem 1rem; border-radius: 0.6rem; }
.status:empty { display: none; }
.status.ok { background: var(--tint); color: var(--green-ink); }
.status.err { background: #fbe9dc; color: #7a2e00; }
@media (prefers-color-scheme: dark) { .status.err { background: #3a2414; color: #ffcfa8; } }
/* Meldung der App oder der eigenen Prüfung direkt am Feld */
.feld-fehler { margin-top: 0.35rem; font-weight: 700; color: #7a2e00; }
.feld-fehler[hidden] { display: none; }
[aria-invalid="true"] { border-color: #b4530b; outline: 2px solid #b4530b; outline-offset: 1px; }
@media (prefers-color-scheme: dark) { .feld-fehler { color: #ffcfa8; } [aria-invalid="true"] { border-color: #f0a35e; outline-color: #f0a35e; } }
[hidden] { display: none !important; }

/* Fußzeile */
.site-footer { background: var(--surface); border-top: 1px solid var(--line); padding-block: 2.5rem 6.5rem; font-size: 1rem; color: var(--muted); }
.site-footer .wrap { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1.5rem 2rem; }
.site-footer address { font-style: normal; }
.site-footer strong { color: var(--ink); }
.site-footer ul { list-style: none; margin: 0; padding: 0; }
.site-footer li + li { margin-top: 0.35rem; }

/* Rechtstexte */
.legal { padding-block: clamp(2.5rem, 6vw, 4.5rem); }
.legal .measure > * + * { margin-top: 1rem; }
.legal h2 { font-size: 1.45rem; margin-top: 2.25rem; }
.legal h3 { font-size: 1.15rem; margin-top: 1.5rem; }
/* Offene Stelle, die vor dem Livegang gefüllt wird; build.py meldet jede */
.offen { outline: 2px dashed var(--focus); outline-offset: 2px; }

/* Chatfenster */
.chat-launch {
  position: fixed; z-index: 40;
  right: clamp(0.75rem, 2vw, 1.5rem);
  bottom: calc(clamp(0.75rem, 2vw, 1.5rem) + env(safe-area-inset-bottom, 0px));
  box-shadow: 0 6px 20px rgba(21, 35, 27, 0.25);
  border-radius: 999px;
}
.chat {
  position: fixed; z-index: 41; margin: 0;
  inset: auto clamp(0.75rem, 2vw, 1.5rem) calc(clamp(0.75rem, 2vw, 1.5rem) + env(safe-area-inset-bottom, 0px)) auto;
  width: min(25rem, calc(100vw - 1.5rem));
  max-height: min(40rem, calc(100dvh - 2rem));
  padding: 0;
  display: flex; flex-direction: column;
  background: var(--surface); color: var(--ink);
  border: 1px solid var(--line); border-radius: 1.1rem;
  box-shadow: 0 12px 40px rgba(21, 35, 27, 0.28);
}
.chat:not([open]) { display: none; }
.chat-head { display: flex; justify-content: space-between; align-items: start; gap: 1rem; padding: 1rem 1.1rem; border-bottom: 1px solid var(--line); }
.chat-head p { font-size: 0.95rem; color: var(--muted); }
.chat-close { background: none; border: 0; color: var(--ink); cursor: pointer; width: 2.75rem; height: 2.75rem; border-radius: 0.5rem; display: inline-flex; align-items: center; justify-content: center; flex: none; }
.chat-close:hover { background: var(--tint); }
.chat-log { flex: 1; overflow-y: auto; padding: 1rem 1.1rem; display: flex; flex-direction: column; gap: 0.6rem; }
.msg { max-width: 88%; padding: 0.6rem 0.9rem; border-radius: 1rem 1rem 1rem 0.3rem; background: var(--tint); font-size: 1.05rem; }
.msg-me { align-self: flex-end; background: var(--btn-bg); color: var(--btn-ink); border-radius: 1rem 1rem 0.3rem 1rem; }
.chat-input { padding: 0.9rem 1.1rem 1.1rem; border-top: 1px solid var(--line); }
.chat-input > * + * { margin-top: 0.6rem; }
.chat-input .choices { gap: 0.45rem; }
.chat-input .btn { width: 100%; }
.chat-input input, .chat-input textarea { font-size: 1.05rem; }
.chat-input textarea { min-height: 5rem; }

/* Kleine Bildschirme */
@media (max-width: 56rem) {
  .site-header .wrap {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas: "brand call" "nav nav";
    padding-block: 0.7rem 0.4rem;
  }
  .site-nav {
    justify-self: stretch;
    flex-wrap: wrap; gap: 0 1.25rem;
    margin-inline: calc(-1 * clamp(1.25rem, 4vw, 2.5rem));
    padding: 0.35rem clamp(1.25rem, 4vw, 2.5rem) 0.25rem;
    border-top: 1px solid var(--line);
  }
  .site-nav a:not(.btn) { white-space: nowrap; min-height: 2.75rem; display: inline-flex; align-items: center; }
  .hero .wrap, .prices, .person, .contact { grid-template-columns: minmax(0, 1fr); }
  .steps { grid-template-columns: minmax(0, 1fr); }
  .person img { max-width: 16rem; }
  .site-footer .wrap { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 34rem) {
  body { font-size: 1.125rem; }
  .brand strong { font-size: 1.1rem; }
  .brand span { font-size: 0.88rem; }
  .header-call { padding-inline: 0.75rem; font-size: 0.95rem; }
  .nav-pre { display: none; }
  .site-nav { gap: 0 1rem; }
  .site-nav a:not(.btn) { font-size: 1rem; }
  .row { grid-template-columns: minmax(0, 1fr); }
  .actions .btn { width: 100%; }
  .chat-launch { width: 3.6rem; height: 3.6rem; min-height: 0; padding: 0; }
  .chat-launch svg { width: 1.6rem; height: 1.6rem; }
  .chat-label { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
  .talk li:nth-child(2), .talk li:nth-child(3) { margin-left: 0; }
}

@media print {
  .chat-launch, .chat, .site-nav, .skip { display: none !important; }
}

.chat-head h2 { font-size: 1.15rem; line-height: 1.3; }
