```html
<!DOCTYPE html>
<html lang="de">
<head>
<meta charset="UTF-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Grünwerk – Garten- und Landschaftsbau</title>
<meta
name="description"
content="Grünwerk gestaltet Außenbereiche mit Charakter: Gartenbau, Pflasterarbeiten, Terrassen und Pflege."
/>
<style>
:root {
--green-900: #10261b;
--green-800: #17352a;
--green-700: #1f4a39;
--green-500: #3f7a5c;
--cream: #f5f0e4;
--cream-dark: #e9e2d0;
--anthracite: #2b2e2d;
--anthracite-soft: #4a4e4c;
--accent: #c9b27a;
--radius: 22px;
--shadow: 0 18px 40px -18px rgba(16, 38, 27, 0.35);
}
* {
box-sizing: border-box;
margin: 0;
padding: 0;
}
html {
scroll-behavior: smooth;
scroll-padding-top: 84px;
}
body {
font-family:
"Segoe UI",
system-ui,
-apple-system,
"Helvetica Neue",
Arial,
sans-serif;
background: var(--cream);
color: var(--anthracite);
line-height: 1.65;
-webkit-font-smoothing: antialiased;
}
img,
svg {
max-width: 100%;
display: block;
}
a {
color: inherit;
}
.wrap {
width: min(1160px, 100% - 2.5rem);
margin-inline: auto;
}
h1,
h2,
h3 {
font-family: Georgia, "Times New Roman", serif;
line-height: 1.1;
letter-spacing: -0.02em;
font-weight: 700;
}
h1 {
font-size: clamp(2.6rem, 8vw, 5.6rem);
}
h2 {
font-size: clamp(2rem, 5vw, 3.4rem);
}
h3 {
font-size: 1.4rem;
}
.eyebrow {
display: inline-block;
font-size: 0.78rem;
letter-spacing: 0.18em;
text-transform: uppercase;
font-weight: 600;
color: var(--green-500);
margin-bottom: 1rem;
}
.btn {
display: inline-flex;
align-items: center;
gap: 0.6rem;
padding: 1rem 1.8rem;
border-radius: 999px;
font-weight: 600;
font-size: 1rem;
text-decoration: none;
border: 2px solid transparent;
cursor: pointer;
font-family: inherit;
transition:
transform 0.25s ease,
box-shadow 0.25s ease,
background 0.25s ease,
color 0.25s ease;
}
.btn:hover {
transform: translateY(-3px);
}
.btn:focus-visible,
a:focus-visible,
input:focus-visible,
textarea:focus-visible,
select:focus-visible {
outline: 3px solid var(--accent);
outline-offset: 3px;
}
.btn-primary {
background: var(--accent);
color: var(--green-900);
box-shadow: 0 10px 26px -10px rgba(201, 178, 122, 0.8);
}
.btn-primary:hover {
background: #d8c48f;
}
.btn-ghost {
border-color: rgba(245, 240, 228, 0.5);
color: var(--cream);
}
.btn-ghost:hover {
background: rgba(245, 240, 228, 0.12);
}
/* Header */
header {
position: fixed;
inset: 0 0 auto 0;
z-index: 50;
background: rgba(16, 38, 27, 0.88);
backdrop-filter: blur(12px);
-webkit-backdrop-filter: blur(12px);
border-bottom: 1px solid rgba(245, 240, 228, 0.08);
}
.nav {
display: flex;
align-items: center;
justify-content: space-between;
height: 72px;
}
.logo {
font-family: Georgia, serif;
font-size: 1.6rem;
font-weight: 700;
color: var(--cream);
text-decoration: none;
letter-spacing: -0.02em;
}
.logo span {
color: var(--accent);
}
.nav-links {
display: flex;
align-items: center;
gap: 2rem;
list-style: none;
}
.nav-links a {
color: var(--cream);
text-decoration: none;
font-size: 0.95rem;
opacity: 0.85;
transition: opacity 0.2s;
}
.nav-links a:hover {
opacity: 1;
}
.nav-links .btn {
padding: 0.6rem 1.3rem;
font-size: 0.9rem;
opacity: 1;
color: var(--green-900);
}
.menu-btn {
display: none;
background: none;
border: 0;
color: var(--cream);
cursor: pointer;
padding: 0.5rem;
}
.menu-btn span,
.menu-btn span::before,
.menu-btn span::after {
display: block;
width: 26px;
height: 2px;
background: currentColor;
border-radius: 2px;
transition:
transform 0.3s,
opacity 0.3s;
}
.menu-btn span {
position: relative;
}
.menu-btn span::before,
.menu-btn span::after {
content: "";
position: absolute;
left: 0;
}
.menu-btn span::before {
top: -8px;
}
.menu-btn span::after {
top: 8px;
}
.menu-btn[aria-expanded="true"] span {
background: transparent;
}
.menu-btn[aria-expanded="true"] span::before {
transform: translateY(8px) rotate(45deg);
}
.menu-btn[aria-expanded="true"] span::after {
transform: translateY(-8px) rotate(-45deg);
}
/* Hero */
.hero {
position: relative;
min-height: 100vh;
min-height: 100svh;
display: flex;
align-items: center;
padding: 120px 0 80px;
color: var(--cream);
overflow: hidden;
background:
radial-gradient(900px 500px at 85% 10%, rgba(63, 122, 92, 0.55), transparent 60%),
radial-gradient(700px 500px at 0% 100%, rgba(201, 178, 122, 0.12), transparent 60%),
linear-gradient(160deg, var(--green-900), var(--green-800) 60%, #0c1c14);
}
.hero::after {
content: "";
position: absolute;
right: -120px;
bottom: -160px;
width: 520px;
height: 520px;
border-radius: 50%;
border: 1px solid rgba(245, 240, 228, 0.12);
box-shadow:
0 0 0 60px rgba(245, 240, 228, 0.03),
0 0 0 140px rgba(245, 240, 228, 0.02);
pointer-events: none;
}
.hero .eyebrow {
color: var(--accent);
}
.hero h1 {
max-width: 14ch;
}
.hero h1 em {
font-style: italic;
color: var(--accent);
}
.hero p {
max-width: 54ch;
margin: 1.6rem 0 2.4rem;
font-size: 1.15rem;
color: rgba(245, 240, 228, 0.8);
}
.hero-actions {
display: flex;
flex-wrap: wrap;
gap: 1rem;
}
.hero-facts {
display: flex;
flex-wrap: wrap;
gap: 2.5rem;
margin-top: 4rem;
padding-top: 2rem;
border-top: 1px solid rgba(245, 240, 228, 0.15);
}
.hero-facts div {
font-size: 0.9rem;
color: rgba(245, 240, 228, 0.7);
}
.hero-facts strong {
display: block;
font-family: Georgia, serif;
font-size: 1.3rem;
color: var(--cream);
}
section {
padding: clamp(4.5rem, 10vw, 8rem) 0;
}
.section-head {
max-width: 720px;
margin-bottom: 3.5rem;
}
.section-head p {
margin-top: 1.2rem;
color: var(--anthracite-soft);
font-size: 1.1rem;
}
/* Leistungen */
.grid-4 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
gap: 1.5rem;
}
.card {
background: #fbf8f0;
border: 1px solid var(--cream-dark);
border-radius: var(--radius);
padding: 2rem;
transition:
transform 0.35s ease,
box-shadow 0.35s ease,
border-color 0.35s;
}
.card:hover {
transform: translateY(-8px);
box-shadow: var(--shadow);
border-color: var(--green-500);
}
.icon {
width: 56px;
height: 56px;
border-radius: 16px;
background: var(--green-800);
color: var(--accent);
display: grid;
place-items: center;
margin-bottom: 1.4rem;
}
.icon svg {
width: 28px;
height: 28px;
stroke: currentColor;
fill: none;
stroke-width: 1.7;
stroke-linecap: round;
stroke-linejoin: round;
}
.card h3 {
margin-bottom: 0.6rem;
}
.card p {
color: var(--anthracite-soft);
font-size: 0.98rem;
}
/* Projekte */
.projects {
background: var(--anthracite);
color: var(--cream);
}
.projects .eyebrow {
color: var(--accent);
}
.projects .section-head p {
color: rgba(245, 240, 228, 0.7);
}
.grid-3 {
display: grid;
grid-template-columns: repeat(auto-fit, minmax(290px, 1fr));
gap: 1.8rem;
}
.project {
border-radius: var(--radius);
overflow: hidden;
background: #353938;
border: 1px solid rgba(245, 240, 228, 0.08);
transition:
transform 0.35s ease,
box-shadow 0.35s ease;
}
.project:hover {
transform: translateY(-8px);
box-shadow: 0 24px 50px -20px rgba(0, 0, 0, 0.6);
}
.project-visual {
position: relative;
height: 210px;
}
.v1 {
background:
radial-gradient(circle at 30% 70%, #5d9a78 0, transparent 45%),
radial-gradient(circle at 75% 30%, #2f6249 0, transparent 50%),
linear-gradient(135deg, #1f4a39, #10261b);
}
.v2 {
background:
repeating-linear-gradient(45deg, rgba(245, 240, 228, 0.1) 0 2px, transparent 2px 26px),
repeating-linear-gradient(-45deg, rgba(245, 240, 228, 0.07) 0 2px, transparent 2px 26px),
linear-gradient(135deg, #5a5d5b, #2b2e2d);
}
.v3 {
background:
linear-gradient(180deg, transparent 55%, rgba(16, 38, 27, 0.55)),
repeating-linear-gradient(90deg, #b99a6a 0 38px, #a98a5c 38px 40px), #b99a6a;
}
.badge {
position: absolute;
top: 1rem;
left: 1rem;
background: var(--cream);
color: var(--green-900);
font-size: 0.72rem;
font-weight: 700;
letter-spacing: 0.1em;
text-transform: uppercase;
padding: 0.35rem 0.8rem;
border-radius: 999px;
}
.project-body {
padding: 1.8rem;
}
.project-body h3 {
margin-bottom: 0.6rem;
}
.project-body p {
color: rgba(245, 240, 228, 0.72);
font-size: 0.96rem;
}
.tags {
display: flex;
flex-wrap: wrap;
gap: 0.5rem;
margin-top: 1.2rem;
}
.tags span {
font-size: 0.78rem;
padding: 0.25rem 0.75rem;
border-radius: 999px;
border: 1px solid rgba(245, 240, 228, 0.2);
color: rgba(245, 240, 228, 0.8);
}
.note {
margin-top: 2rem;
font-size: 0.9rem;
color: rgba(245, 240, 228, 0.6);
}
/* Über uns */
.about-grid {
display: grid;
grid-template-columns: 1.1fr 0.9fr;
gap: clamp(2rem, 6vw, 5rem);
align-items: center;
}
.about-text p {
margin-top: 1.2rem;
color: var(--anthracite-soft);
font-size: 1.08rem;
}
.values {
display: grid;
gap: 1rem;
}
.value {
display: flex;
gap: 1.2rem;
padding: 1.5rem;
background: var(--green-800);
color: var(--cream);
border-radius: var(--radius);
}
.value b {
font-family: Georgia, serif;
font-size: 1.8rem;
color: var(--accent);
line-height: 1;
}
.value h3 {
font-size: 1.15rem;
margin-bottom: 0.25rem;
}
.value p {
font-size: 0.93rem;
color: rgba(245, 240, 228, 0.75);
}
/* Kontakt */
.contact {
background: linear-gradient(160deg, var(--green-900), var(--green-800));
color: var(--cream);
}
.contact .eyebrow {
color: var(--accent);
}
.contact-grid {
display: grid;
grid-template-columns: 1fr 1fr;
gap: clamp(2rem, 6vw, 5rem);
align-items: start;
}
.contact p.lead {
margin: 1.2rem 0 2rem;
color: rgba(245, 240, 228, 0.78);
font-size: 1.1rem;
}
.contact-list {
list-style: none;
display: grid;
gap: 0.8rem;
color: rgba(245, 240, 228, 0.75);
}
.contact-list li::before {
content: "→";
color: var(--accent);
margin-right: 0.7rem;
}
form {
background: var(--cream);
color: var(--anthracite);
padding: 2rem;
border-radius: var(--radius);
display: grid;
gap: 1.1rem;
box-shadow: var(--shadow);
}
label {
font-size: 0.85rem;
font-weight: 600;
display: grid;
gap: 0.4rem;
}
input,
textarea,
select {
font: inherit;
padding: 0.85rem 1rem;
border-radius: 12px;
border: 1.5px solid var(--cream-dark);
background: #fff;
color: var(--anthracite);
width: 100%;
}
input:focus,
textarea:focus,
select:focus {
border-color: var(--green-500);
}
textarea {
min-height: 120px;
resize: vertical;
}
form .btn {
justify-content: center;
width: 100%;
font-size: 1.1rem;
padding: 1.15rem 1.8rem;
}
.form-hint {
font-size: 0.8rem;
color: var(--anthracite-soft);
text-align: center;
}
footer {
background: #0c1c14;
color: rgba(245, 240, 228, 0.6);
padding: 2rem 0;
font-size: 0.9rem;
}
footer .wrap {
display: flex;
flex-wrap: wrap;
justify-content: space-between;
gap: 1rem;
}
/* Animationen */
.reveal {
opacity: 0;
transform: translateY(28px);
transition:
opacity 0.8s ease,
transform 0.8s ease;
}
.reveal.visible {
opacity: 1;
transform: none;
}
.d1 {
transition-delay: 0.1s;
}
.d2 {
transition-delay: 0.2s;
}
.d3 {
transition-delay: 0.3s;
}
@keyframes rise {
from {
opacity: 0;
transform: translateY(30px);
}
to {
opacity: 1;
transform: none;
}
}
.hero .wrap > * {
animation: rise 1s ease both;
}
.hero .wrap > *:nth-child(2) {
animation-delay: 0.15s;
}
.hero .wrap > *:nth-child(3) {
animation-delay: 0.3s;
}
.hero .wrap > *:nth-child(4) {
animation-delay: 0.45s;
}
.hero .wrap > *:nth-child(5) {
animation-delay: 0.6s;
}
/* Mobil */
@media (max-width: 860px) {
.menu-btn {
display: block;
}
.nav-links {
position: absolute;
top: 72px;
left: 0;
right: 0;
flex-direction: column;
align-items: stretch;
gap: 0;
background: var(--green-900);
padding: 1rem 1.25rem 1.5rem;
border-bottom: 1px solid rgba(245, 240, 228, 0.1);
transform: translateY(-12px);
opacity: 0;
visibility: hidden;
transition:
transform 0.3s,
opacity 0.3s,
visibility 0.3s;
}
.nav-links.open {
transform: none;
opacity: 1;
visibility: visible;
}
.nav-links li a {
display: block;
padding: 1rem 0.25rem;
border-bottom: 1px solid rgba(245, 240, 228, 0.08);
}
.nav-links li:last-child {
margin-top: 1rem;
}
.nav-links li:last-child a {
border: 0;
text-align: center;
}
.about-grid,
.contact-grid {
grid-template-columns: 1fr;
}
.hero-facts {
gap: 1.5rem;
margin-top: 3rem;
}
.btn {
width: 100%;
justify-content: center;
}
.nav-links .btn {
width: auto;
}
}
@media (prefers-reduced-motion: reduce) {
html {
scroll-behavior: auto;
}
*,
*::before,
*::after {
animation: none !important;
transition: none !important;
}
.reveal {
opacity: 1;
transform: none;
}
}
</style>
</head>
<body>
<header>
<div class="wrap nav">
<a href="#top" class="logo">Grün<span>werk</span></a>
<button
class="menu-btn"
aria-label="Menü öffnen"
aria-expanded="false"
aria-controls="menu"
>
<span></span>
</button>
<ul class="nav-links" id="menu">
<li><a href="#leistungen">Leistungen</a></li>
<li><a href="#projekte">Projekte</a></li>
<li><a href="#ueber-uns">Über uns</a></li>
<li><a href="#kontakt" class="btn btn-primary">Anfrage</a></li>
</ul>
</div>
</header>
<main id="top">
<section class="hero">
<div class="wrap">
<span class="eyebrow">Garten- & Landschaftsbau</span>
<h1>Wir gestalten Außenbereiche mit <em>Charakter.</em></h1>
<p>
Von der ersten Skizze bis zur fertigen Fläche: Grünwerk plant und baut Gärten, Terrassen
und Wege, die zu Ihnen und Ihrem Haus passen – langlebig, sauber ausgeführt und mit Sinn
für Details.
</p>
<div class="hero-actions">
<a href="#kontakt" class="btn btn-primary">Unverbindlich anfragen</a>
<a href="#leistungen" class="btn btn-ghost">Leistungen ansehen</a>
</div>
<div class="hero-facts">
<div><strong>Planung</strong>persönlich & individuell</div>
<div><strong>Ausführung</strong>sorgfältig & termintreu</div>
<div><strong>Pflege</strong>auf Wunsch dauerhaft</div>
</div>
</div>
</section>
<section id="leistungen">
<div class="wrap">
<div class="section-head reveal">
<span class="eyebrow">Leistungen</span>
<h2>Alles für Ihren Außenbereich.</h2>
<p>
Vier Kernleistungen, die sich beliebig kombinieren lassen – aus einer Hand geplant und
umgesetzt.
</p>
</div>
<div class="grid-4">
<article class="card reveal">
<div class="icon">
<svg viewBox="0 0 24 24">
<path d="M12 21v-9" />
<path d="M12 12c0-4 3-7 8-7 0 5-3 7-8 7z" />
<path d="M12 15c0-3-2.5-5-7-5 0 4 2.5 5 7 5z" />
</svg>
</div>
<h3>Gartenbau</h3>
<p>
Neuanlage und Umgestaltung von Gärten: Beete, Rasenflächen, Bepflanzung und Gehölze
– abgestimmt auf Standort und Nutzung.
</p>
</article>
<article class="card reveal d1">
<div class="icon">
<svg viewBox="0 0 24 24">
<rect x="3" y="4" width="8" height="6" rx="1" />
<rect x="13" y="4" width="8" height="6" rx="1" />
<rect x="3" y="14" width="5" height="6" rx="1" />
<rect x="10" y="14" width="11" height="6" rx="1" />
</svg>
</div>
<h3>Pflasterarbeiten</h3>
<p>
Einfahrten, Wege und Hofflächen mit tragfähigem Unterbau, sauberem Fugenbild und
fachgerechtem Gefälle.
</p>
</article>
<article class="card reveal d2">
<div class="icon">
<svg viewBox="0 0 24 24">
<path d="M3 10h18" />
<path d="M5 10v10" />
<path d="M19 10v10" />
<path d="M3 10l3-6h12l3 6" />
</svg>
</div>
<h3>Terrassen</h3>
<p>
Terrassen aus Naturstein, Keramik oder Holz – als Wohnraum im Freien, der Wetter und
Jahren standhält.
</p>
</article>
<article class="card reveal d3">
<div class="icon">
<svg viewBox="0 0 24 24">
<circle cx="12" cy="12" r="4" />
<path
d="M12 2v3M12 19v3M2 12h3M19 12h3M4.9 4.9l2.1 2.1M17 17l2.1 2.1M19.1 4.9L17 7M7 17l-2.1 2.1"
/>
</svg>
</div>
<h3>Pflege</h3>
<p>
Regelmäßige Gartenpflege, Schnitt und Saisonarbeiten – einmalig oder als laufende
Betreuung.
</p>
</article>
</div>
</div>
</section>
<section id="projekte" class="projects">
<div class="wrap">
<div class="section-head reveal">
<span class="eyebrow">Projektbeispiele</span>
<h2>So könnte Ihr Projekt aussehen.</h2>
<p>
Die folgenden Karten sind erfundene Beispiele und zeigen, wie wir Aufgaben angehen. Es
handelt sich nicht um abgeschlossene Kundenprojekte.
</p>
</div>
<div class="grid-3">
<article class="project reveal">
<div class="project-visual v1"><span class="badge">Beispiel</span></div>
<div class="project-body">
<h3>Reihenhausgarten neu gedacht</h3>
<p>
Ein schmaler Garten mit klarer Struktur: Sitzplatz, Staudenbeet und pflegeleichte
Rasenfläche statt ungenutzter Restfläche.
</p>
<div class="tags"><span>Gartenbau</span><span>Bepflanzung</span></div>
</div>
</article>
<article class="project reveal d1">
<div class="project-visual v2"><span class="badge">Beispiel</span></div>
<div class="project-body">
<h3>Einfahrt mit Natursteinpflaster</h3>
<p>
Belastbarer Aufbau, ruhiges Verlegemuster und eine saubere Entwässerung für eine
Zufahrt, die lange schön bleibt.
</p>
<div class="tags"><span>Pflaster</span><span>Entwässerung</span></div>
</div>
</article>
<article class="project reveal d2">
<div class="project-visual v3"><span class="badge">Beispiel</span></div>
<div class="project-body">
<h3>Holzterrasse am Hang</h3>
<p>
Eine Terrasse mit Stufen und Einfassung, die das Gelände aufnimmt und den Garten
in Zonen gliedert.
</p>
<div class="tags"><span>Terrasse</span><span>Holzbau</span></div>
</div>
</article>
</div>
<p class="note">
Hinweis: Alle drei Projekte sind fiktive Beispiele zur Veranschaulichung.
</p>
</div>
</section>
<section id="ueber-uns">
<div class="wrap about-grid">
<div class="about-text reveal">
<span class="eyebrow">Über uns</span>
<h2>Handwerk, das man sieht.</h2>
<p>
Grünwerk steht für einen Garten- und Landschaftsbau, der Planung und Ausführung
zusammenbringt. Wir hören zuerst zu, schauen uns Ihre Fläche an und entwickeln daraus
ein Konzept, das zu Ihrem Alltag passt.
</p>
<p>
Uns ist wichtig, ehrlich zu beraten, transparent zu kalkulieren und Arbeiten so
auszuführen, dass sie auch in Jahren noch überzeugen.
</p>
<p style="margin-top: 2rem">
<a href="#kontakt" class="btn btn-primary">Gespräch vereinbaren</a>
</p>
</div>
<div class="values">
<div class="value reveal">
<b>01</b>
<div>
<h3>Persönlich beraten</h3>
<p>Ein fester Ansprechpartner vom ersten Gespräch bis zur Übergabe.</p>
</div>
</div>
<div class="value reveal d1">
<b>02</b>
<div>
<h3>Sorgfältig ausführen</h3>
<p>Solider Unterbau, saubere Kanten, durchdachte Details.</p>
</div>
</div>
<div class="value reveal d2">
<b>03</b>
<div>
<h3>Nachhaltig denken</h3>
<p>Robuste Materialien und Pflanzen, die zum Standort passen.</p>
</div>
</div>
</div>
</div>
</section>
<section id="kontakt" class="contact">
<div class="wrap contact-grid">
<div class="reveal">
<span class="eyebrow">Kontakt</span>
<h2>Erzählen Sie uns von Ihrem Vorhaben.</h2>
<p class="lead">
Schildern Sie kurz, was Sie planen. Wir melden uns und besprechen die nächsten
Schritte – unverbindlich.
</p>
<ul class="contact-list">
<li>Erstgespräch unverbindlich</li>
<li>Rückmeldung zu Ihrem Vorhaben</li>
<li>Transparente Angebote</li>
</ul>
</div>
<form id="anfrage" class="reveal d1" novalidate>
<label
>Name
<input type="text" name="name" autocomplete="name" required />
</label>
<label
>E-Mail
<input type="email" name="email" autocomplete="email" required />
</label>
<label
>Worum geht es?
<select name="thema">
<option>Gartenbau</option>
<option>Pflasterarbeiten</option>
<option>Terrasse</option>
<option>Pflege</option>
<option>Etwas anderes</option>
</select>
</label>
<label
>Ihre Nachricht
<textarea
name="nachricht"
placeholder="Kurz beschreiben, was Sie vorhaben …"
></textarea>
</label>
<button type="submit" class="btn btn-primary">Anfrage senden</button>
<p class="form-hint" id="hint">
Öffnet Ihr E-Mail-Programm mit einer vorbereiteten Nachricht.
</p>
</form>
</div>
</section>
</main>
<footer>
<div class="wrap">
<span>© <span id="year">2026</span> Grünwerk – fiktiver Beispielbetrieb</span>
<span>Dies ist eine Demo-Website.</span>
</div>
</footer>
<script>
// Empfängeradresse hier durch die echte Adresse ersetzen (Platzhalter-Domain):
var EMPFAENGER = "anfrage@example.com";
// Mobile Navigation
var btn = document.querySelector(".menu-btn");
var menu = document.getElementById("menu");
function closeMenu() {
menu.classList.remove("open");
btn.setAttribute("aria-expanded", "false");
btn.setAttribute("aria-label", "Menü öffnen");
}
btn.addEventListener("click", function () {
var open = menu.classList.toggle("open");
btn.setAttribute("aria-expanded", open ? "true" : "false");
btn.setAttribute("aria-label", open ? "Menü schließen" : "Menü öffnen");
});
menu.querySelectorAll("a").forEach(function (a) {
a.addEventListener("click", closeMenu);
});
document.addEventListener("keydown", function (e) {
if (e.key === "Escape") closeMenu();
});
// Einblend-Animationen
var items = document.querySelectorAll(".reveal");
if ("IntersectionObserver" in window) {
var io = new IntersectionObserver(
function (entries) {
entries.forEach(function (en) {
if (en.isIntersecting) {
en.target.classList.add("visible");
io.unobserve(en.target);
}
});
},
{ threshold: 0.15 },
);
items.forEach(function (el) {
io.observe(el);
});
} else {
items.forEach(function (el) {
el.classList.add("visible");
});
}
// Anfrage-Formular: erzeugt eine vorbereitete E-Mail
document.getElementById("anfrage").addEventListener("submit", function (e) {
e.preventDefault();
var f = e.target;
var hint = document.getElementById("hint");
if (!f.name.value.trim() || !/^\S+@\S+\.\S+$/.test(f.email.value)) {
hint.textContent = "Bitte geben Sie Ihren Namen und eine gültige E-Mail-Adresse an.";
return;
}
var body =
"Name: " +
f.name.value +
"\nE-Mail: " +
f.email.value +
"\nThema: " +
f.thema.value +
"\n\n" +
f.nachricht.value;
window.location.href =
"mailto:" +
EMPFAENGER +
"?subject=" +
encodeURIComponent("Anfrage über die Website") +
"&body=" +
encodeURIComponent(body);
hint.textContent =
"Ihr E-Mail-Programm wurde geöffnet. Bitte senden Sie die Nachricht dort ab.";
});
document.getElementById("year").textContent = new Date().getFullYear();
</script>
</body>
</html>
```