/* ==========================================================================
   JAKOB'S DIENSTLEISTUNGEN — Stylesheet
   Inhaber: Arslan Yakub · Hausmeisterservice & Gebäudeservice · Laupheim

   Aufbau (Top-down, vom Allgemeinen zum Speziellen):
   01. Design Tokens (Custom Properties)
   02. Reset & Base
   03. Typography Helpers
   04. Layout Primitives (container, grid, section)
   05. Components (buttons, cards, badges, forms ...)
   06. Header / Navigation
   07. Hero
   08. Section-spezifisches
   09. Footer (inkl. Logo-Cutout-Reveal)
   10. Utilities
   11. Motion / Reveal (GSAP-gestützt, mit Fallback)
   12. Responsive (Breakpoints)
   13. Reduced Motion / Print
   ========================================================================== */

/* 01. DESIGN TOKENS ======================================================== */
:root {
  /* Markenfarben – Grün aus der Vorlage: #00A650 */
  --green:        #00a650;
  --green-600:    #019247;
  --green-700:    #017a3b;
  --green-800:    #0a5e30;
  --green-050:    #e9f7ef;
  --green-100:    #d3efe0;

  /* Neutrale Töne (leicht grün getönt für Wärme) */
  --ink:          #10201a;   /* Headlines / sehr dunkel */
  --night:        #0c1813;   /* dunkle Sektionen / Footer */
  --text:         #33433c;   /* Fließtext */
  --muted:        #66776e;   /* sekundär */
  --line:         #e2ebe5;   /* feine Trennlinien */
  --bg:           #ffffff;
  --bg-alt:       #f4f8f5;   /* sehr helles Grün-Grau */
  --white:        #ffffff;

  /* Creme-/Off-White-Töne (Hero-Headline & Texte auf Foto) */
  --cream:        #f4eee2;
  --cream-muted:  rgba(244, 238, 226, .86);
  --green-on-dark:#5fd497;   /* helleres Grün für Akzente auf dunklem Foto */

  /* Effekte */
  --shadow-sm:  0 1px 2px rgba(16,32,26,.06), 0 2px 8px rgba(16,32,26,.05);
  --shadow-md:  0 6px 18px rgba(16,32,26,.08), 0 2px 6px rgba(16,32,26,.05);
  --shadow-lg:  0 18px 50px rgba(16,32,26,.14), 0 6px 16px rgba(16,32,26,.08);
  --shadow-green: 0 14px 34px rgba(0,166,80,.28);

  /* Radien */
  --r-sm: 10px;
  --r:    16px;
  --r-lg: 22px;
  --r-xl: 30px;
  --r-pill: 999px;

  /* Maße */
  --container: 1520px;
  --container-wide: 1680px;
  --gutter: clamp(1.25rem, 2.6vw, 2.5rem);
  --section-y: clamp(4rem, 8vw, 7rem);
  --header-h: 96px;

  /* Typografie */
  --font-head: "Sora", "Segoe UI", system-ui, -apple-system, sans-serif;
  --font-body: "Inter", "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;

  /* Easing */
  --ease: cubic-bezier(.22,.61,.36,1);
  --ease-out: cubic-bezier(.16,1,.3,1);
}

/* 02. RESET & BASE ========================================================= */
*, *::before, *::after { box-sizing: border-box; }

* { margin: 0; }

html {
  scroll-behavior: smooth;
  -webkit-text-size-adjust: 100%;
  scroll-padding-top: calc(var(--header-h) + 12px);
  overflow-x: hidden; /* Sicherheitsnetz gegen horizontales Verschieben */
}

body {
  font-family: var(--font-body);
  color: var(--text);
  background: var(--bg);
  line-height: 1.65;
  font-size: 1rem;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
  overflow-x: hidden;
}

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

a { color: inherit; text-decoration: none; }

ul, ol { list-style: none; padding: 0; }

button, input, textarea, select { font: inherit; color: inherit; }

button { cursor: pointer; background: none; border: 0; }

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

::selection { background: var(--green); color: #fff; }

/* 03. TYPOGRAPHY =========================================================== */
h1, h2, h3, h4 {
  font-family: var(--font-head);
  color: var(--ink);
  line-height: 1.1;
  font-weight: 700;
  letter-spacing: -0.02em;
}

h1 { font-size: clamp(2.3rem, 6vw, 4rem); }
h2 { font-size: clamp(1.8rem, 4vw, 2.85rem); }
h3 { font-size: clamp(1.25rem, 2.4vw, 1.6rem); letter-spacing: -0.01em; }
h4 { font-size: 1.1rem; letter-spacing: -0.01em; }

p { color: var(--text); }

.lead { font-size: clamp(1.05rem, 1.6vw, 1.2rem); color: var(--muted); }

strong { color: var(--ink); font-weight: 600; }

/* 04. LAYOUT PRIMITIVES ==================================================== */
.container {
  width: 100%;
  max-width: var(--container);
  margin-inline: auto;
  padding-inline: var(--gutter);
}
.container--wide { max-width: var(--container-wide); }

.section { padding-block: var(--section-y); position: relative; }
.section--alt { background: var(--bg-alt); }
.section--tight { padding-block: clamp(2.5rem, 5vw, 4rem); }

/* Sektions-Kopf im Stil der Vorlage: Eyebrow + H2 + grüne Linie */
.section-head { margin-bottom: clamp(2rem, 4vw, 3.25rem); max-width: 760px; }
.section-head--center { margin-inline: auto; text-align: center; }

.eyebrow {
  display: inline-flex;
  align-items: center;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .8rem;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--green-700);
  margin-bottom: .9rem;
}
.section-head--center .eyebrow { justify-content: center; }

.title-rule {
  display: flex;
  align-items: center;
  gap: clamp(1rem, 3vw, 2rem);
}
.title-rule::after {
  content: "";
  flex: 1;
  height: 3px;
  background: linear-gradient(90deg, var(--green), rgba(0,166,80,.15));
  border-radius: 3px;
}
.section-head--center .title-rule { justify-content: center; }
.section-head--center .title-rule::after { display: none; }

.section-head p { margin-top: 1.1rem; }

/* Grid helper */
.grid { display: grid; gap: clamp(1.1rem, 2.5vw, 1.9rem); }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }

/* 05. COMPONENTS =========================================================== */
/* Buttons */
.btn {
  --btn-bg: var(--green);
  --btn-fg: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .6rem;
  padding: .92em 1.7em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .98rem;
  line-height: 1;
  border-radius: var(--r-pill);
  background: var(--btn-bg);
  color: var(--btn-fg);
  border: 2px solid transparent;
  transition: transform .35s var(--ease), box-shadow .35s var(--ease),
              background-color .3s var(--ease), color .3s var(--ease);
}
.btn svg { width: 1.1em; height: 1.1em; }
/* Kein Lift/Bewegung beim Hover – nur Farbwechsel (siehe Varianten unten) */

.btn--primary { --btn-bg: var(--green-700); } /* AA: weißer Text ≥ 4.5:1 */
.btn--primary:hover { background: var(--green-600); }

.btn--outline {
  --btn-bg: transparent;
  --btn-fg: var(--green-700);
  border-color: var(--green);
}
.btn--outline:hover {
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-green);
}

.btn--light {
  --btn-bg: #fff;
  --btn-fg: var(--ink);
}
.btn--light:hover { background: var(--green-050); }

.btn--ghost-light {
  --btn-bg: transparent;
  --btn-fg: #fff;
  border-color: rgba(255,255,255,.55);
  backdrop-filter: blur(4px);
}
.btn--ghost-light:hover { background: rgba(255,255,255,.14); border-color:#fff; }

.btn--lg { padding: 1.05em 2em; font-size: 1.05rem; }
.btn--block { display: flex; width: 100%; }

/* Pill / Badge */
.pill {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  padding: .5em .95em;
  font-size: .82rem;
  font-weight: 600;
  font-family: var(--font-head);
  border-radius: var(--r-pill);
  background: var(--green-050);
  color: var(--green-700);
  border: 1px solid var(--green-100);
}
.pill svg { width: 1.05em; height: 1.05em; color: var(--green); }

/* Card */
.card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .45s var(--ease), box-shadow .45s var(--ease),
              border-color .45s var(--ease);
}

/* Service-Karten (Übersicht) — angelehnt an die gerundeten Karten der Vorlage */
.service-card {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  border: 1.5px solid var(--green-100);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-sm);
  transition: transform .5s var(--ease), box-shadow .5s var(--ease),
              border-color .5s var(--ease);
}
.service-card:hover {
  box-shadow: var(--shadow-lg);
  border-color: var(--green);
}
.service-card__media {
  position: relative;
  aspect-ratio: 16 / 11;
  overflow: hidden;
}
.service-card__media img {
  width: 100%; height: 100%;
  object-fit: cover;
  transition: transform .8s var(--ease);
}
.service-card:hover .service-card__media img { transform: scale(1.07); }
.service-card__media::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 45%, rgba(10,32,22,.35));
}
.service-card__icon {
  position: absolute;
  left: 1rem; top: 1rem;
  width: 46px; height: 46px;
  display: grid; place-items: center;
  background: rgba(255,255,255,.92);
  color: var(--green-700);
  border-radius: 12px;
  box-shadow: var(--shadow-sm);
}
.service-card__icon svg { width: 24px; height: 24px; }
.service-card__body { padding: 1.4rem 1.4rem 1.6rem; display: flex; flex-direction: column; gap: .6rem; flex: 1; }
.service-card__body h3 {
  color: var(--ink);
  font-size: clamp(1.1rem, 1.4vw, 1.3rem);
  hyphens: auto;
  -webkit-hyphens: auto;
}
.service-card__body p { font-size: .96rem; color: var(--muted); }
.service-card__link {
  margin-top: auto;
  display: inline-flex; align-items: center; gap: .45rem;
  font-family: var(--font-head); font-weight: 600; font-size: .92rem;
  color: var(--green-700);
}
.service-card__link svg { width: 1.05em; height: 1.05em; transition: transform .3s var(--ease); }
.service-card:hover .service-card__link svg { transform: translateX(4px); }

/* Feature-Karte (Vorteile / Warum wir) */
.feature {
  padding: 1.6rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease);
}
.feature:hover { box-shadow: var(--shadow-md); }
.feature__icon {
  width: 52px; height: 52px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--green-050);
  color: var(--green-700);
  margin-bottom: 1rem;
}
.feature__icon svg { width: 26px; height: 26px; }
.feature h3 { font-size: 1.15rem; margin-bottom: .4rem; }
.feature p { font-size: .95rem; color: var(--muted); }

/* Check-Liste */
.checklist { display: grid; gap: .7rem; }
.checklist li {
  position: relative;
  padding-left: 2.1rem;
  color: var(--text);
  overflow-wrap: break-word; /* verhindert Overflow durch lange Komposita */
  hyphens: auto;
}
.checklist li::before {
  content: "";
  position: absolute;
  left: 0; top: .15em;
  width: 1.35rem; height: 1.35rem;
  border-radius: 50%;
  background:
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='20 6 9 17 4 12'/%3E%3C/svg%3E") center / 62% no-repeat,
    var(--green);
}
.checklist--tight li { padding-left: 1.9rem; font-size: .96rem; }

/* Media + Text Feature-Row */
.media-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: clamp(1.6rem, 4vw, 4rem);
  align-items: center;
}
.media-row + .media-row { margin-top: clamp(3rem, 6vw, 5rem); }
.media-row__media {
  position: relative;
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-md);
}
.media-row__media img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.media-row--reverse .media-row__text { order: 2; }
.media-row--reverse .media-row__media { order: 1; }
.media-row__text h3 { margin-bottom: 1rem; }
.media-row__text p + p { margin-top: .9rem; }
.media-row__text .checklist { margin-top: 1.3rem; }

/* floating accent on media */
.media-badge {
  position: absolute;
  bottom: 1rem; left: 1rem;
  background: rgba(12,24,19,.78);
  color: #fff;
  padding: .55em 1em;
  border-radius: var(--r-pill);
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .85rem;
  backdrop-filter: blur(6px);
}

/* Sub-Leistungen Grid (Hausmeisterservice Detail) */
.subservice {
  padding: 1.5rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform .4s var(--ease), box-shadow .4s var(--ease), border-color .4s var(--ease);
}
.subservice:hover { box-shadow: var(--shadow-md); border-color: var(--green-100); }
.subservice__num {
  font-family: var(--font-head);
  font-weight: 700;
  font-size: .85rem;
  color: var(--green-700); /* AA-Kontrast auf Weiß */
  letter-spacing: .05em;
}
.subservice h4 { margin: .35rem 0 .55rem; color: var(--ink); font-size: 1.12rem; }
.subservice p { font-size: .94rem; color: var(--muted); }

/* Stats */
.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1.5rem; }
.stat { text-align: center; }
.stat__num {
  font-family: var(--font-head);
  font-weight: 800;
  font-size: clamp(2rem, 4.5vw, 3rem);
  color: var(--green);
  line-height: 1;
  letter-spacing: -0.02em;
}
.stat__label { margin-top: .5rem; font-size: .92rem; color: var(--muted); }

/* Gallery */
.gallery {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  grid-auto-rows: 200px;
  gap: 14px;
}
.gallery__item {
  position: relative;
  overflow: hidden;
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  cursor: zoom-in;
}
.gallery__item img { width: 100%; height: 100%; object-fit: cover; transition: transform .7s var(--ease); }
.gallery__item:hover img { transform: scale(1.08); }
.gallery__item::after {
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, transparent 55%, rgba(10,32,22,.45));
  opacity: 0; transition: opacity .4s var(--ease);
}
.gallery__item:hover::after { opacity: 1; }
.gallery__item--tall { grid-row: span 2; }
.gallery__item--wide { grid-column: span 2; }
.gallery__cap {
  position: absolute; left: 12px; bottom: 12px;
  color: #fff; font-family: var(--font-head); font-weight: 600; font-size: .88rem;
  opacity: 0;
  transition: opacity .4s var(--ease);
  z-index: 2;
}
.gallery__item:hover .gallery__cap { opacity: 1; }

/* Lightbox */
.lightbox {
  position: fixed; inset: 0;
  display: none;
  place-items: center;
  background: rgba(8,16,12,.92);
  z-index: 1000;
  padding: clamp(1rem, 4vw, 3rem);
  opacity: 0;
  transition: opacity .35s var(--ease);
}
.lightbox.is-open { display: grid; }
.lightbox.is-visible { opacity: 1; }
.lightbox__figure {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: .9rem;
  max-width: 100%;
}
.lightbox img {
  max-width: 100%;
  max-height: 80vh;
  border-radius: var(--r);
  box-shadow: var(--shadow-lg);
  touch-action: pan-y;
  -webkit-user-select: none;
  user-select: none;
}
.lightbox__caption {
  color: #fff;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .95rem;
  text-align: center;
}
.lightbox__caption:empty { display: none; }
.lightbox__close, .lightbox__nav {
  position: absolute;
  display: grid; place-items: center;
  width: 52px; height: 52px;
  border-radius: 50%;
  background: rgba(255,255,255,.12);
  color: #fff;
  transition: background .3s var(--ease), transform .3s var(--ease);
}
.lightbox__close { top: clamp(1rem,3vw,2rem); right: clamp(1rem,3vw,2rem); }
.lightbox__close:hover { background: rgba(255,255,255,.25); transform: rotate(90deg); }
.lightbox__nav { top: 50%; transform: translateY(-50%); }
.lightbox__nav:hover { background: var(--green); }
.lightbox__nav--prev { left: clamp(.5rem,3vw,2rem); }
.lightbox__nav--next { right: clamp(.5rem,3vw,2rem); }
.lightbox__nav svg, .lightbox__close svg { width: 24px; height: 24px; }

/* Forms */
.form { display: grid; gap: 1.1rem; }
.form__row { display: grid; grid-template-columns: 1fr 1fr; gap: 1.1rem; }
.field { display: flex; flex-direction: column; gap: .4rem; }
.field label {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .88rem;
  color: var(--ink);
}
.field .req { color: var(--green-700); }
.field input, .field textarea {
  width: 100%;
  padding: .85em 1em;
  background: var(--bg);
  border: 1.5px solid var(--line);
  border-radius: var(--r-sm);
  transition: border-color .25s var(--ease), box-shadow .25s var(--ease), background .25s;
}
.field textarea { resize: vertical; min-height: 140px; }
.field input::placeholder, .field textarea::placeholder { color: #5e6f66; }
.field input:focus, .field textarea:focus {
  outline: none;
  border-color: var(--green);
  box-shadow: 0 0 0 4px var(--green-050);
}
.field--invalid input, .field--invalid textarea { border-color: #d8473b; }
.field--invalid input:focus, .field--invalid textarea:focus { box-shadow: 0 0 0 4px #fbe7e5; }
.field__error {
  font-size: .8rem;
  color: #c8392d;
  min-height: 1em;
  display: none;
}
.field--invalid .field__error { display: block; }

.consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .75rem;
  align-items: start;
  font-size: .88rem;
  color: var(--muted);
}
.consent input { width: 1.25rem; height: 1.25rem; margin-top: .15rem; accent-color: var(--green); }
.consent a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }

.form__status {
  display: none;
  align-items: center;
  gap: .6rem;
  padding: .9em 1.1em;
  border-radius: var(--r-sm);
  font-weight: 600;
  font-family: var(--font-head);
  font-size: .92rem;
}
.form__status.is-shown { display: flex; }
.form__status--ok { background: var(--green-050); color: var(--green-700); border: 1px solid var(--green-100); }
.form__status--err { background: #fdecea; color: #c8392d; border: 1px solid #f6cfca; }

/* Contact info card */
.contact-info { display: grid; gap: 1.1rem; align-content: start; }
.contact-item {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 1rem;
  align-items: center;
  padding: 1.1rem 1.2rem;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r);
  box-shadow: var(--shadow-sm);
  transition: transform .35s var(--ease), box-shadow .35s var(--ease);
}
.contact-item:hover { box-shadow: var(--shadow-md); }
.contact-item .contact-item__icon {
  width: 48px; height: 48px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  background: var(--green-050);
  color: var(--green-700);
  border-radius: 12px;
  flex-shrink: 0;
  align-self: center;
  line-height: 0;
}
.contact-item__icon svg { width: 24px; height: 24px; display: block; }
.contact-item__text span { display: block; font-size: .8rem; color: var(--muted); }
.contact-item strong { display: block; color: var(--ink); font-size: 1.05rem; font-family: var(--font-head); }

/* 06. HEADER / NAVIGATION ================================================== */
.header {
  position: fixed;
  inset: 0 0 auto 0;
  height: var(--header-h);
  z-index: 100;
  display: flex;
  align-items: center;
  transition: background-color .4s var(--ease), box-shadow .4s var(--ease),
              border-color .4s var(--ease), backdrop-filter .4s var(--ease);
  border-bottom: 1px solid transparent;
}
.header::before {
  /* sanfter Verlauf über dem Hero für Lesbarkeit */
  content: "";
  position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,16,12,.55), transparent);
  opacity: 1;
  transition: opacity .4s var(--ease);
  pointer-events: none;
}
.header.is-scrolled {
  background: rgba(255,255,255,.92);
  backdrop-filter: saturate(140%) blur(10px);
  box-shadow: var(--shadow-sm);
  border-bottom-color: var(--line);
}
.header.is-scrolled::before { opacity: 0; }

.nav {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: var(--container-wide);
  margin-inline: auto;
  padding-inline: var(--gutter);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.5rem;
}
.brand { display: flex; align-items: center; gap: .6rem; flex-shrink: 0; }
.brand img { height: 58px; width: auto; transition: opacity .3s var(--ease); }
/* Dezenter Schatten sichert Lesbarkeit der weißen Silhouette über hellen Hero-Stellen */
.brand .logo-light { filter: drop-shadow(0 1px 3px rgba(0,0,0,.45)); }
.brand .logo-dark { display: none; }
.header.is-scrolled .brand .logo-light { display: none; }
.header.is-scrolled .brand .logo-dark { display: block; }

.nav__menu { display: flex; align-items: center; gap: .35rem; }
.nav__link {
  position: relative;
  padding: .55em .85em;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .92rem;
  color: #fff;
  border-radius: var(--r-sm);
  transition: color .3s var(--ease);
}
.nav__link::after {
  content: "";
  position: absolute;
  left: .85em; right: .85em; bottom: .35em;
  height: 2px;
  background: var(--green);
  transform: scaleX(0);
  transform-origin: left;
  transition: transform .3s var(--ease);
}
.nav__link:hover::after, .nav__link.is-active::after { transform: scaleX(1); }
.header.is-scrolled .nav__link { color: var(--ink); }
.header.is-scrolled .nav__link:hover, .header.is-scrolled .nav__link.is-active { color: var(--green-700); }

.nav__actions { display: flex; align-items: center; gap: .6rem; }

/* Pills im Header (Vorlagen-Stil): Ghost-Outline + grüne Pill + Kreis-Button.
   Zustände wechseln zwischen Hero (Creme) und gescrolltem Header (dunkel). */
.nav__ghost, .nav__solid {
  display: inline-flex;
  align-items: center;
  gap: .5rem;
  font-family: var(--font-head);
  font-weight: 600;
  font-size: .9rem;
  line-height: 1;
  padding: .72em 1.2em;
  border-radius: var(--r-pill);
  white-space: nowrap;
  border: 1.5px solid transparent;
  transition: background-color .3s var(--ease), color .3s var(--ease),
              border-color .3s var(--ease), transform .3s var(--ease);
}
.nav__ghost { border-color: rgba(244,238,226,.5); color: var(--cream); }
.nav__ghost svg { width: 1.05em; height: 1.05em; }
.nav__ghost:hover { background: rgba(255,255,255,.14); border-color: var(--cream); }
.header.is-scrolled .nav__ghost { border-color: #cfe7d8; color: var(--green-700); }
.header.is-scrolled .nav__ghost:hover { background: var(--green-050); border-color: var(--green); }

.nav__solid { background: var(--green-700); color: #fff; }
.nav__solid:hover { background: var(--green-600); }

.nav__round {
  display: grid;
  place-items: center;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  flex-shrink: 0;
  transition: background-color .3s var(--ease), transform .3s var(--ease);
}
.nav__round svg { width: 18px; height: 18px; }
.nav__round:hover { background: var(--green-600); }

/* CTA, die nur im mobilen Off-Canvas-Menü erscheint */
.nav__cta-mobile { display: none; }

/* Mobile burger */
.nav__toggle {
  display: none;
  width: 46px; height: 46px;
  border-radius: 12px;
  position: relative;
  flex-shrink: 0;
}
.nav__toggle span {
  position: absolute;
  left: 12px; right: 12px;
  height: 2.5px;
  background: #fff;
  border-radius: 3px;
  transition: transform .35s var(--ease), opacity .25s var(--ease), background .3s var(--ease);
}
.nav__toggle span:nth-child(1) { top: 16px; }
.nav__toggle span:nth-child(2) { top: 22px; }
.nav__toggle span:nth-child(3) { top: 28px; }
.header.is-scrolled .nav__toggle span { background: var(--ink); }
body.menu-open .nav__toggle span:nth-child(1) { transform: translateY(6px) rotate(45deg); }
body.menu-open .nav__toggle span:nth-child(2) { opacity: 0; }
body.menu-open .nav__toggle span:nth-child(3) { transform: translateY(-6px) rotate(-45deg); }

/* Scroll progress bar */
.scroll-progress {
  position: fixed;
  top: 0; left: 0;
  height: 3px;
  width: 100%;
  transform: scaleX(0);
  transform-origin: left;
  background: linear-gradient(90deg, var(--green), var(--green-600));
  z-index: 101;
}

/* 07. HERO (Vorlagen-Stil: volle Foto-Bühne, Creme-Headline, Feature-Leiste) === */
.hero {
  position: relative;
  min-height: 100svh;
  display: flex;
  overflow: hidden;
  color: var(--cream);
  isolation: isolate;
}
.hero__bg { position: absolute; inset: 0; z-index: -2; overflow: hidden; }
.hero__bg img {
  width: 100%; height: 100%;
  object-fit: cover;
  transform: scale(1.18); /* identisch zum GSAP-Startwert → kein Sprung */
  will-change: transform;
}
/* Verlauf: oben dezent (Nav lesbar), links für Headline, unten dunkel für Feature-Leiste */
.hero__bg::after {
  content: "";
  position: absolute; inset: 0;
  background:
    linear-gradient(180deg, rgba(8,16,12,.6) 0%, rgba(8,16,12,.1) 16%, rgba(8,16,12,0) 30%),
    linear-gradient(90deg, rgba(8,16,12,.94) 0%, rgba(8,16,12,.82) 32%, rgba(8,16,12,.58) 52%, rgba(8,16,12,.25) 70%, rgba(8,16,12,0) 88%),
    linear-gradient(0deg, rgba(8,16,12,.9) 0%, rgba(8,16,12,.4) 26%, rgba(8,16,12,0) 52%);
}
.hero__inner {
  position: relative;
  width: 100%;
  min-height: 100svh;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: clamp(2.5rem, 7vh, 6rem);
  /* Kein Padding am Container: nur Linien laufen randlos durch; Text wird
     einzeln eingerückt (Padding auf den Inhalts-Elementen). */
  padding: calc(var(--header-h) + clamp(1.5rem,5vh,3rem)) 0 0;
}

/* Linie unter dem Header – nur im Hero, randlos (edge-to-edge) */
.hero::before {
  content: "";
  position: absolute;
  top: var(--header-h);
  left: 0; right: 0;
  height: 1px;
  background: rgba(244,238,226,.2);
  z-index: 0;
}

/* obere Headline-Gruppe (Text behält seitliches Padding) */
.hero__top { max-width: calc(880px + var(--gutter)); padding-inline: var(--gutter); }
.hero__title {
  color: var(--cream);
  font-weight: 600;
  font-size: clamp(2.1rem, 5vw, 4.25rem);
  line-height: 1.06;
  letter-spacing: -0.02em;
  margin-bottom: 1.3rem;
  text-wrap: balance;
}
.hero__sub {
  font-size: clamp(0.95rem, 1.15vw, 1.08rem);
  color: var(--cream-muted);
  max-width: 500px;
  margin-bottom: 2rem;
}
.hero__cta { display: flex; align-items: center; gap: .9rem; flex-wrap: wrap; }

/* runder Pfeil-Button als Akzent neben der Pill */
.btn-round {
  display: inline-grid;
  place-items: center;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--green-700);
  color: #fff;
  flex-shrink: 0;
  transition: transform .35s var(--ease), background-color .3s var(--ease), box-shadow .35s var(--ease);
}
.btn-round svg { width: 22px; height: 22px; }
.btn-round:hover { background: var(--green-600); }

/* Feature-Leiste am unteren Hero-Rand.
   Titel steht ÜBER der Linie; die Linie (Grid-Border-Top) verbindet sich mit
   den vertikalen Trennern zwischen den Vorteilen (Tabellen-Optik wie Vorlage). */
.hero__features-title {
  font-family: var(--font-head);
  font-weight: 600;
  font-size: clamp(1.2rem, 2.1vw, 1.7rem);
  color: var(--cream);
  letter-spacing: -0.01em;
  margin-bottom: clamp(1rem, 2.2vh, 1.5rem);
  padding-inline: var(--gutter); /* Titel eingerückt, Linie darunter randlos */
}
.hero__features-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  border-top: 1px solid rgba(244,238,226,.26); /* randlose Linie */
}
/* Zellen sind vollbreit: Border (Linien) umschließt das Padding → Linien laufen
   randlos und bis nach unten, der Inhalt bleibt durch Padding eingerückt. */
.hero-feature { padding: clamp(1.4rem, 2.6vh, 2rem) clamp(1.25rem, 2.5vw, 2.25rem) clamp(1.6rem, 3vh, 2.4rem); }
.hero-feature:first-child { padding-left: var(--gutter); }
.hero-feature:last-child { padding-right: var(--gutter); }
.hero-feature + .hero-feature { border-left: 1px solid rgba(244,238,226,.22); }
.hero-feature__icon {
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border: 1.5px solid rgba(244,238,226,.42);
  border-radius: 50%;
  color: var(--cream);
  margin-bottom: 1rem;
}
.hero-feature__icon svg { width: 22px; height: 22px; }
.hero-feature h3 { color: var(--green-on-dark); font-size: 1.18rem; margin-bottom: .4rem; }
.hero-feature p { color: var(--cream-muted); font-size: .95rem; max-width: 34ch; }

/* 08. SECTION-SPECIFIC ===================================================== */

/* Über uns */
.about { display: grid; grid-template-columns: 1.05fr 1fr; gap: clamp(2rem,5vw,4.5rem); align-items: center; }
.about__media { position: relative; }
.about__media-main {
  border-radius: var(--r-lg);
  overflow: hidden;
  box-shadow: var(--shadow-lg);
  aspect-ratio: 4/5;
}
.about__media-main img { width: 100%; height: 100%; object-fit: cover; }
.about__badge {
  position: absolute;
  right: -10px; bottom: -22px;
  background: var(--green);
  color: #fff;
  padding: 1.2rem 1.4rem;
  border-radius: var(--r);
  box-shadow: var(--shadow-green);
  max-width: 220px;
}
.about__badge strong { display: block; font-family: var(--font-head); font-size: 2rem; line-height: 1; color: #fff; }
.about__badge span { font-size: .82rem; color: rgba(255,255,255,.9); }
.about__text p + p { margin-top: 1rem; }
.about__values { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem 1.4rem; margin-top: 1.6rem; }

/* CTA-Band */
.cta-band {
  position: relative;
  overflow: hidden;
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  color: #fff;
  border-radius: var(--r-xl);
  padding: clamp(2.5rem, 5vw, 4rem);
  display: grid;
  grid-template-columns: 1.4fr auto;
  gap: 2rem;
  align-items: center;
}
.cta-band::before {
  content: "";
  position: absolute;
  right: -60px; top: -60px;
  width: 320px; height: 320px;
  border-radius: 50%;
  background: radial-gradient(circle, rgba(255,255,255,.12), transparent 70%);
}
.cta-band h2 { color: #fff; }
.cta-band p { color: rgba(255,255,255,.9); margin-top: .8rem; max-width: 540px; }
.cta-band__actions { display: flex; flex-direction: column; gap: .9rem; position: relative; }

/* Kontakt */
.contact-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: clamp(2rem,4vw,3.5rem); align-items: start; }
.contact-card {
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: var(--shadow-md);
  padding: clamp(1.6rem, 3vw, 2.5rem);
}
.map {
  margin-top: 1.1rem;
  border-radius: var(--r);
  overflow: hidden;
  border: 1px solid var(--line);
  box-shadow: var(--shadow-sm);
  line-height: 0;
}
.map iframe { width: 100%; height: 240px; border: 0; filter: grayscale(.2) contrast(1.02); }

/* 09. FOOTER =============================================================== */
.footer { background: var(--night); color: rgba(255,255,255,.72); position: relative; }

/* Footer-Inhalt */
.footer-main {
  padding-block: clamp(3rem, 6vw, 4.5rem) 2rem;
}
.footer-grid {
  display: grid;
  grid-template-columns: 1.4fr 1fr 1fr 1.2fr;
  gap: clamp(1.6rem, 4vw, 3rem);
}
.footer-col h4 { color: #fff; font-size: 1rem; margin-bottom: 1.1rem; }
.footer-brand__logo { height: 46px; width: auto; margin-bottom: 1.1rem; }
.footer-brand p { font-size: .92rem; max-width: 32ch; color: rgba(255,255,255,.92); }
.footer-social { display: flex; gap: .7rem; margin-top: 1.3rem; }
.footer-social a {
  width: 42px; height: 42px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: rgba(255,255,255,.07);
  color: rgba(255,255,255,.8);
  transition: background .3s var(--ease), color .3s var(--ease), transform .3s var(--ease);
}
.footer-social a:hover { background: var(--green); color: #fff; }
.footer-social svg { width: 20px; height: 20px; }

.footer-links li + li { margin-top: .6rem; }
.footer-links a {
  font-size: .94rem;
  color: rgba(255,255,255,.72);
  transition: color .25s var(--ease), padding-left .25s var(--ease);
  display: inline-flex; align-items: center; gap: .45rem;
}
.footer-links a::before {
  content: "";
  width: 6px; height: 6px; border-radius: 50%;
  background: var(--green);
  opacity: 0; transform: translateX(-6px);
  transition: opacity .25s var(--ease), transform .25s var(--ease);
}
.footer-links a:hover { color: #fff; }
.footer-links a:hover::before { opacity: 1; transform: translateX(0); }

.footer-contact li {
  display: flex; gap: .7rem; align-items: flex-start;
  font-size: .94rem; margin-bottom: .8rem;
}
.footer-contact svg { width: 18px; height: 18px; color: var(--green); flex-shrink: 0; margin-top: .2rem; }
.footer-contact a:hover { color: #fff; }

.footer-bottom {
  border-top: 1px solid rgba(255,255,255,.1);
  padding-block: 1.5rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1rem;
  justify-content: space-between;
  align-items: center;
  font-size: .85rem;
}
.footer-bottom nav { display: flex; flex-wrap: wrap; gap: 1.2rem; }
.footer-bottom a:hover { color: #fff; }

/* Back to top */
.to-top {
  position: fixed;
  right: clamp(1rem, 3vw, 2rem);
  bottom: clamp(1rem, 3vw, 2rem);
  width: 50px; height: 50px;
  display: grid; place-items: center;
  border-radius: 50%;
  background: var(--green);
  color: #fff;
  box-shadow: var(--shadow-green);
  opacity: 0; visibility: hidden;
  transform: translateY(12px);
  transition: opacity .35s var(--ease), transform .35s var(--ease), visibility .35s, background .3s;
  z-index: 90;
}
.to-top.is-shown { opacity: 1; visibility: visible; transform: translateY(0); }
.to-top:hover { background: var(--green-600); }
.to-top svg { width: 22px; height: 22px; }

/* 10. UTILITIES =========================================================== */
.center { text-align: center; }
.mt-0 { margin-top: 0; }
.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;
}
.no-scroll { overflow: hidden; }

/* Skip-Link: für Maus/Touch verborgen, bei Tastaturfokus sichtbar (WCAG 2.4.1) */
.skip-link {
  position: absolute;
  left: .75rem;
  top: -120px;
  z-index: 1000;
  background: #fff;
  color: var(--green-700);
  padding: .65em 1.1em;
  border-radius: 8px;
  font-family: var(--font-head);
  font-weight: 600;
  box-shadow: var(--shadow-md);
  transition: top .25s var(--ease);
}
.skip-link:focus { top: .75rem; outline: 3px solid var(--green); outline-offset: 2px; }

/* Legal pages */
.page-hero {
  background: linear-gradient(120deg, var(--green-800), var(--green-600));
  color: #fff;
  padding-top: calc(var(--header-h) + clamp(2.5rem, 6vw, 4.5rem));
  padding-bottom: clamp(2.5rem, 6vw, 4.5rem);
}
.page-hero h1 { color: #fff; }
.page-hero p { color: rgba(255,255,255,.88); margin-top: .6rem; }
.legal { max-width: 860px; }
.legal h2 { font-size: clamp(1.4rem, 2.5vw, 1.9rem); margin: 2.4rem 0 .9rem; }
.legal h3 { font-size: 1.15rem; margin: 1.6rem 0 .6rem; }
.legal p { margin-bottom: 1rem; }
.legal ul { list-style: disc; padding-left: 1.3rem; margin-bottom: 1rem; }
.legal ul li { margin-bottom: .4rem; }
.legal a { color: var(--green-700); text-decoration: underline; text-underline-offset: 2px; }
.legal address { font-style: normal; line-height: 1.8; }

/* 11. MOTION / REVEAL ===================================================== */
/* Standard: alles sichtbar. Erst wenn GSAP geladen ist (html.gsap-ready),
   werden Reveal-Elemente initial versteckt – so bleibt die Seite ohne JS
   vollständig nutzbar (Progressive Enhancement). */
html.gsap-ready .reveal { opacity: 0; }
html.gsap-ready .reveal-up { opacity: 0; transform: translateY(32px); }
html.gsap-ready .reveal-left { opacity: 0; transform: translateX(-36px); }
html.gsap-ready .reveal-right { opacity: 0; transform: translateX(36px); }
html.gsap-ready .reveal-scale { opacity: 0; transform: scale(.94); }

/* 12. RESPONSIVE ========================================================== */
@media (max-width: 1024px) {
  .grid-4 { grid-template-columns: repeat(2, 1fr); }
  .footer-grid { grid-template-columns: 1.4fr 1fr 1fr; }
  .footer-contact-col { grid-column: 1 / -1; }
  .gallery { grid-template-columns: repeat(3, 1fr); }
}

@media (max-width: 880px) {
  :root { --header-h: 80px; }
  .brand img { height: 50px; }

  .nav__ghost, .nav__solid, .nav__round { display: none; }
  .nav__toggle { display: block; }

  /* Mobile-Menü (Off-canvas Panel) – modern, ohne Trennstriche */
  .nav__menu {
    display: flex;
    position: fixed;
    inset: calc(var(--header-h) + .5rem) clamp(.75rem, 4vw, 1.25rem) auto;
    flex-direction: column;
    align-items: stretch;
    gap: .55rem;
    background: rgba(255,255,255,.98);
    backdrop-filter: saturate(140%) blur(12px);
    padding: .75rem;
    border-radius: 22px;
    box-shadow: 0 30px 60px -28px rgba(8,16,12,.45), 0 2px 8px rgba(8,16,12,.06);
    transform: translateY(-12px) scale(.98);
    transform-origin: top center;
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: transform .4s var(--ease), opacity .35s var(--ease), visibility .4s var(--ease);
    max-height: calc(100svh - var(--header-h) - 1.5rem);
    overflow-y: auto;
  }
  body.menu-open .nav__menu {
    transform: translateY(0) scale(1);
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  /* Menüpunkte als große, abgerundete Tap-Flächen */
  .nav__link {
    color: var(--ink);
    padding: .6em .85em;
    border: 0;
    border-radius: 12px;
    font-size: 1.05rem;
    font-weight: 600;
    transition: background-color .25s var(--ease), color .25s var(--ease);
  }
  .nav__link::after { display: none; }
  .nav__link:hover,
  .nav__link:active,
  .nav__link.is-active {
    background: var(--green-050);
    color: var(--green-700);
  }

  /* CTA im Menü */
  .nav__cta-mobile { display: block; margin-top: .5rem; }
  .nav__cta-mobile .btn { width: 100%; }

  /* Gestaffelte Einblendung der Einträge */
  .nav__menu > li {
    opacity: 0;
    transform: translateY(6px);
    transition: opacity .3s var(--ease), transform .3s var(--ease);
  }
  body.menu-open .nav__menu > li { opacity: 1; transform: none; }
  body.menu-open .nav__menu > li:nth-child(1) { transition-delay: .06s; }
  body.menu-open .nav__menu > li:nth-child(2) { transition-delay: .10s; }
  body.menu-open .nav__menu > li:nth-child(3) { transition-delay: .14s; }
  body.menu-open .nav__menu > li:nth-child(4) { transition-delay: .18s; }
  body.menu-open .nav__menu > li:nth-child(5) { transition-delay: .22s; }
  body.menu-open .nav__menu > li:nth-child(6) { transition-delay: .26s; }

  /* Backdrop hinter dem Menü */
  .nav-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(8,16,12,.42);
    backdrop-filter: blur(2px);
    opacity: 0;
    visibility: hidden;
    pointer-events: none;
    transition: opacity .4s var(--ease), visibility .4s var(--ease);
    z-index: 90;
  }
  body.menu-open .nav-backdrop {
    opacity: 1;
    visibility: visible;
    pointer-events: auto;
  }

  .stats { grid-template-columns: repeat(2, 1fr); gap: 1.8rem 1rem; }
  .about { grid-template-columns: 1fr; }
  .about__media { max-width: 440px; margin-inline: auto; }
  .cta-band { grid-template-columns: 1fr; text-align: center; }
  .cta-band p { margin-inline: auto; }
  .cta-band__actions { align-items: center; }
  .contact-grid { grid-template-columns: 1fr; }
}

@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; }
  .about__values { grid-template-columns: 1fr; }
  .media-row { grid-template-columns: 1fr; }
  .media-row--reverse .media-row__text { order: 1; }
  .media-row--reverse .media-row__media { order: 0; }
  .form__row { grid-template-columns: 1fr; }
  .gallery { grid-template-columns: repeat(2, 1fr); grid-auto-rows: 150px; }
  .gallery__item--wide { grid-column: span 2; }
  .footer-grid { grid-template-columns: 1fr; }
  .footer-bottom { justify-content: center; text-align: center; }

  /* ---- Hero passt exakt in eine volle (s)vh, ohne Überlauf -------------- */
  .hero__inner {
    height: 100svh;
    min-height: 0;
    gap: clamp(1rem, 3vh, 2rem);
    padding-top: calc(var(--header-h) + clamp(.9rem, 3vh, 1.5rem));
    padding-bottom: clamp(.9rem, 2.5vh, 1.4rem);
  }
  /* Obere Gruppe füllt den Raum über den Vorteilen: Texte sitzen im oberen
     Drittel, der Button wird per auto-Margin nach unten geschoben → gute Ratio. */
  .hero__top {
    flex: 1 1 auto;
    display: flex;
    flex-direction: column;
    justify-content: flex-start;
    gap: 0;
    padding-top: clamp(.5rem, 4vh, 2.5rem);
  }
  .hero__title {
    font-size: clamp(1.85rem, 8.5vw, 2.5rem);
    margin-bottom: 1rem;
  }
  .hero__sub {
    font-size: .95rem;
    line-height: 1.5;
    margin-bottom: auto;
  }
  .hero__cta { margin-bottom: clamp(.75rem, 3vh, 2rem); }

  /* Hintergrundbild nach rechts versetzt, damit mehr vom linken Bildteil sichtbar ist */
  .hero__bg img { object-position: 28% center; }

  /* Vorteile als kompakte 3er-Reihe: nur Icon + Kurztitel (Absätze ausgeblendet) */
  .hero__features-title {
    font-size: 1rem;
    margin-bottom: .7rem;
  }
  .hero__features-grid { grid-template-columns: repeat(3, 1fr); }
  .hero-feature {
    padding: clamp(.8rem, 2.4vh, 1.2rem) .7rem;
    text-align: center;
  }
  .hero-feature:first-child { padding-left: var(--gutter); }
  .hero-feature:last-child { padding-right: var(--gutter); }
  .hero-feature + .hero-feature { border-left: 1px solid rgba(244,238,226,.22); border-top: 0; }
  .hero-feature__icon {
    width: 40px; height: 40px;
    margin-inline: auto;
    margin-bottom: .55rem;
  }
  .hero-feature__icon svg { width: 18px; height: 18px; }
  .hero-feature h3 { font-size: .82rem; line-height: 1.2; margin-bottom: 0; }
  .hero-feature p { display: none; }
}

@media (max-width: 420px) {
  .gallery { grid-template-columns: 1fr; grid-auto-rows: 200px; }
  .gallery__item--wide, .gallery__item--tall { grid-column: auto; grid-row: auto; }
}

/* 13. REDUCED MOTION / PRINT ============================================== */
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after {
    animation-duration: .001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .001ms !important;
  }
  .hero__bg img { transform: none; }
  html.gsap-ready .reveal,
  html.gsap-ready .reveal-up,
  html.gsap-ready .reveal-left,
  html.gsap-ready .reveal-right,
  html.gsap-ready .reveal-scale { opacity: 1; transform: none; }
}

@media print {
  .header, .to-top, .scroll-progress { display: none; }
  .hero { min-height: auto; color: #000; }
  .hero__bg { display: none; }
}
