/* ============================================================
   Carpe Diem Web-Services – Stylesheet
   Palette: Lime-Grün Akzent auf Hellgrau
   ============================================================ */

:root {
  --lime:        #84cc16;   /* Akzent */
  --lime-dark:   #65a30d;   /* Hover / Text auf hell */
  --lime-soft:   #ecfccb;   /* zarte Flächen */
  --ink:         #1c1f1a;   /* Haupttext, fast schwarz mit Grünstich */
  --ink-soft:    #4b5043;   /* Sekundärtext */
  --grey-bg:     #f4f5f3;   /* Seitenhintergrund hellgrau */
  --grey-line:   #e0e2dd;   /* Trennlinien */
  --white:       #ffffff;
  --radius:      14px;
  --radius-sm:   8px;
  --shadow:      0 1px 2px rgba(28,31,26,.04), 0 8px 24px rgba(28,31,26,.06);
  --wrap:        1080px;
  --font-display:'Space Grotesk', system-ui, sans-serif;
  --font-body:   'Inter', system-ui, -apple-system, sans-serif;
}

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

html { scroll-behavior: smooth; }

body {
  margin: 0;
  font-family: var(--font-body);
  font-size: 17px;
  line-height: 1.65;
  color: var(--ink);
  background: var(--grey-bg);
  -webkit-font-smoothing: antialiased;
}

img { max-width: 100%; height: auto; }

a { color: var(--lime-dark); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 {
  font-family: var(--font-display);
  line-height: 1.15;
  color: var(--ink);
  font-weight: 600;
}

h1 { font-size: clamp(1.8rem, 4vw, 2.6rem); margin: 0 0 .6em; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 3vw, 1.9rem); margin: 1.4em 0 .5em; letter-spacing: -.01em; }
h3 { font-size: 1.2rem; margin: 1.2em 0 .4em; }

p { margin: 0 0 1em; }

.wrap { width: min(var(--wrap), 100% - 2.5rem); margin-inline: auto; }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 1rem; top: 1rem; border-radius: var(--radius-sm); }

/* ---------- Header ---------- */
.site-header {
  position: sticky; top: 0; z-index: 50;
  background: rgba(244,245,243,.85);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--grey-line);
}
.header-inner {
  display: flex; align-items: center; justify-content: space-between;
  gap: 1rem; min-height: 72px;
}

.brand { display: flex; align-items: center; gap: .7rem; color: var(--ink); }
.brand:hover { text-decoration: none; }
.brand-logo {
  height: 42px; width: auto; flex: none;
  display: block;
}
.brand-text { display: flex; flex-direction: column; line-height: 1.05; }
.brand-name { font-family: var(--font-display); font-weight: 700; font-size: 1.15rem; }
.brand-sub  { font-size: .72rem; letter-spacing: .14em; text-transform: uppercase; color: var(--ink-soft); }

/* ---------- Navigation ---------- */
.mainnav ul { list-style: none; margin: 0; padding: 0; }
.mainnav > ul { display: flex; gap: .3rem; }
.mainnav > ul > li { position: relative; }
.mainnav a {
  display: block; padding: .55rem .9rem; border-radius: var(--radius-sm);
  color: var(--ink); font-weight: 500; font-size: .98rem;
}
.mainnav a:hover { background: var(--lime-soft); text-decoration: none; }
.mainnav a[aria-current="page"] {
  background: var(--lime); color: var(--ink); font-weight: 600;
}

.has-sub > a::after {
  content: "▾"; font-size: .7em; margin-left: .35em; color: var(--ink-soft);
}
.submenu {
  position: absolute; top: 100%; left: 0; min-width: 180px;
  background: var(--white); border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm); box-shadow: var(--shadow);
  padding: .35rem; flex-direction: column; gap: .15rem;
  display: none;
}
/* Sichtbarkeit ausschliesslich über JS (.open) – kein CSS-:hover,
   das auf Touch-Geräten oder nach Klick hängenbleiben könnte. */
.has-sub.open .submenu { display: flex; }

.nav-toggle {
  display: none; flex-direction: column; gap: 5px;
  width: 44px; height: 44px; padding: 10px; border: 0;
  background: transparent; cursor: pointer; border-radius: var(--radius-sm);
}
.nav-toggle span { height: 2px; background: var(--ink); border-radius: 2px; transition: .25s; }
.nav-toggle[aria-expanded="true"] span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
.nav-toggle[aria-expanded="true"] span:nth-child(2) { opacity: 0; }
.nav-toggle[aria-expanded="true"] span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

/* ---------- Main / Panels ---------- */
main { padding: 2.5rem 0 4rem; }

.panel {
  background: var(--white);
  border: 1px solid var(--grey-line);
  border-radius: var(--radius);
  padding: clamp(1.4rem, 4vw, 2.6rem);
  box-shadow: var(--shadow);
  margin-bottom: 1.5rem;
}

/* Hero auf Startseite */
.hero {
  background: linear-gradient(135deg, #1b3a1f 0%, #2f5e2a 55%, #3d7a2f 100%);
  color: #fff; border: 0;
  position: relative; overflow: hidden;
  display: flex; align-items: center; gap: 2rem;
}
.hero-text { flex: 1 1 0; min-width: 0; }
/* Das Eichhörnchen-Bild enthält den Kreis samt Auflagefläche bereits
   fertig – CSS liefert nur noch Position und Grösse. */
.hero-img {
  flex: none; align-self: center;
  display: flex; align-items: center; justify-content: center;
  position: relative; z-index: 1;
}
.hero-img img {
  width: 300px; height: auto;
  filter: drop-shadow(0 12px 26px rgba(0,0,0,.28));
}
.hero h1, .hero h2 { color: #fff; }
.hero .lead { font-size: 1.15rem; color: #e4efd8; max-width: 46ch; }
.hero .accent { color: #b8f04a; }
.hero-buttons { margin-bottom: 0; }
.hero::after {
  content: ""; position: absolute; right: 4%; top: 50%; transform: translateY(-50%);
  width: 320px; height: 320px; border-radius: 50%;
  background: radial-gradient(circle, rgba(184,240,74,.4), transparent 70%);
  z-index: 0;
}

/* Buttons */
.btn {
  display: inline-block; background: var(--lime); color: var(--ink);
  font-weight: 600; padding: .7rem 1.4rem; border-radius: 999px;
  border: 0; cursor: pointer; font-family: var(--font-body); font-size: 1rem;
}
.btn:hover { background: var(--lime-dark); color: #fff; text-decoration: none; }
.btn-ghost { background: rgba(255,255,255,.08); color: #fff; box-shadow: inset 0 0 0 2px rgba(255,255,255,.35); }
.btn-ghost:hover { background: var(--lime); color: var(--ink); box-shadow: none; }
/* Ghost-Button ausserhalb des dunklen Hero (heller Hintergrund) */
.panel:not(.hero) .btn-ghost { background: transparent; color: var(--ink); box-shadow: inset 0 0 0 2px var(--grey-line); }
.panel:not(.hero) .btn-ghost:hover { background: var(--lime-soft); }

/* Feature-Liste */
.features { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(240px,1fr)); margin: 1.5rem 0; padding: 0; list-style: none; }
.features li {
  background: var(--grey-bg); border: 1px solid var(--grey-line);
  border-radius: var(--radius-sm); padding: 1.1rem 1.2rem;
}
.features li strong { display: block; font-family: var(--font-display); margin-bottom: .25rem; }

/* Kontakt-Infozeilen */
.info-grid { display: grid; grid-template-columns: max-content 1fr; gap: .4rem 1.5rem; margin: 1rem 0; }
.info-grid dt { font-weight: 600; color: var(--ink-soft); }
.info-grid dd { margin: 0; }

/* WhatsApp-Icon klein */
.wa-icon { width: 14px; vertical-align: -2px; }

/* ---------- Formular ---------- */
.contact-layout { display: grid; gap: 2rem; grid-template-columns: 1fr 1.3fr; align-items: start; }
.form-field { margin-bottom: 1rem; }
.form-field label { display: block; font-weight: 500; margin-bottom: .3rem; font-size: .95rem; }
.form-field .req { color: var(--lime-dark); }
.form-field input, .form-field textarea {
  width: 100%; padding: .65rem .8rem; font: inherit;
  border: 1px solid var(--grey-line); border-radius: var(--radius-sm);
  background: var(--grey-bg); color: var(--ink);
}
.form-field input:focus, .form-field textarea:focus {
  outline: 2px solid var(--lime); outline-offset: 1px; background: #fff;
}
.form-actions { display: flex; gap: .8rem; align-items: center; margin-top: .5rem; }
.form-hint { font-size: .85rem; color: var(--ink-soft); margin-top: 1rem; }
/* Honeypot – für Menschen unsichtbar */
.hp-field { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.alert { border-radius: var(--radius-sm); padding: 1rem 1.2rem; margin-bottom: 1rem; }
.alert-ok   { background: var(--lime-soft); border: 1px solid var(--lime); }
.alert-err  { background: #fef2f2; border: 1px solid #fca5a5; color: #991b1b; }

/* ---------- Team ---------- */
.team-lead {
  display: flex; gap: 1.2rem; flex-wrap: wrap; align-items: center;
  background: var(--lime-soft); border-radius: var(--radius);
  padding: 1.4rem; margin-bottom: 1.5rem;
}
.team-grid { display: grid; gap: 1.2rem; grid-template-columns: repeat(auto-fit, minmax(230px,1fr)); }
.team-card {
  background: var(--grey-bg); border: 1px solid var(--grey-line);
  border-radius: var(--radius); padding: 1.2rem; text-align: center;
}
.team-card img { width: 100px; height: 100px; border-radius: 50%; object-fit: cover; margin-bottom: .7rem; }
.team-card .role { color: var(--ink-soft); font-size: .9rem; }

/* ---------- Timeline ---------- */
.timeline { list-style: none; margin: 1.5rem 0 0; padding: 0; position: relative; }
.timeline::before {
  content: ""; position: absolute; left: 92px; top: 6px; bottom: 6px;
  width: 2px; background: var(--grey-line);
}
.timeline li { position: relative; display: grid; grid-template-columns: 78px 1fr; gap: 1.8rem; padding-bottom: 1.4rem; }
.timeline .year {
  font-family: var(--font-display); font-weight: 700; color: var(--lime-dark);
  text-align: right; font-size: 1.05rem;
}
.timeline li::before {
  content: ""; position: absolute; left: 86px; top: 7px;
  width: 14px; height: 14px; border-radius: 50%;
  background: var(--lime); box-shadow: 0 0 0 4px var(--grey-bg);
}
.timeline .event { padding-bottom: .2rem; padding-left: .4rem; }

/* Regio-Logos */
.regio-logos { display: flex; flex-wrap: wrap; gap: 1rem; justify-content: center; margin: 1.5rem 0; }
.regio-logos img { border: 1px solid var(--grey-line); border-radius: var(--radius-sm); }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink); color: #c9cfc0; margin-top: 2rem;
  padding: 2.2rem 0; font-size: .95rem;
}
.footer-inner { display: flex; flex-wrap: wrap; gap: 1.5rem; justify-content: space-between; }
.site-footer a { color: var(--lime); }
.footer-copy { color: #8a917f; }

/* ---------- Responsive ---------- */
@media (max-width: 760px) {
  .nav-toggle { display: flex; }
  .mainnav {
    position: fixed; inset: 72px 0 auto 0;
    background: var(--white); border-bottom: 1px solid var(--grey-line);
    box-shadow: var(--shadow);
    max-height: 0; overflow: hidden; transition: max-height .3s ease;
  }
  .mainnav.open { max-height: 80vh; }
  .mainnav ul { flex-direction: column; gap: 0; padding: .5rem; }
  .mainnav a { padding: .8rem 1rem; }
  .submenu { position: static; display: flex; box-shadow: none; border: 0; padding-left: 1rem; background: transparent; }
  .has-sub > a::after { display: none; }
  .contact-layout { grid-template-columns: 1fr; }
  .hero { flex-direction: column-reverse; gap: 1rem; text-align: center; }
  .hero .lead { margin-inline: auto; }
  .hero-buttons { display: flex; justify-content: center; flex-wrap: wrap; }
  .hero-img img { width: 250px; }
  .hero::after { right: 50%; transform: translate(50%,-50%); top: 26%; width: 220px; height: 220px; }
  .timeline::before { left: 76px; }
  .timeline li { grid-template-columns: 64px 1fr; gap: 1.4rem; }
  .timeline li::before { left: 70px; }
  .timeline .year { font-size: .95rem; }
}

@media (prefers-reduced-motion: reduce) {
  * { scroll-behavior: auto; transition: none !important; }
}
