/* Forstunternehmen Widiner – Basis-Styles (Phase 1)
   Komponenten-Muster angelehnt an mw-forstapp.de, eigene Marke.
   Keine externen Ressourcen (Schriften = Systemschriften, lokal nachrüstbar). */

:root {
  /* Hausfarben laut Logo-Stylesheet 2020: HKS 67 N (Grün) + HKS 97 N (Dunkelgrau) */
  --brand: #84b61e;          /* Logo-Grün – Flächen, Akzente */
  --brand-ink: #1d2a06;      /* Text auf Logo-Grün */
  --green: #4f7a0e;          /* Grün für Links/Text auf Weiß (Kontrast ≥ 4,5:1) */
  --green-dark: #3b5c09;
  --green-soft: #eef5df;
  --accent: #84b61e;
  --wood: #4f7a0e;
  --charcoal: #333531;       /* Logo-Dunkelgrau */
  --ink: #2a2c28;
  --muted: #5f625b;
  --line: #e1e4dc;
  --bg: #ffffff;
  --bg-soft: #f5f7f1;
  --card: #ffffff;
  --header-bg: rgba(255, 255, 255, .96);
  --shadow: 0 14px 40px rgba(40, 44, 36, .10);
  --radius: 14px;
  --font: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --font-head: var(--font);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root {
    --green: #a3d045;
    --green-dark: #bfe36e;
    --green-soft: #26301a;
    --accent: #84b61e;
    --wood: #a3d045;
    --ink: #eceee8;
    --muted: #aeb2a8;
    --line: #3a3d37;
    --bg: #1e201c;
    --bg-soft: #252822;
    --card: #2a2d27;
    --header-bg: rgba(30, 32, 28, .94);
    --shadow: 0 14px 40px rgba(0, 0, 0, .35);
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body { margin: 0; background: var(--bg); color: var(--ink); font-family: var(--font); font-size: 17px; line-height: 1.6; }
img { max-width: 100%; height: auto; display: block; }
a { color: var(--green); }
a:hover { color: var(--green-dark); }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 3px; }
h1, h2, h3 { line-height: 1.15; margin: 0 0 .5em; }
h1, h2 { font-family: var(--font-head); font-weight: 800; letter-spacing: -.01em; }
h1 { font-size: clamp(2.2rem, 5vw, 3.6rem); }
h2 { font-size: clamp(1.7rem, 3.4vw, 2.5rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.skip-link { position: fixed; left: 16px; top: -80px; z-index: 100; padding: 10px 14px; border-radius: 8px; background: var(--card); color: var(--green); font-weight: 700; }
.skip-link:focus { top: 12px; }

.wrap { width: min(1200px, 100% - 32px); margin-inline: auto; }
.section { padding: clamp(48px, 8vw, 96px) 0; }
.section--soft { background: var(--bg-soft); }
.eyebrow { display: inline-block; font-size: .8rem; font-weight: 800; letter-spacing: .14em; text-transform: uppercase; color: var(--wood); margin-bottom: .6em; }
.lead { font-size: 1.15rem; color: var(--muted); max-width: 720px; }

/* Header */
.site-header { position: sticky; top: 0; z-index: 50; background: var(--header-bg); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); }
.site-header__inner { display: flex; align-items: center; gap: 24px; min-height: 72px; }
.brand { display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); min-width: 0; }
.brand__mark { width: 40px; height: 40px; flex: none; }
.brand__logo { display: block; height: 52px; width: auto; }
.site-footer .brand__logo { height: 64px; }
@media (max-width: 520px) { .brand__logo { height: 42px; } }
.brand__text { font-family: var(--font-head); font-size: 1.35rem; line-height: 1; font-weight: 700; letter-spacing: .02em; }
.brand__text small { display: block; font-family: var(--font); font-size: .62rem; font-weight: 700; letter-spacing: .16em; color: var(--muted); text-transform: uppercase; margin-top: 3px; }
.main-nav { display: flex; gap: 22px; margin-left: auto; align-items: center; }
.main-nav a { color: var(--ink); text-decoration: none; font-weight: 650; font-size: .95rem; }
.main-nav a:hover, .main-nav a[aria-current="page"] { color: var(--green); }
.main-nav a[aria-current="page"] { text-decoration: underline; text-underline-offset: 6px; text-decoration-thickness: 2px; }
.header-call { white-space: nowrap; }
.menu-button { display: none; margin-left: auto; border: 1px solid var(--line); background: var(--card); color: var(--ink); border-radius: 10px; padding: 9px 14px; font: inherit; font-weight: 700; cursor: pointer; }
@media (max-width: 1100px) {
  .menu-button { display: block; }
  .header-call { display: none; }
  .main-nav { display: none; position: absolute; left: 16px; right: 16px; top: 76px; flex-direction: column; align-items: stretch; gap: 0; background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 8px; }
  .main-nav.open { display: flex; }
  .main-nav a { padding: 12px 14px; border-radius: 10px; }
  .main-nav a:hover { background: var(--bg-soft); }
}

/* Buttons */
.button { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 48px; padding: 12px 22px; border-radius: 12px; border: 2px solid var(--brand); background: var(--brand); color: var(--brand-ink); font: inherit; font-weight: 750; text-decoration: none; cursor: pointer; transition: transform .15s, background .15s; }
.button:hover { background: #77a51a; border-color: #77a51a; color: var(--brand-ink); transform: translateY(-1px); }
.button--ghost { background: transparent; color: var(--green); border-color: var(--green); }
.button--ghost:hover { background: var(--green-soft); color: var(--green-dark); border-color: var(--green-dark); }
.button--whatsapp { background: #17773f; border-color: #17773f; color: #fff; }
.button--whatsapp:hover { background: #105c30; border-color: #105c30; color: #fff; }
.button--small { min-height: 40px; padding: 8px 16px; font-size: .92rem; }
.actions { display: flex; flex-wrap: wrap; gap: 12px; margin-top: 24px; }

/* Hero */
.hero { padding: clamp(48px, 9vw, 110px) 0 clamp(40px, 7vw, 80px); background: linear-gradient(160deg, var(--green-soft), var(--bg) 60%); }
.hero h1 span { color: var(--green); }
.hero__grid { display: grid; grid-template-columns: 1.2fr .8fr; gap: 48px; align-items: center; }
.hero h1 span { color: var(--green); }
.hero__facts { list-style: none; padding: 0; margin: 28px 0 0; display: flex; flex-wrap: wrap; gap: 10px 22px; color: var(--muted); font-weight: 650; font-size: .95rem; }
.hero__facts li::before { content: "✓ "; color: var(--green); font-weight: 900; }
.hero__card { background: var(--card); border: 1px solid var(--line); border-radius: 20px; box-shadow: var(--shadow); padding: 28px; }
.hero__card h2 { font-size: 1.6rem; }
.hero__card dl { margin: 0; display: grid; gap: 14px; }
.hero__card dt { font-size: .78rem; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); font-weight: 800; }
.hero__card dd { margin: 0; font-weight: 700; }
@media (max-width: 860px) { .hero__grid { grid-template-columns: 1fr; } }

/* Karten */
.grid { display: grid; gap: 20px; grid-template-columns: repeat(auto-fit, minmax(min(100%, 260px), 1fr)); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 24px; display: flex; flex-direction: column; gap: 6px; }
.card__icon { font-size: 1.8rem; line-height: 1; margin-bottom: 6px; }
.card p { color: var(--muted); margin: 0; }
.card a.more { margin-top: auto; padding-top: 12px; font-weight: 750; text-decoration: none; }
.card--highlight { border-color: var(--green); box-shadow: inset 0 0 0 1px var(--green); }

.split { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; align-items: start; }
@media (max-width: 860px) { .split { grid-template-columns: 1fr; gap: 28px; } }

.checklist { list-style: none; padding: 0; margin: 0 0 1em; display: grid; gap: 10px; }
.checklist li { padding-left: 28px; position: relative; }
.checklist li::before { content: "✓"; position: absolute; left: 0; color: var(--green); font-weight: 900; }

.notice { border-left: 4px solid var(--accent); background: var(--bg-soft); border-radius: 0 12px 12px 0; padding: 16px 20px; color: var(--muted); }

/* Region */
.chips { display: flex; flex-wrap: wrap; gap: 8px; list-style: none; padding: 0; margin: 16px 0 0; }
.chips li { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 6px 14px; font-size: .92rem; font-weight: 600; }

/* CTA-Band */
.cta-band { background: var(--charcoal); color: #fff; border-radius: 20px; padding: clamp(28px, 5vw, 48px); display: flex; flex-wrap: wrap; gap: 24px; align-items: center; justify-content: space-between; }
@media (prefers-color-scheme: dark) { .cta-band { background: #2f3a1f; } }
.cta-band h2 { margin: 0; color: #fff; }
.cta-band p { margin: 6px 0 0; opacity: .9; }

.cta-band .button--ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.7); }

/* FAQ */
.faq details { border: 1px solid var(--line); border-radius: 12px; background: var(--card); padding: 0 20px; margin-bottom: 10px; }
.faq summary { cursor: pointer; font-weight: 750; padding: 16px 0; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; font-weight: 900; color: var(--green); }
.faq details[open] summary::after { content: "–"; }
.faq details p { color: var(--muted); }

/* Formular (Anfrage-Assistent) */
.form { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 640px) { .form__row { grid-template-columns: 1fr; } }
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 16px; }
.field label, .field legend { font-weight: 700; font-size: .95rem; }
.field input, .field select, .field textarea { font: inherit; color: var(--ink); background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 12px 14px; width: 100%; }
.field textarea { min-height: 140px; resize: vertical; }
.field small { color: var(--muted); }
.field--check { flex-direction: row; align-items: flex-start; gap: 10px; }
.field--check input { width: 20px; height: 20px; margin-top: 3px; flex: none; }
.field--check label { font-weight: 500; }
.hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; overflow: hidden; }
.form__status { margin-top: 12px; font-weight: 650; }
.form__status[data-type="error"] { color: #b3261e; }
@media (prefers-color-scheme: dark) { .form__status[data-type="error"] { color: #ff8a80; } }

.contact-list { list-style: none; padding: 0; margin: 0; display: grid; gap: 14px; }
.contact-list li { display: flex; gap: 14px; align-items: flex-start; }
.contact-list .ico { width: 44px; height: 44px; border-radius: 12px; background: var(--green-soft); display: grid; place-items: center; flex: none; font-size: 1.3rem; }
.contact-list strong { display: block; }

/* Rechtstexte */
.legal { max-width: 820px; }
.legal h2 { font-family: var(--font); font-size: 1.3rem; font-weight: 800; margin-top: 2em; }
.legal h3 { margin-top: 1.4em; }
.legal address { font-style: normal; }

/* Footer */
.site-footer { background: var(--charcoal); color: #dfe2da; padding: 56px 0 28px; margin-top: 0; }
.site-footer a { color: #dfe2da; text-decoration: none; }
.site-footer a:hover { color: #fff; text-decoration: underline; }
.footer-grid { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 32px; }
@media (max-width: 860px) { .footer-grid { grid-template-columns: 1fr 1fr; } }
@media (max-width: 520px) { .footer-grid { grid-template-columns: 1fr; } }
.site-footer h2 { font-family: var(--font); font-size: .8rem; letter-spacing: .14em; text-transform: uppercase; color: #a9c96a; margin-bottom: 12px; }
.site-footer ul { list-style: none; padding: 0; margin: 0; display: grid; gap: 8px; }
.site-footer .brand { color: #fff; margin-bottom: 12px; }
.site-footer .brand__text small { color: #a9c96a; }
.footer-bottom { border-top: 1px solid #4a4d46; margin-top: 40px; padding-top: 20px; display: flex; flex-wrap: wrap; gap: 12px 24px; justify-content: space-between; font-size: .9rem; color: #a9c96a; }

.visually-hidden { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Hinweisleiste MW-Forst App (alle Seiten) */
.app-bar { background: var(--charcoal); color: #eef1e8; font-size: .9rem; }
.app-bar__inner { display: flex; flex-wrap: wrap; align-items: center; justify-content: center; gap: 6px 14px; min-height: 40px; padding: 6px 0; text-align: center; }
.app-bar a { color: #c4e47a; font-weight: 750; }
.app-bar a:hover { color: #fff; }
.button--app { background: var(--card); color: var(--ink); border-color: var(--line); }
.button--app img { width: 22px; height: 22px; border-radius: 5px; }
.button--app:hover { background: var(--green-soft); border-color: var(--brand); color: var(--ink); }

/* MW-Forst-Teaser */
.app-teaser { display: grid; grid-template-columns: auto 1fr auto; gap: 24px; align-items: center; background: var(--card); border: 2px solid var(--brand); border-radius: 20px; padding: clamp(20px, 4vw, 32px); }
.app-teaser img { width: 72px; height: 72px; border-radius: 16px; }
.app-teaser h2 { font-size: clamp(1.3rem, 2.6vw, 1.8rem); margin-bottom: .25em; }
.app-teaser p { margin: 0; color: var(--muted); }
@media (max-width: 720px) { .app-teaser { grid-template-columns: 1fr; } }

/* Über uns */
.person { display: grid; grid-template-columns: 280px 1fr; gap: 40px; align-items: start; }
.person img { width: 100%; border-radius: 20px; aspect-ratio: 2 / 3; object-fit: cover; box-shadow: var(--shadow); }
@media (max-width: 760px) { .person { grid-template-columns: 1fr; } .person img { max-width: 260px; } }
.timeline { list-style: none; margin: 0; padding: 0; border-left: 3px solid var(--brand); }
.timeline li { position: relative; padding: 0 0 26px 26px; }
.timeline li::before { content: ""; position: absolute; left: -9px; top: 6px; width: 15px; height: 15px; border-radius: 50%; background: var(--brand); border: 3px solid var(--bg); }
.timeline strong { display: block; color: var(--green); }
.timeline p { margin: 4px 0 0; color: var(--muted); }

/* Brotkrümel */
.crumbs { font-size: .88rem; color: var(--muted); margin-bottom: 14px; }
.crumbs a { color: var(--muted); }
.crumbs a:hover { color: var(--green); }

/* Shop */
.konfig { background: var(--card); border: 1px solid var(--line); border-radius: 20px; padding: clamp(20px, 4vw, 32px); box-shadow: var(--shadow); }
.konfig .field select, .konfig .field input { font-size: 1rem; }
.konfig-ergebnis { margin-top: 8px; }
.summen { width: 100%; border-collapse: collapse; margin: 8px 0 12px; }
.summen td { padding: 10px 0; border-bottom: 1px solid var(--line); vertical-align: top; }
.summen td:last-child { text-align: right; white-space: nowrap; padding-left: 16px; font-weight: 700; }
.summen small { color: var(--muted); font-weight: 400; }
.summen tfoot td { border-bottom: 0; font-size: 1.15rem; font-weight: 800; }
.konfig-plz { font-weight: 650; color: var(--green); }
.price { font-size: 1.6rem; font-weight: 800; color: var(--ink); }
.price small { font-size: .85rem; font-weight: 500; color: var(--muted); }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
.data-table { width: 100%; border-collapse: collapse; min-width: 520px; background: var(--card); }
.data-table th, .data-table td { padding: 12px 16px; text-align: left; border-bottom: 1px solid var(--line); }
.data-table th { font-size: .82rem; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); background: var(--bg-soft); }
.data-table tr:last-child td { border-bottom: 0; }
.bestell-dialog { border: 0; border-radius: 20px; padding: clamp(20px, 4vw, 32px); width: min(560px, calc(100% - 32px)); background: var(--card); color: var(--ink); box-shadow: 0 30px 80px rgba(0,0,0,.35); }
.bestell-dialog::backdrop { background: rgba(20, 22, 18, .55); }
.bestell-dialog h2 { font-size: 1.5rem; }
.dlg-hinweis { font-size: .9rem; color: var(--muted); }
.button[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.legal ol, .legal ul { padding-left: 1.3em; }

/* Absperrbanner-Gestalter */
.variante-wahl { border: 0; padding: 0; margin: 0 0 24px; display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
@media (max-width: 720px) { .variante-wahl { grid-template-columns: 1fr; } }
.variante-karte { display: flex; gap: 14px; align-items: flex-start; background: var(--card); border: 2px solid var(--line); border-radius: var(--radius); padding: 18px 20px; cursor: pointer; }
.variante-karte:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--green-soft); }
.variante-karte input { width: 20px; height: 20px; margin-top: 3px; accent-color: var(--brand); flex: none; }
.variante-karte small { color: var(--muted); }
.banner-vorschau-wrap { position: sticky; top: 76px; z-index: 5; background: var(--bg); padding: 8px 0 12px; }
.vorschau-titel { margin: 0 0 6px; }
.vorschau-titel small { color: var(--muted); }
.banner-vorschau { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.banner-vorschau svg { display: block; width: 100%; height: auto; }
@media (max-width: 720px) { .banner-vorschau-wrap { position: static; } .banner-vorschau { overflow-x: auto; } .banner-vorschau svg { width: 900px; max-width: none; } }
.gestalter-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 40px; margin-top: 16px; }
@media (max-width: 900px) { .gestalter-grid { grid-template-columns: 1fr; gap: 24px; } }
.gestalter h2 { font-size: 1.4rem; margin-top: .6em; }
.tabs { display: flex; gap: 8px; margin-bottom: 12px; }
.tab { font: inherit; font-weight: 700; padding: 8px 16px; border-radius: 999px; border: 1px solid var(--line); background: var(--card); color: var(--ink); cursor: pointer; }
.tab.aktiv { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.tab[disabled] { opacity: .45; cursor: not-allowed; }
.vorlagen { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 4px; }
.chip-btn { font: inherit; font-size: .85rem; padding: 5px 12px; border-radius: 999px; border: 1px solid var(--line); background: var(--bg-soft); color: var(--ink); cursor: pointer; }
.chip-btn:hover { border-color: var(--brand); }
.preis-box { margin-top: 8px; background: var(--green-soft); border-radius: var(--radius); padding: 16px 20px; display: grid; gap: 2px; }
.preis-box strong { font-size: 1.7rem; }
.preis-box small { color: var(--muted); }

/* Stufe 2: Bestellung mit Liefertermin */
.bestell-dialog--breit { width: min(720px, calc(100% - 32px)); max-height: calc(100vh - 32px); overflow-y: auto; }
.bst-schritt { font-size: 1.1rem; margin: 22px 0 6px; }
.chip-reihe { display: flex; flex-wrap: wrap; gap: 8px; margin: 8px 0; }
.chip { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; border: 2px solid var(--line); background: var(--card); color: var(--ink); border-radius: 12px; padding: 8px 12px; font: inherit; font-weight: 650; cursor: pointer; }
.chip small { font-weight: 400; color: var(--muted); font-size: .8rem; }
.chip:hover { border-color: var(--brand); }
.chip[aria-selected="true"] { border-color: var(--brand); background: var(--green-soft); box-shadow: 0 0 0 3px var(--green-soft); }
.plz-ort { display: grid; grid-template-columns: 6.5em 1fr; gap: 8px; }
.plz-ort input[readonly] { background: var(--bg-soft); color: var(--muted); }
.zahlart { display: grid; gap: 10px; margin-bottom: 10px; }
.zahlart__option { display: flex; gap: 12px; align-items: flex-start; border: 2px solid var(--line); border-radius: var(--radius); padding: 12px 14px; cursor: pointer; }
.zahlart__option:has(input:checked) { border-color: var(--brand); box-shadow: 0 0 0 3px var(--green-soft); }
.zahlart__option input { width: 20px; height: 20px; margin-top: 2px; accent-color: var(--brand); flex: none; }
.zahlart__option span { display: flex; flex-direction: column; }
.zahlart__option small { color: var(--muted); }
@media (max-width: 560px) { .plz-ort { grid-template-columns: 5.5em 1fr; } }
