/* ==========================================================================
   automatisch leads – globale Styles
   Optik (Farben, Schriften, Typo-Skala): Markenleitfaden v1.0
   Struktur (Abstände, Container, Section-Padding, Breakpoints, Radien):
   Growcave-Webdesign-System (Relume Client-First v3)

   Aufbau: 1 Schriften · 2 Tokens · 3 Reset · 4 Typografie · 5 Layout
           6 Buttons & Links · 7 Komponenten · 8 Navbar · 9 Footer · 10 Utilities

   Breakpoints: Desktop ≥ 992px · Tablet ≤ 991px · Mobile L ≤ 767px · Mobile P ≤ 479px
   ========================================================================== */

/* 1 · Schriften (lokal gehostet) ---------------------------------------- */
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/instrument-sans-400.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/instrument-sans-500.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/instrument-sans-600.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Sans'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/instrument-sans-700.woff2') format('woff2'); }
@font-face { font-family: 'Instrument Serif'; font-style: italic; font-weight: 400; font-display: swap; src: url('/fonts/instrument-serif-italic.woff2') format('woff2'); }

/* 2 · Design-Tokens ----------------------------------------------------- */
:root {
  /* Markenfarben */
  --c-waldgruen: #16302A;      /* Primär: Text, Flächen, Buttons */
  --c-koralle: #FF5A36;        /* Akzent: Serif-Wörter, Highlights (auf Papier erst ab 28px) */
  --c-koralle-dunkel: #B8391A; /* Koralle für kleinen Text und Links */
  --c-papier: #F5F1E8;         /* Hintergrund statt Weiß */
  --c-moos: #2F6B57;           /* Sekundär: Hover, Icons, Grafiken */
  --c-salbei: #D7ECD9;         /* Status „passt“, helle Flächen */

  /* Text & Neutrale */
  --c-text: #16302A;
  --c-text-2: #3F5049;         /* Sekundärtext */
  --c-meta: #5D6B64;           /* Labels, Meta */
  --c-linie: #E4DDCD;          /* Linien, Rahmen */
  --c-weiss: #FFFFFF;
  --c-pruefen: #FBE3C4;        /* Status „prüfen“ */
  --c-pruefen-text: #7A4A12;
  --c-on-dark: #C9D3CE;        /* Fließtext auf Waldgrün */
  --c-on-dark-meta: #A9B8B1;   /* Labels auf Waldgrün */
  --c-line-dark: rgba(245, 241, 232, 0.16);

  /* Schriften */
  --font-sans: 'Instrument Sans', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --font-serif: 'Instrument Serif', Georgia, 'Times New Roman', serif;

  /* Typo-Skala laut Markenleitfaden (Desktop), mobil per clamp skaliert */
  --fs-display: clamp(2.75rem, 1.6rem + 5vw, 4.5rem);      /* 72px */
  --fs-h1: clamp(2.25rem, 1.6rem + 3.2vw, 3.5rem);         /* 56px */
  --fs-h2: clamp(2rem, 1.55rem + 1.9vw, 2.5rem);           /* 40px */
  --fs-h3: clamp(1.25rem, 1.1rem + 0.6vw, 1.5rem);         /* 24px */
  --fs-body-l: clamp(1.125rem, 1.05rem + 0.35vw, 1.25rem); /* 20px */
  --fs-body: 1.0625rem;                                     /* 17px */
  --fs-small: 0.9375rem;                                    /* 15px */
  --fs-label: 0.8125rem;                                    /* 13px */

  /* Spacing-Scale (statisch – für margin/padding/gap in Komponenten) */
  --space-tiny: 0.25rem;
  --space-xxsmall: 0.5rem;
  --space-xsmall: 1rem;
  --space-small: 1.5rem;
  --space-medium: 2rem;
  --space-large: 3rem;
  --space-xlarge: 4rem;
  --space-xxlarge: 5rem;
  --space-huge: 6rem;
  --space-xhuge: 7rem;
  --space-xxhuge: 10rem;

  /* Spacer (responsiv – für große Abstände zwischen Blöcken, Desktop-Werte) */
  --spacer-small: 1.5rem;
  --spacer-medium: 2rem;
  --spacer-large: 3rem;
  --spacer-xlarge: 4rem;
  --spacer-xxlarge: 5rem;
  --spacer-huge: 6rem;

  /* Section-Padding (oben + unten) */
  --section-small: 3rem;
  --section-medium: 5rem;
  --section-large: 7rem;

  /* Layout */
  --padding-global: 5%;
  --container-large: 80rem;
  --container-medium: 64rem;
  --container-small: 48rem;
  --max-width-small: 30rem;
  --max-width-medium: 35rem;
  --max-width-large: 48rem;

  /* Radien */
  --radius-s: 6px;
  --radius-m: 8px;    /* Inputs */
  --radius-l: 18px;   /* Karten, Boxen */
  --radius-pill: 10rem;

  --shadow-card: 0 1px 2px rgba(22, 48, 42, 0.04), 0 12px 32px rgba(22, 48, 42, 0.06);
  --navbar-height: 5rem;
  --ease: cubic-bezier(0.2, 0.7, 0.2, 1);
}

/* Tablet ≤ 991px */
@media (max-width: 991px) {
  :root {
    --spacer-large: 2.5rem;
    --spacer-xlarge: 3.5rem;
    --spacer-xxlarge: 4.5rem;
    --spacer-huge: 5rem;
    --section-medium: 4rem;
    --section-large: 6rem;
  }
}
/* Mobile Landscape ≤ 767px */
@media (max-width: 767px) {
  :root {
    --spacer-small: 1.25rem;
    --spacer-medium: 1.5rem;
    --spacer-large: 2rem;
    --spacer-xlarge: 2.5rem;
    --spacer-xxlarge: 3rem;
    --spacer-huge: 3.5rem;
    --section-small: 2rem;
    --section-medium: 3rem;
    --section-large: 4rem;
    --navbar-height: 4.5rem;
  }
}

/* 3 · Reset ------------------------------------------------------------- */
*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; scroll-padding-top: calc(var(--navbar-height) + var(--space-medium)); }
body {
  background: var(--c-papier);
  color: var(--c-text);
  font-family: var(--font-sans);
  font-size: var(--fs-body);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  text-rendering: optimizeLegibility;
}
img, svg { display: block; max-width: 100%; height: auto; }
input, button, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
/* :where() = Spezifität 0, damit Komponenten-Klassen (z. B. padding-top) nicht überschrieben werden */
:where(ul[class], ol[class]) { list-style: none; padding: 0; }
@media (prefers-reduced-motion: reduce) {
  html { scroll-behavior: auto; }
  *, *::before, *::after { transition-duration: 0.01ms !important; animation-duration: 0.01ms !important; }
}

/* 4 · Typografie -------------------------------------------------------- */
h1, h2, h3, h4 { color: var(--c-waldgruen); font-weight: 700; letter-spacing: -0.02em; text-wrap: balance; }
.display { font-size: var(--fs-display); line-height: 1; letter-spacing: -0.035em; }
h1, .h1 { font-size: var(--fs-h1); line-height: 1.02; letter-spacing: -0.03em; }
h2, .h2 { font-size: var(--fs-h2); line-height: 1.08; }
h3, .h3 { font-size: var(--fs-h3); line-height: 1.25; font-weight: 600; letter-spacing: -0.01em; }
h4, .h4 { font-size: var(--fs-body); line-height: 1.35; font-weight: 600; letter-spacing: 0; }
p { text-wrap: pretty; }
.body-l { font-size: var(--fs-body-l); line-height: 1.55; color: var(--c-text-2); }
.text-2 { color: var(--c-text-2); }

/* Serif-Akzent: nur kursiv, nur 1–3 Wörter pro Headline, nie im Fließtext */
.accent {
  font-family: var(--font-serif);
  font-style: italic;
  font-weight: 400;
  color: var(--c-koralle);
  letter-spacing: -0.01em;
}

/* Label / Tagline: 13 · 600 · +8 % */
.label {
  display: block;
  font-size: var(--fs-label);
  font-weight: 600;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--c-meta);
  line-height: 1.4;
}

/* 5 · Layout ------------------------------------------------------------ */
/* entspricht padding-global (5 %) + container-large (80rem) */
.container { width: min(var(--container-large), 100% - 2 * var(--padding-global)); margin-inline: auto; }
.container--medium { width: min(var(--container-medium), 100% - 2 * var(--padding-global)); }
.container--narrow { width: min(var(--container-small), 100% - 2 * var(--padding-global)); }

.section { padding-block: var(--section-large); }
.section--medium { padding-block: var(--section-medium); }
.section--small { padding-block: var(--section-small); }
.section--dark { background: var(--c-waldgruen); color: var(--c-papier); }
.section--dark h1, .section--dark h2, .section--dark h3, .section--dark h4 { color: var(--c-papier); }
.section--dark .label { color: var(--c-on-dark-meta); }
.section--dark .body-l, .section--dark .text-2 { color: var(--c-on-dark); }
.section--white { background: var(--c-weiss); }

/* Section-Header: Tagline → Headline 1rem · Headline → Text 1.5rem · Header → Inhalt responsiv 5/4.5/3rem */
.section-head { max-width: var(--max-width-large); margin-bottom: var(--spacer-xxlarge); }
.section-head .label { margin-bottom: var(--space-xsmall); }
.section-head h2 + p, .section-head h1 + p { margin-top: var(--space-small); }
.section-head .body-l { max-width: var(--max-width-medium); }
.section-head--center { margin-inline: auto; text-align: center; }
.section-head--center .body-l { margin-inline: auto; }

/* Grids: Standard-Gap 2rem, große Layouts 3–4rem */
.grid { display: grid; gap: var(--space-medium); }
.grid--wide { gap: var(--spacer-large) var(--space-medium); }
@media (min-width: 768px) {
  .grid--2 { grid-template-columns: repeat(2, 1fr); }
  .grid--3 { grid-template-columns: repeat(3, 1fr); }
  .grid--4 { grid-template-columns: repeat(2, 1fr); }
}
@media (min-width: 992px) {
  .grid--4 { grid-template-columns: repeat(4, 1fr); }
}

/* 6 · Buttons & Links --------------------------------------------------- */
a { color: var(--c-koralle-dunkel); text-underline-offset: 0.2em; }
a:hover { color: var(--c-waldgruen); }

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-xxsmall);
  min-height: 3.5rem; padding: 1rem 2rem;
  border: 2px solid transparent; border-radius: var(--radius-pill);
  font-size: var(--fs-body); font-weight: 600; line-height: 1.2; text-decoration: none;
  transition: background-color 0.2s var(--ease), color 0.2s var(--ease), border-color 0.2s var(--ease), transform 0.2s var(--ease);
}
.btn:active { transform: translateY(1px); }
.btn:focus-visible, a:focus-visible, button:focus-visible, input:focus-visible, summary:focus-visible {
  outline: 3px solid var(--c-koralle); outline-offset: 3px;
}
/* Grün = Hauptaktion */
.btn--primary { background: var(--c-waldgruen); color: var(--c-papier); }
.btn--primary:hover { background: var(--c-moos); color: var(--c-papier); }
/* Koralle = nur EINE besonders wichtige Aktion pro Seite */
.btn--accent { background: var(--c-koralle); color: var(--c-waldgruen); }
.btn--accent:hover { background: #FF7152; color: var(--c-waldgruen); }
.btn--outline { background: transparent; color: var(--c-waldgruen); border-color: var(--c-waldgruen); }
.btn--outline:hover { background: var(--c-waldgruen); color: var(--c-papier); }
/* Auf dunklen Flächen */
.btn--light { background: var(--c-papier); color: var(--c-waldgruen); }
.btn--light:hover { background: var(--c-salbei); color: var(--c-waldgruen); }
.btn--sm { min-height: 2.75rem; padding: 0.5rem 1.25rem; font-size: var(--fs-small); }
.btn--block { width: 100%; }

.link-underline {
  display: inline-block; color: var(--c-waldgruen); font-weight: 600; text-decoration: none;
  border-bottom: 2px solid currentColor; padding-bottom: var(--space-tiny);
}
.link-underline:hover { color: var(--c-moos); }
.section--dark .link-underline { color: var(--c-papier); }

/* Button-Gruppe: Abstand zum Text darüber 2rem, untereinander 1.5rem */
.btn-row { display: flex; flex-wrap: wrap; align-items: center; gap: var(--space-xsmall) var(--space-small); }

/* 7 · Komponenten ------------------------------------------------------- */
.card {
  background: var(--c-weiss);
  border: 1px solid var(--c-linie);
  border-radius: var(--radius-l);
  padding: var(--space-medium);
}
@media (min-width: 992px) { .card { padding: var(--space-large); } }
.card--paper { background: var(--c-papier); }
.card--sage { background: var(--c-salbei); border-color: transparent; }
.card--dark { background: var(--c-waldgruen); border-color: transparent; color: var(--c-papier); }
.card--dark h3, .card--dark h4 { color: var(--c-papier); }

/* Linie oben (wie „Markenkern“ im Leitfaden) */
.rule-top { border-top: 2px solid var(--c-waldgruen); padding-top: var(--space-small); }
.rule-top--accent { border-top-color: var(--c-koralle); }

/* Status-Badges */
.badge {
  display: inline-flex; align-items: center; gap: var(--space-xxsmall);
  padding: 0.375rem 0.875rem; border-radius: var(--radius-pill);
  font-size: var(--fs-small); font-weight: 600; line-height: 1.2; white-space: nowrap;
}
.badge::before { content: ''; width: 0.5em; height: 0.5em; border-radius: 50%; background: currentColor; }
.badge--passt { background: var(--c-salbei); color: var(--c-waldgruen); }
.badge--passt::before { background: var(--c-moos); }
.badge--pruefen { background: var(--c-pruefen); color: var(--c-pruefen-text); }
.badge--pruefen::before { background: #D88A23; }
.badge--raus { background: #ECE6DA; color: var(--c-meta); }
.badge--raus::before { background: #A69F92; }
.badge--plain::before { display: none; }

/* Icon-Kachel (icon medium = 3rem) */
.icon-tile {
  display: inline-grid; place-items: center;
  width: 3rem; height: 3rem; border-radius: var(--radius-m);
  background: var(--c-salbei); color: var(--c-moos);
}
.icon-tile svg { width: 1.5rem; height: 1.5rem; }
.section--dark .icon-tile { background: rgba(215, 236, 217, 0.12); color: var(--c-salbei); }

/* Check-Liste (Listen-Gap 1rem) */
.checklist { display: grid; gap: var(--space-xsmall); }
.checklist li { position: relative; padding-left: 2.25rem; }
.checklist li::before {
  content: ''; position: absolute; left: 0; top: 0.15em;
  width: 1.375rem; height: 1.375rem; border-radius: 50%;
  background: var(--c-salbei) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20' fill='none' stroke='%232F6B57' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M5.5 10.5l3 3 6-7'/%3E%3C/svg%3E") center / 0.875rem no-repeat;
}

/* Bild-Platzhalter (ersetzen, sobald Fotos/Logos vorliegen) */
.placeholder {
  display: grid; place-items: center; text-align: center;
  background: repeating-linear-gradient(135deg, #EDE7DA 0 12px, #F2EDE3 12px 24px);
  border: 1px dashed #CFC6B3; border-radius: var(--radius-l);
  color: var(--c-meta); font-size: var(--fs-small); padding: var(--space-small);
}

/* Logo-Laufband (Startseite + Anfrage-Seite) --------------------------- */
.marquee {
  overflow: hidden;
  -webkit-mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
          mask-image: linear-gradient(90deg, transparent, #000 10%, #000 90%, transparent);
}
.marquee__track { display: flex; width: max-content; animation: marquee 40s linear infinite; }
.marquee:hover .marquee__track { animation-play-state: paused; }
.marquee__list { display: flex; align-items: center; gap: var(--space-xxlarge); padding-right: var(--space-xxlarge); }
.marquee__list img { height: calc(var(--logo-h, 32) * 1px); width: auto; max-width: none; opacity: 0.6; transition: opacity 0.2s var(--ease); }
.marquee__list img:hover { opacity: 1; }
@keyframes marquee { to { transform: translateX(-50%); } }
@media (max-width: 767px) {
  .marquee__list { gap: var(--space-large); padding-right: var(--space-large); }
  .marquee__list img { height: calc(var(--logo-h, 32) * 0.75px); }
}
/* Ohne Bewegung: Logos statisch und umbrechend */
@media (prefers-reduced-motion: reduce) {
  .marquee { -webkit-mask-image: none; mask-image: none; }
  .marquee__track { animation: none; width: auto; justify-content: center; }
  .marquee__list { flex-wrap: wrap; justify-content: center; padding: 0 var(--padding-global); gap: var(--space-medium) var(--space-large); }
  .marquee__list[aria-hidden="true"] { display: none; }
}

/* Kleine Variante, z. B. auf der Anfrage-Seite */
.marquee--small .marquee__track { animation-duration: 30s; }
.marquee--small .marquee__list { gap: var(--space-large); padding-right: var(--space-large); }
.marquee--small .marquee__list img { height: calc(var(--logo-h, 32) * 0.7px); }

/* 8 · Navbar ------------------------------------------------------------ */
.skip-link {
  position: absolute; left: var(--space-xsmall); top: -4rem; z-index: 100;
  background: var(--c-waldgruen); color: var(--c-papier);
  padding: var(--space-xxsmall) var(--space-xsmall); border-radius: var(--radius-m);
}
.skip-link:focus { top: var(--space-xsmall); color: var(--c-papier); }

.navbar {
  position: sticky; top: 0; z-index: 50;
  background: rgba(245, 241, 232, 0.92);
  backdrop-filter: saturate(1.4) blur(10px); -webkit-backdrop-filter: saturate(1.4) blur(10px);
  border-bottom: 1px solid var(--c-linie);
}
.navbar__inner { display: flex; align-items: center; justify-content: space-between; gap: var(--space-medium); min-height: var(--navbar-height); }
.navbar__logo img { width: 164px; height: auto; }
.navbar__menu { display: flex; align-items: center; gap: var(--space-large); }
.navbar__links { display: flex; gap: var(--space-medium); }
.navbar__links a { color: var(--c-waldgruen); text-decoration: none; font-weight: 500; font-size: var(--fs-small); }
.navbar__links a:hover { color: var(--c-moos); }
.navbar__toggle {
  display: none; position: relative; width: 2.75rem; height: 2.75rem;
  background: transparent; border: 1px solid var(--c-linie); border-radius: var(--radius-m);
}
.navbar__toggle-bar {
  position: absolute; left: 50%; width: 1.125rem; height: 2px; background: var(--c-waldgruen);
  transform: translateX(-50%); transition: transform 0.25s var(--ease), top 0.25s var(--ease);
}
.navbar__toggle-bar:nth-child(1) { top: calc(50% - 4px); }
.navbar__toggle-bar:nth-child(2) { top: calc(50% + 3px); }
.navbar.is-open .navbar__toggle-bar:nth-child(1) { top: calc(50% - 1px); transform: translateX(-50%) rotate(45deg); }
.navbar.is-open .navbar__toggle-bar:nth-child(2) { top: calc(50% - 1px); transform: translateX(-50%) rotate(-45deg); }

@media (max-width: 991px) {
  .navbar__toggle { display: block; }
  .navbar__menu {
    display: none; position: absolute; inset: 100% 0 auto 0;
    flex-direction: column; align-items: stretch; gap: var(--space-medium);
    background: var(--c-papier); border-bottom: 1px solid var(--c-linie);
    padding: var(--space-xsmall) var(--padding-global) var(--space-large);
  }
  .navbar.is-open .navbar__menu { display: flex; }
  .navbar__links { flex-direction: column; gap: 0; }
  .navbar__links a { display: block; padding: var(--space-xsmall) 0; font-size: var(--fs-body); border-bottom: 1px solid var(--c-linie); }
}

/* 9 · Footer ------------------------------------------------------------ */
.footer { background: var(--c-waldgruen); color: var(--c-on-dark); padding-block: var(--section-medium) var(--space-medium); font-size: var(--fs-small); }
.footer a { color: var(--c-papier); text-decoration: none; }
.footer a:hover { color: var(--c-koralle); }
.footer .label { color: var(--c-on-dark-meta); margin-bottom: var(--space-small); }
.footer__top { display: grid; gap: var(--spacer-large); padding-bottom: var(--spacer-large); border-bottom: 1px solid var(--c-line-dark); }
.footer__brand img { width: 180px; margin-bottom: var(--space-small); }
.footer__brand p { max-width: var(--max-width-small); line-height: 1.6; }
.footer__nav ul { display: grid; gap: var(--space-xsmall); list-style: none; padding: 0; }
.footer__bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: var(--space-xsmall); padding-top: var(--space-medium); }
@media (min-width: 768px) {
  .footer__top { grid-template-columns: 2fr 1fr 1fr; }
}

/* 10 · Utilities -------------------------------------------------------- */
.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;
}
.text-center { text-align: center; }
/* Abstände nach oben – Werte aus der Spacing-Scale */
.mt-xsmall { margin-top: var(--space-xsmall); }
.mt-small { margin-top: var(--space-small); }
.mt-medium { margin-top: var(--space-medium); }
.mt-large { margin-top: var(--spacer-large); }
.mt-xlarge { margin-top: var(--spacer-xlarge); }
.todo { background: #FFF1C9; color: #6B4B00; border-radius: 4px; padding: 0 0.25em; font-size: 0.9em; }
